journald: get rid of get_process_capeff(), use pidref_get_capability() instead

This does pretty much the same, but is nicer, since it parses things
properly.
This commit is contained in:
Lennart Poettering
2024-12-17 19:06:54 +01:00
parent a5370d35d6
commit 25b1a73f71
7 changed files with 9 additions and 42 deletions
-16
View File
@@ -500,22 +500,6 @@ int pidref_is_kernel_thread(const PidRef *pid) {
return result;
}
int get_process_capeff(pid_t pid, char **ret) {
const char *p;
int r;
assert(pid >= 0);
assert(ret);
p = procfs_file_alloca(pid, "status");
r = get_proc_field(p, "CapEff", WHITESPACE, ret);
if (r == -ENOENT)
return -ESRCH;
return r;
}
static int get_process_link_contents(pid_t pid, const char *proc_file, char **ret) {
const char *p;
int r;