On Mon, Jun 20, 2016 at 10:14:55AM +0200, Markus Armbruster wrote: > Eduardo Habkost <ehabk...@redhat.com> writes: [...] > > diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h > > index 24aa0a7..16e7cc0 100644 > > --- a/include/hw/qdev-core.h > > +++ b/include/hw/qdev-core.h > > @@ -256,6 +256,9 @@ struct PropertyInfo { > > > > /** > > * GlobalProperty: > > + * @errp: If set, error_propagate() will be called on errors when applying > > + * the property. &error_abort or &error_fatal may be used to make > > + * errors automatically abort or exit QEMU. > > "If set" is awkward, because it's not what we usually mean when we talk > about an error being set. Suggest "If non-null".
Agreed. > > But what makes null special isn't that errors won't be propagated. In > fact, the code behaves as if they were (propagating to null frees the > error, which is exactly what the code does), *except* for one thing that > isn't mentioned here, but should be: we print a warning. > > What about: > > * @errp: Error destination, used like a first argument of error_setg(), > * except with null @errp, we print warnings instead of ignoring errors > * silently. Perfect. I will use it. Thanks! -- Eduardo