Home
last modified time | relevance | path

Searched refs:event (Results 1 – 25 of 268) sorted by relevance

1234567891011

/systemd-251/src/udev/
Dudevd.c90 sd_event *event; member
140 LIST_FIELDS(Event, event);
157 Event *event; member
174 static Event *event_free(Event *event) { in event_free() argument
175 if (!event) in event_free()
178 assert(event->manager); in event_free()
180 LIST_REMOVE(event, event->manager->events, event); in event_free()
181 sd_device_unref(event->dev); in event_free()
185 sd_event_source_unref(event->timeout_warning_event); in event_free()
186 sd_event_source_unref(event->timeout_event); in event_free()
[all …]
Dudev-event.c57 UdevEvent *event; in udev_event_new() local
61 event = new(UdevEvent, 1); in udev_event_new()
62 if (!event) in udev_event_new()
65 *event = (UdevEvent) { in udev_event_new()
77 return event; in udev_event_new()
80 UdevEvent *udev_event_free(UdevEvent *event) { in udev_event_free() argument
81 if (!event) in udev_event_free()
84 sd_device_unref(event->dev); in udev_event_free()
85 sd_device_unref(event->dev_db_clone); in udev_event_free()
86 sd_netlink_unref(event->rtnl); in udev_event_free()
[all …]
Dudevadm-wait.c99 static int check_and_exit(sd_event *event) { in check_and_exit() argument
100 assert(event); in check_and_exit()
103 return sd_event_exit(event, 0); in check_and_exit()
174 static int setup_monitor(sd_event *event, sd_device_monitor **ret) { in setup_monitor() argument
178 assert(event); in setup_monitor()
187 r = sd_device_monitor_attach_event(monitor, event); in setup_monitor()
204 static int on_inotify(sd_event_source *s, const struct inotify_event *event, void *userdata) { in on_inotify() argument
208 static int setup_inotify(sd_event *event) { in setup_inotify() argument
212 assert(event); in setup_inotify()
217 r = sd_event_add_inotify(event, &s, "/run/udev" , IN_CREATE | IN_DELETE, on_inotify, NULL); in setup_inotify()
[all …]
Dudev-rules.c1375 …c bool token_match_attr(UdevRules *rules, UdevRuleToken *token, sd_device *dev, UdevEvent *event) { in token_match_attr() argument
1384 assert(event); in token_match_attr()
1390 (void) udev_event_apply_format(event, name, nbuf, sizeof(nbuf), false, &truncated); in token_match_attr()
1402 … if (device_get_sysattr_value_maybe_from_netlink(dev, &event->rtnl, name, &value) < 0) in token_match_attr()
1544 UdevEvent *event, in udev_rule_apply_token_to_event() argument
1554 assert(event); in udev_rule_apply_token_to_event()
1601 return token_match_string(token, event->name); in udev_rule_apply_token_to_event()
1656 return token_match_attr(rules, token, dev, event); in udev_rule_apply_token_to_event()
1662 … (void) udev_event_apply_format(event, token->data, buf, sizeof(buf), false, &truncated); in udev_rule_apply_token_to_event()
1681 … (void) udev_event_apply_format(event, token->value, buf, sizeof(buf), false, &truncated); in udev_rule_apply_token_to_event()
[all …]
Dudev-ctrl.c42 sd_event *event; member
116 sd_event_unref(uctrl->event); in udev_ctrl_free()
122 int udev_ctrl_attach_event(UdevCtrl *uctrl, sd_event *event) { in udev_ctrl_attach_event() argument
126 assert_return(!uctrl->event, -EBUSY); in udev_ctrl_attach_event()
128 if (event) in udev_ctrl_attach_event()
129 uctrl->event = sd_event_ref(event); in udev_ctrl_attach_event()
131 r = sd_event_default(&uctrl->event); in udev_ctrl_attach_event()
252 …r = sd_event_add_io(uctrl->event, &uctrl->event_source_connect, sock, EPOLLIN, udev_ctrl_connectio… in udev_ctrl_event_handler()
272 if (!uctrl->event) { in udev_ctrl_start()
285 …r = sd_event_add_io(uctrl->event, &uctrl->event_source, uctrl->sock, EPOLLIN, udev_ctrl_event_hand… in udev_ctrl_start()
[all …]
Dudevadm-monitor.c62 static int setup_monitor(MonitorNetlinkGroup sender, sd_event *event, sd_device_monitor **ret) { in setup_monitor() argument
73 r = sd_device_monitor_attach_event(monitor, event); in setup_monitor()
195 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in monitor_main()
210 r = sd_event_default(&event); in monitor_main()
217 (void) sd_event_add_signal(event, NULL, SIGTERM, NULL, NULL); in monitor_main()
218 (void) sd_event_add_signal(event, NULL, SIGINT, NULL, NULL); in monitor_main()
222 r = setup_monitor(MONITOR_GROUP_UDEV, event, &udev_monitor); in monitor_main()
230 r = setup_monitor(MONITOR_GROUP_KERNEL, event, &kernel_monitor); in monitor_main()
238 r = sd_event_loop(event); in monitor_main()
Dudev-event.h51 UdevEvent *udev_event_free(UdevEvent *event);
55 UdevEvent *event,
63 UdevEvent *event,
72 UdevEvent *event,
78 void udev_event_execute_run(UdevEvent *event, usec_t timeout_usec, int timeout_signal);
79 int udev_event_process_inotify_watch(UdevEvent *event, int inotify_fd);
/systemd-251/src/rfkill/
Drfkill.c68 const struct rfkill_event *event, in find_device() argument
75 assert(event); in find_device()
78 if (asprintf(&sysname, "rfkill%i", event->idx) < 0) in find_device()
97 const struct rfkill_event *event, in determine_state_file() argument
105 assert(event); in determine_state_file()
108 r = find_device(event, &d); in determine_state_file()
116 assert_se(type = rfkill_type_to_string(event->type)); in determine_state_file()
136 static int load_state(Context *c, const struct rfkill_event *event) { in load_state() argument
142 assert(event); in load_state()
147 r = determine_state_file(event, &state_file); in load_state()
[all …]
/systemd-251/man/
Dinotify-watch-tmp.c12 const struct inotify_event *event, in inotify_handler() argument
19 if (event->mask & IN_Q_OVERFLOW) in inotify_handler()
21 else if (event->mask & IN_CREATE) in inotify_handler()
22 printf("inotify-handler <%s>: create on %s\n", desc, event->name); in inotify_handler()
23 else if (event->mask & IN_DELETE) in inotify_handler()
24 printf("inotify-handler <%s>: delete on %s\n", desc, event->name); in inotify_handler()
25 else if (event->mask & IN_MOVED_TO) in inotify_handler()
26 printf("inotify-handler <%s>: moved-to on %s\n", desc, event->name); in inotify_handler()
29 if ((event->mask & (IN_CREATE|IN_MOVED_TO)) && in inotify_handler()
30 strcmp(event->name, "exit") == 0) in inotify_handler()
[all …]
Dglib-event-glue.c10 sd_event *event; member
14 return sd_event_prepare(((SDEventSource *)source)->event) > 0; in event_prepare()
18 return sd_event_wait(((SDEventSource *)source)->event, 0) > 0; in event_check()
22 return sd_event_dispatch(((SDEventSource *)source)->event) > 0; in event_dispatch()
26 sd_event_unref(((SDEventSource *)source)->event); in event_finalize()
36 GSource *g_sd_event_create_source(sd_event *event) { in g_sd_event_create_source() argument
41 source->event = sd_event_ref(event); in g_sd_event_create_source()
42 source->pollfd.fd = sd_event_get_fd(event); in g_sd_event_create_source()
/systemd-251/src/libsystemd-network/
Dsd-ndisc.c34 static void ndisc_callback(sd_ndisc *ndisc, sd_ndisc_event_t event, sd_ndisc_router *rt) { in ndisc_callback() argument
36 assert(event >= 0 && event < _SD_NDISC_EVENT_MAX); in ndisc_callback()
39 … return (void) log_ndisc(ndisc, "Received '%s' event.", ndisc_event_to_string(event)); in ndisc_callback()
41 log_ndisc(ndisc, "Invoking callback for '%s' event.", ndisc_event_to_string(event)); in ndisc_callback()
42 ndisc->callback(ndisc, event, rt, ndisc->userdata); in ndisc_callback()
103 int sd_ndisc_attach_event(sd_ndisc *nd, sd_event *event, int64_t priority) { in sd_ndisc_attach_event() argument
108 assert_return(!nd->event, -EBUSY); in sd_ndisc_attach_event()
110 if (event) in sd_ndisc_attach_event()
111 nd->event = sd_event_ref(event); in sd_ndisc_attach_event()
113 r = sd_event_default(&nd->event); in sd_ndisc_attach_event()
[all …]
Dsd-lldp-rx.c39 static void lldp_rx_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_event_t event, sd_lldp_neighbor *n) { in lldp_rx_callback() argument
41 assert(event >= 0 && event < _SD_LLDP_RX_EVENT_MAX); in lldp_rx_callback()
44 … return (void) log_lldp_rx(lldp_rx, "Received '%s' event.", lldp_rx_event_to_string(event)); in lldp_rx_callback()
46 log_lldp_rx(lldp_rx, "Invoking callback for '%s' event.", lldp_rx_event_to_string(event)); in lldp_rx_callback()
47 lldp_rx->callback(lldp_rx, event, n, lldp_rx->userdata); in lldp_rx_callback()
259 assert_return(lldp_rx->event, -EINVAL); in sd_lldp_rx_start()
271 …r = sd_event_add_io(lldp_rx->event, &lldp_rx->io_event_source, lldp_rx->fd, EPOLLIN, lldp_rx_recei… in sd_lldp_rx_start()
301 int sd_lldp_rx_attach_event(sd_lldp_rx *lldp_rx, sd_event *event, int64_t priority) { in sd_lldp_rx_attach_event() argument
306 assert_return(!lldp_rx->event, -EBUSY); in sd_lldp_rx_attach_event()
308 if (event) in sd_lldp_rx_attach_event()
[all …]
Dsd-ipv4acd.c72 sd_event *event; member
162 static void ipv4acd_client_notify(sd_ipv4acd *acd, int event) { in ipv4acd_client_notify() argument
168 acd->callback(acd, event, acd->userdata); in ipv4acd_client_notify()
203 assert_se(sd_event_now(acd->event, CLOCK_BOOTTIME, &time_now) >= 0); in ipv4acd_set_next_wakeup()
205 return event_reset_time(acd->event, &acd->timer_event_source, in ipv4acd_set_next_wakeup()
384 assert_se(sd_event_now(acd->event, CLOCK_BOOTTIME, &ts) >= 0); in ipv4acd_on_packet()
487 acd->event = sd_event_unref(acd->event); in sd_ipv4acd_detach_event()
492 int sd_ipv4acd_attach_event(sd_ipv4acd *acd, sd_event *event, int64_t priority) { in sd_ipv4acd_attach_event() argument
496 assert_return(!acd->event, -EBUSY); in sd_ipv4acd_attach_event()
498 if (event) in sd_ipv4acd_attach_event()
[all …]
/systemd-251/src/timesync/
Dwait-sync.c44 static int clock_state_update(ClockState *sp, sd_event *event);
60 static void process_inotify_event(sd_event *event, ClockState *sp, struct inotify_event *e) { in process_inotify_event() argument
72 clock_state_update(sp, event); in process_inotify_event()
80 sd_event *event = sd_event_source_get_event(s); in inotify_handler() local
93 process_inotify_event(event, sp, e); in inotify_handler()
100 sd_event *event) { in clock_state_update() argument
160 r = sd_event_add_io(event, &sp->timerfd_event_source, sp->timerfd_fd, in clock_state_update()
173 (void) sd_event_exit(event, r); in clock_state_update()
178 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in run()
189 r = sd_event_default(&event); in run()
[all …]
/systemd-251/src/import/
Dexport.c51 sd_event *event = userdata; in on_tar_finished() local
57 sd_event_exit(event, abs(error)); in on_tar_finished()
62 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in export_tar()
102 r = sd_event_default(&event); in export_tar()
107 (void) sd_event_add_signal(event, NULL, SIGTERM, interrupt_signal_handler, NULL); in export_tar()
108 (void) sd_event_add_signal(event, NULL, SIGINT, interrupt_signal_handler, NULL); in export_tar()
110 r = tar_export_new(&export, event, on_tar_finished, event); in export_tar()
118 r = sd_event_loop(event); in export_tar()
127 sd_event *event = userdata; in on_raw_finished() local
133 sd_event_exit(event, abs(error)); in on_raw_finished()
[all …]
Dimport.c120 sd_event *event = userdata; in on_tar_finished() local
126 sd_event_exit(event, abs(error)); in on_tar_finished()
132 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in import_tar()
164 r = import_allocate_event_with_signals(&event); in import_tar()
171 r = tar_import_new(&import, event, arg_image_root, on_tar_finished, event); in import_tar()
183 r = sd_event_loop(event); in import_tar()
192 sd_event *event = userdata; in on_raw_finished() local
198 sd_event_exit(event, abs(error)); in on_raw_finished()
204 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in import_raw()
236 r = import_allocate_event_with_signals(&event); in import_raw()
[all …]
Dpull.c96 sd_event *event = userdata; in on_tar_finished() local
102 sd_event_exit(event, abs(error)); in on_tar_finished()
107 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in pull_tar()
139 r = import_allocate_event_with_signals(&event); in pull_tar()
146 r = tar_pull_new(&pull, event, arg_image_root, on_tar_finished, event); in pull_tar()
160 r = sd_event_loop(event); in pull_tar()
169 sd_event *event = userdata; in on_raw_finished() local
175 sd_event_exit(event, abs(error)); in on_raw_finished()
180 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in pull_raw()
209 r = import_allocate_event_with_signals(&event); in pull_raw()
[all …]
Dexport-raw.c30 sd_event *event; member
69 sd_event_unref(e->event); in raw_export_unref()
80 sd_event *event, in raw_export_new() argument
102 if (event) in raw_export_new()
103 e->event = sd_event_ref(event); in raw_export_new()
105 r = sd_event_default(&e->event); in raw_export_new()
232 sd_event_exit(e->event, r); in raw_export_process()
318 … r = sd_event_add_io(e->event, &e->output_event_source, fd, EPOLLOUT, raw_export_on_output, e); in raw_export_start()
320 r = sd_event_add_defer(e->event, &e->output_event_source, raw_export_on_defer, e); in raw_export_start()
/systemd-251/src/journal-remote/
Djournal-remote.c156 static int dispatch_raw_source_event(sd_event_source *event,
160 static int dispatch_raw_source_until_block(sd_event_source *event,
162 static int dispatch_blocking_source_event(sd_event_source *event,
164 static int dispatch_raw_connection_event(sd_event_source *event,
242 r = sd_event_add_io(s->events, &source->event, in journal_remote_add_source()
254 r = sd_event_add_defer(s->events, &source->event, in journal_remote_add_source()
257 r = sd_event_source_set_enabled(source->event, SD_EVENT_ON); in journal_remote_add_source()
265 r = sd_event_source_set_description(source->event, name); in journal_remote_add_source()
381 sd_event_source *event, in journal_remote_handle_raw_source() argument
426 static int dispatch_raw_source_until_block(sd_event_source *event, in dispatch_raw_source_until_block() argument
[all …]
/systemd-251/test/fuzz/fuzz-udev-rules/
D60-persistent-input.rules28 …NEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK…
29event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfa…
31 SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumb…
32 SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}"
37 ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH…
39 SUBSYSTEMS=="usb|platform", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \
40 SYMLINK+="input/by-path/$env{ID_PATH}-event"
/systemd-251/src/libsystemd/sd-event/
Dsd-event.c441 if (event_pid_changed(s->event)) in source_io_unregister()
447 if (epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL) < 0) in source_io_unregister()
468 if (epoll_ctl(s->event->epoll_fd, in source_io_register()
482 if (event_pid_changed(s->event)) in source_child_pidfd_unregister()
489 if (epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->child.pidfd, NULL) < 0) in source_child_pidfd_unregister()
507 if (epoll_ctl(s->event->epoll_fd, in source_child_pidfd_register()
770 prioq_reshuffle(s->event->pending, s, &s->pending_index); in event_source_pp_prioq_reshuffle()
773 prioq_reshuffle(s->event->prepare, s, &s->prepare_index); in event_source_pp_prioq_reshuffle()
786 d = &s->event->monotonic; in event_source_time_prioq_reshuffle()
788 assert_se(d = event_get_clock_data(s->event, s->type)); in event_source_time_prioq_reshuffle()
[all …]
/systemd-251/rules.d/
D60-persistent-input.rules28 …NEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK…
29event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfa…
31 SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumb…
32 SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}"
37 ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH…
39 SUBSYSTEMS=="usb|platform|i2c", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \
40 SYMLINK+="input/by-path/$env{ID_PATH}-event"
/systemd-251/src/home/
Dhomed-manager.c74 static int on_home_inotify(sd_event_source *s, const struct inotify_event *event, void *userdata);
107 r = sd_event_add_inotify(m->event, &m->inotify_event_source, get_home_root(), in manager_watch_home()
119 static int on_home_inotify(sd_event_source *s, const struct inotify_event *event, void *userdata) { in on_home_inotify() argument
125 assert(event); in on_home_inotify()
127 … if ((event->mask & (IN_Q_OVERFLOW|IN_MOVE_SELF|IN_DELETE_SELF|IN_IGNORED|IN_UNMOUNT)) != 0) { in on_home_inotify()
129 if (FLAGS_SET(event->mask, IN_Q_OVERFLOW)) in on_home_inotify()
131 else if (FLAGS_SET(event->mask, IN_MOVE_SELF)) in on_home_inotify()
133 else if (FLAGS_SET(event->mask, IN_DELETE_SELF)) in on_home_inotify()
135 else if (FLAGS_SET(event->mask, IN_UNMOUNT)) in on_home_inotify()
137 else if (FLAGS_SET(event->mask, IN_IGNORED)) in on_home_inotify()
[all …]
/systemd-251/src/portable/
Dportabled.c34 r = sd_event_default(&m->event); in manager_new()
38 r = sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL); in manager_new()
42 r = sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL); in manager_new()
46 (void) sd_event_set_watchdog(m->event, true); in manager_new()
62 sd_event_unref(m->event); in manager_unref()
89 r = sd_bus_attach_event(m->bus, m->event, 0); in manager_connect_bus()
120 m->event, in manager_run()
/systemd-251/src/libsystemd/sd-bus/
Dtest-bus-watch-bind.c90 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in thread_server()
96 assert_se(sd_event_new(&event) >= 0); in thread_server()
109 assert_se(sd_bus_attach_event(bus, event, 0) >= 0); in thread_server()
115 assert_se(sd_event_loop(event) >= 0); in thread_server()
117 assert_se(sd_event_get_exit_code(event, &code) >= 0); in thread_server()
160 _cleanup_(sd_event_unrefp) sd_event *event = NULL; in thread_client2()
165 assert_se(sd_event_new(&event) >= 0); in thread_client2()
172 assert_se(sd_bus_attach_event(bus, event, 0) >= 0); in thread_client2()
177 assert_se(sd_event_loop(event) >= 0); in thread_client2()

1234567891011