summaryrefslogtreecommitdiffstats
path: root/nbd/client.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-02-10 18:41:10 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:29 -0600
commitc5258a9f1e5679a164951bcab3771a441d8595ae (patch)
tree63d3ed1e2ed76cd379b17a715d08965786b5ba1a /nbd/client.c
parentd7ceb0e38728e74ad1661fc02dcd91da065a3ca4 (diff)
downloadhqemu-c5258a9f1e5679a164951bcab3771a441d8595ae.zip
hqemu-c5258a9f1e5679a164951bcab3771a441d8595ae.tar.gz
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 <berrange@redhat.com> Message-Id: <1455129674-17255-13-git-send-email-berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'nbd/client.c')
-rw-r--r--nbd/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nbd/client.c b/nbd/client.c
index be5f08d..5e47ac7 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
OpenPOWER on IntegriCloud