debuggers.hg

changeset 20833:da6cddd20000

libxenlight: remove ctx argument to exec

Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 12 07:05:22 2010 +0000 (2010-01-12)
parents 9f4c6b96bd7f
children 675443b02c53
files tools/libxl/libxl.c tools/libxl/libxl_exec.c tools/libxl/libxl_internal.h
line diff
     1.1 --- a/tools/libxl/libxl.c	Tue Jan 12 07:04:46 2010 +0000
     1.2 +++ b/tools/libxl/libxl.c	Tue Jan 12 07:05:22 2010 +0000
     1.3 @@ -974,7 +974,7 @@ int libxl_create_device_model(struct lib
     1.4      rc = libxl_spawn_spawn(ctx, p, "device model", dm_xenstore_record_pid);
     1.5      if (rc < 0) goto xit;
     1.6      if (!rc) { /* inner child */
     1.7 -        libxl_exec(ctx, null, logfile_w, logfile_w,
     1.8 +        libxl_exec(null, logfile_w, logfile_w,
     1.9                     info->device_model, args);
    1.10      }
    1.11  
    1.12 @@ -1118,7 +1118,7 @@ int libxl_device_disk_add(struct libxl_c
    1.13  
    1.14                          null_r = open("/dev/null", O_RDONLY);
    1.15                          null_w = open("/dev/null", O_WRONLY);
    1.16 -                        libxl_exec(ctx, null_r, p[1], null_w, "/usr/sbin/tapdisk2", args);
    1.17 +                        libxl_exec(null_r, p[1], null_w, "/usr/sbin/tapdisk2", args);
    1.18                          XL_LOG(ctx, XL_LOG_ERROR, "Error execing tapdisk2");
    1.19                      }
    1.20                      close(p[1]);
     2.1 --- a/tools/libxl/libxl_exec.c	Tue Jan 12 07:04:46 2010 +0000
     2.2 +++ b/tools/libxl/libxl_exec.c	Tue Jan 12 07:05:22 2010 +0000
     2.3 @@ -48,8 +48,7 @@ static int call_waitpid(pid_t (*waitpid_
     2.4      return (waitpid_cb) ? waitpid_cb(pid, status, options) : waitpid(pid, status, options);
     2.5  }
     2.6  
     2.7 -void libxl_exec(struct libxl_ctx *ctx, int stdinfd, int stdoutfd, int stderrfd,
     2.8 -                char *arg0, char **args)
     2.9 +void libxl_exec(int stdinfd, int stdoutfd, int stderrfd, char *arg0, char **args)
    2.10       /* call this in the child */
    2.11  {
    2.12      int i;
    2.13 @@ -63,7 +62,6 @@ void libxl_exec(struct libxl_ctx *ctx, i
    2.14      for (i = 4; i < 256; i++)
    2.15          close(i);
    2.16      execv(arg0, args);
    2.17 -    XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "exec %s failed", arg0);
    2.18      _exit(-1);
    2.19  }
    2.20  
     3.1 --- a/tools/libxl/libxl_internal.h	Tue Jan 12 07:04:46 2010 +0000
     3.2 +++ b/tools/libxl/libxl_internal.h	Tue Jan 12 07:05:22 2010 +0000
     3.3 @@ -203,8 +203,7 @@ int libxl_spawn_check(struct libxl_ctx *
     3.4  
     3.5   /* low-level stuff, for synchronous subprocesses etc. */
     3.6  
     3.7 -void libxl_exec(struct libxl_ctx *ctx, int stdinfd, int stdoutfd, int stderrfd,
     3.8 -                char *arg0, char **args); // logs errors, never returns
     3.9 +void libxl_exec(int stdinfd, int stdoutfd, int stderrfd, char *arg0, char **args); // logs errors, never returns
    3.10  void libxl_log_child_exitstatus(struct libxl_ctx *ctx,
    3.11                                  const char *what, pid_t pid, int status);
    3.12