diff options
-rw-r--r-- | cgroup.c | 11 | ||||
-rw-r--r-- | cgroup.h | 2 |
2 files changed, 13 insertions, 0 deletions
@@ -540,3 +540,14 @@ CGroupBonding *cgroup_bonding_find_list(CGroupBonding *first, const char *contro return NULL; } + +char *cgroup_bonding_to_string(CGroupBonding *b) { + char *r; + + assert(b); + + if (asprintf(&r, "%s:%s", b->controller, b->path) < 0) + return NULL; + + return r; +} @@ -70,6 +70,8 @@ int cgroup_bonding_is_empty_list(CGroupBonding *first); CGroupBonding *cgroup_bonding_find_list(CGroupBonding *first, const char *controller); +char *cgroup_bonding_to_string(CGroupBonding *b); + #include "manager.h" int manager_setup_cgroup(Manager *m); |