]> git.ipfire.org Git - thirdparty/lxc.git/commit
[cgfsng] show wrong errno
authorduguhaotian <duguhaotian@gmail.com>
Fri, 26 Jan 2018 13:07:58 +0000 (21:07 +0800)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 6 Feb 2018 12:34:31 +0000 (13:34 +0100)
commitd1d02d493ceca4674479471510c03f9e987a117c
tree9e49d0abeef7e1ae2ee6d5e4a6b6600545d8f7c6
parent509862e9316a50d6d8ba69d8b7e7235d096aef9e
[cgfsng] show wrong errno

lxc_cgroup_set_data: h = get_hierarchy(controller);
if h is NULL, now errno is old, it donot set new one.
And then,
cgfsng_setup_limits:

    if (lxc_cgroup_set_data(cg->subsystem, cg->value, d)) {
if (do_devices && (errno == EACCES ||
errno == EPERM)) {
WARN("Error setting %s to %s for %s",
cg->subsystem, cg->value,
d->name);
continue;
}
SYSERROR("Error setting %s to %s for
 %s",
 cg->subsystem, cg->value,
 d->name);
goto out;
}

SYSERROR will show old errno, make me confused.

Signed-off-by: duguhaotian <duguhaotian@gmail.com>
src/lxc/cgroups/cgfsng.c