| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Test --help and --version output in more cases
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GIT_VERSION is not available as a config.h variable, because it's rendered
into version.h during builds. Let's rework jinja2 rendering to also
parse version.h. No functional change, the new variable is so far unused.
I guess this will make partial rebuilds a bit slower, but it's useful
to be able to use the full version string.
|
| |
| |
| |
| | |
Fixes https://github.com/systemd/systemd/commit/93e04eb43bed6cd1cea344f8fb1002b62155fae2#commitcomment-70387367.
|
| |
| |
| |
| | |
To make the test stabler.
|
| | |
|
|/
|
|
| |
To make debugging the test easier.
|
|
|
|
|
| |
sd_device_get_diskseq() actually called device_read_uevent_file() but
that function didn't actually parse DISKSEQ= so far. Fix that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
around after failing
This can be problematic especially when there's no more free disk
space. Consider the following:.
When disk space becomes sparse, writting to the system journal can lead to
error. In this case journald attempts to make room by rotating the journals,
which consists in archiving online journals and opening new ones.
However opening new files is likely to fail too and in this case
journal_file_open() leaves half initialized file around but in online
state. Then the error is propagated and journald switches into volatile mode.
Next time a new message is received by journald, it tries to open the
persistent system journal file to switch automatically back to persistent
mode.
When opening the system journal, journal_file_open(), called by
managed_journal_file_open_reliably(), finds the persistent system journal left
previously and assumes that it was uncleanly closed and considers it as
corrupted. The error is reported to managed_journal_file_open_reliably(), which
backs the file up and attempts to create a new system file, which fails and
leaves a corrupted system file again.
Since this is done for each message received by journald, /var/log/message can
be filled with backup files pretty quickly.
To prevent this, the patch makes sure to delete the newly created file in case
of error.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We usually open() device node obtained by sd_device_get_devname().
However, the device node corresponds to the sd-device object may be
already removed, and another device node with the same path may be
created, hence an unexpected device may be opened.
The sd_device_open() opens device node, and checks the devnum and
diskseq of opened devnum, to avoid the above possibility.
Prompted by https://github.com/systemd/systemd/issues/22906#issuecomment-1082736443.
|
| |
|
|
|
|
| |
and sd_device_new_from_path() which takes devname or syspath.
|
| |
|
| |
|
|
|
|
|
| |
Otherwise, if the sd-device object is created from e.g. syspath, then
sd_device_get_diskseq() returns -ENOENT.
|
|
|
|
| |
Follow-ups for 37cf83d9bfdd9f6859b6f2654d8ec3bbb17873b2.
|
|\
| |
| |
| |
| | |
keszybz/symlink-enablement-yet-again-punish-me-harder
Fixups to the unit enablement logic
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As suggested in
https://github.com/systemd/systemd/pull/22649/commits/8b3ad3983f5440eef812b34e5ed862ca59fdf7f7#r837345892
The define is generalized and moved to path-lookup.h, where it seems to fit
better. This allows a recursive include to be removed and in general makes
things simpler.
|
| | |
|
|\ \
| | |
| | | |
time-util: assume CLOCK_BOOTTIME always exists
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work
with timerfd in kernel 3.15 (i.e. back in 2014), let's require support
for it now.
This will raise our baseline only modestly from 3.13 → 3.15.
|
|/ / |
|
|\ \
| | |
| | | |
journald: don't let SIGTERM starve indefinitely
|
| | |
| | |
| | |
| | |
| | | |
The event loop is already shutting down, hence no point in using it
anymore, it's not going to run any further iteration.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
Just some modernization/refactoring.
No change in behaviour, just let's do how we do things these days: use
flags param instead of list of bools.
|
| |
| |
| |
| |
| | |
This also makes the macro check if the event is actually in the buffer,
and if it is not, then log about that and finish the loop.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
Same idea as 03677889f0ef42cdc534bf3b31265a054b20a354.
No functional change intended. The type of the iterator is generally changed to
be 'const char*' instead of 'char*'. Despite the type commonly used, modifying
the string was not allowed.
I adjusted the naming of some short variables for clarity and reduced the scope
of some variable declarations in code that was being touched anyway.
|
|\
| |
| | |
Assorted cleanups
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When sorting paths it actually matters to use the right comparison
function. Example:
```
a/x
a-b/y
a_/z
```
I think people would probably expect this:
```
a/x
a-b/y
a_a/z
```
but if you use strcmp() instead of path_compare() you'd instead get:
```
a-b/y
a/x
a_a/z
```
That's because `/` is between `-` and `a` in the ascii table. I think
that's quite confusing, and we shouldn#t order that way hence.
As discussed: https://github.com/systemd/systemd/pull/22662#discussion_r831174776
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This addresses the comment by Lennart
https://github.com/systemd/systemd/pull/22662#discussion_r829799863:
> /sys/subsystem is preparation for a future that never came.
> And given that the main proponent of this left Linux kernel
> development (Kay), I doubt this will ever come. So maybe we
> should start dropping references to /sys/subsystem/ given it's
> unlikely to materialize anytime soon.
|
| |
| |
| |
| |
| | |
If a subsystem is specified, then matching devices and their parents are
listed at first.
|
| |
| |
| |
| |
| |
| |
| | |
and devices are sorted when the iteration started.
Previously, devices added by udev_enumerate_add_syspath() ->
device_enumerator_add_device() are not sorted. This fixes the issue.
|
| |
| |
| |
| | |
function
|
|/
|
|
| |
devpath_is_late_block() helper functions
|
|
|
|
|
|
|
|
|
|
| |
We shouldn't auto-disable event sources we create in "floating" mode.
Hence don#t use the disabling destructor for event sources.
Given that noone else has access to this event source we just allocated
anyway there's no point in explicitly disabling it before freeing it.
Follow-up for ec75e8e07a0ad972e0c40e0a187e15a8d4fb3d66
|
|
|
|
|
|
|
|
|
|
| |
We so far had some magic logic in place that files we open for write
with size zero are freshly created. That of course is a bogus
assumption, in particular as this code deals with corrupted file systems
which oftentimes contain zero size inodes from left-over runs.
Let's fix this properly, and actually let the kernel tell us whether it
create the file or not.
|
| |
|
|\
| |
| | |
tree-wide: declare iterator of LIST_FOREACH() in the loop
|
| |
| |
| |
| | |
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
changes
We basically had the same code in three places. Let's unify it in a
common helper function.
event_add_time_change() might be something we should add to the official
sd-event API sooner or later, given its general usefulness.
|