Issue of the Implementation # S0842
readlink() sets errno EINVAL instead of ENOENT
The readlink() function shall place the contents of the symbolic link referred to by path in the buffer. According to LSB, if path is an empty string then readlink() shall set error code to ENOENT. But it sets error code to EINVAL since kernel 2.6.39 released.
Problem location(s) in the standard
Linux Standard Base Core Specification 3.1, Chapter 13. Base Libraries, 13.3. Interfaces for libc, description of readlink() function. that refers The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (SUS 3.0), System Interfaces, description of functions readlink().
Fixed in kernel 3.2-rc1