#include "include/strlcat.h"
#endif
+#define __cgfsng_ops__
+
lxc_log_define(cgfsng, cgroup);
static void free_string_list(char **clist)
return cgroup_rmdir(arg->hierarchies, arg->container_cgroup);
}
-static void cgfsng_destroy(struct cgroup_ops *ops, struct lxc_handler *handler)
+__cgfsng_ops__ static void cgfsng_destroy(struct cgroup_ops *ops, struct lxc_handler *handler)
{
int ret;
struct generic_userns_exec_data wrap;
/* Try to create the same cgroup in all hierarchies. Start with cgroup_pattern;
* next cgroup_pattern-1, -2, ..., -999.
*/
-static inline bool cgfsng_create(struct cgroup_ops *ops,
- struct lxc_handler *handler)
+__cgfsng_ops__ static inline bool cgfsng_create(struct cgroup_ops *ops,
+ struct lxc_handler *handler)
{
int i;
size_t len;
return false;
}
-static bool cgfsng_enter(struct cgroup_ops *ops, pid_t pid)
+__cgfsng_ops__ static bool cgfsng_enter(struct cgroup_ops *ops, pid_t pid)
{
int i, len;
char pidstr[25];
return 0;
}
-static bool cgfsng_chown(struct cgroup_ops *ops, struct lxc_conf *conf)
+__cgfsng_ops__ static bool cgfsng_chown(struct cgroup_ops *ops,
+ struct lxc_conf *conf)
{
struct generic_userns_exec_data wrap;
return __cg_mount_direct(type, h, controllerpath);
}
-static bool cgfsng_mount(struct cgroup_ops *ops, struct lxc_handler *handler,
- const char *root, int type)
+__cgfsng_ops__ static bool cgfsng_mount(struct cgroup_ops *ops,
+ struct lxc_handler *handler,
+ const char *root, int type)
{
int i, ret;
char *tmpfspath = NULL;
return count;
}
-static int cgfsng_nrtasks(struct cgroup_ops *ops)
+__cgfsng_ops__ static int cgfsng_nrtasks(struct cgroup_ops *ops)
{
int count;
char *path;
}
/* Only root needs to escape to the cgroup of its init. */
-static bool cgfsng_escape(const struct cgroup_ops *ops, struct lxc_conf *conf)
+__cgfsng_ops__ static bool cgfsng_escape(const struct cgroup_ops *ops,
+ struct lxc_conf *conf)
{
int i;
return true;
}
-static int cgfsng_num_hierarchies(struct cgroup_ops *ops)
+__cgfsng_ops__ static int cgfsng_num_hierarchies(struct cgroup_ops *ops)
{
int i;
return i;
}
-static bool cgfsng_get_hierarchies(struct cgroup_ops *ops, int n, char ***out)
+__cgfsng_ops__ static bool cgfsng_get_hierarchies(struct cgroup_ops *ops, int n, char ***out)
{
int i;
/* TODO: If the unified cgroup hierarchy grows a freezer controller this needs
* to be adapted.
*/
-static bool cgfsng_unfreeze(struct cgroup_ops *ops)
+__cgfsng_ops__ static bool cgfsng_unfreeze(struct cgroup_ops *ops)
{
int ret;
char *fullpath;
return true;
}
-static const char *cgfsng_get_cgroup(struct cgroup_ops *ops,
- const char *controller)
+__cgfsng_ops__ static const char *cgfsng_get_cgroup(struct cgroup_ops *ops,
+ const char *controller)
{
struct hierarchy *h;
return fret;
}
-static bool cgfsng_attach(struct cgroup_ops *ops, const char *name,
- const char *lxcpath, pid_t pid)
+__cgfsng_ops__ static bool cgfsng_attach(struct cgroup_ops *ops, const char *name,
+ const char *lxcpath, pid_t pid)
{
int i, len, ret;
char pidstr[25];
* don't have a cgroup_data set up, so we ask the running container through the
* commands API for the cgroup path.
*/
-static int cgfsng_get(struct cgroup_ops *ops, const char *filename, char *value,
- size_t len, const char *name, const char *lxcpath)
+__cgfsng_ops__ static int cgfsng_get(struct cgroup_ops *ops, const char *filename,
+ char *value, size_t len, const char *name,
+ const char *lxcpath)
{
int ret = -1;
size_t controller_len;
* don't have a cgroup_data set up, so we ask the running container through the
* commands API for the cgroup path.
*/
-static int cgfsng_set(struct cgroup_ops *ops, const char *filename,
- const char *value, const char *name, const char *lxcpath)
+__cgfsng_ops__ static int cgfsng_set(struct cgroup_ops *ops,
+ const char *filename, const char *value,
+ const char *name, const char *lxcpath)
{
int ret = -1;
size_t controller_len;
return true;
}
-static bool cgfsng_setup_limits(struct cgroup_ops *ops, struct lxc_conf *conf,
- bool do_devices)
+__cgfsng_ops__ static bool cgfsng_setup_limits(struct cgroup_ops *ops,
+ struct lxc_conf *conf,
+ bool do_devices)
{
bool bret;
return cg_hybrid_init(ops, keep);
}
-static bool cgfsng_data_init(struct cgroup_ops *ops)
+__cgfsng_ops__ static bool cgfsng_data_init(struct cgroup_ops *ops)
{
const char *cgroup_pattern;