]> xenbits.xensource.com Git - people/hx242/xen.git/commitdiff
libxl: Add device_{config,type} to libxl__ao_device
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 7 May 2019 14:54:08 +0000 (15:54 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 20 Sep 2019 09:42:42 +0000 (10:42 +0100)
These two fields help to give more information about the device been
hotplug/hotunplug to callbacks.

There is already `dev' of type `libxl__device', but it is mostly
useful when the backend/frontend is xenstore. Some device (like
`usbdev') don't have devid, so `dev' can't be used.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_internal.h

index 43a431f53565fe8e16a7bb1f71dd191e46e164b2..6c09b93f91f1cca4b18e57682c22f68ffdbac60c 100644 (file)
@@ -2628,6 +2628,12 @@ struct libxl__ao_device {
     /* for asynchronous execution of synchronous-only syscalls etc. */
     libxl__ev_child child;
     libxl__ev_qmp qmp;
+    /* 'device_config' can be used to to pass to callbacks a pointer of one
+     * of the type 'libxl_device_$type' corresponding to the device been
+     * hotplug. 'device_type' should have the corresponding
+     * 'libxl__$type_devtype'. */
+    void *device_config;
+    const libxl__device_type *device_type;
 };
 
 /*