Patchwork [2/2] Make img_create() use strtosz_suffix()

login
register
mail settings
Submitter Jes Sorensen
Date Dec. 9, 2010, 11:54 a.m.
Message ID <1291895645-32363-3-git-send-email-Jes.Sorensen@redhat.com>
Download mbox | patch
Permalink /patch/74924/
State New
Headers show

Comments

Jes Sorensen - Dec. 9, 2010, 11:54 a.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

This reestablished the old default of using bytes as the default for
the size argument, and not MB as we do in pretty much every other
place.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 qemu-img.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/qemu-img.c b/qemu-img.c
index 9a5e7e1..603bdb3 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -331,7 +331,7 @@  static int img_create(int argc, char **argv)
     /* Get image size, if specified */
     if (optind < argc) {
         ssize_t sval;
-        sval = strtosz(argv[optind++], NULL);
+        sval = strtosz_suffix(argv[optind++], NULL, STRTOSZ_DEFSUFFIX_B);
         if (sval < 0) {
             error("Invalid image size specified! You may use k, M, G or "
                   "T suffixes for ");