[BusyBox] hexdump address not formatted correctly

Sauder, Vernon Vernon.Sauder at spirentcom.com
Mon Apr 26 19:51:12 UTC 2004


Date: Fri, 5 Mar 2004 16:49:27 +1100
From: Glenn McGrath <bug1 at iinet.net.au>
Subject: Re: [BusyBox] hexdump address not formatted correctly
To: busybox at mail.busybox.net
Message-ID: <20040305164927.25821ce0.bug1 at iinet.net.au>
Content-Type: text/plain; charset=US-ASCII

On Thu, 4 Mar 2004 16:57:46 -0500 
"Sauder, Vernon" <Vernon.Sauder at spirentcom.com> wrote:

> The off_t type is not a consistent size; it depends on the kernel 
> options(something about large file support). Therefore, the format 
> string for printing an address is not always the same. I chose to 
> statically cast it to the correct size for the format string for the 
> purposes here. Here is a diff on dump.c

Makes sense to me, applied to cvs.


Glenn
</quote>

The patch I sent was not completely applied. Only one of the changes was
added. Here is the other part of the change. Please apply for 1.0.

Index: libbb/dump.c
===================================================================
RCS file: /var/cvs/busybox/libbb/dump.c,v
retrieving revision 1.11
diff -u -r1.11 dump.c
--- a/libbb/dump.c	27 Mar 2004 11:26:32 -0000	1.11
+++ b/libbb/dump.c	26 Apr 2004 19:22:37 -0000
@@ -545,7 +545,7 @@
 /*                      PRINT; */
 						switch (pr->flags) {
 						case F_ADDRESS:
-							printf(pr->fmt,
address);
+							printf(pr->fmt,
(unsigned int)address);
 							break;
 						case F_BPAD:
 							printf(pr->fmt, "");



More information about the busybox mailing list