Received: from eggs.gnu.org ([208.118.235.92]:45091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPbIf-0000BJ-EJ for qemu-devel@nongnu.org; Tue, 09 Apr 2013 12:21:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPbIX-0000iE-K2 for qemu-devel@nongnu.org; Tue, 09 Apr 2013 12:21:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPbIX-0000i2-Bj for qemu-devel@nongnu.org; Tue, 09 Apr 2013 12:21:29 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r39GLSqV011274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Apr 2013 12:21:28 -0400 From: Markus Armbruster References: Date: Tue, 09 Apr 2013 18:21:26 +0200 In-Reply-To: (Pavel Hrdina's message of "Fri, 29 Mar 2013 15:12:28 +0100") Message-ID: <87vc7v4qux.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v4 01/11] block: add error parameter to bdrv_snapshot_create() and related functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com Pavel Hrdina writes: > Signed-off-by: Pavel Hrdina > Reviewed-by: Eric Blake [...] > diff --git a/block/rbd.c b/block/rbd.c > index 1a8ea6d..cdbee18 100644 > --- a/block/rbd.c > +++ b/block/rbd.c > @@ -816,12 +816,14 @@ static int qemu_rbd_truncate(BlockDriverState *bs, int64_t offset) > } > > static int qemu_rbd_snap_create(BlockDriverState *bs, > - QEMUSnapshotInfo *sn_info) > + QEMUSnapshotInfo *sn_info, > + Error **errp) > { > BDRVRBDState *s = bs->opaque; > int r; > > if (sn_info->name[0] == '\0') { > + error_setg(errp, "parameter 'name' cannot be empty"); > return -EINVAL; /* we need a name for rbd snapshots */ > } > Comment is now redundant. Drop it if you need to respin anyway. [...]