summaryrefslogtreecommitdiffstats
path: root/qemu-img.c
diff options
context:
space:
mode:
authorDaniel P. Berrange2016-02-10 19:41:01 +0100
committerPaolo Bonzini2016-02-16 17:13:22 +0100
commit064097d919508e8636b220baedb52b382b9b07c6 (patch)
tree0af56e405e3316ed219c4c874a9101d305c81327 /qemu-img.c
parentqemu-nbd: add support for --object command line arg (diff)
downloadqemu-064097d919508e8636b220baedb52b382b9b07c6.tar.gz
qemu-064097d919508e8636b220baedb52b382b9b07c6.tar.xz
qemu-064097d919508e8636b220baedb52b382b9b07c6.zip
nbd: convert block client to use I/O channels for connection setup
This converts the NBD block driver client to use the QIOChannelSocket class for initial connection setup. The NbdClientSession struct has two pointers, one to the master QIOChannelSocket providing the raw data channel, and one to a QIOChannel which is the current channel used for I/O. Initially the two point to the same object, but when TLS support is added, they will point to different objects. The qemu-img & qemu-io tools now need to use MODULE_INIT_QOM to ensure the QIOChannel object classes are registered. The qemu-nbd tool already did this. In this initial conversion though, all I/O is still actually done using the raw POSIX sockets APIs. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1455129674-17255-4-git-send-email-berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 163d8c1664..7030107da2 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -3104,6 +3104,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
+ module_call_init(MODULE_INIT_QOM);
bdrv_init();
if (argc < 2) {
error_exit("Not enough arguments");