From: Jes.Sorensen@redhat.com
To: kwolf@redhat.com
Cc: qemu-devel@nongnu.org, armbru@redhat.com, stefanha@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH 2/2] Make img_create() use strtosz_suffix()
Date: Thu, 9 Dec 2010 12:54:05 +0100 [thread overview]
Message-ID: <1291895645-32363-3-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1291895645-32363-1-git-send-email-Jes.Sorensen@redhat.com>
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(-)
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 ");
--
1.7.3.2
prev parent reply other threads:[~2010-12-09 11:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 11:54 [Qemu-devel] [PATCH 0/2] Fix size default for qemu-img Jes.Sorensen
2010-12-09 11:54 ` [Qemu-devel] [PATCH 1/2] Introduce strtosz_suffix() Jes.Sorensen
2010-12-09 11:54 ` Jes.Sorensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291895645-32363-3-git-send-email-Jes.Sorensen@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).