process-util: add pidref_get_comm() and rename get_process_comm() to pid_get_comm()

This commit is contained in:
Lennart Poettering
2023-10-18 14:39:33 +02:00
parent d57d521cae
commit d7d748548b
28 changed files with 80 additions and 59 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ int logind_check_inhibitors(enum action a) {
ACTION_KEXEC) ? "shutdown" : "sleep"))
continue;
(void) get_process_comm(pid, &comm);
(void) pid_get_comm(pid, &comm);
user = uid_to_name(uid);
log_warning("Operation inhibited by \"%s\" (PID "PID_FMT" \"%s\", user %s), reason is \"%s\".",
+2 -2
View File
@@ -626,7 +626,7 @@ static void print_status_info(
if (arg_transport == BUS_TRANSPORT_LOCAL) {
_cleanup_free_ char *comm = NULL;
(void) get_process_comm(i->main_pid, &comm);
(void) pid_get_comm(i->main_pid, &comm);
if (comm)
printf(" (%s)", comm);
}
@@ -661,7 +661,7 @@ static void print_status_info(
printf(PID_FMT, i->control_pid);
if (arg_transport == BUS_TRANSPORT_LOCAL) {
(void) get_process_comm(i->control_pid, &c);
(void) pid_get_comm(i->control_pid, &c);
if (c)
printf(" (%s)", c);
}