mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: Add return value to virDomainDefPostParseOs()
There are currently no failure scenarios for the function, but we're about to add one. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6cacfc751e
commit
c98910d011
@ -4873,7 +4873,7 @@ virDomainDefPostParseMemory(virDomainDef *def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static int
|
||||||
virDomainDefPostParseOs(virDomainDef *def)
|
virDomainDefPostParseOs(virDomainDef *def)
|
||||||
{
|
{
|
||||||
if (def->os.firmwareFeatures &&
|
if (def->os.firmwareFeatures &&
|
||||||
@ -4887,13 +4887,15 @@ virDomainDefPostParseOs(virDomainDef *def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!def->os.loader)
|
if (!def->os.loader)
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
if (def->os.loader->path &&
|
if (def->os.loader->path &&
|
||||||
def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_NONE) {
|
def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_NONE) {
|
||||||
/* By default, loader is type of 'rom' */
|
/* By default, loader is type of 'rom' */
|
||||||
def->os.loader->type = VIR_DOMAIN_LOADER_TYPE_ROM;
|
def->os.loader->type = VIR_DOMAIN_LOADER_TYPE_ROM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -6214,7 +6216,8 @@ virDomainDefPostParseCommon(virDomainDef *def,
|
|||||||
if (virDomainDefPostParseMemory(def, data->parseFlags) < 0)
|
if (virDomainDefPostParseMemory(def, data->parseFlags) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
virDomainDefPostParseOs(def);
|
if (virDomainDefPostParseOs(def) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
virDomainDefPostParseMemtune(def);
|
virDomainDefPostParseMemtune(def);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user