We do not need to check domainf fs type there,
because it is done in prlsdkCheckUnsupportedParams.
Signed-off-by: Olga Krishtal <okrishtal(a)virtuozzo.com>
---
src/vz/vz_sdk.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index b13b84d..5d4f76a 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -3861,23 +3861,20 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
int useTemplate = 0;
size_t i;
- if (def->nfss > 1) {
- /* Check all filesystems */
- for (i = 0; i < def->nfss; i++) {
- if (def->fss[i]->type != VIR_DOMAIN_FS_TYPE_FILE) {
- virReportError(VIR_ERR_INVALID_ARG, "%s",
- _("Unsupported filesystem type."));
- return -1;
- }
- }
- } else if (def->nfss == 1) {
- if (def->fss[0]->type == VIR_DOMAIN_FS_TYPE_TEMPLATE) {
- useTemplate = 1;
- } else if (def->fss[0]->type != VIR_DOMAIN_FS_TYPE_FILE) {
+ for (i = 0; i < def->nfss; i++) {
+ if (useTemplate) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
- _("Unsupported filesystem type."));
+ _("Unsupported configuration"));
return -1;
}
+ if (def->fss[i]->type == VIR_DOMAIN_FS_TYPE_TEMPLATE)
+ useTemplate = 1;
+ }
+
+ if (useTemplate && def->nfss > 1) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("Unsupported configuration"));
+ return -1;
}
confParam.nVmType = PVT_CT;
--
1.8.3.1