mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
sd-netlink: add call to query sd_event object an sd_netlink object is attached to
This mimics a similar call sd_bus_get_event() that already exists for sd-bus.
This commit is contained in:
@@ -761,6 +761,12 @@ int sd_netlink_detach_event(sd_netlink *nl) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
sd_event* sd_netlink_get_event(sd_netlink *nl) {
|
||||
assert_return(nl, NULL);
|
||||
|
||||
return nl->event;
|
||||
}
|
||||
|
||||
int netlink_add_match_internal(
|
||||
sd_netlink *nl,
|
||||
sd_netlink_slot **ret_slot,
|
||||
|
||||
@@ -67,6 +67,7 @@ int sd_netlink_add_match(sd_netlink *nl, sd_netlink_slot **ret_slot, uint16_t ma
|
||||
|
||||
int sd_netlink_attach_event(sd_netlink *nl, sd_event *e, int64_t priority);
|
||||
int sd_netlink_detach_event(sd_netlink *nl);
|
||||
sd_event* sd_netlink_get_event(sd_netlink *nl);
|
||||
int sd_netlink_attach_filter(sd_netlink *nl, size_t len, const struct sock_filter *filter);
|
||||
|
||||
/* Message construction */
|
||||
|
||||
Reference in New Issue
Block a user