summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-26 15:23:46 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-26 15:23:46 +0200
commit326e4bddc3d36a2afc2781e3018e2649d2be0680 (patch)
tree73d5eb3166f160af6a912ec8bed0616ed5ed050e /net
parent5efc6836b7318b2bb442b1584d9371d2ea2df6d9 (diff)
downloadbarebox-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.c9
-rw-r--r--net/tftp.c12
2 files changed, 10 insertions, 11 deletions
diff --git a/net/nfs.c b/net/nfs.c
index d0d11ccec5..3770fe8f28 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -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);