[libvirt] [PATCH 14/16] conf: Don't add default controllers in the XML parser
Laine Stump
laine at laine.org
Fri Mar 1 19:22:18 UTC 2013
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;
More information about the libvir-list
mailing list