]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip vrf: Improve cgroup2 error messages
authorDavid Ahern <dsa@cumulusnetworks.com>
Fri, 6 Jan 2017 00:22:22 +0000 (16:22 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 9 Jan 2017 20:13:08 +0000 (12:13 -0800)
commit2bbc5b0726611d0faf7895ec01a42286e26c8ca4
tree06e906264998299b528443d21f8e7c3fbd18c27d
parentedbae5e0b21d915015fa87c16690171ca71b79bf
ip vrf: Improve cgroup2 error messages

Currently, if a non-root user attempts to run ip vrf exec a non-helpful
error is returned:

$ ip vrf exec mgmt bash
Failed to mount cgroup2. Are CGROUPS enabled in your kernel?

Only show the CGROUPS kernel hint for the ENODEV error and for the
rest show the strerror for the errno. So now:

$ ip/ip vrf exec mgmt bash
Failed to mount cgroup2: Operation not permitted

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
lib/fs.c