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 != 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 == NULL. Please change the function so 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)