summaryrefslogtreecommitdiffstats
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorEduardo Habkost2016-05-12 16:10:04 +0200
committerEduardo Habkost2016-05-20 19:28:55 +0200
commite8f2d2722eb84a809697e82c762d39c8c13f22f6 (patch)
tree9a6dd203d3a6e65c5b19ef6fc49d0aaf74848749 /qemu-nbd.c
parentvl: Use &error_fatal when parsing monitor options (diff)
downloadqemu-e8f2d2722eb84a809697e82c762d39c8c13f22f6.tar.gz
qemu-e8f2d2722eb84a809697e82c762d39c8c13f22f6.tar.xz
qemu-e8f2d2722eb84a809697e82c762d39c8c13f22f6.zip
Use &error_fatal when initializing crypto on qemu-{img,io,nbd}
In addition to making the code simpler, this will replace the long error messages: cannot initialize crypto: Unable to initialize GNUTLS library: [...] cannot initialize crypto: Unable to initialize gcrypt with shorter messages: Unable to initialize GNUTLS library: [...] Unable to initialize gcrypt Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index d59b187780..6554f0ab65 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -527,10 +527,7 @@ int main(int argc, char **argv)
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);
- }
+ qcrypto_init(&error_fatal);
module_call_init(MODULE_INIT_QOM);
qemu_add_opts(&qemu_object_opts);