qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 0/9] QOM: qomify -netdev


From: Zhi Yong Wu
Subject: Re: [Qemu-devel] [RFC 0/9] QOM: qomify -netdev
Date: Tue, 27 Mar 2012 17:03:54 +0800

On Tue, Mar 27, 2012 at 4:19 PM, Paolo Bonzini <address@hidden> wrote:
> Il 26/03/2012 16:20, Zhi Yong Wu ha scritto:
>> struct PropertyInfo {
>>     const char *name;
>>     const char *legacy_name;
>>     const char **enum_table;
>>     int64_t min;
>>     int64_t max;
>>     int (*parse)(DeviceState *dev, Property *prop, const char *str);
>>     int (*print)(DeviceState *dev, Property *prop, char *dest, size_t len);
>>     ObjectPropertyAccessor *get;
>>     ObjectPropertyAccessor *set;
>>     ObjectPropertyRelease *release;
>> };
>>
>> Like above, its member functions pointers use DeviceState, so we will
>> have to consider how to make this PropertyInfo more generic and be
>> used by other Class and Object which are not based on DeviceState.
>
> The member functions do not really do anything that is
> DeviceState-specific.  You can change the argument to Object and add a
> cast inside the implementations.
good.
>
> Besides, most property types do not have parse/print anymore.  Another
> possibility would be to forbid hexNN types for non-DeviceState, since
> only those have parse/print.

By the way, you mentioned that you are working on QemuOpts QOM, it
mean that it will convert all qemu command line options to QOM? We are
very interested in this feature and want to know if it is helpful to
our -netdev QOM.

>
> Paolo



-- 
Regards,

Zhi Yong Wu



reply via email to

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