Zbigniew Jędrzejewski-Szmek [Wed, 23 Mar 2022 11:42:47 +0000 (12:42 +0100)]
Merge pull request #22836 from poettering/more-build-image-docs
docs: more tweaks for the image building docs
Lennart Poettering [Wed, 23 Mar 2022 11:02:43 +0000 (12:02 +0100)]
update TODO
Lennart Poettering [Wed, 23 Mar 2022 11:24:03 +0000 (12:24 +0100)]
docs: extend BUILDING_IMAGES with a section about IMAGE_ID=/IMAGE_VERSION=
Also, beef up links everywhere.
Lennart Poettering [Wed, 23 Mar 2022 11:04:28 +0000 (12:04 +0100)]
docs: link up new image building docs a bit
Lennart Poettering [Wed, 23 Mar 2022 11:02:00 +0000 (12:02 +0100)]
docs: make man page links in markdown Links section use teletype font, as we usually do
Lennart Poettering [Wed, 23 Mar 2022 10:39:31 +0000 (11:39 +0100)]
Merge pull request #22791 from keszybz/bootctl-invert-order
Invert order of entries w/o sort-key in sd-boot menu
Lennart Poettering [Wed, 23 Mar 2022 09:11:45 +0000 (10:11 +0100)]
Merge pull request #22629 from nishalkulkarni/oomd_service_result
core/oomd: Use oom-kill ServiceResult for oomd
Yu Watanabe [Wed, 23 Mar 2022 03:26:13 +0000 (12:26 +0900)]
sysupdate: fix error handling
Yu Watanabe [Wed, 23 Mar 2022 03:22:53 +0000 (12:22 +0900)]
NEWS: fix typo
Yu Watanabe [Wed, 23 Mar 2022 03:21:54 +0000 (12:21 +0900)]
boot: fix typo
Lennart Poettering [Tue, 22 Mar 2022 12:32:38 +0000 (13:32 +0100)]
fs-util: make sure openat_report_new() initializes return param also on shortcut
Our coding style dictates that return parameters should be initialized
always on success, hence do so here also in the shortcut codepath.
Issue discovered by @fbuihuu:
https://github.com/systemd/systemd/pull/22808/files/
ca8503f168d0632c606110da909aba3057777395#r831911069
Lennart Poettering [Tue, 22 Mar 2022 12:30:54 +0000 (13:30 +0100)]
fs-util: fix typos in comments
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 20:51:33 +0000 (21:51 +0100)]
meson: replace sh+find with an internal glob in the python helper
As suggested in https://github.com/systemd/systemd/pull/22810#discussion_r831708052
This makes the whole thing simpler. A glob is passed to helper which then resolves
it on its own. This way it's trivial to call the helper with a different
set of files for testing.
Yu Watanabe [Wed, 23 Mar 2022 02:34:46 +0000 (11:34 +0900)]
Merge pull request #22825 from keszybz/assorted-cleanups
Assorted cleanups
Luca Boccassi [Tue, 22 Mar 2022 23:03:23 +0000 (23:03 +0000)]
NEWS: adjust MONITOR_ env vars paragraph
This actually never shipped in a release, so it's not a backward-incompatible
change. Move it down and reword it.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 20:07:41 +0000 (21:07 +0100)]
NEWS: initial writeup for v251
Luca Boccassi [Tue, 22 Mar 2022 20:17:38 +0000 (20:17 +0000)]
Merge pull request #22821 from poettering/udev-tweaklets
Udev tweaklets
Lennart Poettering [Tue, 22 Mar 2022 10:00:11 +0000 (11:00 +0100)]
docs: add some docs about building OS images
It's not trivial to know what to reset how. Let's document this a bit.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 13:05:37 +0000 (14:05 +0100)]
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 13:02:47 +0000 (14:02 +0100)]
errno-to-awk: simplify expression
No functional change.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 09:43:03 +0000 (10:43 +0100)]
sd-bus: use _cleanup_ in one more place
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 09:10:39 +0000 (10:10 +0100)]
tools/dbus_exporter: deblackify and shorten code a bit
When we do mkdir, we should just use 0o777 and let the umask take care of the
rest. Specifying an explicit mode is inappropriate. And when touching the code,
let's replace black madness with normal python style.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 07:44:44 +0000 (08:44 +0100)]
man: clarify that options set the message fields and are not derived from them
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 12:57:28 +0000 (13:57 +0100)]
Merge pull request #22778 from poettering/kernel-install-layout-rework
kernel-install/bootctl: layout fixes
Nishal Kulkarni [Sun, 13 Mar 2022 19:11:11 +0000 (00:41 +0530)]
man: Mention systemd-oomd now follows OOMPolicy
Nishal Kulkarni [Mon, 14 Mar 2022 18:40:39 +0000 (00:10 +0530)]
test/oomd: Add test for new oomd_ooms xattr
Check if `user.oomd_ooms` xattr is being set as part of `oomd_cgroup_kill()`
this xattr tracks OOM kills that were initiated by systemd-oomd.
Nishal Kulkarni [Sun, 13 Mar 2022 19:05:18 +0000 (00:35 +0530)]
core/oomd: Use oom-kill ServiceResult for oomd
To notify user of kill events from systemd-oomd we now use
`SERVICE_FAILURE_OOM_KILL` as the failure result.
`unit_check_oomd_kill` now calls `notify_cgroup_oom` to
update the service result to `oom-kill`.
We add a new xattr `user.oomd_ooms` to keep track of the OOM kills
initiated by systemd-oomd, this helps us resolve a race between sending
SIGKILL to processes and checking for OOM kill status from the xattr.
Related to: #20649
Lennart Poettering [Tue, 22 Mar 2022 11:58:55 +0000 (12:58 +0100)]
sd-device: use path_compare() rather than strcmp() for sorting paths
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
Lennart Poettering [Tue, 22 Mar 2022 11:58:31 +0000 (12:58 +0100)]
sd-device: fix trivial typo
Lennart Poettering [Tue, 22 Mar 2022 11:56:32 +0000 (12:56 +0100)]
Merge pull request #22662 from yuwata/udev-trigger-priority
udevadm trigger: add --prioritized-subsystem option
Jason A. Donenfeld [Wed, 9 Mar 2022 16:10:05 +0000 (09:10 -0700)]
random-util: use correct minimum pool size constant
The actual minimum size of the pool across supported kernel versions is
32 bytes. So adjust this minimum.
I've audited every single usage of random_pool_size(), and cannot see
anywhere that this would have any impact at all on anything. We could
actually just not change the constant and everything would be fine, or
we could change it here and that's fine too. From both a functionality
and crypto perspective, it doesn't really seem to make a substantive
difference any which way, so long as the value is ≥32. However, it's
better to be correct and have the function do what it says, so clamp it
to the right minimum.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Mar 2022 07:26:57 +0000 (08:26 +0100)]
Merge pull request #22813 from poettering/sd-boot-man-fixes
man: some sd-boot doc tweaks
Danilo Krummrich [Mon, 14 Jun 2021 15:46:00 +0000 (17:46 +0200)]
udevadm: trigger: implement --initialized-match/nomatch arguments
systemd-udev-trigger.service by default triggeres all devices regardless
of whether they were already recognized by systemd-udevd.
There are machines (especially in embedded environments) where
systemd-udev-trigger.service is configured to run at a later stage of
the boot sequence, which can lead to quite a lot of devices being
triggered although they were already recognized by systemd-udevd.
Re-triggering a lot of devices is a relatively expensive operation and
therefore should be avoided if unnecessary.
Therefore this patch introduces --initialized-nomatch, which filters out
devices that are already present in the udev database. For consistance
reasons --initialized-match is implemented as well, which filters out devices
that are *not* already present in the udev database.
Replaces #19949.
Yu Watanabe [Tue, 8 Mar 2022 04:58:02 +0000 (13:58 +0900)]
sd-device-enumerator: support to list only initialized or uninitialized devices
Yu Watanabe [Mon, 7 Mar 2022 16:33:29 +0000 (01:33 +0900)]
unit: make systemd-udev-trigger.service use --prioritized-subsystem
Replaces #19637 and #22643.
Yu Watanabe [Fri, 4 Mar 2022 12:45:24 +0000 (21:45 +0900)]
udevadm trigger: introduce --type=all option
Yu Watanabe [Fri, 4 Mar 2022 15:23:13 +0000 (00:23 +0900)]
udevadm trigger: introduce --prioritized-subsystem option
Yu Watanabe [Fri, 4 Mar 2022 12:40:41 +0000 (21:40 +0900)]
sd-device-enumerator: introduce device_enumerator_scan_devices_and_subsystems()
Yu Watanabe [Sat, 19 Mar 2022 00:35:32 +0000 (09:35 +0900)]
sd-device-enumerator: drop /sys/subsystem support
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.
Yu Watanabe [Mon, 7 Mar 2022 16:20:42 +0000 (01:20 +0900)]
sd-device-enumerator: introduce device_enumerator_add_prioritized_subsystem()
If a subsystem is specified, then matching devices and their parents are
listed at first.
Yu Watanabe [Fri, 4 Mar 2022 13:40:49 +0000 (22:40 +0900)]
sd-device-enumerator: introduce device_enumerator_sort_devices()
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.
Yu Watanabe [Fri, 4 Mar 2022 12:09:26 +0000 (21:09 +0900)]
sd-device-enumerator: introduce device_enumerator_unref_devices() helper function
Yu Watanabe [Thu, 10 Mar 2022 10:08:04 +0000 (19:08 +0900)]
sd-device-enumerator: introduce sound_device_compare() and devpath_is_late_block() helper functions
Lennart Poettering [Thu, 17 Mar 2022 17:25:40 +0000 (18:25 +0100)]
kernel-install: check for /loader/entries.srel file as explicit marker for standards compliant /loader/entries directory
Lennart Poettering [Thu, 17 Mar 2022 17:19:57 +0000 (18:19 +0100)]
bootctl: automatically write out $BOOT/entries/standard.srel
Lennart Poettering [Thu, 17 Mar 2022 17:18:04 +0000 (18:18 +0100)]
bootctl: generalize open_tmpfile_linkable() use a bit
We want FILE* here, instead of a plain fd. Let's generalize this in
tmpfile-util.c, so we can reuse it later easily.
Lennart Poettering [Thu, 17 Mar 2022 17:35:53 +0000 (18:35 +0100)]
docs: add /loader/entries.srel to the boot loader spec
This new file is supposed to address conflicts with Fedora/Grub's
frankenbootloaderspec implementation, that squatted the /loader/entries/
dir, but place incompatible files in them (that do variable expansion?).
A simple text file /loader/entries.srel shall indicate which spec is
implemented. If it contains the string "type1\n" then the
/loader/entries/ directory implements our standard spec, otherwise
something else.
Lennart Poettering [Mon, 21 Mar 2022 23:21:36 +0000 (00:21 +0100)]
man: clarify that type #1 entries are also read from the XBOOTLDR partition
Lennart Poettering [Mon, 21 Mar 2022 23:19:32 +0000 (00:19 +0100)]
man: also install systemd-stub man page as sd-stub
So, typically systemd-boot is referenced as sd-boot, due to te usual
shorter naming in ESP resources. systemd-stub didnt do that so far,
since it never appears as separate files in the ESP. However it's super
annoying that you can find "man sd-boot", but not the very closely
related "man sd-stub". Let's fix that, and also add an "sd-stub" alias
to the "systemd-stub" man page.
Lennart Poettering [Mon, 21 Mar 2022 23:14:22 +0000 (00:14 +0100)]
man: clarify where the settings in type #1 entries are documented
So (maybe weirdly) loader.conf(5) documents both loader.conf and type #1
entries (because they share a similar syntax). But it then only lists
the options of loader.conf. Let's add an explicit hint where to find
the documentation of the type #1 entries.
Lennart Poettering [Mon, 21 Mar 2022 23:13:10 +0000 (00:13 +0100)]
man: clarify the format used by sd-boot config files
Lennart Poettering [Thu, 17 Mar 2022 16:50:23 +0000 (17:50 +0100)]
NEWS: try to fix old entry regarding KERNEL_INSTALL_LAYOUT
The old text was simply wrong, we used to read $layout from
/etc/kernel/install.conf and the machine ID from
$KERNEL_INSTALL_MACHINE_ID from /etc/machine-info. Correct that.
Apparently KERNEL_INSTALL_MACHINE_ID was already known back in v235
times, hence don't mention it anymore.
it's kinda weird retro-fixing these NEWS entries, given we deprecate
them again, but I couldn't let this really incorrect stuff be.
Lennart Poettering [Thu, 17 Mar 2022 16:20:07 +0000 (17:20 +0100)]
kernel-install: list fields we honour in /etc/kernel/install.conf
Lennart Poettering [Thu, 17 Mar 2022 16:16:32 +0000 (17:16 +0100)]
bootctl: load /etc/kernel/install.conf's $layout field, too
bootctl so far tried to determine the layout from /etc/machine-info, but
that's obsolete, and the kernel-install script never looked there. Let's
read the setting from /etc/kernel/install.conf instead, where
kernel-install actually looks.
Support for reading the field from /etc/machine-info is retained for
compat.
This means we'll now read /etc/machine-id, /etc/machine-info and
/etc/kernel/install.conf, and read the machine ID from the former too
and the layout setting from the latter two.
Lennart Poettering [Thu, 17 Mar 2022 15:56:52 +0000 (16:56 +0100)]
bootctl: $KERNEL_INSTALL_MACHINE_ID + $KERNEL_INSTALL_LAYOUT are deprecated
Let's add a comment about this, and generate log messages if these
fields are actually used.
Lennart Poettering [Mon, 21 Mar 2022 17:15:42 +0000 (18:15 +0100)]
sd-event: fix creation of floating event_add_time_change() event sources
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
Luca Boccassi [Mon, 21 Mar 2022 21:56:37 +0000 (21:56 +0000)]
Merge pull request #22808 from poettering/openat-report-newly
journal: add openat() wrapper that reports file creation, and use it in journal
Anita Zhang [Mon, 21 Mar 2022 15:53:35 +0000 (11:53 -0400)]
man: fix sysupdate typos
Luca Boccassi [Mon, 21 Mar 2022 20:05:06 +0000 (20:05 +0000)]
Merge pull request #22804 from mrc0mmand/test-tweaks
A couple of TEST-69 tweaks
Nishal Kulkarni [Mon, 7 Mar 2022 10:11:05 +0000 (15:41 +0530)]
core/cgroup: Add OOM check
Check if process(es) of a cgroup were killed by Kernel OOM killer
or systemd-oomd before we send the cgroup empty notification.
This allows us to show the right exit state(ServiceResult)
Lennart Poettering [Mon, 21 Mar 2022 17:13:06 +0000 (18:13 +0100)]
journal-file: port journal_file_open() to openat_report_new()
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.
Lennart Poettering [Mon, 21 Mar 2022 17:12:53 +0000 (18:12 +0100)]
sd-journal: refuse invocation of journal_file_open() with O_RDONLY|O_CREAT
Lennart Poettering [Mon, 21 Mar 2022 17:11:26 +0000 (18:11 +0100)]
fs-util: add openat_report_new() wrapper around openat()
This is a wrapper around openat(). It works mostly the same, except for
one thing: it race-freely reports whether we just created the indicated
file in case O_CREAT is passed without O_EXCL.
Lennart Poettering [Mon, 21 Mar 2022 17:11:12 +0000 (18:11 +0100)]
update TODO
Frantisek Sumsal [Mon, 21 Mar 2022 15:10:30 +0000 (16:10 +0100)]
test: use a dropin to override the end.service unit
instead of removing it.
Frantisek Sumsal [Mon, 21 Mar 2022 14:58:51 +0000 (15:58 +0100)]
test: run test-shutdown.py in verbose mode
To make the debugging of spurious fails a bit easier.
Frantisek Sumsal [Mon, 21 Mar 2022 14:55:49 +0000 (15:55 +0100)]
test: don't try to execute a non-existing script
Luca Boccassi [Mon, 21 Mar 2022 14:13:22 +0000 (14:13 +0000)]
Merge pull request #22798 from keszybz/test-output-narrow-and-timeouts
Increase timeout for a flaky test and make test names shorter to avoid line wrapping in output
Luca Boccassi [Mon, 21 Mar 2022 13:40:03 +0000 (13:40 +0000)]
Merge pull request #22799 from keszybz/man-spelling-and-crosslinks
Typos and more internal links in documentation
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:03:00 +0000 (11:03 +0100)]
basic/strv: avoid potential UB with references to array[-1]
"""
Given an array a[N] of N elements of type T:
- Forming a pointer &a[i] (or a + i) with 0 ≤ i ≤ N is safe.
- Forming a pointer &a[i] with i < 0 or i > N causes undefined behavior.
- Dereferencing a pointer &a[i] with 0 ≤ i < N is safe.
- Dereferencing a pointer &a[i] with i < 0 or i ≥ N causes undefined behavior.
"""
As pointed by by @medhefgo, here we were forming a pointer to a[-1]. a itself
wasn't NULL, so a > 0, and a-1 was also >= 0, and this didn't seem to cause any
problems. But it's better to be formally correct, especially if we move the
code to src/fundamental/ later on and compile it differently.
Compilation shows no size change (with -O0 -g) on build/systemd, so this should
have no effect whatsoever.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 12:30:42 +0000 (13:30 +0100)]
Drop unused variables to fix build
This is a merge conflict between #22740 and #20156.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 11:16:35 +0000 (12:16 +0100)]
man: cross-link to BLS in more places, use "Type #1", "Type #2" as appropriate
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 11:08:41 +0000 (12:08 +0100)]
spelling: weekday names are capitalized
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 11:06:48 +0000 (12:06 +0100)]
Merge pull request #20156 from poettering/sysupdate
new "systemd-sysupdate" component
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:41:40 +0000 (11:41 +0100)]
test-nss-host: increase timeout
With my crappy home network the test takes 29.5s usually. But with any
tiny slowdown, it goes above the 30s limit and fails. Let's bump the
timeout to avoid spurious failures.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:36:45 +0000 (11:36 +0100)]
fuzz: rename fuzz-dhcp-server-relay-message to fuzz-dhcp-server-relay
We can only relay messages, so we can make the name shorter without
losing informational value. This makes meson test output look better.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 10:22:51 +0000 (11:22 +0100)]
fuzz: rename the longest test samples
"meson test" uses a test name generated from the file name and those long names
cause the test log output to exceed terminal width which looks bad. Let's replace
some long names with more-meaningful names that actually say something about
the tests.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Mar 2022 09:52:03 +0000 (10:52 +0100)]
Merge pull request #22740 from yuwata/list
tree-wide: declare iterator of LIST_FOREACH() in the loop
Yu Watanabe [Sun, 20 Mar 2022 17:26:59 +0000 (02:26 +0900)]
Merge pull request #22789 from poettering/timesync-struct-log
timesyncd: various refactorings and cleanup + structured log msg on first sync
Andrea Pappacoda [Thu, 17 Mar 2022 20:20:27 +0000 (21:20 +0100)]
po: fix "sistemd" typo in it.po
Also use "ricaricare" instead of "riavviare" for "reload"
Yu Watanabe [Wed, 16 Mar 2022 13:32:23 +0000 (22:32 +0900)]
strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
Lennart Poettering [Wed, 16 Jun 2021 11:11:42 +0000 (13:11 +0200)]
update TODO
Lennart Poettering [Thu, 19 Aug 2021 14:54:40 +0000 (16:54 +0200)]
test: add integration test for sysupdate
Lennart Poettering [Mon, 5 Jul 2021 15:55:58 +0000 (17:55 +0200)]
man: add sysupdate documentation
Lennart Poettering [Wed, 16 Jun 2021 10:00:34 +0000 (12:00 +0200)]
unit: add units for new "systemd-sysupdate" tool
These unit (if enabled) will try to update the OS in regular intervals.
Moreover, every day in the early morning this will attempt to reboot the
system if there's a newer version installed than running.
Lennart Poettering [Mon, 28 Dec 2020 14:17:54 +0000 (15:17 +0100)]
sysupdate: add new component "sysupdate"
Yu Watanabe [Tue, 15 Mar 2022 07:47:01 +0000 (16:47 +0900)]
list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer
Yu Watanabe [Tue, 15 Mar 2022 07:14:53 +0000 (16:14 +0900)]
list: declare iterator of LIST_FOREACH() in the loop
Lennart Poettering [Fri, 18 Mar 2022 15:58:26 +0000 (16:58 +0100)]
timesyncd: improve log message whe getting a reply from server
The message is misleading: it's not about synchronization but about
successful communicaiton. And it's not about "initial", but only about
first contact since we siwtched to this server.
Let's hence reword the message a bit.
Lennart Poettering [Fri, 18 Mar 2022 15:52:06 +0000 (16:52 +0100)]
timesyncd: generate a structure log message the first time we set the clock correctly
Usecase: later on we can use this to retroactively adjust log output in
journalctl or similar on systems lacking an RTC: we just have to search
for this sructured log message that indicates the first sync point and
can then retroactively adjust the incorrect timestamps collected before
that.
Lennart Poettering [Fri, 18 Mar 2022 15:53:46 +0000 (16:53 +0100)]
timesyncd: add debug logging in case we can't touch /run/systemd/timesync/synchronized
Lennart Poettering [Fri, 18 Mar 2022 15:50:59 +0000 (16:50 +0100)]
timesyncd: when updating timestamp file, use best time we know, instead of system clock
We adjust the system clock slowly after all, even if we know a more
accurate time. Use the accurate time for the timestamp.
Lennart Poettering [Fri, 18 Mar 2022 15:57:56 +0000 (16:57 +0100)]
timesyncd: rename bool 'good' → 'talking'
THe name is just too generic. Let's pick a name that makes clear that
this is about successful communication.
Lennart Poettering [Fri, 18 Mar 2022 15:30:26 +0000 (16:30 +0100)]
timesyncd: don't abort packet handling if we can't save the timestamp to disk
This should not be a fatal error, and it isn't in the other place we
call this.
Lennart Poettering [Fri, 18 Mar 2022 15:28:38 +0000 (16:28 +0100)]
sd-event: add a single implementation of an event source that runs on clock 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.
Lennart Poettering [Fri, 18 Mar 2022 14:53:25 +0000 (15:53 +0100)]
timesyncd: move stuff that is not about setting the clock out of manager_adjust_clock()
Let's make sure manager_adjust_clock() is purely about setting the
clock, and nothing else.
Let's clean up logging this way. manager_adjust_clock() now won#t log
about errors, but the caller can safely do that, and do with the right
log message string.
Lennart Poettering [Fri, 18 Mar 2022 14:52:06 +0000 (15:52 +0100)]
timesyncd: use CMSG_FIND_DATA() macro where appropriate
Lennart Poettering [Fri, 18 Mar 2022 15:55:29 +0000 (16:55 +0100)]
timesyncd: merge some variable declarations
Lennart Poettering [Fri, 18 Mar 2022 14:27:20 +0000 (15:27 +0100)]
timesyncd: rebreak some comments
Lennart Poettering [Fri, 18 Mar 2022 13:07:22 +0000 (14:07 +0100)]
timesyncd: add comment what bool arg is