block type CDROM also support startupPolicy in the past, so
let us fix it.
Signed-off-by: Jie Wang <wangjie88(a)huawei.com>
---
src/conf/domain_conf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f7025bffe4..dd374e8ab3 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -30853,9 +30853,10 @@ virDomainDiskTranslateSourcePool(virDomainDiskDef *def)
}
if (def->startupPolicy != 0 &&
- virStorageSourceGetActualType(def->src) != VIR_STORAGE_TYPE_FILE) {
+ (virStorageSourceGetActualType(def->src) != VIR_STORAGE_TYPE_FILE &&
+ virStorageSourceGetActualType(def->src) != VIR_STORAGE_TYPE_BLOCK)) {
virReportError(VIR_ERR_XML_ERROR, "%s",
- _("'startupPolicy' is only valid for 'file'
type volume"));
+ _("'startupPolicy' is only valid for 'file'
or 'block' type volume"));
return -1;
}
--
2.24.0.windows.2