Home
last modified time | relevance | path

Searched refs:inotify_fd (Results 1 – 17 of 17) sorted by relevance

/systemd-251/src/udev/
Dudev-watch.c22 int udev_watch_restore(int inotify_fd) { in udev_watch_restore() argument
28 assert(inotify_fd >= 0); in udev_watch_restore()
65 (void) udev_watch_begin(inotify_fd, dev); in udev_watch_restore()
76 int udev_watch_begin(int inotify_fd, sd_device *dev) { in udev_watch_begin() argument
80 assert(inotify_fd >= 0); in udev_watch_begin()
88 wd = inotify_add_watch(inotify_fd, devnode, IN_CLOSE_WRITE); in udev_watch_begin()
134 (void) inotify_rm_watch(inotify_fd, wd); in udev_watch_begin()
139 int udev_watch_end(int inotify_fd, sd_device *dev) { in udev_watch_end() argument
145 if (inotify_fd < 0) in udev_watch_end()
156 (void) inotify_rm_watch(inotify_fd, wd); in udev_watch_end()
Dudev-watch.h6 int udev_watch_restore(int inotify_fd);
7 int udev_watch_begin(int inotify_fd, sd_device *dev);
8 int udev_watch_end(int inotify_fd, sd_device *dev);
Dudev-event.h73 int inotify_fd,
79 int udev_event_process_inotify_watch(UdevEvent *event, int inotify_fd);
Dudev-event.c987 int inotify_fd, in event_execute_rules_on_remove() argument
1008 (void) udev_watch_end(inotify_fd, dev); in event_execute_rules_on_remove()
1049 int inotify_fd, /* This may be negative */ in udev_event_execute_rules() argument
1069 …return event_execute_rules_on_remove(event, inotify_fd, timeout_usec, timeout_signal, properties_l… in udev_event_execute_rules()
1072 (void) udev_watch_end(inotify_fd, event->dev); in udev_event_execute_rules()
1154 int udev_event_process_inotify_watch(UdevEvent *event, int inotify_fd) { in udev_event_process_inotify_watch() argument
1158 assert(inotify_fd >= 0); in udev_event_process_inotify_watch()
1168 (void) udev_watch_begin(inotify_fd, dev); in udev_event_process_inotify_watch()
1170 (void) udev_watch_end(inotify_fd, dev); in udev_event_process_inotify_watch()
Dudevd.c107 int inotify_fd; member
252 safe_close(manager->inotify_fd); in manager_free()
330 manager->inotify_fd = safe_close(manager->inotify_fd); in manager_exit()
610 manager->inotify_fd, in worker_process_device()
624 r = udev_event_process_inotify_watch(udev_event, manager->inotify_fd); in worker_process_device()
1939 .inotify_fd = -1, in manager_new()
1992 manager->inotify_fd = inotify_init1(IN_CLOEXEC); in main_loop()
1993 if (manager->inotify_fd < 0) in main_loop()
1996 udev_watch_restore(manager->inotify_fd); in main_loop()
2037 …r = sd_event_add_io(manager->event, &manager->inotify_event, manager->inotify_fd, EPOLLIN, on_inot… in main_loop()
/systemd-251/src/timesync/
Dwait-sync.c26 int inotify_fd; member
41 sp->inotify_fd = safe_close(sp->inotify_fd); in clock_state_release()
47 …sp->run_systemd_timesync_wd = inotify_add_watch(sp->inotify_fd, "/run/systemd/timesync", IN_CREATE… in update_notify_run_systemd_timesync()
68 (void) inotify_rm_watch(sp->inotify_fd, sp->run_systemd_timesync_wd); in process_inotify_event()
181 .inotify_fd = -1, in run()
209 state.inotify_fd = r; in run()
211 r = sd_event_add_io(event, &state.inotify_event_source, state.inotify_fd, in run()
216 r = inotify_add_watch_and_warn(state.inotify_fd, "/run/systemd/", IN_CREATE); in run()
/systemd-251/src/core/
Dpath.c56 s->inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); in path_spec_watch()
57 if (s->inotify_fd < 0) { in path_spec_watch()
62 …r = sd_event_add_io(s->unit->manager->event, &s->event_source, s->inotify_fd, EPOLLIN, handler, s); in path_spec_watch()
97 wd = inotify_add_watch(s->inotify_fd, s->path, f); in path_spec_watch()
108 wd = inotify_add_watch_and_warn(s->inotify_fd, s->path, f); in path_spec_watch()
136 (void) inotify_add_watch(s->inotify_fd, s->path, IN_MOVE_SELF); in path_spec_watch()
171 s->inotify_fd = safe_close(s->inotify_fd); in path_spec_unwatch()
184 l = read(s->inotify_fd, &buffer, sizeof(buffer)); in path_spec_fd_event()
255 assert(s->inotify_fd == -1); in path_spec_done()
Dpath.h29 int inotify_fd; member
41 return s->inotify_fd == fd; in path_spec_owns_inotify_fd()
Ddbus-path.c116 s->inotify_fd = -1; in bus_path_set_transient_property()
Dservice.c3236 ps->inotify_fd = -1; in service_demand_pid_file()
Dload-fragment.c2241 s->inotify_fd = -1; in config_parse_path_spec()
/systemd-251/src/libsystemd/sd-bus/
Dbus-socket.c721 if (b->inotify_fd < 0) { in bus_socket_inotify_setup()
722 b->inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); in bus_socket_inotify_setup()
723 if (b->inotify_fd < 0) in bus_socket_inotify_setup()
726 b->inotify_fd = fd_move_above_stdio(b->inotify_fd); in bus_socket_inotify_setup()
749 wd = inotify_add_watch(b->inotify_fd, "/", IN_CREATE|IN_MOVED_TO); in bus_socket_inotify_setup()
796 …wd = inotify_add_watch(b->inotify_fd, prefix, IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB|IN_CREATE|IN_M… in bus_socket_inotify_setup()
866 (void) inotify_rm_watch(b->inotify_fd, b->inotify_watches[i]); in bus_socket_inotify_setup()
1336 assert(b->inotify_fd >= 0); in bus_socket_process_watch_bind()
1338 r = flush_fd(b->inotify_fd); in bus_socket_process_watch_bind()
Dsd-bus.c144 b->inotify_fd = safe_close(b->inotify_fd); in bus_close_inotify_fd()
244 .inotify_fd = -1, in sd_bus_new()
2499 if (bus->inotify_fd >= 0) in sd_bus_get_fd()
2500 return bus->inotify_fd; in sd_bus_get_fd()
3272 assert(bus->inotify_fd >= 0); in bus_poll()
3275 p[0].fd = bus->inotify_fd; in bus_poll()
3757 if (bus->inotify_fd < 0) in bus_attach_inotify_event()
3764 …r = sd_event_add_io(bus->event, &bus->inotify_event_source, bus->inotify_fd, EPOLLIN, io_callback,… in bus_attach_inotify_event()
3774 r = sd_event_source_set_io_fd(bus->inotify_event_source, bus->inotify_fd); in bus_attach_inotify_event()
Dbus-internal.h188 int inotify_fd; member
/systemd-251/src/libsystemd/sd-journal/
Dsd-journal.c1592 if (j->inotify_fd < 0) /* Not watching at all? */ in directory_watch()
1595 m->wd = inotify_add_watch_fd(j->inotify_fd, fd, mask); in directory_watch()
1606 (void) inotify_rm_watch(j->inotify_fd, m->wd); in directory_watch()
1811 if (j->inotify_fd >= 0) in remove_directory()
1812 (void) inotify_rm_watch(j->inotify_fd, d->wd); in remove_directory()
1875 if (j->inotify_fd < 0) { in allocate_inotify()
1876 j->inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); in allocate_inotify()
1877 if (j->inotify_fd < 0) in allocate_inotify()
1893 j->inotify_fd = -1; in journal_new()
2160 safe_close(j->inotify_fd); in sd_journal_close()
[all …]
Djournal-internal.h87 int inotify_fd; member
/systemd-251/src/home/
Dhomework-luks.c1967 _cleanup_close_ int inotify_fd = -1; in wait_for_devlink() local
1988 if (inotify_fd < 0) { in wait_for_devlink()
1990 inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); in wait_for_devlink()
1991 if (inotify_fd < 0) in wait_for_devlink()
2002 …if (inotify_add_watch(inotify_fd, dn, IN_CREATE|IN_MOVED_TO|IN_ONLYDIR|IN_DELETE_SELF|IN_MOVE_SELF… in wait_for_devlink()
2018 r = fd_wait_for_event(inotify_fd, POLLIN, usec_sub_unsigned(until, w)); in wait_for_devlink()
2022 (void) flush_fd(inotify_fd); in wait_for_devlink()