From a14113545168390de8974ee2683124b710977fb6 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 17 Aug 2002 17:39:39 -0400 Subject: [PATCH] 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) --- misc/ChangeLog | 7 +++++++ misc/badblocks.8.in | 4 ++-- misc/fsck.8.in | 19 ++++++++++++++----- misc/fsck.c | 7 ++++--- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index ec3e1e9..725e4b8 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,5 +1,12 @@ 2002-08-17 Theodore Ts'o + * 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) + * chattr.1.in: Document the compression attribute flags E, X, and Z, and explain that chattr can't set or set these flags. (Addresses Debian Bug #151990) diff --git a/misc/badblocks.8.in b/misc/badblocks.8.in index 4812c66..ef5a57f 100644 --- a/misc/badblocks.8.in +++ b/misc/badblocks.8.in @@ -92,8 +92,8 @@ hard drive to be hidden by the effects of the hard disk track buffer. .B \-f Normally, badblocks will refuse to do a read/write or a non-destructive test on a device which is mounted, since either can cause the system to -potentially crash; even a non-destructive test can damage a mounted -filesystem. This can be overriden using the +potentially crash and/or damage the filesystem even if it is mounted +read-only. This can be overriden using the .B \-f flag, but should almost never be used --- if you think you're smarter than the diff --git a/misc/fsck.8.in b/misc/fsck.8.in index 10a19dc..5963562 100644 --- a/misc/fsck.8.in +++ b/misc/fsck.8.in @@ -14,7 +14,7 @@ fsck \- check and repair a Linux file system .B \-t .I fstype ] -.I filesys [ ... ] +.I [filesys ... ] [\-\-] [ .B fs-specific-options ] @@ -28,11 +28,21 @@ a mount point (e.g. .IR / ", " /usr ", " /home ), or an ext2 label or UUID specifier (e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). -The +Normally, the .B fsck program will try to run filesystems on different physical disk drives in parallel to reduce total amount time to check all of the filesystems. .PP +If no filesystems are specified on the command line, and the +.B \-A +option is not specified, +.B fsck +will default to checking filesystems in +.B /etc/fstab +serial. This is equivalent to the +.B \-As +options. +.PP The exit code returned by .B fsck is the sum of the following conditions: @@ -53,9 +63,8 @@ is the sum of the following conditions: .br \ 128\ \-\ Shared library error .br -The exit code returned when all file systems are checked using the -.B \-A -option is the bit-wise OR of the exit codes for each +The exit code returned when multiple file systems are checked +is the bit-wise OR of the exit codes for each file system that is checked. .PP In actuality, diff --git a/misc/fsck.c b/misc/fsck.c index 8503eee..19578a8 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -993,7 +993,7 @@ static int check_all(NOARGS) static void usage(NOARGS) { fprintf(stderr, - _("Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] filesys\n")); + _("Usage: fsck [-ACNPRTV] [-t fstype] [fs-options] [filesys ...]\n")); exit(EXIT_USAGE); } @@ -1173,8 +1173,9 @@ int main(int argc, char *argv[]) return check_all(); if (num_devices == 0) { - fprintf(stderr, _("\nNo devices specified to be checked!\n")); - exit(EXIT_ERROR); + serialize++; + interactive++; + return check_all(); } for (i = 0 ; i < num_devices; i++) { if (cancel_requested) { -- 1.8.3.1