Which has been that way since before I decided to touch it. 2.6.12-rc1.
I haven't tracked it before then as I don't expect to see anything.
And that is why -ENOTDIR. That is the historical error code from sysctl in
this case.
CTL_MAXNAME is fairly arbitrary, and since the set of binary paths is fixed.
So it feels to me like the code really should read:
if (nlen <= 0 || nlen > CTL_MAXNAME)
return -ENOTDIR;
In both places. Just because that is what the comment describes.
I think in reality CTL_MAXNAME is actually 5 but I would have to look a little
more closely to confirm that.
Eric
-