mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
error: Use error_fatal to simplify obvious fatal errors (again)
We did this with scripts/coccinelle/use-error_fatal.cocci before, in commit50beeb6809
and007b06578a
. This commit cleans up rarer variations that don't seem worth matching with Coccinelle. Cc: Thomas Huth <thuth@redhat.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Peter Xu <peterx@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210720125408.387910-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
c83fcfaf8a
commit
f9734d5d40
10 changed files with 13 additions and 56 deletions
|
@ -1044,10 +1044,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (qemu_init_main_loop(&local_err)) {
|
||||
error_report_err(local_err);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
qemu_init_main_loop(&error_fatal);
|
||||
|
||||
server_watch = qio_channel_add_watch(QIO_CHANNEL(server_ioc),
|
||||
G_IO_IN,
|
||||
|
@ -1061,10 +1058,8 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if ((daemonize || pidfile_specified) &&
|
||||
!qemu_write_pidfile(pidfile, &local_err)) {
|
||||
error_report_err(local_err);
|
||||
exit(EXIT_FAILURE);
|
||||
if (daemonize || pidfile_specified) {
|
||||
qemu_write_pidfile(pidfile, &error_fatal);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LIBCAP_NG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue