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