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-1.0.9~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8eda3d3bb64305c4fe73c229d2dada5ff91e876c;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 1bb9b9750..cb39b5b8e 100644 --- a/src/lxc/cgfs.c +++ b/src/lxc/cgfs.c @@ -1917,12 +1917,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; }