From 647cc472232608f268fe48da78bea81e6d01b1ea Mon Sep 17 00:00:00 2001 From: Zhi Yong Wu Date: Thu, 26 Apr 2012 16:11:37 +0800 Subject: qcow2: fix the return value -ENOENT -> -EEXIST Signed-off-by: Zhi Yong Wu Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 42f971b..4561a2a 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 */ -- cgit v1.1