---
src/conf/domain_conf.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index baf6f84..2456639 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6949,6 +6949,13 @@ virDomainDiskDefValidate(const virDomainDiskDef *def)
return -1;
}
+ if (def->removable != VIR_TRISTATE_SWITCH_ABSENT &&
+ def->bus != VIR_DOMAIN_DISK_BUS_USB) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("removable is only valid for usb disks"));
+ return -1;
+ }
+
return 0;
}
@@ -7424,12 +7431,6 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
_("unknown disk removable status '%s'"),
removable);
goto error;
}
-
- if (def->bus != VIR_DOMAIN_DISK_BUS_USB) {
- virReportError(VIR_ERR_XML_ERROR, "%s",
- _("removable is only valid for usb disks"));
- goto error;
- }
}
if (devaddr) {
--
2.8.1