]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: reorder cgroup_get() arguments
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 2 Feb 2021 16:40:08 +0000 (17:40 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 2 Feb 2021 16:40:08 +0000 (17:40 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup.h
src/lxc/lxccontainer.c

index b8c6e640e370fd657e9d78dcf24c67e80ce9d102..2e3a0a235cce435ea84e7a5e49fe19953af401a5 100644 (file)
@@ -2500,9 +2500,9 @@ __cgfsng_ops static bool cgfsng_attach(struct cgroup_ops *ops,
        return true;
 }
 
-int cgroup_get(struct lxc_conf *conf, const char *filename,
-              char *buf, size_t len,
-              const char *name, const char *lxcpath)
+int cgroup_get(struct lxc_conf *conf,
+              const char *name, const char *lxcpath,
+              const char *filename, char *buf, size_t len)
 {
        __do_close int unified_fd = -EBADF;
        ssize_t ret;
index b47561daae2707959d38f77be90deda12460888a..151a610b405d3b3d3a846c04a67ae6aa59c7b713 100644 (file)
@@ -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,
                                  const char *lxcpath, pid_t pid);
-__hidden extern int cgroup_get(struct lxc_conf *conf, const char *filename,
-                               char *buf, size_t len, const char *name,
-                               const char *lxcpath);
+__hidden extern int cgroup_get(struct lxc_conf *conf, const char *name,
+                               const char *lxcpath, const char *filename,
+                               char *buf, size_t len);
 
 static inline bool pure_unified_layout(const struct cgroup_ops *ops)
 {
index eb29beb43c7ea07e092d93360019c572e8d36431..49bc110a9712de402cc86d7bab7193ccff8cf91f 100644 (file)
@@ -3306,7 +3306,7 @@ static int do_lxcapi_get_cgroup_item(struct lxc_container *c, const char *subsys
        if (is_stopped(c))
                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) {
                cgroup_ops = cgroup_init(c->lxc_conf);
                if (!cgroup_ops)