From 2d40cd6513387013f2d0409af1366f738ffa134d Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 26 Jul 2012 16:47:31 +0100 Subject: libxl: convert libxl_device_nic_add to an async operation This patch converts libxl_device_nic_add to an ao operation that waits for device backend to reach state XenbusStateInitWait and then marks the operation as completed. This is not really useful now, but will be used by latter patches that will launch hotplug scripts after we reached the desired xenbus state. Calls to libxl_device_nic_add have also been moved to occur after the device model has been launched, so when hotplug scripts are called from this functions the interfaces already exists. As usual, libxl_device_nic_add callers have been modified, and the internal function libxl__device_disk_add has been used if the call was inside an already running ao. Signed-off-by: Roger Pau Monne Acked-by: Ian Jackson Committed-by: Ian Campbell --- tools/ocaml/libs/xl/xenlight_stubs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/ocaml') diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c index a158351794..0e9c65e8cd 100644 --- a/tools/ocaml/libs/xl/xenlight_stubs.c +++ b/tools/ocaml/libs/xl/xenlight_stubs.c @@ -281,7 +281,7 @@ value stub_xl_device_nic_add(value info, value domid) device_nic_val(&gc, &lg, &c_info, info); INIT_CTX(); - ret = libxl_device_nic_add(ctx, Int_val(domid), &c_info); + ret = libxl_device_nic_add(ctx, Int_val(domid), &c_info, 0); if (ret != 0) failwith_xl("nic_add", &lg); FREE_CTX(); -- cgit v1.2.3