>>> "Daniel P. Berrange" <berra...@redhat.com> 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 <l...@suse.com>
>> ---
>>  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