Commit Graph

81211 Commits

Author SHA1 Message Date
Daan De Meyer
2782dae50f compress: Drop lz4 includes from compress.h
The lz4 functions are only used in test-compress.c, so let's just
put the declarations and includes in there instead of having everyone
including compress.h pull in the lz4 headers.
2025-05-09 11:33:33 +02:00
Daan De Meyer
7227d5bfff terminal-util: Move various functions to ansi-color.c 2025-05-09 11:33:33 +02:00
Daan De Meyer
c992250c24 basic: Move parts of audit-util.{c,h} to libaudit-util.{c,h} in shared/ 2025-05-09 11:33:33 +02:00
Daan De Meyer
3b7d332047 macro: Reduce transitive includes 2025-05-09 11:33:31 +02:00
Daan De Meyer
3b58245624 basic: Override glibc's sys/param.h header with an empty file
Instead of unconditionally including sys/param.h in
macro-fundamental.h which itself includes a bunch of other unnecessary
headers, let's override it with an empty file to avoid it from overriding
our MAX() macro. We can't make including it an error as it's included (
for seemingly no good reason) by <resolv.h>.
2025-05-09 11:23:14 +02:00
Yu Watanabe
8449d38d6f boot: Add EDID (#36843)
This adds a couple of custom CHIDs which include panel manufacturer and
product code.
2025-05-08 02:48:00 +09:00
Lennart Poettering
0d5ee894c4 exec-util: make missing agents a gracefull handled issues
Just downgrade the log message in case of ENOENT of agent binaries to
LOG_DEBUG. Do this in order to support distros which split off some
agent bianries into separate optional binaries.

Fixes: #37369
2025-05-08 02:38:47 +09:00
Todd C. Miller
ffb6adb763 flush_ports: flush POSIX message queues properly
On Linux, read() on a message queue descriptor returns the message
queue statistics, not the actual message queue data.  We need to use
mq_receive() to drain the queues instead.

Fixes a problem where a POSIX message queue socket unit with messages
in the queue at shutdown time could result in a hang on reboot/shutdown.
2025-05-08 02:37:45 +09:00
Yu Watanabe
676fb42aae units: enable IgnoreOnIsolate=yes on systemd-udevd-kernel.socket
Otherwise, initrd-cleanup.service requests isolation thus the socket
is stopped before switching root, and several early events after
switching root may be lost.
2025-05-08 01:29:53 +09:00
anonymix007
9fed4ec252 analyze-chid: Support EDID CHIDs 2025-05-07 18:52:49 +03:00
anonymix007
907328749f sd-device: Introduce sd_device_get_sysattr_value_with_size() 2025-05-07 18:52:49 +03:00
anonymix007
eec1f041b1 chid: Setup EDID CHIDs 2025-05-07 18:52:49 +03:00
anonymix007
3481f8f86d chid-fundamental: Introduce new CHID types
These are extra types needed to distinguish devices by the installed
display panel
2025-05-07 18:52:49 +03:00
anonymix007
e864741511 boot: Add EDID parsing
Will be used for identifying the currently used display panel
and choosing the appropriate DTB
2025-05-07 18:52:49 +03:00
anonymix007
c453aac65f fundamental: Introduce EDID header parsing 2025-05-07 18:10:51 +03:00
anonymix007
edda8d51f1 boot: Add be16toh, le16toh and le32toh 2025-05-07 18:10:51 +03:00
anonymix007
f504ce8407 fundamental: Move common string constants from basic/string-util.h to string-util-fundamental.h 2025-05-07 18:10:51 +03:00
Yu Watanabe
2e72d3efaf Reduce the number of transitive includes (#37364) 2025-05-07 22:58:09 +09:00
Daan De Meyer
decad4826d static-destruct: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
e53d4f343d iovec-util: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
dc7b151264 rm-rf: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
b78d73fa22 conf-parser: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
e548ca38b9 device-util: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
6553db6063 strv: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
d9ccf6b349 path-util: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
fda652117e fs-util: Reduce transitive includes 2025-05-07 22:04:46 +09:00
Daan De Meyer
c034915cb6 af-list: Remove transitive includes 2025-05-07 22:04:46 +09:00
Zbigniew Jędrzejewski-Szmek
463c301fbb test-sd-login: add a "test" that just calls all sd_pid_get_* functions
As a test, it just increases our code coverage in a fake way.
When run manually, it can be used to conveniently print what logind
thinks about various processes:

$ build/test-sd-login
sd_pid_get_session(0) → No data available
sd_pid_get_unit(0) → user@1000.service
sd_pid_get_user_unit(0) → app-ghostty-transient-5088.scope
sd_pid_get_machine_name(0) → No such file or directory
sd_pid_get_slice(0) → user-1000.slice
sd_pid_get_user_slice(0) → app.slice
sd_pid_get_owner_uid(0) → 1000
sd_pid_get_cgroup(0) → /user.slice/user-1000.slice/user@1000.service/app.slice/app-ghostty-transient-5088.scope/surfaces/556FAF50BA40.scope

$ build/test-sd-login cgroup 1
sd_pid_get_cgroup(1) → /init.scope
2025-05-07 22:02:46 +09:00
Zbigniew Jędrzejewski-Szmek
8ae4cbb168 test-sd-device: drop chunk added by mistake
I initially wrote it this way, but then decided to implement a loop
limit, but forgot to drop the first approach in one place.
Fixup for 74cb65e45f.
2025-05-07 22:02:46 +09:00
Yu Watanabe
88db1efac9 Reword descriptions of RestrictAddressFamilies= and SystemCallFilter= (#37367) 2025-05-07 15:34:25 +09:00
Mike Yuan
b04ddbcbd7 string-table: annotate _to_string and _from_string with _const_ and _pure_, respectively
Follow-up for c94f6ab1bf
2025-05-06 23:07:00 +02:00
Zbigniew Jędrzejewski-Szmek
2dc4e87849 man/systemd.exec: reword description of RestrictAddressFamilies=
The text is reordered and broken into more paragraphs.
A recommendation to combine RestrictAddressFamilies= with
SystemCallFilter=@service is added.
2025-05-06 21:14:03 +02:00
Zbigniew Jędrzejewski-Szmek
802d23fcfb man/systemd.exec: reword description of SystemCallFilter=
The existing text grew organically as features were added and was
not very organized. Reorder it and break into paragraphs grouped
by topic. The description of the :errno syntax is replaced by a short
reference to the SystemCallErrorNumber= setting. This makes the
text shorter and makes it easier to explain how the two settings combine.
2025-05-06 21:14:03 +02:00
damnkiwi6120
eda164cd4a Replace reference URLs with working ones
The linuxfoundation.org entry at L50 goes 404, so I replace it with a working one from kernel.org.

Both links are checked with archive.org.
https://web.archive.org/web/20231114104223/https://lists.linuxfoundation.org/pipermail/virtualization/2015-August/030331.html
https://web.archive.org/web/20230503084037/https://docs.kernel.org/s390/pci.html
2025-05-07 04:10:33 +09:00
Yu Watanabe
dde0ed6335 core/service: minor cleanups (#37362)
Split out from #37071
2025-05-07 02:09:19 +09:00
Mike Yuan
61ce6e673e run0: disable IgnoreSIGPIPE= for transient unit 2025-05-07 01:39:04 +09:00
Yu Watanabe
13e4201dc9 Bugprone argument comments - round 3 (#37356)
Follow up from https://github.com/systemd/systemd/pull/37346
2025-05-07 01:38:34 +09:00
Salim B
e0a5e2d66b docs: fix typos 2025-05-07 00:49:49 +09:00
Daan De Meyer
1fbfbe81b5 tree-wide: Get rid of prefix_roota() in favor of path_join()
We deprecated prefix_roota() in favor of chase() and path_join().
Let's finish the removal by replacing the few remaining call sites
with path_join().
2025-05-06 17:40:33 +02:00
Daan De Meyer
38c9ca5380 tree-wide: Remove strv_from_stdarg_alloca()
It's trivial to replace all uses of this function with STRV_MAKE()
and strv_new_ap() so let's get rid of this variant.
2025-05-06 17:40:01 +02:00
Mike Yuan
c0239e5f11 macro: implement ABS via __builtin_imaxabs() 2025-05-06 17:39:01 +02:00
Lennart Poettering
e9f9ddbfa8 boot: make console_key_read() return param optional
Inspired by #36684
2025-05-06 17:38:25 +02:00
Daan De Meyer
efc529cfbd Add missing alloc-util.h to string-util.h
Used by strndupa_safe() and strdupa_safe().

Follow up for 02207b54d5
2025-05-06 17:38:11 +02:00
Jelle van der Waa
4c94ea02a5 core: prefer American spelling of canceled 2025-05-06 16:26:47 +02:00
Jelle van der Waa
70201ae720 libsystemd-network: correct argument comment 2025-05-06 16:26:47 +02:00
Jelle van der Waa
1c04b172f1 treewide: correct argument comments for show_boot_entry 2025-05-06 16:26:47 +02:00
Jelle van der Waa
fbe89a80b9 test: correct argument comment expected 2025-05-06 16:26:47 +02:00
Jelle van der Waa
72c389254a treewide: correct argument comments for event_reset_time_relative 2025-05-06 16:26:47 +02:00
Jelle van der Waa
3e813860c0 shared: use implementation argument naming for dissect_loop_device 2025-05-06 16:26:47 +02:00
Jelle van der Waa
c147cd9acb treewide: correct argument comments for sd_notify 2025-05-06 16:26:47 +02:00