[openwrt/openwrt] ramips: mt7621: fix broken hexdump expression in iodata.sh
LEDE Commits
lede-commits at lists.infradead.org
Tue May 20 04:04:09 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d95e8a59bbccf9b8b21aeb3d87ff2b0a1af023d8
commit d95e8a59bbccf9b8b21aeb3d87ff2b0a1af023d8
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat May 17 20:22:57 2025 +0900
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 at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18827
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/ramips/mt7621/base-files/lib/upgrade/iodata.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
More information about the lede-commits
mailing list