[parted-devel] [PATCH 1/2] parted: Fix ending sector location when using kilo IEC suffixes

Brian C. Lane bcl at redhat.com
Mon Mar 6 16:37:40 GMT 2023


On Fri, Mar 03, 2023 at 07:17:57PM -0800, John Gilmore wrote:
> The symbol for kilo- is a lowercase 'k'.  See:
> 
>   https://en.wikipedia.org/wiki/Kilo-
> 
> Parted should certainly handle a lowercase 'k' in input, and should
> output lowercase 'k's when it means kilobytes or kibibytes.  If you want
> to make it handle user input with an uppercase k as well, that's an extra
> credit option...

That probably explains why it has been lower case from the first commit
:)

I hate to refer to Wikipedia, but well, it's what we have -- this table
says that it is 'k' for kilo but 'Ki' for kibi so KiB would be the
correct output format.

https://en.wikipedia.org/wiki/Binary_prefix

oh, and this nist.gov page agrees:

https://physics.nist.gov/cuu/Units/binary.html

I'm mostly worried about anything that's parsing the output and
expecting kiB.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart




More information about the parted-devel mailing list