Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2017 10:43:20 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r316097 - stable/10/sbin/swapon
Message-ID:  <201703281043.v2SAhKfM027361@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3 (ports committer)
Date: Tue Mar 28 10:43:20 2017
New Revision: 316097
URL: https://svnweb.freebsd.org/changeset/base/316097

Log:
  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

Modified:
  stable/10/sbin/swapon/swapon.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/swapon/swapon.c
==============================================================================
--- stable/10/sbin/swapon/swapon.c	Tue Mar 28 10:43:19 2017	(r316096)
+++ stable/10/sbin/swapon/swapon.c	Tue Mar 28 10:43:20 2017	(r316097)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703281043.v2SAhKfM027361>