[U-Boot] [PATCH] [v2] allow print_size to print large numbers on 32-bit systems

Scott Wood scottwood at freescale.com
Mon Apr 12 21:54:58 CEST 2010


Timur Tabi wrote:
> Modify print_size() so that it can accept numbers larger than 4GB on 32-bit
> systems.
> 
> Add support for display terabyte, petabyte, and exabyte sizes.  Change the
> output to use International Electrotechnical Commission binary prefix standard.
> 
> Signed-off-by: Timur Tabi <timur at freescale.com>
> ---
>  lib_generic/display_options.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/lib_generic/display_options.c b/lib_generic/display_options.c
> index da17a62..53b154d 100644
> --- a/lib_generic/display_options.c
> +++ b/lib_generic/display_options.c
> @@ -40,22 +40,22 @@ int display_options (void)
>  
>  /*
>   * print sizes as "xxx kB", "xxx.y kB", "xxx MB", "xxx.y MB",
> - * xxx GB, or xxx.y GB as needed; allow for optional trailing string
> + * xxx GB, xxx.y GB, etc as needed; allow for optional trailing string
[snip]
> -	printf (" %cB%s", c, s);
> +	printf (" %ciB%s", c, s);

Comment should be updated to match the code.

-Scott


More information about the U-Boot mailing list