1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

core: add default descriptions for slices

[  OK  ] Created slice system-getty.slice (Slice /system/getty).
[  OK  ] Created slice system-modprobe.slice (Slice /system/modprobe).
[  OK  ] Created slice system-sshd\x2dkeygen.slice (Slice /system/sshd-keygen).
[  OK  ] Created slice user.slice (User and Session Slice).

Before, the first three slices were shown without any description which didn't
look nice.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-06-29 09:10:42 +02:00
parent 04d232d807
commit 4dd21726f8

View File

@ -180,6 +180,14 @@ static int slice_load(Unit *u) {
if (r < 0)
return r;
if (!u->description) {
_cleanup_free_ char *tmp = NULL;
r = unit_name_to_path(u->id, &tmp);
if (r >= 0) /* Failure is ignored… */
u->description = strjoin("Slice ", tmp);
}
return slice_verify(s);
}