aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2023-08-11 14:09:46 +0300
committerKevin Wolf <kwolf@redhat.com>2023-09-08 17:03:09 +0200
commitb0a6620acfe4c2997935cb3a9baa0d429ab8d61a (patch)
tree8ec10db391304d74cdbf34da3e3c825e19b716b2 /qemu-img.c
parentfa9185fcdfceeb1a02f61a003acd19509e146bde (diff)
downloadqemu-b0a6620acfe4c2997935cb3a9baa0d429ab8d61a.zip
qemu-b0a6620acfe4c2997935cb3a9baa0d429ab8d61a.tar.gz
qemu-b0a6620acfe4c2997935cb3a9baa0d429ab8d61a.tar.bz2
qemu-img: omit errno value in error message
I'm getting io-qcow2-244 test failure on mips* due to output mismatch: Take an internal snapshot: -qemu-img: Could not create snapshot 'test': -95 (Operation not supported) +qemu-img: Could not create snapshot 'test': -122 (Operation not supported) No errors were found on the image. This is because errno values might be different across different architectures. This error message in qemu-img.c is the only one which prints errno directly, all the rest print strerror(errno) only. Fix this error message and the expected output of the 3 test cases too. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Message-ID: <20230811110946.2435067-1-mjt@tls.msk.ru> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 27f4805..0756dbb 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -3468,8 +3468,8 @@ static int img_snapshot(int argc, char **argv)
ret = bdrv_snapshot_create(bs, &sn);
if (ret) {
- error_report("Could not create snapshot '%s': %d (%s)",
- snapshot_name, ret, strerror(-ret));
+ error_report("Could not create snapshot '%s': %s",
+ snapshot_name, strerror(-ret));
}
break;