cgroups: reorder cgroup_get() arguments

parent a29cc280
...@@ -2500,9 +2500,9 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops, ...@@ -2500,9 +2500,9 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops,
return true; return true;
} }
int cgroup_get(struct lxc_conf *conf, const char *filename, int cgroup_get(struct lxc_conf *conf,
char *buf, size_t len, const char *name, const char *lxcpath,
const char *name, const char *lxcpath) const char *filename, char *buf, size_t len)
{ {
__do_close int unified_fd = -EBADF; __do_close int unified_fd = -EBADF;
ssize_t ret; ssize_t ret;
......
...@@ -191,9 +191,9 @@ __hidden extern void prune_init_scope(char *cg); ...@@ -191,9 +191,9 @@ __hidden extern void prune_init_scope(char *cg);
__hidden extern int cgroup_attach(const struct lxc_conf *conf, const char *name, __hidden extern int cgroup_attach(const struct lxc_conf *conf, const char *name,
const char *lxcpath, pid_t pid); const char *lxcpath, pid_t pid);
__hidden extern int cgroup_get(struct lxc_conf *conf, const char *filename, __hidden extern int cgroup_get(struct lxc_conf *conf, const char *name,
char *buf, size_t len, const char *name, const char *lxcpath, const char *filename,
const char *lxcpath); char *buf, size_t len);
static inline bool pure_unified_layout(const struct cgroup_ops *ops) static inline bool pure_unified_layout(const struct cgroup_ops *ops)
{ {
......
...@@ -3306,7 +3306,7 @@ static int do_lxcapi_get_cgroup_item(struct lxc_container *c, const char *subsys ...@@ -3306,7 +3306,7 @@ static int do_lxcapi_get_cgroup_item(struct lxc_container *c, const char *subsys
if (is_stopped(c)) if (is_stopped(c))
return -1; return -1;
ret = cgroup_get(c->lxc_conf, subsys, retv, inlen, c->name, c->config_path); ret = cgroup_get(c->lxc_conf, c->name, c->config_path, subsys, retv, inlen);
if (ret == ENOCGROUP2) { if (ret == ENOCGROUP2) {
cgroup_ops = cgroup_init(c->lxc_conf); cgroup_ops = cgroup_init(c->lxc_conf);
if (!cgroup_ops) if (!cgroup_ops)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment