mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
xen: move virDomainDefPostParse to xenParseSxpr
This patch partially reverts previous commit 91a00424 and moves the post parse function to xenParseSxpr. This update is required because xen driver calls xenParseSxpr directly. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
f0df0dcaa0
commit
4100aecd13
@ -1552,7 +1552,9 @@ xenDaemonDomainFetch(virConnectPtr conn, int domid, const char *name,
|
||||
if (!(def = xenParseSxpr(root,
|
||||
cpus,
|
||||
tty,
|
||||
vncport)))
|
||||
vncport,
|
||||
priv->caps,
|
||||
priv->xmlopt)))
|
||||
goto cleanup;
|
||||
|
||||
cleanup:
|
||||
@ -3082,7 +3084,8 @@ xenDaemonDomainBlockPeek(virConnectPtr conn,
|
||||
vncport = xenStoreDomainGetVNCPort(conn, id);
|
||||
xenUnifiedUnlock(priv);
|
||||
|
||||
if (!(def = xenParseSxpr(root, NULL, tty, vncport)))
|
||||
if (!(def = xenParseSxpr(root, NULL, tty, vncport,
|
||||
priv->caps, priv->xmlopt)))
|
||||
goto cleanup;
|
||||
|
||||
if (!(actual = virDomainDiskPathByName(def, path))) {
|
||||
|
@ -1065,7 +1065,11 @@ xenParseSxprPCI(virDomainDefPtr def,
|
||||
*/
|
||||
virDomainDefPtr
|
||||
xenParseSxpr(const struct sexpr *root,
|
||||
const char *cpus, char *tty, int vncport)
|
||||
const char *cpus,
|
||||
char *tty,
|
||||
int vncport,
|
||||
virCapsPtr caps,
|
||||
virDomainXMLOptionPtr xmlopt)
|
||||
{
|
||||
const char *tmp;
|
||||
virDomainDefPtr def;
|
||||
@ -1371,6 +1375,10 @@ xenParseSxpr(const struct sexpr *root,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
|
||||
xmlopt) < 0)
|
||||
goto error;
|
||||
|
||||
return def;
|
||||
|
||||
error:
|
||||
@ -1405,16 +1413,7 @@ xenParseSxprString(const char *sexpr,
|
||||
if (!root)
|
||||
return NULL;
|
||||
|
||||
if (!(def = xenParseSxpr(root, NULL, tty, vncport)))
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
|
||||
xmlopt) < 0) {
|
||||
virDomainDefFree(def);
|
||||
def = NULL;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
def = xenParseSxpr(root, NULL, tty, vncport, caps, xmlopt);
|
||||
sexpr_free(root);
|
||||
|
||||
return def;
|
||||
|
@ -43,7 +43,11 @@ virDomainDefPtr xenParseSxprString(const char *sexpr,
|
||||
virDomainXMLOptionPtr xmlopt);
|
||||
|
||||
virDomainDefPtr xenParseSxpr(const struct sexpr *root,
|
||||
const char *cpus, char *tty, int vncport);
|
||||
const char *cpus,
|
||||
char *tty,
|
||||
int vncport,
|
||||
virCapsPtr caps,
|
||||
virDomainXMLOptionPtr xmlopt);
|
||||
|
||||
int xenParseSxprSound(virDomainDefPtr def, const char *str);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user