public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] allow print_size to print large numbers on 32-bit systems
Date: Tue, 30 Mar 2010 18:02:59 -0500	[thread overview]
Message-ID: <1269990179-23666-2-git-send-email-timur@freescale.com> (raw)
In-Reply-To: <1269990179-23666-1-git-send-email-timur@freescale.com>

Modify print_size() so that it can accept numbers larger than 4GB on 32-bit
systems.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 include/common.h              |    2 +-
 lib_generic/display_options.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/common.h b/include/common.h
index a133e34..4e77727 100644
--- a/include/common.h
+++ b/include/common.h
@@ -218,7 +218,7 @@ void	hang		(void) __attribute__ ((noreturn));
 /* */
 phys_size_t initdram (int);
 int	display_options (void);
-void	print_size (phys_size_t, const char *);
+void	print_size(unsigned long long, const char *);
 int	print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
 
 /* common/main.c */
diff --git a/lib_generic/display_options.c b/lib_generic/display_options.c
index 08a7914..da17a62 100644
--- a/lib_generic/display_options.c
+++ b/lib_generic/display_options.c
@@ -43,7 +43,7 @@ int display_options (void)
  * xxx GB, or xxx.y GB as needed; allow for optional trailing string
  * (like "\n")
  */
-void print_size (phys_size_t size, const char *s)
+void print_size(unsigned long long size, const char *s)
 {
 	unsigned long m = 0, n;
 	unsigned long long d = 1 << 30; 	/* 1 GB */
-- 
1.6.5

  reply	other threads:[~2010-03-30 23:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 23:02 [U-Boot] [PATCH] [v3] fix print_size printing fractional gigabyte numbers on 32-bit platforms Timur Tabi
2010-03-30 23:02 ` Timur Tabi [this message]
2010-04-09 20:22   ` [U-Boot] [PATCH] allow print_size to print large numbers on 32-bit systems Wolfgang Denk
2010-04-09 20:27     ` Timur Tabi
2010-04-09 20:40       ` Wolfgang Denk
2010-04-12 16:12         ` Timur Tabi
2010-04-12 16:16           ` Nick Thompson
2010-04-12 16:21             ` Timur Tabi
2010-04-12 16:27               ` Nick Thompson
2010-04-12 18:02             ` Wolfgang Denk
2010-04-12 17:59           ` Wolfgang Denk
2010-04-12 18:03             ` Timur Tabi
2010-04-12 18:20               ` Wolfgang Denk
2010-04-12 18:22               ` Scott Wood
2010-04-12 18:30                 ` Timur Tabi
2010-04-12 18:50                   ` Wolfgang Denk
2010-04-12 19:10                     ` Timur Tabi
2010-04-12 19:26                       ` Scott Wood
2010-04-09 20:10 ` [U-Boot] [PATCH] [v3] fix print_size printing fractional gigabyte numbers on 32-bit platforms Wolfgang Denk
2010-04-12 16:04   ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269990179-23666-2-git-send-email-timur@freescale.com \
    --to=timur@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox