summaryrefslogtreecommitdiffstats
path: root/nbd/server.c
diff options
context:
space:
mode:
authorDaniel P. Berrange2016-02-10 19:41:10 +0100
committerPaolo Bonzini2016-02-16 17:16:20 +0100
commit69b49502d8b7b582af79fac5bef7b7ccc2dc9c1e (patch)
tree0ac79d0ed86626639bf6dc38d1efb687d8865341 /nbd/server.c
parentnbd: always query export list in fixed new style protocol (diff)
downloadqemu-69b49502d8b7b582af79fac5bef7b7ccc2dc9c1e.tar.gz
qemu-69b49502d8b7b582af79fac5bef7b7ccc2dc9c1e.tar.xz
qemu-69b49502d8b7b582af79fac5bef7b7ccc2dc9c1e.zip
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/server.c')
-rw-r--r--nbd/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nbd/server.c b/nbd/server.c
index 3d2fb1055f..9fee1d4fa4 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -220,6 +220,7 @@ static int nbd_negotiate_send_rep_list(QIOChannel *ioc, NBDExport *exp)
uint64_t magic, name_len;
uint32_t opt, type, len;
+ TRACE("Advertizing export name '%s'", exp->name ? exp->name : "");
name_len = strlen(exp->name);
magic = cpu_to_be64(NBD_REP_MAGIC);
if (nbd_negotiate_write(ioc, &magic, sizeof(magic)) != sizeof(magic)) {