cvs commit: src/sbin/umount umount.c

Ian Dowse iedowse at FreeBSD.org
Sat Jul 19 17:11:29 PDT 2003


iedowse     2003/07/19 17:11:27 PDT

  FreeBSD src repository

  Modified files:
    sbin/umount          umount.c 
  Log:
  Take advantage of the use of file system IDs to simplify umount(8)
  and make it work more reliably in a number of cases that have
  traditionally been troublesome. The new behaviour is:
   1) If the filesystem can be determined by the fsid or device,
      or uniquely identified by the mountpoint, then just go ahead
      and call unmount(2) using the file system ID.
   2) Otherwise use fstatfs(2) to resolve the path into a file system
      ID (checking with stat(2) that it is a filesystem root directory).
  
  Case 2 can potentially block if an NFS server is down, but it can
  always be avoided by using an unambiguous specification. It handles
  all the hard cases such as symlinks and mismatches between the mount
  list and reality. For example, if a filesystem was mounted as /mnt
  inside a chroot, it will show up in the mount list as /mnt, but now
  you can unmount it from outside the chroot with "umount /chroot_path/mnt".
  
  Revision  Changes    Path
  1.39      +144 -298  src/sbin/umount/umount.c


More information about the cvs-src mailing list