[PATCH] getcwd(3) returns wrong error codes
getcwd(3) returns EINVAL if the supplied buffer length is 0 or 1 and ENOMEM
(duh!) if the length is greater than 1 but can't hold pathname + 1.
POSIX expects getcwd() to return EINVAL if length is 0 and ERANGE if length is
greater than 0 but less than pathname + 1.
I attach a patch to review. I've built a kernel and running it at the moment.
So far nothing bro