aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2-snapshot.c
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-04-26 16:11:37 +0800
committerKevin Wolf <kwolf@redhat.com>2012-05-02 18:39:39 +0200
commit647cc472232608f268fe48da78bea81e6d01b1ea (patch)
treec5c2396bdf43f6e5a61289edd1c4827890f1e812 /block/qcow2-snapshot.c
parent7242411460eb1cd6e850d51ef15ae734b59e2edf (diff)
qcow2: fix the return value -ENOENT -> -EEXIST
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2-snapshot.c')
-rw-r--r--block/qcow2-snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 42f971b590..4561a2abf9 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -331,7 +331,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
/* Check that the ID is unique */
if (find_snapshot_by_id(bs, sn_info->id_str) >= 0) {
- return -ENOENT;
+ return -EEXIST;
}
/* Populate sn with passed data */