mirror of
https://github.com/troglobit/finit.git
synced 2026-12-05 22:08:20 +00:00
cgutil: export more functions to initctl
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
fcb8ec9967
commit
728db73b09
2 files changed
+10
-3
No files matched your search
+3
-3
@@ -60,7 +60,7 @@ struct cg dummy; /* empty result "NULL" */
|
|||||||
struct cg *list;
|
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;
|
size_t i, sz;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
@@ -94,7 +94,7 @@ static char *pid_cmdline(int pid, char *buf, size_t len)
|
|||||||
return buf;
|
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;
|
FILE *fp;
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ static int cgroup_filter(const struct dirent *entry)
|
|||||||
return 1;
|
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;
|
struct dirent **namelist = NULL;
|
||||||
char s[32], r[32], l[32];
|
char s[32], r[32], l[32];
|
||||||
|
|||||||
@@ -24,6 +24,13 @@
|
|||||||
#ifndef FINIT_CGUTIL_H_
|
#ifndef FINIT_CGUTIL_H_
|
||||||
#define FINIT_CGUTIL_H_
|
#define FINIT_CGUTIL_H_
|
||||||
|
|
||||||
|
#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_cgroup (char *arg);
|
||||||
int show_cgtop (char *arg);
|
int show_cgtop (char *arg);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user