[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties |
Date: |
Tue, 16 Sep 2014 07:53:53 +0000 |
> From: Markus Armbruster [mailto:address@hidden
> Sent: Tuesday, September 16, 2014 3:21 PM
> To: Michael S. Tsirkin
> Subject: Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties
>
> "Michael S. Tsirkin" <address@hidden> writes:
>
> > On Mon, Sep 15, 2014 at 05:57:51PM +0200, Paolo Bonzini wrote:
> >> Il 15/09/2014 16:44, address@hidden ha scritto:
> >> > From: Gonglei <address@hidden>
> >> >
> >> > At present, people have no way to know they should
> >> > have a specific format for alias properties.
> >> >
> >> > Example:
> >> >
> >> > before output:
> >> >
> >> > virtio-blk-pci.physical_block_size=uint16
> >> > virtio-blk-pci.logical_block_size=uint16
> >> > virtio-blk-pci.drive=str
> >> >
> >> > after output applied this patch series:
> >> >
> >> > virtio-blk-pci.physical_block_size=blocksize
> >> > virtio-blk-pci.logical_block_size=blocksize
> >> > virtio-blk-pci.drive=drive
> >>
> >> Is there actually anyone that is relying on the legacy_names of
> >> properties? I would be inclined to drop them altogether...
> >>
> >> Paolo
> >
> > What makes these legacy?
>
> Rebasing qdev on top of QOM produced a bit of cruft.
>
> PropertyInfo defines a kind of property. It used to look like this:
>
> struct PropertyInfo {
> const char *name;
> size_t size;
> enum PropertyType type;
> int (*parse)(DeviceState *dev, Property *prop, const char *str);
> int (*print)(DeviceState *dev, Property *prop, char *dest, size_t
> len);
> };
>
> Lets generic code parse, unparse and copy properties.
>
> Commit 922910c added the -device FOO,? feature, using member name to
> give a hint on possible property values.
>
> The rebase onto QOM renamed name to legacy_name, to free name for use as
> QOM type name (commit cafe5bd).
>
> Current code uses legacy_name as follows:
>
> * QMP command device-list-properties
>
> Returns a list of DevicePropertyInfo, whose member "type" is
> PropertyInfo's legacy_name if set, else its name.
>
> * -device FOO,help
>
> Prints FOO.NAME=TYPE, where NAME is the property's name (not to be
> confused with PropertyInfo's name), and TYPE is PropertyInfo's legacy
> name if set, else its name.
>
> -device FOO,? is an outmoded way to say -device FOO,help. No plans to
> drop support for it.
>
> The second is actually built on top of the first.
>
> > How do you expect users to find out about the properties?
> >>qemu -device virtio-blk-pci.?
> > is not the correct way anymore?
>
> As far as I can tell, libvirt uses both device-list-properties and
> "-device,?". It doesn't appear to use the returned "type".
>
> Human users do, however. I'd object to a degradation of -device
> FOO,help. Changing it is fine, but it should remain at least as helpful
> as it is now.
>
> > How the time flies, it seems only yesterday this was the
> > new way, -help was the old one ...
>
> Everything must change, so that everything can stay the same.
What detailed explanation it is! Thanks. :)
Best regards,
-Gonglei
- [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, arei.gonglei, 2014/09/15
- [Qemu-devel] [PATCH 1/3] qom: add error handler for object alias property, arei.gonglei, 2014/09/15
- [Qemu-devel] [PATCH 2/3] qom: add target object poniter for alias property in ObjectProperty, arei.gonglei, 2014/09/15
- [Qemu-devel] [PATCH 3/3] qmp: print real legacy_name for alias property, arei.gonglei, 2014/09/15
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Paolo Bonzini, 2014/09/15
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Eric Blake, 2014/09/15
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Michael S. Tsirkin, 2014/09/15
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Markus Armbruster, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties,
Gonglei (Arei) <=
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Paolo Bonzini, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Markus Armbruster, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Paolo Bonzini, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Michael S. Tsirkin, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Paolo Bonzini, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Gonglei (Arei), 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Michael S. Tsirkin, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Paolo Bonzini, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Michael S. Tsirkin, 2014/09/16
- Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties, Paolo Bonzini, 2014/09/16