[Top][All Lists]

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

Re: df shouldn't list mount points that it can't access

From: n0dalus
Subject: Re: df shouldn't list mount points that it can't access
Date: Thu, 13 Oct 2005 08:36:13 +0930

On 10/13/05, Paul Eggert <address@hidden> wrote:
> n0dalus <address@hidden> writes:
> >    if (get_fs_usage (stat_file, disk, &fsu))
> >      {
> > +      if(errno == EACCES && !show_all_fs && !show_listed_fs)
> > +        return; /* Ignore mount points we can't access */
> That's a bit extreme, no?  I can imagine situations where you'd want
> errors like that reported.
> Is there some other clue that the file system is a proc file system
> that we normally don't want to know about?

In my opinion I don't ever see why you would want these errors reported.

>From the statfs manpage:
EACCES (statfs) Search permission is denied for a component of the path
              prefix of path.

Technically the user in question (that doesn't have correct
permissions) shouldn't even know that the mount point exists.

statfs returns other errno's for errors we probably do want reported.

Any mount point that the user can't access, proc or not, will return
this warning; which is why I think that simply ignoring the EACCES
error is the best thing to do.


reply via email to

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