mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Moved XM parsing functions to xenxs
This commit is contained in:
parent
2f2a88b998
commit
1556ced2de
@ -120,6 +120,7 @@ src/xen/xs_internal.c
|
||||
src/xenapi/xenapi_driver.c
|
||||
src/xenapi/xenapi_utils.c
|
||||
src/xenxs/xen_sxpr.c
|
||||
src/xenxs/xen_xm.c
|
||||
tools/console.c
|
||||
tools/libvirt-guests.init.sh
|
||||
tools/virsh.c
|
||||
|
@ -425,7 +425,8 @@ VMX_SOURCES = \
|
||||
|
||||
XENXS_SOURCES = \
|
||||
xenxs/xenxs_private.h \
|
||||
xenxs/xen_sxpr.c xenxs/xen_sxpr.h
|
||||
xenxs/xen_sxpr.c xenxs/xen_sxpr.h \
|
||||
xenxs/xen_xm.c xenxs/xen_xm.h
|
||||
|
||||
pkgdata_DATA = cpu/cpu_map.xml
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "xen_driver.h"
|
||||
|
||||
#include "xen_sxpr.h"
|
||||
#include "xen_xm.h"
|
||||
#include "xen_hypervisor.h"
|
||||
#include "xend_internal.h"
|
||||
#include "xs_internal.h"
|
||||
@ -1216,7 +1217,7 @@ xenUnifiedDomainXMLFromNative(virConnectPtr conn,
|
||||
if (!conf)
|
||||
goto cleanup;
|
||||
|
||||
def = xenXMDomainConfigParse(conn, conf);
|
||||
def = xenXMDomainConfigParse(conf, priv->xendConfigVersion, priv->caps);
|
||||
} else if (STREQ(format, XEN_CONFIG_FORMAT_SEXPR)) {
|
||||
id = xenGetDomIdFromSxprString(config, priv->xendConfigVersion);
|
||||
xenUnifiedLock(priv);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -62,7 +62,6 @@ virDomainPtr xenXMDomainDefineXML(virConnectPtr con, const char *xml);
|
||||
int xenXMDomainUndefine(virDomainPtr domain);
|
||||
|
||||
virConfPtr xenXMDomainConfigFormat(virConnectPtr conn, virDomainDefPtr def);
|
||||
virDomainDefPtr xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf);
|
||||
|
||||
int xenXMDomainBlockPeek (virDomainPtr dom, const char *path, unsigned long long offset, size_t size, void *buffer);
|
||||
|
||||
|
1010
src/xenxs/xen_xm.c
Normal file
1010
src/xenxs/xen_xm.c
Normal file
File diff suppressed because it is too large
Load Diff
36
src/xenxs/xen_xm.h
Normal file
36
src/xenxs/xen_xm.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* xen_xm.h: Xen XM parsing functions
|
||||
*
|
||||
* Copyright (C) 2011 Univention GmbH
|
||||
* Copyright (C) 2006-2007, 2009-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
* Author: Markus Groß <gross@univention.de>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_XEN_XM_H__
|
||||
# define __VIR_XEN_XM_H__
|
||||
|
||||
# include "internal.h"
|
||||
# include "conf.h"
|
||||
# include "domain_conf.h"
|
||||
|
||||
virDomainDefPtr xenXMDomainConfigParse(virConfPtr conf, int xendConfigVersion,
|
||||
virCapsPtr caps);
|
||||
|
||||
#endif /* __VIR_XEN_XM_H__ */
|
@ -46,6 +46,8 @@
|
||||
# define XEND_CONFIG_MIN_VERS_PVFB_NEWCONF 3
|
||||
# endif
|
||||
|
||||
# define MIN_XEN_GUEST_SIZE 64 /* 64 megabytes */
|
||||
|
||||
# define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
# define XENXS_ERROR(code, ...) \
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "datatypes.h"
|
||||
#include "xen/xen_driver.h"
|
||||
#include "xen/xm_internal.h"
|
||||
#include "xenxs/xen_xm.h"
|
||||
#include "testutils.h"
|
||||
#include "testutilsxen.h"
|
||||
#include "memory.h"
|
||||
@ -127,7 +128,7 @@ static int testCompareFormatXML(const char *xmcfg, const char *xml,
|
||||
if (!(conf = virConfReadMem(xmcfgPtr, strlen(xmcfgPtr), 0)))
|
||||
goto fail;
|
||||
|
||||
if (!(def = xenXMDomainConfigParse(conn, conf)))
|
||||
if (!(def = xenXMDomainConfigParse(conf, priv.xendConfigVersion, priv.caps)))
|
||||
goto fail;
|
||||
|
||||
if (!(gotxml = virDomainDefFormat(def, VIR_DOMAIN_XML_SECURE)))
|
||||
|
Loading…
Reference in New Issue
Block a user