Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | tree-wide: port to fd_wait_for_event() | Lennart Poettering | 2020-06-10 | 1 | -13/+6 | |
| | | | | | | | | Prompted by the discussion on #16110, let's migrate more code to fd_wait_for_event(). This only leaves 7 places where we call into poll()/poll() directly in our entire codebase. (one of which is fd_wait_for_event() itself) | |||||
* | tree-wide: check POLLNVAL everywhere | Lennart Poettering | 2020-06-10 | 1 | -1/+4 | |
| | | | | | | | | | | | | | poll() sets POLLNVAL inside of the poll structures if an invalid fd is passed. So far we generally didn't check for that, thus not taking notice of the error. Given that this specific kind of error is generally indication of a programming error, and given that our code is embedded into our projects via NSS or because people link against our library, let's explicitly check for this and convert it to EBADF. (I ran into a busy loop because of this missing check when some of my test code accidentally closed an fd it shouldn't close, so this is a real thing) | |||||
* | tree-wide: fix spelling errors | Frantisek Sumsal | 2020-04-21 | 1 | -1/+1 | |
| | | | | | | Based on a report from Fossies.org using Codespell. Followup to #15436 | |||||
* | tree-wide: drop string.h when string-util.h or friends are included | Yu Watanabe | 2019-11-04 | 1 | -1/+0 | |
| | ||||||
* | tree-wide: drop missing.h | Yu Watanabe | 2019-10-31 | 1 | -1/+0 | |
| | ||||||
* | libudev: Update list of possible actions | Bastien Nocera | 2019-07-24 | 1 | -2/+2 | |
| | | | | Add "move" action as per src/libsystemd/sd-device/device-private.c | |||||
* | libudev: hide definition of struct udev_device | Yu Watanabe | 2019-06-12 | 3 | -32/+41 | |
| | ||||||
* | libudev: rescan devices when filter is updated | Yu Watanabe | 2019-06-12 | 1 | -9/+73 | |
| | | | | Fixes #12776. | |||||
* | libudev: re-implement libudev-list with LIST and hashmap | Yu Watanabe | 2019-06-12 | 1 | -193/+105 | |
| | ||||||
* | libudev: hide definition of struct udev_list from other libudev components | Yu Watanabe | 2019-06-12 | 6 | -55/+101 | |
| | | | | | In the later commit, udev_list will be just a wrapper of hashmap or LIST. So, allocating udev_list does not increase much cost. | |||||
* | libudev: drop unused variable | Yu Watanabe | 2019-06-12 | 1 | -1/+0 | |
| | ||||||
* | codespell: fix spelling errors | Ben Boeckel | 2019-04-29 | 1 | -1/+1 | |
| | ||||||
* | util: split out memcmp()/memset() related calls into memory-util.[ch] | Lennart Poettering | 2019-03-13 | 1 | -1/+1 | |
| | | | | Just some source rearranging. | |||||
* | libudev: use device_get_seqnum() and device_get_action() | Yu Watanabe | 2019-03-12 | 1 | -20/+7 | |
| | ||||||
* | basic/utf8: do not read past end of string when looking for a multi-byte ↵ | Zbigniew Jędrzejewski-Szmek | 2019-02-26 | 1 | -1/+1 | |
| | | | | | | character Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9341. | |||||
* | sd-device-enumerator: support multiple parents | Yu Watanabe | 2019-01-23 | 1 | -3/+0 | |
| | | | | | | | | | | | When sd_device_enumerator_add_match_parent() is called multiple times, then previously set parents are discarded. This adds device_enumerator_add_match_parent_incremental() to make sd-device-enumerator scan devices under all specified parents. Note that for backward compatibility, sd_device_enumerator_add_match_parent() and udev_enumerate_add_match_parent() still discard previous assignments. | |||||
* | Remove 'inline' attributes from static functions in .c files (#11426) | Topi Miettinen | 2019-01-15 | 1 | -1/+1 | |
| | | | Let the compiler perform inlining (see #11397). | |||||
* | libudev-util: make util_replace_whitespace() read only len characters | Yu Watanabe | 2019-01-03 | 1 | -6/+7 | |
| | | | | | | This effectively reverts df8ba4fa0e8be1ff7899d08a4b6be0196c8405a0. Fixes #11264. | |||||
* | meson: simplify handling of pkgconfigdatadir=no, pkgconfiglibdir=no | Zbigniew Jędrzejewski-Szmek | 2018-12-21 | 1 | -4/+3 | |
| | | | | | | | | | | | The idea was that those vars could be configured to 'no' to not install the .pc files, or they could be set to '', and then they would be built but not installed. This was inherited from the autoconf build system. This couldn't work because '' is replaced by the default value. Also, having this level of control doesn't seem necessary, since creating those files is very quick. Skipping with 'no' was implemented only for systemd.pc and not the other .pc files. Let's simplify things and skip installation if the target dir is configured as 'no' for all .pc files. | |||||
* | meson: define PROJECT_VERSION as the "bare" project version | Zbigniew Jędrzejewski-Szmek | 2018-12-20 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | Let's not use atoi() if we can simply provide the project version as a number. In C code, this is the numerical project version. In substitutions in other files, this is just the bare substitution. The "PACKAGE_" prefix is from autotools, and is strange. We call systemd a "project", and "package" is something that distros build. Let's rename. PACKAGE_URL is renamed to PROJECT_URL for the same reasons and for consistency. (This leave PACKAGE_VERSION as the stringified define for C code.) | |||||
* | libudev: drop unnecessary check | Zbigniew Jędrzejewski-Szmek | 2018-11-23 | 1 | -2/+0 | |
| | | | | sd_device_get_subsystem returns -ENOENT if subsystem is not set. | |||||
* | libudev: do not ignore error in udev_list_entry_add() | Yu Watanabe | 2018-11-22 | 2 | -5/+10 | |
| | ||||||
* | libudev: introduce return_with_errno() and use it where applicable | Yu Watanabe | 2018-11-22 | 6 | -160/+88 | |
| | ||||||
* | libudev-list: drop unused udev argument from udev_list_init() | Yu Watanabe | 2018-11-22 | 5 | -10/+8 | |
| | ||||||
* | libudev-list: drop unused private functions | Yu Watanabe | 2018-11-22 | 2 | -14/+0 | |
| | ||||||
* | libudev: make util_resolve_subsys_kernel() return negative errno | Yu Watanabe | 2018-11-21 | 2 | -30/+27 | |
| | | | | This also replaces udev_device by sd_device in the function. | |||||
* | libudev-util: make util_replace_whitespace() not count leading white spaces | Yu Watanabe | 2018-11-21 | 1 | -20/+17 | |
| | ||||||
* | libudev-util: make util_replace_*() return size_t | Yu Watanabe | 2018-11-21 | 2 | -6/+5 | |
| | ||||||
* | libudev-util: add assertions | Yu Watanabe | 2018-11-21 | 1 | -0/+8 | |
| | ||||||
* | libudev: coding style fixes | Yu Watanabe | 2018-11-20 | 5 | -17/+17 | |
| | ||||||
* | libudev-list: move libudev-list related definitions to libudev-list-internal.h | Yu Watanabe | 2018-11-20 | 12 | -126/+90 | |
| | | | | | This also rename libudev-private.h to libudev-util.h, and cleanups several unnecessary headers from udev.h and libudev-util.h | |||||
* | libudev: drop prototypes for nonexistent functions | Yu Watanabe | 2018-11-20 | 1 | -2/+0 | |
| | ||||||
* | libudev-monitor: drop unused private functions | Yu Watanabe | 2018-11-20 | 2 | -63/+25 | |
| | ||||||
* | libudev-device: drop unused private functions | Yu Watanabe | 2018-11-20 | 3 | -410/+0 | |
| | ||||||
* | udev: move definition of READ_END and WRITE_END from libudev-private.h to udev.h | Yu Watanabe | 2018-11-20 | 1 | -3/+0 | |
| | ||||||
* | tree-wide: use __ prefixed gcc attributes (#10843) | Lennart Poettering | 2018-11-20 | 1 | -8/+8 | |
| | | | | | | | | | | As suggest here: https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax "You may optionally specify attribute names with ‘__’ preceding and following the name. This allows you to use them in header files without being concerned about a possible macro of the same name. For example, you may use the attribute name __noreturn__ instead of noreturn. " | |||||
* | udev: drop util_log_priority() and use log_level_from_string() | Yu Watanabe | 2018-11-12 | 2 | -17/+0 | |
| | | | | | | The function util_log_priority() is almost same as log_level_from_string(). The difference between them is only that util_log_priority() accepts such that '3 hogehoge'. | |||||
* | libudev: conserve previous behavior | Yu Watanabe | 2018-11-12 | 1 | -0/+2 | |
| | | | | | | | | | The commit dcfbde3a43d632ff6e286c77e1081087eca59d8e changes sd_device_get_ifindex() returns -ENOENT instead of zero if the device does not have ifindex. Let's keep the original behavior of udev_device_get_ifindex(). Fixes #10699. | |||||
* | sd-device: make sd_device_get_is_initialized() returns is_initialized by ↵ | Yu Watanabe | 2018-10-29 | 1 | -3/+3 | |
| | | | | return value | |||||
* | tree-wide: replace 'unsigned int' with 'unsigned' | Yu Watanabe | 2018-10-19 | 4 | -8/+8 | |
| | ||||||
* | libudev: re-implement udev-monitor by sd_device_monitor | Yu Watanabe | 2018-10-17 | 2 | -561/+41 | |
| | ||||||
* | tree-wide: add a single version of "static const int one = 1" | Lennart Poettering | 2018-10-15 | 1 | -2/+1 | |
| | | | | | | | | | | All over the place we define local variables for the various sockopts that take a bool-like "int" value. Sometimes they are const, sometimes static, sometimes both, sometimes neither. Let's clean this up, introduce a common const variable "const_int_one" (as well as one matching "const_int_zero") and use it everywhere, all acorss the codebase. | |||||
* | sd-device: make sd_device_get_*() return -ENOENT if the values are not set | Yu Watanabe | 2018-09-23 | 1 | -3/+6 | |
| | ||||||
* | Merge pull request #9928 from yuwata/libudev-cleanups | Zbigniew Jędrzejewski-Szmek | 2018-09-15 | 10 | -722/+579 | |
|\ | | | | | libudev: coding style updates | |||||
| * | sd-device,libudev: make an argument for *_set_sysattr_value() const | Yu Watanabe | 2018-09-11 | 2 | -2/+2 | |
| | | ||||||
| * | libudev-monitor: use assert_return() in many places | Yu Watanabe | 2018-09-11 | 1 | -14/+13 | |
| | | ||||||
| * | libudev-monitor: add missing error checks in udev_monitor_enable_receiving() | Yu Watanabe | 2018-09-11 | 1 | -15/+16 | |
| | | ||||||
| * | libudev-monitor: introduce udev_monitor_send_sd_device() | Yu Watanabe | 2018-09-11 | 1 | -22/+40 | |
| | | | | | | | | And use it in udev_monitor_send_device(). | |||||
| * | libudev-monitor: re-implement udev_monitor_receive_sd_device() | Yu Watanabe | 2018-09-11 | 1 | -125/+118 | |
| | | ||||||
| * | libudev-monitor: use Hashmap or Set to store filters | Yu Watanabe | 2018-09-11 | 1 | -76/+114 | |
| | |