[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH v2 07/14] qemu-io: Don't print NULL when open witho
From: |
Markus Armbruster |
Subject: |
[Qemu-stable] [PATCH v2 07/14] qemu-io: Don't print NULL when open without non-option arg fails |
Date: |
Wed, 28 May 2014 11:17:00 +0200 |
Reproducer: "open -o a=b". Broken in commit fd0fee3.
Signed-off-by: Markus Armbruster <address@hidden>
---
qemu-io.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/qemu-io.c b/qemu-io.c
index f63e771..795cf46 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -62,7 +62,8 @@ static int openfile(char *name, int flags, int growable,
QDict *opts)
if (bdrv_open(&qemuio_bs, name, NULL, opts, flags | BDRV_O_PROTOCOL,
NULL, &local_err))
{
- fprintf(stderr, "%s: can't open device %s: %s\n", progname, name,
+ fprintf(stderr, "%s: can't open%s%s: %s\n", progname,
+ name ? " device " : "", name ?: "",
error_get_pretty(local_err));
error_free(local_err);
return 1;
@@ -73,7 +74,8 @@ static int openfile(char *name, int flags, int growable,
QDict *opts)
if (bdrv_open(&qemuio_bs, name, NULL, opts, flags, NULL, &local_err)
< 0)
{
- fprintf(stderr, "%s: can't open device %s: %s\n", progname, name,
+ fprintf(stderr, "%s: can't open%s%s: %s\n", progname,
+ name ? " device " : "", name ?: "",
error_get_pretty(local_err));
error_free(local_err);
bdrv_unref(qemuio_bs);
--
1.9.3
- [Qemu-stable] [PATCH v2 02/14] block/vvfat: Plug memory leak in enable_write_target(), (continued)
- [Qemu-stable] [PATCH v2 02/14] block/vvfat: Plug memory leak in enable_write_target(), Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 04/14] block: Plug memory leak on brv_open_image() error path, Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 01/14] qemu-img: Plug memory leak on block option help error path, Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 13/14] block/sheepdog: Plug memory leak in sd_snapshot_create(), Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 12/14] block/vvfat: Plug memory leak in read_directory(), Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 10/14] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR, Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 11/14] block/vvfat: Plug memory leak in check_directory_consistency(), Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 05/14] qemu-io: Support multiple -o in open command, Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 14/14] qemu-img: Plug memory leak in convert command, Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 08/14] blockdev: Plug memory leak in blockdev_init(), Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 07/14] qemu-io: Don't print NULL when open without non-option arg fails,
Markus Armbruster <=
- [Qemu-stable] [PATCH v2 09/14] blockdev: Plug memory leak in drive_init(), Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 06/14] qemu-io: Plug memory leak in open command, Markus Armbruster, 2014/05/28
- [Qemu-stable] [PATCH v2 03/14] qcow2: Plug memory leak on qcow2_invalidate_cache() error paths, Markus Armbruster, 2014/05/28
- Re: [Qemu-stable] [PATCH v2 00/14] block: Plug assorted memory leaks, Kevin Wolf, 2014/05/28