Helper functions for interfacing with the xenstore from qemu
PATCH 2/3 Helper functions for interfacing with the xenstore from qemu
This patch provides a couple of helper functions to interface with the xenstore and read device information from it. These are used in patch part 3. The provided functions can be used to:
- detect what types of devices a domain has or whether a domain has a device of a certain type
- read the content of a variable related to a device, i.e., hotplug-status
- subscribe to changes of the hotplug status of a device for not having to poll the status
Signed-off-by Stefan Berger <[email protected]>
xen-unstable.hg/tools/ioemu/vl.h +19 -0
@@ -1217,6 +1217,25 @@ void xenstore_check_new_media_present(invoid xenstore_write_vncport (int vnc_display);int xenstore_read_vncpasswd (int domid); +int xenstore_domain_has_devtype (struct xs_handle *handle, +const char *devtype); +char **xenstore_domain_get_devices (struct xs_handle *handle, +const char *devtype,unsigned int *num); +char *xenstore_read_hotplug_status (struct xs_handle *handle, +const char *devtype,const char *inst); +char *xenstore_backend_read_variable (struct xs_handle *, +const char *devtype,const char *inst, +const char *var); +int xenstore_subscribe_to_hotplug_status (struct xs_handle *handle, +const char *devtype, +const char *inst, +const char *token); +int xenstore_unsubscribe_from_hotplug_status (struct xs_handle *handle, +const char *devtype, +const char *inst, +const char *token); + +/* xen_platform.c */ void pci_xen_platform_init (PCIBus *bus);
xen-unstable.hg/tools/ioemu/xenstore.c +137 -0
140 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel