diff options
author | Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> | 2012-04-26 16:11:37 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-02 18:39:39 +0200 |
commit | 647cc472232608f268fe48da78bea81e6d01b1ea (patch) | |
tree | c5c2396bdf43f6e5a61289edd1c4827890f1e812 /block | |
parent | 7242411460eb1cd6e850d51ef15ae734b59e2edf (diff) | |
download | qemu-647cc472232608f268fe48da78bea81e6d01b1ea.zip |
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')
-rw-r--r-- | block/qcow2-snapshot.c | 2 |
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 */ |