| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://tools.ietf.org/html/draft-knodel-terminology-02
https://lwn.net/Articles/823224/
This gets rid of most but not occasions of these loaded terms:
1. scsi_id and friends are something that is supposed to be removed from
our tree (see #7594)
2. The test suite defines an API used by the ubuntu CI. We can remove
this too later, but this needs to be done in sync with the ubuntu CI.
3. In some cases the terms are part of APIs we call or where we expose
concepts the kernel names the way it names them. (In particular all
remaining uses of the word "slave" in our codebase are like this,
it's used by the POSIX PTY layer, by the network subsystem, the mount
API and the block device subsystem). Getting rid of the term in these
contexts would mean doing some major fixes of the kernel ABI first.
Regarding the replacements: when whitelist/blacklist is used as noun we
replace with with allow list/deny list, and when used as verb with
allow-list/deny-list.
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Based on a report from Fossies.org using Codespell.
Followup to #15436
|
| |
|
| |
|
|
|
|
| |
Add "move" action as per src/libsystemd/sd-device/device-private.c
|
| |
|
|
|
|
| |
Fixes #12776.
|
| |
|
|
|
|
|
| |
In the later commit, udev_list will be just a wrapper of hashmap or LIST.
So, allocating udev_list does not increase much cost.
|
| |
|
| |
|
|
|
|
| |
Just some source rearranging.
|
| |
|
|
|
|
|
|
| |
character
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9341.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Let the compiler perform inlining (see #11397).
|
|
|
|
|
|
| |
This effectively reverts df8ba4fa0e8be1ff7899d08a4b6be0196c8405a0.
Fixes #11264.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
sd_device_get_subsystem returns -ENOENT if subsystem is not set.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This also replaces udev_device by sd_device in the function.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This also rename libudev-private.h to libudev-util.h, and cleanups
several unnecessary headers from udev.h and libudev-util.h
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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. "
|
|
|
|
|
|
| |
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'.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
return value
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
libudev: coding style updates
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
And use it in udev_monitor_send_device().
|
| | |
|