mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
conf: introduce virDomainDefParseBootKernelOptions
Extract the code to it's own function. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
b07116438c
commit
bf9b3f8e57
@ -19565,6 +19565,18 @@ virDomainDefParseBootInitOptions(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
virDomainDefParseBootKernelOptions(virDomainDefPtr def,
|
||||||
|
xmlXPathContextPtr ctxt)
|
||||||
|
{
|
||||||
|
def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt);
|
||||||
|
def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt);
|
||||||
|
def->os.cmdline = virXPathString("string(./os/cmdline[1])", ctxt);
|
||||||
|
def->os.dtb = virXPathString("string(./os/dtb[1])", ctxt);
|
||||||
|
def->os.root = virXPathString("string(./os/root[1])", ctxt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainDefParseBootOptions(virDomainDefPtr def,
|
virDomainDefParseBootOptions(virDomainDefPtr def,
|
||||||
xmlXPathContextPtr ctxt)
|
xmlXPathContextPtr ctxt)
|
||||||
@ -19594,11 +19606,7 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
|
|||||||
g_autofree char *firmware = NULL;
|
g_autofree char *firmware = NULL;
|
||||||
xmlNodePtr loader_node;
|
xmlNodePtr loader_node;
|
||||||
|
|
||||||
def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt);
|
virDomainDefParseBootKernelOptions(def, ctxt);
|
||||||
def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt);
|
|
||||||
def->os.cmdline = virXPathString("string(./os/cmdline[1])", ctxt);
|
|
||||||
def->os.dtb = virXPathString("string(./os/dtb[1])", ctxt);
|
|
||||||
def->os.root = virXPathString("string(./os/root[1])", ctxt);
|
|
||||||
|
|
||||||
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM &&
|
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM &&
|
||||||
(firmware = virXPathString("string(./os/@firmware)", ctxt))) {
|
(firmware = virXPathString("string(./os/@firmware)", ctxt))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user