Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in > PropertyInfo struct > > Il 30/09/2014 16:01, Michael S. Tsirkin ha scritto: > > > No, as Markus said "06.0" is 48, "06.1" is 49, etc. > > > > I see. So in fact the h

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Paolo Bonzini
Il 30/09/2014 16:01, Michael S. Tsirkin ha scritto: > > No, as Markus said "06.0" is 48, "06.1" is 49, etc. > > I see. So in fact the help text I suggested is wrong. > At least for HMP I would say slot.function is the > primary format. > Let's just make it a string, it's a superset of > an integer

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in > PropertyInfo struct > > On Tue, Sep 30, 2014 at 03:36:22PM +0200, Paolo Bonzini wrote: > > Il 30/09/2014 15:33, Michael S. Tsirkin ha scritto: > > > > > > > > > The Property

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Paolo Bonzini
Il 30/09/2014 15:55, Michael S. Tsirkin ha scritto: > > At the QOM level it is an int, even though it secondarily accepts a > > string in "DD.F" format. > > That's the only way to specify a function, isn't it? No, as Markus said "06.0" is 48, "06.1" is 49, etc. Paolo

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Michael S. Tsirkin
On Tue, Sep 30, 2014 at 03:53:53PM +0200, Paolo Bonzini wrote: > Il 30/09/2014 15:55, Michael S. Tsirkin ha scritto: > > > At the QOM level it is an int, even though it secondarily accepts a > > > string in "DD.F" format. > > > > That's the only way to specify a function, isn't it? > > No, as Mar

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Michael S. Tsirkin
On Tue, Sep 30, 2014 at 03:36:22PM +0200, Paolo Bonzini wrote: > Il 30/09/2014 15:33, Michael S. Tsirkin ha scritto: > > > > > > > The Propertyinfo.name is used to the qdev property's type, please see > > > PATCH 4: > > > > > > -info->type = g_strdup(prop->info->legacy_name ?: > > >

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Michael S. Tsirkin
On Tue, Sep 30, 2014 at 09:14:50PM +0800, Gonglei wrote: > > Subject: Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in > > PropertyInfo struct > > > > On Tue, Sep 30, 2014 at 11:02:35AM +0800, arei.gong...@huawei.com wrote: > > > @@ -552,6 +55

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Paolo Bonzini
Il 30/09/2014 15:33, Michael S. Tsirkin ha scritto: > > > > > The Propertyinfo.name is used to the qdev property's type, please see PATCH > > 4: > > > > -info->type = g_strdup(prop->info->legacy_name ?: > > prop->info->name); > > +info->type = g_strdup(prop->info->name);

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Gonglei
> Subject: Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in > PropertyInfo struct > > On Tue, Sep 30, 2014 at 11:02:35AM +0800, arei.gong...@huawei.com wrote: > > @@ -552,6 +556,7 @@ static int print_pci_devfn(DeviceState *dev, Property > *prop, char *de

Re: [Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-30 Thread Michael S. Tsirkin
On Tue, Sep 30, 2014 at 11:02:35AM +0800, arei.gong...@huawei.com wrote: > @@ -552,6 +556,7 @@ static int print_pci_devfn(DeviceState *dev, Property > *prop, char *dest, > PropertyInfo qdev_prop_pci_devfn = { > .name = "int32", Is this name used anywhere? It seems wrong ... > .legacy

[Qemu-devel] [PATCH v4 1/5] qdev: add description field in PropertyInfo struct

2014-09-29 Thread arei.gonglei
From: Gonglei The descriptions can serve as documentation in the code, and they can be used to provide better help. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Markus Armbruster Signed-off-by: Gonglei Signed-off-by: Paolo Bonzini --- hw/core/qdev-properties-system.c | 4 hw/core/qdev