[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 29/31] qemu-io: Fix recent UI updates
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 29/31] qemu-io: Fix recent UI updates |
Date: |
Thu, 19 May 2016 17:22:07 +0200 |
From: Eric Blake <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
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 22f2ecf..b5dbc67 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1107,7 +1107,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;
@@ -1393,7 +1393,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;
@@ -1436,6 +1436,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;
}
--
1.8.3.1
- Re: [Qemu-devel] [PULL 21/31] block: Avoid bs->blk in bdrv_next(), (continued)
[Qemu-devel] [PULL 20/31] block: Add bdrv_has_blk(), Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 22/31] block: Don't return throttling info in query-named-block-nodes, Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 24/31] block: Propagate AioContext change to all children, Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 30/31] qemu-iotests: Simplify 109 with unaligned qemu-img compare, Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 27/31] qemu-iotests: Some more write_zeroes tests, Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 23/31] block: Remove BlockDriverState.blk, Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 31/31] qemu-iotests: Fix regression in 136 on aio_read invalid, Kevin Wolf, 2016/05/19
[Qemu-devel] [PULL 29/31] qemu-io: Fix recent UI updates,
Kevin Wolf <=
Re: [Qemu-devel] [PULL 00/31] Block layer patches, Peter Maydell, 2016/05/19
[Qemu-devel] [PULL 00/31] Block layer patches, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 02/31] block: Drop useless bdrv_new() call, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 01/31] block: Fix bdrv_next() memory leak, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 03/31] block: Let bdrv_open_inherit() return the snapshot, Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 06/31] block: Drop bdrv_new_root(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 08/31] block: Assert !bs->refcnt in bdrv_close(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 05/31] block: Drop blk_new_with_bs(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 09/31] block: Drop bdrv_parent_cb_...() from bdrv_close(), Kevin Wolf, 2016/05/25
- [Qemu-devel] [PULL 04/31] tests: Drop BDS from test-throttle.c, Kevin Wolf, 2016/05/25