Commit Graph

69 Commits (69e59c225b90a16cd465d7b74341e2304646f83e)

Author SHA1 Message Date
Matthias Andree 322d9d4852 fsck.c:
Include <signal.h> to avoid compiler trouble.
2005-01-13 03:44:50 +01:00
Theodore Ts'o 22dcccdd1a fsck.c (PRS): Apply Fedora's e2fsprogs-1.35-progress.patch from
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.
2005-01-05 13:43:29 -05:00
Theodore Ts'o c88bce8df0 In fsck, check return from malloc of fsck_path, and print an error message
if it fails.
2004-12-22 00:49:06 -05:00
Theodore Ts'o 993aa11dc8 fsck.c (execute): Use '&&' instead of '&'. (It didn't cause a
problem because we got lucky, but let's do things right.
	Fix from Thomas Woerner at Red Hat.)
2004-02-21 21:02:15 -05:00
Theodore Ts'o 544349270e Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
Theodore Ts'o 5e38fed9c5 fsck.c (wait_many): Rename wait_all() to wait_many(), and have
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.
2003-07-21 20:43:21 -04:00
Theodore Ts'o 2ecaaf6557 Put stdout and stderr into non-buffered mode to
avoid cosmetic problems when running fsck under logsave.
2003-04-16 16:13:58 -04:00
Theodore Ts'o ee828a9d1e fsck.c (parse_fstab_line, interpret_type, fsck_device, ignore,
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.
2003-04-06 23:08:47 -04:00
Theodore Ts'o e71d87317a Add Apple/Darwin patches. 2003-03-14 02:13:48 -05:00
Theodore Ts'o ed1b33e8fb Minor bug fixes in the blkid library.
Convert mke2fs, fsck, and tune2fs to use the blkid library.
2003-03-01 19:29:01 -05:00
Theodore Ts'o 76ea3a2c7f fsck.c (parse_fstab_line, parse_escape): Add support for
backslash escaping in /etc/fstab.  (i.e., so that \040
	will work.)
2003-01-22 19:55:59 -05:00
Theodore Ts'o 1d4c7945ff fsck.c (main): Fix bug reported by Gregory Mutt. Multiple
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.
2002-10-28 16:52:12 -05:00
Theodore Ts'o 3e69906495 Fix gcc -Wall nits.
Fix format bug if NLS is in use.

Add extra so that the info directory looks OK on OpenWall.
2002-10-13 23:56:28 -04:00
Theodore Ts'o 84bd550148 fsck.c: If the bone-headed user enters the filename twice, the
-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!
2002-09-24 00:13:19 -04:00
Theodore Ts'o a141135451 fsck.c (main): If no filesystems are specified on the command
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)
2002-08-17 17:39:39 -04:00
Theodore Ts'o 4cae04529e Add SIGINT and SIGTERM handling to fsck and e2fsck. For e2fsck,
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.
2002-07-21 14:14:03 -04:00
Theodore Ts'o 14308a5398 Newer libintl needs LC_CTYPE to be set in addition to LC_MESSAGES. 2002-03-05 03:26:52 -05:00
Theodore Ts'o 5599c2fa87 Changed fsck to support filesystems types in /etc/fstab of the form
"ext3,ext2", etc.

Added support for only searching for a specified list of filesystems.
	Also add support for identifying reiserfs filesystems.
2002-02-03 00:08:52 -05:00
Theodore Ts'o a1069118d4 fsck.c: Allow the number of outstanding processes fs-specific
fsck programs to be capped via the FSCK_MAX_INST
	envrionment variable.

fsck.8.in: Document all of the environment variables used by fsck.
2002-01-29 12:49:14 -05:00
Theodore Ts'o 4ea7bd0439 Fix various gcc -Wall nits. Fixed a bug in mke2fs where a bogus
error message could be printed on an malloc() failure, and e2image
was optimized to avoid needless system calls by using the stashed
inode functions.
2001-12-16 23:23:37 -05:00
Theodore Ts'o 6430bd67ce fsck.c (interpret_type): If the "auto" type is specified, make
sure interpet_device() is called so that device
	specifications which use LABEL= or UUID= are translated
	into a real device name.
