mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
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>
This commit is contained in:
parent
7242411460
commit
647cc47223
1 changed files with 1 additions and 1 deletions
|
@ -331,7 +331,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
|
||||||
|
|
||||||
/* Check that the ID is unique */
|
/* Check that the ID is unique */
|
||||||
if (find_snapshot_by_id(bs, sn_info->id_str) >= 0) {
|
if (find_snapshot_by_id(bs, sn_info->id_str) >= 0) {
|
||||||
return -ENOENT;
|
return -EEXIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Populate sn with passed data */
|
/* Populate sn with passed data */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue