From owner-svn-src-head@FreeBSD.ORG Fri Jun 28 16:24:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A9A72F34; Fri, 28 Jun 2013 16:24:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC9C1765; Fri, 28 Jun 2013 16:24:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5SGOEYj015156; Fri, 28 Jun 2013 16:24:14 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5SGOEmK015155; Fri, 28 Jun 2013 16:24:14 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201306281624.r5SGOEmK015155@svn.freebsd.org> From: Hiroki Sato Date: Fri, 28 Jun 2013 16:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252345 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jun 2013 16:24:14 -0000 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;