Ognyan Kulev <[EMAIL PROTECTED]> writes:
I'm more inclined to change EINVAL into ENOENT in diskfs_lookup.
No, any such change should be in the caller, not in diskfs_lookup.
OK. I've checked all uses of diskfs_lookup in libdiskfs, and these shell commands all fail with EINVAL:
$ ln x "" dir_link $ rm "" dir_unlink $ mkdir "" dir_mkdir $ rmdir "" dir_rmdir
The following shell commands (that end up using dir_rename) give other errors, but C program that uses ANSI function rename() gives EINVAL:
mv x "" here "" is recognized as "." and mv complains mv "" x here stat("") gives ENOENT and we don't reach dir_rename
I would like to make a patch. But first, what are the sensible errors? Here is what I think:
dir_link("x", "") returns EINVAL dir_unlink("") returns ENOENT dir_mkdir("") returns EINVAL dir_rmdir("") returns ENOENT dir_rename("x", "") returns EINVAL dir_rename("", "x") returns ENOENT
mv x "" should give EINVAL, I think. I suppose this is for the coreutils developers.
Regards, ogi
_______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd