Description of problem:
I just installed kernel-126.96.36.199-0.fc15.x86_64.rpm
and I found that readlink on an empty path now sets errno to EINVAL.
This is not POSIX compliant, man 3 readlink says that ENOENT should be put
if path is an empty string.
Version-Release number of selected component (if applicable):
perror("errno from readlink:");
if( errno != ENOENT) printf("n=%d errno=%d\n",n,errno);
Steps to Reproduce:
No such file or directory
Until 188.8.131.52-35 readlink gave the correct errno.
This is running readlink03 from ltp-full-20110606.
You should report this upstream.
Looks like this was caused by these two changes:
Before the second change, if path was empty we immediately returned -ENOENT.
Now we fall further into the filesystem code trying to look up the empty path and something there is returning -EINVAL.
The fix for this is now in the -mm tree:
Subject: [stable] + readlinkat-ensure-we-return-enoent-for-the-empty-pathname-for-normal-lookups.patch added to -mm tree
The patch Chuck highlighted was included in the 3.1.1 release (184.108.40.206 in F15)