summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-11-10 23:51:20 -0700
committerMarkus Armbruster <armbru@redhat.com>2015-11-11 18:56:26 +0100
commit455b0fde8c38a0794743e2e7c1a40018b7bee9f6 (patch)
tree036a4a332b5b713734b536a63987e0cb96118a6b /block.c
parent3c07587d49458341510360557c849e93e9afaf59 (diff)
downloadqemu-455b0fde8c38a0794743e2e7c1a40018b7bee9f6.tar.gz
qemu-455b0fde8c38a0794743e2e7c1a40018b7bee9f6.tar.bz2
qemu-455b0fde8c38a0794743e2e7c1a40018b7bee9f6.zip
error: More error_setg() usage
A few uses of error_set(ERROR_CLASS_GENERIC_ERROR) were missed in c6bd8c706, or have snuck in since. Nuke them. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1447224690-9743-19-git-send-email-eblake@redhat.com> Acked-by: Andreas Färber <afaerber@suse.de> [Indentation tidied up, commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block.c b/block.c
index e9f40dc768..53a978acbe 100644
--- a/block.c
+++ b/block.c
@@ -1795,8 +1795,7 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
ret = bdrv_flush(reopen_state->bs);
if (ret) {
- error_set(errp, ERROR_CLASS_GENERIC_ERROR, "Error (%s) flushing drive",
- strerror(-ret));
+ error_setg_errno(errp, -ret, "Error flushing drive");
goto error;
}