소스 검색

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 <[email protected]>
Max Qian 2 년 전
부모
커밋
794349a28a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      target/linux/ramips/image/mt7621.mk

+ 1 - 1
target/linux/ramips/image/mt7621.mk

@@ -119,7 +119,7 @@ define Build/belkin-header
 
 
 	( \
 	( \
 		type_fw_date=$$(printf "01%02x%02x%02x" \
 		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_fw_ver=$$(printf "%02x%02x%02x%02x" \
 			$(hw_ver) $$(echo $(fw_ver) | cut -d. -f-3 | tr . ' ')); \
 			$(hw_ver) $$(echo $(fw_ver) | cut -d. -f-3 | tr . ' ')); \
 		fw_len_crc=$$(gzip -c $@ | tail -c 8 | od -An -tx8 | tr -d ' \n'); \
 		fw_len_crc=$$(gzip -c $@ | tail -c 8 | od -An -tx8 | tr -d ' \n'); \