summaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-10-08 19:55:15 +0200
committerKevin Wolf <kwolf@redhat.com>2014-10-20 13:41:26 +0200
commitec0de76874462c745a1600911bd81ee0253c0c23 (patch)
tree01616a1295932a8eb18b4326dbdd01f8caf1228a /qemu-io.c
parent7c15903789953ead14a417882657d52dc0c19a24 (diff)
downloadqemu-ec0de76874462c745a1600911bd81ee0253c0c23.tar.gz
nbd: Fix filename generation
Export names may be used with nbd+unix, too, fix nbd_refresh_filename() accordingly. Also, for nbd+tcp, the documented path schema is "nbd://host[:port]/export", so use it. Furthermore, as can be seen from that schema, the port is optional. That makes six single cases for how the filename can be formatted; it is not easy to generalize these cases without the resulting statement being completely unreadable, thus there is simply one snprintf() per case. Finally, taking the options from BDRVNBDState::socket_opts is wrong, because those will not contain the export name. Just use BlockDriverState::options instead. Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
0 files changed, 0 insertions, 0 deletions