diff options
author | hrs <hrs@FreeBSD.org> | 2013-06-28 16:24:14 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2013-06-28 16:24:14 +0000 |
commit | 09fe89cd96bbc75840d8dbf963f10ebc16f4083d (patch) | |
tree | 991ce680903f3f8674a94621dc607622aecd54c6 /sbin/swapon | |
parent | 4b2a7a843ce200759f962b91ce75977ae270fe3f (diff) | |
download | FreeBSD-src-09fe89cd96bbc75840d8dbf963f10ebc16f4083d.zip FreeBSD-src-09fe89cd96bbc75840d8dbf963f10ebc16f4083d.tar.gz |
Fix build with gcc.
Diffstat (limited to 'sbin/swapon')
-rw-r--r-- | sbin/swapon/swapon.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 84c9b42..cf9b979 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; |