[libvirt] [PATCH 07/17] conf: HostdevDef parse/format helper functions

Eric Blake eblake at redhat.com
Sat Mar 3 02:36:02 UTC 2012


On 02/28/2012 01:14 PM, Laine Stump wrote:
> In an upcoming patch, virDomainNetDef will acquire a
> virDomainHostdevDef, and the <interface> XML will take on some of the
> elements of a <hostdev>. To avoid duplicating the code for parsing and
> formatting the <source> element (which will be nearly identical in
> these two cases), this patch factors those parts out of the
> HostdevDef's parse and format functions, and puts them into separate
> helper functions that are now called by the HostdevDef
> parser/formatter, and will soon be called by the NetDef
> parser/formatter.
> 
> One change in behavior - previously virDomainHostdevDefParseXML() had
> diverged from current common coding practice by logging an error and
> failing if it found any subelements of <hostdev> other than those it
> understood (standard libvirt practice is to ignore/discard unknown
> elements and attributes during parse). The new helper function ignores
> unknown elements, and thus so does the new
> virDomainHostdevDefParseXML.
> ---
> V2: Unchanged from V1.

I'll take your word that it's unchanged, so ACK.

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120302/629609c6/attachment-0001.sig>


More information about the libvir-list mailing list