2001-11-05 18:58:46 -05:00
Theodore Ts'o 0f8973fb09 Remove EXT2FS_VERSION from the version display, since it
only confuses people.

Make fsck's version display be consistent with the other e2fsprogs
programs.
2001-08-27 12:44:23 -04:00
Andreas Dilger 2d15576dfe get_device_by_label.[ch], fsck.c, util.c: New interpret_spec()
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.
2001-08-17 03:48:11 -06:00
Theodore Ts'o 685c13f6d7 fsck.c (main): Print a warning message if there are no devices to
be checked.  (Addresses Debian bug #107458.)
2001-08-15 19:04:59 -04:00
Theodore Ts'o 88f8af61a4 fsck.c (check_all): Don't bother to interpret a device where the
pass number is zero.  (Addresses Debian bug #106696).
2001-08-15 18:39:51 -04:00
Theodore Ts'o da376f5a13 fstype.c (identify_fs): New file which looks at the superblock
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".
2001-07-19 20:38:53 -04:00
Theodore Ts'o 28cf9041b8 ChangeLog, fsck.c:
fsck.c (device_already_active): Fixed bug which can cause fsck to core
  	dump if there are a mix of devices with standard and non-standard
  	names.
2001-06-12 22:35:00 +00:00
Theodore Ts'o c7a24e461e ChangeLog, fsck.c:
fsck.c (compile_fs_type): Fix I18N compilation bug: use N_() instead
  	of _() to initialize static variables.
2001-05-23 22:26:39 +00:00
Theodore Ts'o 10a32f1e03 ChangeLog, fsck.8.in, fsck.c:
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.
2001-05-21 02:15:15 +00:00
Theodore Ts'o 9164b862ff ChangeLog, fsck.c:
fsck.c (device_already_active): Fix bug in device_already_active which
  	could cause infinite loops if we don't know the base_device of the
  	filesystem.
2001-05-21 01:41:37 +00:00
Theodore Ts'o 07025aea9b ChangeLog, fsck.c:
fsck.c: Make sure all exit status codes returned by fsck are
  	consistent with the error codes documented in the fsck man page.
2001-05-21 01:39:02 +00:00
Theodore Ts'o 6930372eff ChangeLog, fsck.c:
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
2001-05-12 16:12:12 +00:00
Theodore Ts'o 45d7086f4e ChangeLog, fsck.c:
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.
2001-05-01 15:44:37 +00:00
Theodore Ts'o 8820c79f75 Many files:
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.
2001-01-06 04:20:03 +00:00
Theodore Ts'o d4cf2fcda2 ChangeLog, fsck.c:
fsck.c (check_all): Call interpet_device to resolve LABEL= and UUID=
  	right away so that the device_already_active() logic can do the right
  	thing.  Also cleaned up the the root filesystem logic checking code;
  	fixed up a logic bug with the parallel_root option.
2000-12-31 14:09:38 +00:00
Theodore Ts'o b9fd8c1fdb ChangeLog, base_device.c, fsck.c:
base_device.c (base_device): Add support for DAC960 device names.
  fsck.c (device_already_active): Handle the case where base_device
  	doesn't know how to interpret the device name, instead of core
  	dumping.
2000-12-29 03:10:45 +00:00
Theodore Ts'o 793e27df73 ChangeLog, Makefile.in, base_device.c, base_device.tst, fsck.c, fsck.h:
fsck.c (device_already_active): Change to use new version of
  	base_device() which now returns dynamically allocated memory.
  base_device.c (base_device): New version moved from fsck.c which now
  	understands ugly devfs names.  (Debian bug #65181)
  base_device.tst: Test case for base_device.c
2000-12-03 06:33:56 +00:00
Theodore Ts'o e9f9dd8e93 ChangeLog, fsck.c:
fsck.c (wait_one): When we let a new fsck take control of the console
  	to display the progress bar, set FLAG_PROGRESS to so that fsck knows
  	not to start new processes during an fsck pass with the progress
  	bar. (Should fix debian bug #65267)
2000-12-02 06:35:07 +00:00
Theodore Ts'o 4381966695 ChangeLog, llseek.c:
llseek.c: Add #ifdef's for IA64 (it's a 64-bit platform, so we don't
  	need to use llseek).
ChangeLog, fsck.c:
  fsck.c (device_already_active): Add a special case check for MD
  	devices, so we don't try to check them in parallel with other devices.
2000-10-25 02:06:09 +00:00
Theodore Ts'o 3f1e9a5db6 ChangeLog, fsck.c:
fsck.c: Add base device definitions for hd[e-h], for those systems
  	with four IDE interfaces.
2000-09-12 21:21:52 +00:00
Theodore Ts'o 19c689196b ChangeLog, fsck.c:
fsck.c (execute, wait_one): Treat fsck.ext3 the same as fsck.ext2
  	(because they are the same) for the purposes of the progress bar
  	display logic.
ChangeLog, ls.c:
  ls.c (list_super): Display the journal information fields in the
  	superblock if the filesystem has a journal.
2000-07-07 03:25:13 +00:00
Theodore Ts'o 5b1519bf52 ChangeLog, fsck.c:
fsck.c (lookup, load_fs_info, check_all): Use lazy evaluation for
  	calling interpret_device(), since this requires root privileges if the
  	partitions need to be scanned.  Otherwise, it's not possible to do
  	non-proot fsck's for removeable devices such as floppies if there are
  	any LABEL= or UUID= entries in /etc/fstab.
2000-07-06 14:16:08 +00:00
Theodore Ts'o c96e511a0c ChangeLog, fsck.c:
fsck.c (interpret_device): Add better error messages if a UUID= or
  	LABEL= specification is given.
2000-05-08 14:47:15 +00:00
Theodore Ts'o d9c56d3ca0 Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2label.c, findsuper.c, fsck.c,
  get_device_by_label.c, lsattr.c, mke2fs.c, mklost+found.c,
  nls-enable.h, partinfo.c, tune2fs.c, uuidgen.c: Add
  	Internationalization support as suggested by Marco d'Itri
  	<md@linux.it>.
2000-02-08 00:47:55 +00:00
Theodore Ts'o b4ee1fb28e ChangeLog, fsck.c, mke2fs.c, partinfo.c:
fsck.c (interpret_device): If there was an attempt to interpret a
  	device specification of the type "UUID=" or "LABEL=", and it fails,
  	check to see if /proc/partitions is readable.  If not, print a warning
  	message about /proc perhaps not being mounted, and exit.
  mke2fs.c (check_plausibility): Remove unneeded #include of linux/fs.h.
  	Add #define of MAJOR if necessary.
  partinfo.c: Remove unneeded #include of linux/fs.h
2000-02-02 19:08:51 +00:00
Theodore Ts'o 3cb7784f30 ChangeLog, Makefile.in, fsck.c:
Really fix the bug where "fsck -As" will actually allow interactive
  	fsck's.  (For those people who like to do interactive fsck's in the
  	/etc/rc scripts!?!)
2000-01-18 16:30:27 +00:00
Theodore Ts'o 6a35ffa0ed ChangeLog, fsck.c:
fsck.c (main): Move setting of the interactive flag to before the call
  	to check_all(), so that people who try to use fsck -As can do so
  	interactively.
1999-11-04 22:34:43 +00:00
Theodore Ts'o 3bc036691a ChangeLog, fsck.c:
fsck.c (PRS, device_already_active): Add debugging hook; if the
  	environment variable FSCK_FORCE_ALL_PARALLEL is set, then force all
  	fsck runs to happen in parallel.
1999-10-26 17:17:00 +00:00
Theodore Ts'o b5135717e7 ChangeLog, fsck.c:
fsck.c (wait_one): Fix gcc warnings; add #include for ctype.h, add
  	const to char * variables, and use NOARGS to declare functions that
  	take no arguments.  Also fix a memory leak in execute() where we
  	weren't freeing argv[] after forking the child process.
1999-10-26 14:33:24 +00:00
Theodore Ts'o ad6783df0c ChangeLog, fsck.c:
fsck.c (execute): Fix really stupid bug in the linked list management
  	which caused fsck in parallel mode to go into an infinite loop.
ChangeLog, mke2fs.c:
  mke2fs.c (show_stats): Capitalized Hurd to make the GNU types happy.
ChangeLog, configure.in:
  configure.in: Capitalized Hurd to make the GNU folks happy.
1999-10-26 01:58:54 +00:00