cvs commit: src/sbin/fsck_ffs setup.c

Xin LI delphij at
Tue Feb 26 03:03:18 UTC 2008

delphij     2008-02-26 03:03:17 UTC

  FreeBSD src repository

  Modified files:
    sbin/fsck_ffs        setup.c 
  Be more careful when checking superblock.  We have already checked
  whether fs_bsize is larger than MINBSIZE, which is larger than the
  value that is used to compared with fs_bsize, the sizeof fs, so the
  check followed, will be always true.
  By inspecting the code and some old commit log, I believe that the
  check must be that *fs_sbsize* is larger than sizeof fs.  We round
  up the size to nearest dev_bsize, as the smallest accepted fs_sbsize,
  personally, I think this can be even changed to equal, because this
  number is mostly an invariant in file systems.
  With this check, fsck_ffs(8) will be more picky and has better
  chance rejecting bad first superblock rather than referring to bad
  value it supplied, thus gives better chance for it to check the
  filesystem carefully.
  Revision  Changes    Path
  1.51      +1 -1      src/sbin/fsck_ffs/setup.c

More information about the cvs-src mailing list