summaryrefslogtreecommitdiff
path: root/sbin/swapon
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2013-06-28 16:24:14 +0000
committerHiroki Sato <hrs@FreeBSD.org>2013-06-28 16:24:14 +0000
commitd122ff71ebadfb8daeeca86400f361597f213c0a (patch)
tree991ce680903f3f8674a94621dc607622aecd54c6 /sbin/swapon
parent4a7d0bfcaa4a2acb63d1d9d56eb7693e682db158 (diff)
downloadsrc-test2-d122ff71ebadfb8daeeca86400f361597f213c0a.tar.gz
src-test2-d122ff71ebadfb8daeeca86400f361597f213c0a.zip
Fix build with gcc.
Notes
Notes: svn path=/head/; revision=252345
Diffstat (limited to 'sbin/swapon')
-rw-r--r--sbin/swapon/swapon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index 84c9b42304a4..cf9b979c1451 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -76,6 +76,8 @@ static int run_cmd(int *, const char *, ...) __printflike(2, 3);
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 doingall)
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 *mntops, int doingall)
ops = strdup(mntops);
/* Default parameters for geli(8). */
- aalgo = "hmac/sha256";
- ealgo = "aes";
+ aalgo = aalgo_default;
+ ealgo = ealgo_default;
keylen = 256;
sectorsize = 4096;