From 69b49502d8b7b582af79fac5bef7b7ccc2dc9c1e Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 10 Feb 2016 18:41:10 +0000 Subject: nbd: use "" as a default export name if none provided If the user does not provide an export name and the server is running the new style protocol, where export names are mandatory, use "" as the default export name if the user has not specified any. "" is defined in the NBD protocol as the default name to use in such scenarios. Signed-off-by: Daniel P. Berrange Message-Id: <1455129674-17255-13-git-send-email-berrange@redhat.com> Signed-off-by: Paolo Bonzini --- nbd/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nbd/client.c') diff --git a/nbd/client.c b/nbd/client.c index be5f08da46..5e47ac7792 100644 --- a/nbd/client.c +++ b/nbd/client.c @@ -315,8 +315,8 @@ int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint32_t *flags, goto fail; } if (!name) { - error_setg(errp, "Server requires an export name"); - goto fail; + TRACE("Using default NBD export name \"\""); + name = ""; } if (fixedNewStyle) { /* Check our desired export is present in the -- cgit v1.2.3