Re: [PATCH 1/2] lib: add generic helper to print sizes rounded to the correct SI range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 31, 2008 at 10:13:54AM -0500, James Bottomley wrote:
> +int string_get_size(u64 size, const enum string_size_units units,
> +		    char *buf, int len)
> +{
> +	const char *units_10[] = { "B", "KB", "MB", "GB", "TB", "PB",
> +				   "EB", "ZB", "YB", NULL};
> +	const char *units_2[] = {"B", "Kib", "MiB", "GiB", "TiB", "PiB",

Typo for KiB?

Should this be another %p extension instead?  %pB and %piB perhaps?
That would seem easier for the callers than futzing around with managing
their own string buffers.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux