[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auditing QEMU to replace NULL with &error_abort
From: |
Daniel P . Berrangé |
Subject: |
Re: Auditing QEMU to replace NULL with &error_abort |
Date: |
Wed, 23 Jun 2021 16:39:18 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Wed, Jun 23, 2021 at 07:31:13PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Wed, Jun 23, 2021 at 7:10 PM Daniel P. Berrangé <berrange@redhat.com>
> wrote:
>
> > On Wed, Jun 23, 2021 at 02:16:55PM +0200, Markus Armbruster wrote:
> > > &error_abort has been a clear win for us. &error_fatal too, when used
> > > judiciously. Marc-André tried to get both into GLib, unsuccessfully[2].
> >
> > ...snip...
> >
> > > [2] https://gitlab.gnome.org/GNOME/glib/-/issues/2288
> >
> > This doesn't actually suggest adding error_abort/fatal to GLib. Rather
> > it adds a general callback hook to GLib. Biggest complaints there
> > are around the callback concept and difficulty of safely using it,
> > which I can't disagree with.
> >
> > I wonder if we would have more luck if we explicitly proposed the
> > error_abort/fatal concept to GLib instead. At least that would not
> > hit any of the complaints raised about the callback.
> >
> >
> Without callbacks, it will be difficult to report errors back to the
> monitor, or prettify it the way we want (since we would be using extended
> GErrors for hints etc)
>
> But we could have a more specific callback for that perhaps?
>
> You are welcome to propose something else :)
I was thinking g_set_error would use g_warning/g_error to report
it, and thus involve the g_log_default_handler callback, which
we could provide to feed back into the monitor.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|