]>
git.ipfire.org Git - thirdparty/systemd.git/log
Lennart Poettering [Wed, 24 Oct 2018 11:15:24 +0000 (13:15 +0200)]
sleep: when we can't hibernate on suspend-then-hibernate, fall back to suspend again
Let's make this a bit safer, and try hard to return to sleep, if we can
at all.
Fixes: #10212
Lennart Poettering [Wed, 24 Oct 2018 11:04:30 +0000 (13:04 +0200)]
sleep: rework what we do if a suspend fails.
First of all, let's fix logging: let's simply log the same message as we
do on success, so that there's always the same pair of these messages
around, regardless if the suspend was successful or not. To distuingish
a successful suspend from a failed one, check the ERRNO= field of the
structured message.
In most ways a failed suspend cycle is not distuingishable from a
successful one that took no time, hence let's treat it this way, and
always pair the success message with a failure message.
This also changes a more important concept: the post-suspend callouts
are now called also called on failure, following the same logic: let's
always run them in pairs: for every pre callout a post callout has to
follow.
Lennart Poettering [Wed, 24 Oct 2018 10:57:37 +0000 (12:57 +0200)]
sleep: no need to check for resume_offset twice
The W_OK check already checks for existance hence let's remove the F_OK
check.
Lennart Poettering [Wed, 24 Oct 2018 10:52:11 +0000 (12:52 +0200)]
sleep: let's turn off the RTC alarm time ASAP
Let's be a tiny bit more careful here.
Also, let's rearrange things to simplify them a bit, and to not use "r"
outside of its immediate scope of validity.
Lennart Poettering [Wed, 24 Oct 2018 10:48:56 +0000 (12:48 +0200)]
sleep: round up when calculating RTC sleep time
Paranoia: this way we know that when we wake up all timers are
definitely equal or ahead of what we expect them to be.
Lennart Poettering [Wed, 24 Oct 2018 10:47:46 +0000 (12:47 +0200)]
sleep: move log message generation for rtc_read_time() into the function itself
The log messages were petty borked anyway, and generated at two separate
locations. Let's fix that.
Lennart Poettering [Wed, 24 Oct 2018 10:45:06 +0000 (12:45 +0200)]
sleep: rework write_wakealarm() to take a numeric parameter
Also, let's rename it to rtc_write_wake_alarm(). Both changes together
make sure rtc_write_wake_alarm() and rtc_read_time() are more alike in
their naming and semantics.
Lennart Poettering [Wed, 24 Oct 2018 10:40:07 +0000 (12:40 +0200)]
sleep: rename read_wakealarm() → rtc_read_time()
It doesn't read wakealarm, but the current time of the RTC. Hence, let's
rename this to make it less misleading.
Lennart Poettering [Wed, 24 Oct 2018 10:38:13 +0000 (12:38 +0200)]
sleep: log about the correct errors
Lennart Poettering [Wed, 24 Oct 2018 10:38:04 +0000 (12:38 +0200)]
sleep: don't make up errors, propagate the right ones
Lennart Poettering [Wed, 24 Oct 2018 10:35:49 +0000 (12:35 +0200)]
sleep: let's use write_string_file() instead of write_string_stream() if we can
Let's shorten things.
Lennart Poettering [Wed, 24 Oct 2018 08:57:45 +0000 (10:57 +0200)]
Merge pull request #10484 from yuwata/udev-spawn-simplify
udev-event: cleanups about udev_event_spawn()
Lennart Poettering [Wed, 24 Oct 2018 08:53:35 +0000 (10:53 +0200)]
Merge pull request #10498 from yuwata/udev-builtin-log
udev-builtin: use log_device_*() macros
Lennart Poettering [Wed, 24 Oct 2018 08:51:53 +0000 (10:51 +0200)]
Merge pull request #10483 from yuwata/udev-cleanup-10
tree-wide: use log_device_*()
Lennart Poettering [Wed, 24 Oct 2018 08:36:20 +0000 (10:36 +0200)]
Merge pull request #10461 from yuwata/small-cleanups
Fixes recent defects reported by coverity
Jiuyang liu [Mon, 22 Oct 2018 17:26:05 +0000 (01:26 +0800)]
add ephemeral to nspawn-settings.
Yu Watanabe [Fri, 19 Oct 2018 17:39:02 +0000 (02:39 +0900)]
udevadm-info: fix memleak
Fixes CID#
1396276 .
Yu Watanabe [Fri, 19 Oct 2018 17:36:12 +0000 (02:36 +0900)]
udevadm-monitor: initialize variable
Fixes CID#
1396278 .
Yu Watanabe [Fri, 19 Oct 2018 17:34:12 +0000 (02:34 +0900)]
modules-load: return first error in the loop
Follow-up for
a889e206a7434afe28039a1698e5ecf6a3fb7a9b .
Fixes CID#
1396280 .
Yu Watanabe [Fri, 19 Oct 2018 00:37:08 +0000 (09:37 +0900)]
reply-password: initialize 'length' variable
Follow-up for
1fd2786161feba4276a81c3468cfbfb118f56517 .
This fixes the following warning when built by clang:
```
../src/reply-password/reply-password.c:76:21 warning: variable 'length' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
```
Fixes CID#
1396281 and CID#
1396277 .
Yu Watanabe [Fri, 19 Oct 2018 00:19:24 +0000 (09:19 +0900)]
core: use ascii_toupper() instead of everytime judging whether it is the first message
Yu Watanabe [Tue, 23 Oct 2018 04:52:57 +0000 (13:52 +0900)]
udev-event: use sd_event_add_io() for reading stdout or stderr of spawned process
Yu Watanabe [Tue, 23 Oct 2018 03:25:17 +0000 (12:25 +0900)]
udev-event: unify two log_*() by log_full()
Yu Watanabe [Tue, 23 Oct 2018 03:23:44 +0000 (12:23 +0900)]
udev-event: Capitalize log messages
Yu Watanabe [Tue, 23 Oct 2018 03:18:33 +0000 (12:18 +0900)]
udev-event: fix condition to create pipe fds
The bug was introduced by
feaa6db7ac287b34887f75c27a7efc2107a7b691 .
Yu Watanabe [Tue, 23 Oct 2018 01:18:36 +0000 (10:18 +0900)]
udev-event: set O_CLOEXEC to pipe fds
Yu Watanabe [Mon, 22 Oct 2018 20:47:21 +0000 (05:47 +0900)]
udev-event: make failure in getting device properties fatal
Yu Watanabe [Mon, 22 Oct 2018 22:23:01 +0000 (07:23 +0900)]
test: create /dev/null in test-udev.pl
Yu Watanabe [Mon, 22 Oct 2018 09:29:05 +0000 (18:29 +0900)]
udev-event: use rearrange_stdio() and close_all_fds()
Yu Watanabe [Mon, 22 Oct 2018 09:27:57 +0000 (18:27 +0900)]
udev-event: set FORK_DEATHSIG flag
Yu Watanabe [Mon, 22 Oct 2018 09:25:18 +0000 (18:25 +0900)]
udev-event: drop redundant code
We have set FORK_RESET_SIGNALS in safe_fork(). So, calling
reset_signal_mask() after safe_fork() is redundant.
Yu Watanabe [Mon, 22 Oct 2018 09:21:42 +0000 (18:21 +0900)]
udev-event: move debug logging before safe_fork()
This fixes the following journal layout issue:
```
Oct 22 15:26:02 systemd-udevd[348]: RUN '/usr/sbin/setregdomain' /usr/lib/udev/rules.d/85-regulatory.rules:5
Oct 22 15:26:02 [439]: Starting '/usr/sbin/setregdomain'
Oct 22 15:26:02 systemd-udevd[348]: Process '/usr/sbin/setregdomain' succeeded.
```
Yu Watanabe [Tue, 23 Oct 2018 19:27:36 +0000 (04:27 +0900)]
udev-builtin-input_id: update log messages
Yu Watanabe [Tue, 23 Oct 2018 19:19:16 +0000 (04:19 +0900)]
udev-builtin-usb_id: update log messages
Yu Watanabe [Tue, 23 Oct 2018 19:08:13 +0000 (04:08 +0900)]
udev-builtin-uaccess: update log messages
Yu Watanabe [Tue, 23 Oct 2018 19:02:29 +0000 (04:02 +0900)]
udev-builtin-net_setup_link: update log messages
Yu Watanabe [Tue, 23 Oct 2018 18:56:17 +0000 (03:56 +0900)]
udev-builtin-keyboard: update log messages
Yu Watanabe [Tue, 23 Oct 2018 18:26:31 +0000 (03:26 +0900)]
sd_hwdb: update log messages
Yu Watanabe [Tue, 23 Oct 2018 18:13:54 +0000 (03:13 +0900)]
udev-builtin-btrfs: add debug log messages
Yu Watanabe [Tue, 23 Oct 2018 18:01:19 +0000 (03:01 +0900)]
udev-builtin-blkid: add more debug log messages
Yu Watanabe [Tue, 23 Oct 2018 17:42:02 +0000 (02:42 +0900)]
udev-builtin: fix return value of udev_builtin_hwdb()
This fixes a bug introduced by
d354690e7d0429338cdd1c2cfe1fdd08fc53da9e .
Also, this adds more debug logs.
Yu Watanabe [Tue, 23 Oct 2018 17:46:41 +0000 (02:46 +0900)]
sd-device: fix argument name in log_device_*() macros
Follow-up for
b0cba0ca526ed2d86e283a0fcfebdf0a4d4bea9b .
Evgeny Vereshchagin [Sun, 21 Oct 2018 03:21:36 +0000 (03:21 +0000)]
journald: use the "driver" transport for logging a refused connection
Otherwise, these messages can end up in `/dev/null` when journald is run
in containers as was shown in https://github.com/systemd/systemd/pull/10444#issuecomment-
430927793 .
Evgeny Vereshchagin [Fri, 12 Oct 2018 12:17:04 +0000 (12:17 +0000)]
sd-journal: escape binary data in match_make_string()
Fixes: #10383
Yu Watanabe [Tue, 23 Oct 2018 13:49:16 +0000 (22:49 +0900)]
udevadm: normalize exit status
After
d354690e7d0429338cdd1c2cfe1fdd08fc53da9e , each udevadm command
returns negative errno on error. So, let's normalize the exit status
of udevadm.
Lennart Poettering [Tue, 23 Oct 2018 17:30:49 +0000 (19:30 +0200)]
Merge pull request #10493 from yuwata/parse-time-overflow
util: check overflow in parse_time() and parse_nsec()
Yu Watanabe [Mon, 22 Oct 2018 04:21:43 +0000 (13:21 +0900)]
link-config: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 04:21:16 +0000 (13:21 +0900)]
udev-watch: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 04:12:19 +0000 (13:12 +0900)]
udev-node: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 04:01:22 +0000 (13:01 +0900)]
rfkill: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:57:37 +0000 (12:57 +0900)]
mount-tool: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:54:27 +0000 (12:54 +0900)]
login: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:49:23 +0000 (12:49 +0900)]
sd-device-monitor: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:40:08 +0000 (12:40 +0900)]
gpt-auto-generator: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:39:51 +0000 (12:39 +0900)]
fsck: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:30:51 +0000 (12:30 +0900)]
core/device: use log_device_*()
Yu Watanabe [Mon, 22 Oct 2018 03:13:23 +0000 (12:13 +0900)]
backlight: use log_device_*()
Yu Watanabe [Tue, 23 Oct 2018 13:28:21 +0000 (22:28 +0900)]
bash-completion: analyze: add timespan
Follow-up for
3f1c1287a96dfc146ce894bd6bfff388cba0ab55 .
Yu Watanabe [Tue, 23 Oct 2018 13:25:01 +0000 (22:25 +0900)]
test: add tests for detecting overflow in parse_time() and parse_nsec()
Yu Watanabe [Tue, 23 Oct 2018 13:24:16 +0000 (22:24 +0900)]
util: check overflow in parse_nsec()
Yu Watanabe [Tue, 23 Oct 2018 13:23:34 +0000 (22:23 +0900)]
util: check overflow in parse_time()
Chris Down [Mon, 15 Oct 2018 11:55:35 +0000 (12:55 +0100)]
analyze: Add "timespan" command to dump time span in usec
This is useful for a couple of cases, I'm mostly interested in case #1:
1. Verifying "reasonable" values in a trivially scriptable way
2. Debugging unexpected time span parsing directly
Test Plan:
```
% build/systemd-analyze timespan 20
Original: 20
μs: 20
Human: 20us
% build/systemd-analyze timespan 20ms
Original: 20ms
μs: 20000
Human: 20ms
% build/systemd-analyze timespan 20z
Failed to parse time span '20z': Invalid argument
```
Zbigniew Jędrzejewski-Szmek [Tue, 23 Oct 2018 11:43:33 +0000 (13:43 +0200)]
Merge pull request #10395 from yuwata/udev-cleanup-9
udev-builtin: replace udev_device by sd_device
Yu Watanabe [Tue, 23 Oct 2018 09:26:06 +0000 (18:26 +0900)]
udev-builtin: propagate negative errno
Yu Watanabe [Mon, 22 Oct 2018 04:47:06 +0000 (13:47 +0900)]
udevadm-test-builtin: use find_device()
This also fixes minor memleak.
Yu Watanabe [Mon, 22 Oct 2018 04:46:35 +0000 (13:46 +0900)]
udevadm: use path friendly functions
Yu Watanabe [Mon, 22 Oct 2018 03:04:52 +0000 (12:04 +0900)]
udev: propagate original error from udev_builtin_add_property()
Yu Watanabe [Mon, 22 Oct 2018 03:04:33 +0000 (12:04 +0900)]
udev: logs error in udev_builtin_add_property()
Yu Watanabe [Mon, 22 Oct 2018 03:04:13 +0000 (12:04 +0900)]
sd-device: introduce log_device_*() macros
Yu Watanabe [Sat, 13 Oct 2018 18:09:13 +0000 (03:09 +0900)]
udev-builtin: modernize code a bit
- introduce _UDEV_BUILTIN_INVALID,
- use _UDEV_BUILTIN_MAX where applicable,
- add several assertions.
Yu Watanabe [Sat, 13 Oct 2018 17:01:58 +0000 (02:01 +0900)]
udevadm-test-builtin: replace udev_device by sd_device
Yu Watanabe [Sat, 13 Oct 2018 16:40:57 +0000 (01:40 +0900)]
udev: drop libudev-private.h from udev-builtin-{hwdb,net_id}.c
Yu Watanabe [Sat, 13 Oct 2018 16:38:54 +0000 (01:38 +0900)]
udev: make udev_builtin_run take sd_device
Yu Watanabe [Sat, 13 Oct 2018 16:32:28 +0000 (01:32 +0900)]
udev-builtin: simplify code a bit
Yu Watanabe [Sat, 13 Oct 2018 16:22:14 +0000 (01:22 +0900)]
udev: replace udev_device by sd_device from prototype of udev builtin commands
Yu Watanabe [Sat, 13 Oct 2018 16:14:10 +0000 (01:14 +0900)]
udev: replace udev_device by sd_device in udev-builtin-usb_id.c
Yu Watanabe [Sat, 13 Oct 2018 16:12:22 +0000 (01:12 +0900)]
udev: replace udev_device by sd_device in udev-builtin-uaccess.c
Yu Watanabe [Sat, 13 Oct 2018 16:10:40 +0000 (01:10 +0900)]
udev: replace udev_device by sd_device in udev-builtin-path_id.c
Yu Watanabe [Sat, 13 Oct 2018 16:06:50 +0000 (01:06 +0900)]
udev: replace udev_device by sd_device in udev-builtin-net_setup_link.c
Yu Watanabe [Sat, 13 Oct 2018 16:04:29 +0000 (01:04 +0900)]
udev: replace udev_device by sd_device in udev-builtin-net_id.c
Yu Watanabe [Sat, 13 Oct 2018 16:01:11 +0000 (01:01 +0900)]
udev: replace udev_device by sd_device in udev-builtin-keyboard.c
Yu Watanabe [Sat, 13 Oct 2018 15:54:05 +0000 (00:54 +0900)]
udev: replace udev_device by sd_device in udev-builtin-input_id.c
Yu Watanabe [Sat, 13 Oct 2018 15:48:04 +0000 (00:48 +0900)]
udev: replace udev_device by sd_device in udev-builtin-blkid.c
Yu Watanabe [Sat, 13 Oct 2018 15:42:43 +0000 (00:42 +0900)]
udev: replace udev_device by sd_device in udev-builtin-hwdb.c
Yu Watanabe [Sat, 13 Oct 2018 15:28:40 +0000 (00:28 +0900)]
udev: make udev_builtin_add_property() take sd_device instead of udev_device
Evgeny Vereshchagin [Tue, 23 Oct 2018 07:09:23 +0000 (10:09 +0300)]
tests: allow passing log_level via an environment variable (#10490)
Michael Biebl [Mon, 22 Oct 2018 22:29:03 +0000 (00:29 +0200)]
tests: update networkd-test.py to use resolvectl instead of systemd-resolve (#10486)
The latter is merely a compat symlink nowadays.
Lennart Poettering [Mon, 22 Oct 2018 19:43:58 +0000 (21:43 +0200)]
Merge pull request #7411 from joergsteffens/tapechanger
udev-rules: extend tape and tape changer rules
Lennart Poettering [Mon, 22 Oct 2018 19:33:23 +0000 (21:33 +0200)]
Merge pull request #10477 from yuwata/fix-10474
network: include linux/fou.h if it exists
Lennart Poettering [Mon, 22 Oct 2018 13:15:45 +0000 (15:15 +0200)]
Merge pull request #10415 from poettering/boot-loader-spec-tweaks
docs: tweaks to the boot loader spec
Zbigniew Jędrzejewski-Szmek [Sun, 21 Oct 2018 17:48:20 +0000 (19:48 +0200)]
systemd-nspawn: do not crash on /var/log/journal creation if not required
When running a read-only file system, we might not be able to create
/var/log/journal. Do not fail on this, unless actually requested by the
--link-journal options.
$ systemd-nspawn --image=image.squashfs ...
Yu Watanabe [Sun, 21 Oct 2018 09:35:46 +0000 (18:35 +0900)]
missing: support old linux/fou.h
linux/fou.h was introduced in 3.18.
FOU_ATTR_REMCSUM_NOPARTIAL was added in 4.0.
FOU_CMD_GET was added in 4.1.
Follow-up for
53cb501a1314740fa777f145067cefccda954487 .
Fixes #10474.
Lennart Poettering [Fri, 19 Oct 2018 21:04:22 +0000 (23:04 +0200)]
Merge pull request #9437 from poettering/sd-boot-count
many sd-boot/bootctl fixes, and a new "boot counting" concept, for automatic fallback to older kernels on persistent failures
Tobias Jungel [Fri, 19 Oct 2018 11:12:35 +0000 (13:12 +0200)]
networkd: keep bond slave up if already attached
There is no need to disable an already correct enslaved interface.
relates to #10118
Li Song [Fri, 19 Oct 2018 17:41:51 +0000 (13:41 -0400)]
sd-dhcp: remove unreachable route after rebinding return NAK
Lennart Poettering [Fri, 19 Oct 2018 20:58:53 +0000 (22:58 +0200)]
Merge pull request #10470 from yuwata/log-message-updates
Log message updates
Lennart Poettering [Wed, 17 Oct 2018 09:42:11 +0000 (11:42 +0200)]
boot-loader-spec: drop link to obsolete patch
This is not what distros use, let's not point users to obsolete stuff.
Lennart Poettering [Wed, 17 Oct 2018 09:38:57 +0000 (11:38 +0200)]
update TODO
Lennart Poettering [Wed, 17 Oct 2018 09:38:45 +0000 (11:38 +0200)]
boot-loader-spec: elaborate on 'architecture' stanza a bit and use it in the example
Lennart Poettering [Tue, 16 Oct 2018 10:01:18 +0000 (12:01 +0200)]
docs: tweaks to the boot loader spec
A couple of changes:
1. Clearly name the drop-in entry files "Type #1", and the unified
kernel images "Type #2", and be clearer that the latter is specific
to UEFI.
2. Suffix all directory paths with a trailing "/" to clarify that these
are directories. Also, enclose them all in ``.
3. Add introductory paragraph that explains that there is Type #1 and
Type #2 and what they are about.
4. Explain that Type #2 is about signed UEFI SecureBoot.
5. Don't claim that $BOOT/loader/ contains really all files defined by
the spec, because that's not true, Type #2 images are not located there
after all.
Fixes: #10399