diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-12-18 16:35:18 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-01-13 15:16:18 +0100 |
commit | b9884681491fbe8b3fa32d58f35bcc5f725c5258 (patch) | |
tree | 03d35de6c707603c611dc095383f7810cba1dd43 /qemu-io.c | |
parent | d410fe145446968055f3807b0d41ae8150eb0926 (diff) | |
download | qemu-b9884681491fbe8b3fa32d58f35bcc5f725c5258.zip qemu-b9884681491fbe8b3fa32d58f35bcc5f725c5258.tar.gz qemu-b9884681491fbe8b3fa32d58f35bcc5f725c5258.tar.bz2 |
qemu-io qemu-nbd: Use error_report() etc. instead of fprintf()
Just three instances left.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-16-git-send-email-armbru@redhat.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r-- | qemu-io.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -57,17 +57,15 @@ static int openfile(char *name, int flags, QDict *opts) BlockDriverState *bs; if (qemuio_blk) { - fprintf(stderr, "file open already, try 'help close'\n"); + error_report("file open already, try 'help close'"); QDECREF(opts); return 1; } qemuio_blk = blk_new_open("hda", name, NULL, opts, flags, &local_err); if (!qemuio_blk) { - fprintf(stderr, "%s: can't open%s%s: %s\n", progname, - name ? " device " : "", name ?: "", - error_get_pretty(local_err)); - error_free(local_err); + error_reportf_err(local_err, "can't open%s%s: ", + name ? " device " : "", name ?: ""); return 1; } |