mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
virDomainDiskDef: Change type of discard to virDomainDiskDiscard
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
de472f7248
commit
ea7d0071d5
@ -9046,11 +9046,15 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def,
|
||||
}
|
||||
VIR_FREE(tmp);
|
||||
|
||||
if ((tmp = virXMLPropString(cur, "discard")) &&
|
||||
(def->discard = virDomainDiskDiscardTypeFromString(tmp)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown disk discard mode '%s'"), tmp);
|
||||
return -1;
|
||||
if ((tmp = virXMLPropString(cur, "discard"))) {
|
||||
int discard;
|
||||
|
||||
if ((discard = virDomainDiskDiscardTypeFromString(tmp)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown disk discard mode '%s'"), tmp);
|
||||
return -1;
|
||||
}
|
||||
def->discard = discard;
|
||||
}
|
||||
VIR_FREE(tmp);
|
||||
|
||||
|
@ -579,7 +579,7 @@ struct _virDomainDiskDef {
|
||||
virDomainDeviceInfo info;
|
||||
virTristateBool rawio;
|
||||
virDomainDeviceSGIO sgio;
|
||||
int discard; /* enum virDomainDiskDiscard */
|
||||
virDomainDiskDiscard discard;
|
||||
unsigned int iothread; /* unused = 0, > 0 specific thread # */
|
||||
int detect_zeroes; /* enum virDomainDiskDetectZeroes */
|
||||
char *domain_name; /* backend domain name */
|
||||
|
Loading…
x
Reference in New Issue
Block a user