[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property |
Date: |
Fri, 26 Apr 2013 11:34:51 +0200 |
On Fri, 26 Apr 2013 05:53:55 -0300
Eduardo Habkost <address@hidden> wrote:
> On Fri, Apr 26, 2013 at 09:32:59AM +0200, Igor Mammedov wrote:
> > On Thu, 25 Apr 2013 17:36:45 -0300
> > Eduardo Habkost <address@hidden> wrote:
> >
> > > On Thu, Apr 25, 2013 at 04:05:26PM +0200, Igor Mammedov wrote:
> > > [...]
> > > > +static void x86_cpuid_set_apic_id(Object *obj, Visitor *v, void
> > > > *opaque,
> > > > + const char *name, Error **errp)
> > > > +{
> > > > + X86CPU *cpu = X86_CPU(obj);
> > > > + const int64_t min = 0;
> > > > + const int64_t max = UINT32_MAX;
> > > > + Error *error = NULL;
> > > > + int64_t value;
> > > > +
> > > > + visit_type_int(v, &value, name, &error);
> > > > + if (error) {
> > > > + error_propagate(errp, error);
> > > > + return;
> > > > + }
> > > > + if (value < min || value > max) {
> > > > + error_setg(&error, "Property %s.%s doesn't take value %" PRId64
> > > > + " (minimum: %" PRId64 ", maximum: %" PRId64 ")" ,
> > > > + object_get_typename(obj), name, value, min, max);
> > > > + error_propagate(errp, error);
> > > > + return;
> > > > + }
> > >
> > > Why you copied and pasted the string from
> > > QERR_PROPERTY_VALUE_OUT_OF_RANGE, instead of simply using the define
> > > like in the other property setters?
> > it's designed to work with error_set(), not with error_setg().
>
> So why you didn't use error_set()? :-)
in short, QERR_* is depricated and error_set() shouldn't be used anymore.
http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg02520.html
>
> --
> Eduardo
>
--
Regards,
Igor
- [Qemu-devel] [PATCH 00/15 v6 for 1.5] target-i386: CPU hot-add with cpu-add QMP command, Igor Mammedov, 2013/04/25
- Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property, Eduardo Habkost, 2013/04/26
- Re: [Qemu-devel] [PATCH 04/15] target-i386: introduce apic-id property, Andreas Färber, 2013/04/26
- [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Igor Mammedov, 2013/04/26
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Andreas Färber, 2013/04/26
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Igor Mammedov, 2013/04/26
- [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id once CPU is realized, Igor Mammedov, 2013/04/26
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id once CPU is realized, Andreas Färber, 2013/04/27
- Re: [Qemu-devel] [PATCH] target-i386: Do not allow to set apic-id one CPU is realized, Eduardo Habkost, 2013/04/26
[Qemu-devel] [PATCH 02/15] cpu: add helper cpu_exists(), to check if CPU with specified id exists, Igor Mammedov, 2013/04/25