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

[Xen-changelog] [xen-unstable] libxenlight: remove ctx argument to exec



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1263279922 0
# Node ID da6cddd200002cd5a3319a5c7b90f48681c3923a
# Parent  9f4c6b96bd7ffeea956d5b6467e78b57264dbd1e
libxenlight: remove ctx argument to exec

Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c          |    4 ++--
 tools/libxl/libxl_exec.c     |    4 +---
 tools/libxl/libxl_internal.h |    3 +--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff -r 9f4c6b96bd7f -r da6cddd20000 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue Jan 12 07:04:46 2010 +0000
+++ b/tools/libxl/libxl.c       Tue Jan 12 07:05:22 2010 +0000
@@ -974,7 +974,7 @@ int libxl_create_device_model(struct lib
     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_c
 
                         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]);
diff -r 9f4c6b96bd7f -r da6cddd20000 tools/libxl/libxl_exec.c
--- a/tools/libxl/libxl_exec.c  Tue Jan 12 07:04:46 2010 +0000
+++ b/tools/libxl/libxl_exec.c  Tue Jan 12 07:05:22 2010 +0000
@@ -48,8 +48,7 @@ static int call_waitpid(pid_t (*waitpid_
     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, i
     for (i = 4; i < 256; i++)
         close(i);
     execv(arg0, args);
-    XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "exec %s failed", arg0);
     _exit(-1);
 }
 
diff -r 9f4c6b96bd7f -r da6cddd20000 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Tue Jan 12 07:04:46 2010 +0000
+++ b/tools/libxl/libxl_internal.h      Tue Jan 12 07:05:22 2010 +0000
@@ -203,8 +203,7 @@ int libxl_spawn_check(struct libxl_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);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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