Skip to contentSkip to conversation

qemu-img: correct help message

PATCH Superseded Dong Xu Wang 2 participants 2 messages Jul 12, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-img: correct help message

qemu-img not only suports k/K/M/G/T/b, but also supports m/g/t/B. So correct it in help message.

---
 qemu-img.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
qemu-img.c +3 -2
index 80cfb9b..533eac2 100644
@@ -69,8 +69,9 @@ static void help(void)
            "    options are: 'none', 'writeback' (default, except for convert), 'writethrough',\n"
            "    'directsync' and 'unsafe' (default for convert)\n"
            "  'size' is the disk image size in bytes. Optional suffixes\n"
-           "    'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
-           "    and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
+           "    'k' or 'K' (kilobyte, 1024), 'm' or 'M' (megabyte, 1024k),\n"
+           "    'g' or 'G' (gigabyte, 1024M) and 't' or 'T' (terabyte, 1024G) are supported.\n"
+           "    'b' or 'B' is ignored.\n"
            "  'output_filename' is the destination disk image filename\n"
            "  'output_fmt' is the destination format\n"
            "  'options' is a comma separated list of format specific options in a\n"
Signature · 1 line
1.7.1
#1 lore raw

2012/7/12 Dong Xu Wang <[email protected]>:

Quoted 14 lines

qemu-img not only suports k/K/M/G/T/b, but also supports m/g/t/B. So correct it in help message.

---
 qemu-img.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
qemu-img.c +0 -0
index 80cfb9b..533eac2 100644
@@ -69,8 +69,9 @@ static void help(void)
            "    options are: 'none', 'writeback' (default, except for convert), 'writethrough',\n"

qemu-img.c static void help(void) · line 77

Quoted 10 lines
qemu-img.c +3 -2
            "    'directsync' and 'unsafe' (default for convert)\n"
            "  'size' is the disk image size in bytes. Optional suffixes\n"
-           "    'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
-           "    and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
+           "    'k' or 'K' (kilobyte, 1024), 'm' or 'M' (megabyte, 1024k),\n"
+           "    'g' or 'G' (gigabyte, 1024M) and 't' or 'T' (terabyte, 1024G) are supported.\n"
+           "    'b' or 'B' is ignored.\n"
            "  'output_filename' is the destination disk image filename\n"
            "  'output_fmt' is the destination format\n"
            "  'options' is a comma separated list of format specific options in a\n"

Those error reporting also need to be corrected:

        if (sval < 0 || *end) {
            error_report("Invalid image size specified! You may use k, M, G or "
                  "T suffixes for ");
            error_report("kilobytes, megabytes, gigabytes and terabytes.");
            ret = -1;
            goto out;
        }
Signature · 3 lines
Best Regards,

Dunrong Huang