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

Re: [libvirt] [PATCH 2/5] qemu: define and parse USB redirection filter XML

On 09/12/2012 11:26 PM, Daniel P. Berrange wrote:
On Wed, Sep 12, 2012 at 04:35:47PM +0800, Guannan Ren wrote:

This patch define and parse the XML of USB redirection filter.
   <redirdev bus='usb' type='spicevmc'>
     <address type='usb' bus='0' port='4'/>
     <usbdev class='0x08' vendor='0x1234' product='0xbeef' \
             version='2.00' allow='yes'/>
     <usbdev class='-1' vendor='-1' product='-1' version='-1' allow='no'/>
I find it a little odd to output XML which uses both hex
and decimal. If the value is '-1', then can't we just omit
the attribute entirely.

   Thanks for the review.
attributes class, vendor, product and version are optional for input xml, default value: -1;
   allow attribute is mandatory for input xml only.

Because -1 is so special(why -1?) that I output them out in output xml as a kind of help
   for user to use later.

It's ok not to output these attributes with default value. This will be fixed in v2.


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