diff options
| author | INAGAKI Hiroshi | 2025-05-17 11:22:57 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-05-20 11:04:06 +0000 |
| commit | d95e8a59bbccf9b8b21aeb3d87ff2b0a1af023d8 (patch) | |
| tree | 9c1ed8e01f42167ccc195b6b7ef7357417505bb2 | |
| parent | 4c9f277c9af3a36301bcee40d6c5749a471d0de7 (diff) | |
| download | openwrt-d95e8a59bbccf9b8b21aeb3d87ff2b0a1af023d8.tar.gz | |
ramips: mt7621: fix broken hexdump expression in iodata.sh
Use the "1/1" as a iteration count of hexdump expression instead of the
broken "1", to fix the issue that the invalid bootnum will be obtained.
Currently, the hexdump command always outputs "0" when the decimal format
and the iteration count "1" are specified[0]. This is unexpected
behaviour, but the cause is unknown and use this fix as a workaround.
[0]: https://github.com/openwrt/openwrt/issues/18808
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18827
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh index 40b2b2c76b..cf5dbe7e29 100644 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh @@ -20,7 +20,7 @@ iodata_mstc_rw_byte() { local mtd="$1" local offset="$2" local setval="$3" - local _val=$(hexdump -s $offset -n 1 -e '"%d"' $mtd) + local _val=$(hexdump -s $offset -n 1 -e '1/1 "%d"' $mtd) if [ -z "$setval" ]; then echo $_val |