aboutsummaryrefslogtreecommitdiff
path: root/swaponoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaponoff.c')
-rw-r--r--swaponoff.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/swaponoff.c b/swaponoff.c
index bc096ea95..dca401966 100644
--- a/swaponoff.c
+++ b/swaponoff.c
@@ -108,7 +108,12 @@ extern int swap_on_off_main(int argc, char **argv)
while (*++(*argv))
switch (**argv) {
case 'a':
- whine_if_fstab_is_missing();
+ {
+ struct stat statBuf;
+
+ if (stat("/etc/fstab", &statBuf) < 0)
+ fatalError("/etc/fstab file missing\n");
+ }
do_em_all();
break;
default: