* [U-Boot] [PATCH] Change the visible output for transfers to display hex numbers
@ 2011-01-25 10:15 Alexander Holler
2011-01-25 10:27 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Holler @ 2011-01-25 10:15 UTC (permalink / raw)
To: u-boot
When files were transfered the output is currently
-
Bytes transferred = 1976384 (1e2840 hex)
-
Using the decimal length as input for other commands conflicts with the
the default base of 16 needed.
Change the output to
-
Bytes transferred = 0x1e2840 (1976384 bytes)
-
to reflect what should be used as input for other commands.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
---
net/net.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/net.c b/net/net.c
index a609632..a454411 100644
--- a/net/net.c
+++ b/net/net.c
@@ -528,7 +528,7 @@ restart:
case NETLOOP_SUCCESS:
if (NetBootFileXferSize > 0) {
char buf[20];
- printf("Bytes transferred = %ld (%lx hex)\n",
+ printf("Bytes transferred = 0x%lx (%ld bytes)\n",
NetBootFileXferSize,
NetBootFileXferSize);
sprintf(buf, "%lX", NetBootFileXferSize);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] Change the visible output for transfers to display hex numbers
2011-01-25 10:15 [U-Boot] [PATCH] Change the visible output for transfers to display hex numbers Alexander Holler
@ 2011-01-25 10:27 ` Wolfgang Denk
2011-01-25 10:49 ` Alexander Holler
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2011-01-25 10:27 UTC (permalink / raw)
To: u-boot
Dear Alexander Holler,
In message <1295950537-12363-1-git-send-email-holler@ahsoftware.de> you wrote:
> When files were transfered the output is currently
> -
> Bytes transferred = 1976384 (1e2840 hex)
> -
> Using the decimal length as input for other commands conflicts with the
> the default base of 16 needed.
>
> Change the output to
> -
> Bytes transferred = 0x1e2840 (1976384 bytes)
> -
> to reflect what should be used as input for other commands.
In which way does this reflect what "should be used as input for other
commands"?
I don't even understand why you use this manually with copy & paste.
Why don't you simply refer to the ${filesize} variable?
In any case, if you want to change this format, you must change _all_
occurrences of it, i. e. include all the commands that load from
external storage (ide, usb, scsi, sata, nand, dataflash, SPI-Flash,
...).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lots of folks confuse bad management with destiny. -- Frank Hubbard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] Change the visible output for transfers to display hex numbers
2011-01-25 10:27 ` Wolfgang Denk
@ 2011-01-25 10:49 ` Alexander Holler
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Holler @ 2011-01-25 10:49 UTC (permalink / raw)
To: u-boot
Hello,
Am 25.01.2011 11:27, schrieb Wolfgang Denk:
> Dear Alexander Holler,
>
> In message<1295950537-12363-1-git-send-email-holler@ahsoftware.de> you wrote:
>> When files were transfered the output is currently
>> -
>> Bytes transferred = 1976384 (1e2840 hex)
>> -
>> Using the decimal length as input for other commands conflicts with the
>> the default base of 16 needed.
>>
>> Change the output to
>> -
>> Bytes transferred = 0x1e2840 (1976384 bytes)
>> -
>> to reflect what should be used as input for other commands.
>
> In which way does this reflect what "should be used as input for other
> commands"?
>
> I don't even understand why you use this manually with copy& paste.
>
> Why don't you simply refer to the ${filesize} variable?
TIMTOWTDI
> In any case, if you want to change this format, you must change _all_
> occurrences of it, i. e. include all the commands that load from
> external storage (ide, usb, scsi, sata, nand, dataflash, SPI-Flash,
> ...).
Than I prefer not to change something and live with that
unorthogonality. Besides several READMEs, net/net.c is the only source where
git grep "Bytes transferred"
shows that such an output is used.
Regards,
Alexander
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-25 10:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 10:15 [U-Boot] [PATCH] Change the visible output for transfers to display hex numbers Alexander Holler
2011-01-25 10:27 ` Wolfgang Denk
2011-01-25 10:49 ` Alexander Holler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.