| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
We use it for more than just pipe() arrays. For example also for
socketpair(). Hence let's give it a generic name.
Also add EBADF_TRIPLET to mirror this for things like
stdin/stdout/stderr arrays, which we use a bunch of times.
|
| |
|
|
|
|
|
|
|
|
|
| |
This is preparation for #28891, which adds a bunch more helpers around
"struct iovec", at which point this really deserves its own .c/.h file.
The idea is that we sooner or later can consider "struct iovec" as an
entirely generic mechanism to reference some binary blob, and is the
go-to type for this purpose whenever we need one.
|
|
|
|
|
|
|
|
|
|
| |
Make sure we don't log anything when running in "fuzzing" mode. Also,
when at it, unify the setup logic into a helper, pretty similar to
the test_setup_logging() one.
Addresses:
- https://github.com/systemd/systemd/pull/29558#pullrequestreview-1676060607
- https://github.com/systemd/systemd/pull/29558#discussion_r1358940663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows distros to install configuration file templates in /usr/lib/systemd
for example.
Currently we install "empty" config files in /etc/systemd/. They serve two
purposes:
- The file contains commented-out values that show the default settings.
- It is easier to edit the right file if it is already there, the user doesn't
have to type in the path correctly, and the basic file structure is already in
place so it's easier to edit.
Things that have happened since this approach was put in place:
- We started supporting drop-ins for config files, and drop-ins are the
recommended way to create local configuration overrides.
- We have systemd-analyze cat-config which takes care of iterating over
all possible locations (/etc, /run, /usr, /usr/local) and figuring out
the right file.
- Because of the first two points, systemd-analyze cat-config is much better,
because it takes care of finding all the drop-ins and figuring out the
precedence. Looking at files manually is still possible of course, but not
very convenient.
The disadvantages of the current approach with "empty" files in /etc:
- We clutter up /etc so it's harder to see what the local configuration actually is.
- If a user edits the file, package updates will not override the file (e.g.
systemd.rpm uses %config(noreplace). This means that the "documented defaults"
will become stale over time, if the user ever edits the main config file.
Thus, I think that it's reasonable to:
- Install the main config file to /usr/lib so that it serves as reference for
syntax and option names and default values and is properly updated on package
upgrades.
- Recommend to users to always use drop-ins for configuration and
systemd-analyze cat-config to view the documentation.
This setting makes this change opt-in.
Fixes #18420.
[zjs: add more text to the description]
|
|\
| |
| | |
config files: update their header to reflect that they can be install…
|
| |
| |
| |
| | |
Follow-up for c76f2fb0e59340222ce21f85c17d384c114db9de.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Let's support the same filtering options that we also support in
udevadm trigger in udevadm info to filter the devices produced by
--export-db.
One difference is that all properties specified by --propery-match=
have to be satisfied in udevadm info unlike udevadm trigger where just
one of them has to be satisfied.
|
| |
| |
| |
| |
| | |
This allows getting the udevadm info --export-db and query "all" output
as JSON.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
systemd's own cgroup hierarchy is special to us, we use it to actually
manage processes. Because of that many calls tha apply to cgroups are
only ever called with the SYSTEMD_CGROUP_CONTROLLER as controller
argument. Let's hence remove the argument altogether.
This in particular touches the kill and xattr routines.
This changes no behaviour, we just drop an argument that is always set
to the same value anyway.
This is preparation to eventually getting rid of the cgroupvs1, because
on cgroupvs2 the cgroup paths do not change for different controllers,
there's only a single hierarchy there.
|
|\ \
| | |
| | |
| | |
| | | |
yuwata/journal-decouple-journald-and-journal-remote
journal: drop ManagedJournalFile and decouple journald and journal-remote
|
| | |
| | |
| | |
| | |
| | | |
Let's drop dependency to libjournal_core and libudevd_core from
test-tables.
|
|/ /
| |
| |
| |
| | |
this was found when trying to use __builtin_assume() with clang:
https://github.com/systemd/systemd/pull/29409#issuecomment-1743575402
|
|\ \
| | |
| | | |
Make unit mangling follow paths
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
path_simplify_full()/path_simplify() are changed to allow a NULL path, for
which a NULL is returned. Generally, callers have already asserted before that
the argument is nonnull. This way path_simplify_full()/path_simplify() and
path_simplify_alloc() behave consistently.
In sd-device.c, logging in device_set_syspath() is intentionally dropped: other
branches don't log.
In mount-tool.c, logging in parse_argv() is changed to log the user-specified
value, not the simplified string. In an error message, we should show the
actual argument we got, not some transformed version.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We might need a lot of fds on large systems, hence raise RLIMIT_NOFILE
to what the service manager allows us, which is quite a lot these days.
udev already sets FORK_RLIMIT_NOFILE_SAFE when forking of chilren, thus
ensuring that forked off processes get their RLIMIT_NOFILE soft limit
reset to 1K for compat with crappy old select().
Replaces: #29298
Fixes: #28583
|
|/ |
|
| |
|
|
|
|
|
| |
Also drop do_poll as the use case is covered
by timeout.
|
|
|
|
|
| |
Otherwise, we get redefinition errors if <net/if.h> is included later
on by another header.
|
| |
|
|
|
|
|
| |
Addresses the post-merge comment
https://github.com/systemd/systemd/pull/28623#pullrequestreview-1571307466.
|
| |
|
|
|
|
|
| |
Obtaining a component from syspath is a common pattern. Let's split out
the pattern. No functional change, just refactoring.
|
|
|
|
|
| |
The pattern is common in many naming scheme. Let's split out the
pattern. No functional change, just refactoring.
|
|
|
|
|
|
| |
Follow-up for 28141620d963c0c490d409d6ec6ff5f143357124.
Addresses post-merge review in #28269.
|
|
|
|
|
|
| |
All other command line parsers takes flags. Let's make
proc_cmdline_get_bool() also take flags. Though, currently,
no flag is set by the caller.
|
|
|
|
|
|
| |
The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'.
Let's replace it with install_emptydir() builtin function and
inline meson call.
|
|
|
|
| |
In that case, the maximum is calculated based on the system resources.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This partially revert 0454cf05d38d289474ca65c1917d414b2958f6b5.
The executable actually does not work with itself, but needs to be
combined with test-udev.py. But, even so, the executable is for testing.
In the next commit, test and normal executables are declared in the same
way, and naming of the executable becomes essential to classify them.
Let's rename the executable and prefix with 'test-'.
|
| |
|
|
|
|
|
| |
The condition is used at several places. Let's introduce a simple flag
for that.
|
|\
| |
| | |
udev: several cleanups for net_id builtin (part 4)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
properties
Previously, we first generate names based on the PCI slot and ACPI
onboard index, and then append an identifier based on USB or BCMA bus
if it exists in between the PCI bus and the interface.
However, if there exists USB or BCMA bus, the name based on the
ACPI onboard index is not used.
So, let's invert the order; first generate USB or BCMA identifier if the
bus exists, then prepend the name with the PCI slot identifier.
With this change, we can drop Names struct, and each naming logic
becomes self-consistent.
|
| |
| |
| |
| |
| |
| | |
Then call it only when it is necessary. The label is used only when the
interface is directly connected to the PCI bus, and it does not have the
SR-IOV feature (or the naming based on SR-IOV is disabled).
|
| |
| |
| |
| |
| |
| |
| | |
Then, this makes names based on the BCMA and PCI identifiers in
names_bcma().
No functional change, just refactoring.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This contains redundant copy of BCMA identifier, but that will be
dropped in the next commit.
No functional change, just refactoring and preparation for later
commits.
|
| |
| |
| |
| |
| |
| |
| | |
This makes the names based on the USB identifier (and possibly with PCI
specifier) built in names_usb()
No functional change, just refactoring.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This contains redundant copy of USB identifier, but that will be
dropped in the next commit.
No functional change, just refactoring and preparation for later
commits.
|
|\ \
| |/
|/| |
meson: use template to declare executables (part 5)
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Then, we can drop LinkInfo struct.
No functional change, just refactoring.
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This also changes the onboard index type to unsigned, as it is at most
2^16 - 1. Hence, unsigned is enough.
Then, we can use device_get_sysattr_unsigned() helper function.
This also drops mostly redundant debugging logs. The index will be
logged later anyway.
|
|
|
|
|
|
| |
Then, we can replace multiple strpcpyf() with single snprintf_ok().
No functional change, just refactoring.
|