diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-05-05 12:19:03 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-05-27 07:45:30 +0200 |
commit | 5217f1887a8041c51495fbd5d3f767d96a242000 (patch) | |
tree | 178772e59bd02dca6cfefe773d24974f8120f517 /qemu-nbd.c | |
parent | d01127584e70f9242d3dd9bf4c0bdc1980254713 (diff) | |
download | qemu-5217f1887a8041c51495fbd5d3f767d96a242000.zip qemu-5217f1887a8041c51495fbd5d3f767d96a242000.tar.gz qemu-5217f1887a8041c51495fbd5d3f767d96a242000.tar.bz2 |
error: Use error_reportf_err() where appropriate
Replace
error_report("...: %s", ..., error_get_pretty(err));
by
error_reportf_err(err, "...: ", ...);
One of the replaced messages lacked a colon. Add it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200505101908.6207-6-armbru@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r-- | qemu-nbd.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -856,8 +856,7 @@ int main(int argc, char **argv) } tlscreds = nbd_get_tls_creds(tlscredsid, list, &local_err); if (local_err) { - error_report("Failed to get TLS creds %s", - error_get_pretty(local_err)); + error_reportf_err(local_err, "Failed to get TLS creds: "); exit(EXIT_FAILURE); } } else { @@ -983,8 +982,8 @@ int main(int argc, char **argv) &local_err); if (sioc == NULL) { object_unref(OBJECT(server)); - error_report("Failed to use socket activation: %s", - error_get_pretty(local_err)); + error_reportf_err(local_err, + "Failed to use socket activation: "); exit(EXIT_FAILURE); } qio_net_listener_add(server, sioc); |