]> git.ipfire.org Git - thirdparty/lxc.git/commit
[cgfsng] show wrong errno 2109/head
authorduguhaotian <duguhaotian@gmail.com>
Fri, 26 Jan 2018 13:07:58 +0000 (21:07 +0800)
committerduguhaotian <duguhaotian@gmail.com>
Fri, 26 Jan 2018 13:07:58 +0000 (21:07 +0800)
commitd1953b26c87864808ce77958cccaeac69440fd17
tree21eeca2da76aea01adb51db4b60e77e411666b43
parentf37d1c220ecfcd21d3e95d2eec8b946d415c4bfa
[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