Some entries return ENOENT when the provided buffer is too small. Change
them to match the behaviour of the rest and return EINVAL in these
cases.
While here, fix a typo in the manpage: the function returns ENOENT when
a non-existent entry is requested, not EINVAL.