[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: [bug #6047] rm -f "" prints diagnostic message under the Hurd]

From: Ognyan Kulev
Subject: Re: [Fwd: [bug #6047] rm -f "" prints diagnostic message under the Hurd]
Date: Wed, 28 Apr 2004 20:52:53 +0300
User-agent: Mozilla Thunderbird 0.5 (X11/20040306)

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]