From owner-svn-src-head@FreeBSD.ORG Fri Jun 28 05:09:02 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 7DC91622; Fri, 28 Jun 2013 05:09:02 +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 5649C1249; Fri, 28 Jun 2013 05:09:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5S592vI019940; Fri, 28 Jun 2013 05:09:02 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5S592oM019939; Fri, 28 Jun 2013 05:09:02 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201306280509.r5S592oM019939@svn.freebsd.org> From: Hiroki Sato Date: Fri, 28 Jun 2013 05:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252332 - 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 05:09:02 -0000 Author: hrs Date: Fri Jun 28 05:09:01 2013 New Revision: 252332 URL: http://svnweb.freebsd.org/changeset/base/252332 Log: Fix build. Spotted by: gjb Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Fri Jun 28 05:01:25 2013 (r252331) +++ head/sbin/swapon/swapon.c Fri Jun 28 05:09:01 2013 (r252332) @@ -248,11 +248,11 @@ swap_on_off_gbde(char *name, int doingal { const char *ret; char pass[64 * 2 + 1], bpass[64]; - char *devname, *p; + char *dname, *p; int i, fd, error; - devname = strdup(name); - p = strrchr(devname, '.'); + dname = strdup(name); + p = strrchr(dname, '.'); if (p == NULL) { warnx("%s: Malformed device name", name); return (NULL); @@ -268,7 +268,7 @@ swap_on_off_gbde(char *name, int doingal pass[sizeof(pass) - 1] = '\0'; error = run_cmd(&fd, "%s init %s -P %s", _PATH_GBDE, - devname, pass); + dname, pass); if (error) { /* bde device found. Ignore it. */ close(fd); @@ -278,7 +278,7 @@ swap_on_off_gbde(char *name, int doingal } close(fd); error = run_cmd(&fd, "%s attach %s -p %s", _PATH_GBDE, - devname, pass); + dname, pass); if (error) { close(fd); warnx("gbde (attach) error: %s", name); @@ -298,11 +298,11 @@ swap_on_off_gbde(char *name, int doingal fd = -1; switch (which_prog) { case SWAPOFF: - error = run_cmd(&fd, "%s detach %s", _PATH_GBDE, devname); + error = run_cmd(&fd, "%s detach %s", _PATH_GBDE, dname); if (error) { /* bde device not found. Ignore it. */ if (!qflag) - warnx("%s: Device not found", devname); + warnx("%s: Device not found", dname); return (NULL); } break; @@ -320,14 +320,14 @@ static const char * swap_on_off_geli(char *name, char *mntops, int doingall) { const char *ops, *aalgo, *ealgo, *keylen_str, *sectorsize_str; - char *devname, *p; + char *dname, *p; char args[4096]; struct stat sb; int fd, error, keylen, sectorsize; u_long ul; - devname = strdup(name); - p = strrchr(devname, '.'); + dname = strdup(name); + p = strrchr(dname, '.'); if (p == NULL) { warnx("%s: Malformed device name", name); return (NULL); @@ -397,7 +397,7 @@ swap_on_off_geli(char *name, char *mntop switch (which_prog) { case SWAPON: error = run_cmd(&fd, "%s onetime %s %s", _PATH_GELI, args, - devname); + dname); if (error) { /* eli device found. Ignore it. */ close(fd);