From 685c13f6d759490c82044cc071fd8110847fd1dd Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 15 Aug 2001 19:04:59 -0400 Subject: [PATCH] fsck.c (main): Print a warning message if there are no devices to be checked. (Addresses Debian bug #107458.) --- misc/ChangeLog | 4 +++- misc/fsck.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/ChangeLog b/misc/ChangeLog index fa07899..a7e5c1c 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,7 +1,9 @@ 2001-08-15 Theodore Tso * fsck.c (check_all): Don't bother to interpret a device where the - pass number is zero. (Addresses Debian bug #106696). + pass number is zero. (Addresses Debian bug #106696.) + (main): Print a warning message if there are no devices to + be checked. (Addresses Debian bug #107458.) * mke2fs.c (PRS): Handle -O and -s options in line in the getopt loop, so that -s and -O handling are a bit more intuitive. diff --git a/misc/fsck.c b/misc/fsck.c index c469ad7..f0f05b4 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -1116,6 +1116,10 @@ int main(int argc, char *argv[]) if (doall) return check_all(); + if (num_devices == 0) { + fprintf(stderr, _("\nNo devices specified to be checked!\n")); + exit(EXIT_ERROR); + } for (i = 0 ; i < num_devices; i++) { fsck_device(devices[i], interactive); if (serialize) { -- 1.8.3.1