static void lxc_cgroup_mount_point_free(struct cgroup_mount_point *mp);
static void lxc_cgroup_hierarchy_free(struct cgroup_hierarchy *h);
static bool is_valid_cgroup(const char *name);
-static int create_or_remove_cgroup(bool remove, struct cgroup_mount_point *mp, const char *path, int recurse);
static int create_cgroup(struct cgroup_mount_point *mp, const char *path);
static int remove_cgroup(struct cgroup_mount_point *mp, const char *path, bool recurse);
static char *cgroup_to_absolute_path(struct cgroup_mount_point *mp, const char *path, const char *suffix);
return ret;
}
-struct cgroup_process_info *lxc_cgroup_process_info_getx(const char *proc_pid_cgroup_str, struct cgroup_meta_data *meta)
+static struct cgroup_process_info *
+lxc_cgroup_process_info_getx(const char *proc_pid_cgroup_str,
+ struct cgroup_meta_data *meta)
{
struct cgroup_process_info *result = NULL;
FILE *proc_pid_cgroup = NULL;
return NULL;
}
-char **subsystems_from_mount_options(const char *mount_options, char **kernel_list)
+static char **subsystems_from_mount_options(const char *mount_options,
+ char **kernel_list)
{
char *token, *str, *saveptr = NULL;
char **result = NULL;
return NULL;
}
-void lxc_cgroup_mount_point_free(struct cgroup_mount_point *mp)
+static void lxc_cgroup_mount_point_free(struct cgroup_mount_point *mp)
{
if (!mp)
return;
free(mp);
}
-void lxc_cgroup_hierarchy_free(struct cgroup_hierarchy *h)
+static void lxc_cgroup_hierarchy_free(struct cgroup_hierarchy *h)
{
if (!h)
return;
free(h);
}
-bool is_valid_cgroup(const char *name)
+static bool is_valid_cgroup(const char *name)
{
const char *p;
for (p = name; *p; p++) {
return strcmp(name, ".") != 0 && strcmp(name, "..") != 0;
}
-int create_or_remove_cgroup(bool do_remove, struct cgroup_mount_point *mp, const char *path, int recurse)
+static int create_or_remove_cgroup(bool do_remove,
+ struct cgroup_mount_point *mp, const char *path, int recurse)
{
int r, saved_errno = 0;
char *buf = cgroup_to_absolute_path(mp, path, NULL);
return r;
}
-int create_cgroup(struct cgroup_mount_point *mp, const char *path)
+static int create_cgroup(struct cgroup_mount_point *mp, const char *path)
{
return create_or_remove_cgroup(false, mp, path, false);
}
-int remove_cgroup(struct cgroup_mount_point *mp, const char *path, bool recurse)
+static int remove_cgroup(struct cgroup_mount_point *mp,
+ const char *path, bool recurse)
{
return create_or_remove_cgroup(true, mp, path, recurse);
}
-char *cgroup_to_absolute_path(struct cgroup_mount_point *mp, const char *path, const char *suffix)
+static char *cgroup_to_absolute_path(struct cgroup_mount_point *mp,
+ const char *path, const char *suffix)
{
/* first we have to make sure we subtract the mount point's prefix */
char *prefix = mp->mount_prefix;
return buf;
}
-struct cgroup_process_info *find_info_for_subsystem(struct cgroup_process_info *info, const char *subsystem)
+static struct cgroup_process_info *
+find_info_for_subsystem(struct cgroup_process_info *info, const char *subsystem)
{
struct cgroup_process_info *info_ptr;
for (info_ptr = info; info_ptr; info_ptr = info_ptr->next) {
return NULL;
}
-int do_cgroup_get(const char *cgroup_path, const char *sub_filename, char *value, size_t len)
+static int do_cgroup_get(const char *cgroup_path, const char *sub_filename,
+ char *value, size_t len)
{
const char *parts[3] = {
cgroup_path,
return ret;
}
-int do_cgroup_set(const char *cgroup_path, const char *sub_filename, const char *value)
+static int do_cgroup_set(const char *cgroup_path, const char *sub_filename,
+ const char *value)
{
const char *parts[3] = {
cgroup_path,
return ret;
}
-int do_setup_cgroup(struct lxc_handler *h, struct lxc_list *cgroup_settings, bool do_devices)
+static int do_setup_cgroup(struct lxc_handler *h,
+ struct lxc_list *cgroup_settings, bool do_devices)
{
struct lxc_list *iterator;
struct lxc_cgroup *cg;
return ret;
}
-bool cgroup_devices_has_allow_or_deny(struct lxc_handler *h, char *v, bool for_allow)
+static bool cgroup_devices_has_allow_or_deny(struct lxc_handler *h,
+ char *v, bool for_allow)
{
char *path;
FILE *devices_list;
return ret;
}
-int cgroup_recursive_task_count(const char *cgroup_path)
+static int cgroup_recursive_task_count(const char *cgroup_path)
{
DIR *d;
struct dirent *dent_buf;
return n;
}
-int count_lines(const char *fn)
+static int count_lines(const char *fn)
{
FILE *f;
char *line = NULL;
return n;
}
-int handle_cgroup_settings(struct cgroup_mount_point *mp, char *cgroup_path)
+static int handle_cgroup_settings(struct cgroup_mount_point *mp,
+ char *cgroup_path)
{
int r, saved_errno = 0;
char buf[2];