Commit Graph

37 Commits

Author SHA1 Message Date
illiliti 8a4b5b582c udev_monitor.c: bitmask is unsigned 2021-08-29 04:55:14 +03:00
illiliti fc22990609 implement file-less hotplugging 2021-08-27 01:13:34 +00:00
illiliti 3d98bea289 *: code cleanup 2021-08-25 01:38:33 +03:00
Naoto Yamaguchi 75a40e1040 Add license information to source files
Current libudev-zero source code doesn't have license information in source files.
This patch add license information to source files based on SPDX standard.
2021-06-05 07:38:25 +00:00
illiliti ed6c3e5c2d udev_monitor.c: check UDEV_MONITOR_DIR only for existence
Fixes #30
2021-06-04 20:15:45 +03:00
illiliti 23e9b6f8f4 udev_monitor.c: drip sticky bit for now 2021-06-04 00:35:15 +03:00
illiliti 4623040b6c udev_monitor.c: free resources before return 2021-06-03 11:53:29 +03:00
illiliti 496291c8dd udev_monitor.c: add a way to control UDEV_MONITOR_DIR at runtime 2021-06-03 10:38:40 +03:00
illiliti c9b824bd54 udev_monitor.c: skip inotify event if directory 2021-06-03 09:41:26 +03:00
illiliti fb44266bfd udev_monitor.c: check poll error early 2021-06-03 09:37:13 +03:00
illiliti 37e5fa7206 udev_monitor.c: inotify read of size 0 is impossible 2021-06-03 09:30:46 +03:00
illiliti 32f9d14551 udev_monitor.c: fix bad return value in udev_monitor_enable_receiving 2021-06-03 09:24:55 +03:00
illiliti f4b2b9331e udev_monitor.c: fail if monitored file is not dir 2021-06-03 09:19:45 +03:00
illiliti 4a6b31b8f1 udev_monitor.c: remove no longer required fcntl.h include 2021-06-03 09:17:39 +03:00
illiliti e06dfcd22c udev_monitor.c: minor fixes 2021-06-01 17:23:32 +03:00
Arthur Williams 03c53bc1c3 Removed THREAD_MAX and the barrier and pfd fields from udev_monitor
We can fix THREAD_MAX at one since we don't gain much by having multiple
threads. All the threads did were translate inotify events. We also
no longer need pfd and the barrier fields of udev_monitor since we don't
need to signal the single thread or guard against any races.
2021-06-01 03:12:11 +00:00
Arthur Williams af98e237cb Remove epoll dependency
Instead of using the Linux-specific epoll, we can use the
more portable poll.
2021-06-01 03:12:11 +00:00
illiliti f44332df5a various: drop udev_* prefix from static functions 2021-05-26 17:55:29 +03:00
illiliti f2083f0e47 udev_monitor.c: block signals within event loop
Fixes #23
Closes #24
2021-05-25 08:36:56 +03:00
illiliti 1aef09bf84 replace unstable pthread_cancel() with self-pipe trick. fixes #16 2021-02-05 05:44:47 +03:00
illiliti b90b0acc88 general code cleanup 2021-01-20 08:58:19 +03:00
illiliti be97914ade move not implemented comment to the same line of function for easier parsability 2020-09-16 21:51:08 +03:00
illiliti fd64152df9 prevent format string exploit 2020-09-15 02:38:57 +03:00
illiliti 662062604e check IN_IGNORED 2020-08-19 22:51:27 +03:00
illiliti d6e774460d simplify using barrier 2020-08-19 18:09:47 +03:00
illiliti 25a9dd70b0 replace self-pipe trick with conditional variable 2020-08-19 13:17:10 +03:00
illiliti b53bb9eb82 add helper.c 2020-08-18 12:28:22 +03:00
illiliti b17173163f drop sizeof 2020-08-17 17:30:07 +03:00
illiliti f6afe3602b eliminate race conditions 2020-08-17 16:57:50 +03:00
illiliti f1388e805d create UDEV_MONITOR_DIR 2020-08-15 10:53:14 +03:00
illiliti f8c3526a63 move pthread_create to udev_device_enable_receiving 2020-08-15 07:56:36 +03:00
illiliti 3029436ea6 oops 2020-08-14 19:44:05 +03:00
illiliti 380e7f8890 implement hotplugging support 2020-08-14 19:33:18 +03:00
illiliti 8a946ad9e6 drop UDEV_EXPORT 2020-07-18 05:15:00 +03:00
illiliti 758ad07c26 change style 2020-07-17 21:36:59 +03:00
illiliti dbb13e9286 implement udev_enumerate_scan_devices, rewrite udev_device logic 2020-07-07 10:07:24 +03:00
illiliti 7a09bb0557 init 2020-07-04 09:25:16 +03:00