summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2014-10-11 20:35:36 +0000
committerhrs <hrs@FreeBSD.org>2014-10-11 20:35:36 +0000
commit72b3bc6083ec9772d7f168e5fe2564e3f7c3e9bb (patch)
tree56c8b282c18725916b9ee910ffe6828fef6e35b6 /sbin
parentb9241c62af7caf4be8682c5d6c32b7cfadd6c88a (diff)
downloadFreeBSD-src-72b3bc6083ec9772d7f168e5fe2564e3f7c3e9bb.zip
FreeBSD-src-72b3bc6083ec9772d7f168e5fe2564e3f7c3e9bb.tar.gz
MFC r272885:
Do not add late flag when file= is specified because it has a bad side-effect. The specified file should exist before the fstab line.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/swapon/swapon.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 5c6086d..033c40a 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -172,15 +172,8 @@ main(int argc, char **argv)
continue;
if (strstr(fsp->fs_mntops, "noauto") != NULL)
continue;
- /*
- * Forcibly enable "late" option when file= is
- * specified. This is because mounting file
- * systems with rw option is typically
- * required to make the backing store ready.
- */
if (which_prog != SWAPOFF &&
- (strstr(fsp->fs_mntops, "late") != NULL ||
- strstr(fsp->fs_mntops, "file=") != NULL) &&
+ strstr(fsp->fs_mntops, "late") &&
late == 0)
continue;
swfile = swap_on_off(fsp->fs_spec, 1,
OpenPOWER on IntegriCloud