On 5/28/20 8:38 PM, Alexei Starovoitov wrote:
On Thu, May 28, 2020 at 11:21 AM Andrii Nakryiko
<andrii.nakryiko@xxxxxxxxx> wrote:
My biggest grudge with changing error code is that old error code will
still be used in older kernels, so if libbpf were to help users with
more helpful message, it now needs to support both error codes,
forever, potentially depending on kernel version. This constant
splitting of logic is annoying, so I'd rather avoid it.
+1.
I think what this patch is trying to do is to fix strerror() lack of
understanding of error code on the kernel side by changing
the error code.
There are plenty of similar places in the kernel.
I think it's better to fix strerror via wrapper that understand kernel
error codes.
There probably will be more than one such ENOTSUPP error.
Fully agree, libbpf is the better place to provide a more user friendly
error especially given the older kernel case.