qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/3] qdev: using error_abort instead of using


From: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH v2 1/3] qdev: using error_abort instead of using local_err
Date: Thu, 21 Aug 2014 03:46:25 +0000

> Subject: Re: [Qemu-devel] [PATCH v2 1/3] qdev: using error_abort instead of
> using local_err
> 
> On Thu, Aug 21, 2014 at 12:11 PM,  <address@hidden> wrote:
> > From: Gonglei <address@hidden>
> >
> > This error can not happen normally. If it happens indicates
> > something very wrong, we should abort QEMU. moreover, The
> > user can only refer to /machine/peripheral, not
> > /machine/unattached.
> >
> > Signed-off-by: Gonglei <address@hidden>
> 
> Reviewed-by: Peter Crosthwaite <address@hidden>
> 
Thanks.

> > ---
> >  hw/core/qdev.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> > index da1ba48..4a1ac5b 100644
> > --- a/hw/core/qdev.c
> > +++ b/hw/core/qdev.c
> > @@ -820,13 +820,13 @@ static void device_set_realized(Object *obj, bool
> value, Error **errp)
> >      }
> >
> >      if (value && !dev->realized) {
> > -        if (!obj->parent && local_err == NULL) {
> > +        if (!obj->parent) {
> 
> FWIW this change is slightly out of scope for your commit message.
> 
Yep. The check is necessary. Maybe I can add it in commit message. 
Thanks.

Best regards,
-Gonglei

> Regards,
> Peter
> 
> >              static int unattached_count;
> >              gchar *name = g_strdup_printf("device[%d]",
> unattached_count++);
> >
> >
> object_property_add_child(container_get(qdev_get_machine(),
> >
> "/unattached"),
> > -                                      name, obj, &local_err);
> > +                                      name, obj, &error_abort);
> >              g_free(name);
> >          }
> >
> > --
> > 1.7.12.4
> >
> >


reply via email to

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