mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
virt-aa-helper: rename ctl->hvm to ctl->os
ctl->hvm contains os.type string value, change the name to reflect it.
This commit is contained in:
parent
a55a5e7cfe
commit
61dab0f74e
@ -73,7 +73,7 @@ typedef struct {
|
|||||||
virDomainDefPtr def; /* VM definition */
|
virDomainDefPtr def; /* VM definition */
|
||||||
virCapsPtr caps; /* VM capabilities */
|
virCapsPtr caps; /* VM capabilities */
|
||||||
virDomainXMLOptionPtr xmlopt; /* XML parser data */
|
virDomainXMLOptionPtr xmlopt; /* XML parser data */
|
||||||
char *hvm; /* type of hypervisor (eg hvm, xen) */
|
char *os; /* type of os (eg hvm, xen, exe) */
|
||||||
virArch arch; /* machine architecture */
|
virArch arch; /* machine architecture */
|
||||||
char *newfile; /* newly added file */
|
char *newfile; /* newly added file */
|
||||||
bool append; /* append to .files instead of rewrite */
|
bool append; /* append to .files instead of rewrite */
|
||||||
@ -89,7 +89,7 @@ vahDeinit(vahControl * ctl)
|
|||||||
virObjectUnref(ctl->caps);
|
virObjectUnref(ctl->caps);
|
||||||
virObjectUnref(ctl->xmlopt);
|
virObjectUnref(ctl->xmlopt);
|
||||||
VIR_FREE(ctl->files);
|
VIR_FREE(ctl->files);
|
||||||
VIR_FREE(ctl->hvm);
|
VIR_FREE(ctl->os);
|
||||||
VIR_FREE(ctl->newfile);
|
VIR_FREE(ctl->newfile);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -641,7 +641,7 @@ verify_xpath_context(xmlXPathContextPtr ctxt)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse the xml we received to fill in the following:
|
* Parse the xml we received to fill in the following:
|
||||||
* ctl->hvm
|
* ctl->os
|
||||||
* ctl->arch
|
* ctl->arch
|
||||||
*
|
*
|
||||||
* These are suitable for setting up a virCapsPtr
|
* These are suitable for setting up a virCapsPtr
|
||||||
@ -668,8 +668,8 @@ caps_mockup(vahControl * ctl, const char *xmlStr)
|
|||||||
if (verify_xpath_context(ctxt) != 0)
|
if (verify_xpath_context(ctxt) != 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ctl->hvm = virXPathString("string(./os/type[1])", ctxt);
|
ctl->os = virXPathString("string(./os/type[1])", ctxt);
|
||||||
if (!ctl->hvm) {
|
if (!ctl->os) {
|
||||||
vah_error(ctl, 0, _("os.type is not defined"));
|
vah_error(ctl, 0, _("os.type is not defined"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -714,7 +714,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ostype = virDomainOSTypeFromString(ctl->hvm)) < 0) {
|
if ((ostype = virDomainOSTypeFromString(ctl->os)) < 0) {
|
||||||
vah_error(ctl, 0, _("unknown OS type"));
|
vah_error(ctl, 0, _("unknown OS type"));
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user