]> xenbits.xensource.com Git - xen.git/commitdiff
libxenlight: remove ctx argument to exec
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 12 Jan 2010 07:05:22 +0000 (07:05 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 12 Jan 2010 07:05:22 +0000 (07:05 +0000)
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_exec.c
tools/libxl/libxl_internal.h

index 518064e75d7556b459ea70a6474e6f2f812841d6..36e72cf3e0bd1fc4c5230a7fe7d97b4a4c92fa5f 100644 (file)
@@ -974,7 +974,7 @@ int libxl_create_device_model(struct libxl_ctx *ctx,
     rc = libxl_spawn_spawn(ctx, p, "device model", dm_xenstore_record_pid);
     if (rc < 0) goto xit;
     if (!rc) { /* inner child */
-        libxl_exec(ctx, null, logfile_w, logfile_w,
+        libxl_exec(null, logfile_w, logfile_w,
                    info->device_model, args);
     }
 
@@ -1118,7 +1118,7 @@ int libxl_device_disk_add(struct libxl_ctx *ctx, uint32_t domid, libxl_device_di
 
                         null_r = open("/dev/null", O_RDONLY);
                         null_w = open("/dev/null", O_WRONLY);
-                        libxl_exec(ctx, null_r, p[1], null_w, "/usr/sbin/tapdisk2", args);
+                        libxl_exec(null_r, p[1], null_w, "/usr/sbin/tapdisk2", args);
                         XL_LOG(ctx, XL_LOG_ERROR, "Error execing tapdisk2");
                     }
                     close(p[1]);
index 1588a1f54775f386a5df4132c0d930aa29d1feba..011ed8452db658d47b8cc1af497af66b3e7a9c46 100644 (file)
@@ -48,8 +48,7 @@ static int call_waitpid(pid_t (*waitpid_cb)(pid_t, int *, int), pid_t pid, int *
     return (waitpid_cb) ? waitpid_cb(pid, status, options) : waitpid(pid, status, options);
 }
 
-void libxl_exec(struct libxl_ctx *ctx, int stdinfd, int stdoutfd, int stderrfd,
-                char *arg0, char **args)
+void libxl_exec(int stdinfd, int stdoutfd, int stderrfd, char *arg0, char **args)
      /* call this in the child */
 {
     int i;
@@ -63,7 +62,6 @@ void libxl_exec(struct libxl_ctx *ctx, int stdinfd, int stdoutfd, int stderrfd,
     for (i = 4; i < 256; i++)
         close(i);
     execv(arg0, args);
-    XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "exec %s failed", arg0);
     _exit(-1);
 }
 
index 44e97d1b0605fe80a8e3ddb1b507c7d2499e5fd1..14952ca62968b6a60d8eff67ed2260446cc33c12 100644 (file)
@@ -203,8 +203,7 @@ int libxl_spawn_check(struct libxl_ctx *ctx,
 
  /* low-level stuff, for synchronous subprocesses etc. */
 
-void libxl_exec(struct libxl_ctx *ctx, int stdinfd, int stdoutfd, int stderrfd,
-                char *arg0, char **args); // logs errors, never returns
+void libxl_exec(int stdinfd, int stdoutfd, int stderrfd, char *arg0, char **args); // logs errors, never returns
 void libxl_log_child_exitstatus(struct libxl_ctx *ctx,
                                 const char *what, pid_t pid, int status);