The caller might handle non-blocking using coroutine. Leave the choice
to the caller to use a blocking or non-blocking negotiate.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
int ret;
/* NBD handshake */
+ qemu_set_block(sock);
ret = nbd_receive_negotiate(sock, client->export_name,
&client->nbdflags, &client->size,
&client->blocksize);
TRACE("Receiving negotiation.");
- qemu_set_block(csock);
rc = -EINVAL;
if (read_sync(csock, buf, 8) != 8) {
rc = 0;
fail:
- qemu_set_nonblock(csock);
return rc;
}