core: do not include names directly in error messages

This allows some strings constants to be deduplicated.
libsystemd-core.so + systemd are about 2k smaller.

Also tweak some messages for consistency. We used 'exec' in one place and
'execute' in all other messages.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-05-31 15:35:02 +02:00
parent 9e2befbf4b
commit 2b2ca7ff2a
4 changed files with 11 additions and 13 deletions
+3 -4
View File
@@ -705,10 +705,9 @@ static void scope_enumerate_perpetual(Manager *m) {
u = manager_get_unit(m, SPECIAL_INIT_SCOPE);
if (!u) {
r = unit_new_for_name(m, sizeof(Scope), SPECIAL_INIT_SCOPE, &u);
if (r < 0) {
log_error_errno(r, "Failed to allocate the special " SPECIAL_INIT_SCOPE " unit: %m");
return;
}
if (r < 0)
return (void) log_error_errno(r, "Failed to allocate the special %s unit: %m",
SPECIAL_INIT_SCOPE);
}
u->transient = true;