From: Zhi Yong Wu Date: Thu, 26 Apr 2012 08:11:37 +0000 (+0800) Subject: qcow2: fix the return value -ENOENT -> -EEXIST X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=647cc472232608f268fe48da78bea81e6d01b1ea;p=qemu.git qcow2: fix the return value -ENOENT -> -EEXIST Signed-off-by: Zhi Yong Wu Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- 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 */