1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-27 14:03:43 +03:00

35616 Commits

Author SHA1 Message Date
Lennart Poettering
7f1ef12526 sd-boot: also set an ID for the reboot-into-firmware entry 2018-10-16 16:44:34 +02:00
Lennart Poettering
0e2bc73274 sd-boot: write the IDs of all discovered entries to an EFI variable
This is primarily useful for debugging, but can be useful for other
purposes too. For example userspace could check whether "auto-windows"
is included in the list, before triggering a boot-into-windows
operation.
2018-10-16 16:44:34 +02:00
Lennart Poettering
f82ecab0a9 efi: make efivar_set_raw() buffer argument VOID*
No need to define a type if it is just some arbitrary buffer for us
anyway.
2018-10-16 16:44:34 +02:00
Lennart Poettering
f538cc6548 sd-boot: add boot counting mechanism 2018-10-16 16:44:34 +02:00
Lennart Poettering
64e7e27cd4 sd-boot: coding style fix, don't rely on C's downgrade-to-bool feature for numerical values 2018-10-16 16:44:34 +02:00
Lennart Poettering
05907f25a5 sd-boot: remove left-over lgpl blurb 2018-10-16 16:44:34 +02:00
Lennart Poettering
2214cfbf50 sd-boot: simplify memory management in processing of unified kernel image a bit 2018-10-16 16:44:34 +02:00
Lennart Poettering
42cf81c26f sd-boot: properly free all config entry fields 2018-10-16 16:44:34 +02:00
Lennart Poettering
081cc95fec sd-boot: rename ConfigEntry field 'file' to 'id'
The field derives from a file name only in very specific cases, for
many cases it's a fixed string (for example, all "auto-" items are like
this). Also, even when it derives from a file name, it is processed a
bit, as suffixes are removed and the string is converted to lower case.

hence, let's name this field "id" instead, because that's what it is
used for: as general identification token.
2018-10-16 16:44:34 +02:00
Lennart Poettering
580fe4df59 sd-boot: break overly long function argument lists following our usual coding style 2018-10-16 16:44:34 +02:00
Lennart Poettering
1336bb9864 sd-boot: drop initialization of 'line' which we override in the next line anyway 2018-10-16 16:44:34 +02:00
Lennart Poettering
2880e665ab efi: explicity check for NULL in FreePoolp()
Firmware implementations are generally pretty bad, hence let's better
add an explicit check for NULL before invokin FreePool(), in particular
is it doesn't appear to be documented whether FreePool() is supposed to
be happy with NULL.
2018-10-16 16:44:34 +02:00
Lennart Poettering
3aaa95e0a0 efi: add cleanup handler for closing file descriptors 2018-10-16 16:44:34 +02:00
Lennart Poettering
b73acaed42 efi: add poor man's offsetof() implementation 2018-10-16 16:44:34 +02:00
Lennart Poettering
d10ba83a1b mkosi: update the boot loader from our freshly built one 2018-10-16 16:44:34 +02:00
Lennart Poettering
a53f90ca24 siphash24: add helper for calculating the hash value for a string
Let's shorten some code.
2018-10-16 16:27:15 +02:00
Lennart Poettering
43d3c94e64
Merge pull request #10416 from poettering/udev-coverity
three simple coverity fixes
2018-10-16 16:26:44 +02:00
Lennart Poettering
cb542e8488 udev: (void)ify calls to kill() where we knowingly ignore the return values
CID 1368231
CID 1368229
2018-10-16 13:52:21 +02:00
Lennart Poettering
eb276e9841 udev: don't use devname before we acquired it
CID 1396107
2018-10-16 13:52:21 +02:00
Lennart Poettering
cdc2af3e15 core: log about unit_watch_pid() failing
CID 1237509
2018-10-16 13:52:21 +02:00
Lennart Poettering
2011149a3c
Merge pull request #10327 from yuwata/test-sd-device-enumerator-subsystem
sd-device-enumerator: dedup enumerated devices and add test for subsystem filtering
2018-10-16 12:48:01 +02:00
Lennart Poettering
14d0a740b5 Set theme jekyll-theme-cayman 2018-10-16 11:32:09 +02:00
Zbigniew Jędrzejewski-Szmek
65d51875c2 catalog: fix name of variable
All the messages would (literally) say "The start-up result is RESULT."
because @RESULT@ was not defined.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1639482
and the first part of #8005.

