[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] libxl: Rename struct libxl_device_type to libxl__device_type
commit 8cdda0edc3f52c9fe1d2695ddda6a8854d26d550 Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Thu Apr 18 17:26:09 2019 +0100 Commit: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CommitDate: Fri Sep 20 10:41:01 2019 +0100 libxl: Rename struct libxl_device_type to libxl__device_type libxl__device_type is internal to libxl, rename it to the internal only prefix. And eliminate redundant 'struct' keyword, in accord with the coding style. No functional changes. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_create.c | 4 ++-- tools/libxl/libxl_device.c | 10 ++++----- tools/libxl/libxl_dm.c | 2 +- tools/libxl/libxl_domain.c | 2 +- tools/libxl/libxl_internal.c | 2 +- tools/libxl/libxl_internal.h | 49 ++++++++++++++++++++++---------------------- 6 files changed, 35 insertions(+), 34 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 59dbcb50a0..3f31f2ebcd 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1536,7 +1536,7 @@ out: #define libxl__device_dtdev_update_devid NULL static DEFINE_DEVICE_TYPE_STRUCT(dtdev, NONE); -const struct libxl_device_type *device_type_tbl[] = { +const libxl__device_type *device_type_tbl[] = { &libxl__disk_devtype, &libxl__nic_devtype, &libxl__vtpm_devtype, @@ -1589,7 +1589,7 @@ static void domcreate_attach_devices(libxl__egc *egc, STATE_AO_GC(dcs->ao); int domid = dcs->guest_domid; libxl_domain_config *const d_config = dcs->guest_config; - const struct libxl_device_type *dt; + const libxl__device_type *dt; if (ret) { LOGD(ERROR, domid, "unable to add %s devices", diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index a2569102ee..1941fe780a 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -1823,7 +1823,7 @@ out: } void device_add_domain_config(libxl__gc *gc, libxl_domain_config *d_config, - const struct libxl_device_type *dt, const void *dev) + const libxl__device_type *dt, const void *dev) { int *num_dev; unsigned int i; @@ -1853,7 +1853,7 @@ void device_add_domain_config(libxl__gc *gc, libxl_domain_config *d_config, } void libxl__device_add_async(libxl__egc *egc, uint32_t domid, - const struct libxl_device_type *dt, void *type, + const libxl__device_type *dt, void *type, libxl__ao_device *aodev) { STATE_AO_GC(aodev->ao); @@ -1968,7 +1968,7 @@ out: } int libxl__device_add(libxl__gc *gc, uint32_t domid, - const struct libxl_device_type *dt, void *type) + const libxl__device_type *dt, void *type) { flexarray_t *back; flexarray_t *front, *ro_front; @@ -2017,7 +2017,7 @@ out: return rc; } -void *libxl__device_list(libxl__gc *gc, const struct libxl_device_type *dt, +void *libxl__device_list(libxl__gc *gc, const libxl__device_type *dt, uint32_t domid, int *num) { void *r = NULL; @@ -2082,7 +2082,7 @@ out: return r; } -void libxl__device_list_free(const struct libxl_device_type *dt, +void libxl__device_list_free(const libxl__device_type *dt, void *list, int num) { int i; diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 839c5ac2cd..9f60801d04 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -3170,7 +3170,7 @@ int libxl__need_xenpv_qemu(libxl__gc *gc, libxl_domain_config *d_config) { int idx, i, ret, num; uint32_t domid; - const struct libxl_device_type *dt; + const libxl__device_type *dt; ret = libxl__get_domid(gc, &domid); if (ret) { diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 0ce1ba1327..aee621b0a5 100644 --- a/tools/libxl/libxl_domain.c +++ b/tools/libxl/libxl_domain.c @@ -1726,7 +1726,7 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, * retrieve from JSON. */ { - const struct libxl_device_type *dt; + const libxl__device_type *dt; int idx; for (idx = 0;; idx++) { diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index a7a4d546c4..0750b69cba 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -552,7 +552,7 @@ void libxl__update_domain_configuration(libxl__gc *gc, const libxl_domain_config *src) { int i, idx, num; - const struct libxl_device_type *dt; + const libxl__device_type *dt; for (idx = 0;; idx++) { dt = device_type_tbl[idx]; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 93bf65ee9a..b733d02b1e 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -192,6 +192,7 @@ typedef struct libxl__ao libxl__ao; typedef struct libxl__aop_occurred libxl__aop_occurred; typedef struct libxl__osevent_hook_nexus libxl__osevent_hook_nexus; typedef struct libxl__osevent_hook_nexi libxl__osevent_hook_nexi; +typedef struct libxl__device_type libxl__device_type; typedef struct libxl__json_object libxl__json_object; typedef struct libxl__carefd libxl__carefd; typedef struct libxl__ev_devlock libxl__ev_devlock; @@ -3741,7 +3742,7 @@ typedef int (*device_set_xenstore_config_fn_t)(libxl__gc *, uint32_t, void *, flexarray_t *, flexarray_t *, flexarray_t *); -struct libxl_device_type { +struct libxl__device_type { libxl__device_kind type; int skip_attach; /* Skip entry in domcreate_attach_devices() if 1 */ int ptr_offset; /* Offset of device array ptr in libxl_domain_config */ @@ -3764,7 +3765,7 @@ struct libxl_device_type { }; #define DEFINE_DEVICE_TYPE_STRUCT_X(name, sname, kind, ...) \ - const struct libxl_device_type libxl__ ## name ## _devtype = { \ + const libxl__device_type libxl__ ## name ## _devtype = { \ .type = LIBXL__DEVICE_KIND_ ## kind, \ .ptr_offset = offsetof(libxl_domain_config, name ## s), \ .num_offset = offsetof(libxl_domain_config, num_ ## name ## s), \ @@ -3788,38 +3789,38 @@ struct libxl_device_type { DEFINE_DEVICE_TYPE_STRUCT_X(name, name, kind, __VA_ARGS__) static inline void **libxl__device_type_get_ptr( - const struct libxl_device_type *dt, const libxl_domain_config *d_config) + const libxl__device_type *dt, const libxl_domain_config *d_config) { return (void **)((void *)d_config + dt->ptr_offset); } static inline void *libxl__device_type_get_elem( - const struct libxl_device_type *dt, const libxl_domain_config *d_config, + const libxl__device_type *dt, const libxl_domain_config *d_config, int e) { return *libxl__device_type_get_ptr(dt, d_config) + dt->dev_elem_size * e; } static inline int *libxl__device_type_get_num( - const struct libxl_device_type *dt, const libxl_domain_config *d_config) + const libxl__device_type *dt, const libxl_domain_config *d_config) { return (int *)((void *)d_config + dt->num_offset); } -extern const struct libxl_device_type libxl__vfb_devtype; -extern const struct libxl_device_type libxl__vkb_devtype; -extern const struct libxl_device_type libxl__disk_devtype; -extern const struct libxl_device_type libxl__nic_devtype; -extern const struct libxl_device_type libxl__vtpm_devtype; -extern const struct libxl_device_type libxl__usbctrl_devtype; -extern const struct libxl_device_type libxl__usbdev_devtype; -extern const struct libxl_device_type libxl__pcidev_devtype; -extern const struct libxl_device_type libxl__vdispl_devtype; -extern const struct libxl_device_type libxl__p9_devtype; -extern const struct libxl_device_type libxl__pvcallsif_devtype; -extern const struct libxl_device_type libxl__vsnd_devtype; - -extern const struct libxl_device_type *device_type_tbl[]; +extern const libxl__device_type libxl__vfb_devtype; +extern const libxl__device_type libxl__vkb_devtype; +extern const libxl__device_type libxl__disk_devtype; +extern const libxl__device_type libxl__nic_devtype; +extern const libxl__device_type libxl__vtpm_devtype; +extern const libxl__device_type libxl__usbctrl_devtype; +extern const libxl__device_type libxl__usbdev_devtype; +extern const libxl__device_type libxl__pcidev_devtype; +extern const libxl__device_type libxl__vdispl_devtype; +extern const libxl__device_type libxl__p9_devtype; +extern const libxl__device_type libxl__pvcallsif_devtype; +extern const libxl__device_type libxl__vsnd_devtype; + +extern const libxl__device_type *device_type_tbl[]; /*----- Domain destruction -----*/ @@ -4603,21 +4604,21 @@ static inline bool libxl__acpi_defbool_val(const libxl_domain_build_info *b_info * (a copy of `dev' will be made) */ void device_add_domain_config(libxl__gc *gc, libxl_domain_config *d_config, - const struct libxl_device_type *dt, + const libxl__device_type *dt, const void *dev); void libxl__device_add_async(libxl__egc *egc, uint32_t domid, - const struct libxl_device_type *dt, void *type, + const libxl__device_type *dt, void *type, libxl__ao_device *aodev); int libxl__device_add(libxl__gc *gc, uint32_t domid, - const struct libxl_device_type *dt, void *type); + const libxl__device_type *dt, void *type); /* Caller is responsible for freeing the memory by calling * libxl__device_list_free */ -void* libxl__device_list(libxl__gc *gc, const struct libxl_device_type *dt, +void* libxl__device_list(libxl__gc *gc, const libxl__device_type *dt, uint32_t domid, int *num); -void libxl__device_list_free(const struct libxl_device_type *dt, +void libxl__device_list_free(const libxl__device_type *dt, void *list, int num); static inline bool libxl__timer_mode_is_default(libxl_timer_mode *tm) -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |