cvs commit: src/sys/fs/msdosfs msdosfs_vfsops.c

Bruce Evans bde at
Sun Aug 5 05:58:35 PDT 2007

bde         2007-08-05 12:58:34 UTC

  FreeBSD src repository

  Modified files:
    sys/fs/msdosfs       msdosfs_vfsops.c 
  Silently fix up the estimated next free cluster number from the fsinfo
  sector, instead of failing the whole mount if it is garbage.  Fields
  in the fsinfo sector are only advisory, so there are better sanity
  checks than this, and we already silently fix up the only other advisory
  field in the fsinfo (the free cluster count).
  This wasn't handled quite right in rev.1.92, 1.117, or in NetBSD.  1.92
  also failed the whole mount for the non-garbage magic value 0xffffffff
  1.117 fixed this well enough in practice since garbage values shouldn't
  occur in practice, but left the error handling larger and more convoluted
  than necessary.  Now we handle the magic value as a special case of
  fixing up all out of bounds values.
  Also fix up the estimated next free cluster number when there is no
  fsinfo sector.  We were using 0, but CLUST_FIRST is safer.
  Approved by:    re (kensmith)
  Revision  Changes    Path
  1.169     +12 -10    src/sys/fs/msdosfs/msdosfs_vfsops.c

More information about the cvs-src mailing list