summaryrefslogtreecommitdiffstats
path: root/qemu-io.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-02-10 18:41:01 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:29 -0600
commit029ede6182655a1be058ae927827caa287711024 (patch)
tree5b07f07c6dad684e698bd10a2d70a11e78bee883 /qemu-io.c
parent49cf9ac86af4a566493931685f3a413233f4b518 (diff)
downloadhqemu-029ede6182655a1be058ae927827caa287711024.zip
hqemu-029ede6182655a1be058ae927827caa287711024.tar.gz
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-io.c')
-rw-r--r--qemu-io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-io.c b/qemu-io.c
index 83c48f4..6c0c028 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -394,6 +394,7 @@ int main(int argc, char **argv)
progname = basename(argv[0]);
qemu_init_exec_dir(argv[0]);
+ module_call_init(MODULE_INIT_QOM);
bdrv_init();
while ((c = getopt_long(argc, argv, sopt, lopt, &opt_index)) != -1) {
OpenPOWER on IntegriCloud