base-files: read all 3 bytes in get_magic_vfat() at once
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 4 Jan 2021 00:28:44 +0000 (01:28 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 7 Jan 2021 18:51:50 +0000 (19:51 +0100)
While the speed improvement might be negligible, there is still no
reason to read individual bytes.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/base-files/Makefile
package/base-files/files/lib/upgrade/common.sh

index 8d40eb0e49cbc8afe1ee3f0c747a45e2dd426ed0..f18f221129e4edad4ce390d349fcce40dbd8bf38 100644 (file)
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk
 include $(INCLUDE_DIR)/feeds.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=245
+PKG_RELEASE:=246
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
index e8a28f4138c5d3e3c1da071a3078a4514aba60fe..c28bae48a15c3f1a0a1dd0449b9d98d9c1eab959 100644 (file)
@@ -130,7 +130,7 @@ get_magic_gpt() {
 }
 
 get_magic_vfat() {
-       (get_image "$@" | dd bs=1 count=3 skip=54) 2>/dev/null
+       (get_image "$@" | dd bs=3 count=1 skip=18) 2>/dev/null
 }
 
 get_magic_fat32() {