[PATCH RESENT 06/12] libxl: use disk 'script' attribute

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

 



Implement handling of previously introduced <script/> element for disk
config.
This can be used for custom backend configuration like non-standard
device-mapper nodes, or to prepare device in other domain (see the next
patch).
---
 src/libxl/libxl_conf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 7668305..4bd62e9 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -484,6 +484,11 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
         return -1;
     }
 
+    if (l_disk->script && (x_disk->script = strdup(l_disk->script)) == NULL) {
+        virReportOOMError();
+        return -1;
+    }
+
     if (l_disk->driverName) {
         if (STREQ(l_disk->driverName, "tap") ||
             STREQ(l_disk->driverName, "tap2")) {
-- 
1.8.1.4


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]