Commit d1953b26 by duguhaotian

[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: 's avatarduguhaotian <duguhaotian@gmail.com>
parent f37d1c22
...@@ -2143,6 +2143,7 @@ static int lxc_cgroup_set_data(const char *filename, const char *value, struct c ...@@ -2143,6 +2143,7 @@ static int lxc_cgroup_set_data(const char *filename, const char *value, struct c
"The controller seems to be unused by \"cgfsng\" cgroup " "The controller seems to be unused by \"cgfsng\" cgroup "
"driver or not enabled on the cgroup hierarchy", "driver or not enabled on the cgroup hierarchy",
controller); controller);
errno = ENOENT;
return -1; return -1;
} }
......
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