process-util: add pidref_get_comm() and rename get_process_comm() to pid_get_comm()
This commit is contained in:
@@ -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\".",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user