Skip to contentSkip to conversation

Makefile: Fix printing problem in size_check on overflow

PATCH New Tom Rini 2 participants 3 messages Oct 23, 2019 – Nov 1, 2019 Kbuild

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Makefile: Fix printing problem in size_check on overflow

When we have an excess size growth, fix the "limit" printf call to pass in just the limit variable rather than the string bytes to the format character.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index cbacf1cfe2c9..f09023a3977f 100644
@@ -346,7 +346,7 @@ define size_check
 	limit=$$( printf "%d" $2 ); \
 	if test $$actual -gt $$limit; then \
 		echo "$1 exceeds file size limit:" >&2; \
-		echo "  limit:  $$(printf %#x bytes $$limit) bytes" >&2; \
+		echo "  limit:  $$(printf %#x $$limit) bytes" >&2; \
 		echo "  actual: $$(printf %#x $$actual) bytes" >&2; \
 		echo "  excess: $$(printf %#x $$((actual - limit))) bytes" >&2;\
 		exit 1; \
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 Makefile: Fix printing problem in size_check on overflow

Am 23.10.2019 um 21:39 schrieb Tom Rini:

Quoted 5 lines

When we have an excess size growth, fix the "limit" printf call to pass in just the limit variable rather than the string bytes to the format character.

Quoted 18 lines
---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index cbacf1cfe2c9..f09023a3977f 100644
@@ -346,7 +346,7 @@ define size_check
  	limit=$$( printf "%d" $2 ); \
  	if test $$actual -gt $$limit; then \
  		echo "$1 exceeds file size limit:" >&2; \
-		echo "  limit:  $$(printf %#x bytes $$limit) bytes" >&2; \
+		echo "  limit:  $$(printf %#x $$limit) bytes" >&2; \
  		echo "  actual: $$(printf %#x $$actual) bytes" >&2; \
  		echo "  excess: $$(printf %#x $$((actual - limit))) bytes" >&2;\
  		exit 1; \
author
#2 lore raw

PATCH 1/1 Makefile: Fix printing problem in size_check on overflow

In reply to Tom Rini
Quoted 6 lines · Tom Rini

When we have an excess size growth, fix the "limit" printf call to pass in just the limit variable rather than the string bytes to the format character.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191101/4d04e839/attachment.sig>