summaryrefslogtreecommitdiff
path: root/sbin/swapon
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2014-10-10 03:20:12 +0000
committerHiroki Sato <hrs@FreeBSD.org>2014-10-10 03:20:12 +0000
commit1482f98247f00bcbd7e5593bec614df7748c5af6 (patch)
tree9b89890fe231ec5672c88982c69d5d60a8752589 /sbin/swapon
parentb888b86e6f8361c87b31e700d2a16ff1c9e0b155 (diff)
downloadsrc-test2-1482f98247f00bcbd7e5593bec614df7748c5af6.tar.gz
src-test2-1482f98247f00bcbd7e5593bec614df7748c5af6.zip
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. Reported by: wblock (long time ago) MFC after: 1 day
Notes
Notes: svn path=/head/; revision=272885
Diffstat (limited to 'sbin/swapon')
-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 5c6086d9bb97..033c40a8edac 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,