Commit Graph

61865 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
5deb391c6e fundamental: fix compile check for explicit_bzero
Our HAVE_* variables are defined to 0 or 1, so '#if defined(HAVE_*)' is always true.
The variable is not defined when compiling for EFI though, so we need the
additional guard.

Fixup for 3f92dc2fd4.

(I don't want to do something like add -DHAVE_EXPLICIT_BZERO=0 to the commandline
in src/efi/boot/meson.build, because this quite verbose. Our compilation commandlines
are very long already. Let's instead keep this localized in this one spot in the
source file.)x
2023-01-10 14:23:27 +01:00
Ludwig Nussel
5fe34dbfeb kernel-install: refactor some variables
In preparation for plugin support
2023-01-10 13:49:31 +01:00
Yu Watanabe
5afaf40712 shutdown: propagate the original errno
Follow-up for b293bb2316.
2023-01-10 12:06:49 +01:00
Kai-Chuan Hsieh
8d4f1337e8 hwdb: Mark Dell platform accel sensor location to base
Dell would like to disable screen rotation for the platform eternally.
Mark the aceel sensor location base to disable it.
2023-01-10 18:13:11 +09:00
drosdeck
6152de293a Fix Positivo MASTER-N1110 key toggle touchpad 2023-01-10 09:45:38 +01:00
Lennart Poettering
4afe2fb2f8 Merge pull request #25980 from yuwata/udev-fail-to-rename-netif
udev,pid1: gracefully handle failure in renaming network interface
2023-01-10 09:44:42 +01:00
Ulrich Ölmann
fe0bdcacd1 man: exec,nspawn: fix typo 2023-01-10 16:45:22 +09:00
Yu Watanabe
2d0d75b279 test: add tests for failure in renaming network interface 2023-01-10 14:25:20 +09:00
Yu Watanabe
e9336d6ac3 core/device: ignore failed uevents
When udevd failed to process the device, SYSTEMD_ALIAS or any other
properties may contain invalid values. Let's refuse to handle the uevent.
2023-01-10 14:25:20 +09:00
Yu Watanabe
58b0a3e511 core/device: downgrade log level for ignored errors 2023-01-10 14:25:20 +09:00
Yu Watanabe
eedfef0f0d sd-device: introduce device_get_property_int() 2023-01-10 14:25:20 +09:00
Yu Watanabe
210033847c udev: restore syspath and properties on failure
Otherwise, invalid sysname or properties may be broadcast to udev
listeners.
2023-01-10 14:25:16 +09:00
Lennart Poettering
b293bb2316 shutdown: propagate mount() failures from child to parent
Let's propagate the actual error code up, as we usual do.

Inspired by: #25168
2023-01-09 22:17:04 +01:00
Lennart Poettering
e29684a1ba Merge pull request #25982 from mrc0mmand/curl-scheme
Fix build with the latest libcurl
2023-01-09 18:59:20 +01:00
Jan Janssen
3f92dc2fd4 boot: Simplify object erasure
This erase_obj() machinery looks like voodoo and creates an awful lot of
noise as soon as we get back to building with -O0. We can do this in a
more simple way by introducing a struct that holds the information we
need on cleanup. When building with optimization enabled, all this gets
inlined and the eraser vanishes.
2023-01-09 18:58:54 +01:00
Frantisek Sumsal
e61a4c0b7c import: use CURLOPT_PROTOCOLS_STR with libcurl >= 7.85.0
CURLOPT_PROTOCOLS [0] was deprecated in libcurl 7.85.0 with
CURLOPT_PROTOCOLS_STR [1] as a replacement, causing build warnings/errors:

../build/src/import/curl-util.c: In function ‘curl_glue_make’:
../build/src/import/curl-util.c:255:9: error: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
  255 |         if (curl_easy_setopt(c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_FILE) != CURLE_OK)
      |         ^~
In file included from ../build/src/import/curl-util.h:4,
                 from ../build/src/import/curl-util.c:6:
/usr/include/curl/curl.h:1749:3: note: declared here
 1749 |   CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
      |   ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Since there's no grace period between the two symbols, let's resort
to a light if-def-ery to resolve this.

[0] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
[1] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html
2023-01-09 13:36:42 +01:00
Lennart Poettering
f977356a82 man: make clearer that sd_bus_get_timeout() returns an absolute time-out
Prompted by:

https://lists.freedesktop.org/archives/systemd-devel/2023-January/048714.html
2023-01-09 13:23:11 +01:00
Frantisek Sumsal
2285c462eb import: use CURLINFO_SCHEME instead of CURLINFO_PROTOCOL
CURLINFO_PROTOCOL has been deprecated in curl 7.85.0 causing compilation
warnings/errors:

../build/src/import/pull-job.c: In function ‘pull_job_curl_on_finished’:
../build/src/import/pull-job.c:142:9: error: ‘CURLINFO_PROTOCOL’ is deprecated: since 7.85.0. Use CURLINFO_SCHEME [-Werror=deprecated-declarations]
  142 |         code = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
      |         ^~~~
In file included from ../build/src/import/curl-util.h:4,
                 from ../build/src/import/pull-job.h:6,
                 from ../build/src/import/pull-common.h:7,
                 from ../build/src/import/pull-job.c:16:
/usr/include/curl/curl.h:2896:3: note: declared here
 2896 |   CURLINFO_PROTOCOL    CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
      |   ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Since both CURLINFO_SCHEME and CURLINFO_PROTOCOL were introduced in
the same curl version (7.52.0 [0][1]) we don't have to worry about
backwards compatibility.

[0] https://curl.se/libcurl/c/CURLINFO_SCHEME.html
[1] https://curl.se/libcurl/c/CURLINFO_PROTOCOL.html
2023-01-09 12:43:37 +01:00
Lennart Poettering
a3310012e8 Merge pull request #25979 from yuwata/coverity-fixes
Coverity fixes
2023-01-09 09:56:04 +01:00
Jan Janssen
d84bdadb43 boot: Remove option TPM PCR compat option
It says remove in 2023; happy to oblige.
2023-01-09 09:52:55 +01:00
Yu Watanabe
ff88b94953 udev: move device_rename() from device-private.c
The function is used only by udevd.
2023-01-09 15:02:55 +09:00
Yu Watanabe
1de6a49721 sd-device: do not directly access entry in sd-device object
No functional change, just refactoring.
2023-01-09 15:00:56 +09:00
Yu Watanabe
9a26098e90 sd-device: make device_set_syspath() clear sysname and sysnum
Otherwise, when a new syspath is assigned to the sd-device object,
sd_device_get_sysname() or _sysnum() will provide an outdated device
name or number.
2023-01-09 14:00:20 +09:00
Yu Watanabe
bb1234d1d6 udev: align table 2023-01-09 11:20:35 +09:00
Yu Watanabe
3d5af17045 bootctl: 'tmp' is always non-NULL
Fixes CID#1502330.
2023-01-09 11:00:56 +09:00