Change autoconf to test for setmntent() and use that to decide whether
to use getmntent() and setmntent(), since some systems don't have
setmntent() but they do have the mntent.h header file.
Also, remove the includes of mntent.h from e2fsck and mke2fs and other
places where it is not needed.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and
this was starting to cause some tools heartburn. It also made "make
V=1" almost useless, since trying to following the individual commands
run by make was lost in the noise of all of the defines.
So fix this by putting the configure-generated defines in lib/config.h
and the directory pathnames to lib/dirpaths.h.
In addition, clean up some vestigal defines in configure.in and in the
Makefiles to further shorten the cc command lines.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fsck leaks fds when invoked with -R -A -M -a -t noopts=nofail
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Adapted from the SuSE patch, but fixes a number of very serious
problems with the patch in SLES:
1) This changeset uses -M instead of -m; most lowercase options are
reserved for use by the filesystem-specific fsck programs. All new
fsck options must be upper case.
2) This changeset will skip the root filesystem in "fsck -AM", which
the SLES patch will not do.
3) Loading /proc/mounts into the fs_info can cause -t opts matching to
malfuction. So this changeset uses a simplified version of the
ismounted.c function from the ext2fs library.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>