Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2013 16:24:14 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r252345 - head/sbin/swapon
Message-ID:  <201306281624.r5SGOEmK015155@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Fri Jun 28 16:24:14 2013
New Revision: 252345
URL: http://svnweb.freebsd.org/changeset/base/252345

Log:
  Fix build with gcc.

Modified:
  head/sbin/swapon/swapon.c

Modified: head/sbin/swapon/swapon.c
==============================================================================
--- head/sbin/swapon/swapon.c	Fri Jun 28 16:11:01 2013	(r252344)
+++ head/sbin/swapon/swapon.c	Fri Jun 28 16:24:14 2013	(r252345)
@@ -76,6 +76,8 @@ static int run_cmd(int *, const char *, 
 static enum { SWAPON, SWAPOFF, SWAPCTL } orig_prog, which_prog = SWAPCTL;
 
 static int qflag;
+static char aalgo_default[] = "hmac/sha256";
+static char ealgo_default[] = "aes";
 
 int
 main(int argc, char **argv)
@@ -319,7 +321,7 @@ swap_on_off_gbde(char *name, int doingal
 static const char *
 swap_on_off_geli(char *name, char *mntops, int doingall)
 {
-	const char *ops, *aalgo, *ealgo, *keylen_str, *sectorsize_str;
+	char *ops, *aalgo, *ealgo, *keylen_str, *sectorsize_str;
 	char *dname, *p;
 	char args[4096];
 	struct stat sb;
@@ -337,8 +339,8 @@ swap_on_off_geli(char *name, char *mntop
 	ops = strdup(mntops);
 
 	/* Default parameters for geli(8). */
-	aalgo = "hmac/sha256";
-	ealgo = "aes";
+	aalgo = aalgo_default;
+	ealgo = ealgo_default;
 	keylen = 256;
 	sectorsize = 4096;
 



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