From: jow Date: Wed, 19 Aug 2009 19:12:34 +0000 (+0000) Subject: [package] base-files: fix sysupgrade get_magic_word() function to return proper value... X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=d72fab0bfcbc381f9665f86439d25ab7e435c462 [package] base-files: fix sysupgrade get_magic_word() function to return proper values if the first two bytes are identical git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17319 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 06c257b63..ff3012bcc 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -124,7 +124,7 @@ get_image() { # [ ] } get_magic_word() { - get_image "$@" | dd bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"' + get_image "$@" | dd bs=2 count=1 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"' } refresh_mtd_partitions() {