I ran accross this problem with the df from 3.16, fixed(hack) it but never
reported it.  I just upgraded to fileutils-4.0 and the problem was still
there.  The problem is that df reports on a Solaris cachefs mountpoint:

df: /cache/ecsb/.cfs_mnt_points/nfs:_m_ecsb_6: Permission denied

It really shouldn't be stating that directory.  We always use /cache as the
mount point for the cachefs store, so for a quick hack fix I just check for
that.  The diff is included.  A better more general solution should really
be done...

Ben

--------------------------------------------------------------------
*** df.c.orig   Sat Sep 19 13:09:23 1998
--- df.c        Fri Mar 24 08:09:35 2000
***************
*** 236,244 ****
  
    if (get_fs_usage (stat_file, disk, &fsu))
      {
!       error (0, errno, "%s", stat_file);
!       exit_status = 1;
!       return;
      }
  
    if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)
--- 236,247 ----
  
    if (get_fs_usage (stat_file, disk, &fsu))
      {
!       if (strncmp ("/cache/", stat_file, 7) != 0)
!       {
!         error (0, errno, "%s", stat_file);
!         exit_status = 1;
!         return;
!       }
      }
  
    if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)
***************
*** 473,482 ****
            me->me_dev = disk_stats.st_dev;
          else
            {
!             error (0, errno, "%s", me->me_mountdir);
!             exit_status = 1;
!             /* So we won't try and fail repeatedly. */
!             me->me_dev = (dev_t) -2;
            }
        }
  
--- 476,488 ----
            me->me_dev = disk_stats.st_dev;
          else
            {
!             if (strncmp ("/cache/", me->me_mountdir, 7) != 0)
!             {
!               error (0, errno, "%s", me->me_mountdir);
!               exit_status = 1;
!               /* So we won't try and fail repeatedly. */
!               me->me_dev = (dev_t) -2;
!             }
            }
        }
  

Reply via email to