mirror of
https://github.com/troglobit/finit.git
synced 2026-10-28 12:30:44 +00:00
cgroup: basic instrumentation of critical functions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
19b18afac9
commit
c97c83bfb6
1 file changed
+3
@@ -44,6 +44,7 @@ static void cgset(const char *path, char *ctrl, char *prop)
|
|||||||
{
|
{
|
||||||
char *val;
|
char *val;
|
||||||
|
|
||||||
|
_d("path %s, ctrl %s, prop %s", path ?: "NIL", ctrl ?: "NIL", prop ?: "NIL");
|
||||||
if (!path || !ctrl) {
|
if (!path || !ctrl) {
|
||||||
_e("Missing path or controller, skipping!");
|
_e("Missing path or controller, skipping!");
|
||||||
return;
|
return;
|
||||||
@@ -86,6 +87,7 @@ static void group_init(char *path, int leaf, const char *cfg)
|
|||||||
{
|
{
|
||||||
char *ptr, *s;
|
char *ptr, *s;
|
||||||
|
|
||||||
|
_d("path %s, leaf %d, cfg %s", path, leaf, cfg ?: "NIL");
|
||||||
if (!fisdir(path)) {
|
if (!fisdir(path)) {
|
||||||
if (mkdir(path, 0755)) {
|
if (mkdir(path, 0755)) {
|
||||||
_pe("Failed creating cgroup %s", path);
|
_pe("Failed creating cgroup %s", path);
|
||||||
@@ -123,6 +125,7 @@ static int cgroup_leaf_init(char *group, char *name, int pid, const char *cfg)
|
|||||||
{
|
{
|
||||||
char path[256];
|
char path[256];
|
||||||
|
|
||||||
|
_d("group %s, name %s, pid %d, cfg %s", group, name, pid, cfg ?: "NIL");
|
||||||
if (pid <= 1) {
|
if (pid <= 1) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in new issue
Block a user