mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +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,12 +8964,16 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def,
|
||||
|
||||
def->driverName = virXMLPropString(cur, "name");
|
||||
|
||||
if ((tmp = virXMLPropString(cur, "cache")) &&
|
||||
(def->cachemode = virDomainDiskCacheTypeFromString(tmp)) < 0) {
|
||||
if ((tmp = virXMLPropString(cur, "cache"))) {
|
||||
int cachemode;
|
||||
|
||||
if ((cachemode = virDomainDiskCacheTypeFromString(tmp)) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown disk cache mode '%s'"), tmp);
|
||||
return -1;
|
||||
}
|
||||
def->cachemode = cachemode;
|
||||
}
|
||||
VIR_FREE(tmp);
|
||||
|
||||
if ((tmp = virXMLPropString(cur, "error_policy")) &&
|
||||
|
@ -566,7 +566,7 @@ struct _virDomainDiskDef {
|
||||
char *wwn;
|
||||
char *vendor;
|
||||
char *product;
|
||||
int cachemode; /* enum virDomainDiskCache */
|
||||
virDomainDiskCache cachemode;
|
||||
int error_policy; /* enum virDomainDiskErrorPolicy */
|
||||
int rerror_policy; /* enum virDomainDiskErrorPolicy */
|
||||
int iomode; /* enum virDomainDiskIo */
|
||||
|
Loading…
Reference in New Issue
Block a user