diff options
author | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-26 15:23:46 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-26 15:23:46 +0200 |
commit | 326e4bddc3d36a2afc2781e3018e2649d2be0680 (patch) | |
tree | 73d5eb3166f160af6a912ec8bed0616ed5ed050e /net | |
parent | 5efc6836b7318b2bb442b1584d9371d2ea2df6d9 (diff) | |
download | barebox-326e4bddc3d36a2afc2781e3018e2649d2be0680.tar.gz barebox-326e4bddc3d36a2afc2781e3018e2649d2be0680.tar.xz |
print_size() -> size_human_readable()
return a pointer to a human readable string rather than printingit directly
Diffstat (limited to 'net')
-rw-r--r-- | net/nfs.c | 9 | ||||
-rw-r--r-- | net/tftp.c | 12 |
2 files changed, 10 insertions, 11 deletions
@@ -705,10 +705,11 @@ NfsStart (void) } printf ("\nFilename '%s/%s'.", nfs_path, nfs_filename); - if (NetBootFileSize) { - printf (" Size is 0x%x Bytes = ", NetBootFileSize<<9); - print_size (NetBootFileSize<<9, ""); - } + if (NetBootFileSize) + printf (" Size is 0x%x Bytes = %s", + NetBootFileSize<<9); + size_human_readable (NetBootFileSize<<9)); + printf ("\nLoad address: 0x%lx\n" "Loading: *\b", load_addr); diff --git a/net/tftp.c b/net/tftp.c index e690c39345..c0b29df3bb 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -334,14 +334,12 @@ TftpStart (void) printf ("Filename '%s'.", tftp_filename); - if (NetBootFileSize) { - printf (" Size is 0x%x Bytes = ", NetBootFileSize<<9); - print_size (NetBootFileSize<<9, ""); - } - - putchar('\n'); + if (NetBootFileSize) + printf (" Size is 0x%x Bytes = %s", + NetBootFileSize<<9, + size_human_readable(NetBootFileSize<<9)); - puts ("Loading: *\b"); + puts ("\nLoading: *\b"); NetSetTimeout (TIMEOUT * SECOND, TftpTimeout); NetSetHandler (TftpHandler); |