From e8f2d2722eb84a809697e82c762d39c8c13f22f6 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 12 May 2016 11:10:04 -0300 Subject: 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 --- qemu-io.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'qemu-io.c') diff --git a/qemu-io.c b/qemu-io.c index 5ef3ef7f35..d977a6e553 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -466,10 +466,7 @@ int main(int argc, char **argv) progname = basename(argv[0]); qemu_init_exec_dir(argv[0]); - if (qcrypto_init(&local_error) < 0) { - error_reportf_err(local_error, "cannot initialize crypto: "); - exit(1); - } + qcrypto_init(&error_fatal); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_object_opts); -- cgit v1.2.1