libxl: convert libxl_device_nic_add to an async operation
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 26 Jul 2012 15:47:31 +0000 (16:47 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Thu, 26 Jul 2012 15:47:31 +0000 (16:47 +0100)
commit2d40cd6513387013f2d0409af1366f738ffa134d
tree48304b21f1066a3593328cb8e0584063099c8719
parent962eb2acbb8af50f8cddc28ad4479fe9661ab65c
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 <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_create.c
tools/libxl/libxl_device.c
tools/libxl/libxl_dm.c
tools/libxl/libxl_internal.h
tools/libxl/xl_cmdimpl.c
tools/ocaml/libs/xl/xenlight_stubs.c