summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2017-03-28 10:43:20 +0000
committeramdmi3 <amdmi3@FreeBSD.org>2017-03-28 10:43:20 +0000
commit3cf98bc8310d101076bca85045c7350a8c32bcff (patch)
tree18ac9b43f2e74c4597cb2ba7dba19991ac61c1fb /sbin
parent5cce34140bff83a2290a43482ed253700ecb6790 (diff)
downloadFreeBSD-src-3cf98bc8310d101076bca85045c7350a8c32bcff.zip
FreeBSD-src-3cf98bc8310d101076bca85045c7350a8c32bcff.tar.gz
MFC r315242: Fix late and noauto with geli swap
With the following in /etc/fstab: /dev/gpt/swap.eli none swap sw,late 0 0 swap will not be enabled, with `swapon -aL' complaining: swapon: Invalid option: late This happens because swap_on_geli_args() which parses geli arguments out of all mount options does not expect late or noauto among them. Fix this by explicitly allowing these arguments. Reviewed by: jilles Approved by: jilles Differential Revision: D9835
Diffstat (limited to 'sbin')
-rw-r--r--sbin/swapon/swapon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 436ccd6..22e04cf 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -369,6 +369,10 @@ swap_on_geli_args(const char *mntops)
free(ops);
return (NULL);
}
+ } else if (strcmp(token, "late") == 0) {
+ /* ignore known option */
+ } else if (strcmp(token, "noauto") == 0) {
+ /* ignore known option */
} else if (strcmp(token, "sw") != 0) {
warnx("Invalid option: %s", token);
free(ops);
OpenPOWER on IntegriCloud