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

Re: [libvirt] [PATCH v3] domain.rng vs. formatdomain.html#elementsUSB



On 03/01/2011 03:23 AM, Philipp Hahn wrote:
> The Relax-NG schema for domains regarding <hostdev> doesn't match what's
> implemented in src/conf/domain_conf.c#virDomainHostdevDefFormat(): The
> implementation only requires @type, but the schema currently either
> required none or all three attributes (@mode, @type, and @managed) to be
> defined together, because they are declared in the same
> <optional)-section. (@managed is currently even undocumented on
> <http://libvirt.org/formatdomain.html#elementsUSB>).

Thanks again for taking this on (and sorry for my review backlog delay -
it's been a couple weeks of chasing down nasty crashers, which stole my
time).

> 
> The schema is changed to match the current implementation:
> 1. @mode is optional (which defaults to 'subsystem')
> 2. @type is required
> 3. @managed is optional (which defaults to 'no')
> 
> The documnetation is updated to mention @managed.

s/documnetation/documentation/

> @@ -967,8 +967,9 @@
>        <dd>The <code>hostdev</code> element is the main container for describing
>        host devices. For usb device passthrough <code>mode</code> is always
>        "subsystem" and <code>type</code> is "usb" for an USB device and "pci"

As long as we're touching this - English is screwy, and the acronym USB
is pronounced "you-ess-bee", the pronounced 'y' therefore matches with
"a" rather than "an".

> -      for a PCI device..
> -      <dt><code>source</code></dt>
> +	  for a PCI device. When <code>managed</code> is "yes" for a PIC device, it
> +	  is detached from the host before being passed on to the guest.</dd>
> +	  <dt><code>source</code></dt>

Spurious whitespace change on that last line; worse, the TABs are now
caught by 'make syntax-check'.

> +++ b/docs/schemas/domain.rng
> @@ -1731,12 +1731,14 @@
>              <value>capabilities</value>
>            </choice>
>          </attribute>
> -        <attribute name="type">
> -          <choice>
> -            <value>usb</value>
> -            <value>pci</value>
> -          </choice>
> -        </attribute>
> +      </optional>
> +      <attribute name="type">
> +        <choice>
> +          <value>usb</value>
> +          <value>pci</value>
> +        </choice>
> +      </attribute>
> +      <optional>
>          <attribute name="managed">

ACK with nits addressed, so I pushed it.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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