Re: [PATCH iproute2 2/3] ip vrf: Improve cgroup2 error messages

2017-01-06 Thread David Ahern
>> @@ -80,13 +80,21 @@ char *find_cgroup2_mount(void) >> >> if (mount("none", mnt, CGROUP2_FS_NAME, 0, NULL)) { >> /* EBUSY means already mounted */ >> -if (errno != EBUSY) { >> +if (errno == EBUSY) >> +goto out; >> + >> +if (errno == ENODEV) { >>

Re: [PATCH iproute2 2/3] ip vrf: Improve cgroup2 error messages

2017-01-06 Thread Sergei Shtylyov
Hello! On 1/6/2017 3:22 AM, David Ahern wrote: 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

[PATCH iproute2 2/3] ip vrf: Improve cgroup2 error messages

2017-01-05 Thread David Ahern
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: $