diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2016-05-12 11:10:04 -0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-05-20 14:28:55 -0300 |
commit | e8f2d2722eb84a809697e82c762d39c8c13f22f6 (patch) | |
tree | 9a6dd203d3a6e65c5b19ef6fc49d0aaf74848749 /qemu-img.c | |
parent | 822ac12df0387b2d2eb1ff8fc6cddb46aa0c3867 (diff) |
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-img.c')
-rw-r--r-- | qemu-img.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c index 47923663be..7ed8ef21cb 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3492,10 +3492,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } - 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); bdrv_init(); |