diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-11-16 11:43:28 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-12-05 14:51:35 +0100 |
commit | 42deb29fed92577db57c54e844f852481600b756 (patch) | |
tree | bee9778dc0b9c8ce2cae5a9ea9c6effcbd0e5ac7 /block/qcow2.c | |
parent | a968168c580cb45a700e0b218c7f6871d91ee257 (diff) | |
download | qemu-42deb29fed92577db57c54e844f852481600b756.tar.gz qemu-42deb29fed92577db57c54e844f852481600b756.tar.bz2 qemu-42deb29fed92577db57c54e844f852481600b756.zip |
qcow2: Return real error code in qcow2_read_snapshots
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index a6a4f4772b..3f8a1281d7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -273,8 +273,9 @@ static int qcow2_open(BlockDriverState *bs, int flags) } bs->backing_file[len] = '\0'; } - if (qcow2_read_snapshots(bs) < 0) { - ret = -EINVAL; + + ret = qcow2_read_snapshots(bs); + if (ret < 0) { goto fail; } |