Yu Watanabe
7c087d802f
Remove overzealous checks ( #37493 )
2025-05-17 01:37:18 +09:00
Zbigniew Jędrzejewski-Szmek
f4bdf373c5
basic/terminal-util: simplify output param handling
...
Those static functions were written to support optional output params, but they
are only ever called with the output param set, and it doesn't make sense to
ever call them without the output param. Since those are internal functions,
drop this unused complexity.
2025-05-16 15:33:50 +02:00
Zbigniew Jędrzejewski-Szmek
5b5545f112
basic/terminal-util: drop 'U' suffix
...
C automatically casts a signed int to unsigned in binary operation with an
unsigned int. Thus that suffix is not useful. Also surrounding code doesn't use
it.
2025-05-16 15:33:10 +02:00
Zbigniew Jędrzejewski-Szmek
5ecd641ac8
src/boot: assume that intmax_t is the biggest integer
...
Same as in 81d7934882 , intmax_t by definition is
the widest int. Strictly speaking, the check whether
sizeof(intmax_t) == sizeof(long long)
in the code below is redundant, but I think it's nicer to keep it for symmetry
with the other cases.
Requested in
https://github.com/systemd/systemd/pull/37442#pullrequestreview-2840906908 .
2025-05-16 15:31:58 +02:00
Lennart Poettering
b177095bfa
terminal-util: explicitly reset cursor
...
Apparently there are terminals where our usual reset is not enough to
turn the cursor back on. Hence do so explicitly.
Fixes : #22168
2025-05-16 21:42:32 +09:00
Daan De Meyer
96b9d4162f
bpf-link: Add HAVE_LIBBPF check
...
Fixes compilation error in userns-restrict.c where we try to include
libbpf.h when it is not available.
2025-05-16 21:36:15 +09:00
Yu Watanabe
ed3dce108d
varlink: fix typo
...
Follow-up for 736349958e .
2025-05-16 17:47:54 +09:00
Yu Watanabe
bfc8941098
journalctl: fix typo
...
Follow-up for d2f45c7681 .
2025-05-16 17:46:20 +09:00
Lennart Poettering
645e35633f
Clean up includes ( #37467 )
...
Split out of #37344
More small components that shouldn't be all too controversial.
2025-05-16 10:07:19 +02:00
Lennart Poettering
22b5ddb90f
tree-wide: fix use of flink_tmpfile()
...
Let's always make sure the temporary file returned by fopen_tmpfile()
and friends is removed on failure (via _cleanup_). Conversely, make sure
that once the file is renamed into its final place, we no longer try to
remove the temporary file (since it's not going to exist anymore).
2025-05-16 08:28:42 +02:00
Daan De Meyer
ef10d4b526
Bugprone argument comment - round 5 ( #37481 )
2025-05-15 20:33:50 +02:00
Jelle van der Waa
346c62f9ca
treewide: correct argument comments
2025-05-15 15:39:20 +02:00
Jelle van der Waa
f15dcafdb1
discover-image: correct argument comments
2025-05-15 14:50:33 +02:00
Mike Yuan
7762e9bbb2
core: always enable CPU accounting; cgtop: drop cgv1 handling ( #37448 )
2025-05-15 14:41:07 +02:00
Luca Boccassi
ed5c3f4436
core: use socket cookie for naming per-connection service instances + set $SO_COOKIE env var to it ( #37469 )
2025-05-15 11:11:21 +01:00
Lennart Poettering
62e5b90a49
varlink: two tweaks for method call handling ( #37466 )
2025-05-15 11:28:58 +02:00
Jelle van der Waa
d495a31f9b
test: correct argument comments
2025-05-15 11:14:04 +02:00
Jelle van der Waa
274da0b67b
terminal-util: rename openpt_allocate_* ret_peer argument
...
Make it consistent with its implementation.
2025-05-15 11:12:43 +02:00
Jelle van der Waa
5ae4d7c9ba
tpm2-util: correct argument comments
2025-05-15 11:12:43 +02:00
Jelle van der Waa
ccf379b46e
sd-varlink: fix argument comment
...
Follow-up for 52068c1e9c
2025-05-15 11:12:43 +02:00
Jelle van der Waa
2f75e5efa1
tpm2-util: rename tpm2_unseal arguments
...
To make it consistent with its implementation.
2025-05-15 11:12:28 +02:00
Yu Watanabe
6a4fe38f7f
network: do not drop duplicated entries in loop
...
Fixes #37456 .
2025-05-15 09:49:46 +02:00
Lennart Poettering
9be6e18444
core: name socket unit instances after the socket cookie
...
On linux sockets have a really good, unique identifier, the SO_COOKIE,
which is used by sockdiag and BPF and elsewhere. Let's expose this more
prominently in the service name of per-connection services invoked via
Accept=yes sockets.
This is really nice, because together with our $SO_COOKIE env var we can
now match up services, process execution contexts, and "ss" outputs, BPF
rules, and more.
2025-05-15 09:45:33 +02:00
Lennart Poettering
bfb1f9e2c9
core: pass the socket cookie to invoked per-connection service instances as $SO_COOKIE env var
...
The socket cookie is just too useful for identifying connections, let's
emphasize this a bit and pass it as environment variable.
2025-05-15 09:45:32 +02:00
Lennart Poettering
272017d32a
socket-util: add trivial socket_get_cookie() helper
2025-05-15 09:45:19 +02:00
Lennart Poettering
8d7d2edcbb
bus-polkit: add a generic vtable for methods with no params, but with polkit
2025-05-15 09:31:27 +02:00
Lennart Poettering
231cab5c5e
core: always handle method call params via sd_varlink_dispatch(), even if we accept none
...
This results in much more precise errors for the clients, and is what we
do everywhere else these days.
2025-05-15 09:31:27 +02:00
Mike Yuan
29da53dde3
core: always enable CPU accounting
...
Our baseline is v5.4 and cgroup v2 is enforced now,
which means CPU accounting is cheap everywhere without
requiring any controller, hence just remove the directive.
2025-05-15 02:19:16 +02:00
Mike Yuan
5fde5c0399
systemctl-show: drop BlockIO* property formatter
2025-05-15 02:19:15 +02:00
Mike Yuan
3274ef6792
core: drop Manager.blockio_accounting
...
Follow-up for 98d64ff500
2025-05-15 02:19:15 +02:00
Mike Yuan
0fc54e2390
cgtop: drop v1 support
2025-05-15 02:19:15 +02:00
Mike Yuan
946eea7a7f
mountpoint-util: remove unused TMPFS_LIMITS_SYS_FS_CGROUP
...
Follow-up for 6801a9d88a
2025-05-15 09:00:51 +09:00
Mike Yuan
68a2435cc2
cgroup-util: drop cg_kill() cgroup.threads kludge
...
Our baseline is v5.4 now.
2025-05-15 07:26:03 +09:00
Yu Watanabe
231557fe40
resolve: fix typo
...
Follow-up for 801ad6a6a9 .
2025-05-15 07:19:24 +09:00
Daan De Meyer
3e0f1aff94
portable: Clean up includes
...
Split out of #37344 .
2025-05-15 00:02:00 +02:00
Daan De Meyer
b06adfb06c
coredump: Clean up includes
...
Split out of #37344 .
2025-05-15 00:02:00 +02:00
Daan De Meyer
8b4a4e996c
hibernate-resume: Clean up includes
...
Split out of #37344 .
2025-05-15 00:02:00 +02:00
Daan De Meyer
2bb89066da
integritysetup: Clean up includes
...
Split out of #37344 .
2025-05-15 00:02:00 +02:00
Daan De Meyer
a7dad604d7
locale: Clean up includes
...
Split out of #37344 .
2025-05-15 00:01:59 +02:00
Daan De Meyer
a1e519910b
nsresourced: Clean up includes
...
Split out of #37344 .
2025-05-15 00:01:59 +02:00
Daan De Meyer
25fef10b33
userns-restrict: Move HAVE_VMLINUX check into functions
...
Let's do these checks like we try to do them elsewhere, in the
function, not outside. This avoids having to declare the function
arguments twice and keeps the logic for each function together
instead of spread out across the file.
2025-05-15 00:01:59 +02:00
Daan De Meyer
e59fa61ba2
mountfsd: Clean up includes
...
Split out of #37344 .
2025-05-15 00:01:59 +02:00
Daan De Meyer
ca00c93962
nss: Clean up includes
...
Split out of #37344 .
2025-05-15 00:01:59 +02:00
Daan De Meyer
06b5f13db3
shutdown: Clean up includes
...
Split out of #37344 .
2025-05-15 00:01:59 +02:00
Daan De Meyer
3b21af5234
hashmap: Split out iterator.h
...
As preparation for #37344 , let's split out iterator.h so we can
avoid including the entirety of hashmap.h where it's not needed.
2025-05-15 00:01:32 +02:00
Daan De Meyer
bfe1e8fc5e
busctl: Clean up includes
...
Split out of #37344 .
2025-05-15 00:00:03 +02:00
Daan De Meyer
546bba9097
path: Clean up includes
2025-05-15 00:00:03 +02:00
Daan De Meyer
6795ef3505
timedate: Clean up includes
...
Split out of #37344 .
2025-05-15 00:00:03 +02:00
Daan De Meyer
2a5559c290
userdb: Clean up includes
...
Split out of #37344 .
2025-05-15 00:00:03 +02:00
Daan De Meyer
90711654df
user-record: Make sure UserStorage enum has the same name as its typedef
2025-05-15 00:00:03 +02:00