qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/6] Use &error_fatal in some initialization cod


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 0/6] Use &error_fatal in some initialization code
Date: Thu, 12 May 2016 14:04:08 -0300
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, May 12, 2016 at 12:48:41PM -0400, Paolo Bonzini wrote:
> 
> > This changes some initialization code in vl.c, qemu-img, qemu-io,
> > and qemu-nbd to use &error_fatal instead of manual error
> > checking/reporting.
> > 
> > The series is based on my machine branch, available at:
> >   git://github.com/ehabkost/qemu.git machine
> 
> Patches 1-2-6 are obvious.

Thanks. I will apply 1-2 to my machine branch. Should I apply
patch 6, too?

> 
> I'm not sure about 3-4-5, these are internal functions where the error
> is somewhere below "should never happen" (&error_abort)---it actually
> should never happen, but exiting due to SIGABRT sounds wrong.  It's not
> the kind of function that I'd expect to have an Error** argument...

Assuming you still want to keep the Error** argument in
qemu_init_main_loop(), I can send a simpler patch that doesn't
touch qemu_signal_init().

In that case, qemu_init_main_loop() at least needs to be
consistent, and always set *errp if returning non-zero (it
doesn't, and QEMU will crash inside error_report_err() if
qemu_signal_init() fail).

Or, if you prefer, we can remove the Error** argument from
qemu_init_main_loop() completely, and make it report errors to
stderr.

> 
> Paolo
> 
> > Eduardo Habkost (6):
> >   vl: Use &error_fatal when parsing VNC options
> >   vl: Use &error_fatal when parsing monitor options
> >   main-loop: Use Error** to report qemu_signal_init() errors
> >   main-loop: Use &error_fatal when calling qemu_init_main_loop()
> >   main-loop: Make qemu_init_main_loop() and qemu_signal_init() void
> >   Use &error_fatal when initializing crypto on qemu-{img,io,nbd}
> > 
> >  include/qemu/main-loop.h |  2 +-
> >  main-loop.c              | 24 ++++++++++--------------
> >  qemu-img.c               | 11 ++---------
> >  qemu-io.c                | 11 ++---------
> >  qemu-nbd.c               | 10 ++--------
> >  vl.c                     | 28 ++++------------------------
> >  6 files changed, 21 insertions(+), 65 deletions(-)
> > 
> > --
> > 2.5.5
> > 
> > 

-- 
Eduardo



reply via email to

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