Ognyan Kulev wrote:
Ognyan Kulev wrote:
And libdiskfs/dir-lookup.c:dir_lookup RPC relies on diskfs_lookup for the components of the file name.

A second, deeper look at dir_lookup showed that dir_lookup(dir,"") should return DIR. Although it's natural to blame diskfs_lookup, I'll need to look again about this problem.

I've traced the rm "" command. Lookup of "" actually returns the "." node and diskfs_lookup is not called. But diskfs_S_dir_unlink always calls diskfs_lookup, in this case with "" argument. And so EINVAL is returned (by dir_unlink RPC).


I'm more inclined to change EINVAL into ENOENT in diskfs_lookup. Other approaches are to assure that all callers (libdiskfs or glibc) don't pass empty name to diskfs_lookup, in which case the check whether name is empty will become assertion that it must not be empty.

Regards,
ogi



_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to