mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
conf: Use virTristateXXX in virDomainLoaderDef
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
f940ec5f36
commit
2259b8d1fd
@ -19221,18 +19221,24 @@ virDomainLoaderDefParseXML(xmlNodePtr node,
|
||||
VIR_FREE(loader->path);
|
||||
}
|
||||
|
||||
if (readonly_str &&
|
||||
(loader->readonly = virTristateBoolTypeFromString(readonly_str)) <= 0) {
|
||||
virReportError(VIR_ERR_XML_DETAIL,
|
||||
_("unknown readonly value: %s"), readonly_str);
|
||||
return -1;
|
||||
if (readonly_str) {
|
||||
int value;
|
||||
if ((value = virTristateBoolTypeFromString(readonly_str)) <= 0) {
|
||||
virReportError(VIR_ERR_XML_DETAIL,
|
||||
_("unknown readonly value: %s"), readonly_str);
|
||||
return -1;
|
||||
}
|
||||
loader->readonly = value;
|
||||
}
|
||||
|
||||
if (secure_str &&
|
||||
(loader->secure = virTristateBoolTypeFromString(secure_str)) <= 0) {
|
||||
virReportError(VIR_ERR_XML_DETAIL,
|
||||
_("unknown secure value: %s"), secure_str);
|
||||
return -1;
|
||||
if (secure_str) {
|
||||
int value;
|
||||
if ((value = virTristateBoolTypeFromString(secure_str)) <= 0) {
|
||||
virReportError(VIR_ERR_XML_DETAIL,
|
||||
_("unknown secure value: %s"), secure_str);
|
||||
return -1;
|
||||
}
|
||||
loader->secure = value;
|
||||
}
|
||||
|
||||
if (type_str) {
|
||||
|
@ -2146,9 +2146,9 @@ VIR_ENUM_DECL(virDomainLoader);
|
||||
|
||||
struct _virDomainLoaderDef {
|
||||
char *path;
|
||||
int readonly; /* enum virTristateBool */
|
||||
virTristateBool readonly;
|
||||
virDomainLoader type;
|
||||
int secure; /* enum virTristateBool */
|
||||
virTristateBool secure;
|
||||
char *nvram; /* path to non-volatile RAM */
|
||||
char *templt; /* user override of path to master nvram */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user