[libvirt] [PATCH 2/5] macvtap support for libvirt -- parse new interface XML

Daniel Veillard veillard at redhat.com
Thu Feb 11 10:04:46 UTC 2010


On Mon, Feb 08, 2010 at 02:36:51PM -0500, Stefan Berger wrote:
> This part adds support to domain_conf.{c|h} for parsing the new
> interface XML of type 'direct'. The parsed mode is now stored as 
> an int.
> 
> Signed-off-by: Stefan Berger <stefanb at us.ibm.com>
[...]
> +    case VIR_DOMAIN_NET_TYPE_DIRECT:
> +        virBufferEscapeString(buf, "      <source dev='%s'",
> +                              def->data.direct.linkdev);
> +        virBufferEscapeString(buf, " mode='%s'",
> +                   virDomainNetdevMacvtapTypeToString(def->data.direct.mode));

  Nitpicking, virDomainNetdevMacvtapTypeToString return doesn't need to
  be escaped because it's coming from an ASCII string list embedded in
  the code.

[...]
> @@ -594,6 +609,8 @@ struct _virSecurityLabelDef {
>      int type;
>  };
>  
> +
> +
>  #define VIR_DOMAIN_CPUMASK_LEN 1024
>  
>  /* Guest VM main configuration */

  random indentation change

> @@ -915,4 +932,6 @@ VIR_ENUM_DECL(virDomainGraphics)
>  VIR_ENUM_DECL(virDomainState)
>  VIR_ENUM_DECL(virDomainSeclabel)
>  
> +VIR_ENUM_DECL(virDomainNetdevMacvtap)
> +
>  #endif /* __DOMAIN_CONF_H */

  But that's fine. ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list