[libvirt] [PATCH 2/2] qemu: add usb-serial support

Eric Blake eblake at redhat.com
Mon Jan 7 23:01:42 UTC 2013


On 01/04/2013 10:25 PM, Guannan Ren wrote:
> 
> On 01/05/2013 04:24 AM, Eric Blake wrote:
>> Overall it looks reasonable, but depending on the answer to whether we
>> should just always output type='isa-serial', you may have a v2 to submit.
>>
> 
>      As attribute 'type' is optional, my initial thoughts is that If
> type='value' is given
>    explicitly on input, then we print it out on output too, if no type
> is given on input,
>    we don't print it out on output either. Backward compatibility and
> being more flexible.

Backward compatibility says that we must never fail to parse an older
XML that used to be valid (therefore, the new attribute must be optional
on input, and have a sane default when omitted).  But it does not
require that we cannot output more information than was provided on
input (for example, we compute and output <address> elements for many
devices, even when not present on input).  Older code already has to be
prepared to ignore attributes and elements that get output by newer
libvirt.  If having that information makes the output more legible, then
I think it is worth always outputting the information by default.

> 
>      There are indeed a number of testcases we need to modify if we
> always output
>    type='isa-serial',  but not a big workload.

Then I think it's better to always output type='isa-serial' even when
the input omitted it.  Anyone else with an opinion?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130107/b1498d7d/attachment-0001.sig>


More information about the libvir-list mailing list