On 03/18/2013 11:23 AM, Kevin Wolf wrote: > 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 > --- > block/nbd.c | 49 ++++++++++++++++++++++++++++++++++++++++--------- > include/block/nbd.h | 2 ++ > include/qemu/sockets.h | 1 + > nbd.c | 12 ++++++++++++ > util/qemu-sockets.c | 6 +++--- > 5 files changed, 58 insertions(+), 12 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org