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

[Xen-changelog] [xen staging] libxl: Add device_{config, type} to libxl__ao_device



commit fdaef8e475faac954c8b9b0ba10eb15c6a8b40aa
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Tue May 7 15:54:08 2019 +0100
Commit:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CommitDate: Fri Sep 20 10:42:42 2019 +0100

    libxl: Add device_{config,type} to libxl__ao_device
    
    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@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_internal.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 43a431f535..6c09b93f91 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -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;
 };
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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