From 957ad9473a1f5eee072380eafd2b6143b9a2c9ed Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 14 Mar 2015 12:07:50 +0100 Subject: [PATCH 050/257] swapon: Accept the "late" option for .eli devices Using the late option makes it possible to additionally use the consumer device as (unencrypted!) dump device without making it unavailable for rc.d/savecore (which runs between rc.d/swap and rc.d/swaplate). Obtained from: ElectroBSD Submitted in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198598 Submitted at: 2015-03-15 11:37 UTC --- sbin/swapon/swapon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 052fbc734afb..dfc4951c8137 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -377,7 +377,8 @@ swap_on_geli_args(const char *mntops) } } else if ((p = strstr(token, "notrim")) == token) { Tflag = " -T "; - } else if (strcmp(token, "sw") != 0) { + } else if (strcmp(token, "sw") != 0 && + strcmp(token, "late") != 0) { warnx("Invalid option: %s", token); free(ops); return (NULL); -- 2.11.0