lkml.org 
[lkml]   [2011]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFCv2][PATCH 1/4] break units out of string_get_size()
On 09/30/2011 01:32 PM, Dave Hansen wrote:
> I would like to use these (well one of them) arrays in
> another function. Might as well break both versions
> out for consistency.
>
> Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
> ---
>
> linux-2.6.git-dave/lib/string_helpers.c | 25 +++++++++++++------------
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff -puN lib/string_helpers.c~string_get_size-pow2 lib/string_helpers.c
>
> +const char *units_10[] = { "B", "kB", "MB", "GB", "TB", "PB",
> + "EB", "ZB", "YB", NULL};
> +const char *units_2[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB",
> + "EiB", "ZiB", "YiB", NULL };

These names are way too generic to be public symbols.

Another thing worth thinking about is whether or not the -B suffix
should be part of these arrays.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2011-09-30 23:33    [W:0.044 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site