]> git.proxmox.com Git - qemu.git/commit
nbd: Keep hostname and port separate
authorKevin Wolf <kwolf@redhat.com>
Fri, 15 Mar 2013 10:55:29 +0000 (11:55 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 22 Mar 2013 16:51:31 +0000 (17:51 +0100)
commitf17c90bed11a6e277614b5a5d16434004f24d572
tree5994d06681764c31bf5c679163ae1a3c9d1229df
parente62be8888a83aa0ab7f50eeb954deb2ec4e7201d
nbd: Keep hostname and port separate

The NBD block supports an URL syntax, for which a URL parser returns
separate hostname and port fields. It also supports the traditional qemu
syntax encoded in a filename. Until now, after parsing the URL to get
each piece of information, a new string is built to be fed to socket
functions.

Instead of building a string in the URL case that is immediately parsed
again, parse the string in both cases and use the QemuOpts interface to
qemu-sockets.c.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/nbd.c
include/block/nbd.h
include/qemu/sockets.h
nbd.c
util/qemu-sockets.c