mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 19:05:24 +00:00
domain: conf: Better errors on bad os <type> values
If no <os><type> was specified: before: unknown OS type no OS type after : xml error: an os <type> must be specified If an <os><type> is specified that's not in our capabiliities data: before: unknown OS type: $type after : unsupported configuration: no support found for os <type> '$type' VIR_ERR_OS_TYPE is now unused (as it should be frankly) so drop its strings as well to save our translators some effort. (cherry picked from commit 3700c065cde30ff3f70cc3a029279c79c2337a54)
This commit is contained in:
parent
d430c9545f
commit
e8fb46f7e9
@ -13951,8 +13951,8 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
if (VIR_STRDUP(def->os.type, "xen") < 0)
|
||||
goto error;
|
||||
} else {
|
||||
virReportError(VIR_ERR_OS_TYPE,
|
||||
"%s", _("no OS type"));
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("an os <type> must be specified"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -13969,8 +13969,9 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
}
|
||||
|
||||
if (!virCapabilitiesSupportsGuestOSType(caps, def->os.type)) {
|
||||
virReportError(VIR_ERR_OS_TYPE,
|
||||
"%s", def->os.type);
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("no support found for os <type> '%s'"),
|
||||
def->os.type);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user