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>
The i++; statement is unreachable; fix same as commit
f1c2eaac535bd9172a35ce39b6d8f392321f274d in util-linux
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Solaris's header files are very picky about which C compiler can be
used for SUSv3 conformance. Use of C99 is not compatible with SUSv2
(_XOPEN_SOURCE=500), and C89 is not compatible with SUSv3
(_XOPEN_SOURCE=600). Since we need some SUSv3 functions, consistently
use SUSv3 so that e2fsprogs will build on Solaris using c99.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Previously, fsck was only passing in -Cn to the first e2fsck process
to start up, and enabling the progress information by sending a
SIGUSR1 signal. This didn't work if the progress information was
intended to go to file descriptor, since the information was never
passed to e2fsck.
So we now pass the progress fd in as a negative number if the progress
information is intended to be initially suppressed.
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The exiting fsck instance wasn't marked as DONE, so the safety checks
thought a progress bar was still in progress, and so we didn't enable
another filesystem's checking.
Addresses-Debian-Bug: #432865
Addresses-Launchpad-Bug: #203323
Addresses-Sourceforge-Bug: #1926023
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>
Fuse and ssh fstab lines such as:
wdfs#https://dav.hoster.com/foo/bar /mnt/hoster fuse user,noauto 0 0
will cause fsck to issue warnings about invalid fstab lines, because
fsck was previously treating '#' as a comment when it appeared
anywhere in an fstab line, not just at the beginning of the line.
Addresses-Gentoo-bug: #195405
Addresses-Sourceforge-bug: #1826147
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
If a user specifies a bind mount with a non-zero fsck pass number, for
example:
/foo /bar ext3 bind,defaults 1 3
print a warning and ignore the fstab entry.
Addresses-Red-Hat-Bugzilla: #151533
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The memory allocated by inst is not reclaimed. There also was a
call to exit that coverity did not catch the resource leak. This
might not really be a big issue since the memory will be freed when
fsck exits, but it should be done anyway imho.
Coverity ID: 32: Resource Leak
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
e2fsprogs-1.35-11.2. Fixed multiple command-line parsing
bugs so that backwards compatibility is maintained, and so
that certain command-line options wouldn't be ignored.
new semantics: WAIT_ALL vs. WAIT_ATLEAST_ONE. This fixes
a bug where when fsck is waiting for another partition on
the same spindle, it spins wasting a lot of CPU.
main): Don't evaluate the filesystem type when loading the
fstab file, since that might cause fsck to hang trying to
read from a floppy disk. (Addresses Debian bug #187812)
Add tmpfs and devpts to filesystems that should be
ignored, and add jfs, reseirfs, and xfs as filesystems
types where we should complain if we can't find the fsck
program for that filesystem type.
filesystems explicitly specified on the command line were
not being checked in parallel, due to a logic bug
introduced in to support the FSCK_MAX_INST environment
variable.
-R option which skips the root filesystem will skip all of
them. (Addresses Debian bug #159423). Note! This is not
a precedent for dealing intelligently with any other kind
of doubled entry in /etc/fstab!
line, default to -As. (Addresses Debian Bug #153102)
badblocks.8.in: Clarify why it's bad to do a non-destructive
test on a r/o mounted filesystem. (Addresses Debian Bug
#131350)
make sure we gracefully clean up and only exit at safe points.
For fsck, we pass the SIGINT/SIGTERM signal to the child processes,
so they can do their own cleanup.
function in get_device_by_label.c to allow the use of
UUID= or LABEL= when creating filesystems which use external
journal dev (e.g. mke2fs -J device=LABEL=<journal_label>).
tune2fs.c: Use superblock s_journal_uuid to locate an external
journal device instead of s_journal_dev when removing it.
Allow opening journal devices to set the label and UUID
in the ext2 superblock.
mke2fs.c, tune2fs.c: Free journal_device after use, as it is
malloc'd in interpret spec.
of the filesystem to determines its type.
fsck.c (fsck_device, ignore, interpret_type): Call identify_fs
if the type specified in /etc/fstab is "auto".
fsck.8.in, fsck.c (compile_fs_type, fs_type, ignore): Fix handling of
-t option to be more intuitive. Also add support for the Mandrake -t
loop hack. See man page for description of new -t semantics.
fsck.c (PRS): fsck -? now prints the usage message.
ChangeLog, jfs.h:
jfs.h (JFS_DEBUG): Don't define JFS_DEBUG for non-kernel builds; if
necessasry it can be set with configure --enable-jfs-debug
fsck.c (device_already_active): If we're not able to determine the
base device, we should assume that the device is already active in
order to force serialization.
get_device_by_label.h (get_volume_label_by_spec): Add function prototype.
get_device_by_label.c: Use string_copy() instead of strdup() for
portability's sake. Fix a few other gcc -Wall complaints.
fsck.h, fsck.c (string_copy): Export string_copy() extern.
badblocks.c: Fix various gcc -Wall complaints, including an incorrect
reference to sync in flush_bufs().
ChangeLog, configure, configure.in:
configure.in: Add checks for the header files sys/mkdev.h and
sys/sysmacros.h.