From owner-svn-src-stable-10@freebsd.org Sun Nov 1 22:27:41 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA365A24EB2; Sun, 1 Nov 2015 22:27:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91DE919F1; Sun, 1 Nov 2015 22:27:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA1MRe0A050162; Sun, 1 Nov 2015 22:27:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA1MRe6U050160; Sun, 1 Nov 2015 22:27:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511012227.tA1MRe6U050160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Nov 2015 22:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290246 - in stable/10: sbin/mount share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2015 22:27:42 -0000 Author: ngie Date: Sun Nov 1 22:27:40 2015 New Revision: 290246 URL: https://svnweb.freebsd.org/changeset/base/290246 Log: MFC r289229: Replace references to /dev/acd0 with /dev/cd0 atapicd(4) was replaced by cd(4) with the atacam work done by mav@ and then removed in r249083 X-MFC to: stable/10 Modified: stable/10/sbin/mount/mount.8 stable/10/share/man/man5/devfs.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Sun Nov 1 22:17:39 2015 (r290245) +++ stable/10/sbin/mount/mount.8 Sun Nov 1 22:27:40 2015 (r290246) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd December 3, 2014 +.Dd November 1, 2015 .Dt MOUNT 8 .Os .Sh NAME @@ -189,7 +189,7 @@ to use the specified program to mount th directly. For example: .Bd -literal -mount -t foofs -o mountprog=/mydir/fooprog /dev/acd0 /mnt +mount -t foofs -o mountprog=/mydir/fooprog /dev/cd0 /mnt .Ed .It Cm multilabel Enable multi-label Mandatory Access Control, or MAC, on the specified file Modified: stable/10/share/man/man5/devfs.conf.5 ============================================================================== --- stable/10/share/man/man5/devfs.conf.5 Sun Nov 1 22:17:39 2015 (r290245) +++ stable/10/share/man/man5/devfs.conf.5 Sun Nov 1 22:27:40 2015 (r290246) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2005 +.Dd November 1, 2015 .Dt DEVFS.CONF 5 .Os .Sh NAME @@ -109,9 +109,9 @@ link cd0 cdrom .Pp Similarly, to link .Pa /dev/cdrom -to the first ATAPI CD-ROM device, the following action may be used: +to the first SCSI CD-ROM device, the following action may be used: .Bd -literal -offset indent -link acd0 cdrom +link cd0 cdrom .Ed .Pp To set the owner of a device, the From owner-svn-src-stable-10@freebsd.org Mon Nov 2 13:14:28 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE9D1A22207; Mon, 2 Nov 2015 13:14:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E2FE19AC; Mon, 2 Nov 2015 13:14:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2DERV4020739; Mon, 2 Nov 2015 13:14:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2DER05020738; Mon, 2 Nov 2015 13:14:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511021314.tA2DER05020738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 2 Nov 2015 13:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290271 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 13:14:28 -0000 Author: kib Date: Mon Nov 2 13:14:27 2015 New Revision: 290271 URL: https://svnweb.freebsd.org/changeset/base/290271 Log: MFC r289496: Modify the 'unchanged' calculation bu dereferencing the marker tailq pointers, which is known to belong to the queue. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Mon Nov 2 11:06:51 2015 (r290270) +++ stable/10/sys/vm/vm_pageout.c Mon Nov 2 13:14:27 2015 (r290271) @@ -286,11 +286,21 @@ vm_pageout_fallback_object_lock(vm_page_ vm_page_lock(m); vm_pagequeue_lock(pq); - /* Page queue might have changed. */ + /* + * The page's object might have changed, and/or the page might + * have moved from its original position in the queue. If the + * page's object has changed, then the caller should abandon + * processing the page because the wrong object lock was + * acquired. Use the marker's plinks.q, not the page's, to + * determine if the page has been moved. The state of the + * page's plinks.q can be indeterminate; whereas, the marker's + * plinks.q must be valid. + */ *next = TAILQ_NEXT(&marker, plinks.q); - unchanged = (m->queue == queue && - m->object == object && - &marker == TAILQ_NEXT(m, plinks.q)); + unchanged = m->object == object && + m == TAILQ_PREV(&marker, pglist, plinks.q); + KASSERT(!unchanged || m->queue == queue, + ("page %p queue %d %d", m, queue, m->queue)); TAILQ_REMOVE(&pq->pq_pl, &marker, plinks.q); return (unchanged); } @@ -327,7 +337,9 @@ vm_pageout_page_lock(vm_page_t m, vm_pag /* Page queue might have changed. */ *next = TAILQ_NEXT(&marker, plinks.q); - unchanged = (m->queue == queue && &marker == TAILQ_NEXT(m, plinks.q)); + unchanged = m == TAILQ_PREV(&marker, pglist, plinks.q); + KASSERT(!unchanged || m->queue == queue, + ("page %p queue %d %d", m, queue, m->queue)); TAILQ_REMOVE(&pq->pq_pl, &marker, plinks.q); return (unchanged); } From owner-svn-src-stable-10@freebsd.org Mon Nov 2 17:41:16 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2C02A24416; Mon, 2 Nov 2015 17:41:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BD3A1830; Mon, 2 Nov 2015 17:41:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2HfFGv097041; Mon, 2 Nov 2015 17:41:15 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2HfFA7097040; Mon, 2 Nov 2015 17:41:15 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201511021741.tA2HfFA7097040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 2 Nov 2015 17:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290274 - in stable: 10/secure/lib/libcrypto 9/secure/lib/libcrypto X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 17:41:16 -0000 Author: jkim Date: Mon Nov 2 17:41:15 2015 New Revision: 290274 URL: https://svnweb.freebsd.org/changeset/base/290274 Log: MFC: r290121 Define endianness for non-x86 platforms. Modified: stable/10/secure/lib/libcrypto/Makefile.inc Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/secure/lib/libcrypto/Makefile.inc Directory Properties: stable/9/secure/lib/libcrypto/ (props changed) Modified: stable/10/secure/lib/libcrypto/Makefile.inc ============================================================================== --- stable/10/secure/lib/libcrypto/Makefile.inc Mon Nov 2 16:56:34 2015 (r290273) +++ stable/10/secure/lib/libcrypto/Makefile.inc Mon Nov 2 17:41:15 2015 (r290274) @@ -13,8 +13,16 @@ CFLAGS+= -DTERMIOS -DANSI_SOURCE CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} CFLAGS+= -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H +.include + +.if ${TARGET_ENDIANNESS} == 1234 +CFLAGS+=-DL_ENDIAN +.elif ${TARGET_ENDIANNESS} == 4321 +CFLAGS+=-DB_ENDIAN +.endif + .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 +CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM @@ -22,7 +30,7 @@ CFLAGS+=-DGHASH_ASM CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM CFLAGS+=-DWHIRLPOOL_ASM .elif ${MACHINE_CPUARCH} == "i386" -CFLAGS+=-DL_ENDIAN -DOPENSSL_IA32_SSE2 +CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DVPAES_ASM CFLAGS+=-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m CFLAGS+=-DMD5_ASM From owner-svn-src-stable-10@freebsd.org Mon Nov 2 21:26:11 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FE8DA24F3F; Mon, 2 Nov 2015 21:26:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C51F1C05; Mon, 2 Nov 2015 21:26:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2LQA0k064181; Mon, 2 Nov 2015 21:26:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LQAcO064179; Mon, 2 Nov 2015 21:26:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022126.tA2LQAcO064179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 21:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290277 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:26:11 -0000 Author: dteske Date: Mon Nov 2 21:26:10 2015 New Revision: 290277 URL: https://svnweb.freebsd.org/changeset/base/290277 Log: MFC r290163: Ignore per-mdN settings in mdconfig[2] startup PR: base/189696 Submitted by: ganael.laplanche@martymac.org Modified: stable/10/etc/rc.d/mdconfig stable/10/etc/rc.d/mdconfig2 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/mdconfig ============================================================================== --- stable/10/etc/rc.d/mdconfig Mon Nov 2 21:21:00 2015 (r290276) +++ stable/10/etc/rc.d/mdconfig Mon Nov 2 21:26:10 2015 (r290277) @@ -186,6 +186,8 @@ if [ -z "${_mdconfig_list}" ]; then sort_lite -nk1.12` do _mdconfig_unit=${_mdconfig_config#mdconfig_md} + [ "${_mdconfig_unit#*[!0-9]}" = "$_mdconfig_unit" ] || + continue _mdconfig_list="$_mdconfig_list md$_mdconfig_unit" done _mdconfig_list="${_mdconfig_list# }" Modified: stable/10/etc/rc.d/mdconfig2 ============================================================================== --- stable/10/etc/rc.d/mdconfig2 Mon Nov 2 21:21:00 2015 (r290276) +++ stable/10/etc/rc.d/mdconfig2 Mon Nov 2 21:26:10 2015 (r290277) @@ -216,6 +216,8 @@ if [ -z "${_mdconfig2_list}" ]; then sort_lite -nk1.12` do _mdconfig2_unit=${_mdconfig2_config#mdconfig_md} + [ "${_mdconfig2_unit#*[!0-9]}" = "$_mdconfig2_unit" ] || + continue _mdconfig2_list="$_mdconfig2_list md$_mdconfig2_unit" done _mdconfig2_list="${_mdconfig2_list# }" From owner-svn-src-stable-10@freebsd.org Mon Nov 2 21:33:37 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD07A250EE; Mon, 2 Nov 2015 21:33:37 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A41114B; Mon, 2 Nov 2015 21:33:37 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2LXaoD067156; Mon, 2 Nov 2015 21:33:36 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LXaeZ067155; Mon, 2 Nov 2015 21:33:36 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022133.tA2LXaeZ067155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 21:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290279 - stable/10/lib/libfigpar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:33:37 -0000 Author: dteske Date: Mon Nov 2 21:33:36 2015 New Revision: 290279 URL: https://svnweb.freebsd.org/changeset/base/290279 Log: MFC r289794: figpar(3) merged to stable/10 before release/10.2.0 Modified: stable/10/lib/libfigpar/figpar.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfigpar/figpar.3 ============================================================================== --- stable/10/lib/libfigpar/figpar.3 Mon Nov 2 21:30:52 2015 (r290278) +++ stable/10/lib/libfigpar/figpar.3 Mon Nov 2 21:33:36 2015 (r290279) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2014 Devin Teske +.\" Copyright (c) 2013-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 24, 2014 +.Dd Oct 22, 2015 .Dt FIGPAR 3 .Os .Sh NAME @@ -243,7 +243,7 @@ Convert a string to lower case. The .Nm library first appeared in -.Fx 11.0 . +.Fx 10.2 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS From owner-svn-src-stable-10@freebsd.org Mon Nov 2 21:34:40 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA566A25136; Mon, 2 Nov 2015 21:34:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C3412B0; Mon, 2 Nov 2015 21:34:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2LYd7i067265; Mon, 2 Nov 2015 21:34:39 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LYdbJ067264; Mon, 2 Nov 2015 21:34:39 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022134.tA2LYdbJ067264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 21:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290280 - stable/10/lib/libdpv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:34:41 -0000 Author: dteske Date: Mon Nov 2 21:34:39 2015 New Revision: 290280 URL: https://svnweb.freebsd.org/changeset/base/290280 Log: MFC r289793: Bump date/copyright after correcting HISTORY Modified: stable/10/lib/libdpv/dpv.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdpv/dpv.3 ============================================================================== --- stable/10/lib/libdpv/dpv.3 Mon Nov 2 21:33:36 2015 (r290279) +++ stable/10/lib/libdpv/dpv.3 Mon Nov 2 21:34:39 2015 (r290280) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2013-2014 Devin Teske +.\" Copyright (c) 2013-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 24, 2014 +.Dd Oct 22, 2015 .Dt DPV 3 .Os .Sh NAME From owner-svn-src-stable-10@freebsd.org Mon Nov 2 21:39:47 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF4FAA25281; Mon, 2 Nov 2015 21:39:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3FE41784; Mon, 2 Nov 2015 21:39:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2Ldkqw067558; Mon, 2 Nov 2015 21:39:46 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LdkQd067557; Mon, 2 Nov 2015 21:39:46 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022139.tA2LdkQd067557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 21:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290281 - stable/10/lib/libdpv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:39:48 -0000 Author: dteske Date: Mon Nov 2 21:39:46 2015 New Revision: 290281 URL: https://svnweb.freebsd.org/changeset/base/290281 Log: MFC r289790: dpv(3) merged to stable/10 before release/10.2.0 Modified: stable/10/lib/libdpv/dpv.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdpv/dpv.3 ============================================================================== --- stable/10/lib/libdpv/dpv.3 Mon Nov 2 21:34:39 2015 (r290280) +++ stable/10/lib/libdpv/dpv.3 Mon Nov 2 21:39:46 2015 (r290281) @@ -441,7 +441,7 @@ or desired values. The .Nm library first appeared in -.Fx 11.0 . +.Fx 10.2 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh BUGS From owner-svn-src-stable-10@freebsd.org Mon Nov 2 21:47:00 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43A24A25465; Mon, 2 Nov 2015 21:47:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E61791D0D; Mon, 2 Nov 2015 21:46:59 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2Lkw1p070473; Mon, 2 Nov 2015 21:46:58 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LkwEl070472; Mon, 2 Nov 2015 21:46:58 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022146.tA2LkwEl070472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 21:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290282 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:47:00 -0000 Author: dteske Date: Mon Nov 2 21:46:58 2015 New Revision: 290282 URL: https://svnweb.freebsd.org/changeset/base/290282 Log: MFC r287696: The /mkisoimages.sh script in release knows how to add extra bits from an "xtra-bits-dir". This feature is unusable from release/Makefile. Add an XTRADIR setting to use it. MFC r287697: Whitespace alignment Differential Revision: https://reviews.freebsd.org/D3633 Reviewed by: kmacy Relnotes: yes Modified: stable/10/release/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Mon Nov 2 21:39:46 2015 (r290281) +++ stable/10/release/Makefile Mon Nov 2 21:46:58 2015 (r290282) @@ -21,6 +21,7 @@ # (by default, the directory above this one) # PORTSDIR: location of ports tree to distribute (default: /usr/ports) # DOCDIR: location of doc tree (default: /usr/doc) +# XTRADIR: xtra-bits-dir argument for /mkisoimages.sh # NOPKG: if set, do not distribute third-party packages # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree @@ -248,7 +249,7 @@ dvd: packagesystem release.iso: disc1.iso disc1.iso: disc1 - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 ${XTRADIR} uefi-disc1.iso: disc1 .if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) @@ -263,7 +264,7 @@ uefi-bootonly.iso: bootonly .endif dvd1.iso: dvd pkg-stage - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd ${XTRADIR} uefi-dvd1.iso: dvd pkg-stage .if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh) @@ -272,7 +273,7 @@ uefi-dvd1.iso: dvd pkg-stage .endif bootonly.iso: bootonly - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly ${XTRADIR} memstick: memstick.img memstick.img: disc1 From owner-svn-src-stable-10@freebsd.org Mon Nov 2 21:58:21 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2702AA2562F; Mon, 2 Nov 2015 21:58:21 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F197E121B; Mon, 2 Nov 2015 21:58:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2LwJ9c073444; Mon, 2 Nov 2015 21:58:19 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2LwJEa073438; Mon, 2 Nov 2015 21:58:19 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022158.tA2LwJEa073438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 21:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290283 - in stable/10/release: amd64 i386 pc98 powerpc sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 21:58:21 -0000 Author: dteske Date: Mon Nov 2 21:58:19 2015 New Revision: 290283 URL: https://svnweb.freebsd.org/changeset/base/290283 Log: MFC r287635: Fix argument quoting and remove unnecessary braces Modified: stable/10/release/amd64/mkisoimages.sh stable/10/release/i386/mkisoimages.sh stable/10/release/pc98/mkisoimages.sh stable/10/release/powerpc/mkisoimages.sh stable/10/release/sparc64/mkisoimages.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/release/amd64/mkisoimages.sh ============================================================================== --- stable/10/release/amd64/mkisoimages.sh Mon Nov 2 21:46:58 2015 (r290282) +++ stable/10/release/amd64/mkisoimages.sh Mon Nov 2 21:58:19 2015 (r290283) @@ -32,14 +32,14 @@ else fi if [ $# -lt 3 ]; then - echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" exit 1 fi -LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift -NAME=$1; shift +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab" +makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" +rm "$1/etc/fstab" Modified: stable/10/release/i386/mkisoimages.sh ============================================================================== --- stable/10/release/i386/mkisoimages.sh Mon Nov 2 21:46:58 2015 (r290282) +++ stable/10/release/i386/mkisoimages.sh Mon Nov 2 21:58:19 2015 (r290283) @@ -32,14 +32,14 @@ else fi if [ $# -lt 3 ]; then - echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" exit 1 fi -LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift -NAME=$1; shift +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab" +makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" +rm "$1/etc/fstab" Modified: stable/10/release/pc98/mkisoimages.sh ============================================================================== --- stable/10/release/pc98/mkisoimages.sh Mon Nov 2 21:46:58 2015 (r290282) +++ stable/10/release/pc98/mkisoimages.sh Mon Nov 2 21:58:19 2015 (r290283) @@ -32,14 +32,14 @@ else fi if [ $# -lt 3 ]; then - echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" exit 1 fi -LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift -NAME=$1; shift +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab" +makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" +rm "$1/etc/fstab" Modified: stable/10/release/powerpc/mkisoimages.sh ============================================================================== --- stable/10/release/powerpc/mkisoimages.sh Mon Nov 2 21:46:58 2015 (r290282) +++ stable/10/release/powerpc/mkisoimages.sh Mon Nov 2 21:58:19 2015 (r290283) @@ -25,18 +25,18 @@ if [ "x$1" = "x-b" ]; then # Apple boot code - uudecode -o /tmp/hfs-boot-block.bz2 `dirname $0`/hfs-boot.bz2.uu + uudecode -o /tmp/hfs-boot-block.bz2 "`dirname "$0"`/hfs-boot.bz2.uu" bzip2 -d /tmp/hfs-boot-block.bz2 OFFSET=$(hd /tmp/hfs-boot-block | grep 'Loader START' | cut -f 1 -d ' ') OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') - dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc + dd if="$4/boot/loader" of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" # pSeries/PAPR boot code - mkdir -p $4/ppc/chrp - cp $4/boot/loader $4/ppc/chrp - cat > $4/ppc/bootinfo.txt << EOF + mkdir -p "$4/ppc/chrp" + cp "$4/boot/loader" "$4/ppc/chrp" + cat > "$4/ppc/bootinfo.txt" << EOF FreeBSD Install FreeBSD @@ -46,7 +46,7 @@ EOF bootable="$bootable -o chrp-boot" # Playstation 3 boot code - echo "FreeBSD Install='/boot/loader.ps3'" > $4/etc/kboot.conf + echo "FreeBSD Install='/boot/loader.ps3'" > "$4/etc/kboot.conf" shift else @@ -54,16 +54,16 @@ else fi if [ $# -lt 3 ]; then - echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" exit 1 fi -LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift -NAME=$1; shift +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $* -rm $1/etc/fstab +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab" +makefs -t cd9660 $bootable -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME" "$@" +rm "$1/etc/fstab" rm /tmp/hfs-boot-block -rm -rf $1/ppc +rm -rf "$1/ppc" Modified: stable/10/release/sparc64/mkisoimages.sh ============================================================================== --- stable/10/release/sparc64/mkisoimages.sh Mon Nov 2 21:46:58 2015 (r290282) +++ stable/10/release/sparc64/mkisoimages.sh Mon Nov 2 21:58:19 2015 (r290283) @@ -23,62 +23,62 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. if [ $# -lt 3 ]; then - echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' > /dev/stderr + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" > /dev/stderr exit 1 fi -case $1 in --b) BOPT=$1; shift ;; +case "$1" in +-b) BOPT="$1"; shift ;; esac -LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift -NAME=$1; shift -BASEBITSDIR=$1 +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift +BASEBITSDIR="$1" # Create an ISO image publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "${BASEBITSDIR}/etc/fstab" -makefs -t cd9660 -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $* -rm "${BASEBITSDIR}/etc/fstab" +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab" +makefs -t cd9660 -o rockridge -o label="$LABEL" -o publisher="$publisher" "$NAME.tmp" "$@" +rm "$BASEBITSDIR/etc/fstab" if [ "x$BOPT" != "x-b" ]; then - mv ${NAME}.tmp ${NAME} + mv "$NAME.tmp" "$NAME" exit 0 fi TMPIMGDIR=`mktemp -d /tmp/bootfs.XXXXXXXX` || exit 1 -BOOTFSDIR="${TMPIMGDIR}/bootfs" -BOOTFSIMG="${TMPIMGDIR}/bootfs.img" +BOOTFSDIR="$TMPIMGDIR/bootfs" +BOOTFSIMG="$TMPIMGDIR/bootfs.img" # Create a boot filesystem -mkdir -p "${BOOTFSDIR}/boot" -cp -p "${BASEBITSDIR}/boot/loader" "${BOOTFSDIR}/boot" -makefs -t ffs -B be -M 512k "${BOOTFSIMG}" "${BOOTFSDIR}" -dd if="${BASEBITSDIR}/boot/boot1" of="${BOOTFSIMG}" bs=512 conv=notrunc,sync +mkdir -p "$BOOTFSDIR/boot" +cp -p "$BASEBITSDIR/boot/loader" "$BOOTFSDIR/boot" +makefs -t ffs -B be -M 512k "$BOOTFSIMG" "$BOOTFSDIR" +dd if="$BASEBITSDIR/boot/boot1" of="$BOOTFSIMG" bs=512 conv=notrunc,sync # Create a boot ISO image : ${CYLSIZE:=640} -ISOSIZE=$(stat -f %z ${NAME}.tmp) -ISOBLKS=$(((${ISOSIZE} + 511) / 512)) -ISOCYLS=$(((${ISOBLKS} + (${CYLSIZE} - 1)) / ${CYLSIZE})) - -BOOTFSSIZE=$(stat -f %z "${BOOTFSIMG}") -BOOTFSBLKS=$(((${BOOTFSSIZE} + 511) / 512)) -BOOTFSCYLS=$(((${BOOTFSBLKS} + (${CYLSIZE} - 1)) / ${CYLSIZE})) +ISOSIZE=$(stat -f %z "$NAME.tmp") +ISOBLKS=$((($ISOSIZE + 511) / 512)) +ISOCYLS=$((($ISOBLKS + ($CYLSIZE - 1)) / $CYLSIZE)) + +BOOTFSSIZE=$(stat -f %z "$BOOTFSIMG") +BOOTFSBLKS=$((($BOOTFSSIZE + 511) / 512)) +BOOTFSCYLS=$((($BOOTFSBLKS + ($CYLSIZE - 1)) / $CYLSIZE)) -ENDCYL=$((${ISOCYLS} + ${BOOTFSCYLS})) -NSECTS=$((${ENDCYL} * 1 * ${CYLSIZE})) +ENDCYL=$(($ISOCYLS + $BOOTFSCYLS)) +NSECTS=$(($ENDCYL * 1 * $CYLSIZE)) -dd if=${NAME}.tmp of=${NAME} bs=${CYLSIZE}b conv=notrunc,sync -dd if=${BOOTFSIMG} of=${NAME} bs=${CYLSIZE}b seek=${ISOCYLS} conv=notrunc,sync +dd if="$NAME.tmp" of="$NAME" bs="${CYLSIZE}b" conv=notrunc,sync +dd if="$BOOTFSIMG" of="$NAME" bs="${CYLSIZE}b" seek=$ISOCYLS conv=notrunc,sync # The number of alternative cylinders is always 2. -dd if=/dev/zero of=${NAME} bs=${CYLSIZE}b seek=${ENDCYL} count=2 conv=notrunc,sync -rm -rf ${NAME}.tmp ${TMPIMGDIR} +dd if=/dev/zero of="$NAME" bs="${CYLSIZE}b" seek=$ENDCYL count=2 conv=notrunc,sync +rm -rf "$NAME.tmp" "$TMPIMGDIR" # Write VTOC8 label to boot ISO image -MD=`mdconfig -a -t vnode -S 512 -y 1 -x ${CYLSIZE} -f ${NAME}` -gpart create -s VTOC8 ${MD} +MD=`mdconfig -a -t vnode -S 512 -y 1 -x "$CYLSIZE" -f "$NAME"` +gpart create -s VTOC8 $MD # !4: usr, for ISO image part -gpart add -i 1 -s $((${ISOCYLS} * ${CYLSIZE} * 512))b -t \!4 ${MD} +gpart add -i 1 -s "$(($ISOCYLS * $CYLSIZE * 512))b" -t \!4 $MD # !2: root, for bootfs part. -gpart add -i 6 -s $((${BOOTFSCYLS} * ${CYLSIZE} * 512))b -t \!2 ${MD} +gpart add -i 6 -s "$(($BOOTFSCYLS * $CYLSIZE * 512))b" -t \!2 $MD mdconfig -d -u ${MD#md} From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:01:20 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1B52A25764; Mon, 2 Nov 2015 22:01:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C28D151F; Mon, 2 Nov 2015 22:01:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M1JPx075646; Mon, 2 Nov 2015 22:01:19 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M1J4M075645; Mon, 2 Nov 2015 22:01:19 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022201.tA2M1J4M075645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290284 - stable/10/usr.sbin/bsdconfig/share X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:01:20 -0000 Author: dteske Date: Mon Nov 2 22:01:19 2015 New Revision: 290284 URL: https://svnweb.freebsd.org/changeset/base/290284 Log: MFC r287803: Fix code typo (no functional change) Modified: stable/10/usr.sbin/bsdconfig/share/common.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/common.subr Mon Nov 2 21:58:19 2015 (r290283) +++ stable/10/usr.sbin/bsdconfig/share/common.subr Mon Nov 2 22:01:19 2015 (r290284) @@ -1,7 +1,7 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1 # # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2014 Devin Teske +# Copyright (c) 2012-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_S # Default file descriptors to link to stdout/stderr for passthru allowing # redirection within a sub-shell to bypass directly to the terminal. # -: ${TERMINAL_STDOUT_PASSTHRU:=3}} -: ${TERMINAL_STDERR_PASSTHRU:=4}} +: ${TERMINAL_STDOUT_PASSTHRU:=3} +: ${TERMINAL_STDERR_PASSTHRU:=4} ############################################################ GLOBALS From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:02:37 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34511A257F1; Mon, 2 Nov 2015 22:02:37 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F003F196D; Mon, 2 Nov 2015 22:02:36 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M2ZsI076339; Mon, 2 Nov 2015 22:02:35 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M2ZRr076338; Mon, 2 Nov 2015 22:02:35 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022202.tA2M2ZRr076338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290285 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:02:37 -0000 Author: dteske Date: Mon Nov 2 22:02:35 2015 New Revision: 290285 URL: https://svnweb.freebsd.org/changeset/base/290285 Log: MFC r287693: Update copyright Modified: stable/10/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/script Mon Nov 2 22:01:19 2015 (r290284) +++ stable/10/usr.sbin/bsdinstall/scripts/script Mon Nov 2 22:02:35 2015 (r290285) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2013 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:03:26 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02214A25876; Mon, 2 Nov 2015 22:03:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C24221AF0; Mon, 2 Nov 2015 22:03:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M3OQ9076431; Mon, 2 Nov 2015 22:03:24 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M3OMA076430; Mon, 2 Nov 2015 22:03:24 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022203.tA2M3OMA076430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290286 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:03:26 -0000 Author: dteske Date: Mon Nov 2 22:03:24 2015 New Revision: 290286 URL: https://svnweb.freebsd.org/changeset/base/290286 Log: MFC r287692: Better to reset trap and explicitly exit success Modified: stable/10/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/script Mon Nov 2 22:02:35 2015 (r290285) +++ stable/10/usr.sbin/bsdinstall/scripts/script Mon Nov 2 22:03:24 2015 (r290286) @@ -129,7 +129,8 @@ bsdinstall umount f_dprintf "Installation Completed at %s" "$( date )" -trap true EXIT +trap - EXIT +exit $SUCCESS ################################################################################ # END From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:04:23 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B930CA258E0; Mon, 2 Nov 2015 22:04:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80E921CC9; Mon, 2 Nov 2015 22:04:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M4MOK076517; Mon, 2 Nov 2015 22:04:22 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M4Mlp076516; Mon, 2 Nov 2015 22:04:22 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022204.tA2M4Mlp076516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290287 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:04:23 -0000 Author: dteske Date: Mon Nov 2 22:04:22 2015 New Revision: 290287 URL: https://svnweb.freebsd.org/changeset/base/290287 Log: MFC r287695: Replace `return' outside of function with exit Pointy hat to: me Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Mon Nov 2 22:03:24 2015 (r290286) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Mon Nov 2 22:04:22 2015 (r290287) @@ -1644,7 +1644,7 @@ while :; do esac done -return $SUCCESS +exit $SUCCESS ################################################################################ # END From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:05:05 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1BEDA2598C; Mon, 2 Nov 2015 22:05:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DC1F1EED; Mon, 2 Nov 2015 22:05:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M54T1076600; Mon, 2 Nov 2015 22:05:04 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M54q8076599; Mon, 2 Nov 2015 22:05:04 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022205.tA2M54q8076599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290288 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:05:05 -0000 Author: dteske Date: Mon Nov 2 22:05:04 2015 New Revision: 290288 URL: https://svnweb.freebsd.org/changeset/base/290288 Log: MFC r287694: Use a variable for readability Modified: stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Mon Nov 2 22:04:22 2015 (r290287) +++ stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Mon Nov 2 22:05:04 2015 (r290288) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -168,7 +168,7 @@ if [ "$BSDINSTALL_CONFIGCURRENT" ]; then f_dprintf "%s" "$output" fi -exit 0 +exit $SUCCESS ################################################################################ # END From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:05:43 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44710A259F6; Mon, 2 Nov 2015 22:05:43 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F424104C; Mon, 2 Nov 2015 22:05:42 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M5gDv076676; Mon, 2 Nov 2015 22:05:42 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M5g1Z076675; Mon, 2 Nov 2015 22:05:42 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022205.tA2M5g1Z076675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290289 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:05:43 -0000 Author: dteske Date: Mon Nov 2 22:05:41 2015 New Revision: 290289 URL: https://svnweb.freebsd.org/changeset/base/290289 Log: MFC r287691: Remove trailing newline at EOF Modified: stable/10/usr.sbin/bsdinstall/scripts/rootpass Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/rootpass ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/rootpass Mon Nov 2 22:05:04 2015 (r290288) +++ stable/10/usr.sbin/bsdinstall/scripts/rootpass Mon Nov 2 22:05:41 2015 (r290289) @@ -34,4 +34,3 @@ echo echo "Please select a password for the system management account (root):" chroot $BSDINSTALL_CHROOT passwd root 2>&1 - From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:06:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D6B8A25A4F; Mon, 2 Nov 2015 22:06:46 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C086A11EB; Mon, 2 Nov 2015 22:06:45 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M6ivt076766; Mon, 2 Nov 2015 22:06:44 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M6ivT076764; Mon, 2 Nov 2015 22:06:44 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022206.tA2M6ivT076764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290290 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:06:46 -0000 Author: dteske Date: Mon Nov 2 22:06:44 2015 New Revision: 290290 URL: https://svnweb.freebsd.org/changeset/base/290290 Log: MFC r287690: Produce meaningful exit code Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Mon Nov 2 22:05:41 2015 (r290289) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Mon Nov 2 22:06:44 2015 (r290290) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -80,16 +80,20 @@ echo $INTERFACE $IF_CONFIG | printf("ifconfig_%s=\"%s\inet %s netmask %s\"\n", $1, prefix, $2, $3); printf("defaultrouter=\"%s\"\n", $4); }' >> $BSDINSTALL_TMPETC/._rc.conf.net +retval=$? -if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then +if [ "$BSDINSTALL_CONFIGCURRENT" ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE` - if [ -n "${defaultrouter}" ]; then + if [ "$defaultrouter" ]; then route delete -inet default route add -inet default $defaultrouter + retval=$? fi fi +exit $retval + ################################################################################ # END ################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Mon Nov 2 22:05:41 2015 (r290289) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Mon Nov 2 22:06:44 2015 (r290290) @@ -2,7 +2,7 @@ #- # Copyright (c) 2011 Nathan Whitehorn # Copyright (c) 2011 The FreeBSD Foundation -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Portions of this software were developed by Bjoern Zeeb @@ -141,16 +141,20 @@ BEGIN { } printf("ifconfig_%s_ipv6=\"inet6 %s\"\n", iface, $1); }' >> $BSDINSTALL_TMPETC/._rc.conf.net +retval=$? -if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then +if [ "$BSDINSTALL_CONFIGCURRENT" ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6` - if [ -n "${ipv6_defaultrouter}" ]; then + if [ "$ipv6_defaultrouter" ]; then route delete -inet6 default route add -inet6 default ${ipv6_defaultrouter} + retval=$? fi fi +exit $retval + ################################################################################ # END ################################################################################ From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:07:26 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3E95A25A98; Mon, 2 Nov 2015 22:07:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F844133E; Mon, 2 Nov 2015 22:07:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M7PlW076847; Mon, 2 Nov 2015 22:07:25 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M7P8A076846; Mon, 2 Nov 2015 22:07:25 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022207.tA2M7P8A076846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290291 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:07:26 -0000 Author: dteske Date: Mon Nov 2 22:07:25 2015 New Revision: 290291 URL: https://svnweb.freebsd.org/changeset/base/290291 Log: MFC r287689: Explicitly exit with success Modified: stable/10/usr.sbin/bsdinstall/scripts/keymap Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/keymap ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/keymap Mon Nov 2 22:06:44 2015 (r290290) +++ stable/10/usr.sbin/bsdinstall/scripts/keymap Mon Nov 2 22:07:25 2015 (r290291) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -231,6 +231,7 @@ while :; do done f_quietly f_keymap_kbdcontrol "$keymap" +exit $SUCCESS ################################################################################ # END From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:08:12 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4DEDA25B19; Mon, 2 Nov 2015 22:08:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD47D1510; Mon, 2 Nov 2015 22:08:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M8BeA076928; Mon, 2 Nov 2015 22:08:11 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M8BcR076927; Mon, 2 Nov 2015 22:08:11 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022208.tA2M8BcR076927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290292 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:08:13 -0000 Author: dteske Date: Mon Nov 2 22:08:11 2015 New Revision: 290292 URL: https://svnweb.freebsd.org/changeset/base/290292 Log: MFC r287688: Explicitly exit with success Modified: stable/10/usr.sbin/bsdinstall/scripts/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/jail Mon Nov 2 22:07:25 2015 (r290291) +++ stable/10/usr.sbin/bsdinstall/scripts/jail Mon Nov 2 22:08:11 2015 (r290292) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -125,6 +125,7 @@ cp /etc/localtime $1/etc bsdinstall entropy f_dprintf "Installation Completed at %s" "$(date)" +exit $SUCCESS ################################################################################ # END From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:09:01 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20E28A25B6A; Mon, 2 Nov 2015 22:09:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C39C31786; Mon, 2 Nov 2015 22:09:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M8xsk077008; Mon, 2 Nov 2015 22:08:59 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M8xvx077005; Mon, 2 Nov 2015 22:08:59 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022208.tA2M8xvx077005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290293 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:09:01 -0000 Author: dteske Date: Mon Nov 2 22:08:59 2015 New Revision: 290293 URL: https://svnweb.freebsd.org/changeset/base/290293 Log: MFC r287687: Update copyrights Modified: stable/10/usr.sbin/bsdinstall/scripts/config stable/10/usr.sbin/bsdinstall/scripts/docsinstall stable/10/usr.sbin/bsdinstall/scripts/hostname Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/config Mon Nov 2 22:08:11 2015 (r290292) +++ stable/10/usr.sbin/bsdinstall/scripts/config Mon Nov 2 22:08:59 2015 (r290293) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Nov 2 22:08:11 2015 (r290292) +++ stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Nov 2 22:08:59 2015 (r290293) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Marc Fonvieille -# Copyright (c) 2013 Devin Teske +# Copyright (c) 2013-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: stable/10/usr.sbin/bsdinstall/scripts/hostname ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/hostname Mon Nov 2 22:08:11 2015 (r290292) +++ stable/10/usr.sbin/bsdinstall/scripts/hostname Mon Nov 2 22:08:59 2015 (r290293) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:09:44 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4580A25BA8; Mon, 2 Nov 2015 22:09:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAF6B1901; Mon, 2 Nov 2015 22:09:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2M9h3g077094; Mon, 2 Nov 2015 22:09:43 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2M9ho1077093; Mon, 2 Nov 2015 22:09:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022209.tA2M9ho1077093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290294 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:09:45 -0000 Author: dteske Date: Mon Nov 2 22:09:43 2015 New Revision: 290294 URL: https://svnweb.freebsd.org/changeset/base/290294 Log: MFC r287686: Produce meaningful exit code Modified: stable/10/usr.sbin/bsdinstall/scripts/hostname Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/hostname ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/hostname Mon Nov 2 22:08:59 2015 (r290293) +++ stable/10/usr.sbin/bsdinstall/scripts/hostname Mon Nov 2 22:09:43 2015 (r290294) @@ -44,6 +44,9 @@ if [ $? -eq $DIALOG_CANCEL ]; then exit exec 3>&- echo "hostname=\"$HOSTNAME\"" > $BSDINSTALL_TMPETC/rc.conf.hostname -if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then +retval=$? +if [ "$BSDINSTALL_CONFIGCURRENT" ]; then hostname -s "$HOSTNAME" + retval=$? fi +exit $retval From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:10:40 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9149CA25CAB; Mon, 2 Nov 2015 22:10:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D53C1A61; Mon, 2 Nov 2015 22:10:40 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MAdbT077195; Mon, 2 Nov 2015 22:10:39 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MAdQA077194; Mon, 2 Nov 2015 22:10:39 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022210.tA2MAdQA077194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290295 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:10:40 -0000 Author: dteske Date: Mon Nov 2 22:10:39 2015 New Revision: 290295 URL: https://svnweb.freebsd.org/changeset/base/290295 Log: MFC r287685: Remove use of return outside of function Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Nov 2 22:09:43 2015 (r290294) +++ stable/10/usr.sbin/bsdinstall/scripts/docsinstall Mon Nov 2 22:10:39 2015 (r290295) @@ -159,7 +159,7 @@ for lang in $selected; do docsets="$docsets $lang-freebsd-doc" done -ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return $FAILURE +ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets ################################################################################ # END From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:11:20 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2F0BA25D05; Mon, 2 Nov 2015 22:11:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1DA81C3A; Mon, 2 Nov 2015 22:11:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MBJrg079807; Mon, 2 Nov 2015 22:11:19 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MBJOG079806; Mon, 2 Nov 2015 22:11:19 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022211.tA2MBJOG079806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290296 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:11:21 -0000 Author: dteske Date: Mon Nov 2 22:11:19 2015 New Revision: 290296 URL: https://svnweb.freebsd.org/changeset/base/290296 Log: MFC r287683: Ignore error results from newaliases(1) Modified: stable/10/usr.sbin/bsdinstall/scripts/config Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/config Mon Nov 2 22:10:39 2015 (r290295) +++ stable/10/usr.sbin/bsdinstall/scripts/config Mon Nov 2 22:11:19 2015 (r290296) @@ -45,6 +45,8 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHR # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases > /dev/null 2>&1 +exit $SUCCESS + ################################################################################ # END ################################################################################ From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:12:52 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F3DA25D4F; Mon, 2 Nov 2015 22:12:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E13C1F0A; Mon, 2 Nov 2015 22:12:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MCpVN079917; Mon, 2 Nov 2015 22:12:51 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MCpFY079916; Mon, 2 Nov 2015 22:12:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022212.tA2MCpFY079916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290297 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:12:52 -0000 Author: dteske Date: Mon Nov 2 22:12:51 2015 New Revision: 290297 URL: https://svnweb.freebsd.org/changeset/base/290297 Log: MFC r287420: Remove non-functional examples. Modified: stable/10/usr.sbin/sysrc/sysrc.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc.8 ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc.8 Mon Nov 2 22:11:19 2015 (r290296) +++ stable/10/usr.sbin/sysrc/sysrc.8 Mon Nov 2 22:12:51 2015 (r290297) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 4, 2015 +.Dd September 2, 2015 .Dt SYSRC 8 .Os .Sh NAME @@ -396,27 +396,6 @@ usbd_flags-"default" .Nm cloned_interfaces+"alternate" .Dl returns "alternate" if $cloned_interfaces is set . -.Pp -.Nm -\&'#kern_securelevel' -.Dl returns length in characters of $kern_securelevel . -.Pp -.Nm -\&'hostname?' -.Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . -.Pp -.Nm -\&'hostname:?' -.Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . -.Sh LIMITATIONS -The -.Nm -utility presently does not support the -.Ql rc.conf.d -collection of system configuration files -.Pq which requires a service name to be known during execution . -.Pp -This will be corrected by a future enhancement. .Sh SEE ALSO .Xr jls 1 , .Xr rc.conf 5 , From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:22:49 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BBCCA25FAD; Mon, 2 Nov 2015 22:22:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289E217DF; Mon, 2 Nov 2015 22:22:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MMmOX082928; Mon, 2 Nov 2015 22:22:48 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MMmGW082927; Mon, 2 Nov 2015 22:22:48 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022222.tA2MMmGW082927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290299 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:22:49 -0000 Author: dteske Date: Mon Nov 2 22:22:48 2015 New Revision: 290299 URL: https://svnweb.freebsd.org/changeset/base/290299 Log: Snap to breuffer's r286660 (incorrectly merged) Modified: stable/10/usr.sbin/sysrc/sysrc.8 Modified: stable/10/usr.sbin/sysrc/sysrc.8 ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc.8 Mon Nov 2 22:21:02 2015 (r290298) +++ stable/10/usr.sbin/sysrc/sysrc.8 Mon Nov 2 22:22:48 2015 (r290299) @@ -223,7 +223,6 @@ For example, the above and below stateme .Dq gif0 starts with an alpha-numeric character .Pq the letter Li g : -.Pp .Bl -tag -width indent+ .It \ .Nm @@ -278,7 +277,6 @@ For example, the above and below stateme .Dq gif0 starts with an alpha-numeric character .Pq the letter Li g : -.Pp .Bl -tag -width indent+ .It \ .Nm From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:24:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E868EA24002; Mon, 2 Nov 2015 22:24:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 961C01979; Mon, 2 Nov 2015 22:24:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MOvWA083046; Mon, 2 Nov 2015 22:24:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MOvkQ083045; Mon, 2 Nov 2015 22:24:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022224.tA2MOvkQ083045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290300 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:24:59 -0000 Author: dteske Date: Mon Nov 2 22:24:57 2015 New Revision: 290300 URL: https://svnweb.freebsd.org/changeset/base/290300 Log: MFC r287421: Fix mandoc(1) "WARNING: end of line whitespace" Modified: stable/10/usr.sbin/sysrc/sysrc.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc.8 ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc.8 Mon Nov 2 22:22:48 2015 (r290299) +++ stable/10/usr.sbin/sysrc/sysrc.8 Mon Nov 2 22:24:57 2015 (r290300) @@ -199,8 +199,8 @@ syntax to add items to existing values, the first character of the value is taken as the delimiter separating items .Pq usually Qo \ Qc or Qo , Qc . For example, in the following statement: -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces+=" gif0" .El @@ -223,25 +223,25 @@ For example, the above and below stateme .Dq gif0 starts with an alpha-numeric character .Pq the letter Li g : -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces+=gif0 .El .Pp Take the following sequence for example: -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces= # start with NULL -.It \ +.It .Nm cloned_interfaces+=gif0 .Dl # NULL -> `gif0' Pq NB: no preceding delimiter -.It \ +.It .Nm cloned_interfaces+=gif0 # no change -.It \ +.It .Nm cloned_interfaces+="tun0 gif0" .Dl # `gif0' -> `gif0 tun0' Pq NB: no duplication @@ -277,21 +277,21 @@ For example, the above and below stateme .Dq gif0 starts with an alpha-numeric character .Pq the letter Li g : -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm cloned_interfaces-=gif0 .El .Pp Take the following sequence for example: -.Bl -tag -width indent+ -.It \ +.Bl -item -offset indent +.It .Nm foo="bar baz" # start -.It \ +.It .Nm foo-=bar # `bar baz' -> `baz' -.It \ +.It .Nm foo-=baz # `baz' -> NULL .El From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:30:56 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 925D6A24290; Mon, 2 Nov 2015 22:30:56 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CF401D65; Mon, 2 Nov 2015 22:30:56 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MUtop083360; Mon, 2 Nov 2015 22:30:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MUtdx083359; Mon, 2 Nov 2015 22:30:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022230.tA2MUtdx083359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290301 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:30:56 -0000 Author: dteske Date: Mon Nov 2 22:30:55 2015 New Revision: 290301 URL: https://svnweb.freebsd.org/changeset/base/290301 Log: MFC r287378: Remove `SYSRC_' prefix from $SYSRC_VERBOSE (prefix unnecessary since this is a non-inheritable attribute; was previously). Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:24:57 2015 (r290300) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:30:55 2015 (r290301) @@ -57,7 +57,7 @@ SHOW_EQUALS= SHOW_FILE= SHOW_NAME=1 SHOW_VALUE=1 -SYSRC_VERBOSE= +VERBOSE= ############################################################ FUNCTIONS @@ -240,11 +240,11 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag JAIL="$OPTARG";; n) SHOW_NAME=;; N) SHOW_VALUE=;; - q) QUIET=1 SYSRC_VERBOSE=;; + q) QUIET=1 VERBOSE=;; R) [ "$OPTARG" ] || die \ "%s: Missing or null argument to \`-R' flag" "$pgm" ROOTDIR="$OPTARG";; - v) SYSRC_VERBOSE=1 QUIET=;; + v) VERBOSE=1 QUIET=;; x) DELETE=${DELETE:-1};; X) DELETE=2;; \?) usage;; @@ -300,7 +300,7 @@ fi SEP=': ' [ "$SHOW_FILE" ] && SHOW_EQUALS= [ "$SHOW_NAME" ] || SHOW_EQUALS= -[ "$SYSRC_VERBOSE" = "0" ] && SYSRC_VERBOSE= +[ "$VERBOSE" = "0" ] && VERBOSE= if [ ! "$SHOW_VALUE" ]; then SHOW_NAME=1 SHOW_EQUALS= @@ -315,7 +315,7 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then # Reconstruct the arguments that we want to carry-over # args=" - ${SYSRC_VERBOSE:+-v} + ${VERBOSE:+-v} ${QUIET:+-q} $( [ "$DELETE" = "1" ] && echo \ -x ) $( [ "$DELETE" = "2" ] && echo \ -X ) @@ -431,7 +431,7 @@ if [ "$SHOW_ALL" ]; then IFS="$IFS|" EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP" EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME" - EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|SYSRC_VERBOSE|RC_CONFS" + EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS" EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY" EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk" @@ -499,7 +499,7 @@ if [ "$SHOW_ALL" ]; then continue fi - [ "$SYSRC_VERBOSE" ] && \ + [ "$VERBOSE" ] && \ echo -n "$( f_sysrc_find "$NAME" ): " # @@ -546,7 +546,7 @@ while [ $# -gt 0 ]; do # # If verbose, prefix line with where the directive lives - if [ "$SYSRC_VERBOSE" -a ! "$CHECK_ONLY" ]; then + if [ "$VERBOSE" -a ! "$CHECK_ONLY" ]; then file=$( f_sysrc_find "$NAME" ) [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) @@ -573,7 +573,7 @@ while [ $# -gt 0 ]; do if [ "$CHECK_ONLY" ]; then if ! IGNORED=$( f_sysrc_get "$NAME?" ); then status=$FAILURE - [ "$SYSRC_VERBOSE" ] && + [ "$VERBOSE" ] && echo "$NAME: not currently set" shift 1 continue @@ -581,12 +581,12 @@ while [ $# -gt 0 ]; do value=$( f_sysrc_get "$NAME" ) if [ "$value" != "${1#*=}" ]; then status=$FAILURE - if [ "$SYSRC_VERBOSE" ]; then + if [ "$VERBOSE" ]; then echo -n "$( f_sysrc_find "$NAME" ): " echo -n "$NAME: would change from " echo "\`$value' to \`${1#*=}'" fi - elif [ "$SYSRC_VERBOSE" ]; then + elif [ "$VERBOSE" ]; then echo -n "$( f_sysrc_find "$NAME" ): " echo "$NAME: already set to \`$value'" fi @@ -715,7 +715,7 @@ while [ $# -gt 0 ]; do continue fi - if [ "$SYSRC_VERBOSE" ]; then + if [ "$VERBOSE" ]; then if [ "$SHOW_EQUALS" ]; then echo -n ": $( f_sysrc_find "$NAME" ); " else From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:31:33 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0B7DA242DF; Mon, 2 Nov 2015 22:31:33 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 776EB1FB8; Mon, 2 Nov 2015 22:31:33 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MVWm0085356; Mon, 2 Nov 2015 22:31:32 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MVW97085355; Mon, 2 Nov 2015 22:31:32 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022231.tA2MVW97085355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290302 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:31:33 -0000 Author: dteske Date: Mon Nov 2 22:31:32 2015 New Revision: 290302 URL: https://svnweb.freebsd.org/changeset/base/290302 Log: MFC r287379: Style consistency: add single space before each `;;' case entry Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:30:55 2015 (r290301) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:31:32 2015 (r290302) @@ -225,29 +225,29 @@ jail_depend() # while getopts aAcdDef:Fhij:nNqR:vxX flag; do case "$flag" in - a) SHOW_ALL=${SHOW_ALL:-1};; - A) SHOW_ALL=2;; - c) CHECK_ONLY=1;; - d) DESCRIBE=1;; - D) RC_CONFS=;; - e) SHOW_EQUALS=1;; - f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG";; - F) SHOW_FILE=1;; - h) usage;; - i) IGNORE_UNKNOWNS=1;; + a) SHOW_ALL=${SHOW_ALL:-1} ;; + A) SHOW_ALL=2 ;; + c) CHECK_ONLY=1 ;; + d) DESCRIBE=1 ;; + D) RC_CONFS= ;; + e) SHOW_EQUALS=1 ;; + f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;; + F) SHOW_FILE=1 ;; + h) usage ;; + i) IGNORE_UNKNOWNS=1 ;; j) [ "$OPTARG" ] || die \ "%s: Missing or null argument to \`-j' flag" "$pgm" - JAIL="$OPTARG";; - n) SHOW_NAME=;; - N) SHOW_VALUE=;; - q) QUIET=1 VERBOSE=;; + JAIL="$OPTARG" ;; + n) SHOW_NAME= ;; + N) SHOW_VALUE= ;; + q) QUIET=1 VERBOSE= ;; R) [ "$OPTARG" ] || die \ "%s: Missing or null argument to \`-R' flag" "$pgm" - ROOTDIR="$OPTARG";; - v) VERBOSE=1 QUIET=;; - x) DELETE=${DELETE:-1};; - X) DELETE=2;; - \?) usage;; + ROOTDIR="$OPTARG" ;; + v) VERBOSE=1 QUIET= ;; + x) DELETE=${DELETE:-1} ;; + X) DELETE=2 ;; + \?) usage ;; esac done shift $(( $OPTIND - 1 )) From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:32:14 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDA47A24327; Mon, 2 Nov 2015 22:32:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A5AC11A8; Mon, 2 Nov 2015 22:32:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MWDqF085923; Mon, 2 Nov 2015 22:32:13 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MWDZB085922; Mon, 2 Nov 2015 22:32:13 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022232.tA2MWDZB085922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290303 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:32:14 -0000 Author: dteske Date: Mon Nov 2 22:32:13 2015 New Revision: 290303 URL: https://svnweb.freebsd.org/changeset/base/290303 Log: MFC r287380: Style: comments Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:31:32 2015 (r290302) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:32:13 2015 (r290303) @@ -200,7 +200,7 @@ jail_depend() # # Perform sanity checks # -[ $# -gt 0 ] || usage +[ $# -gt 0 ] || usage # NOTREACHED # # Check for `--help' and `--version' command-line option @@ -233,7 +233,7 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag e) SHOW_EQUALS=1 ;; f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;; F) SHOW_FILE=1 ;; - h) usage ;; + h) usage ;; # NOTREACHED i) IGNORE_UNKNOWNS=1 ;; j) [ "$OPTARG" ] || die \ "%s: Missing or null argument to \`-j' flag" "$pgm" @@ -247,7 +247,7 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag v) VERBOSE=1 QUIET= ;; x) DELETE=${DELETE:-1} ;; X) DELETE=2 ;; - \?) usage ;; + \?) usage ;; # NOTREACHED esac done shift $(( $OPTIND - 1 )) @@ -255,7 +255,7 @@ shift $(( $OPTIND - 1 )) # # [More] Sanity checks (e.g., "sysrc --") # -[ $# -eq 0 -a ! "$SHOW_ALL" ] && usage +[ $# -eq 0 -a ! "$SHOW_ALL" ] && usage # NOTREACHED # # Taint-check all rc.conf(5) files From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:33:01 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14513A2439F; Mon, 2 Nov 2015 22:33:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9C611357; Mon, 2 Nov 2015 22:33:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MWxef086000; Mon, 2 Nov 2015 22:32:59 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MWxSV085999; Mon, 2 Nov 2015 22:32:59 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022232.tA2MWxSV085999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290304 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:33:01 -0000 Author: dteske Date: Mon Nov 2 22:32:59 2015 New Revision: 290304 URL: https://svnweb.freebsd.org/changeset/base/290304 Log: MFC r287381: Properly escape arguments when moving into jail or chroot Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:32:13 2015 (r290303) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:32:59 2015 (r290304) @@ -195,6 +195,24 @@ jail_depend() cat $BSDCFG_SHARE/sysrc.subr } +escape() +{ + local __start="$1" __var_to_set="$2" __string= + while [ "$__start" ]; do + case "$__start" in *\'*) + __string="$__string${__start%%\'*}'\\''" + __start="${__start#*\'}" continue + esac + break + done + __string="$__string$__start" + if [ "$__var_to_set" ]; then + setvar "$__var_to_set" "$__string" + else + echo "$__string" + fi +} + ############################################################ MAIN SOURCE # @@ -330,9 +348,12 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then $( [ "$SHOW_FILE" ] && echo \ -F ) " if [ "${RC_CONFS+set}" ]; then - args="$args -f '$RC_CONFS'" + escape "$RC_CONFS" _RC_CONFS + args="$args -f '$_RC_CONFS'" + unset _RC_CONFS fi for arg in "$@"; do + escape "$arg" arg args="$args '$arg'" done From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:33:36 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B2EDA24412; Mon, 2 Nov 2015 22:33:36 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC59C1516; Mon, 2 Nov 2015 22:33:35 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MXZfb086091; Mon, 2 Nov 2015 22:33:35 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MXZYT086090; Mon, 2 Nov 2015 22:33:35 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022233.tA2MXZYT086090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290305 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:33:36 -0000 Author: dteske Date: Mon Nov 2 22:33:34 2015 New Revision: 290305 URL: https://svnweb.freebsd.org/changeset/base/290305 Log: MFC r287382: Comment Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:32:59 2015 (r290304) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:33:34 2015 (r290305) @@ -663,7 +663,7 @@ while [ $# -gt 0 ]; do unset remove delim oldIFS b add r [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" ) ;; - *) + *) # ASSIGN if [ "$SHOW_FILE" ]; then before=$( f_sysrc_find "$NAME" ) else From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:35:49 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAA2CA244DA; Mon, 2 Nov 2015 22:35:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A665F1820; Mon, 2 Nov 2015 22:35:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MZmV5086228; Mon, 2 Nov 2015 22:35:48 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MZm0g086227; Mon, 2 Nov 2015 22:35:48 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022235.tA2MZm0g086227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290306 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:35:50 -0000 Author: dteske Date: Mon Nov 2 22:35:48 2015 New Revision: 290306 URL: https://svnweb.freebsd.org/changeset/base/290306 Log: MFC r287383: Comment for escape() function. Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:33:34 2015 (r290305) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:35:48 2015 (r290306) @@ -195,6 +195,14 @@ jail_depend() cat $BSDCFG_SHARE/sysrc.subr } +# escape $string [$var_to_set] +# +# Escape $string contents so that the contents can be properly encapsulated in +# single-quotes (making for safe evaluation). +# +# NB: See `bsdconfig includes -dF escape' for relevant information/discussion. +# NB: Abridged version of `f_shell_escape()' from bsdconfig(8) `strings.subr'. +# escape() { local __start="$1" __var_to_set="$2" __string= From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:37:58 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 477B3A24551; Mon, 2 Nov 2015 22:37:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F864199B; Mon, 2 Nov 2015 22:37:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2Mbv2H086351; Mon, 2 Nov 2015 22:37:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MbvvT086350; Mon, 2 Nov 2015 22:37:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022237.tA2MbvvT086350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290307 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:37:58 -0000 Author: dteske Date: Mon Nov 2 22:37:56 2015 New Revision: 290307 URL: https://svnweb.freebsd.org/changeset/base/290307 Log: MFC r287384: Style: Remove whitespace around brackets from function syntax options Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:35:48 2015 (r290306) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:37:56 2015 (r290307) @@ -61,7 +61,7 @@ VERBOSE= ############################################################ FUNCTIONS -# die [ $fmt [ $opts ... ]] +# die [$fmt [$opts ...]] # # Optionally print a message to stderr before exiting with failure status. # From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:42:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FDB9A246FC; Mon, 2 Nov 2015 22:42:09 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE5A41CE0; Mon, 2 Nov 2015 22:42:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2Mg7hS087147; Mon, 2 Nov 2015 22:42:07 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2Mg7R4087146; Mon, 2 Nov 2015 22:42:07 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022242.tA2Mg7R4087146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290308 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:42:09 -0000 Author: dteske Date: Mon Nov 2 22:42:07 2015 New Revision: 290308 URL: https://svnweb.freebsd.org/changeset/base/290308 Log: MFC r287385: Bump version for prior fix (SVN r287381) Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:37:56 2015 (r290307) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:42:07 2015 (r290308) @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="6.3 Mar-4,2015" +SYSRC_VERSION="6.4 Sep-1,2015" # # Options From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:54:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED1DDA249C8; Mon, 2 Nov 2015 22:54:46 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B03F7136E; Mon, 2 Nov 2015 22:54:46 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2Msjer092104; Mon, 2 Nov 2015 22:54:45 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MsjrM092103; Mon, 2 Nov 2015 22:54:45 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022254.tA2MsjrM092103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290310 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:54:47 -0000 Author: dteske Date: Mon Nov 2 22:54:45 2015 New Revision: 290310 URL: https://svnweb.freebsd.org/changeset/base/290310 Log: MFC r287389: Simplify long-option processing Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:49:39 2015 (r290309) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:54:45 2015 (r290310) @@ -231,20 +231,16 @@ escape() # # Check for `--help' and `--version' command-line option # -( # Operate in sub-shell to protect $@ in parent - while [ $# -gt 0 ]; do - case "$1" in - --help) help ;; - --version) # see GLOBALS - echo "$SYSRC_VERSION" - exit 1 ;; - -[fRj]) # These flags take an argument - shift 1 ;; - esac - shift 1 - done - exit 0 -) || die +for arg in "$@"; do + case "$arg" in + --) break ;; + --help) help ;; # NOTREACHED + --version) # see GLOBALS + echo "$SYSRC_VERSION" + exit $FAILURE ;; + esac +done +unset arg # # Process command-line flags From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:55:26 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC713A24A1C; Mon, 2 Nov 2015 22:55:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1F221533; Mon, 2 Nov 2015 22:55:26 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MtP9c092207; Mon, 2 Nov 2015 22:55:25 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MtP8c092206; Mon, 2 Nov 2015 22:55:25 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022255.tA2MtP8c092206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290311 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:55:27 -0000 Author: dteske Date: Mon Nov 2 22:55:25 2015 New Revision: 290311 URL: https://svnweb.freebsd.org/changeset/base/290311 Log: MFC r287390: Bump version for altered long-opts processing Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:54:45 2015 (r290310) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:55:25 2015 (r290311) @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="6.4 Sep-1,2015" +SYSRC_VERSION="6.5 Sep-1,2015" # # Options From owner-svn-src-stable-10@freebsd.org Mon Nov 2 22:56:12 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1235FA24A79; Mon, 2 Nov 2015 22:56:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C154317A5; Mon, 2 Nov 2015 22:56:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA2MuAOc092289; Mon, 2 Nov 2015 22:56:10 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA2MuA8r092288; Mon, 2 Nov 2015 22:56:10 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201511022256.tA2MuA8r092288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 2 Nov 2015 22:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290312 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 22:56:12 -0000 Author: dteske Date: Mon Nov 2 22:56:10 2015 New Revision: 290312 URL: https://svnweb.freebsd.org/changeset/base/290312 Log: MFC r287413: Minor code cleanups (no functional changes). Modified: stable/10/usr.sbin/sysrc/sysrc Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:55:25 2015 (r290311) +++ stable/10/usr.sbin/sysrc/sysrc Mon Nov 2 22:56:10 2015 (r290312) @@ -257,14 +257,14 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag F) SHOW_FILE=1 ;; h) usage ;; # NOTREACHED i) IGNORE_UNKNOWNS=1 ;; - j) [ "$OPTARG" ] || die \ - "%s: Missing or null argument to \`-j' flag" "$pgm" + j) [ "$OPTARG" ] || + die "%s: Missing or null argument to \`-j' flag" "$pgm" JAIL="$OPTARG" ;; n) SHOW_NAME= ;; N) SHOW_VALUE= ;; q) QUIET=1 VERBOSE= ;; - R) [ "$OPTARG" ] || die \ - "%s: Missing or null argument to \`-R' flag" "$pgm" + R) [ "$OPTARG" ] || + die "%s: Missing or null argument to \`-R' flag" "$pgm" ROOTDIR="$OPTARG" ;; v) VERBOSE=1 QUIET= ;; x) DELETE=${DELETE:-1} ;; @@ -384,13 +384,12 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then # jls(1) or jexec(8) utilities are missing. # if f_have jexec && f_have jls; then - jid="`jls jid path | \ - ( + jid=$( jls jid path | while read JID JROOT; do [ "$JROOT" = "$ROOTDIR" ] || continue echo $JID done - )`" + ) # # If multiple running jails match the specified root @@ -472,8 +471,8 @@ if [ "$SHOW_ALL" ]; then # If passed `-a' (rather than `-A'), re-purge the # environment, removing the rc.conf(5) defaults. # - [ "$SHOW_ALL" = "1" ] \ - && f_clean_env --except rc_conf_files $EXCEPT + [ "$SHOW_ALL" = "1" ] && + f_clean_env --except rc_conf_files $EXCEPT # # If `-f file' was passed, set $rc_conf_files to an @@ -491,8 +490,7 @@ if [ "$SHOW_ALL" ]; then # [ "$SHOW_ALL" = "1" -a \ "$( f_sysrc_find rc_conf_files )" = "$RC_DEFAULTS" \ - ] \ - && unset rc_conf_files + ] && unset rc_conf_files fi for NAME in $( set | @@ -524,7 +522,7 @@ if [ "$SHOW_ALL" ]; then continue fi - [ "$VERBOSE" ] && \ + [ "$VERBOSE" ] && echo -n "$( f_sysrc_find "$NAME" ): " # @@ -560,7 +558,7 @@ while [ $# -gt 0 ]; do *) mode=ASSIGN esac - [ "$DESCRIBE" ] && \ + [ "$DESCRIBE" ] && echo "$NAME: $( f_sysrc_desc "$NAME" )" case "$1" in @@ -573,7 +571,7 @@ while [ $# -gt 0 ]; do # If verbose, prefix line with where the directive lives if [ "$VERBOSE" -a ! "$CHECK_ONLY" ]; then file=$( f_sysrc_find "$NAME" ) - [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ + [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) if [ "$SHOW_EQUALS" ]; then echo -n ": $file; " From owner-svn-src-stable-10@freebsd.org Tue Nov 3 08:28:48 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E60B2A257AD; Tue, 3 Nov 2015 08:28:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC9A615E8; Tue, 3 Nov 2015 08:28:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA38SlHp057841; Tue, 3 Nov 2015 08:28:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA38Sl5s057840; Tue, 3 Nov 2015 08:28:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511030828.tA38Sl5s057840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Nov 2015 08:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290323 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 08:28:49 -0000 Author: kib Date: Tue Nov 3 08:28:47 2015 New Revision: 290323 URL: https://svnweb.freebsd.org/changeset/base/290323 Log: MFC r289658: No need to dereference struct proc to pids when comparing processes for equality. Modified: stable/10/sys/kern/sys_process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Tue Nov 3 05:25:06 2015 (r290322) +++ stable/10/sys/kern/sys_process.c Tue Nov 3 08:28:47 2015 (r290323) @@ -748,7 +748,7 @@ kern_ptrace(struct thread *td, int req, case PT_ATTACH: /* Self */ - if (p->p_pid == td->td_proc->p_pid) { + if (p == td->td_proc) { error = EINVAL; goto fail; } From owner-svn-src-stable-10@freebsd.org Tue Nov 3 08:31:02 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82005A25882; Tue, 3 Nov 2015 08:31:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47D6E1A1B; Tue, 3 Nov 2015 08:31:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA38V1sM058581; Tue, 3 Nov 2015 08:31:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA38V1qm058580; Tue, 3 Nov 2015 08:31:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511030831.tA38V1qm058580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Nov 2015 08:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290324 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 08:31:02 -0000 Author: kib Date: Tue Nov 3 08:31:01 2015 New Revision: 290324 URL: https://svnweb.freebsd.org/changeset/base/290324 Log: MFC r289660,r289664: Do not allow to execute ptrace(PT_TRACE_ME) when the process is already traced or when there is no parent which can trace the process. Modified: stable/10/sys/kern/sys_process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Tue Nov 3 08:28:47 2015 (r290323) +++ stable/10/sys/kern/sys_process.c Tue Nov 3 08:31:01 2015 (r290324) @@ -442,7 +442,7 @@ ptrace_vm_entry(struct thread *td, struc } #ifdef COMPAT_FREEBSD32 -static int +static int ptrace_vm_entry32(struct thread *td, struct proc *p, struct ptrace_vm_entry32 *pve32) { @@ -743,7 +743,18 @@ kern_ptrace(struct thread *td, int req, */ switch (req) { case PT_TRACE_ME: - /* Always legal. */ + /* + * Always legal, when there is a parent process which + * could trace us. Otherwise, reject. + */ + if ((p->p_flag & P_TRACED) != 0) { + error = EBUSY; + goto fail; + } + if (p->p_pptr == initproc) { + error = EPERM; + goto fail; + } break; case PT_ATTACH: From owner-svn-src-stable-10@freebsd.org Tue Nov 3 08:33:26 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25603A259C6; Tue, 3 Nov 2015 08:33:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF37E1D35; Tue, 3 Nov 2015 08:33:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA38XOWH060641; Tue, 3 Nov 2015 08:33:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA38XOjI060640; Tue, 3 Nov 2015 08:33:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511030833.tA38XOjI060640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Nov 2015 08:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290325 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 08:33:26 -0000 Author: kib Date: Tue Nov 3 08:33:24 2015 New Revision: 290325 URL: https://svnweb.freebsd.org/changeset/base/290325 Log: MFC r289661: Mark struct thread zone as type-stable, to prevent dereference of the freed memory in the locks spin loops. Modified: stable/10/sys/kern/kern_thread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Tue Nov 3 08:31:01 2015 (r290324) +++ stable/10/sys/kern/kern_thread.c Tue Nov 3 08:33:24 2015 (r290325) @@ -280,7 +280,7 @@ threadinit(void) thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), thread_ctor, thread_dtor, thread_init, thread_fini, - 16 - 1, 0); + 16 - 1, UMA_ZONE_NOFREE); tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash); rw_init(&tidhash_lock, "tidhash"); } From owner-svn-src-stable-10@freebsd.org Tue Nov 3 10:24:56 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E836EA23B06; Tue, 3 Nov 2015 10:24:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB23F1607; Tue, 3 Nov 2015 10:24:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA3AOsgo092180; Tue, 3 Nov 2015 10:24:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA3AOsK8092178; Tue, 3 Nov 2015 10:24:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511031024.tA3AOsK8092178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Nov 2015 10:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290331 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 10:24:56 -0000 Author: hselasky Date: Tue Nov 3 10:24:54 2015 New Revision: 290331 URL: https://svnweb.freebsd.org/changeset/base/290331 Log: MFC r285914, r289029 and r289560: - Move the remainder of host controller capability registers reading from xhci_start_controller() to xhci_init(). These values don't change at run- time so there's no point of acquiring them on every USB_HW_POWER_RESUME instead of only once during initialization. In r276717, reading the first couple of registers in question already had been moved as a prerequisite for the changes in that revision. - Identify ASMedia ASM1042A controllers. - Use NULL instead of 0 for pointers. - Add quirks for USB 3.0 PCI devices. PR: 203650 Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Tue Nov 3 10:21:53 2015 (r290330) +++ stable/10/sys/dev/usb/controller/xhci.c Tue Nov 3 10:24:54 2015 (r290331) @@ -380,54 +380,12 @@ xhci_start_controller(struct xhci_softc return (USB_ERR_IOERROR); } - if (!(XREAD4(sc, oper, XHCI_PAGESIZE) & XHCI_PAGESIZE_4K)) { - device_printf(sc->sc_bus.parent, "Controller does " - "not support 4K page size.\n"); - return (USB_ERR_IOERROR); - } - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS1); - - i = XHCI_HCS1_N_PORTS(temp); - - if (i == 0) { - device_printf(sc->sc_bus.parent, "Invalid number " - "of ports: %u\n", i); - return (USB_ERR_IOERROR); - } - - sc->sc_noport = i; - sc->sc_noslot = XHCI_HCS1_DEVSLOT_MAX(temp); - - if (sc->sc_noslot > XHCI_MAX_DEVICES) - sc->sc_noslot = XHCI_MAX_DEVICES; - /* set up number of device slots */ - DPRINTF("CONFIG=0x%08x -> 0x%08x\n", XREAD4(sc, oper, XHCI_CONFIG), sc->sc_noslot); XWRITE4(sc, oper, XHCI_CONFIG, sc->sc_noslot); - DPRINTF("Max slots: %u\n", sc->sc_noslot); - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS2); - - sc->sc_noscratch = XHCI_HCS2_SPB_MAX(temp); - - if (sc->sc_noscratch > XHCI_MAX_SCRATCHPADS) { - device_printf(sc->sc_bus.parent, "XHCI request " - "too many scratchpads\n"); - return (USB_ERR_NOMEM); - } - - DPRINTF("Max scratch: %u\n", sc->sc_noscratch); - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS3); - - sc->sc_exit_lat_max = XHCI_HCS3_U1_DEL(temp) + - XHCI_HCS3_U2_DEL(temp) + 250 /* us */; - temp = XREAD4(sc, oper, XHCI_USBSTS); /* clear interrupts */ @@ -459,29 +417,13 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, oper, XHCI_DCBAAP_LO, (uint32_t)addr); XWRITE4(sc, oper, XHCI_DCBAAP_HI, (uint32_t)(addr >> 32)); - /* Setup event table size */ - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS2); - - DPRINTF("HCS2=0x%08x\n", temp); - - temp = XHCI_HCS2_ERST_MAX(temp); - temp = 1U << temp; - if (temp > XHCI_MAX_RSEG) - temp = XHCI_MAX_RSEG; - - sc->sc_erst_max = temp; - + /* set up event table size */ DPRINTF("ERSTSZ=0x%08x -> 0x%08x\n", - XREAD4(sc, runt, XHCI_ERSTSZ(0)), temp); + XREAD4(sc, runt, XHCI_ERSTSZ(0)), sc->sc_erst_max); - XWRITE4(sc, runt, XHCI_ERSTSZ(0), XHCI_ERSTS_SET(temp)); + XWRITE4(sc, runt, XHCI_ERSTSZ(0), XHCI_ERSTS_SET(sc->sc_erst_max)); - /* Check if we should use the default IMOD value */ - if (sc->sc_imod_default == 0) - sc->sc_imod_default = XHCI_IMOD_DEFAULT; - - /* Setup interrupt rate */ + /* set up interrupt rate */ XWRITE4(sc, runt, XHCI_IMOD(0), sc->sc_imod_default); usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); @@ -508,8 +450,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERSTBA_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERSTBA_HI(0), (uint32_t)(addr >> 32)); - /* Setup interrupter registers */ - + /* set up interrupter registers */ temp = XREAD4(sc, runt, XHCI_IMAN(0)); temp |= XHCI_IMAN_INTR_ENA; XWRITE4(sc, runt, XHCI_IMAN(0), temp); @@ -620,6 +561,12 @@ xhci_init(struct xhci_softc *sc, device_ DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); + if (!(XREAD4(sc, oper, XHCI_PAGESIZE) & XHCI_PAGESIZE_4K)) { + device_printf(sc->sc_bus.parent, "Controller does " + "not support 4K page size.\n"); + return (ENXIO); + } + temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); DPRINTF("HCS0 = 0x%08x\n", temp); @@ -638,6 +585,55 @@ xhci_init(struct xhci_softc *sc, device_ device_printf(self, "%d bytes context size, %d-bit DMA\n", sc->sc_ctx_is_64_byte ? 64 : 32, (int)sc->sc_bus.dma_bits); + temp = XREAD4(sc, capa, XHCI_HCSPARAMS1); + + /* get number of device slots */ + sc->sc_noport = XHCI_HCS1_N_PORTS(temp); + + if (sc->sc_noport == 0) { + device_printf(sc->sc_bus.parent, "Invalid number " + "of ports: %u\n", sc->sc_noport); + return (ENXIO); + } + + sc->sc_noport = sc->sc_noport; + sc->sc_noslot = XHCI_HCS1_DEVSLOT_MAX(temp); + + DPRINTF("Max slots: %u\n", sc->sc_noslot); + + if (sc->sc_noslot > XHCI_MAX_DEVICES) + sc->sc_noslot = XHCI_MAX_DEVICES; + + temp = XREAD4(sc, capa, XHCI_HCSPARAMS2); + + DPRINTF("HCS2=0x%08x\n", temp); + + /* get number of scratchpads */ + sc->sc_noscratch = XHCI_HCS2_SPB_MAX(temp); + + if (sc->sc_noscratch > XHCI_MAX_SCRATCHPADS) { + device_printf(sc->sc_bus.parent, "XHCI request " + "too many scratchpads\n"); + return (ENOMEM); + } + + DPRINTF("Max scratch: %u\n", sc->sc_noscratch); + + /* get event table size */ + sc->sc_erst_max = 1U << XHCI_HCS2_ERST_MAX(temp); + if (sc->sc_erst_max > XHCI_MAX_RSEG) + sc->sc_erst_max = XHCI_MAX_RSEG; + + temp = XREAD4(sc, capa, XHCI_HCSPARAMS3); + + /* get maximum exit latency */ + sc->sc_exit_lat_max = XHCI_HCS3_U1_DEL(temp) + + XHCI_HCS3_U2_DEL(temp) + 250 /* us */; + + /* Check if we should use the default IMOD value. */ + if (sc->sc_imod_default == 0) + sc->sc_imod_default = XHCI_IMOD_DEFAULT; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &xhci_iterate_hw_softc)) { Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Tue Nov 3 10:21:53 2015 (r290330) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Tue Nov 3 10:24:54 2015 (r290331) @@ -86,10 +86,9 @@ static driver_t xhci_driver = { static devclass_t xhci_devclass; -DRIVER_MODULE(xhci, pci, xhci_driver, xhci_devclass, 0, 0); +DRIVER_MODULE(xhci, pci, xhci_driver, xhci_devclass, NULL, NULL); MODULE_DEPEND(xhci, usb, 1, 1, 1); - static const char * xhci_pci_match(device_t self) { @@ -104,6 +103,8 @@ xhci_pci_match(device_t self) case 0x10421b21: return ("ASMedia ASM1042 USB 3.0 controller"); + case 0x11421b21: + return ("ASMedia ASM1042A USB 3.0 controller"); case 0x0f358086: return ("Intel BayTrail USB 3.0 controller"); @@ -114,6 +115,8 @@ xhci_pci_match(device_t self) return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); + case 0x9cb18086: + return ("Broadwell Integrated PCH-LP chipset USB 3.0 controller"); case 0xa01b177d: return ("Cavium ThunderX USB 3.0 controller"); @@ -200,17 +203,31 @@ xhci_pci_attach(device_t self) sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); - /* check for USB 3.0 controllers which don't support 64-bit DMA */ switch (pci_get_devid(self)) { case 0x01941033: /* NEC uPD720200 USB 3.0 controller */ + case 0x00141912: /* NEC uPD720201 USB 3.0 controller */ + /* Don't use 64-bit DMA on these controllers. */ usedma32 = 1; break; case 0x10001b73: /* FL1000G */ /* Fresco Logic host doesn't support MSI. */ usemsi = 0; break; + case 0x0f358086: /* BayTrail */ + case 0x9c318086: /* Panther Point */ + case 0x1e318086: /* Panther Point */ + case 0x8c318086: /* Lynx Point */ + case 0x8cb18086: /* Wildcat Point */ + case 0x9cb18086: /* Broadwell Mobile Integrated */ + /* + * On Intel chipsets, reroute ports from EHCI to XHCI + * controller and use a different IMOD value. + */ + sc->sc_port_route = &xhci_pci_port_route; + sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; + break; } - + if (xhci_init(sc, self, usedma32)) { device_printf(self, "Could not initialize softc\n"); bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, @@ -269,20 +286,6 @@ xhci_pci_attach(device_t self) goto error; } - /* On Intel chipsets reroute ports from EHCI to XHCI controller. */ - switch (pci_get_devid(self)) { - case 0x0f358086: /* BayTrail */ - case 0x9c318086: /* Panther Point */ - case 0x1e318086: /* Panther Point */ - case 0x8c318086: /* Lynx Point */ - case 0x8cb18086: /* Wildcat Point */ - sc->sc_port_route = &xhci_pci_port_route; - sc->sc_imod_default = XHCI_IMOD_DEFAULT_LP; - break; - default: - break; - } - xhci_pci_take_controller(self); err = xhci_halt_controller(sc); From owner-svn-src-stable-10@freebsd.org Wed Nov 4 00:21:04 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AEFBA26830; Wed, 4 Nov 2015 00:21:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F26741282; Wed, 4 Nov 2015 00:21:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA40L2mP033710; Wed, 4 Nov 2015 00:21:02 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA40L2Y5033707; Wed, 4 Nov 2015 00:21:02 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201511040021.tA40L2Y5033707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 4 Nov 2015 00:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290347 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 00:21:04 -0000 Author: hrs Date: Wed Nov 4 00:21:02 2015 New Revision: 290347 URL: https://svnweb.freebsd.org/changeset/base/290347 Log: MFC r288575: Add IFCAP_LINKSTATE support. Modified: stable/10/sys/net/if_gif.c stable/10/sys/net/if_gre.c stable/10/sys/net/if_me.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gif.c ============================================================================== --- stable/10/sys/net/if_gif.c Tue Nov 3 22:24:02 2015 (r290346) +++ stable/10/sys/net/if_gif.c Wed Nov 4 00:21:02 2015 (r290347) @@ -196,6 +196,8 @@ gif_clone_create(struct if_clone *ifc, i GIF2IFP(sc)->if_transmit = gif_transmit; GIF2IFP(sc)->if_qflush = gif_qflush; GIF2IFP(sc)->if_output = gif_output; + GIF2IFP(sc)->if_capabilities |= IFCAP_LINKSTATE; + GIF2IFP(sc)->if_capenable |= IFCAP_LINKSTATE; if_attach(GIF2IFP(sc)); bpfattach(GIF2IFP(sc), DLT_NULL, sizeof(u_int32_t)); if (ng_gif_attach_p != NULL) @@ -1038,10 +1040,13 @@ gif_set_tunnel(struct ifnet *ifp, struct #if defined(INET) || defined(INET6) bad: #endif - if (error == 0 && sc->gif_family != 0) + if (error == 0 && sc->gif_family != 0) { ifp->if_drv_flags |= IFF_DRV_RUNNING; - else + if_link_state_change(ifp, LINK_STATE_UP); + } else { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); + } return (error); } @@ -1063,4 +1068,5 @@ gif_delete_tunnel(struct ifnet *ifp) free(sc->gif_hdr, M_GIF); } ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); } Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Tue Nov 3 22:24:02 2015 (r290346) +++ stable/10/sys/net/if_gre.c Wed Nov 4 00:21:02 2015 (r290347) @@ -179,6 +179,8 @@ gre_clone_create(struct if_clone *ifc, i GRE2IFP(sc)->if_ioctl = gre_ioctl; GRE2IFP(sc)->if_transmit = gre_transmit; GRE2IFP(sc)->if_qflush = gre_qflush; + GRE2IFP(sc)->if_capabilities |= IFCAP_LINKSTATE; + GRE2IFP(sc)->if_capenable |= IFCAP_LINKSTATE; if_attach(GRE2IFP(sc)); bpfattach(GRE2IFP(sc), DLT_NULL, sizeof(u_int32_t)); GRE_LIST_LOCK(); @@ -648,8 +650,10 @@ gre_set_tunnel(struct ifnet *ifp, struct break; #endif } - if (error == 0) + if (error == 0) { ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_UP); + } return (error); } @@ -668,6 +672,7 @@ gre_delete_tunnel(struct ifnet *ifp) free(sc->gre_hdr, M_GRE); } ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); } int Modified: stable/10/sys/net/if_me.c ============================================================================== --- stable/10/sys/net/if_me.c Tue Nov 3 22:24:02 2015 (r290346) +++ stable/10/sys/net/if_me.c Wed Nov 4 00:21:02 2015 (r290347) @@ -193,6 +193,8 @@ me_clone_create(struct if_clone *ifc, in ME2IFP(sc)->if_ioctl = me_ioctl; ME2IFP(sc)->if_transmit = me_transmit; ME2IFP(sc)->if_qflush = me_qflush; + ME2IFP(sc)->if_capabilities |= IFCAP_LINKSTATE; + ME2IFP(sc)->if_capenable |= IFCAP_LINKSTATE; if_attach(ME2IFP(sc)); bpfattach(ME2IFP(sc), DLT_NULL, sizeof(u_int32_t)); ME_LIST_LOCK(); @@ -377,8 +379,10 @@ me_set_tunnel(struct ifnet *ifp, struct if (sc->me_ecookie == NULL) sc->me_ecookie = encap_attach_func(AF_INET, IPPROTO_MOBILE, me_encapcheck, &in_mobile_protosw, sc); - if (sc->me_ecookie != NULL) + if (sc->me_ecookie != NULL) { ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_UP); + } return (0); } @@ -396,6 +400,7 @@ me_delete_tunnel(struct ifnet *ifp) sc->me_dst.s_addr = 0; ME_WUNLOCK(sc); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); } static uint16_t From owner-svn-src-stable-10@freebsd.org Wed Nov 4 01:00:43 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B94DA26F6D; Wed, 4 Nov 2015 01:00:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 348A21475; Wed, 4 Nov 2015 01:00:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA410gQW045028; Wed, 4 Nov 2015 01:00:42 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA410gpg045026; Wed, 4 Nov 2015 01:00:42 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201511040100.tA410gpg045026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 4 Nov 2015 01:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290348 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 01:00:43 -0000 Author: hrs Date: Wed Nov 4 01:00:42 2015 New Revision: 290348 URL: https://svnweb.freebsd.org/changeset/base/290348 Log: MFC r288600: - Schedule DAD for IN6_IFF_TENTATIVE addresses in nd6_timer(). This catches cases that DAD probes cannot be sent because of IFF_UP && !IFF_DRV_RUNNING. - nd6_dad_starttimer() now calls nd6_dad_ns_output(), instead of calling it before nd6_dad_starttimer(). - Do not release an entry in dadq when a duplicate entry is being added. Modified: stable/10/sys/netinet6/nd6.c stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6.c ============================================================================== --- stable/10/sys/netinet6/nd6.c Wed Nov 4 00:21:02 2015 (r290347) +++ stable/10/sys/netinet6/nd6.c Wed Nov 4 01:00:42 2015 (r290348) @@ -687,8 +687,31 @@ nd6_timer(void *arg) goto addrloop; } } + } else if ((ia6->ia6_flags & IN6_IFF_TENTATIVE) != 0) { + /* + * Schedule DAD for a tentative address. This happens + * if the interface was down or not running + * when the address was configured. + */ + int delay; + + delay = arc4random() % + (MAX_RTR_SOLICITATION_DELAY * hz); + nd6_dad_start((struct ifaddr *)ia6, delay); } else { /* + * Check status of the interface. If it is down, + * mark the address as tentative for future DAD. + */ + if ((ia6->ia_ifp->if_flags & IFF_UP) == 0 || + (ia6->ia_ifp->if_drv_flags & IFF_DRV_RUNNING) + == 0 || + (ND_IFINFO(ia6->ia_ifp)->flags & + ND6_IFF_IFDISABLED) != 0) { + ia6->ia6_flags &= ~IN6_IFF_DUPLICATED; + ia6->ia6_flags |= IN6_IFF_TENTATIVE; + } + /* * A new RA might have made a deprecated address * preferred. */ @@ -1341,7 +1364,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru /* Mark all IPv6 address as tentative. */ ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED; - if ((ND_IFINFO(ifp)->flags & ND6_IFF_NO_DAD) == 0) { + if (V_ip6_dad_count > 0 && + (ND_IFINFO(ifp)->flags & ND6_IFF_NO_DAD) == 0) { IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Wed Nov 4 00:21:02 2015 (r290347) +++ stable/10/sys/netinet6/nd6_nbr.c Wed Nov 4 01:00:42 2015 (r290348) @@ -86,11 +86,11 @@ static struct dadq *nd6_dad_find(struct static void nd6_dad_add(struct dadq *dp); static void nd6_dad_del(struct dadq *dp); static void nd6_dad_rele(struct dadq *); -static void nd6_dad_starttimer(struct dadq *, int); +static void nd6_dad_starttimer(struct dadq *, int, int); static void nd6_dad_stoptimer(struct dadq *); static void nd6_dad_timer(struct dadq *); static void nd6_dad_duplicated(struct ifaddr *, struct dadq *); -static void nd6_dad_ns_output(struct dadq *, struct ifaddr *); +static void nd6_dad_ns_output(struct dadq *); static void nd6_dad_ns_input(struct ifaddr *, struct nd_opt_nonce *); static void nd6_dad_na_input(struct ifaddr *); static void nd6_na_output_fib(struct ifnet *, const struct in6_addr *, @@ -1242,9 +1242,11 @@ nd6_dad_find(struct ifaddr *ifa, struct } static void -nd6_dad_starttimer(struct dadq *dp, int ticks) +nd6_dad_starttimer(struct dadq *dp, int ticks, int send_ns) { + if (send_ns != 0) + nd6_dad_ns_output(dp); callout_reset(&dp->dad_timer_ch, ticks, (void (*)(void *))nd6_dad_timer, (void *)dp); } @@ -1283,6 +1285,7 @@ nd6_dad_start(struct ifaddr *ifa, int de struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa; struct dadq *dp; char ip6buf[INET6_ADDRSTRLEN]; + int send_ns; /* * If we don't need DAD, don't do it. @@ -1319,8 +1322,10 @@ nd6_dad_start(struct ifaddr *ifa, int de return; } if ((dp = nd6_dad_find(ifa, NULL)) != NULL) { - /* DAD already in progress */ - nd6_dad_rele(dp); + /* + * DAD already in progress. Let the existing entry + * to finish it. + */ return; } @@ -1353,13 +1358,12 @@ nd6_dad_start(struct ifaddr *ifa, int de dp->dad_ns_lcount = dp->dad_loopbackprobe = 0; refcount_init(&dp->dad_refcnt, 1); nd6_dad_add(dp); + send_ns = 0; if (delay == 0) { - nd6_dad_ns_output(dp, ifa); - nd6_dad_starttimer(dp, - (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000); - } else { - nd6_dad_starttimer(dp, delay); + send_ns = 1; + delay = (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000; } + nd6_dad_starttimer(dp, delay, send_ns); } /* @@ -1429,7 +1433,8 @@ nd6_dad_timer(struct dadq *dp) if ((dp->dad_ns_tcount > V_dad_maxtry) && (((ifp->if_flags & IFF_UP) == 0) || ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0))) { - nd6log((LOG_INFO, "%s: could not run DAD, driver problem?\n", + nd6log((LOG_INFO, "%s: could not run DAD " + "because the interface was down or not running.\n", if_name(ifa->ifa_ifp))); goto err; } @@ -1439,9 +1444,8 @@ nd6_dad_timer(struct dadq *dp) /* * We have more NS to go. Send NS packet for DAD. */ - nd6_dad_ns_output(dp, ifa); nd6_dad_starttimer(dp, - (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000); + (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000, 1); goto done; } else { /* @@ -1469,11 +1473,11 @@ nd6_dad_timer(struct dadq *dp) * Send an NS immediately and increase dad_count by * V_nd6_mmaxtries - 1. */ - nd6_dad_ns_output(dp, ifa); dp->dad_count = dp->dad_ns_ocount + V_nd6_mmaxtries - 1; nd6_dad_starttimer(dp, - (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000); + (long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000, + 1); goto done; } else { /* @@ -1562,10 +1566,10 @@ nd6_dad_duplicated(struct ifaddr *ifa, s } static void -nd6_dad_ns_output(struct dadq *dp, struct ifaddr *ifa) +nd6_dad_ns_output(struct dadq *dp) { - struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa; - struct ifnet *ifp = ifa->ifa_ifp; + struct in6_ifaddr *ia = (struct in6_ifaddr *)dp->dad_ifa; + struct ifnet *ifp = dp->dad_ifa->ifa_ifp; int i; dp->dad_ns_tcount++; From owner-svn-src-stable-10@freebsd.org Wed Nov 4 10:42:52 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E9E6A26793; Wed, 4 Nov 2015 10:42:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A5031511; Wed, 4 Nov 2015 10:42:52 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA4Agp8B052588; Wed, 4 Nov 2015 10:42:51 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA4AgpkN052587; Wed, 4 Nov 2015 10:42:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201511041042.tA4AgpkN052587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 4 Nov 2015 10:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290360 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 10:42:52 -0000 Author: ae Date: Wed Nov 4 10:42:51 2015 New Revision: 290360 URL: https://svnweb.freebsd.org/changeset/base/290360 Log: MFC r290116: Check the size of data available in mbuf before using it. PR: 202667 Modified: stable/10/sys/net/if_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gre.c ============================================================================== --- stable/10/sys/net/if_gre.c Wed Nov 4 10:35:10 2015 (r290359) +++ stable/10/sys/net/if_gre.c Wed Nov 4 10:42:51 2015 (r290360) @@ -691,6 +691,14 @@ gre_input(struct mbuf **mp, int *offp, i KASSERT(sc != NULL, ("encap_getarg returned NULL")); ifp = GRE2IFP(sc); + hlen = *offp + sizeof(struct grehdr) + 4 * sizeof(uint32_t); + if (m->m_pkthdr.len < hlen) + goto drop; + if (m->m_len < hlen) { + m = m_pullup(m, hlen); + if (m == NULL) + goto drop; + } gh = (struct grehdr *)mtodo(m, *offp); flags = ntohs(gh->gre_flags); if (flags & ~GRE_FLAGS_MASK) From owner-svn-src-stable-10@freebsd.org Thu Nov 5 07:48:49 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1856A26F02; Thu, 5 Nov 2015 07:48:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A34721639; Thu, 5 Nov 2015 07:48:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA57mmSC080063; Thu, 5 Nov 2015 07:48:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA57mm9q080061; Thu, 5 Nov 2015 07:48:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511050748.tA57mm9q080061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Nov 2015 07:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290385 - in stable/10: sbin/camcontrol share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 07:48:50 -0000 Author: ngie Date: Thu Nov 5 07:48:48 2015 New Revision: 290385 URL: https://svnweb.freebsd.org/changeset/base/290385 Log: MFC r289913,r289916: r289913: Use 't' (bits) not 'i' (bytes) for describing MRIE (aka "Method of Reporting Informational Exceptions") in the SCSI mode database as the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is 4 bits wide, not 4 bytes wide 1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf Bug 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division r289916: Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the mode value isn't always clipped to -1 when (resolution * size) == 32, which would have been the case with values => {4i,32b,32t}. This seems to have been broken in r64382. PR: 200619 Reported by: Michael Baptist Submitted by: Lars Skodje Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sbin/camcontrol/modeedit.c stable/10/share/misc/scsi_modes Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/modeedit.c ============================================================================== --- stable/10/sbin/camcontrol/modeedit.c Thu Nov 5 07:43:15 2015 (r290384) +++ stable/10/sbin/camcontrol/modeedit.c Thu Nov 5 07:48:48 2015 (r290385) @@ -246,7 +246,7 @@ editentry_set(char *name, char *newvalue * currently workaround it (even for int64's), so we have to kludge it. */ #define RESOLUTION_MAX(size) ((resolution * (size) == 32)? \ - (int)0xffffffff: (1 << (resolution * (size))) - 1) + INT_MAX: (1 << (resolution * (size))) - 1) assert(newvalue != NULL); if (*newvalue == '\0') Modified: stable/10/share/misc/scsi_modes ============================================================================== --- stable/10/share/misc/scsi_modes Thu Nov 5 07:43:15 2015 (r290384) +++ stable/10/share/misc/scsi_modes Thu Nov 5 07:48:48 2015 (r290385) @@ -106,7 +106,7 @@ {EBACKERR} t1 {LogErr} t1 {Reserved} *t4 - {MRIE} b4 + {MRIE} t4 {Interval Timer} i4 {Report Count} i4 } From owner-svn-src-stable-10@freebsd.org Thu Nov 5 08:27:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EA52A25885; Thu, 5 Nov 2015 08:27:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44A241602; Thu, 5 Nov 2015 08:27:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA58Rjlt092294; Thu, 5 Nov 2015 08:27:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA58Rj0p092293; Thu, 5 Nov 2015 08:27:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511050827.tA58Rj0p092293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 5 Nov 2015 08:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290386 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 08:27:46 -0000 Author: ngie Date: Thu Nov 5 08:27:45 2015 New Revision: 290386 URL: https://svnweb.freebsd.org/changeset/base/290386 Log: MFC r289746: Exit with a user-friendly message instead of tripping an assert if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..) PR: 203884 Reviewed by: grehan Submitted by: William Orr Modified: stable/10/usr.sbin/bhyve/bhyverun.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/bhyverun.c ============================================================================== --- stable/10/usr.sbin/bhyve/bhyverun.c Thu Nov 5 07:48:48 2015 (r290385) +++ stable/10/usr.sbin/bhyve/bhyverun.c Thu Nov 5 08:27:45 2015 (r290386) @@ -258,7 +258,8 @@ fbsdrun_addcpu(struct vmctx *ctx, int fr * with vm_suspend(). */ error = vm_activate_cpu(ctx, newcpu); - assert(error == 0); + if (error != 0) + err(EX_OSERR, "could not activate CPU %d", newcpu); CPU_SET_ATOMIC(newcpu, &cpumask); From owner-svn-src-stable-10@freebsd.org Thu Nov 5 16:08:39 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F179A26008; Thu, 5 Nov 2015 16:08:39 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 673AF1E0B; Thu, 5 Nov 2015 16:08:39 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5G8cZS042231; Thu, 5 Nov 2015 16:08:38 GMT (envelope-from emax@FreeBSD.org) Received: (from emax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5G8ceM042230; Thu, 5 Nov 2015 16:08:38 GMT (envelope-from emax@FreeBSD.org) Message-Id: <201511051608.tA5G8ceM042230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emax set sender to emax@FreeBSD.org using -f From: Maksim Yevmenkin Date: Thu, 5 Nov 2015 16:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290395 - stable/10/usr.sbin/bluetooth/sdpcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 16:08:39 -0000 Author: emax Date: Thu Nov 5 16:08:38 2015 New Revision: 290395 URL: https://svnweb.freebsd.org/changeset/base/290395 Log: MFC r289637 check boundaries while parsing SDP responses Reported by: hps Reviewed by: hps Modified: stable/10/usr.sbin/bluetooth/sdpcontrol/search.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/sdpcontrol/search.c ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpcontrol/search.c Thu Nov 5 14:55:58 2015 (r290394) +++ stable/10/usr.sbin/bluetooth/sdpcontrol/search.c Thu Nov 5 16:08:38 2015 (r290395) @@ -102,6 +102,12 @@ print_service_class_id_list(uint8_t cons /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Service Class ID List. " \ + "Too long len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -258,28 +264,31 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_STR8: case SDP_DATA_URL8: SDP_GET8(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_STR16: case SDP_DATA_URL16: SDP_GET16(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_STR32: case SDP_DATA_URL32: SDP_GET32(len, start); - fprintf(stdout, "%*.*s\n", len, len, (char *) start); - start += len; + for (; start < end && len > 0; start ++, len --) + fprintf(stdout, "%c", *start); + fprintf(stdout, "\n"); break; case SDP_DATA_SEQ8: case SDP_DATA_ALT8: SDP_GET8(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -287,7 +296,7 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_SEQ16: case SDP_DATA_ALT16: SDP_GET16(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -295,7 +304,7 @@ print_protocol_descriptor(uint8_t const case SDP_DATA_SEQ32: case SDP_DATA_ALT32: SDP_GET32(len, start); - for (; len > 0; start ++, len --) + for (; start < end && len > 0; start ++, len --) fprintf(stdout, "%#2.2x ", *start); fprintf(stdout, "\n"); break; @@ -341,6 +350,12 @@ print_protocol_descriptor_list(uint8_t c /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Protocol Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -363,6 +378,12 @@ print_protocol_descriptor_list(uint8_t c /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Protocol Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + print_protocol_descriptor(start, start + len); start += len; } @@ -415,6 +436,12 @@ print_bluetooth_profile_descriptor_list( /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Bluetooth Profile Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + while (start < end) { SDP_GET8(type, start); switch (type) { @@ -438,6 +465,13 @@ print_bluetooth_profile_descriptor_list( /* NOT REACHED */ } + if (len > (end - start)) { + fprintf(stderr, "Invalid Bluetooth Profile " \ + "Descriptor List. " \ + "Too long, len=%d\n", len); + return; + } + /* Get UUID */ SDP_GET8(type, start); switch (type) { From owner-svn-src-stable-10@freebsd.org Thu Nov 5 16:50:10 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB7DBA26974; Thu, 5 Nov 2015 16:50:10 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7551F14BA; Thu, 5 Nov 2015 16:50:10 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5Go9JT053648; Thu, 5 Nov 2015 16:50:09 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5Go93R053647; Thu, 5 Nov 2015 16:50:09 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511051650.tA5Go93R053647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 5 Nov 2015 16:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290396 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 16:50:10 -0000 Author: smh Date: Thu Nov 5 16:50:09 2015 New Revision: 290396 URL: https://svnweb.freebsd.org/changeset/base/290396 Log: MFC r273118 (by mjg) Don't take devmtx unnecessarily in vn_isdisk. Sponsored by: Multiplay Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Thu Nov 5 16:08:38 2015 (r290395) +++ stable/10/sys/kern/vfs_subr.c Thu Nov 5 16:50:09 2015 (r290396) @@ -3836,17 +3836,20 @@ vn_isdisk(struct vnode *vp, int *errp) { int error; + if (vp->v_type != VCHR) { + error = ENOTBLK; + goto out; + } error = 0; dev_lock(); - if (vp->v_type != VCHR) - error = ENOTBLK; - else if (vp->v_rdev == NULL) + if (vp->v_rdev == NULL) error = ENXIO; else if (vp->v_rdev->si_devsw == NULL) error = ENXIO; else if (!(vp->v_rdev->si_devsw->d_flags & D_DISK)) error = ENOTBLK; dev_unlock(); +out: if (errp != NULL) *errp = error; return (error == 0); From owner-svn-src-stable-10@freebsd.org Thu Nov 5 17:19:09 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC9A5A2726B; Thu, 5 Nov 2015 17:19:09 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B79481F70; Thu, 5 Nov 2015 17:19:09 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5HJ8jQ062829; Thu, 5 Nov 2015 17:19:08 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5HJ8Q7062828; Thu, 5 Nov 2015 17:19:08 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511051719.tA5HJ8Q7062828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 5 Nov 2015 17:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290402 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 17:19:10 -0000 Author: smh Date: Thu Nov 5 17:19:08 2015 New Revision: 290402 URL: https://svnweb.freebsd.org/changeset/base/290402 Log: MFC r276450 Correct zpool list displaying invalid EXPANDSZ for unavailable pool vdevs Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Nov 5 17:12:41 2015 (r290401) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Nov 5 17:19:08 2015 (r290402) @@ -2808,7 +2808,8 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t * vs->vs_rsize = vdev_get_min_asize(vd); if (vd->vdev_ops->vdev_op_leaf) vs->vs_rsize += VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; - vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize; + if (vd->vdev_max_asize != 0) + vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize; vs->vs_configured_ashift = vd->vdev_top != NULL ? vd->vdev_top->vdev_ashift : vd->vdev_ashift; vs->vs_logical_ashift = vd->vdev_logical_ashift; From owner-svn-src-stable-10@freebsd.org Thu Nov 5 19:55:46 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BE3EA27375; Thu, 5 Nov 2015 19:55:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6676E1F5D; Thu, 5 Nov 2015 19:55:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5JtjwE009144; Thu, 5 Nov 2015 19:55:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5Jtjam009143; Thu, 5 Nov 2015 19:55:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511051955.tA5Jtjam009143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 19:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290410 - stable/10/sys/boot/amd64/efi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 19:55:46 -0000 Author: jhb Date: Thu Nov 5 19:55:45 2015 New Revision: 290410 URL: https://svnweb.freebsd.org/changeset/base/290410 Log: MFC 287934: The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko no longer fits in the default staging size. Bump the default size from 32MB to 48MB to provide more breathing room. PR: 201679 Modified: stable/10/sys/boot/amd64/efi/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/copy.c ============================================================================== --- stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 19:52:18 2015 (r290409) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 19:55:45 2015 (r290410) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef EFI_STAGING_SIZE -#define EFI_STAGING_SIZE 32 +#define EFI_STAGING_SIZE 48 #endif #define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) From owner-svn-src-stable-10@freebsd.org Thu Nov 5 20:21:44 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCB69A2779F; Thu, 5 Nov 2015 20:21:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1C51D4F; Thu, 5 Nov 2015 20:21:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5KLhje017975; Thu, 5 Nov 2015 20:21:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5KLhLQ017974; Thu, 5 Nov 2015 20:21:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052021.tA5KLhLQ017974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 20:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290411 - stable/10/sys/boot/amd64/efi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 20:21:44 -0000 Author: jhb Date: Thu Nov 5 20:21:43 2015 New Revision: 290411 URL: https://svnweb.freebsd.org/changeset/base/290411 Log: MFC 288372: Use EFI page size constants instead of hardcoding 4096. Modified: stable/10/sys/boot/amd64/efi/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/copy.c ============================================================================== --- stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 19:55:45 2015 (r290410) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Nov 5 20:21:43 2015 (r290411) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #define EFI_STAGING_SIZE 48 #endif -#define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) +#define STAGE_PAGES EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE) * 1024 * 1024) EFI_PHYSICAL_ADDRESS staging, staging_end; int stage_offset_set = 0; @@ -59,7 +59,7 @@ x86_efi_copy_init(void) (unsigned long)(status & EFI_ERROR_MASK)); return (status); } - staging_end = staging + STAGE_PAGES * 4096; + staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE; return (0); } @@ -114,7 +114,7 @@ x86_efi_copy_finish(void) src = (uint64_t *)staging; dst = (uint64_t *)(staging - stage_offset); - last = (uint64_t *)(staging + STAGE_PAGES * EFI_PAGE_SIZE); + last = (uint64_t *)staging_end; while (src < last) *dst++ = *src++; From owner-svn-src-stable-10@freebsd.org Thu Nov 5 21:22:24 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1244A2776A; Thu, 5 Nov 2015 21:22:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A38151A20; Thu, 5 Nov 2015 21:22:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA5LMNdl036087; Thu, 5 Nov 2015 21:22:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA5LMN5r036086; Thu, 5 Nov 2015 21:22:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511052122.tA5LMN5r036086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 5 Nov 2015 21:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290413 - in stable: 10/gnu/usr.bin/gdb/kgdb 9/gnu/usr.bin/gdb/kgdb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:22:25 -0000 Author: jhb Date: Thu Nov 5 21:22:23 2015 New Revision: 290413 URL: https://svnweb.freebsd.org/changeset/base/290413 Log: MFC 288371: When XSAVE support was added on amd64, the FPU save area was moved out of 'struct pcb' and into a variable-sized region after the structure. The kgdb code currently only reads the pcb. It does not read in the FPU save area but instead passes stack garbage as the FPU's saved context. Fixing this would mean determining the proper size of the area and fetching it. However, this state is not saved for running CPUs in stoppcbs[], so the callback would also have to know to ignore those pcbs. Instead, just remove the call since it is of limited usefulness. It results in kgdb reporting the state of the FPU/SIMD registers in userland, not their current values in the kernel. In particular, it does not report the correct state for any code in the kernel which does use the FPU and would report incorrect values in that case. Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Directory Properties: stable/9/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c ============================================================================== --- stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 20:24:56 2015 (r290412) +++ stable/10/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Thu Nov 5 21:22:23 2015 (r290413) @@ -72,7 +72,6 @@ kgdb_trgt_fetch_registers(int regno __un supply_register(AMD64_R8_REGNUM + 6, (char *)&pcb.pcb_r14); supply_register(AMD64_R15_REGNUM, (char *)&pcb.pcb_r15); supply_register(AMD64_RIP_REGNUM, (char *)&pcb.pcb_rip); - amd64_supply_fxsave(current_regcache, -1, (struct fpusave *)(&pcb + 1)); } void From owner-svn-src-stable-10@freebsd.org Fri Nov 6 13:34:56 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC6DFA26E0F; Fri, 6 Nov 2015 13:34:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97209148A; Fri, 6 Nov 2015 13:34:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6DYt4t019938; Fri, 6 Nov 2015 13:34:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6DYtDk019937; Fri, 6 Nov 2015 13:34:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511061334.tA6DYtDk019937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Nov 2015 13:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290443 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 13:34:56 -0000 Author: hselasky Date: Fri Nov 6 13:34:55 2015 New Revision: 290443 URL: https://svnweb.freebsd.org/changeset/base/290443 Log: MFC r290195: Reduce the DWC OTG interrupt load by not reading all the host channel status registers for every interrupt. Check a common host channel status interrupt register first, then conditionally read the individual host channel status registers. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otg.c Fri Nov 6 13:08:16 2015 (r290442) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Fri Nov 6 13:34:55 2015 (r290443) @@ -2559,6 +2559,7 @@ dwc_otg_interrupt_poll_locked(struct dwc struct usb_xfer *xfer; uint32_t count; uint32_t temp; + uint32_t haint; uint8_t got_rx_status; uint8_t x; @@ -2576,14 +2577,18 @@ repeat: DPRINTF("Yield\n"); return; } + /* get all host channel interrupts */ - for (x = 0; x != sc->sc_host_ch_max; x++) { + haint = DWC_OTG_READ_4(sc, DOTG_HAINT); + while (1) { + x = ffs(haint) - 1; + if (x >= sc->sc_host_ch_max) + break; temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x)); - if (temp != 0) { - DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); - temp &= ~HCINT_SOFTWARE_ONLY; - sc->sc_chan_state[x].hcint |= temp; - } + DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp); + temp &= ~HCINT_SOFTWARE_ONLY; + sc->sc_chan_state[x].hcint |= temp; + haint &= ~(1U << x); } if (sc->sc_last_rx_status == 0) { From owner-svn-src-stable-10@freebsd.org Fri Nov 6 16:48:34 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5825A28D1C; Fri, 6 Nov 2015 16:48:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61AAC11EC; Fri, 6 Nov 2015 16:48:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6GmXCp076054; Fri, 6 Nov 2015 16:48:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6GmXEN076053; Fri, 6 Nov 2015 16:48:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511061648.tA6GmXEN076053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Nov 2015 16:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290454 - in stable: 10/sys/dev/drm2/i915 9/sys/dev/drm2/i915 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:48:34 -0000 Author: jhb Date: Fri Nov 6 16:48:33 2015 New Revision: 290454 URL: https://svnweb.freebsd.org/changeset/base/290454 Log: MFC 288452,289719: 288452: Most error cases in i915_gem_do_execbuffer() jump to one of two labels to release resources (such as unholding pages) when errors occur. Some recently added error checks return immediately instead of jumping to a label resulting in leaks. Fix these to jump to a label to do cleanup instead. Note that stable/9 does not have the "recently added" error checks, but it does have some older error checks (that were are no longer present in stable/10 and head) that have the same bug and this fixes those instead. 289719: i915_gem_do_execbuffer() holds the pages backing each relocation region for various reasons while executing user commands. After these commands are completed, the pages backing the relocation regions are unheld. Since relocation regions do not have to be page aligned, the code in validate_exec_list() allocates 2 extra page pointers in the array of held pages populated by vm_fault_quick_hold_pages(). However, the cleanup code that unheld the pages always assumed that only the buffer size / PAGE_SIZE pages were used. This meant that non-page aligned buffers would not unheld the last 1 or 2 pages in the list. Fix this by saving the number of held pages returned by vm_fault_quick_hold_pages() for each relocation region and using this count during cleanup. Modified: stable/10/sys/dev/drm2/i915/i915_gem_execbuffer.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/drm2/i915/i915_gem_execbuffer.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/drm2/i915/i915_gem_execbuffer.c ============================================================================== --- stable/10/sys/dev/drm2/i915/i915_gem_execbuffer.c Fri Nov 6 16:43:22 2015 (r290453) +++ stable/10/sys/dev/drm2/i915/i915_gem_execbuffer.c Fri Nov 6 16:48:33 2015 (r290454) @@ -939,13 +939,15 @@ i915_gem_check_execbuffer(struct drm_i91 static int validate_exec_list(struct drm_i915_gem_exec_object2 *exec, int count, - vm_page_t ***map) + vm_page_t ***map, int **maplen) { vm_page_t *ma; int i, length, page_count; /* XXXKIB various limits checking is missing there */ *map = malloc(count * sizeof(*ma), DRM_I915_GEM, M_WAITOK | M_ZERO); + *maplen = malloc(count * sizeof(*maplen), DRM_I915_GEM, M_WAITOK | + M_ZERO); for (i = 0; i < count; i++) { /* First check for malicious input causing overflow */ if (exec[i].relocation_count > @@ -967,9 +969,10 @@ validate_exec_list(struct drm_i915_gem_e page_count = howmany(length, PAGE_SIZE) + 2; ma = (*map)[i] = malloc(page_count * sizeof(vm_page_t), DRM_I915_GEM, M_WAITOK | M_ZERO); - if (vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, - exec[i].relocs_ptr, length, VM_PROT_READ | VM_PROT_WRITE, - ma, page_count) == -1) { + (*maplen)[i] = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, exec[i].relocs_ptr, length, + VM_PROT_READ | VM_PROT_WRITE, ma, page_count); + if ((*maplen)[i] == -1) { free(ma, DRM_I915_GEM); (*map)[i] = NULL; return (-EFAULT); @@ -1121,6 +1124,7 @@ i915_gem_do_execbuffer(struct drm_device struct drm_clip_rect *cliprects = NULL; struct intel_ring_buffer *ring; vm_page_t **relocs_ma; + int *relocs_len; u32 ctx_id = i915_execbuffer2_get_context_id(*args); u32 exec_start, exec_len; u32 seqno; @@ -1135,7 +1139,8 @@ i915_gem_do_execbuffer(struct drm_device if (args->batch_len == 0) return (0); - ret = validate_exec_list(exec, args->buffer_count, &relocs_ma); + ret = validate_exec_list(exec, args->buffer_count, &relocs_ma, + &relocs_len); if (ret != 0) goto pre_struct_lock_err; @@ -1149,7 +1154,8 @@ i915_gem_do_execbuffer(struct drm_device if (ctx_id != 0) { DRM_DEBUG("Ring %s doesn't support contexts\n", ring->name); - return -EPERM; + ret = -EPERM; + goto pre_struct_lock_err; } break; case I915_EXEC_BLT: @@ -1157,7 +1163,8 @@ i915_gem_do_execbuffer(struct drm_device if (ctx_id != 0) { DRM_DEBUG("Ring %s doesn't support contexts\n", ring->name); - return -EPERM; + ret = -EPERM; + goto pre_struct_lock_err; } break; default: @@ -1169,7 +1176,8 @@ i915_gem_do_execbuffer(struct drm_device if (!intel_ring_initialized(ring)) { DRM_DEBUG("execbuf with invalid ring: %d\n", (int)(args->flags & I915_EXEC_RING_MASK)); - return -EINVAL; + ret = -EINVAL; + goto pre_struct_lock_err; } mode = args->flags & I915_EXEC_CONSTANTS_MASK; @@ -1401,13 +1409,11 @@ err: pre_struct_lock_err: for (i = 0; i < args->buffer_count; i++) { if (relocs_ma[i] != NULL) { - vm_page_unhold_pages(relocs_ma[i], howmany( - exec[i].relocation_count * - sizeof(struct drm_i915_gem_relocation_entry), - PAGE_SIZE)); + vm_page_unhold_pages(relocs_ma[i], relocs_len[i]); free(relocs_ma[i], DRM_I915_GEM); } } + free(relocs_len, DRM_I915_GEM); free(relocs_ma, DRM_I915_GEM); free(cliprects, DRM_I915_GEM); return ret; From owner-svn-src-stable-10@freebsd.org Fri Nov 6 16:57:24 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3747A261E3; Fri, 6 Nov 2015 16:57:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C2E6122C; Fri, 6 Nov 2015 16:57:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6GvNx1079099; Fri, 6 Nov 2015 16:57:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6GvNrO079098; Fri, 6 Nov 2015 16:57:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511061657.tA6GvNrO079098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Nov 2015 16:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290456 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 16:57:24 -0000 Author: jhb Date: Fri Nov 6 16:57:23 2015 New Revision: 290456 URL: https://svnweb.freebsd.org/changeset/base/290456 Log: MFC 288902: Include additional info in ptrace(2) KTR traces: - The new PC value and signal passed to PT_CONTINUE, PT_DETACH, PT_SYSCALL, and PT_TO_SC[EX]. - The system call code returned via PT_LWPINFO. Modified: stable/10/sys/kern/sys_process.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/sys_process.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Fri Nov 6 16:54:17 2015 (r290455) +++ stable/10/sys/kern/sys_process.c Fri Nov 6 16:57:23 2015 (r290456) @@ -938,25 +938,29 @@ kern_ptrace(struct thread *td, int req, switch (req) { case PT_TO_SCE: p->p_stops |= S_PT_SCE; - CTR2(KTR_PTRACE, - "PT_TO_SCE: pid %d, stops = %#x", p->p_pid, - p->p_stops); + CTR4(KTR_PTRACE, + "PT_TO_SCE: pid %d, stops = %#x, PC = %#lx, sig = %d", + p->p_pid, p->p_stops, + (u_long)(uintfptr_t)addr, data); break; case PT_TO_SCX: p->p_stops |= S_PT_SCX; - CTR2(KTR_PTRACE, - "PT_TO_SCX: pid %d, stops = %#x", p->p_pid, - p->p_stops); + CTR4(KTR_PTRACE, + "PT_TO_SCX: pid %d, stops = %#x, PC = %#lx, sig = %d", + p->p_pid, p->p_stops, + (u_long)(uintfptr_t)addr, data); break; case PT_SYSCALL: p->p_stops |= S_PT_SCE | S_PT_SCX; - CTR2(KTR_PTRACE, - "PT_SYSCALL: pid %d, stops = %#x", p->p_pid, - p->p_stops); + CTR4(KTR_PTRACE, + "PT_SYSCALL: pid %d, stops = %#x, PC = %#lx, sig = %d", + p->p_pid, p->p_stops, + (u_long)(uintfptr_t)addr, data); break; case PT_CONTINUE: - CTR1(KTR_PTRACE, - "PT_CONTINUE: pid %d", p->p_pid); + CTR3(KTR_PTRACE, + "PT_CONTINUE: pid %d, PC = %#lx, sig = %d", + p->p_pid, (u_long)(uintfptr_t)addr, data); break; } break; @@ -979,11 +983,12 @@ kern_ptrace(struct thread *td, int req, proc_reparent(p, pp); if (pp == initproc) p->p_sigparent = SIGCHLD; - CTR2(KTR_PTRACE, - "PT_DETACH: pid %d reparented to pid %d", - p->p_pid, pp->p_pid); + CTR3(KTR_PTRACE, + "PT_DETACH: pid %d reparented to pid %d, sig %d", + p->p_pid, pp->p_pid, data); } else - CTR1(KTR_PTRACE, "PT_DETACH: pid %d", p->p_pid); + CTR2(KTR_PTRACE, "PT_DETACH: pid %d, sig %d", + p->p_pid, data); p->p_oppid = 0; p->p_stops = 0; @@ -1236,10 +1241,10 @@ kern_ptrace(struct thread *td, int req, if (wrap32) ptrace_lwpinfo_to32(pl, pl32); #endif - CTR5(KTR_PTRACE, - "PT_LWPINFO: tid %d (pid %d) event %d flags %#x child pid %d", + CTR6(KTR_PTRACE, + "PT_LWPINFO: tid %d (pid %d) event %d flags %#x child pid %d syscall %d", td2->td_tid, p->p_pid, pl->pl_event, pl->pl_flags, - pl->pl_child_pid); + pl->pl_child_pid, pl->pl_syscall_code); break; case PT_GETNUMLWPS: From owner-svn-src-stable-10@freebsd.org Fri Nov 6 20:10:56 2015 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BDF1A28243; Fri, 6 Nov 2015 20:10:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 433DF1B03; Fri, 6 Nov 2015 20:10:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA6KAtgX039634; Fri, 6 Nov 2015 20:10:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA6KAtWj039631; Fri, 6 Nov 2015 20:10:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511062010.tA6KAtWj039631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 6 Nov 2015 20:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290464 - in stable: 10/lib/libc/sys 10/sys/kern 10/sys/sys 9/lib/libc/sys 9/sys/kern 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 20:10:56 -0000 Author: jhb Date: Fri Nov 6 20:10:54 2015 New Revision: 290464 URL: https://svnweb.freebsd.org/changeset/base/290464 Log: MFC 289636: Switch pl_child_pid from int to pid_t. Modified: stable/10/lib/libc/sys/ptrace.2 stable/10/sys/kern/sys_process.c stable/10/sys/sys/ptrace.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libc/sys/ptrace.2 stable/9/sys/kern/sys_process.c stable/9/sys/sys/ptrace.h Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/lib/libc/sys/ptrace.2 ============================================================================== --- stable/10/lib/libc/sys/ptrace.2 Fri Nov 6 19:18:20 2015 (r290463) +++ stable/10/lib/libc/sys/ptrace.2 Fri Nov 6 20:10:54 2015 (r290464) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd October 6, 2015 +.Dd October 20, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -306,7 +306,7 @@ struct ptrace_lwpinfo { sigset_t pl_siglist; siginfo_t pl_siginfo; char pl_tdname[MAXCOMLEN + 1]; - int pl_child_pid; + pid_t pl_child_pid; u_int pl_syscall_code; u_int pl_syscall_narg; }; Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Fri Nov 6 19:18:20 2015 (r290463) +++ stable/10/sys/kern/sys_process.c Fri Nov 6 20:10:54 2015 (r290464) @@ -95,7 +95,7 @@ struct ptrace_lwpinfo32 { sigset_t pl_siglist; /* LWP pending signal */ struct siginfo32 pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name. */ - int pl_child_pid; /* New child pid */ + pid_t pl_child_pid; /* New child pid */ u_int pl_syscall_code; u_int pl_syscall_narg; }; Modified: stable/10/sys/sys/ptrace.h ============================================================================== --- stable/10/sys/sys/ptrace.h Fri Nov 6 19:18:20 2015 (r290463) +++ stable/10/sys/sys/ptrace.h Fri Nov 6 20:10:54 2015 (r290464) @@ -112,7 +112,7 @@ struct ptrace_lwpinfo { sigset_t pl_siglist; /* LWP pending signal */ struct __siginfo pl_siginfo; /* siginfo for signal */ char pl_tdname[MAXCOMLEN + 1]; /* LWP name */ - int pl_child_pid; /* New child pid */ + pid_t pl_child_pid; /* New child pid */ u_int pl_syscall_code; u_int pl_syscall_narg; };