From: Serge Hallyn Date: Sat, 20 Feb 2016 02:43:50 +0000 (-0800) Subject: cgfs: also check for EACCES when writing devices X-Git-Tag: lxc-2.0.0.rc2~9^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dddf7c5b7e0fbf35006bbf3a524c0c15ed687deb;p=thirdparty%2Flxc.git cgfs: also check for EACCES when writing devices Because that's what lxcfs gives us. Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/cgfs.c b/src/lxc/cgfs.c index f303a11d2..603d63af2 100644 --- a/src/lxc/cgfs.c +++ b/src/lxc/cgfs.c @@ -1918,12 +1918,12 @@ static int do_setup_cgroup_limits(struct cgfs_data *d, cgroup_devices_has_allow_or_deny(d, cg->value, true)) continue; if (lxc_cgroup_set_data(cg->subsystem, cg->value, d)) { - if (do_devices && errno == EPERM) { + if (do_devices && (errno == EACCES || errno == EPERM)) { WARN("Error setting %s to %s for %s", cg->subsystem, cg->value, d->name); continue; } - ERROR("Error setting %s to %s for %s", + SYSERROR("Error setting %s to %s for %s", cg->subsystem, cg->value, d->name); goto out; }