package/base-files: add get_magic_long() to common upgrade script
authorGabor Juhos <juhosg@openwrt.org>
Wed, 26 Jan 2011 20:35:37 +0000 (20:35 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 26 Jan 2011 20:35:37 +0000 (20:35 +0000)
Patch-by: Mark Mentovai <mark@moxienet.com>
SVN-Revision: 25117

package/base-files/Makefile
package/base-files/files/lib/upgrade/common.sh

index 2ef88dbb74afbfdfce750004e53709464e686c01..f5d80a40406e22233245e3e2634be8584b1fabca 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=64
+PKG_RELEASE:=65
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index 970016e7baac276d3eb595370bc0336941d697a2..bf9c40d295dbfc068f50b521ee796db1954e5389 100644 (file)
@@ -130,6 +130,10 @@ get_magic_word() {
        get_image "$@" | dd bs=2 count=1 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"'
 }
 
+get_magic_long() {
+       get_image "$@" | dd bs=4 count=1 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
+}
+
 refresh_mtd_partitions() {
        mtd refresh rootfs
 }