From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHVSf-0002D0-QF for qemu-devel@nongnu.org; Mon, 27 Jun 2016 08:16:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHVSa-000537-AS for qemu-devel@nongnu.org; Mon, 27 Jun 2016 08:16:20 -0400 References: <1466892954-8684-1-git-send-email-eblake@redhat.com> <1466892954-8684-11-git-send-email-eblake@redhat.com> From: Paolo Bonzini Message-ID: <02ac5b4b-658d-018e-076f-952908f37a38@redhat.com> Date: Mon, 27 Jun 2016 14:16:04 +0200 MIME-Version: 1.0 In-Reply-To: <1466892954-8684-11-git-send-email-eblake@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LIST List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org On 26/06/2016 00:15, Eric Blake wrote: > +/* Return -1 if unrecoverable error occurs > , 0 if NBD_OPT_LIST is unsupported, These two should return errp !=3D NULL and negative errno. > 1 if iteration is done > 2 to keep looking, > and 3 if * this entry matches @want. */ These three should return errp =3D=3D NULL. Please change the function s= o that the return value signifies "need another call", and a bool* argument is set to true if the name matches. Paolo > +static int nbd_receive_list(QIOChannel *ioc, const char *want, Error *= *errp)