diff options
author | Francesco Cosoleto | 2011-05-26 15:17:25 +0200 |
---|---|---|
committer | Karel Zak | 2011-05-26 15:32:33 +0200 |
commit | 5d2a98490e87872214e6acdeac1031c0eb8cfc92 (patch) | |
tree | d2eaea544a6d8b662612e71395196c92bb6b5833 /partx/partx.c | |
parent | build-sys: use AUTOMAKE_OPTIONS = gnu (diff) | |
download | kernel-qcow2-util-linux-5d2a98490e87872214e6acdeac1031c0eb8cfc92.tar.gz kernel-qcow2-util-linux-5d2a98490e87872214e6acdeac1031c0eb8cfc92.tar.xz kernel-qcow2-util-linux-5d2a98490e87872214e6acdeac1031c0eb8cfc92.zip |
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>
Diffstat (limited to 'partx/partx.c')
-rw-r--r-- | partx/partx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/partx/partx.c b/partx/partx.c index 5979701c5..8cb35703a 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -426,7 +426,7 @@ static void add_tt_line(struct tt *tt, blkid_partition par) rc = asprintf(&str, "%ju", (uintmax_t) blkid_partition_get_size(par) << 9); else - str = size_to_human_string( + str = size_to_human_string(SIZE_SUFFIX_1LETTER, blkid_partition_get_size(par) << 9); break; case COL_NAME: |