summaryrefslogtreecommitdiff
path: root/util-linux/swaponoff.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/swaponoff.c')
-rw-r--r--util-linux/swaponoff.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index bc096ea..dca4019 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/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: