libxl: update prototype of libxl__spawn_check
authorOlaf Hering <olaf@aepfle.de>
Thu, 27 Oct 2011 09:54:16 +0000 (11:54 +0200)
committerOlaf Hering <olaf@aepfle.de>
Thu, 27 Oct 2011 09:54:16 +0000 (11:54 +0200)
libxl__spawn_check expects a malloc'd libxl__spawn_starting. The
currently only user of libxl__spawn_check gets a libxl__spawn_starting
and passes it on. Update prototype to not take a void pointer, and also
update comment in header file.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxl/libxl_exec.c
tools/libxl/libxl_internal.h

index 95151c07b15f0a155503471be07b125edd8e0f04..1a62d475b493dbbcfee9e65d705b5628d25c7bc8 100644 (file)
@@ -431,10 +431,9 @@ int libxl__spawn_detach(libxl__gc *gc,
     return rc;
 }
 
-int libxl__spawn_check(libxl__gc *gc, void *for_spawn_void)
+int libxl__spawn_check(libxl__gc *gc, libxl__spawn_starting *for_spawn)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
-    libxl__spawn_starting *for_spawn = for_spawn_void;
     pid_t got;
     int status;
 
index 7df7698446ecddd8f73cb83e1aed01ce0d461f45..c2839f6bf2a8eec62fce11d9b0396d149768d92d 100644 (file)
@@ -376,12 +376,10 @@ _hidden int libxl__spawn_detach(libxl__gc *gc,
  * Returns 0 on success, and < 0 on error.
  *
  * Logs errors but also returns them.
- * for_spawn must actually be a  libxl__spawn_starting*  but
- * we take void* so you can pass this function directly to
- * libxl__wait_for_offspring.  Caller must still call detach.
+ * Caller must still call detach.
  */
 _hidden int libxl__spawn_check(libxl__gc *gc,
-                      void *for_spawn);
+                       libxl__spawn_starting *for_spawn);
 
  /* low-level stuff, for synchronous subprocesses etc. */