Home | History | Annotate | only in /src/sbin/fsck_ext2fs
History log of /src/sbin/fsck_ext2fs
RevisionDateAuthorComments
 1.18 31-Mar-2019  mlelstv No longer rely on data in disklabel to deduce alternate superblock
positions from block size. Instead use the same defaults as newfs_ext2fs.

Side effect is that fsck_ext2fs now works with wedges.
 1.17 04-Mar-2014  joerg branches: 1.17.26;
Make pointer NULL check non-fatal for a bogus condition.
 1.16 06-Aug-2011  dholland branches: 1.16.2; 1.16.8;
Avoid -Wno-pointer-sign.
 1.15 20-Jun-2011  mrg remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
 1.14 29-Aug-2008  gmcgarry branches: 1.14.16;
Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.
 1.13 26-Aug-2006  christos branches: 1.13.18; 1.13.22;
Programs that use efun.
 1.12 11-May-2006  mrg sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4.
 1.11 20-Jan-2005  xtraeme WARNS=2 is the default defined in sbin/Makefile.inc. (thanks wiz)
 1.10 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.9 19-Aug-2002  lukem Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path
 1.8 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.7 15-Jan-1999  bouyer #include machine/bswap.h and remove -lutil.
 1.6 18-Mar-1998  bouyer Use libutil rather than ../fsck/bswap.c
 1.5 11-Oct-1997  veego s/$FSCK/${FSCK}/
 1.4 10-Oct-1997  christos CFLAGS->CPPFLAGS
 1.3 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.2 16-Jun-1997  bouyer Don't compile with -g by default.
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.13.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.13.18.1 28-Sep-2008  mjf Sync with HEAD.
 1.14.16.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.26.1 10-Jun-2019  christos Sync with HEAD
 1.28 23-Jun-2013  dholland Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

lblkno
lblktosize
lfragtosize
numfrags
blkroundup
fragroundup
 1.27 09-Jun-2013  dholland Stick UFS_ in front of these symbols:
DIRBLKSIZ
DIRECTSIZ
DIRSIZ
OLDDIRFMT
NEWDIRFMT

Part of PR 47909.
 1.26 22-Jan-2013  dholland Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
 1.25 25-Nov-2012  jakllsch Catch up to the kernel with respect to Ext2 huge_file feature.
 1.24 25-Nov-2012  jakllsch e2di_nblock is (assuming the huge_file feature is not active) stored in
DEV_BSIZE units, not fs block size units.
 1.23 19-Oct-2009  bouyer branches: 1.23.6; 1.23.12;
Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.22 16-Mar-2008  lukem errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.21 16-Mar-2008  lukem sync from fsck_ffs/dir.c 1.21:
lost+found directories are mode -1700
 1.20 16-Oct-2006  christos branches: 1.20.8; 1.20.16; 1.20.18;
use c99 initializers
 1.19 10-May-2006  mrg quell GCC 4.1 uninitialised variable warnings.

XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
 1.18 20-Mar-2006  christos Coverity CID 2299: Fix memory leak.
 1.17 20-Mar-2006  christos Coverity CID 2298: Fix memory leak.
 1.16 19-Aug-2005  christos 64 bit inode changes
 1.15 26-Jun-2005  christos more const.
 1.14 26-Jun-2005  christos constify.
 1.13 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.12 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.11 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.10 05-Oct-2003  bouyer More licence fixes, pointed out by Thomas Klausner.
 1.9 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.7 13-Jul-2003  itojun use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
 1.6 09-May-2002  simonb Don't bother testing if a uint8_t is > 256 -- that test is always false.
 1.5 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.4 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.3 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.20.18.1 03-Apr-2008  mjf Sync with HEAD.
 1.20.16.1 24-Mar-2008  keiichi sync with head.
 1.20.8.1 23-Mar-2008  matt sync with HEAD
 1.23.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.12.2 23-Jun-2013  tls resync from head
 1.23.12.1 25-Feb-2013  tls resync with head
 1.23.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.6.2 23-Jan-2013  yamt sync with head
 1.23.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.8 25-Nov-2012  jakllsch Catch up to the kernel with respect to Ext2 huge_file feature.
 1.7 09-Jun-2011  christos branches: 1.7.2; 1.7.8;
share more code.
 1.6 26-Jun-2005  christos branches: 1.6.42;
constify.
 1.5 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.4 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.3 13-Jul-2003  itojun use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
 1.2 26-Jul-1998  mycroft const poisoning.
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.6.42.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.7.8.1 25-Feb-2013  tls resync with head
 1.7.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.17 05-Apr-2020  joerg Fix depenency on common symbols in sbin.
 1.16 15-Aug-2016  jdolecek branches: 1.16.14;
divorce list of features supported by fsck_ext2fs from the kernel;
while kernel might support e.g. extents, extra_isize or dir_nlink,
fsck could actually have no idea about the features
 1.15 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.14 09-Oct-2008  christos Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.13 26-Jun-2005  christos branches: 1.13.4; 1.13.20;
