qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/16] error: Use error_fatal to simplify obvious fatal error


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 01/16] error: Use error_fatal to simplify obvious fatal errors (again)
Date: Mon, 2 Aug 2021 21:02:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/20/21 2:53 PM, Markus Armbruster wrote:
> We did this with scripts/coccinelle/use-error_fatal.cocci before, in
> commit 50beeb68094 and 007b06578ab.  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>
> ---
>  hw/s390x/ipl.c        |  6 +-----
>  migration/migration.c |  7 +------
>  qemu-img.c            |  6 +-----
>  qemu-io.c             |  6 +-----
>  qemu-nbd.c            |  5 +----
>  scsi/qemu-pr-helper.c | 11 +++--------
>  softmmu/vl.c          |  7 +------
>  target/i386/sev.c     |  8 +-------
>  ui/console.c          |  6 ++----
>  ui/spice-core.c       |  7 +------
>  10 files changed, 13 insertions(+), 56 deletions(-)

> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 4df1496101..0d2db1abc3 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -2673,12 +2673,7 @@ void qmp_x_exit_preconfig(Error **errp)
>      qemu_machine_creation_done();
>  
>      if (loadvm) {
> -        Error *local_err = NULL;
> -        if (!load_snapshot(loadvm, NULL, false, NULL, &local_err)) {
> -            error_report_err(local_err);
> -            autostart = 0;

Uh, odd assignment...

> -            exit(1);
> -        }
> +        load_snapshot(loadvm, NULL, false, NULL, &error_fatal);
>      }
>      if (replay_mode != REPLAY_MODE_NONE) {
>          replay_vmstate_init();

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]