From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu12E-0007tR-2X for qemu-devel@nongnu.org; Fri, 20 Dec 2013 09:26:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vu125-0008MT-Gz for qemu-devel@nongnu.org; Fri, 20 Dec 2013 09:26:38 -0500 Received: from mail-we0-x233.google.com ([2a00:1450:400c:c03::233]:61048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu125-0008Lv-B4 for qemu-devel@nongnu.org; Fri, 20 Dec 2013 09:26:29 -0500 Received: by mail-we0-f179.google.com with SMTP id q59so2484601wes.24 for ; Fri, 20 Dec 2013 06:26:28 -0800 (PST) Date: Fri, 20 Dec 2013 15:26:25 +0100 From: Stefan Hajnoczi Message-ID: <20131220142625.GC9296@stefanha-thinkpad.redhat.com> References: <1386244972-528-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1386244972-528-2-git-send-email-xiawenc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1386244972-528-2-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH V7 1/6] snapshot: add parameter *errp in snapshot create List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com On Thu, Dec 05, 2013 at 08:02:47PM +0800, Wenchao Xia wrote: > @@ -366,7 +368,8 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) > > /* Check that the ID is unique */ > if (find_snapshot_by_id_and_name(bs, sn_info->id_str, NULL) >= 0) { > - return -EEXIST; > + error_setg(errp, "Snapshot with id %s already exist", sn_info->id_str); s/exist/exists/