diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-04-16 08:43:23 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-04-19 04:08:36 +0200 |
commit | df0183d8f14bc05c8f78d2cae5b49f3d8f324b25 (patch) | |
tree | 5f50c532ad0ec4b4e772ec214ec6ca4a1900e01f | |
parent | bus-wait-for-units: drop ready_callback (diff) | |
download | systemd-df0183d8f14bc05c8f78d2cae5b49f3d8f324b25.tar.xz systemd-df0183d8f14bc05c8f78d2cae5b49f3d8f324b25.zip |
bus-wait-for-units: make callback type end with "_t"
-rw-r--r-- | src/shared/bus-wait-for-units.c | 4 | ||||
-rw-r--r-- | src/shared/bus-wait-for-units.h | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/shared/bus-wait-for-units.c b/src/shared/bus-wait-for-units.c index e84b5386ba..3a4e8937d3 100644 --- a/src/shared/bus-wait-for-units.c +++ b/src/shared/bus-wait-for-units.c @@ -18,7 +18,7 @@ typedef struct WaitForItem { sd_bus_slot *slot_get_all; sd_bus_slot *slot_properties_changed; - bus_wait_for_units_unit_callback unit_callback; + bus_wait_for_units_unit_callback_t unit_callback; void *userdata; char *active_state; @@ -298,7 +298,7 @@ int bus_wait_for_units_add_unit( BusWaitForUnits *d, const char *unit, BusWaitForUnitsFlags flags, - bus_wait_for_units_unit_callback callback, + bus_wait_for_units_unit_callback_t callback, void *userdata) { _cleanup_(wait_for_item_freep) WaitForItem *item = NULL; diff --git a/src/shared/bus-wait-for-units.h b/src/shared/bus-wait-for-units.h index d2a2756dc7..02018e3ec1 100644 --- a/src/shared/bus-wait-for-units.h +++ b/src/shared/bus-wait-for-units.h @@ -21,13 +21,19 @@ typedef enum BusWaitForUnitsFlags { BUS_WAIT_REFFED = 1 << 3, /* The unit is already reffed with RefUnit() */ } BusWaitForUnitsFlags; -typedef void (*bus_wait_for_units_unit_callback)(BusWaitForUnits *d, const char *unit_path, bool good, void *userdata); +typedef void (*bus_wait_for_units_unit_callback_t)(BusWaitForUnits *d, const char *unit_path, bool good, void *userdata); int bus_wait_for_units_new(sd_bus *bus, BusWaitForUnits **ret); BusWaitForUnits* bus_wait_for_units_free(BusWaitForUnits *d); DEFINE_TRIVIAL_CLEANUP_FUNC(BusWaitForUnits*, bus_wait_for_units_free); -BusWaitForUnitsState bus_wait_for_units_state(BusWaitForUnits *d); -int bus_wait_for_units_add_unit(BusWaitForUnits *d, const char *unit, BusWaitForUnitsFlags flags, bus_wait_for_units_unit_callback callback, void *userdata); +int bus_wait_for_units_add_unit( + BusWaitForUnits *d, + const char *unit, + BusWaitForUnitsFlags flags, + bus_wait_for_units_unit_callback_t callback, + void *userdata); + int bus_wait_for_units_run(BusWaitForUnits *d); +BusWaitForUnitsState bus_wait_for_units_state(BusWaitForUnits *d); |