[PATCH 10/15] qemuDomainValidateStorageSource: Reject unsupported slices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We will currently support slice only for the 'raw' format slice reject
any other option.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6ebee4d5f4..8a38101bea 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6823,6 +6823,21 @@ qemuDomainValidateStorageSource(virStorageSourcePtr src,
         return -1;
     }

+    if (src->sliceStorage) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("storage slice is not supported for format '%s'"),
+                       virStorageFileFormatTypeToString(src->format));
+        return -1;
+    }
+
+    if (src->sliceFormat &&
+        src->format != VIR_STORAGE_FILE_RAW) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("format slice is not supported for format '%s'"),
+                       virStorageFileFormatTypeToString(src->format));
+        return -1;
+    }
+
     return 0;
 }

-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux