Re: [PATCH 14/16] conf: Don't add default controllers in the XML parser

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

 



On 02/20/2013 12:06 PM, Peter Krempa wrote:
> Move this to the after-parse updater.

It really should happen in a callback provided by qemu (what will that
do to xen? Do we need to provide the same callback for the xen driver?).

> ---
>  src/conf/domain_conf.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index d881983..3c3172d 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -2362,10 +2362,13 @@ virDomainDeviceDefUpdateDefaultsInternal(virDomainDeviceDefPtr dev ATTRIBUTE_UNU
>
>
>  static int
> -virDomainDefUpdateDefaultsInternal(virDomainDefPtr def ATTRIBUTE_UNUSED,
> +virDomainDefUpdateDefaultsInternal(virDomainDefPtr def,
>                                     virCapsPtr caps ATTRIBUTE_UNUSED)
>  {
> -    /* not in use yet */
> +    /* Auto-add any implied controllers which aren't present */
> +    if (virDomainDefAddImplicitControllers(def) < 0)
> +        return -1;
> +
>      return 0;
>  }
>
> @@ -10778,10 +10781,6 @@ virDomainDefParseXML(virCapsPtr caps,
>          (def->ns.parse)(xml, root, ctxt, &def->namespaceData) < 0)
>          goto error;
>
> -    /* Auto-add any implied controllers which aren't present */
> -    if (virDomainDefAddImplicitControllers(def) < 0)
> -        goto error;
> -
>      /* callback to fill driver specific domain aspects */
>      if (virDomainDefUpdateDefaults(def, caps) < 0)
>          goto error;

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]