qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] 答复: Re: [PATCH v3 3/3] object: Add 'help' option for all a


From: Lin Ma
Subject: [Qemu-devel] 答复: Re: [PATCH v3 3/3] object: Add 'help' option for all available backends and properties
Date: Mon, 10 Oct 2016 08:38:40 -0600


>>> "Daniel P. Berrange" <address@hidden> 2016/9/26 星期一 下午 6:41 >>>
>On Mon, Sep 26, 2016 at 06:16:27PM +0800, Lin Ma wrote:
>> '-object help' prints available user creatable backends.
>> '-object $typename,help' prints relevant properties.
>> 
>> Signed-off-by: Lin Ma <address@hidden>
>> ---
>>  backends/hostmem.c                     |  4 ++++
>>  crypto/secret.c                       |  4 ++++
>>  crypto/tlscreds.c                       |  4 ++++
>>  include/qom/object_interfaces.h |  2 ++
>>  net/filter.c                                 |  4 ++++
>>  qemu-options.hx                       |  7 +++++-
>>  qom/object_interfaces.c       | 48 +++++++++++++++++++++++++++++++++++++++++
>>  vl.c                                                 |  5 +++++
>>  8 files changed, 77 insertions(+), 1 deletion(-)
>> 
>> diff --git a/backends/hostmem.c b/backends/hostmem.c
>> index b7a208d..eea9dce 100644
>> --- a/backends/hostmem.c
>> +++ b/backends/hostmem.c
>> @@ -261,6 +261,10 @@ static void host_memory_backend_init(Object *obj)
>>                                                         HostMemPolicy_lookup,
>>                                                         
>> host_memory_backend_get_policy,
>>                                                         
>> host_memory_backend_set_policy, NULL);
>> +    object_property_set_description(obj, "policy",
>> +                                                                "Data 
>> format: one of "
>> +                                                                
>> HostMemPolicy_value_str,
>> +                                                                
>> &error_abort);
>>  }
>>
>
>Adding descriptions to properties should be done separately from
>your impl of help printing, as they're independant concepts.
>
Sorry for the late reply, I was on vacation.
Ok , I'll seprate them to another patch.
 
Thanks,
Lin


reply via email to

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