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

[Xen-devel] [PATCH 18 of 24] libxl: use libxl__spawn_confirm_offspring_startup for device model


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Mon, 03 Oct 2011 17:54:55 +0200
  • Delivery-date: Mon, 03 Oct 2011 09:10:14 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1317653617 -7200
# Node ID acc1ee9d0c10a961834029726d11227c2ff9e97b
# Parent  018f63b6e4863faca16a832a5a34c6a6e7726cf7
libxl: use libxl__spawn_confirm_offspring_startup for device model

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 018f63b6e486 -r acc1ee9d0c10 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -890,25 +890,16 @@ out:
     return rc;
 }
 
-static int detach_device_model(libxl__gc *gc,
-                               libxl__spawner_starting *starting)
-{
-    int rc;
-    rc = libxl__spawn_detach(gc, starting->for_spawn);
-    if (starting->for_spawn)
-        free(starting->for_spawn);
-    free(starting);
-    return rc;
-}
 
 int libxl__confirm_device_model_startup(libxl__gc *gc,
                                        libxl__spawner_starting *starting)
 {
-    int detach;
-    int problem = libxl__wait_for_device_model(gc, starting->domid, "running",
-                                               starting->for_spawn, NULL, 
NULL);
-    detach = detach_device_model(gc, starting);
-    return problem ? problem : detach;
+    char *path;
+    int domid = starting->domid;
+    path = libxl__sprintf(gc, "/local/domain/0/device-model/%d/state", domid);
+    return libxl__spawn_confirm_offspring_startup(gc,
+                                     LIBXL_DEVICE_MODEL_START_TIMEOUT,
+                                     "Device Model", path, "running", 
starting);
 }
 
 int libxl__destroy_device_model(libxl__gc *gc, uint32_t domid)

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


 


Rackspace

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