From: Christian Brauner Date: Tue, 2 Feb 2021 16:40:08 +0000 (+0100) Subject: cgroups: reorder cgroup_get() arguments X-Git-Tag: lxc-5.0.0~305^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3baf0fc8b9c2eb6226d395bd4771eae83e91b053;p=thirdparty%2Flxc.git cgroups: reorder cgroup_get() arguments Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index b8c6e640e..2e3a0a235 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -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; diff --git a/src/lxc/cgroups/cgroup.h b/src/lxc/cgroups/cgroup.h index b47561daa..151a610b4 100644 --- a/src/lxc/cgroups/cgroup.h +++ b/src/lxc/cgroups/cgroup.h @@ -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) { diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index eb29beb43..49bc110a9 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -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)