libxl: log device model arguments to aid debugging
authorIan Campbell <ian.campbell@citrix.com>
Mon, 19 Mar 2012 14:24:01 +0000 (14:24 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 19 Mar 2012 14:24:01 +0000 (14:24 +0000)
At the moment the only easy way to get at these is to strace xl.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxl/libxl_dm.c

index 12614994770b02580d084c063f0d901049660d31..f1ad4010be23fcef9763224a886729b11fbd44c1 100644 (file)
@@ -893,7 +893,7 @@ int libxl__create_device_model(libxl__gc *gc,
     char *path, *logfile;
     int logfile_w, null;
     int rc;
-    char **args;
+    char **args, **arg;
     libxl__spawner_starting buf_starting, *p;
     xs_transaction_t t;
     char *vm_path;
@@ -985,6 +985,10 @@ retry_transaction:
         }
     }
 
+    LIBXL__LOG(CTX, XTL_DEBUG, "Spawning device-model %s with arguments:", dm);
+    for (arg = args; *arg; arg++)
+        LIBXL__LOG(CTX, XTL_DEBUG, "  %s", *arg);
+
     rc = libxl__spawn_spawn(gc, p->for_spawn, "device model",
                             libxl_spawner_record_pid, p);
     if (rc < 0)