qemu-img: correct help message
PATCH v2 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.
Signed-off-by Dong Xu Wang <[email protected]>
---v1->v2: also correct error reporting.
qemu-img.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
qemu-img.c +5 -4
@@ -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"
@@ -341,8 +342,8 @@ static int img_create(int argc, char **argv)char *end; sval =strtosz_suffix (argv[optind++], &end,STRTOSZ_DEFSUFFIX_B );if (sval <0 || *end) { -error_report ("Invalid image size specified! You may use k, M, G or " -"T suffixes for " ); +error_report ("Invalid image size specified! You may use k/K, m/M, " +"g/G or t/T suffixes for " );error_report ("kilobytes, megabytes, gigabytes and terabytes." ); ret =-1 ; goto out;
Signature · 1 line
1.7.1
Am 12.07.2012 05:28, schrieb Dong Xu Wang:
Quoted 7 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.
Signed-off-by Dong Xu Wang <[email protected]>---
v1->v2: also correct error reporting.
This is only true for some cases. For example, img_resize uses a different parser (parse_option_size), which only supports the format described here.
There's probably little reason to keep two different parsers, though, so when the duplication is fixed, the help text can be updated as well.
Kevin