From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com
Subject: [Qemu-devel] [PATCH v2 1/3] qemu-io: Fix recent UI updates
Date: Mon, 16 May 2016 10:43:01 -0600 [thread overview]
Message-ID: <1463416983-28318-2-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1463416983-28318-1-git-send-email-eblake@redhat.com>
Commit 770e0e0e [*] tried to add 'writev -f', but didn't tweak
the getopt() call to actually let it work. Likewise, commit
c2e001c missed implementing 'aio_write -u -z'. The latter commit
also introduced a leak of ctx.
[*] does it sound "ech0e" in here? :)
Signed-off-by: Eric Blake <eblake@redhat.com>
---
v2: retitle, fix commit id typo, also plug Coverity leak [mreitz]
---
qemu-io-cmds.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index 4a00bc6..1c0b692 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1150,7 +1150,7 @@ static int writev_f(BlockBackend *blk, int argc, char **argv)
int pattern = 0xcd;
QEMUIOVector qiov;
- while ((c = getopt(argc, argv, "CqP:")) != -1) {
+ while ((c = getopt(argc, argv, "CfqP:")) != -1) {
switch (c) {
case 'C':
Cflag = true;
@@ -1595,7 +1595,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
int flags = 0;
ctx->blk = blk;
- while ((c = getopt(argc, argv, "CfqP:z")) != -1) {
+ while ((c = getopt(argc, argv, "CfqP:uz")) != -1) {
switch (c) {
case 'C':
ctx->Cflag = true;
@@ -1638,6 +1638,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
if ((flags & BDRV_REQ_MAY_UNMAP) && !ctx->zflag) {
printf("-u requires -z to be specified\n");
+ g_free(ctx);
return 0;
}
--
2.5.5
next prev parent reply other threads:[~2016-05-16 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 16:43 [Qemu-devel] [PATCH v2 0/3] Fix recent qemu-iotests issues Eric Blake
2016-05-16 16:43 ` Eric Blake [this message]
2016-05-16 16:43 ` [Qemu-devel] [PATCH v2 2/3] qemu-iotests: Simplify 109 with unaligned qemu-img compare Eric Blake
2016-05-16 16:43 ` [Qemu-devel] [PATCH v2 3/3] qemu-iotests: Fix regression in 136 on aio_read invalid Eric Blake
2016-05-17 10:19 ` [Qemu-devel] [PATCH v2 0/3] Fix recent qemu-iotests issues Max Reitz
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=1463416983-28318-2-git-send-email-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).