mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
virDomainDiskDef: Change type of rerror_policy to virDomainDiskErrorPolicy
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
90a50b98f6
commit
7a3bf2589d
@ -8988,13 +8988,17 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def,
|
|||||||
}
|
}
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
|
|
||||||
if ((tmp = virXMLPropString(cur, "rerror_policy")) &&
|
if ((tmp = virXMLPropString(cur, "rerror_policy"))) {
|
||||||
(((def->rerror_policy = virDomainDiskErrorPolicyTypeFromString(tmp)) <= 0) ||
|
int rerror_policy;
|
||||||
(def->rerror_policy == VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPACE))) {
|
|
||||||
|
if (((rerror_policy = virDomainDiskErrorPolicyTypeFromString(tmp)) <= 0) ||
|
||||||
|
(rerror_policy == VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPACE)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("unknown disk read error policy '%s'"), tmp);
|
_("unknown disk read error policy '%s'"), tmp);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
def->rerror_policy = rerror_policy;
|
||||||
|
}
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
|
|
||||||
if ((tmp = virXMLPropString(cur, "io")) &&
|
if ((tmp = virXMLPropString(cur, "io")) &&
|
||||||
|
@ -568,7 +568,7 @@ struct _virDomainDiskDef {
|
|||||||
char *product;
|
char *product;
|
||||||
virDomainDiskCache cachemode;
|
virDomainDiskCache cachemode;
|
||||||
virDomainDiskErrorPolicy error_policy;
|
virDomainDiskErrorPolicy error_policy;
|
||||||
int rerror_policy; /* enum virDomainDiskErrorPolicy */
|
virDomainDiskErrorPolicy rerror_policy;
|
||||||
int iomode; /* enum virDomainDiskIo */
|
int iomode; /* enum virDomainDiskIo */
|
||||||
virTristateSwitch ioeventfd;
|
virTristateSwitch ioeventfd;
|
||||||
virTristateSwitch event_idx;
|
virTristateSwitch event_idx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user