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

[Xen-devel] [RFC PATCH 09/17] libxl: use \x1b to separate qemu arguments for linux stubdomain



This allows using arguments with spaces, like -append.
Stubdomain side of this require "xenstore-client: Add option for raw
in-/output" commit.
---
 tools/libxl/libxl_dm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index f6bd6a1..11acbea 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1844,6 +1844,7 @@ static int libxl__write_stub_dmargs(libxl__gc *gc,
     int i;
     char *vm_path;
     char *dmargs, *path;
+    const char arg_sep = linux_stubdom ? '\x1b' : ' ';
     int dmargs_size;
     struct xs_permissions roperm[2];
     xs_transaction_t t;
@@ -1869,8 +1870,9 @@ static int libxl__write_stub_dmargs(libxl__gc *gc,
         if (linux_stubdom ||
             (strcmp(args[i], "-sdl") &&
              strcmp(args[i], "-M") && strcmp(args[i], "xenfv"))) {
-            strcat(dmargs, " ");
             strcat(dmargs, args[i]);
+            if (args[i + 1] != NULL)
+                strncat(dmargs, &arg_sep, 1);
         }
         i++;
     }
-- 
git-series 0.9.1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.