constify.
 1.12 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.11 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.10 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.9 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.7 29-Mar-2003  wiz Consistently spell occurrence with two rs.
 1.6 24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.5 04-Feb-2001  christos fix nested extern and duplicate declarations
 1.4 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.3 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.2 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.13.20.1 17-Jan-2009  mjf Sync with HEAD.
 1.13.4.1 24-Mar-2009  bouyer Pull up following revision(s) (requested by manu in ticket #1288):
sbin/fsck_lfs/inode.c: revision 1.40 via patch
sbin/fsck_ffs/fsck_ffs.8: revision 1.44 via patch
sbin/fsck_ext2fs/fsck.h: revision 1.14 via patch
sbin/fsck_ext2fs/main.c: revision 1.30 via patch
sbin/fsck_ffs/inode.c: revision 1.61 via patch
sbin/fsck_ffs/main.c: revision 1.71 via patch
sbin/fsck_ext2fs/inode.c: revision 1.23 via patch
sbin/fsck_lfs/fsck.h: revision 1.18 via patch
sbin/fsck_lfs/fsck_lfs.8: revision 1.21 via patch
sbin/fsck_lfs/main.c: revision 1.38 via patch
sbin/fsck_ext2fs/fsck_ext2fs.8: revision 1.15 via patch
sbin/fsck_ffs/fsck.h: revision 1.47 via patch
Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.16.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21 27-Aug-2018  sevan Remove references to -c flag which was never included.
 1.20 11-Sep-2016  sevan branches: 1.20.6; 1.20.12; 1.20.14;
Document the author and the version fsck_ext2fs first appeared.
Bump date.
 1.19 21-Feb-2010  wiz Call the file system "ext2" consistently. Suggested by tsutsui.
 1.18 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.17 15-Mar-2009  joerg Fix markup.
 1.16 09-Oct-2008  wiz branches: 1.16.4;
Standardize.
 1.15 09-Oct-2008  christos Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.14 22-Mar-2004  bouyer branches: 1.14.16; 1.14.32;
Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.13 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.11 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.10 01-Oct-2002  wiz New sentence, new line. By Robert Elz with minimal fixes.
 1.9 07-Feb-2002  ross Edit -mdoc usage.

* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
 1.8 16-Nov-2001  wiz Sort SEE ALSO.
 1.7 16-Nov-2001  wiz Whitespace nits
 1.6 05-Jun-2001  wiz Drop arguments of .Os.
 1.5 07-Mar-1999  mycroft Clean up SYNOPSIS formatting.
 1.4 15-Sep-1997  lukem use .Nm correctly
 1.3 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.2 09-Jul-1997  mikel eliminate dangling FFS references
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.14.32.1 17-Jan-2009  mjf Sync with HEAD.
 1.14.16.1 24-Mar-2009  bouyer Pull up following revision(s) (requested by manu in ticket #1288):
sbin/fsck_lfs/inode.c: revision 1.40 via patch
sbin/fsck_ffs/fsck_ffs.8: revision 1.44 via patch
sbin/fsck_ext2fs/fsck.h: revision 1.14 via patch
sbin/fsck_ext2fs/main.c: revision 1.30 via patch
sbin/fsck_ffs/inode.c: revision 1.61 via patch
sbin/fsck_ffs/main.c: revision 1.71 via patch
sbin/fsck_ext2fs/inode.c: revision 1.23 via patch
sbin/fsck_lfs/fsck.h: revision 1.18 via patch
sbin/fsck_lfs/fsck_lfs.8: revision 1.21 via patch
sbin/fsck_lfs/main.c: revision 1.38 via patch
sbin/fsck_ext2fs/fsck_ext2fs.8: revision 1.15 via patch
sbin/fsck_ffs/fsck.h: revision 1.47 via patch
Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.16.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.20.14.1 10-Jun-2019  christos Sync with HEAD
 1.20.12.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.20.6.1 28-Aug-2018  martin Pull up following revision(s) (requested by sevan in ticket #992):

external/bsd/top/dist/top.1.in: revision 1.11
sbin/gpt/main.c: revision 1.12
sbin/amrctl/amrctl.c: revision 1.11
bin/df/df.c: revision 1.93
sbin/fsck_ext2fs/fsck_ext2fs.8: revision 1.21
sbin/fsck_ext2fs/main.c: revision 1.38
bin/ksh/ksh.Man: revision 1.26
bin/ln/ln.c: revision 1.40
bin/df/df.1: revision 1.48
bin/df/df.1: revision 1.49

Document the WCPU field.

Match SYNOPSIS with usage()

-G cannot be specified alongside -i or -P.
Heads up by <leot>

Add -l to SYNOPSIS

Update usage to include -w

Match sequence as per SYNOPSIS in manual

Remove reference to -c flag which was never implemented.

Remove references to -c flag which was never included.

Add the -T flag to usage()
 1.37 04-Aug-2016  jdolecek rename struct ext2fs_dinode attribute e2di_dacl to correct
e2di_size_high; even Linux ext2 filesystem code actually uses it
unconditionally this way and ext4 code finally also calls it that way
in their struct definition too; if there was any trace of this for other
purpose it's long gone
 1.36 23-Jun-2013  dholland branches: 1.36.10;
Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

lblkno
lblktosize
lfragtosize
numfrags
blkroundup
fragroundup
 1.35 23-Jun-2013  dholland fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
 1.34 19-Jun-2013  dholland Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
INOPB -> FFS_INOPB, LFS_INOPB
INOPF -> FFS_INOPF, LFS_INOPF
blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
 1.33 22-Jan-2013  dholland Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
 1.32 25-Nov-2012  jakllsch Catch up to the kernel with respect to Ext2 huge_file feature.
 1.31 04-Feb-2010  christos branches: 1.31.6; 1.31.12;
Centralize time printing and deal with ctime possibly returning NULL.
 1.30 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.29 06-Apr-2009  lukem fix sign-compare issues
 1.28 02-Mar-2009  tsutsui - add a sanity check for e2fs_inode_size in readsb()
- use EXT2_DINODE_SIZE() rather than sizeof(struct ext2fs_dinode) or
struct ext2fs_dinode array/pointer to see e2fs_ipb and inode offsets
 1.27 24-Nov-2008  tsutsui branches: 1.27.2;
Handle 32 bit uid field on E2FS_REV1.
 1.26 24-Nov-2008  tsutsui Add missed byteswap ops against ext2fs_dinode members.
 1.25 24-Nov-2008  tsutsui Use "size > INT32_MAX" rather than "size >= 0x80000000U" to check 2GB limit.
 1.24 24-Nov-2008  tsutsui - unsigned -> unsigned int
- remove unnecessary casts from malloc(3) and free(3)
- fix a bogus indent
 1.23 09-Oct-2008  christos branches: 1.23.2;
Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.22 16-Mar-2008  lukem errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.21 16-Nov-2007  tsutsui branches: 1.21.6; 1.21.8;
Add a workaround for incorrect "SUMMARY INFORMATIONS WRONG FOR CG #N"
and "BLK(S) MISSING IN BIT MAP #N" reports on newer ext2fs with
EXT2F_COMPAT_RESIZE feature by accounting blocks in EXT2_RESIZEINO.

XXX1: Should we account blocks allocated by all other reserved inodes?
XXX2: We should really check and fix EXT2_RESIZEINO accordingly.
 1.20 19-Aug-2005  christos branches: 1.20.4; 1.20.10;
64 bit inode changes
 1.19 26-Jun-2005  christos more const.
 1.18 26-Jun-2005  christos constify.
 1.17 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.16 05-Feb-2005  xtraeme Kill __P();
 1.15 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.14 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.13 05-Oct-2003  bouyer More licence fixes, pointed out by Thomas Klausner.
 1.12 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.10 13-Jul-2003  itojun use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
 1.9 24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.8 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.7 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.6 17-Feb-1999  bouyer Properly handle FIFO (linux seems to puts something in the block addr fields
here) and a new field that can be different in the master superblock and
its first copy. From Tim Shepard.
 1.5 28-Jul-1998  mycroft __AUDIT__ cleanup.
 1.4 01-Apr-1998  kleink Need <time.h> for ctime() and time() prototypes.
 1.3 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.20.10.2 23-Mar-2008  matt sync with HEAD
 1.20.10.1 09-Jan-2008  matt sync with HEAD
 1.20.4.1 24-Mar-2009  bouyer Pull up following revision(s) (requested by manu in ticket #1288):
sbin/fsck_lfs/inode.c: revision 1.40 via patch
sbin/fsck_ffs/fsck_ffs.8: revision 1.44 via patch
sbin/fsck_ext2fs/fsck.h: revision 1.14 via patch
sbin/fsck_ext2fs/main.c: revision 1.30 via patch
sbin/fsck_ffs/inode.c: revision 1.61 via patch
sbin/fsck_ffs/main.c: revision 1.71 via patch
sbin/fsck_ext2fs/inode.c: revision 1.23 via patch
sbin/fsck_lfs/fsck.h: revision 1.18 via patch
sbin/fsck_lfs/fsck_lfs.8: revision 1.21 via patch
sbin/fsck_lfs/main.c: revision 1.38 via patch
sbin/fsck_ext2fs/fsck_ext2fs.8: revision 1.15 via patch
sbin/fsck_ffs/fsck.h: revision 1.47 via patch
Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.21.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.21.8.1 03-Apr-2008  mjf Sync with HEAD.
 1.21.6.1 24-Mar-2008  keiichi sync with head.
 1.23.2.1 16-Jan-2011  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1486):
sbin/fsck_ext2fs/setup.c: revision 1.26
sbin/newfs_ext2fs/mke2fs.c: revision 1.10
sbin/newfs_ext2fs/mke2fs.c: revision 1.11
sbin/newfs_ext2fs/mke2fs.c: revision 1.12
sbin/fsck_ext2fs/inode.c: revision 1.24
sys/lib/libsa/ext2fs.c: revision 1.6
sbin/newfs_ext2fs/extern.h: revision 1.3
sbin/fsck_ext2fs/inode.c: revision 1.25
sys/lib/libsa/ext2fs.c: revision 1.7
sbin/fsck_ext2fs/inode.c: revision 1.26
sys/ufs/ext2fs/ext2fs_inode.c: revision 1.68
sbin/fsck_ext2fs/inode.c: revision 1.27
sbin/fsck_ext2fs/inode.c: revision 1.28
sys/ufs/ext2fs/ext2fs_dinode.h: revision 1.18
sys/ufs/ext2fs/ext2fs_dinode.h: revision 1.19
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.5
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.2
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.6
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.3
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.142
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.7
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.4
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.8
PR/40936: Frederik Sausmikat: ext2fs: add support for inodes > 128 bytes
Support variable inode sizes.
catch up with variable inode size.
Don't use e2fs_inode_size in superblock on E2FS_REV0 file system.
- accept only EXT2_REV0_DINODE_SIZE inodesize on -O 0
- use inodesize to get offset of inode, not struct ext2fs_dinode array
Replace a magic number with a new EXT2_REV0_DINODE_SIZE macro.
Use EXT2_DINODE_SIZE() to get offset of inode, not struct ext2fs_dinode array.
Fix botched logic in inodesize check.
Use inodesize to get offset of inode in one more place.
- add a sanity check for e2fs_inode_size in readsb()
- use EXT2_DINODE_SIZE() rather than sizeof(struct ext2fs_dinode) or
struct ext2fs_dinode array/pointer to see e2fs_ipb and inode offsets
Sort options.
New sentence, new line.
Sort options in usage.
- unsigned -> unsigned int
- remove unnecessary casts from malloc(3) and free(3)
- fix a bogus indent
Use "size > INT32_MAX" rather than "size >= 0x80000000U" to check 2GB limit.
Add missed byteswap ops against ext2fs_dinode members.
Handle 32 bit uid field on E2FS_REV1.
 1.27.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.31.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.12.2 23-Jun-2013  tls resync from head
 1.31.12.1 25-Feb-2013  tls resync with head
 1.31.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.31.6.2 23-Jan-2013  yamt sync with head
 1.31.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.36.10.1 06-Aug-2016  pgoyette Sync with HEAD
 1.41 05-Apr-2020  joerg Fix depenency on common symbols in sbin.
 1.40 15-Aug-2019  kamil fsck: Stop defining the same variable concurrently in bss and data

returntosingle was defined in multiple places:

- fsck_lfs/main.c
- fsck_ffs/main.c
- fsck_ext2fs/main.c
- fsck/fsutil.c

Keep the fsutil.c definition as the only one.

Detected during the build of telned with Address Sanitizer (MKSANITIZER).
 1.39 03-Feb-2019  mrg branches: 1.39.2;
- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
 1.38 27-Aug-2018  sevan Remove references to -c flag which was never included.
 1.37 09-Jun-2011  christos branches: 1.37.34; 1.37.40; 1.37.42;
share more code.
 1.36 07-Jan-2010  christos branches: 1.36.4;
make this compile again.
 1.35 06-Jan-2010  christos PR/42568: Pedro F. Giffuni: Better signal handling from OpenBSD, but simplified.
 1.34 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.33 16-Aug-2009  tron Ignore the "-P" option as intended to make this work with e.g.
"fsck_flags=-pP" in "/etc/rc.conf".

Patch supplied by Pierre Pronchery in PR bin/41490.
 1.32 12-Oct-2008  wiz branches: 1.32.2; 1.32.6; 1.32.8;
Don't use unicode in usage.
Noted by Anon Ymous.
 1.31 09-Oct-2008  wiz Sync usage with man page.
 1.30 09-Oct-2008  christos Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.29 20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.28 16-Mar-2008  lukem branches: 1.28.4;
errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.27 23-Feb-2008  christos Make sure that the exit values are always sane, and use symbolic instead
of magic constants. Reviewed by go@
 1.26 16-Jul-2007  pooka branches: 1.26.4; 1.26.10; 1.26.12;
Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS. Others worked with < 0,
but make them check against -1 too for consistency. And sprinkle some
stylish line wrapping where appropriate.
 1.25 14-Jul-2007  dsl Add additional 'sizeof args' parameter to mount(2).
 1.24 08-Feb-2007  drochner include <signal.h> where signal(3) is used
 1.23 23-Sep-2005  jmmv branches: 1.23.4;
Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.22 19-Aug-2005  christos 64 bit inode changes
 1.21 26-Jun-2005  christos constify.
 1.20 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.19 13-Jan-2005  christos Add a progress meter to fsck_ffs based on the work by thorpej presented
to the mailing lists last January. This is optional.
 1.18 13-May-2004  wiz Remove option letter from getopt string, since it does not
have a case handler below. From aaron@openbsd.
 1.17 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.16 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.15 05-Jan-2004  jmmv Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.14 20-Oct-2003  dsl Add a -q (quiet) option to print nothing for clean filesystems.
Support in fsck_ffs and stub in fsck_xxx.
Push a few more messages through pwarn() instead of printf() to ensure
disk name is shown.
 1.13 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.11 24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.10 19-Feb-2001  cgd convert to use getprogname()
 1.9 04-Feb-2001  christos fix nested extern and duplicate declarations
 1.8 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.7 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.6 26-Jul-1998  mycroft const poisoning.
 1.5 01-Apr-1998  kleink Need <time.h> for time() prototype.
 1.4 01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.3 01-Oct-1997  enami Don't declare optind and optarg.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.23.4.1 24-Mar-2009  bouyer Pull up following revision(s) (requested by manu in ticket #1288):
sbin/fsck_lfs/inode.c: revision 1.40 via patch
sbin/fsck_ffs/fsck_ffs.8: revision 1.44 via patch
sbin/fsck_ext2fs/fsck.h: revision 1.14 via patch
sbin/fsck_ext2fs/main.c: revision 1.30 via patch
sbin/fsck_ffs/inode.c: revision 1.61 via patch
sbin/fsck_ffs/main.c: revision 1.71 via patch
sbin/fsck_ext2fs/inode.c: revision 1.23 via patch
sbin/fsck_lfs/fsck.h: revision 1.18 via patch
sbin/fsck_lfs/fsck_lfs.8: revision 1.21 via patch
sbin/fsck_lfs/main.c: revision 1.38 via patch
sbin/fsck_ext2fs/fsck_ext2fs.8: revision 1.15 via patch
sbin/fsck_ffs/fsck.h: revision 1.47 via patch
Disable userid to username lookups by default. Add a -U flag to perform them.
In single user mode lookups that involve the network might not work and they
slow down fsck.
 1.26.12.3 17-Jan-2009  mjf Sync with HEAD.
 1.26.12.2 28-Sep-2008  mjf Sync with HEAD.
 1.26.12.1 03-Apr-2008  mjf Sync with HEAD.
 1.26.10.1 24-Mar-2008  keiichi sync with head.
 1.26.4.1 23-Mar-2008  matt sync with HEAD
 1.28.4.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.8.1 21-Apr-2010  matt sync to netbsd-5
 1.32.6.1 05-Sep-2009  bouyer Pull up following revision(s) (requested by tron in ticket #914):
sbin/fsck_ext2fs/main.c: revision 1.33
Ignore the "-P" option as intended to make this work with e.g.
"fsck_flags=3D-pP" in "/etc/rc.conf".
Patch supplied by Pierre Pronchery in PR bin/41490.
 1.32.2.1 05-Sep-2009  bouyer Pull up following revision(s) (requested by tron in ticket #914):
sbin/fsck_ext2fs/main.c: revision 1.33
Ignore the "-P" option as intended to make this work with e.g.
"fsck_flags=3D-pP" in "/etc/rc.conf".
Patch supplied by Pierre Pronchery in PR bin/41490.
 1.36.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.37.42.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.37.42.1 10-Jun-2019  christos Sync with HEAD
 1.37.40.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.37.34.1 28-Aug-2018  martin Pull up following revision(s) (requested by sevan in ticket #992):

external/bsd/top/dist/top.1.in: revision 1.11
sbin/gpt/main.c: revision 1.12
sbin/amrctl/amrctl.c: revision 1.11
bin/df/df.c: revision 1.93
sbin/fsck_ext2fs/fsck_ext2fs.8: revision 1.21
sbin/fsck_ext2fs/main.c: revision 1.38
bin/ksh/ksh.Man: revision 1.26
bin/ln/ln.c: revision 1.40
bin/df/df.1: revision 1.48
bin/df/df.1: revision 1.49

Document the WCPU field.

Match SYNOPSIS with usage()

-G cannot be specified alongside -i or -P.
Heads up by <leot>

Add -l to SYNOPSIS

Update usage to include -w

Match sequence as per SYNOPSIS in manual

Remove reference to -c flag which was never implemented.

Remove references to -c flag which was never included.

Add the -T flag to usage()
 1.39.2.1 16-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #73):

sbin/fsck_lfs/main.c: revision 1.54
sbin/fsck_ext2fs/main.c: revision 1.40
sbin/fsck_ffs/main.c: revision 1.86

fsck: Stop defining the same variable concurrently in bss and data
returntosingle was defined in multiple places:
- fsck_lfs/main.c
- fsck_ffs/main.c
- fsck_ext2fs/main.c
- fsck/fsutil.c

Keep the fsutil.c definition as the only one.

Detected during the build of telned with Address Sanitizer (MKSANITIZER).
 1.26 21-Apr-2017  christos Fix previous properly (wrong variable was tested) thanks riastradh@
 1.25 21-Apr-2017  christos e2di_block is an array; can't be NULL, (clang)
 1.24 19-Jun-2013  dholland branches: 1.24.10;
Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
INOPB -> FFS_INOPB, LFS_INOPB
INOPF -> FFS_INOPF, LFS_INOPF
blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
 1.23 22-Jan-2013  dholland Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
 1.22 25-Nov-2012  jakllsch Catch up to the kernel with respect to Ext2 huge_file feature.
 1.21 04-Feb-2010  christos branches: 1.21.6; 1.21.12;
Centralize time printing and deal with ctime possibly returning NULL.
 1.20 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.19 06-Apr-2009  lukem fix sign-compare issues
 1.18 24-Nov-2008  tsutsui branches: 1.18.2;
Remove unnecessary casts.
 1.17 16-Mar-2008  lukem errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.16 16-Nov-2007  tsutsui branches: 1.16.6; 1.16.8;
Add a workaround for incorrect "SUMMARY INFORMATIONS WRONG FOR CG #N"
and "BLK(S) MISSING IN BIT MAP #N" reports on newer ext2fs with
EXT2F_COMPAT_RESIZE feature by accounting blocks in EXT2_RESIZEINO.

XXX1: Should we account blocks allocated by all other reserved inodes?
XXX2: We should really check and fix EXT2_RESIZEINO accordingly.
 1.15 19-Aug-2005  christos branches: 1.15.10;
64 bit inode changes
 1.14 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.13 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.12 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.11 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.9 31-Jan-2000  bouyer Byteswap the group descriptors fields as well. Works again on big-endian
systems.
 1.8 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.7 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.6 17-Feb-1999  bouyer Properly handle FIFO (linux seems to puts something in the block addr fields
here) and a new field that can be different in the master superblock and
its first copy. From Tim Shepard.
 1.5 01-Apr-1998  kleink Need <time.h> for ctime() prototype.
 1.4 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.3 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.2 10-Jul-1997  mikel fix printf formats
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.15.10.2 23-Mar-2008  matt sync with HEAD
 1.15.10.1 09-Jan-2008  matt sync with HEAD
 1.16.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.16.8.1 03-Apr-2008  mjf Sync with HEAD.
 1.16.6.1 24-Mar-2008  keiichi sync with head.
 1.18.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.21.12.2 23-Jun-2013  tls resync from head
 1.21.12.1 25-Feb-2013  tls resync with head
 1.21.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.21.6.2 23-Jan-2013  yamt sync with head
 1.21.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.24.10.1 26-Apr-2017  pgoyette Sync with HEAD
 1.8 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.7 06-Apr-2009  lukem fix sign-compare issues
 1.6 19-Jan-2005  xtraeme branches: 1.6.36;
Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.5 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.4 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.6.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.15 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.14 16-Mar-2008  lukem errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.13 26-Jun-2005  christos branches: 1.13.10; 1.13.18; 1.13.20;
constify.
 1.12 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.11 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.10 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.9 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.7 13-Jul-2003  itojun use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
 1.6 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.5 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.4 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.3 16-Sep-1997  mrg make these compile on the alpha after WARNS=1.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.13.20.1 03-Apr-2008  mjf Sync with HEAD.
 1.13.18.1 24-Mar-2008  keiichi sync with head.
 1.13.10.1 23-Mar-2008  matt sync with HEAD
 1.7 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.6 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.5 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.4 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.10 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.9 16-Mar-2008  lukem errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.8 19-Aug-2005  christos branches: 1.8.10; 1.8.18; 1.8.20;
64 bit inode changes
 1.7 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.6 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.5 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.4 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.8.20.1 03-Apr-2008  mjf Sync with HEAD.
 1.8.18.1 24-Mar-2008  keiichi sync with head.
 1.8.10.1 23-Mar-2008  matt sync with HEAD
 1.20 26-Aug-2012  dholland stdlib.h, not malloc.h
 1.19 06-Aug-2011  dholland branches: 1.19.2;
Avoid -Wno-pointer-sign.
 1.18 06-Aug-2011  dholland Add static to a private function.
 1.17 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.16 06-Apr-2009  lukem fix sign-compare issues
 1.15 16-Mar-2008  lukem branches: 1.15.8;
errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.14 13-Nov-2007  tsutsui branches: 1.14.6; 1.14.8;
Use more proper aligned format in a debug function print_bmap().
 1.13 06-May-2006  christos branches: 1.13.10;
We don't need ext2fs_extern.h
 1.12 20-Mar-2006  christos branches: 1.12.2;
Coverity CID 2301: FIx memory leak.
 1.11 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.10 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.9 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.7 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.6 28-Jul-1998  mycroft __AUDIT__ cleanup.
 1.5 01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.4 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.3 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.2 10-Jul-1997  mikel fix printf formats
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.12.2.3 20-Apr-2006  christos Don't include kauth.h
 1.12.2.2 19-Apr-2006  elad include kauth.h
 1.12.2.1 20-Mar-2006  elad file pass5.c was added on branch elad-kernelauth on 2006-04-19 18:49:08 +0000
 1.13.10.2 23-Mar-2008  matt sync with HEAD
 1.13.10.1 09-Jan-2008  matt sync with HEAD
 1.14.8.1 03-Apr-2008  mjf Sync with HEAD.
 1.14.6.1 24-Mar-2008  keiichi sync with head.
 1.15.8.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.19.2.1 30-Oct-2012  yamt sync with head
 1.10 16-Mar-2008  lukem Remove unused file.
 1.9 23-Feb-2008  christos Make sure that the exit values are always sane, and use symbolic instead
of magic constants. Reviewed by go@
 1.8 05-Jun-2006  christos branches: 1.8.10; 1.8.18; 1.8.20;
s/perror/perr
 1.7 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.6 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.5 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.3 13-Jul-2003  itojun use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.8.20.1 03-Apr-2008  mjf Sync with HEAD.
 1.8.18.1 24-Mar-2008  keiichi sync with head.
 1.8.10.1 23-Mar-2008  matt sync with HEAD
 1.39 31-Mar-2019  mlelstv Ignore EXT4 'kbytes written' field when validating alternate superblock.
 1.38 31-Mar-2019  mlelstv No longer rely on data in disklabel to deduce alternate superblock
positions from block size. Instead use the same defaults as newfs_ext2fs.

Side effect is that fsck_ext2fs now works with wedges.
 1.37 31-Mar-2019  mlelstv remove debug printfs from last commit.
 1.36 30-Mar-2019  mlelstv Ignore recorded last mount point when validating alternate superblocks.
Compute log_bsize correctly. This fixes computation of alternate
superblock addresses.
 1.35 15-Aug-2016  jdolecek branches: 1.35.14;
more informative debug output for unsupported features
 1.34 15-Aug-2016  jdolecek adjust inode size check to compare against EXT2_REV0_DINODE_SIZE, rather then sizeof(struct ext2fs_dinode), as the structure definition was expanded with the optional fields
 1.33 15-Aug-2016  jdolecek divorce list of features supported by fsck_ext2fs from the kernel;
while kernel might support e.g. extents, extra_isize or dir_nlink,
fsck could actually have no idea about the features
 1.32 04-Dec-2014  christos Instead of zerodivide, give a useful error message.
 1.31 23-Jun-2013  dholland branches: 1.31.6;
fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
 1.30 19-Jun-2013  dholland Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
INOPB -> FFS_INOPB, LFS_INOPB
INOPF -> FFS_INOPF, LFS_INOPF
blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
 1.29 22-Jan-2013  dholland Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
 1.28 16-Sep-2011  plunky branches: 1.28.2; 1.28.8;
NULL does not need a cast, here
 1.27 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.26 02-Mar-2009  tsutsui - add a sanity check for e2fs_inode_size in readsb()
- use EXT2_DINODE_SIZE() rather than sizeof(struct ext2fs_dinode) or
struct ext2fs_dinode array/pointer to see e2fs_ipb and inode offsets
 1.25 16-Mar-2008  lukem branches: 1.25.6; 1.25.8;
errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.24 22-Dec-2007  tsutsui branches: 1.24.2; 1.24.4;
Use h2fs32() rather than fs2h32() on host to disk conversion.
 1.23 22-Dec-2007  tsutsui - use MINFREE defiend in <ufs/ext2fs/ext2fs.h>
- remove unnecessary casts
- unsigned -> unsigned int
- misc KNF
 1.22 22-Dec-2007  tsutsui Remove unused macro.
 1.21 13-Nov-2007  tsutsui branches: 1.21.2;
Fix e2fs_itpg calculation (a rounddown bug).
 1.20 16-Oct-2006  christos branches: 1.20.8;
comment out impossible code.
 1.19 26-Jun-2005  christos constify.
 1.18 09-Feb-2005  ws Add support for large files (>2GB).
Allow conversion of old filesystems to use this,
if they are already at revision 1.

There probably should be an option to turn revision 0 to revision 1.

Reviewed (in part) by Manuel (bouyer@).
 1.17 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.16 29-Oct-2004  dsl Add (unsigned char) cast to ctype function
Fix check for device name ending in [0-9a-h] (strchr(dev, 0) doesn't ever
return NULL - which is fortunate because the () were wrong as well!)
 1.15 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.14 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.12 28-Jan-2000  bouyer Correct bogons in filetype option support, and add support for the
sparse_super option.
 1.11 26-Jan-2000  bouyer First cut at ext2fs rev 1 support (as of mke2fs 1.18): supports the filetype
option read/write and the sparse option read-only.
 1.10 17-Feb-1999  bouyer branches: 1.10.2;
Properly handle FIFO (linux seems to puts something in the block addr fields
here) and a new field that can be different in the master superblock and
its first copy. From Tim Shepard.
 1.9 01-Feb-1999  bouyer Check malloc's return value before using the pointer.
 1.8 12-Nov-1998  christos Adjust for DKTYPENAME changes.
 1.7 26-Jul-1998  mycroft const poisoning.
 1.6 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.5 16-Sep-1997  mrg make these compile on the alpha after WARNS=1.
 1.4 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.3 10-Jul-1997  mikel prototype calcsb()
 1.2 16-Jun-1997  bouyer The computed superblock size is bigger than SBSIZE, malloc() enouth
memory for it. Apparently, this bug was hidden by our malloc implementation.
Reported by Jason Downs.
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.10.2.1 01-Feb-2000  he Apply patch (requested by bouyer):
Add support for ext2fs revision 1, with read-only support for
the 'sparse_super' and 'filetype' options. Should fix PR#9088.
 1.20.8.2 23-Mar-2008  matt sync with HEAD
 1.20.8.1 09-Jan-2008  matt sync with HEAD
 1.21.2.1 27-Dec-2007  mjf Sync with HEAD.
 1.24.4.1 03-Apr-2008  mjf Sync with HEAD.
 1.24.2.1 24-Mar-2008  keiichi sync with head.
 1.25.8.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.25.6.1 16-Jan-2011  bouyer Pull up following revision(s) (requested by tsutsui in ticket #1486):
sbin/fsck_ext2fs/setup.c: revision 1.26
sbin/newfs_ext2fs/mke2fs.c: revision 1.10
sbin/newfs_ext2fs/mke2fs.c: revision 1.11
sbin/newfs_ext2fs/mke2fs.c: revision 1.12
sbin/fsck_ext2fs/inode.c: revision 1.24
sys/lib/libsa/ext2fs.c: revision 1.6
sbin/newfs_ext2fs/extern.h: revision 1.3
sbin/fsck_ext2fs/inode.c: revision 1.25
sys/lib/libsa/ext2fs.c: revision 1.7
sbin/fsck_ext2fs/inode.c: revision 1.26
sys/ufs/ext2fs/ext2fs_inode.c: revision 1.68
sbin/fsck_ext2fs/inode.c: revision 1.27
sbin/fsck_ext2fs/inode.c: revision 1.28
sys/ufs/ext2fs/ext2fs_dinode.h: revision 1.18
sys/ufs/ext2fs/ext2fs_dinode.h: revision 1.19
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.5
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.2
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.6
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.3
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.142
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.7
sbin/newfs_ext2fs/newfs_ext2fs.8: revision 1.4
sbin/newfs_ext2fs/newfs_ext2fs.c: revision 1.8
PR/40936: Frederik Sausmikat: ext2fs: add support for inodes > 128 bytes
Support variable inode sizes.
catch up with variable inode size.
Don't use e2fs_inode_size in superblock on E2FS_REV0 file system.
- accept only EXT2_REV0_DINODE_SIZE inodesize on -O 0
- use inodesize to get offset of inode, not struct ext2fs_dinode array
Replace a magic number with a new EXT2_REV0_DINODE_SIZE macro.
Use EXT2_DINODE_SIZE() to get offset of inode, not struct ext2fs_dinode array.
Fix botched logic in inodesize check.
Use inodesize to get offset of inode in one more place.
- add a sanity check for e2fs_inode_size in readsb()
- use EXT2_DINODE_SIZE() rather than sizeof(struct ext2fs_dinode) or
struct ext2fs_dinode array/pointer to see e2fs_ipb and inode offsets
Sort options.
New sentence, new line.
Sort options in usage.
- unsigned -> unsigned int
- remove unnecessary casts from malloc(3) and free(3)
- fix a bogus indent
Use "size > INT32_MAX" rather than "size >= 0x80000000U" to check 2GB limit.
Add missed byteswap ops against ext2fs_dinode members.
Handle 32 bit uid field on E2FS_REV1.
 1.28.8.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.8.2 23-Jun-2013  tls resync from head
 1.28.8.1 25-Feb-2013  tls resync with head
 1.28.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.2.1 23-Jan-2013  yamt sync with head
 1.31.6.1 14-Apr-2015  snj Pull up following revision(s) (requested by christos in ticket #688):
sbin/fsck_ext2fs/setup.c: revision 1.32
Instead of zerodivide, give a useful error message.
 1.35.14.1 10-Jun-2019  christos Sync with HEAD
 1.23 23-Jun-2013  dholland fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
 1.22 09-Jun-2011  christos branches: 1.22.2; 1.22.8;
share more code.
 1.21 07-Jan-2010  christos branches: 1.21.4;
make this compile again.
 1.20 06-Jan-2010  christos PR/42568: Pedro F. Giffuni: Better signal handling from OpenBSD, but simplified.
 1.19 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.18 24-Nov-2008  tsutsui Remove unnecessary casts.
 1.17 16-Mar-2008  lukem errexit() now provides the trailing \n (since fsck_ffs assumed that
from a conversion from err(3)), so "make it so".
 1.16 23-Feb-2008  christos Make sure that the exit values are always sane, and use symbolic instead
of magic constants. Reviewed by go@
 1.15 08-Feb-2007  drochner branches: 1.15.4; 1.15.10; 1.15.12;
include <signal.h> where signal(3) is used
 1.14 26-Jun-2005  christos constify.
 1.13 11-Feb-2005  simonb White space nit- don't put a space before/after increment/decrement
operators.
 1.12 19-Jan-2005  xtraeme Kill __P(), ANSIfy, remove main() prototype; WARNS=2
 1.11 22-Mar-2004  bouyer Fix disclaimer in my copyright. Pointed out by Thomas Klausner.
 1.10 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.8 13-Jul-2003  itojun use bounded string op (one strcpy remains)
VS: ----------------------------------------------------------------------
 1.7 24-Jan-2003  fvdl Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
 1.6 04-Feb-2001  christos fix nested extern and duplicate declarations
 1.5 10-Oct-2000  is Format string cleanups by Bill Sommerfeld.
 1.4 30-Mar-1998  mrg branches: 1.4.2; 1.4.10;
use extern int over extern
 1.3 09-Oct-1997  bouyer Ext2 metadata are always stored on disk in little-endian byte order,
so do byte-swapping on big-endian system. The byte-swap routines are in
fsck/bswap.c because they will also be used in fsck_ffs in future.
Tested on i386 and sparc.
 1.2 14-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* cleanup manpage
* remove unused docheck()
* getopt returns -1 not EOF
* put a ) in the correct place in a printf, so that the argument gets
& 0xff, not the result of printf() itself...
 1.1 11-Jun-1997  bouyer Add support programs for ext2fs. fsck_ext2fs is derived from fsck_ffs.
 1.4.10.1 18-Oct-2000  tv Pullup sbin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.4.2.1 10-Oct-2000  he Pull up revision 1.5 (requested by is):
Format string cleanup.
 1.15.12.2 17-Jan-2009  mjf Sync with HEAD.
 1.15.12.1 03-Apr-2008  mjf Sync with HEAD.
 1.15.10.1 24-Mar-2008  keiichi sync with head.
 1.15.4.1 23-Mar-2008  matt sync with HEAD
 1.21.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.22.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed