diff options
author | Max Qian <public@maxqia.com> | 2023-09-14 21:54:30 -0700 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-09-17 22:46:01 +0200 |
commit | 2dc284a79a0dd5f8a8e4d9422dd12319320ad6db (patch) | |
tree | 9db0bfe21abfdb92f86bbf1782da007251c9661a /target/linux/ramips/image/mt7621.mk | |
parent | c3be8324273dbd3f034fb3fe5b9d5ad7081b2d1f (diff) | |
download | upstream-2dc284a79a0dd5f8a8e4d9422dd12319320ad6db.tar.gz upstream-2dc284a79a0dd5f8a8e4d9422dd12319320ad6db.tar.bz2 upstream-2dc284a79a0dd5f8a8e4d9422dd12319320ad6db.zip |
ramips: RT1800: fix invalid octal number error
This commit removes the padded zeros in the date formatting.
The padded zeros from the date command causes the numbers
to be interpreted as an octal number by printf. Months, days,
and years with the number 08 or 09 raise an error in printf as an
"invalid octal number" and get interpreted as a zero.
Signed-off-by: Max Qian <public@maxqia.com>
(cherry picked from commit 794349a28a7b9036b54e13487a96120609db924e)
Diffstat (limited to 'target/linux/ramips/image/mt7621.mk')
-rw-r--r-- | target/linux/ramips/image/mt7621.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 2675c7d08b..962d7ef440 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -88,7 +88,7 @@ define Build/belkin-header ( \ type_fw_date=$$(printf "01%02x%02x%02x" \ - $$(date -d "@$(SOURCE_DATE_EPOCH)" "+%y %m %d")); \ + $$(date -d "@$(SOURCE_DATE_EPOCH)" "+%-y %-m %-d")); \ hw_fw_ver=$$(printf "%02x%02x%02x%02x" \ $(hw_ver) $$(echo $(fw_ver) | cut -d. -f-3 | tr . ' ')); \ fw_len_crc=$$(gzip -c $@ | tail -c 8 | od -An -tx8 | tr -d ' \n'); \ |