mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
cgutil: export more functions to initctl
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+3
-3
@@ -60,7 +60,7 @@ struct cg dummy; /* empty result "NULL" */
|
||||
struct cg *list;
|
||||
|
||||
|
||||
static char *pid_cmdline(int pid, char *buf, size_t len)
|
||||
char *pid_cmdline(int pid, char *buf, size_t len)
|
||||
{
|
||||
size_t i, sz;
|
||||
char *ptr;
|
||||
@@ -94,7 +94,7 @@ static char *pid_cmdline(int pid, char *buf, size_t len)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *pid_comm(int pid, char *buf, size_t len)
|
||||
char *pid_comm(int pid, char *buf, size_t len)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
@@ -264,7 +264,7 @@ static int cgroup_filter(const struct dirent *entry)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cgroup_tree(char *path, char *pfx, int top)
|
||||
int cgroup_tree(char *path, char *pfx, int top)
|
||||
{
|
||||
struct dirent **namelist = NULL;
|
||||
char s[32], r[32], l[32];
|
||||
|
||||
+9
-2
@@ -24,8 +24,15 @@
|
||||
#ifndef FINIT_CGUTIL_H_
|
||||
#define FINIT_CGUTIL_H_
|
||||
|
||||
int show_cgroup (char *arg);
|
||||
int show_cgtop (char *arg);
|
||||
#include <stdlib.h>
|
||||
|
||||
char *pid_cmdline (int pid, char *buf, size_t len);
|
||||
char *pid_comm (int pid, char *buf, size_t len);
|
||||
|
||||
int cgroup_tree (char *path, char *pfx, int top);
|
||||
|
||||
int show_cgroup (char *arg);
|
||||
int show_cgtop (char *arg);
|
||||
|
||||
#endif /* FINIT_CGUTIL_H_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user