]> git.ipfire.org Git - thirdparty/util-linux.git/commit
This adds a second parameter to size_to_human_string() to return a
authorFrancesco Cosoleto <cosoleto@gmail.com>
Thu, 26 May 2011 13:17:25 +0000 (15:17 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 26 May 2011 13:32:33 +0000 (15:32 +0200)
commit5d2a98490e87872214e6acdeac1031c0eb8cfc92
treed2eaea544a6d8b662612e71395196c92bb6b5833
parent2b85ab880d4fff8addb2deac4c25223c7973976e
This adds a second parameter to size_to_human_string() to return a
string with a different format based on the following flags:

        SIZE_SUFFIX_1LETTER  = "1K"
        SIZE_SUFFIX_3LETTER  = "1KiB",
        SIZE_SUFFIX_SPACE    = "1 KiB" or "1 K"

[kzak@redhat.com: - rename flags to SIZE_SUFFIX_* format,
                  - fix suffix[] buffer size
                  - add 3 letter version to the test]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
include/strutils.h
lib/strutils.c
misc-utils/lsblk.c
partx/partx.c
tests/expected/misc/strtosize