mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 23:25:24 +00:00
virDomainDiskDef: Change type of cachemode to virDomainDiskCache
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1051c23b51
commit
f86e0b4cbc
@ -8964,11 +8964,15 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def,
|
|||||||
|
|
||||||
def->driverName = virXMLPropString(cur, "name");
|
def->driverName = virXMLPropString(cur, "name");
|
||||||
|
|
||||||
if ((tmp = virXMLPropString(cur, "cache")) &&
|
if ((tmp = virXMLPropString(cur, "cache"))) {
|
||||||
(def->cachemode = virDomainDiskCacheTypeFromString(tmp)) < 0) {
|
int cachemode;
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
||||||
_("unknown disk cache mode '%s'"), tmp);
|
if ((cachemode = virDomainDiskCacheTypeFromString(tmp)) < 0) {
|
||||||
return -1;
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("unknown disk cache mode '%s'"), tmp);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
def->cachemode = cachemode;
|
||||||
}
|
}
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ struct _virDomainDiskDef {
|
|||||||
char *wwn;
|
char *wwn;
|
||||||
char *vendor;
|
char *vendor;
|
||||||
char *product;
|
char *product;
|
||||||
int cachemode; /* enum virDomainDiskCache */
|
virDomainDiskCache cachemode;
|
||||||
int error_policy; /* enum virDomainDiskErrorPolicy */
|
int error_policy; /* enum virDomainDiskErrorPolicy */
|
||||||
int rerror_policy; /* enum virDomainDiskErrorPolicy */
|
int rerror_policy; /* enum virDomainDiskErrorPolicy */
|
||||||
int iomode; /* enum virDomainDiskIo */
|
int iomode; /* enum virDomainDiskIo */
|
||||||
|
Loading…
Reference in New Issue
Block a user