From owner-svn-src-head@FreeBSD.ORG Tue Oct 5 18:38:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3AE106566B; Tue, 5 Oct 2010 18:38:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24BB28FC1D; Tue, 5 Oct 2010 18:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o95IcOSq067058; Tue, 5 Oct 2010 18:38:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o95IcODk067055; Tue, 5 Oct 2010 18:38:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201010051838.o95IcODk067055@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 5 Oct 2010 18:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213458 - in head: sys/compat/x86bios usr.sbin/pw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 05 Oct 2010 18:38:24 -0000 Author: jkim Date: Tue Oct 5 18:38:23 2010 New Revision: 213458 URL: http://svn.freebsd.org/changeset/base/213458 Log: Prefer pmap_unmapbios() over pmap_unmapdev(). The binary does not change after this because pmap_unmapbios() is a macro for pmap_unmapdev() on amd64. Modified: head/sys/compat/x86bios/x86bios.c head/usr.sbin/pw/pw_user.c Modified: head/sys/compat/x86bios/x86bios.c ============================================================================== --- head/sys/compat/x86bios/x86bios.c Tue Oct 5 18:34:43 2010 (r213457) +++ head/sys/compat/x86bios/x86bios.c Tue Oct 5 18:38:23 2010 (r213458) @@ -679,7 +679,7 @@ x86bios_unmap_mem(void) free(x86bios_map, M_DEVBUF); if (x86bios_ivt != NULL) #ifdef X86BIOS_NATIVE_ARCH - pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); + pmap_unmapbios((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); #else free(x86bios_ivt, M_DEVBUF); #endif Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Tue Oct 5 18:34:43 2010 (r213457) +++ head/usr.sbin/pw/pw_user.c Tue Oct 5 18:38:23 2010 (r213458) @@ -151,14 +151,14 @@ pw_user(struct userconf * cnf, int mode, cnf->home = arg->val; } + dmode = S_IRWXU | S_IRWXG | S_IRWXO; if ((arg = getarg(args, 'M')) != NULL) { dmode_c = arg->val; if ((set = setmode(dmode_c)) == NULL) errx(EX_DATAERR, "invalid directory creation mode '%s'", dmode_c); - dmode = getmode(set, S_IRWXU | S_IRWXG | S_IRWXO); + cnf->homemode = getmode(set, dmode); free(set); - cnf->homemode = dmode; } /* @@ -186,7 +186,7 @@ pw_user(struct userconf * cnf, int mode, if (strchr(cnf->home+1, '/') == NULL) { strcpy(dbuf, "/usr"); strncat(dbuf, cnf->home, MAXPATHLEN-5); - if (mkdir(dbuf, cnf->homemode) != -1 || errno == EEXIST) { + if (mkdir(dbuf, dmode) != -1 || errno == EEXIST) { chown(dbuf, 0, 0); /* * Skip first "/" and create symlink: @@ -202,7 +202,7 @@ pw_user(struct userconf * cnf, int mode, while ((p = strchr(++p, '/')) != NULL) { *p = '\0'; if (stat(dbuf, &st) == -1) { - if (mkdir(dbuf, cnf->homemode) == -1) + if (mkdir(dbuf, dmode) == -1) goto direrr; chown(dbuf, 0, 0); } else if (!S_ISDIR(st.st_mode)) @@ -211,7 +211,7 @@ pw_user(struct userconf * cnf, int mode, } } if (stat(dbuf, &st) == -1) { - if (mkdir(dbuf, cnf->homemode) == -1) { + if (mkdir(dbuf, dmode) == -1) { direrr: err(EX_OSFILE, "mkdir '%s'", dbuf); } chown(dbuf, 0, 0);