]> Git Repo - qemu.git/blobdiff - qemu-nbd.c
block: initialize qcrypto API at startup
[qemu.git] / qemu-nbd.c
index ca4a724d25cb15d48f7462ead86b50bf5882fe5a..b5751f853b203c6170daa2cfd68c96b808e8f73c 100644 (file)
@@ -31,6 +31,7 @@
 #include "qapi/qmp/qstring.h"
 #include "qom/object_interfaces.h"
 #include "io/channel-socket.h"
+#include "crypto/init.h"
 
 #include <getopt.h>
 #include <libgen.h>
@@ -75,6 +76,7 @@ static void usage(const char *name)
 "  -e, --shared=NUM          device can be shared by NUM clients (default '1')\n"
 "  -t, --persistent          don't exit on the last connection\n"
 "  -v, --verbose             display extra debugging information\n"
+"  -x, --export-name=NAME    expose export by name\n"
 "\n"
 "Exposing part of the image:\n"
 "  -o, --offset=OFFSET       offset into the image\n"
@@ -518,6 +520,12 @@ int main(int argc, char **argv)
     memset(&sa_sigterm, 0, sizeof(sa_sigterm));
     sa_sigterm.sa_handler = termsig_handler;
     sigaction(SIGTERM, &sa_sigterm, NULL);
+
+    if (qcrypto_init(&local_err) < 0) {
+        error_reportf_err(local_err, "cannot initialize crypto: ");
+        exit(1);
+    }
+
     module_call_init(MODULE_INIT_QOM);
     qemu_add_opts(&qemu_object_opts);
     qemu_init_exec_dir(argv[0]);
This page took 0.023018 seconds and 4 git commands to generate.