[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 69/73] sheepdog: Fix misleading error messages in sd_
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 69/73] sheepdog: Fix misleading error messages in sd_snapshot_create() |
Date: |
Mon, 9 Mar 2015 16:41:54 +0100 |
From: Markus Armbruster <address@hidden>
If do_sd_create() fails, it first reports the error returned, then
reports a another one with strerror(errno). errno is meaningless at
that point.
Report just one error combining the valid information from both
messages.
Reported-by: Eric Blake <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Liu Yuan <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/sheepdog.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 60a4853..c14172c 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2339,9 +2339,8 @@ static int sd_snapshot_create(BlockDriverState *bs,
QEMUSnapshotInfo *sn_info)
ret = do_sd_create(s, &new_vid, 1, &local_err);
if (ret < 0) {
- error_report_err(local_err);
- error_report("failed to create inode for snapshot. %s",
- strerror(errno));
+ error_report("failed to create inode for snapshot: %s",
+ error_get_pretty(local_err));
goto cleanup;
}
--
1.8.3.1
- [Qemu-block] [PULL 66/73] block/vdi: Add locking for parallel requests, (continued)
- [Qemu-block] [PULL 66/73] block/vdi: Add locking for parallel requests, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 70/73] MAINTAINERS: Add jsnow as IDE maintainer, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 64/73] iotests: Remove 006, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 71/73] block/raw-posix: fix launching with failed disks, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 22/73] qcow2: Helper function for refcount modification, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 63/73] iotests: Fix 051's reference output, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 67/73] scsi-hd: fix property unset case, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 72/73] iotests: add O_DIRECT alignment probing test, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 68/73] Add testcase for scsi-hd devices without drive property, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 73/73] MAINTAINERS: Add jcody as blockjobs, block devices maintainer, Kevin Wolf, 2015/03/09
- [Qemu-block] [PULL 69/73] sheepdog: Fix misleading error messages in sd_snapshot_create(),
Kevin Wolf <=
- Re: [Qemu-block] [Qemu-devel] [PULL 00/73] Block patches, Peter Maydell, 2015/03/10