Fixup for 646cc98dc81c4d0edbc1b57e7bca0f474b47e270.
2018-10-16 10:21:08 +02:00
Harry Mallon
2c4370d66c rules: Add ID_REVISION environment var for NVMe devices 2018-10-16 10:20:31 +02:00
Zbigniew Jędrzejewski-Szmek
0919b554c6
Merge pull request #9824 from poettering/login-unit-fixes
many logind improvements
2018-10-16 09:34:27 +02:00
Zbigniew Jędrzejewski-Szmek
43debabc8b
Merge pull request #10391 from poettering/systemctl-exit-code-fixes
systemctl exit code fixes
2018-10-16 08:42:34 +02:00
Zbigniew Jędrzejewski-Szmek
4348c847cc
Merge pull request #10373 from poettering/systemd-io
adopt systemd.io urls
2018-10-15 15:39:05 +02:00
Yu Watanabe
6cc4d59b35
Merge pull request #10392 from poettering/manager-no-inotify-fail
make sure /etc/localtime issues don't cause systemd to fail boot
2018-10-15 07:15:12 +09:00
Ben Boeckel
bbe27ae448 man/systemd.nspawn: fix reference to --timezone argument (#10403) 2018-10-15 06:16:43 +09:00
Lennart Poettering
ca193035e9
Merge pull request #10394 from yuwata/fixes-found-by-clang
Fix warnings reported by clang
2018-10-14 20:11:19 +02:00
Yu Watanabe
e7aa9512e4 udev: use readlink_malloc() or its friend
Follow-up for a2554acec652fc65c8ed0c6c1fede9ba8c3693b1 and
70068602713e8f441c5ddc2618f007f24488e422.
2018-10-14 19:59:49 +02:00
Yu Watanabe
18094bdcf4
Merge pull request #10381 from poettering/coverity-fixes
fixes for various recent coverity issues
2018-10-14 18:58:36 +09:00
Yu Watanabe
40990eac27 test: use fabsl instead of fabs as json_variant_real() returns 'long double' 2018-10-14 03:29:43 +09:00
Yu Watanabe
172e4806dd busctl: drop unused variable 2018-10-14 03:29:43 +09:00
Yu Watanabe
cb16b085c0 core: set _unused_ attribute to 'reloading'
Follow-up for 4df7d537c8203557d330b68ba7833515ddd4e985.
2018-10-13 23:50:04 +09:00
Lennart Poettering
ea5c5f680d core: ensure it's not fatal if we cannot watch /etc/localtime
See: #9602
2018-10-13 15:13:07 +02:00
Lennart Poettering
0cb21d8c60 core: add debug logging if we cant watch /etc/localtime itself 2018-10-13 15:12:58 +02:00
Yu Watanabe
b5f24a3858 test: make test-sd-device stricter 2018-10-13 21:45:50 +09:00
Yu Watanabe
cd8d816d78 sd-device: dedup enumerated devices 2018-10-13 21:45:50 +09:00
Yu Watanabe
68db4a0caf test: add test for subsystem filtering of sd_device_enumerator 2018-10-13 21:45:50 +09:00
Yu Watanabe
7ef670c34a hashmap: introduce hashmap_first_key_and_value() and friends 2018-10-13 21:45:50 +09:00
Lennart Poettering
0e8d9c0c4d systemctl: clean up start_unit_one() error handling
Let's split exit code handling in two: "r" is only used for errno-style
errors, and "ret" is used for exit() codes. Then, let's use EXIT_SUCCESS
for checking whether the latter is already used.

This way it should always be clear what kind of error we are processing,
and when we propaate one into the other.

Moreover this allows us to drop "q" form all inner loops, avoiding
confusion when to use "q" and when "r" to store received errors.

Fixes: #9704
2018-10-13 14:38:46 +02:00
Lennart Poettering
8b7ec7bbfa systemctl: add missing OOM check 2018-10-13 14:34:56 +02:00
Lennart Poettering
b921711248 logind: validate /run/user/1000 before we set it
Let's be safe than sorry, in particular as logind doesn't set it up
anymore, but user-runtime-dir@.service does, and logind doesn't really
track success of that.
2018-10-13 13:01:08 +02:00
Lennart Poettering
93d4cb09d5 core: fix unfortunate typo in unit_is_unneeded()
Follow-up for a3c1168ac293f16d9343d248795bb4c246aaff4a.
2018-10-13 13:01:08 +02:00
Lennart Poettering
cf99f8eacf core: make destructive transaction error a bit more useful 2018-10-13 13:01:08 +02:00
Lennart Poettering
0689812331 update TODO 2018-10-13 13:01:08 +02:00
Lennart Poettering
964c4eda5b man: also use "yes"/"no" rather than "true"/"false" in man pages
We usually use yes/no in all our unit files, do the same in the man
pages.

Triggered by:

https://github.com/systemd/systemd/pull/9824#issuecomment-420729987
2018-10-13 12:59:29 +02:00
Lennart Poettering
2d6718bf3d units: use =yes rather than =true everywhere
So far we always used "yes" instead of "true" in all our unit files,
except for one outlier. Let's do this here too. No change in behaviour
whatsoever, except that it looks prettier ;-)
2018-10-13 12:59:29 +02:00
Lennart Poettering
4e5b605af2 logind: automatically GC lingering users for who now user@.service (nor slice, not runtime dir service) is running anymore
This heavily borrows from @intelfx' PR #5546, but watches all three
units that are associated with a user now: the slice, the user@.service
and user-runtime-dir@.service.

The logic and reasoning behind it is the same though: there's no value
in keeping lingering users around if all their three services are gone.

Replaces: #5546
Fixes: #4162
2018-10-13 12:59:29 +02:00