From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 00:47:39 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF86B2E7; Sun, 1 Mar 2015 00:47:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 9FC13261; Sun, 1 Mar 2015 00:47:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t210ld1p095268; Sun, 1 Mar 2015 00:47:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t210ldc2095263; Sun, 1 Mar 2015 00:47:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503010047.t210ldc2095263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Mar 2015 00:47: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: r279456 - in stable: 10/contrib/libcxxrt 9/contrib/libcxxrt 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 00:47:39 -0000 Author: dim Date: Sun Mar 1 00:47:37 2015 New Revision: 279456 URL: https://svnweb.freebsd.org/changeset/base/279456 Log: MFC r279307: Make libcxxrt's parsing of DWARF exception handling tables work on architectures with strict alignment, by using memcpy() instead of directly reading fields. Reported by: Daisuke Aoyama Reviewed by: imp, bapt Tested by: bapt Differential Revision: https://reviews.freebsd.org/D1967 MFC r279310: Since newer versions of compiler-rt require unwind.h, and we want to use the copy in libcxxrt for it, fix the arm-specific header to define the _Unwind_Action type. Submitted by: andrew Modified: stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/unwind-arm.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/unwind-arm.h Directory Properties: stable/9/contrib/libcxxrt/ (props changed) Modified: stable/10/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/10/contrib/libcxxrt/dwarf_eh.h Sun Mar 1 00:44:15 2015 (r279455) +++ stable/10/contrib/libcxxrt/dwarf_eh.h Sun Mar 1 00:47:37 2015 (r279456) @@ -218,15 +218,17 @@ static int64_t read_sleb128(dw_eh_ptr_t static uint64_t read_value(char encoding, dw_eh_ptr_t *data) { enum dwarf_data_encoding type = get_encoding(encoding); - uint64_t v; switch (type) { // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = static_cast(*reinterpret_cast(*data));\ - *data += sizeof(type);\ - break; + {\ + type t;\ + memcpy(&t, *data, sizeof t);\ + *data += sizeof t;\ + return static_cast(t);\ + } READ(DW_EH_PE_udata2, uint16_t) READ(DW_EH_PE_udata4, uint32_t) READ(DW_EH_PE_udata8, uint64_t) @@ -237,15 +239,11 @@ static uint64_t read_value(char encoding #undef READ // Read variable-length types case DW_EH_PE_sleb128: - v = read_sleb128(data); - break; + return read_sleb128(data); case DW_EH_PE_uleb128: - v = read_uleb128(data); - break; + return read_uleb128(data); default: abort(); } - - return v; } /** Modified: stable/10/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/10/contrib/libcxxrt/unwind-arm.h Sun Mar 1 00:44:15 2015 (r279455) +++ stable/10/contrib/libcxxrt/unwind-arm.h Sun Mar 1 00:47:37 2015 (r279456) @@ -36,6 +36,8 @@ _URC_FATAL_PHASE1_ERROR = _URC_FAILURE } _Unwind_Reason_Code; +typedef int _Unwind_Action; + typedef uint32_t _Unwind_State; #ifdef __clang__ static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 00:47:39 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 174BB2E6; Sun, 1 Mar 2015 00:47:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DC33D260; Sun, 1 Mar 2015 00:47:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t210lcHl095258; Sun, 1 Mar 2015 00:47:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t210lcuH095256; Sun, 1 Mar 2015 00:47:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503010047.t210lcuH095256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Mar 2015 00:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279456 - in stable: 10/contrib/libcxxrt 9/contrib/libcxxrt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 00:47:39 -0000 Author: dim Date: Sun Mar 1 00:47:37 2015 New Revision: 279456 URL: https://svnweb.freebsd.org/changeset/base/279456 Log: MFC r279307: Make libcxxrt's parsing of DWARF exception handling tables work on architectures with strict alignment, by using memcpy() instead of directly reading fields. Reported by: Daisuke Aoyama Reviewed by: imp, bapt Tested by: bapt Differential Revision: https://reviews.freebsd.org/D1967 MFC r279310: Since newer versions of compiler-rt require unwind.h, and we want to use the copy in libcxxrt for it, fix the arm-specific header to define the _Unwind_Action type. Submitted by: andrew Modified: stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/unwind-arm.h Directory Properties: stable/9/contrib/libcxxrt/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/unwind-arm.h Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libcxxrt/dwarf_eh.h ============================================================================== --- stable/9/contrib/libcxxrt/dwarf_eh.h Sun Mar 1 00:44:15 2015 (r279455) +++ stable/9/contrib/libcxxrt/dwarf_eh.h Sun Mar 1 00:47:37 2015 (r279456) @@ -218,15 +218,17 @@ static int64_t read_sleb128(dw_eh_ptr_t static uint64_t read_value(char encoding, dw_eh_ptr_t *data) { enum dwarf_data_encoding type = get_encoding(encoding); - uint64_t v; switch (type) { // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = static_cast(*reinterpret_cast(*data));\ - *data += sizeof(type);\ - break; + {\ + type t;\ + memcpy(&t, *data, sizeof t);\ + *data += sizeof t;\ + return static_cast(t);\ + } READ(DW_EH_PE_udata2, uint16_t) READ(DW_EH_PE_udata4, uint32_t) READ(DW_EH_PE_udata8, uint64_t) @@ -237,15 +239,11 @@ static uint64_t read_value(char encoding #undef READ // Read variable-length types case DW_EH_PE_sleb128: - v = read_sleb128(data); - break; + return read_sleb128(data); case DW_EH_PE_uleb128: - v = read_uleb128(data); - break; + return read_uleb128(data); default: abort(); } - - return v; } /** Modified: stable/9/contrib/libcxxrt/unwind-arm.h ============================================================================== --- stable/9/contrib/libcxxrt/unwind-arm.h Sun Mar 1 00:44:15 2015 (r279455) +++ stable/9/contrib/libcxxrt/unwind-arm.h Sun Mar 1 00:47:37 2015 (r279456) @@ -36,6 +36,8 @@ _URC_FATAL_PHASE1_ERROR = _URC_FAILURE } _Unwind_Reason_Code; +typedef int _Unwind_Action; + typedef uint32_t _Unwind_State; #ifdef __clang__ static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 00:57:02 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B87DBE4; Sun, 1 Mar 2015 00:57:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6603E371; Sun, 1 Mar 2015 00:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t210v2uB000736; Sun, 1 Mar 2015 00:57:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t210v2Xe000735; Sun, 1 Mar 2015 00:57:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503010057.t210v2Xe000735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Mar 2015 00:57: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: r279462 - stable/10/sys/arm/ti/am335x 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 00:57:02 -0000 Author: dim Date: Sun Mar 1 00:57:01 2015 New Revision: 279462 URL: https://svnweb.freebsd.org/changeset/base/279462 Log: MFC r279311: In sys/arm/ti/am335x/am335x_rtc.c, fix a clang 3.6.0 warning about am33x_rtc_softc::sc_irq_res (which is an array) never being NULL. Submitted by: andrew Modified: stable/10/sys/arm/ti/am335x/am335x_rtc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_rtc.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_rtc.c Sun Mar 1 00:52:41 2015 (r279461) +++ stable/10/sys/arm/ti/am335x/am335x_rtc.c Sun Mar 1 00:57:01 2015 (r279462) @@ -137,7 +137,7 @@ am335x_rtc_detach(device_t dev) struct am335x_rtc_softc *sc; sc = device_get_softc(dev); - if (sc->sc_irq_res) + if (sc->sc_irq_res[0] != NULL) bus_release_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 01:08:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D793575; Sun, 1 Mar 2015 01:08:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 66F8B668; Sun, 1 Mar 2015 01:08:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2118Fvj006069; Sun, 1 Mar 2015 01:08:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2118F4C006068; Sun, 1 Mar 2015 01:08:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503010108.t2118F4C006068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Mar 2015 01:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279467 - in stable: 10/sys/arm/arm 10/sys/arm/ti 10/sys/arm/ti/am335x 10/sys/arm/ti/omap4 9/sys/arm/arm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 01:08:15 -0000 Author: dim Date: Sun Mar 1 01:08:14 2015 New Revision: 279467 URL: https://svnweb.freebsd.org/changeset/base/279467 Log: MFC r279312: Fix a number of -Wcast-qual warnings under sys/arm. No functional change. Submitted by: andrew Modified: stable/9/sys/arm/arm/disassem.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/arm/arm/disassem.c stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c stable/10/sys/arm/ti/omap4/omap4_scm_padconf.c stable/10/sys/arm/ti/ti_scm.h Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/arm/arm/disassem.c ============================================================================== --- stable/9/sys/arm/arm/disassem.c Sun Mar 1 00:59:35 2015 (r279466) +++ stable/9/sys/arm/arm/disassem.c Sun Mar 1 01:08:14 2015 (r279467) @@ -277,7 +277,7 @@ static void disassemble_printaddr(u_int vm_offset_t disasm(const disasm_interface_t *di, vm_offset_t loc, int altfmt) { - struct arm32_insn *i_ptr = (struct arm32_insn *)&arm32_i; + const struct arm32_insn *i_ptr = arm32_i; u_int insn; int matchp; From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 01:08:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DBD05E5; Sun, 1 Mar 2015 01:08:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DC719669; Sun, 1 Mar 2015 01:08:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2118GRL006079; Sun, 1 Mar 2015 01:08:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2118FVl006074; Sun, 1 Mar 2015 01:08:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503010108.t2118FVl006074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 1 Mar 2015 01:08: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: r279467 - in stable: 10/sys/arm/arm 10/sys/arm/ti 10/sys/arm/ti/am335x 10/sys/arm/ti/omap4 9/sys/arm/arm 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 01:08:17 -0000 Author: dim Date: Sun Mar 1 01:08:14 2015 New Revision: 279467 URL: https://svnweb.freebsd.org/changeset/base/279467 Log: MFC r279312: Fix a number of -Wcast-qual warnings under sys/arm. No functional change. Submitted by: andrew Modified: stable/10/sys/arm/arm/disassem.c stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c stable/10/sys/arm/ti/omap4/omap4_scm_padconf.c stable/10/sys/arm/ti/ti_scm.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/arm/arm/disassem.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/arm/arm/disassem.c ============================================================================== --- stable/10/sys/arm/arm/disassem.c Sun Mar 1 00:59:35 2015 (r279466) +++ stable/10/sys/arm/arm/disassem.c Sun Mar 1 01:08:14 2015 (r279467) @@ -289,7 +289,7 @@ static void disassemble_printaddr(u_int vm_offset_t disasm(const disasm_interface_t *di, vm_offset_t loc, int altfmt) { - struct arm32_insn *i_ptr = (struct arm32_insn *)&arm32_i; + const struct arm32_insn *i_ptr = arm32_i; u_int insn; int matchp; Modified: stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c Sun Mar 1 00:59:35 2015 (r279466) +++ stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c Sun Mar 1 01:08:14 2015 (r279467) @@ -308,8 +308,8 @@ const struct ti_scm_padconf ti_padconf_d const struct ti_scm_device ti_scm_dev = { .padconf_muxmode_mask = 0x7, .padconf_sate_mask = 0x78, - .padstate = (struct ti_scm_padstate *) &ti_padstate_devmap, - .padconf = (struct ti_scm_padconf *) &ti_padconf_devmap, + .padstate = ti_padstate_devmap, + .padconf = ti_padconf_devmap, }; int Modified: stable/10/sys/arm/ti/omap4/omap4_scm_padconf.c ============================================================================== --- stable/10/sys/arm/ti/omap4/omap4_scm_padconf.c Sun Mar 1 00:59:35 2015 (r279466) +++ stable/10/sys/arm/ti/omap4/omap4_scm_padconf.c Sun Mar 1 01:08:14 2015 (r279467) @@ -352,8 +352,8 @@ const struct ti_scm_padconf ti_padconf_d const struct ti_scm_device ti_scm_dev = { .padconf_muxmode_mask = CONTROL_PADCONF_MUXMODE_MASK, .padconf_sate_mask = CONTROL_PADCONF_SATE_MASK, - .padstate = (struct ti_scm_padstate *) &ti_padstate_devmap, - .padconf = (struct ti_scm_padconf *) &ti_padconf_devmap, + .padstate = ti_padstate_devmap, + .padconf = ti_padconf_devmap, }; int Modified: stable/10/sys/arm/ti/ti_scm.h ============================================================================== --- stable/10/sys/arm/ti/ti_scm.h Sun Mar 1 00:59:35 2015 (r279466) +++ stable/10/sys/arm/ti/ti_scm.h Sun Mar 1 01:08:14 2015 (r279467) @@ -59,8 +59,8 @@ struct ti_scm_padstate { struct ti_scm_device { uint16_t padconf_muxmode_mask; uint16_t padconf_sate_mask; - struct ti_scm_padstate *padstate; - struct ti_scm_padconf *padconf; + const struct ti_scm_padstate *padstate; + const struct ti_scm_padconf *padconf; }; struct ti_scm_softc { From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 04:22:12 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A98E77; Sun, 1 Mar 2015 04:22:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 74036B55; Sun, 1 Mar 2015 04:22:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t214MCJ8099890; Sun, 1 Mar 2015 04:22:12 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t214M7Ib099859; Sun, 1 Mar 2015 04:22:07 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201503010422.t214M7Ib099859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sun, 1 Mar 2015 04:22: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: r279470 - in stable/10: sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io sys/conf sys/dev/pci sys/x86/iommu usr.sbin/pciconf 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 04:22:12 -0000 Author: rstone Date: Sun Mar 1 04:22:06 2015 New Revision: 279470 URL: https://svnweb.freebsd.org/changeset/base/279470 Log: MFC r264007,r264008,r264009,r264011,r264012,r264013 MFC support for PCI Alternate RID Interpretation. ARI is an optional PCIe feature that allows PCI devices to present up to 256 functions on a bus. This is effectively a prerequisite for PCI SR-IOV support. r264007: Add a method to get the PCI RID for a device. Reviewed by: kib MFC after: 2 months Sponsored by: Sandvine Inc. r264008: Re-implement the DMAR I/O MMU code in terms of PCI RIDs Under the hood the VT-d spec is really implemented in terms of PCI RIDs instead of bus/slot/function, even though the spec makes pains to convert back to bus/slot/function in examples. However working with bus/slot/function is not correct when PCI ARI is in use, so convert to using RIDs in most cases. bus/slot/function will only be used when reporting errors to a user. Reviewed by: kib MFC after: 2 months Sponsored by: Sandvine Inc. r264009: Re-write bhyve's I/O MMU handling in terms of PCI RID. Reviewed by: neel MFC after: 2 months Sponsored by: Sandvine Inc. r264011: Add support for PCIe ARI PCIe Alternate RID Interpretation (ARI) is an optional feature that allows devices to have up to 256 different functions. It is implemented by always setting the PCI slot number to 0 and re-purposing the 5 bits used to encode the slot number to instead contain the function number. Combined with the original 3 bits allocated for the function number, this allows for 256 functions. This is enabled by default, but it's expected to be a no-op on currently supported hardware. It's a prerequisite for supporting PCI SR-IOV, and I want the ARI support to go in early to help shake out any bugs in it. ARI can be disabled by setting the tunable hw.pci.enable_ari=0. Reviewed by: kib MFC after: 2 months Sponsored by: Sandvine Inc. r264012: Print status of ARI capability in pciconf -c Teach pciconf how to print out the status (enabled/disabled) of the ARI capability on PCI Root Complexes and Downstream Ports. MFC after: 2 months Sponsored by: Sandvine Inc. r264013: Add missing copyright date. MFC after: 2 months Added: stable/10/sys/dev/pci/pcib_support.c - copied, changed from r264007, head/sys/dev/pci/pcib_support.c Modified: stable/10/sys/amd64/vmm/amd/amdv.c stable/10/sys/amd64/vmm/intel/vtd.c stable/10/sys/amd64/vmm/io/iommu.c stable/10/sys/amd64/vmm/io/iommu.h stable/10/sys/amd64/vmm/io/ppt.c stable/10/sys/conf/files stable/10/sys/dev/pci/pci.c stable/10/sys/dev/pci/pci_if.m stable/10/sys/dev/pci/pci_pci.c stable/10/sys/dev/pci/pcib_if.m stable/10/sys/dev/pci/pcib_private.h stable/10/sys/dev/pci/pcireg.h stable/10/sys/dev/pci/pcivar.h stable/10/sys/x86/iommu/busdma_dmar.c stable/10/sys/x86/iommu/intel_ctx.c stable/10/sys/x86/iommu/intel_dmar.h stable/10/sys/x86/iommu/intel_drv.c stable/10/sys/x86/iommu/intel_fault.c stable/10/sys/x86/iommu/intel_utils.c stable/10/usr.sbin/pciconf/cap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/amd/amdv.c ============================================================================== --- stable/10/sys/amd64/vmm/amd/amdv.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/amd64/vmm/amd/amdv.c Sun Mar 1 04:22:06 2015 (r279470) @@ -99,14 +99,14 @@ amd_iommu_remove_mapping(void *domain, v } static void -amd_iommu_add_device(void *domain, int bus, int slot, int func) +amd_iommu_add_device(void *domain, uint16_t rid) { printf("amd_iommu_add_device: not implemented\n"); } static void -amd_iommu_remove_device(void *domain, int bus, int slot, int func) +amd_iommu_remove_device(void *domain, uint16_t rid) { printf("amd_iommu_remove_device: not implemented\n"); Modified: stable/10/sys/amd64/vmm/intel/vtd.c ============================================================================== --- stable/10/sys/amd64/vmm/intel/vtd.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/amd64/vmm/intel/vtd.c Sun Mar 1 04:22:06 2015 (r279470) @@ -99,6 +99,8 @@ struct vtdmap { #define VTD_PTE_SUPERPAGE (1UL << 7) #define VTD_PTE_ADDR_M (0x000FFFFFFFFFF000UL) +#define VTD_RID2IDX(rid) (((rid) & 0xff) * 2) + struct domain { uint64_t *ptp; /* first level page table page */ int pt_levels; /* number of page table levels */ @@ -360,27 +362,24 @@ vtd_disable(void) } static void -vtd_add_device(void *arg, int bus, int slot, int func) +vtd_add_device(void *arg, uint16_t rid) { int idx; uint64_t *ctxp; struct domain *dom = arg; vm_paddr_t pt_paddr; struct vtdmap *vtdmap; - - if (bus < 0 || bus > PCI_BUSMAX || - slot < 0 || slot > PCI_SLOTMAX || - func < 0 || func > PCI_FUNCMAX) - panic("vtd_add_device: invalid bsf %d/%d/%d", bus, slot, func); + uint8_t bus; vtdmap = vtdmaps[0]; + bus = PCI_RID2BUS(rid); ctxp = ctx_tables[bus]; pt_paddr = vtophys(dom->ptp); - idx = (slot << 3 | func) * 2; + idx = VTD_RID2IDX(rid); if (ctxp[idx] & VTD_CTX_PRESENT) { - panic("vtd_add_device: device %d/%d/%d is already owned by " - "domain %d", bus, slot, func, + panic("vtd_add_device: device %x is already owned by " + "domain %d", rid, (uint16_t)(ctxp[idx + 1] >> 8)); } @@ -404,19 +403,16 @@ vtd_add_device(void *arg, int bus, int s } static void -vtd_remove_device(void *arg, int bus, int slot, int func) +vtd_remove_device(void *arg, uint16_t rid) { int i, idx; uint64_t *ctxp; struct vtdmap *vtdmap; + uint8_t bus; - if (bus < 0 || bus > PCI_BUSMAX || - slot < 0 || slot > PCI_SLOTMAX || - func < 0 || func > PCI_FUNCMAX) - panic("vtd_add_device: invalid bsf %d/%d/%d", bus, slot, func); - + bus = PCI_RID2BUS(rid); ctxp = ctx_tables[bus]; - idx = (slot << 3 | func) * 2; + idx = VTD_RID2IDX(rid); /* * Order is important. The 'present' bit is must be cleared first. Modified: stable/10/sys/amd64/vmm/io/iommu.c ============================================================================== --- stable/10/sys/amd64/vmm/io/iommu.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/amd64/vmm/io/iommu.c Sun Mar 1 04:22:06 2015 (r279470) @@ -109,19 +109,19 @@ IOMMU_REMOVE_MAPPING(void *domain, vm_pa } static __inline void -IOMMU_ADD_DEVICE(void *domain, int bus, int slot, int func) +IOMMU_ADD_DEVICE(void *domain, uint16_t rid) { if (ops != NULL && iommu_avail) - (*ops->add_device)(domain, bus, slot, func); + (*ops->add_device)(domain, rid); } static __inline void -IOMMU_REMOVE_DEVICE(void *domain, int bus, int slot, int func) +IOMMU_REMOVE_DEVICE(void *domain, uint16_t rid) { if (ops != NULL && iommu_avail) - (*ops->remove_device)(domain, bus, slot, func); + (*ops->remove_device)(domain, rid); } static __inline void @@ -196,7 +196,8 @@ iommu_init(void) continue; /* everything else belongs to the host domain */ - iommu_add_device(host_domain, bus, slot, func); + iommu_add_device(host_domain, + pci_get_rid(dev)); } } } @@ -263,17 +264,17 @@ iommu_host_domain(void) } void -iommu_add_device(void *dom, int bus, int slot, int func) +iommu_add_device(void *dom, uint16_t rid) { - IOMMU_ADD_DEVICE(dom, bus, slot, func); + IOMMU_ADD_DEVICE(dom, rid); } void -iommu_remove_device(void *dom, int bus, int slot, int func) +iommu_remove_device(void *dom, uint16_t rid) { - IOMMU_REMOVE_DEVICE(dom, bus, slot, func); + IOMMU_REMOVE_DEVICE(dom, rid); } void Modified: stable/10/sys/amd64/vmm/io/iommu.h ============================================================================== --- stable/10/sys/amd64/vmm/io/iommu.h Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/amd64/vmm/io/iommu.h Sun Mar 1 04:22:06 2015 (r279470) @@ -39,8 +39,8 @@ typedef uint64_t (*iommu_create_mapping_ vm_paddr_t hpa, uint64_t len); typedef uint64_t (*iommu_remove_mapping_t)(void *domain, vm_paddr_t gpa, uint64_t len); -typedef void (*iommu_add_device_t)(void *domain, int bus, int slot, int func); -typedef void (*iommu_remove_device_t)(void *dom, int bus, int slot, int func); +typedef void (*iommu_add_device_t)(void *domain, uint16_t rid); +typedef void (*iommu_remove_device_t)(void *dom, uint16_t rid); typedef void (*iommu_invalidate_tlb_t)(void *dom); struct iommu_ops { @@ -69,7 +69,7 @@ void iommu_destroy_domain(void *dom); void iommu_create_mapping(void *dom, vm_paddr_t gpa, vm_paddr_t hpa, size_t len); void iommu_remove_mapping(void *dom, vm_paddr_t gpa, size_t len); -void iommu_add_device(void *dom, int bus, int slot, int func); -void iommu_remove_device(void *dom, int bus, int slot, int func); +void iommu_add_device(void *dom, uint16_t rid); +void iommu_remove_device(void *dom, uint16_t rid); void iommu_invalidate_tlb(void *domain); #endif Modified: stable/10/sys/amd64/vmm/io/ppt.c ============================================================================== --- stable/10/sys/amd64/vmm/io/ppt.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/amd64/vmm/io/ppt.c Sun Mar 1 04:22:06 2015 (r279470) @@ -346,7 +346,7 @@ ppt_assign_device(struct vm *vm, int bus return (EBUSY); ppt->vm = vm; - iommu_add_device(vm_iommu_domain(vm), bus, slot, func); + iommu_add_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); return (0); } return (ENOENT); @@ -367,7 +367,7 @@ ppt_unassign_device(struct vm *vm, int b ppt_unmap_mmio(vm, ppt); ppt_teardown_msi(ppt); ppt_teardown_msix(ppt); - iommu_remove_device(vm_iommu_domain(vm), bus, slot, func); + iommu_remove_device(vm_iommu_domain(vm), pci_get_rid(ppt->dev)); ppt->vm = NULL; return (0); } Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/conf/files Sun Mar 1 04:22:06 2015 (r279470) @@ -1992,6 +1992,7 @@ dev/pci/pci_pci.c optional pci dev/pci/pci_subr.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard +dev/pci/pcib_support.c standard dev/pci/vga_pci.c optional pci dev/pcn/if_pcn.c optional pcn pci dev/pdq/if_fea.c optional fea eisa Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pci.c Sun Mar 1 04:22:06 2015 (r279470) @@ -121,6 +121,8 @@ static void pci_resume_msix(device_t de static int pci_remap_intr_method(device_t bus, device_t dev, u_int irq); +static uint16_t pci_get_rid_method(device_t dev, device_t child); + static device_method_t pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pci_probe), @@ -175,6 +177,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_release_msi, pci_release_msi_method), DEVMETHOD(pci_msi_count, pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), + DEVMETHOD(pci_get_rid, pci_get_rid_method), DEVMETHOD_END }; @@ -358,6 +361,11 @@ TUNABLE_INT("hw.pci.clear_bars", &pci_cl SYSCTL_INT(_hw_pci, OID_AUTO, clear_bars, CTLFLAG_RDTUN, &pci_clear_bars, 0, "Ignore firmware-assigned resources for BARs."); +static int pci_enable_ari = 1; +TUNABLE_INT("hw.pci.enable_ari", &pci_enable_ari); +SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, + 0, "Enable support for PCIe Alternative RID Interpretation"); + static int pci_has_quirk(uint32_t devid, int quirk) { @@ -3292,6 +3300,19 @@ pci_add_resources(device_t bus, device_t } } +static struct pci_devinfo * +pci_identify_function(device_t pcib, device_t dev, int domain, int busno, + int slot, int func, size_t dinfo_size) +{ + struct pci_devinfo *dinfo; + + dinfo = pci_read_device(pcib, domain, busno, slot, func, dinfo_size); + if (dinfo != NULL) + pci_add_child(dev, dinfo); + + return (dinfo); +} + void pci_add_children(device_t dev, int domain, int busno, size_t dinfo_size) { @@ -3301,6 +3322,24 @@ pci_add_children(device_t dev, int domai int maxslots; int s, f, pcifunchigh; uint8_t hdrtype; + int first_func; + + /* + * Try to detect a device at slot 0, function 0. If it exists, try to + * enable ARI. We must enable ARI before detecting the rest of the + * functions on this bus as ARI changes the set of slots and functions + * that are legal on this bus. + */ + dinfo = pci_identify_function(pcib, dev, domain, busno, 0, 0, + dinfo_size); + if (dinfo != NULL && pci_enable_ari) + PCIB_TRY_ENABLE_ARI(pcib, dinfo->cfg.dev); + + /* + * Start looking for new devices on slot 0 at function 1 because we + * just identified the device at slot 0, function 0. + */ + first_func = 1; KASSERT(dinfo_size >= sizeof(struct pci_devinfo), ("dinfo_size too small")); @@ -3313,14 +3352,13 @@ pci_add_children(device_t dev, int domai if ((hdrtype & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) continue; if (hdrtype & PCIM_MFDEV) - pcifunchigh = PCI_FUNCMAX; - for (f = 0; f <= pcifunchigh; f++) { - dinfo = pci_read_device(pcib, domain, busno, s, f, + pcifunchigh = PCIB_MAXFUNCS(pcib); + for (f = first_func; f <= pcifunchigh; f++) + pci_identify_function(pcib, dev, domain, busno, s, f, dinfo_size); - if (dinfo != NULL) { - pci_add_child(dev, dinfo); - } - } + + /* For slots after slot 0 we need to check for function 0. */ + first_func = 0; } #undef REG } @@ -4877,3 +4915,10 @@ pci_restore_state(device_t dev) dinfo = device_get_ivars(dev); pci_cfg_restore(dev, dinfo); } + +static uint16_t +pci_get_rid_method(device_t dev, device_t child) +{ + + return (PCIB_GET_RID(device_get_parent(dev), child)); +} Modified: stable/10/sys/dev/pci/pci_if.m ============================================================================== --- stable/10/sys/dev/pci/pci_if.m Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pci_if.m Sun Mar 1 04:22:06 2015 (r279470) @@ -159,3 +159,9 @@ METHOD int msix_count { device_t dev; device_t child; } DEFAULT null_msi_count; + +METHOD uint16_t get_rid { + device_t dev; + device_t child; +}; + Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pci_pci.c Sun Mar 1 04:22:06 2015 (r279470) @@ -56,6 +56,14 @@ static int pcib_suspend(device_t dev); static int pcib_resume(device_t dev); static int pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate); +static uint16_t pcib_ari_get_rid(device_t pcib, device_t dev); +static uint32_t pcib_read_config(device_t dev, u_int b, u_int s, + u_int f, u_int reg, int width); +static void pcib_write_config(device_t dev, u_int b, u_int s, + u_int f, u_int reg, uint32_t val, int width); +static int pcib_ari_maxslots(device_t dev); +static int pcib_ari_maxfuncs(device_t dev); +static int pcib_try_enable_ari(device_t pcib, device_t dev); static device_method_t pcib_methods[] = { /* Device interface */ @@ -83,7 +91,8 @@ static device_method_t pcib_methods[] = DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), + DEVMETHOD(pcib_maxslots, pcib_ari_maxslots), + DEVMETHOD(pcib_maxfuncs, pcib_ari_maxfuncs), DEVMETHOD(pcib_read_config, pcib_read_config), DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, pcib_route_interrupt), @@ -93,6 +102,8 @@ static device_method_t pcib_methods[] = DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, pcib_map_msi), DEVMETHOD(pcib_power_for_sleep, pcib_power_for_sleep), + DEVMETHOD(pcib_get_rid, pcib_ari_get_rid), + DEVMETHOD(pcib_try_enable_ari, pcib_try_enable_ari), DEVMETHOD_END }; @@ -1630,27 +1641,94 @@ pcib_alloc_resource(device_t dev, device #endif /* + * If ARI is enabled on this downstream port, translate the function number + * to the non-ARI slot/function. The downstream port will convert it back in + * hardware. If ARI is not enabled slot and func are not modified. + */ +static __inline void +pcib_xlate_ari(device_t pcib, int bus, int *slot, int *func) +{ + struct pcib_softc *sc; + int ari_func; + + sc = device_get_softc(pcib); + ari_func = *func; + + if (sc->flags & PCIB_ENABLE_ARI) { + KASSERT(*slot == 0, + ("Non-zero slot number with ARI enabled!")); + *slot = PCIE_ARI_SLOT(ari_func); + *func = PCIE_ARI_FUNC(ari_func); + } +} + + +static void +pcib_enable_ari(struct pcib_softc *sc, uint32_t pcie_pos) +{ + uint32_t ctl2; + + ctl2 = pci_read_config(sc->dev, pcie_pos + PCIER_DEVICE_CTL2, 4); + ctl2 |= PCIEM_CTL2_ARI; + pci_write_config(sc->dev, pcie_pos + PCIER_DEVICE_CTL2, ctl2, 4); + + sc->flags |= PCIB_ENABLE_ARI; +} + +/* * PCIB interface. */ int pcib_maxslots(device_t dev) { - return(PCI_SLOTMAX); + return (PCI_SLOTMAX); +} + +static int +pcib_ari_maxslots(device_t dev) +{ + struct pcib_softc *sc; + + sc = device_get_softc(dev); + + if (sc->flags & PCIB_ENABLE_ARI) + return (PCIE_ARI_SLOTMAX); + else + return (PCI_SLOTMAX); +} + +static int +pcib_ari_maxfuncs(device_t dev) +{ + struct pcib_softc *sc; + + sc = device_get_softc(dev); + + if (sc->flags & PCIB_ENABLE_ARI) + return (PCIE_ARI_FUNCMAX); + else + return (PCI_FUNCMAX); } /* * Since we are a child of a PCI bus, its parent must support the pcib interface. */ -uint32_t +static uint32_t pcib_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width) { - return(PCIB_READ_CONFIG(device_get_parent(device_get_parent(dev)), b, s, f, reg, width)); + + pcib_xlate_ari(dev, b, &s, &f); + return(PCIB_READ_CONFIG(device_get_parent(device_get_parent(dev)), b, s, + f, reg, width)); } -void +static void pcib_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, uint32_t val, int width) { - PCIB_WRITE_CONFIG(device_get_parent(device_get_parent(dev)), b, s, f, reg, val, width); + + pcib_xlate_ari(dev, b, &s, &f); + PCIB_WRITE_CONFIG(device_get_parent(device_get_parent(dev)), b, s, f, + reg, val, width); } /* @@ -1762,3 +1840,83 @@ pcib_power_for_sleep(device_t pcib, devi bus = device_get_parent(pcib); return (PCIB_POWER_FOR_SLEEP(bus, dev, pstate)); } + +static uint16_t +pcib_ari_get_rid(device_t pcib, device_t dev) +{ + struct pcib_softc *sc; + uint8_t bus, slot, func; + + sc = device_get_softc(pcib); + + if (sc->flags & PCIB_ENABLE_ARI) { + bus = pci_get_bus(dev); + func = pci_get_function(dev); + + return (PCI_ARI_RID(bus, func)); + } else { + bus = pci_get_bus(dev); + slot = pci_get_slot(dev); + func = pci_get_function(dev); + + return (PCI_RID(bus, slot, func)); + } +} + +/* + * Check that the downstream port (pcib) and the endpoint device (dev) both + * support ARI. If so, enable it and return 0, otherwise return an error. + */ +static int +pcib_try_enable_ari(device_t pcib, device_t dev) +{ + struct pcib_softc *sc; + int error; + uint32_t cap2; + int ari_cap_off; + uint32_t ari_ver; + uint32_t pcie_pos; + + sc = device_get_softc(pcib); + + /* + * ARI is controlled in a register in the PCIe capability structure. + * If the downstream port does not have the PCIe capability structure + * then it does not support ARI. + */ + error = pci_find_cap(pcib, PCIY_EXPRESS, &pcie_pos); + if (error != 0) + return (ENODEV); + + /* Check that the PCIe port advertises ARI support. */ + cap2 = pci_read_config(pcib, pcie_pos + PCIER_DEVICE_CAP2, 4); + if (!(cap2 & PCIEM_CAP2_ARI)) + return (ENODEV); + + /* + * Check that the endpoint device advertises ARI support via the ARI + * extended capability structure. + */ + error = pci_find_extcap(dev, PCIZ_ARI, &ari_cap_off); + if (error != 0) + return (ENODEV); + + /* + * Finally, check that the endpoint device supports the same version + * of ARI that we do. + */ + ari_ver = pci_read_config(dev, ari_cap_off, 4); + if (PCI_EXTCAP_VER(ari_ver) != PCIB_SUPPORTED_ARI_VER) { + if (bootverbose) + device_printf(pcib, + "Unsupported version of ARI (%d) detected\n", + PCI_EXTCAP_VER(ari_ver)); + + return (ENXIO); + } + + pcib_enable_ari(sc, pcie_pos); + + return (0); +} + Modified: stable/10/sys/dev/pci/pcib_if.m ============================================================================== --- stable/10/sys/dev/pci/pcib_if.m Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pcib_if.m Sun Mar 1 04:22:06 2015 (r279470) @@ -27,7 +27,9 @@ # #include +#include #include +#include INTERFACE pcib; @@ -47,6 +49,14 @@ METHOD int maxslots { }; # +# +# Return the number of functions on the attached PCI bus. +# +METHOD int maxfuncs { + device_t dev; +} DEFAULT pcib_maxfuncs; + +# # Read configuration space on the PCI bus. The bus, slot and func # arguments determine the device which is being read and the reg # argument is a byte offset into configuration space for that @@ -154,3 +164,21 @@ METHOD int power_for_sleep { device_t dev; int *pstate; }; + +# +# Return the PCI Routing Identifier (RID) for the device. +# +METHOD uint16_t get_rid { + device_t pcib; + device_t dev; +} DEFAULT pcib_get_rid; + +# +# Enable Alternative RID Interpretation if both the downstream port (pcib) +# and the endpoint device (dev) both support it. +# +METHOD int try_enable_ari { + device_t pcib; + device_t dev; +}; + Modified: stable/10/sys/dev/pci/pcib_private.h ============================================================================== --- stable/10/sys/dev/pci/pcib_private.h Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pcib_private.h Sun Mar 1 04:22:06 2015 (r279470) @@ -93,6 +93,7 @@ struct pcib_softc #define PCIB_SUBTRACTIVE 0x1 #define PCIB_DISABLE_MSI 0x2 #define PCIB_DISABLE_MSIX 0x4 +#define PCIB_ENABLE_ARI 0x8 uint16_t command; /* command register */ u_int domain; /* domain number */ u_int pribus; /* primary bus number */ @@ -115,6 +116,8 @@ struct pcib_softc uint8_t seclat; /* secondary bus latency timer */ }; +#define PCIB_SUPPORTED_ARI_VER 1 + typedef uint32_t pci_read_config_fn(int b, int s, int f, int reg, int width); #ifdef NEW_PCIB @@ -135,13 +138,13 @@ int pcib_release_resource(device_t dev, struct resource *r); #endif int pcib_maxslots(device_t dev); -uint32_t pcib_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width); -void pcib_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, uint32_t val, int width); +int pcib_maxfuncs(device_t dev); int pcib_route_interrupt(device_t pcib, device_t dev, int pin); int pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); int pcib_release_msi(device_t pcib, device_t dev, int count, int *irqs); int pcib_alloc_msix(device_t pcib, device_t dev, int *irq); int pcib_release_msix(device_t pcib, device_t dev, int irq); int pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); +uint16_t pcib_get_rid(device_t pcib, device_t dev); #endif Copied and modified: stable/10/sys/dev/pci/pcib_support.c (from r264007, head/sys/dev/pci/pcib_support.c) ============================================================================== --- head/sys/dev/pci/pcib_support.c Tue Apr 1 15:47:24 2014 (r264007, copy source) +++ stable/10/sys/dev/pci/pcib_support.c Sun Mar 1 04:22:06 2015 (r279470) @@ -1,5 +1,5 @@ /* - * Copyright (c) Sandvine Inc. All rights reserved. + * Copyright (c) 2014 Sandvine Inc. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" +int +pcib_maxfuncs(device_t dev) +{ + return (PCI_FUNCMAX); +} + uint16_t pcib_get_rid(device_t pcib, device_t dev) { Modified: stable/10/sys/dev/pci/pcireg.h ============================================================================== --- stable/10/sys/dev/pci/pcireg.h Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pcireg.h Sun Mar 1 04:22:06 2015 (r279470) @@ -48,6 +48,29 @@ #define PCIE_REGMAX 4095 /* highest supported config register addr. */ #define PCI_MAXHDRTYPE 2 +#define PCIE_ARI_SLOTMAX 0 +#define PCIE_ARI_FUNCMAX 255 + +#define PCI_RID_BUS_SHIFT 8 +#define PCI_RID_SLOT_SHIFT 3 +#define PCI_RID_FUNC_SHIFT 0 + +#define PCI_RID(bus, slot, func) \ + ((((bus) & PCI_BUSMAX) << PCI_RID_BUS_SHIFT) | \ + (((slot) & PCI_SLOTMAX) << PCI_RID_SLOT_SHIFT) | \ + (((func) & PCI_FUNCMAX) << PCI_RID_FUNC_SHIFT)) + +#define PCI_ARI_RID(bus, func) \ + ((((bus) & PCI_BUSMAX) << PCI_RID_BUS_SHIFT) | \ + (((func) & PCIE_ARI_FUNCMAX) << PCI_RID_FUNC_SHIFT)) + +#define PCI_RID2BUS(rid) (((rid) >> PCI_RID_BUS_SHIFT) & PCI_BUSMAX) +#define PCI_RID2SLOT(rid) (((rid) >> PCI_RID_SLOT_SHIFT) & PCI_SLOTMAX) +#define PCI_RID2FUNC(rid) (((rid) >> PCI_RID_FUNC_SHIFT) & PCI_FUNCMAX) + +#define PCIE_ARI_SLOT(func) (((func) >> PCI_RID_SLOT_SHIFT) & PCI_SLOTMAX) +#define PCIE_ARI_FUNC(func) (((func) >> PCI_RID_FUNC_SHIFT) & PCI_FUNCMAX) + /* PCI config header registers for all devices */ #define PCIR_DEVVENDOR 0x00 @@ -775,6 +798,7 @@ #define PCIEM_ROOT_STA_PME_STATUS 0x00010000 #define PCIEM_ROOT_STA_PME_PEND 0x00020000 #define PCIER_DEVICE_CAP2 0x24 +#define PCIEM_CAP2_ARI 0x20 #define PCIER_DEVICE_CTL2 0x28 #define PCIEM_CTL2_COMP_TIMEOUT_VAL 0x000f #define PCIEM_CTL2_COMP_TIMEOUT_DIS 0x0010 @@ -895,3 +919,4 @@ /* Serial Number definitions */ #define PCIR_SERIAL_LOW 0x04 #define PCIR_SERIAL_HIGH 0x08 + Modified: stable/10/sys/dev/pci/pcivar.h ============================================================================== --- stable/10/sys/dev/pci/pcivar.h Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/dev/pci/pcivar.h Sun Mar 1 04:22:06 2015 (r279470) @@ -482,6 +482,12 @@ pci_msix_count(device_t dev) return (PCI_MSIX_COUNT(device_get_parent(dev), dev)); } +static __inline uint16_t +pci_get_rid(device_t dev) +{ + return (PCI_GET_RID(device_get_parent(dev), dev)); +} + device_t pci_find_bsf(uint8_t, uint8_t, uint8_t); device_t pci_find_dbsf(uint32_t, uint8_t, uint8_t, uint8_t); device_t pci_find_device(uint16_t, uint16_t); Modified: stable/10/sys/x86/iommu/busdma_dmar.c ============================================================================== --- stable/10/sys/x86/iommu/busdma_dmar.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/x86/iommu/busdma_dmar.c Sun Mar 1 04:22:06 2015 (r279470) @@ -93,7 +93,7 @@ dmar_bus_dma_is_dev_disabled(int domain, * bounce mapping. */ static device_t -dmar_get_requester(device_t dev, int *bus, int *slot, int *func) +dmar_get_requester(device_t dev, uint16_t *rid) { devclass_t pci_class; device_t pci, pcib, requester; @@ -102,9 +102,7 @@ dmar_get_requester(device_t dev, int *bu pci_class = devclass_find("pci"); requester = dev; - *bus = pci_get_bus(dev); - *slot = pci_get_slot(dev); - *func = pci_get_function(dev); + *rid = pci_get_rid(dev); /* * Walk the bridge hierarchy from the target device to the @@ -161,8 +159,7 @@ dmar_get_requester(device_t dev, int *bu * same page tables for taken and * non-taken transactions. */ - *bus = pci_get_bus(dev); - *slot = *func = 0; + *rid = PCI_RID(pci_get_bus(dev), 0, 0); } else { /* * Neither the device nor the bridge @@ -171,9 +168,7 @@ dmar_get_requester(device_t dev, int *bu * will use the bridge's BSF as the * requester ID. */ - *bus = pci_get_bus(pcib); - *slot = pci_get_slot(pcib); - *func = pci_get_function(pcib); + *rid = pci_get_rid(pcib); } } /* @@ -193,9 +188,9 @@ dmar_instantiate_ctx(struct dmar_unit *d device_t requester; struct dmar_ctx *ctx; bool disabled; - int bus, slot, func; + uint16_t rid; - requester = dmar_get_requester(dev, &bus, &slot, &func); + requester = dmar_get_requester(dev, &rid); /* * If the user requested the IOMMU disabled for the device, we @@ -204,9 +199,10 @@ dmar_instantiate_ctx(struct dmar_unit *d * Instead provide the identity mapping for the device * context. */ - disabled = dmar_bus_dma_is_dev_disabled(pci_get_domain(dev), bus, - slot, func); - ctx = dmar_get_ctx(dmar, requester, bus, slot, func, disabled, rmrr); + disabled = dmar_bus_dma_is_dev_disabled(pci_get_domain(requester), + pci_get_bus(requester), pci_get_slot(requester), + pci_get_function(requester)); + ctx = dmar_get_ctx(dmar, requester, rid, disabled, rmrr); if (ctx == NULL) return (NULL); if (disabled) { Modified: stable/10/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 04:22:06 2015 (r279470) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static MALLOC_DEFINE(M_DMAR_CTX, "dmar_ctx", "Intel DMAR Context"); @@ -106,14 +107,14 @@ dmar_map_ctx_entry(struct dmar_ctx *ctx, { dmar_ctx_entry_t *ctxp; - ctxp = dmar_map_pgtbl(ctx->dmar->ctx_obj, 1 + ctx->bus, + ctxp = dmar_map_pgtbl(ctx->dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->rid), DMAR_PGF_NOALLOC | DMAR_PGF_WAITOK, sfp); - ctxp += ((ctx->slot & 0x1f) << 3) + (ctx->func & 0x7); + ctxp += ctx->rid & 0xff; return (ctxp); } static void -ctx_tag_init(struct dmar_ctx *ctx) +ctx_tag_init(struct dmar_ctx *ctx, device_t dev) { bus_addr_t maxaddr; @@ -127,6 +128,7 @@ ctx_tag_init(struct dmar_ctx *ctx) ctx->ctx_tag.common.nsegments = BUS_SPACE_UNRESTRICTED; ctx->ctx_tag.common.maxsegsz = maxaddr; ctx->ctx_tag.ctx = ctx; + ctx->ctx_tag.owner = dev; /* XXXKIB initialize tag further */ } @@ -139,7 +141,10 @@ ctx_id_entry_init(struct dmar_ctx *ctx, unit = ctx->dmar; KASSERT(ctxp->ctx1 == 0 && ctxp->ctx2 == 0, ("dmar%d: initialized ctx entry %d:%d:%d 0x%jx 0x%jx", - unit->unit, ctx->bus, ctx->slot, ctx->func, ctxp->ctx1, + unit->unit, pci_get_bus(ctx->ctx_tag.owner), + pci_get_slot(ctx->ctx_tag.owner), + pci_get_function(ctx->ctx_tag.owner), + ctxp->ctx1, ctxp->ctx2)); ctxp->ctx2 = DMAR_CTX2_DID(ctx->domain); ctxp->ctx2 |= ctx->awlvl; @@ -229,7 +234,7 @@ ctx_init_rmrr(struct dmar_ctx *ctx, devi } static struct dmar_ctx * -dmar_get_ctx_alloc(struct dmar_unit *dmar, int bus, int slot, int func) +dmar_get_ctx_alloc(struct dmar_unit *dmar, uint16_t rid) { struct dmar_ctx *ctx; @@ -239,9 +244,7 @@ dmar_get_ctx_alloc(struct dmar_unit *dma TASK_INIT(&ctx->unload_task, 0, dmar_ctx_unload_task, ctx); mtx_init(&ctx->lock, "dmarctx", NULL, MTX_DEF); ctx->dmar = dmar; - ctx->bus = bus; - ctx->slot = slot; - ctx->func = func; + ctx->rid = rid; return (ctx); } @@ -264,19 +267,22 @@ dmar_ctx_dtr(struct dmar_ctx *ctx, bool } struct dmar_ctx * -dmar_get_ctx(struct dmar_unit *dmar, device_t dev, int bus, int slot, int func, - bool id_mapped, bool rmrr_init) +dmar_get_ctx(struct dmar_unit *dmar, device_t dev, uint16_t rid, bool id_mapped, + bool rmrr_init) { struct dmar_ctx *ctx, *ctx1; dmar_ctx_entry_t *ctxp; struct sf_buf *sf; - int error, mgaw; + int bus, slot, func, error, mgaw; bool enable; + bus = pci_get_bus(dev); + slot = pci_get_slot(dev); + func = pci_get_function(dev); enable = false; TD_PREP_PINNED_ASSERT; DMAR_LOCK(dmar); - ctx = dmar_find_ctx_locked(dmar, bus, slot, func); + ctx = dmar_find_ctx_locked(dmar, rid); error = 0; if (ctx == NULL) { /* @@ -285,7 +291,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev */ DMAR_UNLOCK(dmar); dmar_ensure_ctx_page(dmar, bus); - ctx1 = dmar_get_ctx_alloc(dmar, bus, slot, func); + ctx1 = dmar_get_ctx_alloc(dmar, rid); if (id_mapped) { /* @@ -353,7 +359,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev * Recheck the contexts, other thread might have * already allocated needed one. */ - ctx = dmar_find_ctx_locked(dmar, bus, slot, func); + ctx = dmar_find_ctx_locked(dmar, rid); if (ctx == NULL) { ctx = ctx1; ctx->ctx_tag.owner = dev; @@ -365,7 +371,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev TD_PINNED_ASSERT; return (NULL); } - ctx_tag_init(ctx); + ctx_tag_init(ctx, dev); /* * This is the first activated context for the @@ -527,14 +533,14 @@ dmar_free_ctx(struct dmar_ctx *ctx) } struct dmar_ctx * -dmar_find_ctx_locked(struct dmar_unit *dmar, int bus, int slot, int func) +dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t rid) { struct dmar_ctx *ctx; DMAR_ASSERT_LOCKED(dmar); LIST_FOREACH(ctx, &dmar->contexts, link) { - if (ctx->bus == bus && ctx->slot == slot && ctx->func == func) + if (ctx->rid == rid) return (ctx); } return (NULL); Modified: stable/10/sys/x86/iommu/intel_dmar.h ============================================================================== --- stable/10/sys/x86/iommu/intel_dmar.h Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/x86/iommu/intel_dmar.h Sun Mar 1 04:22:06 2015 (r279470) @@ -74,9 +74,7 @@ RB_PROTOTYPE(dmar_gas_entries_tree, dmar #define DMAR_MAP_ENTRY_TM 0x8000 /* Transient */ struct dmar_ctx { - int bus; /* pci bus/slot/func */ - int slot; - int func; + uint16_t rid; /* pci RID */ int domain; /* DID */ int mgaw; /* Real max address width */ int agaw; /* Adjusted guest address width */ @@ -272,12 +270,11 @@ void ctx_free_pgtbl(struct dmar_ctx *ctx struct dmar_ctx *dmar_instantiate_ctx(struct dmar_unit *dmar, device_t dev, bool rmrr); -struct dmar_ctx *dmar_get_ctx(struct dmar_unit *dmar, device_t dev, - int bus, int slot, int func, bool id_mapped, bool rmrr_init); +struct dmar_ctx *dmar_get_ctx(struct dmar_unit *dmar, device_t dev, + uint16_t rid, bool id_mapped, bool rmrr_init); void dmar_free_ctx_locked(struct dmar_unit *dmar, struct dmar_ctx *ctx); void dmar_free_ctx(struct dmar_ctx *ctx); -struct dmar_ctx *dmar_find_ctx_locked(struct dmar_unit *dmar, int bus, - int slot, int func); +struct dmar_ctx *dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t rid); void dmar_ctx_unload_entry(struct dmar_map_entry *entry, bool free); void dmar_ctx_unload(struct dmar_ctx *ctx, struct dmar_map_entries_tailq *entries, bool cansleep); Modified: stable/10/sys/x86/iommu/intel_drv.c ============================================================================== --- stable/10/sys/x86/iommu/intel_drv.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/x86/iommu/intel_drv.c Sun Mar 1 04:22:06 2015 (r279470) @@ -1006,7 +1006,9 @@ dmar_print_ctx(struct dmar_ctx *ctx, boo db_printf( " @%p pci%d:%d:%d dom %d mgaw %d agaw %d pglvl %d end %jx\n" " refs %d flags %x pgobj %p map_ents %u loads %lu unloads %lu\n", - ctx, ctx->bus, ctx->slot, ctx->func, ctx->domain, ctx->mgaw, + ctx, pci_get_bus(ctx->ctx_tag.owner), + pci_get_slot(ctx->ctx_tag.owner), + pci_get_function(ctx->ctx_tag.owner), ctx->domain, ctx->mgaw, ctx->agaw, ctx->pglvl, (uintmax_t)ctx->end, ctx->refs, ctx->flags, ctx->pgtbl_obj, ctx->entries_cnt, ctx->loads, ctx->unloads); @@ -1079,8 +1081,10 @@ DB_FUNC(dmar_ctx, db_dmar_print_ctx, db_ for (i = 0; i < dmar_devcnt; i++) { unit = device_get_softc(dmar_devs[i]); LIST_FOREACH(ctx, &unit->contexts, link) { - if (domain == unit->segment && bus == ctx->bus && - device == ctx->slot && function == ctx->func) { + if (domain == unit->segment && + bus == pci_get_bus(ctx->ctx_tag.owner) && + device == pci_get_slot(ctx->ctx_tag.owner) && + function == pci_get_function(ctx->ctx_tag.owner)) { dmar_print_ctx(ctx, show_mappings); goto out; } Modified: stable/10/sys/x86/iommu/intel_fault.c ============================================================================== --- stable/10/sys/x86/iommu/intel_fault.c Sun Mar 1 02:45:46 2015 (r279469) +++ stable/10/sys/x86/iommu/intel_fault.c Sun Mar 1 04:22:06 2015 (r279470) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -203,19 +205,28 @@ dmar_fault_task(void *arg, int pending _ DMAR_FAULT_UNLOCK(unit); sid = DMAR_FRCD2_SID(fault_rec[1]); - bus = (sid >> 8) & 0xf; - slot = (sid >> 3) & 0x1f; - func = sid & 0x7; printf("DMAR%d: ", unit->unit); DMAR_LOCK(unit); - ctx = dmar_find_ctx_locked(unit, bus, slot, func); + ctx = dmar_find_ctx_locked(unit, sid); if (ctx == NULL) { printf(":"); + + /* + * Note that the slot and function will not be correct + * if ARI is in use, but without a ctx entry we have + * no way of knowing whether ARI is in use or not. + */ + bus = PCI_RID2BUS(sid); + slot = PCI_RID2SLOT(sid); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 04:26:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC6BE203; Sun, 1 Mar 2015 04:26:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C8F32B7A; Sun, 1 Mar 2015 04:26:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t214Qm1T000608; Sun, 1 Mar 2015 04:26:48 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t214Qm0d000607; Sun, 1 Mar 2015 04:26:48 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201503010426.t214Qm0d000607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sun, 1 Mar 2015 04:26: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: r279471 - stable/10/sys/dev/pci 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 04:26:49 -0000 Author: rstone Date: Sun Mar 1 04:26:47 2015 New Revision: 279471 URL: https://svnweb.freebsd.org/changeset/base/279471 Log: MFC r264091 Correct a PCI enumeration bug introduced in r264011 Ensure that first_func is set to 0 on every iteration of the PCI slot enumeration loop after the first. There is a continue statement that would cause first_func to stay at 1 any PCI device where slot 0 has no functions until we find a slot that does have a function. This would cause us to not enumerate the first PCI function on the device. Credit to markj@ for spotting the bug. X-MFC-With: r264011 Modified: stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Sun Mar 1 04:22:06 2015 (r279470) +++ stable/10/sys/dev/pci/pci.c Sun Mar 1 04:26:47 2015 (r279471) @@ -3344,7 +3344,7 @@ pci_add_children(device_t dev, int domai KASSERT(dinfo_size >= sizeof(struct pci_devinfo), ("dinfo_size too small")); maxslots = PCIB_MAXSLOTS(pcib); - for (s = 0; s <= maxslots; s++) { + for (s = 0; s <= maxslots; s++, first_func = 0) { pcifunchigh = 0; f = 0; DELAY(1); @@ -3356,9 +3356,6 @@ pci_add_children(device_t dev, int domai for (f = first_func; f <= pcifunchigh; f++) pci_identify_function(pcib, dev, domain, busno, s, f, dinfo_size); - - /* For slots after slot 0 we need to check for function 0. */ - first_func = 0; } #undef REG } From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 04:28:31 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80981346; Sun, 1 Mar 2015 04:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6C76EB88; Sun, 1 Mar 2015 04:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t214SVnO000876; Sun, 1 Mar 2015 04:28:31 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t214SVwB000871; Sun, 1 Mar 2015 04:28:31 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201503010428.t214SVwB000871@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sun, 1 Mar 2015 04:28:31 +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: r279472 - stable/10/sys/dev/pci 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 04:28:31 -0000 Author: rstone Date: Sun Mar 1 04:28:30 2015 New Revision: 279472 URL: https://svnweb.freebsd.org/changeset/base/279472 Log: MFC r265107 Be consistent with the whitespace in the rest of these files. X-MFC-With: r264007 Modified: stable/10/sys/dev/pci/pci_if.m stable/10/sys/dev/pci/pcib_if.m Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci_if.m ============================================================================== --- stable/10/sys/dev/pci/pci_if.m Sun Mar 1 04:26:47 2015 (r279471) +++ stable/10/sys/dev/pci/pci_if.m Sun Mar 1 04:28:30 2015 (r279472) @@ -161,7 +161,7 @@ METHOD int msix_count { } DEFAULT null_msi_count; METHOD uint16_t get_rid { - device_t dev; - device_t child; + device_t dev; + device_t child; }; Modified: stable/10/sys/dev/pci/pcib_if.m ============================================================================== --- stable/10/sys/dev/pci/pcib_if.m Sun Mar 1 04:26:47 2015 (r279471) +++ stable/10/sys/dev/pci/pcib_if.m Sun Mar 1 04:28:30 2015 (r279472) @@ -169,8 +169,8 @@ METHOD int power_for_sleep { # Return the PCI Routing Identifier (RID) for the device. # METHOD uint16_t get_rid { - device_t pcib; - device_t dev; + device_t pcib; + device_t dev; } DEFAULT pcib_get_rid; # From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 04:30:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAFB5491; Sun, 1 Mar 2015 04:30:47 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2D64C24; Sun, 1 Mar 2015 04:30:47 +0000 (UTC) Received: by igbhl2 with SMTP id hl2so9765433igb.3; Sat, 28 Feb 2015 20:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LEk3XyIgVCGhjBJs2eJ5NJDmAZrXWkvD1XKwejLQu1Y=; b=DffVUtzeyVZu2aKL2GJhTgZn8qbfy0Nj+5FspEY6exxgnXE0tn9LSWM17q7fk+TYfM UD7e2olweo0AUlFJu2HYUbs9Y8DncmAVYAA2JNcoxH+lLRTFv8qGAi41qO/2D+ya5j+g gUU0eYpH0d7QMz15J73fXAw14v5TvazfHwwcEHKCZE7Zv/CtrSyZrcEubLSwrqTt7BlA PWib9mh/hTvkAXw0byLEwy+SAhawTm40xo7F6KGThCstijuBdlnZrhi6Lzw8R0Sqyr3D XWbEzYKyA81uZAIogZv7xvHDQAiPxppPlNIW8KDbgqHh97o5qa0PPgkKEyVSyPUGHQD6 A3wQ== MIME-Version: 1.0 X-Received: by 10.42.150.130 with SMTP id a2mr24181580icw.69.1425184246917; Sat, 28 Feb 2015 20:30:46 -0800 (PST) Received: by 10.107.156.75 with HTTP; Sat, 28 Feb 2015 20:30:46 -0800 (PST) In-Reply-To: <201503010426.t214Qm0d000607@svn.freebsd.org> References: <201503010426.t214Qm0d000607@svn.freebsd.org> Date: Sat, 28 Feb 2015 23:30:46 -0500 Message-ID: Subject: Re: svn commit: r279471 - stable/10/sys/dev/pci From: Ryan Stone To: Ryan Stone Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 04:30:48 -0000 On Sat, Feb 28, 2015 at 11:26 PM, Ryan Stone wrote: > Author: rstone > Date: Sun Mar 1 04:26:47 2015 > New Revision: 279471 > URL: https://svnweb.freebsd.org/changeset/base/279471 > > Log: > MFC r264091 > > Correct a PCI enumeration bug introduced in r264011 > > Ensure that first_func is set to 0 on every iteration of the PCI slot > enumeration loop after the first. There is a continue statement that would > cause first_func to stay at 1 any PCI device where slot 0 has no functions > until we find a slot that does have a function. This would cause us to > not enumerate the first PCI function on the device. > > Credit to markj@ for spotting the bug. > > X-MFC-With: r264011 So I didn't get an MFC notice for this one (and I very nearly forgot to MFC it, which would have been fairly disastrous for somebody :( ). Is my understanding of the X-MFC-With: tag incorrect? I thought that setting it would cause me to get a reminder at the same time as r264011 From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 04:36:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFB9D621; Sun, 1 Mar 2015 04:36:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 81A77C54; Sun, 1 Mar 2015 04:36:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t214aLeO005485; Sun, 1 Mar 2015 04:36:21 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t214aLHb005484; Sun, 1 Mar 2015 04:36:21 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201503010436.t214aLHb005484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sun, 1 Mar 2015 04:36:21 +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: r279473 - stable/10/usr.bin/systat 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 04:36:21 -0000 Author: rstone Date: Sun Mar 1 04:36:20 2015 New Revision: 279473 URL: https://svnweb.freebsd.org/changeset/base/279473 Log: MFC r272284 Fix integer truncation in affecting systat -ifstat The "systat -ifstat" command was using a u_int to store byte counters. With a 10Gbps or faster interface, this overflows within the default 5 second refresh period. Switch to using a uint64_t across the board, which matches the size used for all counters as of r263102. PR: 182448 MFC after: 1 week Sponsored by: Sandvine Inc Modified: stable/10/usr.bin/systat/ifstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/systat/ifstat.c ============================================================================== --- stable/10/usr.bin/systat/ifstat.c Sun Mar 1 04:28:30 2015 (r279472) +++ stable/10/usr.bin/systat/ifstat.c Sun Mar 1 04:36:20 2015 (r279473) @@ -68,14 +68,14 @@ struct if_stat { struct ifmibdata if_mib; struct timeval tv; struct timeval tv_lastchanged; - u_long if_in_curtraffic; - u_long if_out_curtraffic; - u_long if_in_traffic_peak; - u_long if_out_traffic_peak; - u_long if_in_curpps; - u_long if_out_curpps; - u_long if_in_pps_peak; - u_long if_out_pps_peak; + uint64_t if_in_curtraffic; + uint64_t if_out_curtraffic; + uint64_t if_in_traffic_peak; + uint64_t if_out_traffic_peak; + uint64_t if_in_curpps; + uint64_t if_out_curpps; + uint64_t if_in_pps_peak; + uint64_t if_out_pps_peak; u_int if_row; /* Index into ifmib sysctl */ u_int if_ypos; /* 0 if not being displayed */ u_int display; @@ -263,8 +263,8 @@ fetchifstat(void) struct if_stat *ifp = NULL; struct timeval tv, new_tv, old_tv; double elapsed = 0.0; - u_int new_inb, new_outb, old_inb, old_outb = 0; - u_int new_inp, new_outp, old_inp, old_outp = 0; + uint64_t new_inb, new_outb, old_inb, old_outb = 0; + uint64_t new_inp, new_outp, old_inp, old_outp = 0; SLIST_FOREACH(ifp, &curlist, link) { /* From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 04:39:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECA94772; Sun, 1 Mar 2015 04:39:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D911BC6D; Sun, 1 Mar 2015 04:39:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t214d8ma005865; Sun, 1 Mar 2015 04:39:08 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t214d8Ju005864; Sun, 1 Mar 2015 04:39:08 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201503010439.t214d8Ju005864@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sun, 1 Mar 2015 04:39: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: r279474 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 04:39:09 -0000 Author: rstone Date: Sun Mar 1 04:39:07 2015 New Revision: 279474 URL: https://svnweb.freebsd.org/changeset/base/279474 Log: MFC r277649: vmspace_release() may sleep if the last reference is being released, so add a WITNESS_WARN() to catch cases where it is called with a non-sleepable lock held. MFC after: 1 month Sponsored by: Sandvine Inc. Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sun Mar 1 04:36:20 2015 (r279473) +++ stable/10/sys/vm/vm_map.c Sun Mar 1 04:39:07 2015 (r279474) @@ -342,6 +342,9 @@ void vmspace_free(struct vmspace *vm) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "vmspace_free() called with non-sleepable lock held"); + if (vm->vm_refcnt == 0) panic("vmspace_free: attempt to free already freed vmspace"); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 05:25:41 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9CFD1D10; Sun, 1 Mar 2015 05:25:41 +0000 (UTC) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71BA79EA; Sun, 1 Mar 2015 05:25:41 +0000 (UTC) Received: by pdbft15 with SMTP id ft15so8749796pdb.11; Sat, 28 Feb 2015 21:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=UiaVok6ujR4r9YUWFjFuaQjuUyX7qryBmdeVrgLb2vI=; b=oxaylL7JxPRCO/s7HnY/Pc68gUz7OHY3fITiSoBgCKUyaGP8yR2UHYMEt8JmwENojZ Cg5rpjGcEhF9p9BwdI5LzYR4n6Wjhn5g0aCj959vR3fyN3Vec0CMv4r7P5dbFQzIXm4Y oB1jZLgD6bOxUJkXV9g9kNx/8CG5dWRMYfGuQStGETJP4XiQecjrwr63aG2cRbUUvg3N GXbOz4C81z8k7+/od7ZghxW0mekrXsQmWjrVvsB3A5ASBH98YCFWILvaLeC7Mjmbzg/a LFs9+lCqMDZH+v1om3XrKMOSV5UogALEftQVG1L18s76WYGYiBG17gaPk3X3fP/YxDmj wyeQ== X-Received: by 10.70.134.163 with SMTP id pl3mr36446498pdb.45.1425187541004; Sat, 28 Feb 2015 21:25:41 -0800 (PST) Received: from [192.168.1.69] (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id f8sm8212275pdm.68.2015.02.28.21.25.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Feb 2015 21:25:39 -0800 (PST) Sender: Justin Hibbits Message-ID: <54F2A2D0.8060604@freebsd.org> Date: Sat, 28 Feb 2015 21:25:36 -0800 From: Justin Hibbits User-Agent: Mozilla/5.0 (X11; FreeBSD powerpc; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ryan Stone , Ryan Stone Subject: Re: svn commit: r279471 - stable/10/sys/dev/pci References: <201503010426.t214Qm0d000607@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 05:25:41 -0000 On 02/28/15 20:30, Ryan Stone wrote: > So I didn't get an MFC notice for this one (and I very nearly forgot > to MFC it, which would have been fairly disastrous for somebody :( ). > Is my understanding of the X-MFC-With: tag incorrect? I thought that > setting it would cause me to get a reminder at the same time as > r264011 > I think that's just a note to yourself. I've never gotten a notice when I use that, I just have to remember. - Justin From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 09:28:40 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2252FEA; Sun, 1 Mar 2015 09:28:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DCE7D670; Sun, 1 Mar 2015 09:28:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t219SdCv039940; Sun, 1 Mar 2015 09:28:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t219Sdxa039939; Sun, 1 Mar 2015 09:28:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503010928.t219Sdxa039939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 1 Mar 2015 09:28: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: r279481 - stable/10/usr.sbin/ctld 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 09:28:40 -0000 Author: mav Date: Sun Mar 1 09:28:39 2015 New Revision: 279481 URL: https://svnweb.freebsd.org/changeset/base/279481 Log: MFC r279277: Fix memory leak on incorrect initiator portal. Submitted by: Dmitry Luhtionov Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Sun Mar 1 07:00:34 2015 (r279480) +++ stable/10/usr.sbin/ctld/ctld.c Sun Mar 1 09:28:39 2015 (r279481) @@ -400,6 +400,7 @@ auth_portal_new(struct auth_group *ag, c return (ap); error: + free(ap); log_errx(1, "Incorrect initiator portal '%s'", portal); return (NULL); } From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 09:30:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B3911A2; Sun, 1 Mar 2015 09:30:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 75D3C67A; Sun, 1 Mar 2015 09:30:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t219U0RF040227; Sun, 1 Mar 2015 09:30:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t219U0iQ040226; Sun, 1 Mar 2015 09:30:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503010930.t219U0iQ040226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 1 Mar 2015 09:30:00 +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: r279482 - stable/10/usr.sbin/ctld 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 09:30:00 -0000 Author: mav Date: Sun Mar 1 09:29:59 2015 New Revision: 279482 URL: https://svnweb.freebsd.org/changeset/base/279482 Log: MFC r279276: Add checks for malloc() failures. Submitted by: Dmitry Luhtionov Modified: stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Sun Mar 1 09:28:39 2015 (r279481) +++ stable/10/usr.sbin/ctld/kernel.c Sun Mar 1 09:29:59 2015 (r279482) @@ -864,7 +864,10 @@ kernel_port_add(struct port *port) bzero(&req, sizeof(req)); strlcpy(req.driver, "iscsi", sizeof(req.driver)); req.reqtype = CTL_REQ_CREATE; + req.num_args = 5; req.args = malloc(req.num_args * sizeof(*req.args)); + if (req.args == NULL) + log_err(1, "malloc"); n = 0; req.args[n].namelen = sizeof("port_id"); req.args[n].name = __DECONST(char *, "port_id"); @@ -978,6 +981,8 @@ kernel_port_remove(struct port *port) req.reqtype = CTL_REQ_REMOVE; req.num_args = 2; req.args = malloc(req.num_args * sizeof(*req.args)); + if (req.args == NULL) + log_err(1, "malloc"); str_arg(&req.args[0], "cfiscsi_target", targ->t_name); snprintf(tagstr, sizeof(tagstr), "%d", pg->pg_tag); str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 10:29:49 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E5494F; Sun, 1 Mar 2015 10:29:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1254FC3D; Sun, 1 Mar 2015 10:29:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21ATm2X069418; Sun, 1 Mar 2015 10:29:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21ATmoE069417; Sun, 1 Mar 2015 10:29:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503011029.t21ATmoE069417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 1 Mar 2015 10:29: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: r279484 - stable/10/sys/x86/iommu 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 10:29:49 -0000 Author: kib Date: Sun Mar 1 10:29:48 2015 New Revision: 279484 URL: https://svnweb.freebsd.org/changeset/base/279484 Log: MFC r276867: Fix DMAR context allocations for the devices behind PCIe->PCI bridges after dmar driver was converted to use rids. The bus component to calculate context page must be taken from the requestor rid, which is a bridge, and not from the device bus number. Modified: stable/10/sys/x86/iommu/intel_ctx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:04:14 2015 (r279483) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:29:48 2015 (r279484) @@ -290,7 +290,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev * higher chance to succeed if the sleep is allowed. */ DMAR_UNLOCK(dmar); - dmar_ensure_ctx_page(dmar, bus); + dmar_ensure_ctx_page(dmar, PCI_RID2BUS(rid)); ctx1 = dmar_get_ctx_alloc(dmar, rid); if (id_mapped) { From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 10:35:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C25BFAB3; Sun, 1 Mar 2015 10:35:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 9350DCE9; Sun, 1 Mar 2015 10:35:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21AZt7p073937; Sun, 1 Mar 2015 10:35:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21AZsk8073934; Sun, 1 Mar 2015 10:35:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503011035.t21AZsk8073934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 1 Mar 2015 10:35: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: r279485 - stable/10/sys/x86/iommu 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 10:35:55 -0000 Author: kib Date: Sun Mar 1 10:35:54 2015 New Revision: 279485 URL: https://svnweb.freebsd.org/changeset/base/279485 Log: MFC r276948: Print rid when announcing DMAR context creation. Print sid when fault occurs. Modified: stable/10/sys/x86/iommu/intel_ctx.c stable/10/sys/x86/iommu/intel_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:29:48 2015 (r279484) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:35:54 2015 (r279485) @@ -383,10 +383,10 @@ dmar_get_ctx(struct dmar_unit *dmar, dev LIST_INSERT_HEAD(&dmar->contexts, ctx, link); ctx_id_entry_init(ctx, ctxp); device_printf(dev, - "dmar%d pci%d:%d:%d:%d domain %d mgaw %d " + "dmar%d pci%d:%d:%d:%d rid %x domain %d mgaw %d " "agaw %d %s-mapped\n", dmar->unit, dmar->segment, bus, slot, - func, ctx->domain, ctx->mgaw, ctx->agaw, + func, rid, ctx->domain, ctx->mgaw, ctx->agaw, id_mapped ? "id" : "re"); } else { dmar_ctx_dtr(ctx1, true, true); Modified: stable/10/sys/x86/iommu/intel_fault.c ============================================================================== --- stable/10/sys/x86/iommu/intel_fault.c Sun Mar 1 10:29:48 2015 (r279484) +++ stable/10/sys/x86/iommu/intel_fault.c Sun Mar 1 10:35:54 2015 (r279485) @@ -230,8 +230,9 @@ dmar_fault_task(void *arg, int pending _ } DMAR_UNLOCK(unit); printf( - "pci%d:%d:%d fault acc %x adt 0x%x reason 0x%x addr %jx\n", - bus, slot, func, DMAR_FRCD2_T(fault_rec[1]), + "pci%d:%d:%d sid %x fault acc %x adt 0x%x reason 0x%x " + "addr %jx\n", + bus, slot, func, sid, DMAR_FRCD2_T(fault_rec[1]), DMAR_FRCD2_AT(fault_rec[1]), DMAR_FRCD2_FR(fault_rec[1]), (uintmax_t)fault_rec[0]); DMAR_FAULT_LOCK(unit); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 10:39:20 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78CF7C08; Sun, 1 Mar 2015 10:39:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 62F1DD0B; Sun, 1 Mar 2015 10:39:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21AdJUn074564; Sun, 1 Mar 2015 10:39:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21AdJ15074563; Sun, 1 Mar 2015 10:39:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503011039.t21AdJ15074563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 1 Mar 2015 10:39: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: r279486 - stable/10/sys/x86/iommu 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 10:39:20 -0000 Author: kib Date: Sun Mar 1 10:39:19 2015 New Revision: 279486 URL: https://svnweb.freebsd.org/changeset/base/279486 Log: MFC r276949: (only to ease merging of r279117). MFC r279117: Revert r276949 and redo the fix for PCIe/PCI bridges, which do not follow specification and do not provide PCIe capability. Modified: stable/10/sys/x86/iommu/busdma_dmar.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/busdma_dmar.c ============================================================================== --- stable/10/sys/x86/iommu/busdma_dmar.c Sun Mar 1 10:35:54 2015 (r279485) +++ stable/10/sys/x86/iommu/busdma_dmar.c Sun Mar 1 10:39:19 2015 (r279486) @@ -96,11 +96,13 @@ static device_t dmar_get_requester(device_t dev, uint16_t *rid) { devclass_t pci_class; - device_t pci, pcib, requester; + device_t l, pci, pcib, pcip, pcibp, requester; int cap_offset; + uint16_t pcie_flags; + bool bridge_is_pcie; pci_class = devclass_find("pci"); - requester = dev; + l = requester = dev; *rid = pci_get_rid(dev); @@ -110,19 +112,17 @@ dmar_get_requester(device_t dev, uint16_ * unit. */ for (;;) { - pci = device_get_parent(dev); - KASSERT(pci != NULL, ("NULL parent for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + pci = device_get_parent(l); + KASSERT(pci != NULL, ("dmar_get_requester(%s): NULL parent " + "for %s", device_get_name(dev), device_get_name(l))); KASSERT(device_get_devclass(pci) == pci_class, - ("Non-pci parent for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + ("dmar_get_requester(%s): non-pci parent %s for %s", + device_get_name(dev), device_get_name(pci), + device_get_name(l))); pcib = device_get_parent(pci); - KASSERT(pcib != NULL, ("NULL bridge for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + KASSERT(pcib != NULL, ("dmar_get_requester(%s): NULL bridge " + "for %s", device_get_name(dev), device_get_name(pci))); /* * The parent of our "bridge" isn't another PCI bus, @@ -130,19 +130,46 @@ dmar_get_requester(device_t dev, uint16_ * port, and the requester ID won't be translated * further. */ - if (device_get_devclass(device_get_parent(pcib)) != pci_class) + pcip = device_get_parent(pcib); + if (device_get_devclass(pcip) != pci_class) break; + pcibp = device_get_parent(pcip); - if (pci_find_cap(dev, PCIY_EXPRESS, &cap_offset) != 0) { + if (pci_find_cap(l, PCIY_EXPRESS, &cap_offset) == 0) { + /* + * Do not stop the loop even if the target + * device is PCIe, because it is possible (but + * unlikely) to have a PCI->PCIe bridge + * somewhere in the hierarchy. + */ + l = pcib; + } else { /* * Device is not PCIe, it cannot be seen as a - * requester by DMAR unit. + * requester by DMAR unit. Check whether the + * bridge is PCIe. */ + bridge_is_pcie = pci_find_cap(pcib, PCIY_EXPRESS, + &cap_offset) == 0; requester = pcib; - /* Check whether the bus above is PCIe. */ - if (pci_find_cap(pcib, PCIY_EXPRESS, - &cap_offset) == 0) { + /* + * Check for a buggy PCIe/PCI bridge that + * doesn't report the express capability. If + * the bridge above it is express but isn't a + * PCI bridge, then we know pcib is actually a + * PCIe/PCI bridge. + */ + if (!bridge_is_pcie && pci_find_cap(pcibp, + PCIY_EXPRESS, &cap_offset) == 0) { + pcie_flags = pci_read_config(pcibp, + cap_offset + PCIER_FLAGS, 2); + if ((pcie_flags & PCIEM_FLAGS_TYPE) != + PCIEM_TYPE_PCI_BRIDGE) + bridge_is_pcie = true; + } + + if (bridge_is_pcie) { /* * The current device is not PCIe, but * the bridge above it is. This is a @@ -159,7 +186,8 @@ dmar_get_requester(device_t dev, uint16_ * same page tables for taken and * non-taken transactions. */ - *rid = PCI_RID(pci_get_bus(dev), 0, 0); + *rid = PCI_RID(pci_get_bus(l), 0, 0); + l = pcibp; } else { /* * Neither the device nor the bridge @@ -169,15 +197,9 @@ dmar_get_requester(device_t dev, uint16_ * requester ID. */ *rid = pci_get_rid(pcib); + l = pcib; } } - /* - * Do not stop the loop even if the target device is - * PCIe, because it is possible (but unlikely) to have - * a PCI->PCIe bridge somewhere in the hierarchy. - */ - - dev = pcib; } return (requester); } From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 21:03:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 356CFF0C; Sun, 1 Mar 2015 21:03:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1FA573F3; Sun, 1 Mar 2015 21:03:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21L3YC9075608; Sun, 1 Mar 2015 21:03:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21L3YEl075607; Sun, 1 Mar 2015 21:03:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503012103.t21L3YEl075607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Mar 2015 21:03:34 +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: r279495 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 21:03:35 -0000 Author: ngie Date: Sun Mar 1 21:03:34 2015 New Revision: 279495 URL: https://svnweb.freebsd.org/changeset/base/279495 Log: MFC r278891: Add the mnt_lockref field to the ddb(4) 'show mount' command Differential Revision: https://reviews.freebsd.org/D1688 Submitted by: Conrad Meyer Sponsored by: EMC / Isilon Storage Division 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 Sun Mar 1 20:54:29 2015 (r279494) +++ stable/10/sys/kern/vfs_subr.c Sun Mar 1 21:03:34 2015 (r279495) @@ -3182,6 +3182,7 @@ DB_SHOW_COMMAND(mount, db_show_mount) db_printf(" mnt_maxsymlinklen = %d\n", mp->mnt_maxsymlinklen); db_printf(" mnt_iosize_max = %d\n", mp->mnt_iosize_max); db_printf(" mnt_hashseed = %u\n", mp->mnt_hashseed); + db_printf(" mnt_lockref = %d\n", mp->mnt_lockref); db_printf(" mnt_secondary_writes = %d\n", mp->mnt_secondary_writes); db_printf(" mnt_secondary_accwrites = %d\n", mp->mnt_secondary_accwrites); From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 21:22:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6602A46B; Sun, 1 Mar 2015 21:22:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5075E7E1; Sun, 1 Mar 2015 21:22:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21LMZCj085224; Sun, 1 Mar 2015 21:22:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21LMYi2085221; Sun, 1 Mar 2015 21:22:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503012122.t21LMYi2085221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Mar 2015 21:22:34 +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: r279497 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 21:22:35 -0000 Author: ngie Date: Sun Mar 1 21:22:34 2015 New Revision: 279497 URL: https://svnweb.freebsd.org/changeset/base/279497 Log: Unbreak rcorUnbreak rcorder when MK_UTX == no by moving utx from REQUIRE: in LOGIN to BEFORE: in utx Modified: stable/10/etc/rc.d/LOGIN stable/10/etc/rc.d/utx Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/LOGIN ============================================================================== --- stable/10/etc/rc.d/LOGIN Sun Mar 1 21:20:18 2015 (r279496) +++ stable/10/etc/rc.d/LOGIN Sun Mar 1 21:22:34 2015 (r279497) @@ -4,7 +4,7 @@ # # PROVIDE: LOGIN -# REQUIRE: DAEMON utx +# REQUIRE: DAEMON # This is a dummy dependency to ensure user services such as xdm, # inetd, cron and kerberos are started after everything else, in case Modified: stable/10/etc/rc.d/utx ============================================================================== --- stable/10/etc/rc.d/utx Sun Mar 1 21:20:18 2015 (r279496) +++ stable/10/etc/rc.d/utx Sun Mar 1 21:22:34 2015 (r279497) @@ -5,6 +5,7 @@ # PROVIDE: utx # REQUIRE: DAEMON FILESYSTEMS +# BEFORE: LOGIN # KEYWORD: shutdown . /etc/rc.subr From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 21:24:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17C496DD; Sun, 1 Mar 2015 21:24:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 01DB17F6; Sun, 1 Mar 2015 21:24:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21LOKSm085571; Sun, 1 Mar 2015 21:24:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21LOKmP085569; Sun, 1 Mar 2015 21:24:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503012124.t21LOKmP085569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Mar 2015 21:24:20 +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: r279499 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 21:24:21 -0000 Author: ngie Date: Sun Mar 1 21:24:19 2015 New Revision: 279499 URL: https://svnweb.freebsd.org/changeset/base/279499 Log: MFC r278704: Unbreak rcorder when MK_UNBOUND == no by moving local_unbound from REQUIRE: in NETWORKING to BEFORE: in the script Modified: stable/10/etc/rc.d/NETWORKING stable/10/etc/rc.d/local_unbound Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/NETWORKING ============================================================================== --- stable/10/etc/rc.d/NETWORKING Sun Mar 1 21:23:23 2015 (r279498) +++ stable/10/etc/rc.d/NETWORKING Sun Mar 1 21:24:19 2015 (r279499) @@ -6,7 +6,7 @@ # PROVIDE: NETWORKING NETWORK # REQUIRE: netif netoptions routing ppp ipfw stf faith # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge -# REQUIRE: static_arp static_ndp local_unbound +# REQUIRE: static_arp static_ndp # This is a dummy dependency, for services which require networking # to be operational before starting. Modified: stable/10/etc/rc.d/local_unbound ============================================================================== --- stable/10/etc/rc.d/local_unbound Sun Mar 1 21:23:23 2015 (r279498) +++ stable/10/etc/rc.d/local_unbound Sun Mar 1 21:24:19 2015 (r279499) @@ -5,6 +5,7 @@ # PROVIDE: local_unbound # REQUIRE: FILESYSTEMS netif resolv +# BEFORE: NETWORKING # KEYWORD: shutdown . /etc/rc.subr From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 22:03:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 844D9595; Sun, 1 Mar 2015 22:03:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6CBDDBCA; Sun, 1 Mar 2015 22:03:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21M3vxF004843; Sun, 1 Mar 2015 22:03:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21M3rwL004826; Sun, 1 Mar 2015 22:03:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503012203.t21M3rwL004826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Mar 2015 22:03:53 +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: r279505 - in stable/10: etc libexec share/mk tools/build/options usr.bin usr.sbin 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 22:03:57 -0000 Author: ngie Date: Sun Mar 1 22:03:52 2015 New Revision: 279505 URL: https://svnweb.freebsd.org/changeset/base/279505 Log: MFC r278192: Add the following options to enable/disable several features in the base system WITHOUT_BOOTPARAMD - bootparamd WITHOUT_BOOTPD - bootpd WITHOUT_FINGER - finger, fingerd WITHOUT_FTP - ftp, ftpd WITHOUT_INETD - inetd WITHOUT_RBOOTD - rbootd WITHOUT_TCP_WRAPPERS - tcpd, et al WITHOUT_TFTP - tftp, tftp-server WITHOUT_TIMED - timed Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_BOOTPARAMD - copied unchanged from r278192, head/tools/build/options/WITHOUT_BOOTPARAMD stable/10/tools/build/options/WITHOUT_BOOTPD - copied unchanged from r278192, head/tools/build/options/WITHOUT_BOOTPD stable/10/tools/build/options/WITHOUT_FINGER - copied unchanged from r278192, head/tools/build/options/WITHOUT_FINGER stable/10/tools/build/options/WITHOUT_FTP - copied unchanged from r278192, head/tools/build/options/WITHOUT_FTP stable/10/tools/build/options/WITHOUT_INETD - copied unchanged from r278192, head/tools/build/options/WITHOUT_INETD stable/10/tools/build/options/WITHOUT_RBOOTD - copied unchanged from r278192, head/tools/build/options/WITHOUT_RBOOTD stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS - copied unchanged from r278192, head/tools/build/options/WITHOUT_TCP_WRAPPERS stable/10/tools/build/options/WITHOUT_TFTP - copied unchanged from r278192, head/tools/build/options/WITHOUT_TFTP stable/10/tools/build/options/WITHOUT_TIMED - copied unchanged from r278192, head/tools/build/options/WITHOUT_TIMED Modified: stable/10/etc/Makefile stable/10/libexec/Makefile stable/10/share/mk/bsd.own.mk stable/10/usr.bin/Makefile stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sun Mar 1 21:47:38 2015 (r279504) +++ stable/10/etc/Makefile Sun Mar 1 22:03:52 2015 (r279505) @@ -21,13 +21,11 @@ BIN1= crontab \ dhclient.conf \ disktab \ fbtab \ - ftpusers \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ - inetd.conf \ libalias.conf \ libmap.conf \ login.access \ @@ -101,6 +99,14 @@ BIN1+= snmpd.config BIN1+= freebsd-update.conf .endif +.if ${MK_FTP} != "no" +BIN1+= ftpusers +.endif + +.if ${MK_INETD} != "no" +BIN1+= inetd.conf +.endif + .if ${MK_LOCATE} != "no" BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc .endif Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Sun Mar 1 21:47:38 2015 (r279504) +++ stable/10/libexec/Makefile Sun Mar 1 22:03:52 2015 (r279505) @@ -5,16 +5,12 @@ SUBDIR= ${_atf} \ ${_atrun} \ - bootpd \ ${_comsat} \ - fingerd \ - ftpd \ getty \ ${_hyperv} \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ - rbootd \ revnetgroup \ ${_rlogind} \ rpc.rquotad \ @@ -26,10 +22,8 @@ SUBDIR= ${_atf} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - tcpd \ ${_telnetd} \ ${_tests} \ - tftpd \ ${_tftp-proxy} \ ulog-helper \ ${_ypxfr} @@ -38,6 +32,18 @@ SUBDIR= ${_atf} \ _atrun= atrun .endif +.if ${MK_BOOTPD} != "no" +SUBDIR+= bootpd +.endif + +.if ${MK_FINGER} != "no" +SUBDIR+= fingerd +.endif + +.if ${MK_FTP} != "no" +SUBDIR+= ftpd +.endif + .if ${MK_MAIL} != "no" _comsat= comsat .endif @@ -63,6 +69,10 @@ _tftp-proxy= tftp-proxy _rtld-elf= rtld-elf .endif +.if ${MK_RBOOTD} != "no" +SUBDIR+= rbootd +.endif + .if ${MK_RCMDS} != "no" _rlogind= rlogind _rshd= rshd @@ -77,10 +87,18 @@ _smrsh= smrsh SUBDIR+= talkd .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftpd +.endif + .if ${MK_TESTS} != "no" _atf= atf _tests= tests Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Sun Mar 1 21:47:38 2015 (r279504) +++ stable/10/share/mk/bsd.own.mk Sun Mar 1 22:03:52 2015 (r279505) @@ -260,6 +260,8 @@ __DEFAULT_YES_OPTIONS = \ BLUETOOTH \ BMAKE \ BOOT \ + BOOTPARAMD \ + BOOTPD \ BSD_CPIO \ BSDINSTALL \ BSNMP \ @@ -278,12 +280,14 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EE \ EXAMPLES \ + FINGER \ FLOPPY \ FMTREE \ FORMAT_EXTENSIONS \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ + FTP \ GAMES \ GCOV \ GDB \ @@ -297,6 +301,7 @@ __DEFAULT_YES_OPTIONS = \ ICONV \ INET \ INET6 \ + INETD \ INFO \ INSTALLLIB \ IPFILTER \ @@ -344,6 +349,7 @@ __DEFAULT_YES_OPTIONS = \ PROFILE \ QUOTAS \ RADIUS_SUPPORT \ + RBOOTD \ RCMDS \ RCS \ RESCUE \ @@ -361,8 +367,11 @@ __DEFAULT_YES_OPTIONS = \ SYSINSTALL \ TALK \ TCSH \ + TCP_WRAPPERS \ TELNET \ TEXTPROC \ + TFTP \ + TIMED \ TOOLCHAIN \ UNBOUND \ USB \ Copied: stable/10/tools/build/options/WITHOUT_BOOTPARAMD (from r278192, head/tools/build/options/WITHOUT_BOOTPARAMD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_BOOTPARAMD Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_BOOTPARAMD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bootparamd 8 . Copied: stable/10/tools/build/options/WITHOUT_BOOTPD (from r278192, head/tools/build/options/WITHOUT_BOOTPD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_BOOTPD Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_BOOTPD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bootpd 8 . Copied: stable/10/tools/build/options/WITHOUT_FINGER (from r278192, head/tools/build/options/WITHOUT_FINGER) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_FINGER Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_FINGER) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr finger 1 +and +.Xr fingerd 8 . Copied: stable/10/tools/build/options/WITHOUT_FTP (from r278192, head/tools/build/options/WITHOUT_FTP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_FTP Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_FTP) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr ftp 1 +and +.Xr ftpd 8 . Copied: stable/10/tools/build/options/WITHOUT_INETD (from r278192, head/tools/build/options/WITHOUT_INETD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_INETD Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_INETD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr inetd 8 . Copied: stable/10/tools/build/options/WITHOUT_RBOOTD (from r278192, head/tools/build/options/WITHOUT_RBOOTD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_RBOOTD Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_RBOOTD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr rbootd 8 . Copied: stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS (from r278192, head/tools/build/options/WITHOUT_TCP_WRAPPERS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_TCP_WRAPPERS) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr tcpd 8 , +and related utilities. Copied: stable/10/tools/build/options/WITHOUT_TFTP (from r278192, head/tools/build/options/WITHOUT_TFTP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_TFTP Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_TFTP) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr tftp 1 +and +.Xr tftpd 8 . Copied: stable/10/tools/build/options/WITHOUT_TIMED (from r278192, head/tools/build/options/WITHOUT_TIMED) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_TIMED Sun Mar 1 22:03:52 2015 (r279505, copy of r278192, head/tools/build/options/WITHOUT_TIMED) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr timed 8 . Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Sun Mar 1 21:47:38 2015 (r279504) +++ stable/10/usr.bin/Makefile Sun Mar 1 22:03:52 2015 (r279505) @@ -47,12 +47,10 @@ SUBDIR= alias \ fetch \ file \ find \ - finger \ fmt \ fold \ fstat \ fsync \ - ftp \ gcore \ gencat \ getconf \ @@ -159,7 +157,6 @@ SUBDIR= alias \ tcopy \ tee \ ${_tests} \ - tftp \ time \ tip \ top \ @@ -233,6 +230,14 @@ _clang= clang SUBDIR+= ee .endif +.if ${MK_FINGER} != "no" +SUBDIR+= finger +.endif + +.if ${MK_FTP} != "no" +SUBDIR+= ftp +.endif + .if ${MK_GPL_DTC} != "yes" SUBDIR+= dtc .endif @@ -353,6 +358,10 @@ SUBDIR+= colcrt SUBDIR+= ul .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftp +.endif + .if ${MK_TOOLCHAIN} != "no" SUBDIR+= ar SUBDIR+= c89 Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Sun Mar 1 21:47:38 2015 (r279504) +++ stable/10/usr.sbin/Makefile Sun Mar 1 22:03:52 2015 (r279505) @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bootparamd \ bsdconfig \ cdcontrol \ chkgrp \ @@ -35,7 +34,6 @@ SUBDIR= adduser \ gstat \ i2c \ ifmcstat \ - inetd \ iostat \ kldxref \ mailwrapper \ @@ -83,11 +81,8 @@ SUBDIR= adduser \ spray \ syslogd \ sysrc \ - tcpdchk \ - tcpdmatch \ tcpdrop \ tcpdump \ - timed \ traceroute \ trpt \ tzsetup \ @@ -131,6 +126,10 @@ SUBDIR+= autofs SUBDIR+= bluetooth .endif +.if ${MK_BOOTPARAMD} != "no" +SUBDIR+= bootparamd +.endif + .if ${MK_BSDINSTALL} != "no" SUBDIR+= bsdinstall .endif @@ -180,6 +179,10 @@ SUBDIR+= rtsold SUBDIR+= traceroute6 .endif +.if ${MK_INETD} != "no" +SUBDIR+= inetd +.endif + .if ${MK_IPFW} != "no" SUBDIR+= ipfwpcap .endif @@ -304,10 +307,19 @@ SUBDIR+= praliases SUBDIR+= sendmail .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpdchk +SUBDIR+= tcpdmatch +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif +.if ${MK_TIMED} != "no" +SUBDIR+= timed +.endif + .if ${MK_TOOLCHAIN} != "no" SUBDIR+= config SUBDIR+= crunch From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 22:07:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E9A1914; Sun, 1 Mar 2015 22:07:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2ED9FC00; Sun, 1 Mar 2015 22:07:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21M7uC0005549; Sun, 1 Mar 2015 22:07:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21M7tvx005545; Sun, 1 Mar 2015 22:07:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503012207.t21M7tvx005545@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Mar 2015 22:07: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: r279506 - in stable/10: lib share/mk tools/build/options usr.bin 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 22:07:56 -0000 Author: ngie Date: Sun Mar 1 22:07:54 2015 New Revision: 279506 URL: https://svnweb.freebsd.org/changeset/base/279506 Log: MFC r278193: Add MK_FILE to control whether or not to build file(1), libmagic(3), etc Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_FILE - copied unchanged from r278193, head/tools/build/options/WITHOUT_FILE Modified: stable/10/lib/Makefile stable/10/share/mk/bsd.own.mk stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Sun Mar 1 22:03:52 2015 (r279505) +++ stable/10/lib/Makefile Sun Mar 1 22:07:54 2015 (r279506) @@ -59,7 +59,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libkvm \ ${_libldns} \ liblzma \ - libmagic \ + ${_libmagic} \ libmandoc \ libmemstat \ libmd \ @@ -171,6 +171,10 @@ _libbsnmp= libbsnmp _clang= clang .endif +.if ${MK_FILE} != "no" +_libmagic= libmagic +.endif + .if ${MK_GPIB} != "no" _libgpib= libgpib .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Sun Mar 1 22:03:52 2015 (r279505) +++ stable/10/share/mk/bsd.own.mk Sun Mar 1 22:07:54 2015 (r279506) @@ -280,6 +280,7 @@ __DEFAULT_YES_OPTIONS = \ ED_CRYPTO \ EE \ EXAMPLES \ + FILE \ FINGER \ FLOPPY \ FMTREE \ Copied: stable/10/tools/build/options/WITHOUT_FILE (from r278193, head/tools/build/options/WITHOUT_FILE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_FILE Sun Mar 1 22:07:54 2015 (r279506, copy of r278193, head/tools/build/options/WITHOUT_FILE) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr file 1 +and related programs. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Sun Mar 1 22:03:52 2015 (r279505) +++ stable/10/usr.bin/Makefile Sun Mar 1 22:07:54 2015 (r279506) @@ -45,7 +45,6 @@ SUBDIR= alias \ expand \ false \ fetch \ - file \ find \ fmt \ fold \ @@ -230,6 +229,10 @@ _clang= clang SUBDIR+= ee .endif +.if ${MK_FILE} != "no" +SUBDIR+= file +.endif + .if ${MK_FINGER} != "no" SUBDIR+= finger .endif From owner-svn-src-stable@FreeBSD.ORG Sun Mar 1 22:12:25 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1AA0A74; Sun, 1 Mar 2015 22:12:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 815D1CB0; Sun, 1 Mar 2015 22:12:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21MCP5W009626; Sun, 1 Mar 2015 22:12:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21MCPBl009625; Sun, 1 Mar 2015 22:12:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503012212.t21MCPBl009625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 1 Mar 2015 22:12: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: r279507 - stable/10/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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 22:12:25 -0000 Author: ngie Date: Sun Mar 1 22:12:24 2015 New Revision: 279507 URL: https://svnweb.freebsd.org/changeset/base/279507 Log: Regen src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Sun Mar 1 22:07:54 2015 (r279506) +++ stable/10/share/man/man5/src.conf.5 Sun Mar 1 22:12:24 2015 (r279507) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des +.\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd February 13, 2015 +.Dd March 1, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -159,6 +159,14 @@ This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BOOTPARAMD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOTPARAMD 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr bootparamd 8 . +.It Va WITHOUT_BOOTPD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOTPD 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSDINSTALL 278713 2015-02-13 21:24:32Z ngie Set to not build @@ -388,6 +396,17 @@ This includes the device tree compiler ( .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc and powerpc/powerpc64. +.It Va WITHOUT_FILE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FILE 279506 2015-03-01 22:07:54Z ngie +Set to not build +.Xr file 1 +and related programs. +.It Va WITHOUT_FINGER +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FINGER 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr finger 1 +and +.Xr fingerd 8 . .It Va WITHOUT_FLOPPY .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs @@ -414,6 +433,12 @@ without floating-point support. .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . +.It Va WITHOUT_FTP +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_FTP 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr ftp 1 +and +.Xr ftpd 8 . .It Va WITHOUT_GAMES .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. @@ -540,6 +565,10 @@ When set, it also enforces the following .It Va WITHOUT_INET6_SUPPORT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. +.It Va WITHOUT_INETD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INETD 279505 2015-03-01 22:03:52Z ngie +Set to not build +.Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. @@ -946,6 +975,10 @@ Set to not build radius support into var .Xr pam_radius 8 and .Xr ppp 8 . +.It Va WITHOUT_RBOOTD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RBOOTD 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr rbootd 8 . .It Va WITHOUT_RCMDS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the @@ -1041,6 +1074,11 @@ Set to not build or install .Xr talk 1 and .Xr talkd 8 . +.It Va WITHOUT_TCP_WRAPPERS +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr tcpd 8 , +and related utilities. .It Va WITHOUT_TCSH .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install @@ -1070,6 +1108,16 @@ When set, it also enforces the following .It .Va WITHOUT_GROFF .El +.It Va WITHOUT_TFTP +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TFTP 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr tftp 1 +and +.Xr tftpd 8 . +.It Va WITHOUT_TIMED +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TIMED 279505 2015-03-01 22:03:52Z ngie +Set to not build or install +.Xr timed 8 . .It Va WITHOUT_TOOLCHAIN .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TOOLCHAIN 174550 2007-12-12 16:43:17Z ru Set to not install From owner-svn-src-stable@FreeBSD.ORG Mon Mar 2 07:51:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B563E471; Mon, 2 Mar 2015 07:51:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 86A9EB41; Mon, 2 Mar 2015 07:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t227pFLW095882; Mon, 2 Mar 2015 07:51:15 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t227pF66095881; Mon, 2 Mar 2015 07:51:15 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503020751.t227pF66095881@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 2 Mar 2015 07:51: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: r279516 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 07:51:15 -0000 Author: ae Date: Mon Mar 2 07:51:14 2015 New Revision: 279516 URL: https://svnweb.freebsd.org/changeset/base/279516 Log: MFC r279206: In some cases soreceive_dgram() can return no data, but has control message. This can happen when application is sending packets too big for the path MTU and recvmsg() will return zero (indicating no data) but there will be a cmsghdr with cmsg_type set to IPV6_PATHMTU. Remove KASSERT() which does NULL pointer dereference in such case. Also call m_freem() only when m isn't NULL. MFC r279209: soreceive_generic() still has similar KASSERT(), therefore instead of remove KASSERT(), change it to check mbuf isn't NULL. PR: 197882 Sponsored by: Yandex LLC Modified: stable/10/sys/kern/uipc_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_socket.c ============================================================================== --- stable/10/sys/kern/uipc_socket.c Mon Mar 2 07:37:01 2015 (r279515) +++ stable/10/sys/kern/uipc_socket.c Mon Mar 2 07:51:14 2015 (r279516) @@ -2189,7 +2189,8 @@ soreceive_dgram(struct socket *so, struc * Process one or more MT_CONTROL mbufs present before any data mbufs * in the first mbuf chain on the socket buffer. We call into the * protocol to perform externalization (or freeing if controlp == - * NULL). + * NULL). In some cases there can be only MT_CONTROL mbufs without + * MT_DATA mbufs. */ if (m->m_type == MT_CONTROL) { struct mbuf *cm = NULL, *cmn; @@ -2219,8 +2220,8 @@ soreceive_dgram(struct socket *so, struc cm = cmn; } } - KASSERT(m->m_type == MT_DATA, ("soreceive_dgram: !data")); - + KASSERT(m == NULL || m->m_type == MT_DATA, + ("soreceive_dgram: !data")); while (m != NULL && uio->uio_resid > 0) { len = uio->uio_resid; if (len > m->m_len) @@ -2237,9 +2238,10 @@ soreceive_dgram(struct socket *so, struc m->m_len -= len; } } - if (m != NULL) + if (m != NULL) { flags |= MSG_TRUNC; - m_freem(m); + m_freem(m); + } if (flagsp != NULL) *flagsp |= flags; return (0); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 2 08:00:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F89633; Mon, 2 Mar 2015 08:00:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C568EC12; Mon, 2 Mar 2015 08:00:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22800BI098249; Mon, 2 Mar 2015 08:00:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2280008098248; Mon, 2 Mar 2015 08:00:00 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503020800.t2280008098248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 2 Mar 2015 08:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279517 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 08:00:01 -0000 Author: ae Date: Mon Mar 2 08:00:00 2015 New Revision: 279517 URL: https://svnweb.freebsd.org/changeset/base/279517 Log: MFC r279206: In some cases soreceive_dgram() can return no data, but has control message. This can happen when application is sending packets too big for the path MTU and recvmsg() will return zero (indicating no data) but there will be a cmsghdr with cmsg_type set to IPV6_PATHMTU. Remove KASSERT() which does NULL pointer dereference in such case. Also call m_freem() only when m isn't NULL. MFC r279209: soreceive_generic() still has similar KASSERT(), therefore instead of remove KASSERT(), change it to check mbuf isn't NULL. PR: 197882 Sponsored by: Yandex LLC Modified: stable/9/sys/kern/uipc_socket.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Mon Mar 2 07:51:14 2015 (r279516) +++ stable/9/sys/kern/uipc_socket.c Mon Mar 2 08:00:00 2015 (r279517) @@ -2311,7 +2311,8 @@ soreceive_dgram(struct socket *so, struc * Process one or more MT_CONTROL mbufs present before any data mbufs * in the first mbuf chain on the socket buffer. We call into the * protocol to perform externalization (or freeing if controlp == - * NULL). + * NULL). In some cases there can be only MT_CONTROL mbufs without + * MT_DATA mbufs. */ if (m->m_type == MT_CONTROL) { struct mbuf *cm = NULL, *cmn; @@ -2341,8 +2342,8 @@ soreceive_dgram(struct socket *so, struc cm = cmn; } } - KASSERT(m->m_type == MT_DATA, ("soreceive_dgram: !data")); - + KASSERT(m == NULL || m->m_type == MT_DATA, + ("soreceive_dgram: !data")); while (m != NULL && uio->uio_resid > 0) { len = uio->uio_resid; if (len > m->m_len) @@ -2359,9 +2360,10 @@ soreceive_dgram(struct socket *so, struc m->m_len -= len; } } - if (m != NULL) + if (m != NULL) { flags |= MSG_TRUNC; - m_freem(m); + m_freem(m); + } if (flagsp != NULL) *flagsp |= flags; return (0); From owner-svn-src-stable@FreeBSD.ORG Mon Mar 2 09:15:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 004A5689; Mon, 2 Mar 2015 09:15:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DFC5A3FF; Mon, 2 Mar 2015 09:15:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t229FpiX041489; Mon, 2 Mar 2015 09:15:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t229Fpxo041488; Mon, 2 Mar 2015 09:15:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503020915.t229Fpxo041488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 2 Mar 2015 09:15: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: r279518 - stable/10/lib/libc/gen 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 09:15:52 -0000 Author: kib Date: Mon Mar 2 09:15:50 2015 New Revision: 279518 URL: https://svnweb.freebsd.org/changeset/base/279518 Log: MFC r279367: Fix typo. Modified: stable/10/lib/libc/gen/_spinlock_stub.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/_spinlock_stub.c ============================================================================== --- stable/10/lib/libc/gen/_spinlock_stub.c Mon Mar 2 08:00:00 2015 (r279517) +++ stable/10/lib/libc/gen/_spinlock_stub.c Mon Mar 2 09:15:50 2015 (r279518) @@ -59,7 +59,7 @@ _spinlock(spinlock_t *lck) } -#pragma weak _spinlock +#pragma weak _spinunlock void _spinunlock(spinlock_t *lck) { From owner-svn-src-stable@FreeBSD.ORG Mon Mar 2 21:00:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A4F2E05; Mon, 2 Mar 2015 21:00:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1B1A6619; Mon, 2 Mar 2015 21:00:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22L0sin094746; Mon, 2 Mar 2015 21:00:54 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22L0sv4094745; Mon, 2 Mar 2015 21:00:54 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503022100.t22L0sv4094745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 2 Mar 2015 21:00: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: r279545 - stable/10/lib/libdevstat 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 21:00:55 -0000 Author: ken Date: Mon Mar 2 21:00:54 2015 New Revision: 279545 URL: https://svnweb.freebsd.org/changeset/base/279545 Log: MFC r279346: ------------------------------------------------------------------------ r279346 | ken | 2015-02-26 19:44:12 -0700 (Thu, 26 Feb 2015) | 13 lines Remove an obsolete comment in devstat(3) about the accuracy of the milliseconds per transaction (DSM_MS_PER_TRANSACTION) calculation. The comment was accurate many years ago when the kernel didn't record I/O times on a per-I/O basis, but now that we do collect that information in most areas, it isn't correct. The milliseconds per transaction values are correct, assuming the I/O duration has been recorded. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/10/lib/libdevstat/devstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libdevstat/devstat.c ============================================================================== --- stable/10/lib/libdevstat/devstat.c Mon Mar 2 20:42:06 2015 (r279544) +++ stable/10/lib/libdevstat/devstat.c Mon Mar 2 21:00:54 2015 (r279545) @@ -1480,22 +1480,9 @@ devstat_compute_statistics(struct devsta *destld = 0.0; break; /* - * This calculation is somewhat bogus. It simply divides - * the elapsed time by the total number of transactions - * completed. While that does give the caller a good - * picture of the average rate of transaction completion, - * it doesn't necessarily give the caller a good view of - * how long transactions took to complete on average. - * Those two numbers will be different for a device that - * can handle more than one transaction at a time. e.g. - * SCSI disks doing tagged queueing. - * - * The only way to accurately determine the real average - * time per transaction would be to compute and store the - * time on a per-transaction basis. That currently isn't - * done in the kernel, and would only be desireable if it - * could be implemented in a somewhat non-intrusive and high - * performance way. + * Some devstat callers update the duration and some don't. + * So this will only be accurate if they provide the + * duration. */ case DSM_MS_PER_TRANSACTION: if (totaltransfers > 0) { @@ -1505,11 +1492,6 @@ devstat_compute_statistics(struct devsta } else *destld = 0.0; break; - /* - * As above, these next two really only give the average - * rate of completion for read and write transactions, not - * the average time the transaction took to complete. - */ case DSM_MS_PER_TRANSACTION_READ: if (totaltransfersread > 0) { *destld = totaldurationread; From owner-svn-src-stable@FreeBSD.ORG Mon Mar 2 23:17:18 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98DC03A6; Mon, 2 Mar 2015 23:17:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 83198845; Mon, 2 Mar 2015 23:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t22NHIXc067962; Mon, 2 Mar 2015 23:17:18 GMT (envelope-from thomas@FreeBSD.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t22NHIOB067961; Mon, 2 Mar 2015 23:17:18 GMT (envelope-from thomas@FreeBSD.org) Message-Id: <201503022317.t22NHIOB067961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thomas set sender to thomas@FreeBSD.org using -f From: Thomas Quinot Date: Mon, 2 Mar 2015 23:17:18 +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: r279556 - stable/10/usr.sbin/freebsd-update 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 23:17:18 -0000 Author: thomas Date: Mon Mar 2 23:17:17 2015 New Revision: 279556 URL: https://svnweb.freebsd.org/changeset/base/279556 Log: MFC rev. 278728: (backup_kernel_finddir, backup_kernel, install_files): Add missing references to $BASEDIR, in order to allow correct operation when updating a system mounted at another location than / (e.g. when updating an alternate Boot Environment). Reviewed by: cperciva Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Mar 2 23:03:53 2015 (r279555) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Mar 2 23:17:17 2015 (r279556) @@ -2626,14 +2626,14 @@ backup_kernel_finddir () { while true ; do # Pathname does not exist, so it is OK use that name # for backup directory. - if [ ! -e $BACKUPKERNELDIR ]; then + if [ ! -e $BASEDIR/$BACKUPKERNELDIR ]; then return 0 fi # If directory do exist, we only use if it has our # marker file. - if [ -d $BACKUPKERNELDIR -a \ - -e $BACKUPKERNELDIR/.freebsd-update ]; then + if [ -d $BASEDIR/$BACKUPKERNELDIR -a \ + -e $BASEDIR/$BACKUPKERNELDIR/.freebsd-update ]; then return 0 fi @@ -2641,7 +2641,7 @@ backup_kernel_finddir () { # the end and try again. CNT=$((CNT + 1)) if [ $CNT -gt 9 ]; then - echo "Could not find valid backup dir ($BACKUPKERNELDIR)" + echo "Could not find valid backup dir ($BASEDIR/$BACKUPKERNELDIR)" exit 1 fi BACKUPKERNELDIR="`echo $BACKUPKERNELDIR | sed -Ee 's/[0-9]\$//'`" @@ -2668,17 +2668,17 @@ backup_kernel () { # Remove old kernel backup files. If $BACKUPKERNELDIR was # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. - if [ -d $BACKUPKERNELDIR ]; then - rm -fr $BACKUPKERNELDIR + if [ -d $BASEDIR/$BACKUPKERNELDIR ]; then + rm -fr $BASEDIR/$BACKUPKERNELDIR fi # Create directories for backup. - mkdir -p $BACKUPKERNELDIR - mtree -cdn -p "${KERNELDIR}" | \ - mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null + mkdir -p $BASEDIR/$BACKUPKERNELDIR + mtree -cdn -p "${BASEDIR}/${KERNELDIR}" | \ + mtree -Ue -p "${BASEDIR}/${BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. - touch $BACKUPKERNELDIR/.freebsd-update + touch $BASEDIR/$BACKUPKERNELDIR/.freebsd-update if [ $? -ne 0 ]; then echo "Could not create kernel backup directory" exit 1 @@ -2696,8 +2696,8 @@ backup_kernel () { fi # Backup all the kernel files using hardlinks. - (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ - cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) + (cd ${BASEDIR}/${KERNELDIR} && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BASEDIR}/${BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f @@ -2795,7 +2795,7 @@ install_files () { # Update linker.hints if necessary if [ -s INDEX-OLD -o -s INDEX-NEW ]; then - kldxref -R /boot/ 2>/dev/null + kldxref -R ${BASEDIR}/boot/ 2>/dev/null fi # We've finished updating the kernel. @@ -2846,14 +2846,14 @@ Kernel updates have been installed. Ple install_delete INDEX-OLD INDEX-NEW || return 1 # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. - if [ /etc/master.passwd -nt /etc/spwd.db ] || - [ /etc/master.passwd -nt /etc/pwd.db ]; then - pwd_mkdb /etc/master.passwd + if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then + pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. - if [ /etc/login.conf -nt /etc/login.conf.db ]; then - cap_mkdb /etc/login.conf + if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then + cap_mkdb ${BASEDIR}/etc/login.conf fi # We've finished installing the world and deleting old files From owner-svn-src-stable@FreeBSD.ORG Tue Mar 3 02:47:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD8D6FE3; Tue, 3 Mar 2015 02:47:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C7BD0F62; Tue, 3 Mar 2015 02:47:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t232l0Lo076651; Tue, 3 Mar 2015 02:47:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t232kxsE076640; Tue, 3 Mar 2015 02:46:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503030246.t232kxsE076640@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 3 Mar 2015 02:46: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: r279558 - in stable/10/release: . tools 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 02:47:01 -0000 Author: gjb Date: Tue Mar 3 02:46:59 2015 New Revision: 279558 URL: https://svnweb.freebsd.org/changeset/base/279558 Log: MFC r279249, r279250, r279257: r279249: Add 'cloudware-install' target to handle copying cloud disk images to a directory within DESTDIR. Add CLOUDINSTALL variable to automatically generate the actual list of install targets. While here, rename the cloud-specific names from 'vm-' to 'cw-' to avoid naming collisions. Add AZURE_DISK, GCE_DISK, and OPENSTACK_DISK output file variables. Add 'cloudware-install' to the 'install' target. r279250: Remove a stale comment. r279257: Add a CLOUDPACKAGE variable to contain a list of targets for post-install packaging cloud provider images. Add a 'gce-package.sh' script to generate the final output image ready for upload to the GCE platform. Right now, this is the only image that has a specific output format (GNU-tar), and this implementation is expected to be temporary. This is not directly connected to the other release targets. Sponsored by: The FreeBSD Foundation Added: stable/10/release/tools/gce-package.sh - copied unchanged from r279257, head/release/tools/gce-package.sh Modified: stable/10/release/Makefile stable/10/release/Makefile.vm Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Tue Mar 3 02:08:17 2015 (r279557) +++ stable/10/release/Makefile Tue Mar 3 02:46:59 2015 (r279558) @@ -319,7 +319,7 @@ real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -install: release-install vm-install +install: release-install vm-install cloudware-install release-install: .if defined(DESTDIR) && !empty(DESTDIR) Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Tue Mar 3 02:08:17 2015 (r279557) +++ stable/10/release/Makefile.vm Tue Mar 3 02:46:59 2015 (r279558) @@ -20,24 +20,30 @@ CLOUDWARE?= AZURE \ OPENSTACK AZURE_FORMAT= vhdf AZURE_DESC= Microsoft Azure platform image +AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} GCE_FORMAT= raw GCE_DESC= Google Compute Engine image +GCE_DISK= disk.${GCE_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_DESC= OpenStack platform image +OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE} -CLOUDTARGETS+= vm-${_CW:tl} -CLEANDIRS+= vm-${_CW:tl} +CLOUDTARGETS+= cw-${_CW:tl} +CLEANDIRS+= cw-${_CW:tl} CLEANFILES+= ${_CW:tl}.img \ ${_CW:tl}.${${_CW:tu}_FORMAT} \ - ${_CW:tl}.${${_CW:tu}_FORMAT}.raw + ${_CW:tl}.${${_CW:tu}_FORMAT}.raw \ + cw${_CW:tl}-package +CLOUDINSTALL+= cw${_CW:tl}-install +CLOUDPACKAGE+= cw${_CW:tl}-package ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} . if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) ${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf . endif -vm-${_CW:tl}: +cw-${_CW:tl}: mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/scripts/mk-vmimage.sh \ @@ -45,6 +51,26 @@ vm-${_CW:tl}: -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW}IMAGE} -c ${${_CW}CONF} touch ${.TARGET} + +cw${_CW:tl}-install: + mkdir -p ${DESTDIR}/${_CW:tl} + cp -p ${${_CW}IMAGE} \ + ${DESTDIR}/${_CW:tl}/${${_CW}_DISK} + cd ${DESTDIR}/${_CW:tl} && sha256 ${${_CW}_DISK}* > \ + ${DESTDIR}/${_CW:tl}/CHECKSUM.SHA256 + cd ${DESTDIR}/${_CW:tl} && md5 ${${_CW}_DISK}* > \ + ${DESTDIR}/${_CW:tl}/CHECKSUM.MD5 + +cw${_CW:tl}-package: + @# Special target to handle packaging cloud images in the formats + @# specific to each hosting provider. +.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/tools/${_CW:tl}-package.sh \ + -D ${DESTDIR} -I ${${_CW}_DISK} -S ${WORLDDIR} +.endif + touch ${.TARGET} + . endfor .endif @@ -97,8 +123,6 @@ vm-install: ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor . if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) -# This is very time consuming, so defer it after the images are moved to -# the DESTDIR. . for FORMAT in ${VMFORMATS} # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} @@ -119,3 +143,8 @@ cloudware-release: .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS} .endif + +cloudware-install: +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDINSTALL} +.endif Copied: stable/10/release/tools/gce-package.sh (from r279257, head/release/tools/gce-package.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/tools/gce-package.sh Tue Mar 3 02:46:59 2015 (r279558, copy of r279257, head/release/tools/gce-package.sh) @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Script to handle packaging cloud images for GCE. +# +# XXX: +# This script only exists to help in automating image creation, +# and reimplementing this is intended (in other words, this is +# temporary). + +usage() { + echo "Usage:" + echo "$(basename ${0}) -D -I -S " + exit 1 +} + +main() { + while getopts "D:I:W:" opt; do + case ${opt} in + D) + DESTDIR="${OPTARG}" + ;; + I) + INFILE="${OPTARG}" + ;; + S) + WORLDDIR="${OPTARG}" + ;; + *) + usage + ;; + esac + done + shift $(( ${OPTIND} - 1 )) + + if [ -z "${DESTDIR}" -o -z "${INFILE}" -o -z "${WORLDDIR}" ]; then + usage + fi + + OUTFILE="$(make -C ${WORLDDIR}/release -V OSRELEASE).tar.gz" + + cd ${DESTDIR} && tar --format=gnutar -zcf ${OUTFILE} ${INFILE} +} + +main "$@" From owner-svn-src-stable@FreeBSD.ORG Tue Mar 3 10:11:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAB32D0; Tue, 3 Mar 2015 10:11:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 8CA981B5; Tue, 3 Mar 2015 10:11:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t23ABxTi089260; Tue, 3 Mar 2015 10:11:59 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t23ABxPG089259; Tue, 3 Mar 2015 10:11:59 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201503031011.t23ABxPG089259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 3 Mar 2015 10:11: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: r279562 - stable/10/sys/xen/xenstore 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 10:11:59 -0000 Author: royger Date: Tue Mar 3 10:11:58 2015 New Revision: 279562 URL: https://svnweb.freebsd.org/changeset/base/279562 Log: MFC r278844: xen: fix xenstore dev Modified: stable/10/sys/xen/xenstore/xenstore_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/xen/xenstore/xenstore_dev.c ============================================================================== --- stable/10/sys/xen/xenstore/xenstore_dev.c Tue Mar 3 09:48:19 2015 (r279561) +++ stable/10/sys/xen/xenstore/xenstore_dev.c Tue Mar 3 10:11:58 2015 (r279562) @@ -76,7 +76,11 @@ static int xs_dev_read(struct cdev *dev, struct uio *uio, int ioflag) { int error; - struct xs_dev_data *u = dev->si_drv1; + struct xs_dev_data *u; + + error = devfs_get_cdevpriv((void **)&u); + if (error != 0) + return (error); while (u->read_prod == u->read_cons) { error = tsleep(u, PCATCH, "xsdread", hz/10); @@ -114,11 +118,15 @@ static int xs_dev_write(struct cdev *dev, struct uio *uio, int ioflag) { int error; - struct xs_dev_data *u = dev->si_drv1; + struct xs_dev_data *u; struct xs_dev_transaction *trans; void *reply; int len = uio->uio_resid; + error = devfs_get_cdevpriv((void **)&u); + if (error != 0) + return (error); + if ((len + u->len) > sizeof(u->u.buffer)) return (EINVAL); @@ -176,25 +184,10 @@ xs_dev_write(struct cdev *dev, struct ui return (error); } -static int -xs_dev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) -{ - struct xs_dev_data *u; - -#if 0 /* XXX figure out if equiv needed */ - nonseekable_open(inode, filp); -#endif - u = malloc(sizeof(*u), M_XENSTORE, M_WAITOK|M_ZERO); - LIST_INIT(&u->transactions); - dev->si_drv1 = u; - - return (0); -} - -static int -xs_dev_close(struct cdev *dev, int fflag, int devtype, struct thread *td) +static void +xs_dev_dtor(void *arg) { - struct xs_dev_data *u = dev->si_drv1; + struct xs_dev_data *u = arg; struct xs_dev_transaction *trans, *tmp; LIST_FOREACH_SAFE(trans, &u->transactions, list, tmp) { @@ -204,7 +197,21 @@ xs_dev_close(struct cdev *dev, int fflag } free(u, M_XENSTORE); - return (0); +} + +static int +xs_dev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct xs_dev_data *u; + int error; + + u = malloc(sizeof(*u), M_XENSTORE, M_WAITOK|M_ZERO); + LIST_INIT(&u->transactions); + error = devfs_set_cdevpriv(u, xs_dev_dtor); + if (error != 0) + free(u, M_XENSTORE); + + return (error); } static struct cdevsw xs_dev_cdevsw = { @@ -212,13 +219,13 @@ static struct cdevsw xs_dev_cdevsw = { .d_read = xs_dev_read, .d_write = xs_dev_write, .d_open = xs_dev_open, - .d_close = xs_dev_close, .d_name = "xs_dev", }; void xs_dev_init() { - make_dev(&xs_dev_cdevsw, 0, UID_ROOT, GID_WHEEL, 0400, - "xen/xenstore"); + + make_dev_credf(MAKEDEV_ETERNAL, &xs_dev_cdevsw, 0, NULL, + UID_ROOT, GID_WHEEL, 0400, "xen/xenstore"); } From owner-svn-src-stable@FreeBSD.ORG Tue Mar 3 17:03:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA5858B2; Tue, 3 Mar 2015 17:03:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B50898FB; Tue, 3 Mar 2015 17:03:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t23H3gnw083465; Tue, 3 Mar 2015 17:03:42 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t23H3gB9083464; Tue, 3 Mar 2015 17:03:42 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201503031703.t23H3gB9083464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 3 Mar 2015 17:03: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: r279565 - stable/10/sys/boot/fdt/dts/arm 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 17:03:42 -0000 Author: loos Date: Tue Mar 3 17:03:41 2015 New Revision: 279565 URL: https://svnweb.freebsd.org/changeset/base/279565 Log: MFC r278915: Set the #address-cells and #size-cells properties on I2C controllers of Raspberry-pi. This fixes the issues on dtc(1) while compiling I2C addresses set with "reg" property. Modified: stable/10/sys/boot/fdt/dts/arm/bcm2835.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/dts/arm/bcm2835.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/bcm2835.dtsi Tue Mar 3 10:50:03 2015 (r279564) +++ stable/10/sys/boot/fdt/dts/arm/bcm2835.dtsi Tue Mar 3 17:03:41 2015 (r279565) @@ -397,6 +397,8 @@ }; bsc0 { + #address-cells = <1>; + #size-cells = <0>; compatible = "broadcom,bcm2835-bsc", "broadcom,bcm2708-bsc"; reg = <0x205000 0x20>; @@ -405,6 +407,8 @@ }; bsc1 { + #address-cells = <1>; + #size-cells = <0>; compatible = "broadcom,bcm2835-bsc", "broadcom,bcm2708-bsc"; reg = <0x804000 0x20>; From owner-svn-src-stable@FreeBSD.ORG Wed Mar 4 01:10:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BFCEEBA; Wed, 4 Mar 2015 01:10:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2663187C; Wed, 4 Mar 2015 01:10:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t241A9Hf012455; Wed, 4 Mar 2015 01:10:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t241A92T012454; Wed, 4 Mar 2015 01:10:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503040110.t241A92T012454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2015 01:10: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: r279572 - stable/10/contrib/binutils/bfd 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 01:10:10 -0000 Author: emaste Date: Wed Mar 4 01:10:09 2015 New Revision: 279572 URL: https://svnweb.freebsd.org/changeset/base/279572 Log: MFC r279301: GNU nm: Avoid NULL dereference bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr, which resulted in a crash on certain ELF objects. This change was implemented independently from upstream binutils, but I have checked that the crash does not happen there. Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/binutils/bfd/dwarf2.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/10/contrib/binutils/bfd/dwarf2.c Tue Mar 3 23:20:18 2015 (r279571) +++ stable/10/contrib/binutils/bfd/dwarf2.c Wed Mar 4 01:10:09 2015 (r279572) @@ -2382,7 +2382,8 @@ find_line (bfd *abfd, else addr += section->vma; *filename_ptr = NULL; - *functionname_ptr = NULL; + if (!do_line) + *functionname_ptr = NULL; *linenumber_ptr = 0; if (! *pinfo) From owner-svn-src-stable@FreeBSD.ORG Wed Mar 4 09:29:26 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6FECA82; Wed, 4 Mar 2015 09:29:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 989442B9; Wed, 4 Mar 2015 09:29:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t249TQSf048287; Wed, 4 Mar 2015 09:29:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t249TQvT048286; Wed, 4 Mar 2015 09:29:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503040929.t249TQvT048286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2015 09:29:26 +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: r279583 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 09:29:26 -0000 Author: kib Date: Wed Mar 4 09:29:25 2015 New Revision: 279583 URL: https://svnweb.freebsd.org/changeset/base/279583 Log: MFC r279282: When unlocking a contested PI pthread mutex, if the queue of waiters is empty, look up the umtx_pi and disown it if the current thread owns it. Modified: stable/10/sys/kern/kern_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_umtx.c ============================================================================== --- stable/10/sys/kern/kern_umtx.c Wed Mar 4 09:17:03 2015 (r279582) +++ stable/10/sys/kern/kern_umtx.c Wed Mar 4 09:29:25 2015 (r279583) @@ -1810,6 +1810,19 @@ umtx_pi_setowner(struct umtx_pi *pi, str TAILQ_INSERT_TAIL(&uq_owner->uq_pi_contested, pi, pi_link); } + +/* + * Disown a PI mutex, and remove it from the owned list. + */ +static void +umtx_pi_disown(struct umtx_pi *pi) +{ + + mtx_assert(&umtx_lock, MA_OWNED); + TAILQ_REMOVE(&pi->pi_owner->td_umtxq->uq_pi_contested, pi, pi_link); + pi->pi_owner = NULL; +} + /* * Claim ownership of a PI mutex. */ @@ -2226,8 +2239,7 @@ do_unlock_pi(struct thread *td, struct u return (EPERM); } uq_me = curthread->td_umtxq; - pi->pi_owner = NULL; - TAILQ_REMOVE(&uq_me->uq_pi_contested, pi, pi_link); + umtx_pi_disown(pi); /* get highest priority thread which is still sleeping. */ uq_first = TAILQ_FIRST(&pi->pi_blocked); while (uq_first != NULL && @@ -2248,6 +2260,25 @@ do_unlock_pi(struct thread *td, struct u mtx_unlock_spin(&umtx_lock); if (uq_first) umtxq_signal_thread(uq_first); + } else { + pi = umtx_pi_lookup(&key); + /* + * A umtx_pi can exist if a signal or timeout removed the + * last waiter from the umtxq, but there is still + * a thread in do_lock_pi() holding the umtx_pi. + */ + if (pi != NULL) { + /* + * The umtx_pi can be unowned, such as when a thread + * has just entered do_lock_pi(), allocated the + * umtx_pi, and unlocked the umtxq. + * If the current thread owns it, it must disown it. + */ + mtx_lock_spin(&umtx_lock); + if (pi->pi_owner == td) + umtx_pi_disown(pi); + mtx_unlock_spin(&umtx_lock); + } } umtxq_unlock(&key); From owner-svn-src-stable@FreeBSD.ORG Wed Mar 4 09:31:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70AFAD50; Wed, 4 Mar 2015 09:31:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5BD1C391; Wed, 4 Mar 2015 09:31:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t249VBnT048743; Wed, 4 Mar 2015 09:31:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t249VBHl048742; Wed, 4 Mar 2015 09:31:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503040931.t249VBHl048742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2015 09:31: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: r279585 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 09:31:11 -0000 Author: kib Date: Wed Mar 4 09:31:10 2015 New Revision: 279585 URL: https://svnweb.freebsd.org/changeset/base/279585 Log: MFC r279283: When failing to claim ownership of a umtx_pi, restore the umutex owner to its previous, unowned state. Modified: stable/10/sys/kern/kern_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_umtx.c ============================================================================== --- stable/10/sys/kern/kern_umtx.c Wed Mar 4 09:30:03 2015 (r279584) +++ stable/10/sys/kern/kern_umtx.c Wed Mar 4 09:31:10 2015 (r279585) @@ -2106,6 +2106,17 @@ do_lock_pi(struct thread *td, struct umu error = umtx_pi_claim(pi, td); umtxq_unbusy(&uq->uq_key); umtxq_unlock(&uq->uq_key); + if (error != 0) { + /* + * Since we're going to return an + * error, restore the m_owner to its + * previous, unowned state to avoid + * compounding the problem. + */ + (void)casuword32(&m->m_owner, + id | UMUTEX_CONTESTED, + UMUTEX_CONTESTED); + } break; } From owner-svn-src-stable@FreeBSD.ORG Wed Mar 4 09:33:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E0EBF42; Wed, 4 Mar 2015 09:33:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 899105DF; Wed, 4 Mar 2015 09:33:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t249X0ra052438; Wed, 4 Mar 2015 09:33:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t249X0K3052437; Wed, 4 Mar 2015 09:33:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503040933.t249X0K3052437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2015 09:33:00 +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: r279586 - stable/10/lib/libthr/thread 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 09:33:00 -0000 Author: kib Date: Wed Mar 4 09:32:59 2015 New Revision: 279586 URL: https://svnweb.freebsd.org/changeset/base/279586 Log: MFC r279284: Propagate errors from _thr_umutex_unlock2 through mutex_unlock_common. Modified: stable/10/lib/libthr/thread/thr_mutex.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/10/lib/libthr/thread/thr_mutex.c Wed Mar 4 09:31:10 2015 (r279585) +++ stable/10/lib/libthr/thread/thr_mutex.c Wed Mar 4 09:32:59 2015 (r279586) @@ -633,7 +633,7 @@ mutex_unlock_common(struct pthread_mutex { struct pthread *curthread = _get_curthread(); uint32_t id; - int defered; + int defered, error; if (__predict_false(m <= THR_MUTEX_DESTROYED)) { if (m == THR_MUTEX_DESTROYED) @@ -647,6 +647,7 @@ mutex_unlock_common(struct pthread_mutex if (__predict_false(m->m_owner != curthread)) return (EPERM); + error = 0; id = TID(curthread); if (__predict_false( PMUTEX_TYPE(m->m_flags) == PTHREAD_MUTEX_RECURSIVE && @@ -660,7 +661,7 @@ mutex_unlock_common(struct pthread_mutex defered = 0; DEQUEUE_MUTEX(curthread, m); - _thr_umutex_unlock2(&m->m_lock, id, mtx_defer); + error = _thr_umutex_unlock2(&m->m_lock, id, mtx_defer); if (mtx_defer == NULL && defered) { _thr_wake_all(curthread->defer_waiters, @@ -670,7 +671,7 @@ mutex_unlock_common(struct pthread_mutex } if (!cv && m->m_flags & PMUTEX_FLAG_PRIVATE) THR_CRITICAL_LEAVE(curthread); - return (0); + return (error); } int From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:30:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0733F846; Thu, 5 Mar 2015 00:30:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 CAF62B5A; Thu, 5 Mar 2015 00:29:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250Tx0H081414; Thu, 5 Mar 2015 00:29:59 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250TxUq081409; Thu, 5 Mar 2015 00:29:59 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050029.t250TxUq081409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:29: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: r279609 - in stable/10/usr.sbin/bsdconfig: includes share share/packages 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:30:00 -0000 Author: dteske Date: Thu Mar 5 00:29:58 2015 New Revision: 279609 URL: https://svnweb.freebsd.org/changeset/base/279609 Log: MFC r273067: Fix awk(1) asorti() implementation to work when called in a loop. Modified: stable/10/usr.sbin/bsdconfig/includes/includes stable/10/usr.sbin/bsdconfig/share/device.subr stable/10/usr.sbin/bsdconfig/share/packages/index.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/includes/includes ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/includes Thu Mar 5 00:18:32 2015 (r279608) +++ stable/10/usr.sbin/bsdconfig/includes/includes Thu Mar 5 00:29:58 2015 (r279609) @@ -71,8 +71,10 @@ show_include() -v show_desc=${SHOW_DESC:-0} ' function asorti(src, dest) { + k = nitems = 0; + # Copy src indices to dest and calculate array length - nitems = 0; for (i in src) dest[++nitems] = i + for (i in src) dest[++nitems] = i # Sort the array of indices (dest) using insertion sort method for (i = 1; i <= nitems; k = i++) Modified: stable/10/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/device.subr Thu Mar 5 00:18:32 2015 (r279608) +++ stable/10/usr.sbin/bsdconfig/share/device.subr Thu Mar 5 00:29:58 2015 (r279609) @@ -1118,6 +1118,7 @@ f_device_sort_by_awk=' # -v prop="property" function asorti(src, dest) { + k = nitems = 0 for (i in src) dest[++nitems] = i for (i = 1; i <= nitems; k = i++) { idx = dest[i] Modified: stable/10/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/packages/index.subr Thu Mar 5 00:18:32 2015 (r279608) +++ stable/10/usr.sbin/bsdconfig/share/packages/index.subr Thu Mar 5 00:29:58 2015 (r279609) @@ -243,8 +243,10 @@ f_index_read() eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' function asorti(src, dest) { + k = nitems = 0 + # Copy src indices to dest and calculate array length - nitems = 0; for (i in src) dest[++nitems] = i + for (i in src) dest[++nitems] = i # Sort the array of indices (dest) using insertion sort method for (i = 1; i <= nitems; k = i++) From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:32:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 313249AF; Thu, 5 Mar 2015 00:32:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 11B49C08; Thu, 5 Mar 2015 00:32:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250WtPs085438; Thu, 5 Mar 2015 00:32:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250WtWS085435; Thu, 5 Mar 2015 00:32:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050032.t250WtWS085435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:32: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: r279610 - in stable/10/usr.sbin/bsdconfig: includes share share/packages 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:32:56 -0000 Author: dteske Date: Thu Mar 5 00:32:54 2015 New Revision: 279610 URL: https://svnweb.freebsd.org/changeset/base/279610 Log: MFC r273068: Rename awk(1) implementation of GNU awk's built-in asorti() function to prevent fatal conflict should one-true-awk ever be replaced -- e.g., in an appliance -- with GNU awk. NB: Renamed my implementation to _asorti() Modified: stable/10/usr.sbin/bsdconfig/includes/includes stable/10/usr.sbin/bsdconfig/share/device.subr stable/10/usr.sbin/bsdconfig/share/packages/index.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/includes/includes ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/includes Thu Mar 5 00:29:58 2015 (r279609) +++ stable/10/usr.sbin/bsdconfig/includes/includes Thu Mar 5 00:32:54 2015 (r279610) @@ -69,7 +69,7 @@ show_include() -v use_color=${USE_COLOR:-0} \ -v re="$pattern" \ -v show_desc=${SHOW_DESC:-0} ' - function asorti(src, dest) + function _asorti(src, dest) { k = nitems = 0; @@ -120,7 +120,7 @@ show_include() } } END { - n = asorti(syntax, sorted_indices) + n = _asorti(syntax, sorted_indices) for (i = 1; i <= n; i++) printf "%s", syntax[sorted_indices[i]] }' "$file" ) Modified: stable/10/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/device.subr Thu Mar 5 00:29:58 2015 (r279609) +++ stable/10/usr.sbin/bsdconfig/share/device.subr Thu Mar 5 00:32:54 2015 (r279610) @@ -1116,7 +1116,7 @@ f_device_shutdown() f_device_sort_by_awk=' # Variables that should be defined on the invocation line: # -v prop="property" -function asorti(src, dest) +function _asorti(src, dest) { k = nitems = 0 for (i in src) dest[++nitems] = i @@ -1137,7 +1137,7 @@ function asorti(src, dest) } } END { - nitems = asorti(devices, devices_sorted) + nitems = _asorti(devices, devices_sorted) for (i = 1; i <= nitems; i++) print devices[devices_sorted[i]] } ' Modified: stable/10/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/packages/index.subr Thu Mar 5 00:29:58 2015 (r279609) +++ stable/10/usr.sbin/bsdconfig/share/packages/index.subr Thu Mar 5 00:32:54 2015 (r279610) @@ -241,7 +241,7 @@ f_index_read() export msg_packages eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' - function asorti(src, dest) + function _asorti(src, dest) { k = nitems = 0 @@ -292,7 +292,7 @@ f_index_read() END { print "_npkgs=" tpkgs # For convenience, total package count - n = asorti(categories, categories_sorted) + n = _asorti(categories, categories_sorted) # Produce package counts for each category for (i = 1; i <= n; i++) From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:34:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA1C4AF9; Thu, 5 Mar 2015 00:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C0D2EC19; Thu, 5 Mar 2015 00:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250Yi7d085789; Thu, 5 Mar 2015 00:34:44 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250YXPg085736; Thu, 5 Mar 2015 00:34:33 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050034.t250YXPg085736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:34: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: r279611 - in stable/10/usr.sbin/bsdconfig: . console console/include diskmgmt diskmgmt/include docsinstall docsinstall/include dot dot/include examples include includes includes/include... 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:34:45 -0000 Author: dteske Date: Thu Mar 5 00:34:33 2015 New Revision: 279611 URL: https://svnweb.freebsd.org/changeset/base/279611 Log: MFC r274073: Follow-up to r255036; remove beforeinstall directives from bsdconfig(8) Makefile's, fixing concurrent installworld (`make -j17 installworld'). Reviewed by: delphij Thanks to: delphij, emaste Modified: stable/10/usr.sbin/bsdconfig/Makefile stable/10/usr.sbin/bsdconfig/console/Makefile stable/10/usr.sbin/bsdconfig/console/include/Makefile stable/10/usr.sbin/bsdconfig/diskmgmt/Makefile stable/10/usr.sbin/bsdconfig/diskmgmt/include/Makefile stable/10/usr.sbin/bsdconfig/docsinstall/Makefile stable/10/usr.sbin/bsdconfig/docsinstall/include/Makefile stable/10/usr.sbin/bsdconfig/dot/Makefile stable/10/usr.sbin/bsdconfig/dot/include/Makefile stable/10/usr.sbin/bsdconfig/examples/Makefile stable/10/usr.sbin/bsdconfig/include/Makefile stable/10/usr.sbin/bsdconfig/includes/Makefile stable/10/usr.sbin/bsdconfig/includes/include/Makefile stable/10/usr.sbin/bsdconfig/mouse/Makefile stable/10/usr.sbin/bsdconfig/mouse/include/Makefile stable/10/usr.sbin/bsdconfig/networking/Makefile stable/10/usr.sbin/bsdconfig/networking/include/Makefile stable/10/usr.sbin/bsdconfig/networking/share/Makefile stable/10/usr.sbin/bsdconfig/packages/Makefile stable/10/usr.sbin/bsdconfig/packages/include/Makefile stable/10/usr.sbin/bsdconfig/password/Makefile stable/10/usr.sbin/bsdconfig/password/include/Makefile stable/10/usr.sbin/bsdconfig/password/share/Makefile stable/10/usr.sbin/bsdconfig/security/Makefile stable/10/usr.sbin/bsdconfig/security/include/Makefile stable/10/usr.sbin/bsdconfig/share/Makefile stable/10/usr.sbin/bsdconfig/share/media/Makefile stable/10/usr.sbin/bsdconfig/share/packages/Makefile stable/10/usr.sbin/bsdconfig/startup/Makefile stable/10/usr.sbin/bsdconfig/startup/include/Makefile stable/10/usr.sbin/bsdconfig/startup/share/Makefile stable/10/usr.sbin/bsdconfig/timezone/Makefile stable/10/usr.sbin/bsdconfig/timezone/include/Makefile stable/10/usr.sbin/bsdconfig/timezone/share/Makefile stable/10/usr.sbin/bsdconfig/ttys/Makefile stable/10/usr.sbin/bsdconfig/ttys/include/Makefile stable/10/usr.sbin/bsdconfig/usermgmt/Makefile stable/10/usr.sbin/bsdconfig/usermgmt/include/Makefile stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -25,9 +25,4 @@ SCRIPTS= bsdconfig MAN= bsdconfig.8 -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - mkdir -p ${DESTDIR}${SCRIPTSDIR} - mkdir -p ${DESTDIR}${MANDIR}8 - .include Modified: stable/10/usr.sbin/bsdconfig/console/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/console/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/console/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= console font keymap repeat saver screenmap ttys -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/console/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/console/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/console/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/080.console/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/diskmgmt/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/diskmgmt/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/diskmgmt/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= diskmgmt -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/diskmgmt/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/diskmgmt/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/diskmgmt/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/050.diskmgmt/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/docsinstall/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/docsinstall/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/docsinstall/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= docsinstall -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/docsinstall/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/docsinstall/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/docsinstall/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/dot/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/dot/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/dot/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= dot -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/dot/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/dot/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/dot/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/dot/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/examples/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/examples/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/examples/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/examples/bsdconfig FILES= add_some_packages.sh browse_packages_http.sh bsdconfigrc -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -6,7 +6,4 @@ FILESDIR= ${LIBEXECDIR}/bsdconfig/includ FILES= bsdconfig.hlp media.hlp messages.subr network_device.hlp \ options.hlp tcp.hlp usage.hlp -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/includes/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/includes/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= includes -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/includes/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/includes/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/includes/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/mouse/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/mouse/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/mouse/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= disable enable flags mouse port type -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/mouse/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/mouse/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/mouse/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/110.mouse/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/networking/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/networking/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/networking/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= defaultrouter devices hostname nameservers networking -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/networking/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/networking/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/networking/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/120.networking/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/networking/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/networking/share/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/networking/share/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -6,7 +6,4 @@ FILESDIR= ${SHAREDIR}/bsdconfig/networki FILES= common.subr device.subr hostname.subr ipaddr.subr media.subr \ netmask.subr resolv.subr routing.subr services.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/packages/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/packages/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/packages/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= packages -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/packages/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/packages/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/packages/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/030.packages/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/password/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/password/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/password/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= password -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/password/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/password/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/password/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/040.password/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/password/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/password/share/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/password/share/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/bsdconfig/password FILES= password.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/security/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/security/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/security/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= kern_securelevel security -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/security/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/security/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/security/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/130.security/include FILES= messages.subr securelevel.hlp -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/share/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -9,7 +9,4 @@ FILES= common.subr device.subr dialog.s mustberoot.subr script.subr strings.subr struct.subr \ sysrc.subr variable.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/share/media/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/media/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/share/media/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -7,7 +7,4 @@ FILES= any.subr cdrom.subr common.subr floppy.subr ftp.subr http.subr httpproxy.subr network.subr \ nfs.subr options.subr tcpip.subr ufs.subr usb.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/share/packages/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/packages/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/share/packages/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/bsdconfig/packages FILES= categories.subr index.subr musthavepkg.subr packages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/startup/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/startup/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/startup/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= misc rcadd rcconf rcdelete rcedit rcvar startup -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/startup/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/startup/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/startup/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/140.startup/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/startup/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/startup/share/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/startup/share/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/bsdconfig/startup FILES= rcconf.subr rcedit.subr rcvar.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/timezone/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/timezone/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= timezone -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/timezone/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/timezone/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/090.timezone/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/timezone/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/share/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/timezone/share/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -6,7 +6,4 @@ FILESDIR= ${SHAREDIR}/bsdconfig/timezone FILES= continents.subr countries.subr iso3166.subr menus.subr \ zones.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/ttys/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/ttys/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/ttys/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= ttys -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/ttys/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/ttys/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/ttys/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/150.ttys/include FILES= messages.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/usermgmt/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/usermgmt/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -10,7 +10,4 @@ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} SCRIPTS= groupadd groupdel groupedit useradd userdel useredit usermgmt -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/usermgmt/include/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/include/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/usermgmt/include/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/070.usermgmt/include FILES= messages.subr usermgmt.hlp -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile Thu Mar 5 00:32:54 2015 (r279610) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/Makefile Thu Mar 5 00:34:33 2015 (r279611) @@ -5,7 +5,4 @@ NO_OBJ= FILESDIR= ${SHAREDIR}/bsdconfig/usermgmt FILES= group.subr group_input.subr user.subr user_input.subr -beforeinstall: - mkdir -p ${DESTDIR}${FILESDIR} - .include From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:37:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9E16D41; Thu, 5 Mar 2015 00:37:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 94450C42; Thu, 5 Mar 2015 00:37:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250bt2W086418; Thu, 5 Mar 2015 00:37:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250bt0l086417; Thu, 5 Mar 2015 00:37:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050037.t250bt0l086417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:37: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: r279612 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:37:55 -0000 Author: dteske Date: Thu Mar 5 00:37:54 2015 New Revision: 279612 URL: https://svnweb.freebsd.org/changeset/base/279612 Log: MFC r278467: Replace the only instance of sed(1) in bsdconfig(8) with awk(1). Modified: stable/10/usr.sbin/bsdconfig/share/keymap.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/keymap.subr Thu Mar 5 00:34:33 2015 (r279611) +++ stable/10/usr.sbin/bsdconfig/share/keymap.subr Thu Mar 5 00:37:54 2015 (r279612) @@ -219,7 +219,7 @@ f_keymap_get_all() echo -n "$k " # NOTE: Translate '8x8' to '8x08' before sending to # sort(1) so that things work out as we might expect. - debug= keymap_$k get desc | sed -e 's/8x8/8x08/g' + debug= keymap_$k get desc | awk 'gsub(/8x8/,"8x08")||1' done | sort -k2 | awk '{ printf "%s%s", (started ? " " : ""), $1; started = 1 }' From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:39:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9EB0E81; Thu, 5 Mar 2015 00:39:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 93E7FC51; Thu, 5 Mar 2015 00:39:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250dGGL086656; Thu, 5 Mar 2015 00:39:16 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250dGwd086655; Thu, 5 Mar 2015 00:39:16 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050039.t250dGwd086655@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:39:16 +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: r279613 - stable/10/usr.sbin/bsdconfig/includes 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:39:16 -0000 Author: dteske Date: Thu Mar 5 00:39:15 2015 New Revision: 279613 URL: https://svnweb.freebsd.org/changeset/base/279613 Log: MFC r278470: Add new alias "bsdconfig api" (same as "bsdconfig includes") NB: My fingers like typing "api" a lot more than "includes" Modified: stable/10/usr.sbin/bsdconfig/includes/INDEX Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/includes/INDEX ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/INDEX Thu Mar 5 00:37:54 2015 (r279612) +++ stable/10/usr.sbin/bsdconfig/includes/INDEX Thu Mar 5 00:39:15 2015 (r279613) @@ -45,6 +45,7 @@ menu_help="" # can be i18n'ed but `command' is the name of a script. # menu_selection="includes|includes" +menu_selection="api|includes" # # ------------ Items below this line do NOT need i18n translation ------------ From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:40:20 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38B46FBE; Thu, 5 Mar 2015 00:40:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 229E0C5D; Thu, 5 Mar 2015 00:40:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250eKsJ087381; Thu, 5 Mar 2015 00:40:20 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250eK9e087380; Thu, 5 Mar 2015 00:40:20 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050040.t250eK9e087380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:40: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: r279614 - stable/10/usr.sbin/bsdconfig/networking/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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:40:20 -0000 Author: dteske Date: Thu Mar 5 00:40:19 2015 New Revision: 279614 URL: https://svnweb.freebsd.org/changeset/base/279614 Log: MFC r278483: Comments. Modified: stable/10/usr.sbin/bsdconfig/networking/share/device.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/networking/share/device.subr Thu Mar 5 00:39:15 2015 (r279613) +++ stable/10/usr.sbin/bsdconfig/networking/share/device.subr Thu Mar 5 00:40:19 2015 (r279614) @@ -207,7 +207,7 @@ f_dialog_menu_netdev_edit() '3 $msg_ipaddr4' '$ipaddr' '4 $msg_netmask' '$netmask' '5 $msg_options' '$options' - " + " # END-QUOTE eval f_dialog_menu_size height width rows \ \"\$DIALOG_TITLE\" \ \"\$DIALOG_BACKTITLE\" \ From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:41:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BEB817E; Thu, 5 Mar 2015 00:41:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 75D3ACF8; Thu, 5 Mar 2015 00:41:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250f4XP089861; Thu, 5 Mar 2015 00:41:04 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250f4iN089860; Thu, 5 Mar 2015 00:41:04 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050041.t250f4iN089860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:41: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: r279615 - stable/10/usr.sbin/bsdconfig/usermgmt/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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:41:04 -0000 Author: dteske Date: Thu Mar 5 00:41:03 2015 New Revision: 279615 URL: https://svnweb.freebsd.org/changeset/base/279615 Log: MFC r278488: Whitespace. Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr Thu Mar 5 00:40:19 2015 (r279614) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr Thu Mar 5 00:41:03 2015 (r279615) @@ -830,8 +830,7 @@ f_user_delete() f_eval_catch $funcname \ pw '%s -H 0' "$cmd" else - f_eval_catch $funcname \ - pw '%s -h -' "$cmd" + f_eval_catch $funcname pw '%s -h -' "$cmd" fi fi fi From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:42:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53B342BC; Thu, 5 Mar 2015 00:42:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3D44CD07; Thu, 5 Mar 2015 00:42:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250g8th090677; Thu, 5 Mar 2015 00:42:08 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250g7AA090671; Thu, 5 Mar 2015 00:42:07 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050042.t250g7AA090671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00: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: r279616 - in stable/10/usr.sbin/bsdconfig/timezone: . 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:42:08 -0000 Author: dteske Date: Thu Mar 5 00:42:06 2015 New Revision: 279616 URL: https://svnweb.freebsd.org/changeset/base/279616 Log: MFC r278489: Eliminate sub-shells where possible for performance. Modified: stable/10/usr.sbin/bsdconfig/timezone/share/continents.subr stable/10/usr.sbin/bsdconfig/timezone/share/countries.subr stable/10/usr.sbin/bsdconfig/timezone/timezone Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/timezone/share/continents.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/share/continents.subr Thu Mar 5 00:41:03 2015 (r279615) +++ stable/10/usr.sbin/bsdconfig/timezone/share/continents.subr Thu Mar 5 00:42:06 2015 (r279616) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_CONTINENTS_SUBR" ]; then _TIMEZONE_CONTINENTS_SUBR=1 # -# Copyright (c) 2011-2012 Devin Teske +# Copyright (c) 2011-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -87,7 +87,7 @@ export continent_utc_title ############################################################ FUNCTIONS -# f_continent $cont $property +# f_continent $cont $property [$var_to_set] # # Returns a single property of a given continent. Available properties are: # @@ -102,37 +102,60 @@ export continent_utc_title # (which appears after continent selection). # menu_list Menu-list of regions for this continent. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_continent() { - local cont="$1" property="$2" - eval echo \"\${continent_${cont}_$property}\" + f_getvar "continent_${1}_$2" $3 } -# f_find_continent $title +# f_find_continent $title [$var_to_set] # # Returns continent identifier given continent title. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_find_continent() { - local cont - for cont in $CONTINENTS; do - if [ "$1" = "$( f_continent $cont title )" ]; then - echo "$cont" + local __cont __title + for __cont in $CONTINENTS; do + f_continent $__cont title __title + if [ "$1" = "$__title" ]; then + if [ "$2" ]; then + setvar "$2" $__cont + else + echo "$__cont" + fi return $SUCCESS fi done return $FAILURE } -# f_OCEANP $cont +# f_OCEANP $cont [$var_to_set] # # Returns "1" if the first argument is an ocean, otherwise NULL. # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_OCEANP() { case "$1" in arctic|atlantic|indian|pacific) - echo 1 + if [ "$2" ]; then + setvar "$2" 1 + else + echo 1 + fi + ;; + *) + [ "$2" ] && setvar "$2" "" esac } Modified: stable/10/usr.sbin/bsdconfig/timezone/share/countries.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/share/countries.subr Thu Mar 5 00:41:03 2015 (r279615) +++ stable/10/usr.sbin/bsdconfig/timezone/share/countries.subr Thu Mar 5 00:42:06 2015 (r279616) @@ -1,6 +1,6 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; then _TIMEZONE_COUNTRIES_SUBR=1 # -# Copyright (c) 2011-2012 Devin Teske +# Copyright (c) 2011-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +25,10 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ FUNCTIONS -# f_country $code $property +# f_country $code $property [$var_to_set] # # Returns a single property of a given country. Available properties are: # @@ -44,10 +46,13 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; th # descr_N Like name, but for the Nth zone when the country has # multiple zones (nzones > 0) # +# If $var_to_set is missing or NULL, the value of $var_to_get is printed to +# standard output for capturing in a sub-shell (which is less-recommended +# because of performance degredation; for example, when called in a loop). +# f_country() { - local code="$1" property="$2" - eval echo \"\${country_${code}_$property}\" + f_getvar "country_${1}_$2" $3 } # f_sort_countries @@ -59,22 +64,42 @@ f_country() # afterward is the sh(1) function which utilizes the below awk script. # f_sort_countries_awk=' +function _asorti(src, dest) { - split($0, array, /[[:space:]]+/) + k = nitems = 0 + for (i in src) dest[++nitems] = i + for (i = 1; i <= nitems; k = i++) { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) { + dest[k+1] = dest[k]; k-- + } + dest[k+1] = idx + } + return nitems +} +BEGIN { + split(ENVIRON["COUNTRIES"], array, /[[:space:]]+/) for (item in array) { tlc = array[item] - print ENVIRON["country_" tlc "_name"] " " tlc + name = ENVIRON["country_" tlc "_name"] + countries[name] = tlc } + n = _asorti(countries, sorted_countries) + for (i = 1; i <= n; i++) + print countries[sorted_countries[i]] + exit } ' f_sort_countries() { - COUNTRIES=$( echo "$COUNTRIES" | awk "$f_sort_countries_awk" | - sort | awk '{print $NF}' ) - export COUNTRIES + export COUNTRIES # for awk(1) ENVIRON[] visibility + COUNTRIES=$( awk "$f_sort_countries_awk" ) + export COUNTRIES # Pedantic } +############################################################ MAIN + f_dprintf "%s: Successfully loaded." timezone/countries.subr fi # ! $_TIMEZONE_COUNTRIES_SUBR Modified: stable/10/usr.sbin/bsdconfig/timezone/timezone ============================================================================== --- stable/10/usr.sbin/bsdconfig/timezone/timezone Thu Mar 5 00:41:03 2015 (r279615) +++ stable/10/usr.sbin/bsdconfig/timezone/timezone Thu Mar 5 00:42:06 2015 (r279616) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2011-2013 Devin Teske +# Copyright (c) 2011-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -277,8 +277,8 @@ f_make_menus # creates $continen # # Launch application main menu # -defaultctry="" -defaultzone="" +defaultctry= +defaultzone= NEED_CONTINENT=1 NEED_COUNTRY=1 while :; do @@ -296,10 +296,10 @@ while :; do continent=$( eval f_dialog_menutag2item \"\$mtag\" \ $continent_menu_list ) - cont=$( f_find_continent "$continent" ) - cont_title=$( f_continent $cont title ) - nitems=$( f_continent $cont nitems ) - isocean=$( f_OCEANP $cont ) + f_find_continent "$continent" cont + f_continent $cont title cont_title + f_continent $cont nitems nitems + f_OCEANP $cont isocean fi if [ "$NEED_COUNTRY" ]; then @@ -342,7 +342,7 @@ while :; do # # Calculate size of menu # - menu_list=$( f_continent $cont menu_list ) + f_continent $cont menu_list menu_list eval f_dialog_menu_size height width rows \ \"\$title\" \ \"\$btitle\" \ @@ -375,7 +375,7 @@ while :; do fi # Get the country code from the user's selection - tlc=$( f_continent $cont tlc_$tag ) + f_continent $cont tlc_$tag tlc NEED_COUNTRY= fi @@ -384,12 +384,12 @@ while :; do # If the selection has only one zone (nzones == -1), # just set it. # - nzones=$( f_country $tlc nzones ) + f_country $tlc nzones nzones if [ $nzones -lt 0 ]; then - real_cont=$( f_country $tlc cont ) - real_continent=$( f_continent $real_cont name ) - name=$( f_country $tlc name ) - filename=$( f_country $tlc filename ) + f_country $tlc cont real_cont + f_continent $real_cont name real_continent + f_country $tlc name name + f_country $tlc filename filename if ! f_confirm_zone "$real_continent/$filename"; then [ $nitems -eq 1 ] && NEED_CONTINENT=1 @@ -397,13 +397,13 @@ while :; do continue fi else - f_sprintf title "$msg_country_time_zones" \ - "$( f_country $tlc name )" + f_country $tlc name name + f_sprintf title "$msg_country_time_zones" "$name" f_dialog_title "$title" title="$DIALOG_TITLE" btitle="$DIALOG_BACKTITLE" f_dialog_title_restore prompt="$msg_select_zone" - menu_list=$( f_country $tlc menu_list ) + f_country $tlc menu_list menu_list eval f_dialog_menu_size height width rows \ \"\$title\" \"\$btitle\" \"\$prompt\" \"\" $menu_list @@ -432,10 +432,10 @@ while :; do continue fi - real_cont=$( f_country $tlc cont_$n ) - real_continent=$( f_continent $real_cont name ) - name=$( f_country $tlc name ) - filename=$( f_country $tlc filename_$n ) + f_country $tlc cont_$n real_cont + f_continent $real_cont name real_continent + f_country $tlc name name + f_country $tlc filename_$n filename f_confirm_zone "$real_continent/$filename" || continue fi From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:42:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B6833F4; Thu, 5 Mar 2015 00:42:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5B808D12; Thu, 5 Mar 2015 00:42:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250gxS7090836; Thu, 5 Mar 2015 00:42:59 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250gxoe090835; Thu, 5 Mar 2015 00:42:59 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050042.t250gxoe090835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:42: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: r279617 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:42:59 -0000 Author: dteske Date: Thu Mar 5 00:42:58 2015 New Revision: 279617 URL: https://svnweb.freebsd.org/changeset/base/279617 Log: MFC r278490: Add bsdconfig api functions f_dialog_pause()/f_dialog_pause_no_cancel() Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Mar 5 00:42:06 2015 (r279616) +++ stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Mar 5 00:42:58 2015 (r279617) @@ -1580,6 +1580,56 @@ f_xdialog_info() -1 # timeout of -1 means abort when EOF on stdin } +############################################################ PAUSE FUNCTIONS + +# f_dialog_pause $msg_text $duration [$hline] +# +# Display a message in a widget with a progress bar that runs backward for +# $duration seconds. +# +f_dialog_pause() +{ + local pause_text="$1" duration="$2" hline="$3" height width + f_isinteger "$duration" || return $FAILURE + f_dialog_buttonbox_size height width \ + "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$pause_text" "$hline" + if [ "$USE_XDIALOG" ]; then + $DIALOG \ + --title "$DIALOG_TITLE" \ + --backtitle "$DIALOG_BACKTITLE" \ + --ok-label "$msg_skip" \ + --cancel-label "$msg_cancel" \ + ${noCancel:+--no-cancel} \ + --timeout "$duration" \ + --yesno "$pause_text" \ + $height $width + else + [ $duration -gt 0 ] && duration=$(( $duration - 1 )) + [ $duration -gt 1 ] && duration=$(( $duration - 1 )) + height=$(( $height + 3 )) # Add height for progress bar + $DIALOG \ + --title "$DIALOG_TITLE" \ + --backtitle "$DIALOG_BACKTITLE" \ + --hline "$hline" \ + --ok-label "$msg_skip" \ + --cancel-label "$msg_cancel" \ + ${noCancel:+--no-cancel} \ + --pause "$pause_text" \ + $height $width "$duration" + fi +} + +# f_dialog_pause_no_cancel $msg_text $duration [$hline] +# +# Display a message in a widget with a progress bar that runs backward for +# $duration seconds. No cancel button is provided. Always returns success. +# +f_dialog_pause_no_cancel() +{ + noCancel=1 f_dialog_pause "$@" + return $SUCCESS +} + ############################################################ MSGBOX FUNCTIONS # f_dialog_msgbox $msg_text [$hline] From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:43:51 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFD1B564; Thu, 5 Mar 2015 00:43:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C9C6BD1F; Thu, 5 Mar 2015 00:43:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250hpVu091018; Thu, 5 Mar 2015 00:43:51 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250hpFP091017; Thu, 5 Mar 2015 00:43:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050043.t250hpFP091017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:43: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: r279618 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:43:52 -0000 Author: dteske Date: Thu Mar 5 00:43:50 2015 New Revision: 279618 URL: https://svnweb.freebsd.org/changeset/base/279618 Log: MFC r278491: Add bsdconfig api function f_dialog_menutag2help() Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Mar 5 00:42:58 2015 (r279617) +++ stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Mar 5 00:43:50 2015 (r279618) @@ -2116,6 +2116,39 @@ f_dialog_menutag2index_with_help() return $FAILURE } +# f_dialog_menutag2help $tag_chosen $tag1 $item1 $help1 $tag2 $item2 $help2 ... +# +# To use the `--menu' option of dialog(1) with the `--item-help' option, you +# must pass an ordered list of tag/item/help triplets on the command-line. When +# the user selects a menu option the tag for that item is printed to stderr. +# +# This function allows you to dereference the tag chosen by the user back into +# the help associated with said tag (item is discarded/ignored). +# +# Pass the tag chosen by the user as the first argument, followed by the +# ordered list of tag/item/help triplets (HINT: use the same tag/item/help list +# as was passed to dialog(1) for consistency). +# +# If the tag cannot be found, NULL is returned. +# +f_dialog_menutag2help() +{ + local tag="$1" tagn help + shift 1 # tag + + while [ $# -gt 0 ]; do + tagn="$1" + help="$3" + shift 3 # tagn/item/help + + if [ "$tag" = "$tagn" ]; then + echo "$help" + return $SUCCESS + fi + done + return $FAILURE +} + ############################################################ INIT FUNCTIONS # f_dialog_init From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 00:44:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76D93699; Thu, 5 Mar 2015 00:44:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5F546D29; Thu, 5 Mar 2015 00:44:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t250iqSL091255; Thu, 5 Mar 2015 00:44:52 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t250iond091243; Thu, 5 Mar 2015 00:44:50 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503050044.t250iond091243@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 5 Mar 2015 00:44:50 +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: r279619 - in stable/10/usr.sbin/bsdconfig: console includes networking/share share usermgmt/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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 00:44:52 -0000 Author: dteske Date: Thu Mar 5 00:44:50 2015 New Revision: 279619 URL: https://svnweb.freebsd.org/changeset/base/279619 Log: MFC r278493: Update copyrights. Modified: stable/10/usr.sbin/bsdconfig/console/INDEX stable/10/usr.sbin/bsdconfig/includes/INDEX stable/10/usr.sbin/bsdconfig/networking/share/device.subr stable/10/usr.sbin/bsdconfig/share/dialog.subr stable/10/usr.sbin/bsdconfig/share/keymap.subr stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/console/INDEX ============================================================================== --- stable/10/usr.sbin/bsdconfig/console/INDEX Thu Mar 5 00:43:50 2015 (r279618) +++ stable/10/usr.sbin/bsdconfig/console/INDEX Thu Mar 5 00:44:50 2015 (r279619) @@ -1,5 +1,5 @@ # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012 Devin Teske +# Copyright (c) 2012-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: stable/10/usr.sbin/bsdconfig/includes/INDEX ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/INDEX Thu Mar 5 00:43:50 2015 (r279618) +++ stable/10/usr.sbin/bsdconfig/includes/INDEX Thu Mar 5 00:44:50 2015 (r279619) @@ -1,4 +1,4 @@ -# 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/bsdconfig/networking/share/device.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/networking/share/device.subr Thu Mar 5 00:43:50 2015 (r279618) +++ stable/10/usr.sbin/bsdconfig/networking/share/device.subr Thu Mar 5 00:44:50 2015 (r279619) @@ -1,6 +1,6 @@ if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1 # -# Copyright (c) 2006-2013 Devin Teske +# Copyright (c) 2006-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Mar 5 00:43:50 2015 (r279618) +++ stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Mar 5 00:44:50 2015 (r279619) @@ -1,6 +1,6 @@ if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_SUBR=1 # -# Copyright (c) 2006-2014 Devin Teske +# Copyright (c) 2006-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: stable/10/usr.sbin/bsdconfig/share/keymap.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/keymap.subr Thu Mar 5 00:43:50 2015 (r279618) +++ stable/10/usr.sbin/bsdconfig/share/keymap.subr Thu Mar 5 00:44:50 2015 (r279619) @@ -1,6 +1,6 @@ if [ ! "$_KEYMAP_SUBR" ]; then _KEYMAP_SUBR=1 # -# 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/bsdconfig/usermgmt/share/user.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr Thu Mar 5 00:43:50 2015 (r279618) +++ stable/10/usr.sbin/bsdconfig/usermgmt/share/user.subr Thu Mar 5 00:44:50 2015 (r279619) @@ -1,7 +1,7 @@ if [ ! "$_USERMGMT_USER_SUBR" ]; then _USERMGMT_USER_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 From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:00:28 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A2FF90A; Thu, 5 Mar 2015 09:00:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 25D2F2E4; Thu, 5 Mar 2015 09:00:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2590RFa024626; Thu, 5 Mar 2015 09:00:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2590R8p024625; Thu, 5 Mar 2015 09:00:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503050900.t2590R8p024625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 Mar 2015 09:00: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: r279631 - stable/10/lib/libstdthreads 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:00:28 -0000 Author: kib Date: Thu Mar 5 09:00:27 2015 New Revision: 279631 URL: https://svnweb.freebsd.org/changeset/base/279631 Log: MFC r279318: Check that the pointer to the thread return value is not NULL before dereferencing. NULL is allowed by C11 and must be handled. Modified: stable/10/lib/libstdthreads/thrd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstdthreads/thrd.c ============================================================================== --- stable/10/lib/libstdthreads/thrd.c Thu Mar 5 08:53:10 2015 (r279630) +++ stable/10/lib/libstdthreads/thrd.c Thu Mar 5 09:00:27 2015 (r279631) @@ -108,7 +108,8 @@ thrd_join(thrd_t thr, int *res) if (pthread_join(thr, &value_ptr) != 0) return (thrd_error); - *res = (intptr_t)value_ptr; + if (res != NULL) + *res = (intptr_t)value_ptr; return (thrd_success); } From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:01:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEB1AB42; Thu, 5 Mar 2015 09:01:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BAC3F393; Thu, 5 Mar 2015 09:01:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2591lhx025941; Thu, 5 Mar 2015 09:01:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2591lqb025940; Thu, 5 Mar 2015 09:01:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503050901.t2591lqb025940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 Mar 2015 09:01: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: r279632 - stable/10/lib/libstdthreads 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:01:47 -0000 Author: kib Date: Thu Mar 5 09:01:46 2015 New Revision: 279632 URL: https://svnweb.freebsd.org/changeset/base/279632 Log: MFC r279326: Use pthread_mutex_trylock(3) to implement mtx_trylock(3). Modified: stable/10/lib/libstdthreads/mtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstdthreads/mtx.c ============================================================================== --- stable/10/lib/libstdthreads/mtx.c Thu Mar 5 09:00:27 2015 (r279631) +++ stable/10/lib/libstdthreads/mtx.c Thu Mar 5 09:01:46 2015 (r279632) @@ -96,7 +96,7 @@ int mtx_trylock(mtx_t *mtx) { - switch (pthread_mutex_lock(mtx)) { + switch (pthread_mutex_trylock(mtx)) { case 0: return (thrd_success); case EBUSY: From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:23:44 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF282FF2; Thu, 5 Mar 2015 09:23:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BA7BD7F7; Thu, 5 Mar 2015 09:23:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259NiQl035640; Thu, 5 Mar 2015 09:23:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259NiRq035639; Thu, 5 Mar 2015 09:23:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050923.t259NiRq035639@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:23: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: r279633 - stable/10/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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:23:44 -0000 Author: hselasky Date: Thu Mar 5 09:23:43 2015 New Revision: 279633 URL: https://svnweb.freebsd.org/changeset/base/279633 Log: MFC r279241 and r279242: Fix debugging macros. Modified: stable/10/sys/sys/queue.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/queue.h ============================================================================== --- stable/10/sys/sys/queue.h Thu Mar 5 09:01:46 2015 (r279632) +++ stable/10/sys/sys/queue.h Thu Mar 5 09:23:43 2015 (r279633) @@ -116,7 +116,7 @@ struct qm_trace { }; #define TRACEBUF struct qm_trace trace; -#define TRACEBUF_INITIALIZER { __FILE__, __LINE__, NULL, 0 } , +#define TRACEBUF_INITIALIZER { __LINE__, 0, __FILE__, NULL } , #define TRASHIT(x) do {(x) = (void *)-1;} while (0) #define QMD_SAVELINK(name, link) void **name = (void *)&(link) @@ -612,7 +612,7 @@ struct { \ TAILQ_NEXT((listelm), field) = (elm); \ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ @@ -622,7 +622,7 @@ struct { \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:27:40 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A55D91E8; Thu, 5 Mar 2015 09:27:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 90C0681E; Thu, 5 Mar 2015 09:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259ReTp036174; Thu, 5 Mar 2015 09:27:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259RehA036173; Thu, 5 Mar 2015 09:27:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050927.t259RehA036173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279634 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:27:40 -0000 Author: hselasky Date: Thu Mar 5 09:27:39 2015 New Revision: 279634 URL: https://svnweb.freebsd.org/changeset/base/279634 Log: MFC r279241 and r279242: Fix debugging macros. Modified: stable/9/sys/sys/queue.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/queue.h ============================================================================== --- stable/9/sys/sys/queue.h Thu Mar 5 09:23:43 2015 (r279633) +++ stable/9/sys/sys/queue.h Thu Mar 5 09:27:39 2015 (r279634) @@ -610,7 +610,7 @@ struct { \ TAILQ_NEXT((listelm), field) = (elm); \ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ @@ -620,7 +620,7 @@ struct { \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:29:06 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AB3C31D; Thu, 5 Mar 2015 09:29:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6627F829; Thu, 5 Mar 2015 09:29:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259T6Pu036649; Thu, 5 Mar 2015 09:29:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259T6VH036648; Thu, 5 Mar 2015 09:29:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050929.t259T6VH036648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r279635 - stable/8/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:29:06 -0000 Author: hselasky Date: Thu Mar 5 09:29:05 2015 New Revision: 279635 URL: https://svnweb.freebsd.org/changeset/base/279635 Log: MFC r279242: Fix debugging macros. Modified: stable/8/sys/sys/queue.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/sys/queue.h ============================================================================== --- stable/8/sys/sys/queue.h Thu Mar 5 09:27:39 2015 (r279634) +++ stable/8/sys/sys/queue.h Thu Mar 5 09:29:05 2015 (r279635) @@ -608,7 +608,7 @@ struct { \ TAILQ_NEXT((listelm), field) = (elm); \ (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ } while (0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ @@ -618,7 +618,7 @@ struct { \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ QMD_TRACE_ELEM(&(elm)->field); \ - QMD_TRACE_ELEM(&listelm->field); \ + QMD_TRACE_ELEM(&(listelm)->field); \ } while (0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:31:37 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E99E473; Thu, 5 Mar 2015 09:31:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5A5CD8CE; Thu, 5 Mar 2015 09:31:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259Vb7h040482; Thu, 5 Mar 2015 09:31:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259Vbxe040481; Thu, 5 Mar 2015 09:31:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050931.t259Vbxe040481@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:31:37 +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: r279636 - stable/10/sys/dev/usb 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:31:37 -0000 Author: hselasky Date: Thu Mar 5 09:31:36 2015 New Revision: 279636 URL: https://svnweb.freebsd.org/changeset/base/279636 Log: MFC r279270: Add ugen keyword to USB pnpinfo. Remove extra space from existing pnpinfo. PR: 198015 PR: 198019 PR: 198026 Modified: stable/10/sys/dev/usb/usb_hub.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_hub.c ============================================================================== --- stable/10/sys/dev/usb/usb_hub.c Thu Mar 5 09:29:05 2015 (r279635) +++ stable/10/sys/dev/usb/usb_hub.c Thu Mar 5 09:31:36 2015 (r279636) @@ -1694,11 +1694,19 @@ uhub_child_location_string(device_t pare } goto done; } - snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u", - device_get_unit(res.udev->bus->bdev), - (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0, - res.portno, - res.udev->device_index, res.iface_index); + snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u" + " interface=%u" +#if USB_HAVE_UGEN + " ugen=%s" +#endif + , device_get_unit(res.udev->bus->bdev) + , (res.udev->parent_hub != NULL) ? + res.udev->parent_hub->device_index : 0 + , res.portno, res.udev->device_index, res.iface_index +#if USB_HAVE_UGEN + , res.udev->ugen_name +#endif + ); done: mtx_unlock(&Giant); @@ -1740,7 +1748,7 @@ uhub_child_pnpinfo_string(device_t paren "release=0x%04x " "mode=%s " "intclass=0x%02x intsubclass=0x%02x " - "intprotocol=0x%02x " "%s%s", + "intprotocol=0x%02x" "%s%s", UGETW(res.udev->ddesc.idVendor), UGETW(res.udev->ddesc.idProduct), res.udev->ddesc.bDeviceClass, From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:35:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1AB369B; Thu, 5 Mar 2015 09:35:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BD8C1905; Thu, 5 Mar 2015 09:35:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259ZG5N041059; Thu, 5 Mar 2015 09:35:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259ZGqS041058; Thu, 5 Mar 2015 09:35:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050935.t259ZGqS041058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279637 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:35:16 -0000 Author: hselasky Date: Thu Mar 5 09:35:15 2015 New Revision: 279637 URL: https://svnweb.freebsd.org/changeset/base/279637 Log: MFC r279270: Add ugen keyword to USB pnpinfo. Remove extra space from existing pnpinfo. PR: 198015 PR: 198019 PR: 198026 Modified: stable/9/sys/dev/usb/usb_hub.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_hub.c ============================================================================== --- stable/9/sys/dev/usb/usb_hub.c Thu Mar 5 09:31:36 2015 (r279636) +++ stable/9/sys/dev/usb/usb_hub.c Thu Mar 5 09:35:15 2015 (r279637) @@ -1611,10 +1611,11 @@ uhub_child_location_string(device_t pare } goto done; } - snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u", + snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u" + " ugen=%s", (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0, res.portno, device_get_unit(res.udev->bus->bdev), - res.udev->device_index, res.iface_index); + res.udev->device_index, res.iface_index, res.udev->ugen_name); done: mtx_unlock(&Giant); @@ -1656,7 +1657,7 @@ uhub_child_pnpinfo_string(device_t paren "release=0x%04x " "mode=%s " "intclass=0x%02x intsubclass=0x%02x " - "intprotocol=0x%02x " "%s%s", + "intprotocol=0x%02x" "%s%s", UGETW(res.udev->ddesc.idVendor), UGETW(res.udev->ddesc.idProduct), res.udev->ddesc.bDeviceClass, From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:37:28 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA227A15; Thu, 5 Mar 2015 09:37:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B5B4893E; Thu, 5 Mar 2015 09:37:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259bSIT041420; Thu, 5 Mar 2015 09:37:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259bSXI041419; Thu, 5 Mar 2015 09:37:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050937.t259bSXI041419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r279638 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:37:28 -0000 Author: hselasky Date: Thu Mar 5 09:37:27 2015 New Revision: 279638 URL: https://svnweb.freebsd.org/changeset/base/279638 Log: MFC r279270: Add ugen keyword to USB pnpinfo. Remove extra space from existing pnpinfo. PR: 198015 PR: 198019 PR: 198026 Modified: stable/8/sys/dev/usb/usb_hub.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Thu Mar 5 09:35:15 2015 (r279637) +++ stable/8/sys/dev/usb/usb_hub.c Thu Mar 5 09:37:27 2015 (r279638) @@ -1610,10 +1610,11 @@ uhub_child_location_string(device_t pare } goto done; } - snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u", + snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u" + " ugen=%s", (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0, res.portno, device_get_unit(res.udev->bus->bdev), - res.udev->device_index, res.iface_index); + res.udev->device_index, res.iface_index, res.udev->ugen_name); done: mtx_unlock(&Giant); @@ -1655,7 +1656,7 @@ uhub_child_pnpinfo_string(device_t paren "release=0x%04x " "mode=%s " "intclass=0x%02x intsubclass=0x%02x " - "intprotocol=0x%02x " "%s%s", + "intprotocol=0x%02x" "%s%s", UGETW(res.udev->ddesc.idVendor), UGETW(res.udev->ddesc.idProduct), res.udev->ddesc.bDeviceClass, From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:39:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7BDBBCC; Thu, 5 Mar 2015 09:39:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 91E9C95E; Thu, 5 Mar 2015 09:39:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259dUAZ041750; Thu, 5 Mar 2015 09:39:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259dUKu041747; Thu, 5 Mar 2015 09:39:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050939.t259dUKu041747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:39:30 +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: r279639 - stable/10/usr.bin/unifdef 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:39:30 -0000 Author: hselasky Date: Thu Mar 5 09:39:29 2015 New Revision: 279639 URL: https://svnweb.freebsd.org/changeset/base/279639 Log: MFC r279297: Update to upstream version 2.10 The most notable new feature is support for definition files. Obtained from: http://dotat.at/prog/unifdef Modified: stable/10/usr.bin/unifdef/unifdef.1 stable/10/usr.bin/unifdef/unifdef.c stable/10/usr.bin/unifdef/unifdef.h stable/10/usr.bin/unifdef/unifdefall.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/unifdef/unifdef.1 ============================================================================== --- stable/10/usr.bin/unifdef/unifdef.1 Thu Mar 5 09:37:27 2015 (r279638) +++ stable/10/usr.bin/unifdef/unifdef.1 Thu Mar 5 09:39:29 2015 (r279639) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 21, 2012 +.Dd January 7, 2014 .Dt UNIFDEF 1 PRM .Os " " .Sh NAME @@ -44,6 +44,7 @@ .Op Fl [i]D Ns Ar sym Ns Op = Ns Ar val .Op Fl [i]U Ns Ar sym .Ar ... +.Op Fl f Ar defile .Op Fl x Bro Ar 012 Brc .Op Fl M Ar backext .Op Fl o Ar outfile @@ -70,11 +71,17 @@ utility acts on .Ic #elif , #else , and .Ic #endif -lines. -A directive is only processed -if the symbols specified on the command line are sufficient to allow -.Nm -to get a definite value for its control expression. +lines, +using macros specified in +.Fl D +and +.Fl U +command line options or in +.Fl f +definitions files. +A directive is processed +if the macro specifications are sufficient to provide +a definite value for its control expression. If the result is false, the directive and the following lines under its control are removed. If the result is true, @@ -84,7 +91,7 @@ An or .Ic #ifndef directive is passed through unchanged -if its controlling symbol is not specified on the command line. +if its controlling macro is not specified. Any .Ic #if or @@ -110,7 +117,7 @@ and .Ic #elif lines: integer constants, -integer values of symbols defined on the command line, +integer values of macros defined on the command line, the .Fn defined operator, @@ -131,16 +138,42 @@ if either operand of .Ic || is definitely true then the result is true. .Pp -In most cases, the +When evaluating an expression, .Nm -utility does not distinguish between object-like macros -(without arguments) and function-like arguments (with arguments). -If a macro is not explicitly defined, or is defined with the +does not expand macros first. +The value of a macro must be a simple number, +not an expression. +A limited form of indirection is allowed, +where one macro's value is the name of another. +.Pp +In most cases, +.Nm +does not distinguish between object-like macros +(without arguments) and function-like macros (with arguments). +A function-like macro invocation can appear in +.Ic #if +and +.Ic #elif +control expressions. +If the macro is not explicitly defined, +or is defined with the .Fl D -flag on the command-line, its arguments are ignored. +flag on the command-line, +or with +.Ic #define +in a +.Fl f +definitions file, +its arguments are ignored. If a macro is explicitly undefined on the command line with the .Fl U -flag, it may not have any arguments since this leads to a syntax error. +flag, +or with +.Ic #undef +in a +.Fl f +definitions file, +it may not have any arguments since this leads to a syntax error. .Pp The .Nm @@ -161,7 +194,7 @@ It uses .Nm Fl s and .Nm cpp Fl dM -to get lists of all the controlling symbols +to get lists of all the controlling macros and their definitions (or lack thereof), then invokes .Nm @@ -169,19 +202,15 @@ with appropriate arguments to process th .Sh OPTIONS .Bl -tag -width indent -compact .It Fl D Ns Ar sym Ns = Ns Ar val -Specify that a symbol is defined to a given value -which is used when evaluating -.Ic #if -and -.Ic #elif -control expressions. +Specify that a macro is defined to a given value. .Pp .It Fl D Ns Ar sym -Specify that a symbol is defined to the value 1. +Specify that a macro is defined to the value 1. .Pp .It Fl U Ns Ar sym -Specify that a symbol is undefined. -If the same symbol appears in more than one argument, +Specify that a macro is undefined. +.Pp +If the same macro appears in more than one argument, the last occurrence dominates. .Pp .It Fl iD Ns Ar sym Ns Op = Ns Ar val @@ -193,9 +222,37 @@ are ignored within and .Ic #ifndef blocks -controlled by symbols +controlled by macros specified with these options. .Pp +.It Fl f Ar defile +The file +.Ar defile +contains +.Ic #define +and +.Ic #undef +preprocessor directives, +which have the same effect as the corresponding +.Fl D +and +.Fl U +command-line arguments. +You can have multiple +.Fl f +arguments and mix them with +.Fl D +and +.Fl U +arguments; +later options override earlier ones. +.Pp +Each directive must be on a single line. +Object-like macro definitions (without arguments) +are set to the given value. +Function-like macro definitions (with arguments) +are treated as if they are set to 1. +.Pp .It Fl b Replace removed lines with blank lines instead of deleting them. @@ -291,24 +348,15 @@ instead of the standard output when proc Instead of processing an input file as usual, this option causes .Nm -to produce a list of symbols that appear in expressions -that -.Nm -understands. -It is useful in conjunction with the -.Fl dM -option of -.Xr cpp 1 -for creating -.Nm -command lines. +to produce a list of macros that are used in +preprocessor directive controlling expressions. .Pp .It Fl S Like the .Fl s -option, but the nesting depth of each symbol is also printed. +option, but the nesting depth of each macro is also printed. This is useful for working out the number of possible combinations -of interdependent defined/undefined symbols. +of interdependent defined/undefined macros. .Pp .It Fl t Disables parsing for C strings, comments, @@ -406,6 +454,9 @@ in comment. .Sh SEE ALSO .Xr cpp 1 , .Xr diff 1 +.Pp +The unifdef home page is +.Pa http://dotat.at/prog/unifdef .Sh HISTORY The .Nm @@ -430,7 +481,7 @@ cannot be handled in every situation. .Pp Trigraphs are not recognized. .Pp -There is no support for symbols with different definitions at +There is no support for macros with different definitions at different points in the source file. .Pp The text-mode and ignore functionality does not correspond to modern Modified: stable/10/usr.bin/unifdef/unifdef.c ============================================================================== --- stable/10/usr.bin/unifdef/unifdef.c Thu Mar 5 09:37:27 2015 (r279638) +++ stable/10/usr.bin/unifdef/unifdef.c Thu Mar 5 09:39:29 2015 (r279639) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 - 2013 Tony Finch + * Copyright (c) 2002 - 2014 Tony Finch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -46,7 +46,7 @@ #include "unifdef.h" static const char copyright[] = - "@(#) $Version: unifdef-2.7 $\n" + "@(#) $Version: unifdef-2.10 $\n" "@(#) $FreeBSD$\n" "@(#) $Author: Tony Finch (dot@dotat.at) $\n" "@(#) $URL: http://dotat.at/prog/unifdef $\n" @@ -138,7 +138,7 @@ static char const * const linestate_name */ #define MAXDEPTH 64 /* maximum #if nesting */ #define MAXLINE 4096 /* maximum length of line */ -#define MAXSYMS 4096 /* maximum number of symbols */ +#define MAXSYMS 16384 /* maximum number of symbols */ /* * Sometimes when editing a keyword the replacement text is longer, so @@ -180,6 +180,15 @@ static char *tempname; /* av static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */ static char *keyword; /* used for editing #elif's */ +/* + * When processing a file, the output's newline style will match the + * input's, and unifdef correctly handles CRLF or LF endings whatever + * the platform's native style. The stdio streams are opened in binary + * mode to accommodate platforms whose native newline style is CRLF. + * When the output isn't a processed input file (when it is error / + * debug / diagnostic messages) then unifdef uses native line endings. + */ + static const char *newline; /* input file format */ static const char newline_unix[] = "\n"; static const char newline_crlf[] = "\r\n"; @@ -200,33 +209,41 @@ static bool firstsym; /* di static int exitmode; /* exit status mode */ static int exitstat; /* program exit status */ -static void addsym(bool, bool, char *); +static void addsym1(bool, bool, char *); +static void addsym2(bool, const char *, const char *); static char *astrcat(const char *, const char *); static void cleantemp(void); -static void closeout(void); +static void closeio(void); static void debug(const char *, ...); +static void debugsym(const char *, int); +static bool defundef(void); +static void defundefile(const char *); static void done(void); static void error(const char *); -static int findsym(const char *); +static int findsym(const char **); static void flushline(bool); static void hashline(void); static void help(void); static Linetype ifeval(const char **); static void ignoreoff(void); static void ignoreon(void); +static void indirectsym(void); static void keywordedit(const char *); +static const char *matchsym(const char *, const char *); static void nest(void); static Linetype parseline(void); static void process(void); static void processinout(const char *, const char *); static const char *skipargs(const char *); static const char *skipcomment(const char *); +static const char *skiphash(void); +static const char *skipline(const char *); static const char *skipsym(const char *); static void state(Ifstate); -static int strlcmp(const char *, const char *, size_t); static void unnest(void); static void usage(void); static void version(void); +static const char *xstrdup(const char *, const char *); #define endsym(c) (!isalnum((unsigned char)c) && c != '_') @@ -238,7 +255,7 @@ main(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "i:D:U:I:M:o:x:bBcdehKklmnsStV")) != -1) + while ((opt = getopt(argc, argv, "i:D:U:f:I:M:o:x:bBcdehKklmnsStV")) != -1) switch (opt) { case 'i': /* treat stuff controlled by these symbols as text */ /* @@ -248,17 +265,17 @@ main(int argc, char *argv[]) */ opt = *optarg++; if (opt == 'D') - addsym(true, true, optarg); + addsym1(true, true, optarg); else if (opt == 'U') - addsym(true, false, optarg); + addsym1(true, false, optarg); else usage(); break; case 'D': /* define a symbol */ - addsym(false, true, optarg); + addsym1(false, true, optarg); break; case 'U': /* undef a symbol */ - addsym(false, false, optarg); + addsym1(false, false, optarg); break; case 'I': /* no-op for compatibility with cpp */ break; @@ -278,6 +295,9 @@ main(int argc, char *argv[]) case 'e': /* fewer errors from dodgy lines */ iocccok = true; break; + case 'f': /* definitions file */ + defundefile(optarg); + break; case 'h': help(); break; @@ -334,6 +354,7 @@ main(int argc, char *argv[]) argc = 1; if (argc == 1 && !inplace && ofilename == NULL) ofilename = "-"; + indirectsym(); atexit(cleantemp); if (ofilename != NULL) @@ -392,10 +413,10 @@ processinout(const char *ifn, const char if (backext != NULL) { char *backname = astrcat(ofn, backext); if (rename(ofn, backname) < 0) - err(2, "can't rename \"%s\" to \"%s%s\"", ofn, ofn, backext); + err(2, "can't rename \"%s\" to \"%s\"", ofn, backname); free(backname); } - if (rename(tempname, ofn) < 0) + if (replace(tempname, ofn) < 0) err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn); free(tempname); tempname = NULL; @@ -434,7 +455,7 @@ synopsis(FILE *fp) { fprintf(fp, "usage: unifdef [-bBcdehKkmnsStV] [-x{012}] [-Mext] [-opath] \\\n" - " [-[i]Dsym[=val]] [-[i]Usym] ... [file] ...\n"); + " [-[i]Dsym[=val]] [-[i]Usym] [-fpath] ... [file] ...\n"); } static void @@ -455,6 +476,7 @@ help(void) " -iDsym=val \\ ignore C strings and comments\n" " -iDsym ) in sections controlled by these\n" " -iUsym / preprocessor symbols\n" + " -fpath file containing #define and #undef directives\n" " -b blank lines instead of deleting them\n" " -B compress blank lines around deleted section\n" " -c complement (invert) keep vs. delete\n" @@ -650,12 +672,12 @@ done(void) { if (incomment) error("EOF in comment"); - closeout(); + closeio(); } /* * Write a line to the output or not, according to command line options. - * If writing fails, closeout() will print the error and exit. + * If writing fails, closeio() will print the error and exit. */ static void flushline(bool keep) @@ -671,19 +693,19 @@ flushline(bool keep) if (lnnum && delcount > 0) hashline(); if (fputs(tline, output) == EOF) - closeout(); + closeio(); delcount = 0; blankmax = blankcount = blankline ? blankcount + 1 : 0; } } else { if (lnblank && fputs(newline, output) == EOF) - closeout(); + closeio(); exitstat = 1; delcount += 1; blankcount = 0; } if (debugging && fflush(output) == EOF) - closeout(); + closeio(); } /* @@ -700,20 +722,21 @@ hashline(void) e = fprintf(output, "#line %d \"%s\"%s", linenum, linefile, newline); if (e < 0) - closeout(); + closeio(); } /* * Flush the output and handle errors. */ static void -closeout(void) +closeio(void) { /* Tidy up after findsym(). */ if (symdepth && !zerosyms) printf("\n"); - if (ferror(output) || fclose(output) == EOF) - err(2, "%s: can't write to output", filename); + if (output != NULL && (ferror(output) || fclose(output) == EOF)) + err(2, "%s: can't write to output", filename); + fclose(input); } /* @@ -727,6 +750,8 @@ process(void) is preceded by a large number of blank lines. */ blankmax = blankcount = 1000; zerosyms = true; + newline = NULL; + linenum = 0; while (lineval != LT_EOF) { lineval = parseline(); trans_table[ifstate[depth]][lineval](); @@ -746,105 +771,86 @@ parseline(void) { const char *cp; int cursym; - int kwlen; Linetype retval; Comment_state wascomment; - linenum++; - if (fgets(tline, MAXLINE, input) == NULL) { - if (ferror(input)) - err(2, "can't read %s", filename); - else - return (LT_EOF); - } + wascomment = incomment; + cp = skiphash(); + if (cp == NULL) + return (LT_EOF); if (newline == NULL) { if (strrchr(tline, '\n') == strrchr(tline, '\r') + 1) newline = newline_crlf; else newline = newline_unix; } - retval = LT_PLAIN; - wascomment = incomment; - cp = skipcomment(tline); - if (linestate == LS_START) { - if (*cp == '#') { - linestate = LS_HASH; - firstsym = true; - cp = skipcomment(cp + 1); - } else if (*cp != '\0') - linestate = LS_DIRTY; - } - if (!incomment && linestate == LS_HASH) { - keyword = tline + (cp - tline); - cp = skipsym(cp); - kwlen = cp - keyword; + if (*cp == '\0') { + retval = LT_PLAIN; + goto done; + } + keyword = tline + (cp - tline); + if ((cp = matchsym("ifdef", keyword)) != NULL || + (cp = matchsym("ifndef", keyword)) != NULL) { + cp = skipcomment(cp); + if ((cursym = findsym(&cp)) < 0) + retval = LT_IF; + else { + retval = (keyword[2] == 'n') + ? LT_FALSE : LT_TRUE; + if (value[cursym] == NULL) + retval = (retval == LT_TRUE) + ? LT_FALSE : LT_TRUE; + if (ignore[cursym]) + retval = (retval == LT_TRUE) + ? LT_TRUEI : LT_FALSEI; + } + } else if ((cp = matchsym("if", keyword)) != NULL) + retval = ifeval(&cp); + else if ((cp = matchsym("elif", keyword)) != NULL) + retval = linetype_if2elif(ifeval(&cp)); + else if ((cp = matchsym("else", keyword)) != NULL) + retval = LT_ELSE; + else if ((cp = matchsym("endif", keyword)) != NULL) + retval = LT_ENDIF; + else { + cp = skipsym(keyword); /* no way can we deal with a continuation inside a keyword */ if (strncmp(cp, "\\\r\n", 3) == 0 || strncmp(cp, "\\\n", 2) == 0) Eioccc(); - if (strlcmp("ifdef", keyword, kwlen) == 0 || - strlcmp("ifndef", keyword, kwlen) == 0) { - cp = skipcomment(cp); - if ((cursym = findsym(cp)) < 0) - retval = LT_IF; - else { - retval = (keyword[2] == 'n') - ? LT_FALSE : LT_TRUE; - if (value[cursym] == NULL) - retval = (retval == LT_TRUE) - ? LT_FALSE : LT_TRUE; - if (ignore[cursym]) - retval = (retval == LT_TRUE) - ? LT_TRUEI : LT_FALSEI; - } - cp = skipsym(cp); - } else if (strlcmp("if", keyword, kwlen) == 0) - retval = ifeval(&cp); - else if (strlcmp("elif", keyword, kwlen) == 0) - retval = linetype_if2elif(ifeval(&cp)); - else if (strlcmp("else", keyword, kwlen) == 0) - retval = LT_ELSE; - else if (strlcmp("endif", keyword, kwlen) == 0) - retval = LT_ENDIF; - else { - linestate = LS_DIRTY; - retval = LT_PLAIN; - } - cp = skipcomment(cp); - if (*cp != '\0') { + cp = skipline(cp); + retval = LT_PLAIN; + goto done; + } + cp = skipcomment(cp); + if (*cp != '\0') { + cp = skipline(cp); + if (retval == LT_TRUE || retval == LT_FALSE || + retval == LT_TRUEI || retval == LT_FALSEI) + retval = LT_IF; + if (retval == LT_ELTRUE || retval == LT_ELFALSE) + retval = LT_ELIF; + } + /* the following can happen if the last line of the file lacks a + newline or if there is too much whitespace in a directive */ + if (linestate == LS_HASH) { + long len = cp - tline; + if (fgets(tline + len, MAXLINE - len, input) == NULL) { + if (ferror(input)) + err(2, "can't read %s", filename); + /* append the missing newline at eof */ + strcpy(tline + len, newline); + cp += strlen(newline); + linestate = LS_START; + } else { linestate = LS_DIRTY; - if (retval == LT_TRUE || retval == LT_FALSE || - retval == LT_TRUEI || retval == LT_FALSEI) - retval = LT_IF; - if (retval == LT_ELTRUE || retval == LT_ELFALSE) - retval = LT_ELIF; - } - if (retval != LT_PLAIN && (wascomment || incomment)) { - retval = linetype_2dodgy(retval); - if (incomment) - linestate = LS_DIRTY; - } - /* skipcomment normally changes the state, except - if the last line of the file lacks a newline, or - if there is too much whitespace in a directive */ - if (linestate == LS_HASH) { - size_t len = cp - tline; - if (fgets(tline + len, MAXLINE - len, input) == NULL) { - if (ferror(input)) - err(2, "can't read %s", filename); - /* append the missing newline at eof */ - strcpy(tline + len, newline); - cp += strlen(newline); - linestate = LS_START; - } else { - linestate = LS_DIRTY; - } } } - if (linestate == LS_DIRTY) { - while (*cp != '\0') - cp = skipcomment(cp + 1); + if (retval != LT_PLAIN && (wascomment || linestate != LS_START)) { + retval = linetype_2dodgy(retval); + linestate = LS_DIRTY; } +done: debug("parser line %d state %s comment %s line", linenum, comment_name[incomment], linestate_name[linestate]); return (retval); @@ -854,34 +860,34 @@ parseline(void) * These are the binary operators that are supported by the expression * evaluator. */ -static Linetype op_strict(int *p, int v, Linetype at, Linetype bt) { +static Linetype op_strict(long *p, long v, Linetype at, Linetype bt) { if(at == LT_IF || bt == LT_IF) return (LT_IF); return (*p = v, v ? LT_TRUE : LT_FALSE); } -static Linetype op_lt(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_lt(long *p, Linetype at, long a, Linetype bt, long b) { return op_strict(p, a < b, at, bt); } -static Linetype op_gt(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_gt(long *p, Linetype at, long a, Linetype bt, long b) { return op_strict(p, a > b, at, bt); } -static Linetype op_le(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_le(long *p, Linetype at, long a, Linetype bt, long b) { return op_strict(p, a <= b, at, bt); } -static Linetype op_ge(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_ge(long *p, Linetype at, long a, Linetype bt, long b) { return op_strict(p, a >= b, at, bt); } -static Linetype op_eq(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_eq(long *p, Linetype at, long a, Linetype bt, long b) { return op_strict(p, a == b, at, bt); } -static Linetype op_ne(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_ne(long *p, Linetype at, long a, Linetype bt, long b) { return op_strict(p, a != b, at, bt); } -static Linetype op_or(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_or(long *p, Linetype at, long a, Linetype bt, long b) { if (!strictlogic && (at == LT_TRUE || bt == LT_TRUE)) return (*p = 1, LT_TRUE); return op_strict(p, a || b, at, bt); } -static Linetype op_and(int *p, Linetype at, int a, Linetype bt, int b) { +static Linetype op_and(long *p, Linetype at, long a, Linetype bt, long b) { if (!strictlogic && (at == LT_FALSE || bt == LT_FALSE)) return (*p = 0, LT_FALSE); return op_strict(p, a && b, at, bt); @@ -899,7 +905,7 @@ static Linetype op_and(int *p, Linetype */ struct ops; -typedef Linetype eval_fn(const struct ops *, int *, const char **); +typedef Linetype eval_fn(const struct ops *, long *, const char **); static eval_fn eval_table, eval_unary; @@ -912,7 +918,7 @@ static eval_fn eval_table, eval_unary; */ struct op { const char *str; - Linetype (*fn)(int *, Linetype, int, Linetype, int); + Linetype (*fn)(long *, Linetype, long, Linetype, long); }; struct ops { eval_fn *inner; @@ -930,7 +936,7 @@ static const struct ops eval_ops[] = { }; /* Current operator precedence level */ -static int prec(const struct ops *ops) +static long prec(const struct ops *ops) { return (ops - eval_ops); } @@ -941,7 +947,7 @@ static int prec(const struct ops *ops) * We reset the constexpr flag in the last two cases. */ static Linetype -eval_unary(const struct ops *ops, int *valp, const char **cpp) +eval_unary(const struct ops *ops, long *valp, const char **cpp) { const char *cp; char *ep; @@ -975,32 +981,33 @@ eval_unary(const struct ops *ops, int *v if (ep == cp) return (LT_ERROR); lt = *valp ? LT_TRUE : LT_FALSE; - cp = skipsym(cp); - } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) { + cp = ep; + } else if (matchsym("defined", cp) != NULL) { cp = skipcomment(cp+7); - debug("eval%d defined", prec(ops)); if (*cp == '(') { cp = skipcomment(cp+1); defparen = true; } else { defparen = false; } - sym = findsym(cp); + sym = findsym(&cp); + cp = skipcomment(cp); + if (defparen && *cp++ != ')') { + debug("eval%d defined missing ')'", prec(ops)); + return (LT_ERROR); + } if (sym < 0) { + debug("eval%d defined unknown", prec(ops)); lt = LT_IF; } else { + debug("eval%d defined %s", prec(ops), symname[sym]); *valp = (value[sym] != NULL); lt = *valp ? LT_TRUE : LT_FALSE; } - cp = skipsym(cp); - cp = skipcomment(cp); - if (defparen && *cp++ != ')') - return (LT_ERROR); constexpr = false; } else if (!endsym(*cp)) { debug("eval%d symbol", prec(ops)); - sym = findsym(cp); - cp = skipsym(cp); + sym = findsym(&cp); if (sym < 0) { lt = LT_IF; cp = skipargs(cp); @@ -1029,11 +1036,11 @@ eval_unary(const struct ops *ops, int *v * Table-driven evaluation of binary operators. */ static Linetype -eval_table(const struct ops *ops, int *valp, const char **cpp) +eval_table(const struct ops *ops, long *valp, const char **cpp) { const struct op *op; const char *cp; - int val; + long val; Linetype lt, rt; debug("eval%d", prec(ops)); @@ -1071,7 +1078,7 @@ static Linetype ifeval(const char **cpp) { Linetype ret; - int val = 0; + long val = 0; debug("eval %s", *cpp); constexpr = killconsts ? false : true; @@ -1081,6 +1088,49 @@ ifeval(const char **cpp) } /* + * Read a line and examine its initial part to determine if it is a + * preprocessor directive. Returns NULL on EOF, or a pointer to a + * preprocessor directive name, or a pointer to the zero byte at the + * end of the line. + */ +static const char * +skiphash(void) +{ + const char *cp; + + linenum++; + if (fgets(tline, MAXLINE, input) == NULL) { + if (ferror(input)) + err(2, "can't read %s", filename); + else + return (NULL); + } + cp = skipcomment(tline); + if (linestate == LS_START && *cp == '#') { + linestate = LS_HASH; + return (skipcomment(cp + 1)); + } else if (*cp == '\0') { + return (cp); + } else { + return (skipline(cp)); + } +} + +/* + * Mark a line dirty and consume the rest of it, keeping track of the + * lexical state. + */ +static const char * +skipline(const char *cp) +{ + if (*cp != '\0') + linestate = LS_DIRTY; + while (*cp != '\0') + cp = skipcomment(cp + 1); + return (cp); +} + +/* * Skip over comments, strings, and character literals and stop at the * next character position that is not whitespace. Between calls we keep * the comment state in the global variable incomment, and we also adjust @@ -1233,33 +1283,69 @@ skipsym(const char *cp) } /* + * Skip whitespace and take a copy of any following identifier. + */ +static const char * +getsym(const char **cpp) +{ + const char *cp = *cpp, *sym; + + cp = skipcomment(cp); + cp = skipsym(sym = cp); + if (cp == sym) + return NULL; + *cpp = cp; + return (xstrdup(sym, cp)); +} + +/* + * Check that s (a symbol) matches the start of t, and that the + * following character in t is not a symbol character. Returns a + * pointer to the following character in t if there is a match, + * otherwise NULL. + */ +static const char * +matchsym(const char *s, const char *t) +{ + while (*s != '\0' && *t != '\0') + if (*s != *t) + return (NULL); + else + ++s, ++t; + if (*s == '\0' && endsym(*t)) + return(t); + else + return(NULL); +} + +/* * Look for the symbol in the symbol table. If it is found, we return * the symbol table index, else we return -1. */ static int -findsym(const char *str) +findsym(const char **strp) { - const char *cp; + const char *str; int symind; - cp = skipsym(str); - if (cp == str) - return (-1); + str = *strp; + *strp = skipsym(str); if (symlist) { + if (*strp == str) + return (-1); if (symdepth && firstsym) printf("%s%3d", zerosyms ? "" : "\n", depth); firstsym = zerosyms = false; printf("%s%.*s%s", - symdepth ? " " : "", - (int)(cp-str), str, - symdepth ? "" : "\n"); + symdepth ? " " : "", + (int)(*strp-str), str, + symdepth ? "" : "\n"); /* we don't care about the value of the symbol */ return (0); } for (symind = 0; symind < nsyms; ++symind) { - if (strlcmp(symname[symind], str, cp-str) == 0) { - debug("findsym %s %s", symname[symind], - value[symind] ? value[symind] : ""); + if (matchsym(symname[symind], str) != NULL) { + debugsym("findsym", symind); return (symind); } } @@ -1267,53 +1353,155 @@ findsym(const char *str) } /* + * Resolve indirect symbol values to their final definitions. + */ +static void +indirectsym(void) +{ + const char *cp; + int changed, sym, ind; + + do { + changed = 0; + for (sym = 0; sym < nsyms; ++sym) { + if (value[sym] == NULL) + continue; + cp = value[sym]; + ind = findsym(&cp); + if (ind == -1 || ind == sym || + *cp != '\0' || + value[ind] == NULL || + value[ind] == value[sym]) + continue; + debugsym("indir...", sym); + value[sym] = value[ind]; + debugsym("...ectsym", sym); + changed++; + } + } while (changed); +} + +/* + * Add a symbol to the symbol table, specified with the format sym=val + */ +static void +addsym1(bool ignorethis, bool definethis, char *symval) +{ + const char *sym, *val; + + sym = symval; + val = skipsym(sym); + if (definethis && *val == '=') { + symval[val - sym] = '\0'; + val = val + 1; + } else if (*val == '\0') { + val = definethis ? "1" : NULL; + } else { + usage(); + } + addsym2(ignorethis, sym, val); +} + +/* * Add a symbol to the symbol table. */ static void -addsym(bool ignorethis, bool definethis, char *sym) +addsym2(bool ignorethis, const char *sym, const char *val) { + const char *cp = sym; int symind; - char *val; - symind = findsym(sym); + symind = findsym(&cp); if (symind < 0) { if (nsyms >= MAXSYMS) errx(2, "too many symbols"); symind = nsyms++; } - symname[symind] = sym; ignore[symind] = ignorethis; - val = sym + (skipsym(sym) - sym); - if (definethis) { - if (*val == '=') { - value[symind] = val+1; - *val = '\0'; - } else if (*val == '\0') - value[symind] = "1"; - else - usage(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 09:55:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4172E55D; Thu, 5 Mar 2015 09:55:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2A551B70; Thu, 5 Mar 2015 09:55:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t259tcea051242; Thu, 5 Mar 2015 09:55:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t259tacH051234; Thu, 5 Mar 2015 09:55:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503050955.t259tacH051234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 09:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279643 - in stable/9/usr.bin: find indent jot setchannel tr unifdef vgrind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:55:38 -0000 Author: hselasky Date: Thu Mar 5 09:55:35 2015 New Revision: 279643 URL: https://svnweb.freebsd.org/changeset/base/279643 Log: MFC r227243, r233456, r248258, r248849 and r279297: Update to upstream version 2.10 The most notable new feature is support for definition files. The most notable new feature is support for processing multiple files in one invocation. There is also support for more make-friendly exit statuses. The most notable bug fix is #line directives now include the input file name. Obtained from: http://dotat.at/prog/unifdef Added: stable/9/usr.bin/unifdef/unifdef.h - copied, changed from r248849, head/usr.bin/unifdef/unifdef.h Modified: stable/9/usr.bin/find/find.1 stable/9/usr.bin/indent/indent.1 stable/9/usr.bin/jot/jot.1 stable/9/usr.bin/setchannel/setchannel.1 stable/9/usr.bin/tr/tr.1 stable/9/usr.bin/unifdef/unifdef.1 stable/9/usr.bin/unifdef/unifdef.c stable/9/usr.bin/unifdef/unifdefall.sh stable/9/usr.bin/vgrind/vgrindefs.5 Directory Properties: stable/9/usr.bin/ (props changed) stable/9/usr.bin/calendar/ (props changed) stable/9/usr.bin/find/ (props changed) stable/9/usr.bin/indent/ (props changed) Modified: stable/9/usr.bin/find/find.1 ============================================================================== --- stable/9/usr.bin/find/find.1 Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/find/find.1 Thu Mar 5 09:55:35 2015 (r279643) @@ -156,7 +156,6 @@ This option is equivalent to the depreca primary. .El .Sh PRIMARIES -.Pp All primaries which take a numeric argument allow the number to be preceded by a plus sign .Pq Dq Li + Modified: stable/9/usr.bin/indent/indent.1 ============================================================================== --- stable/9/usr.bin/indent/indent.1 Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/indent/indent.1 Thu Mar 5 09:55:35 2015 (r279643) @@ -488,7 +488,6 @@ The utility fits as many words (separated by blanks, tabs, or newlines) on a line as possible. Blank lines break paragraphs. -.Pp .Ss Comment indentation If a comment is on a line with code it is started in the `comment column', which is set by the @@ -504,7 +503,6 @@ command line parameter. If the code on a line extends past the comment column, the comment starts further to the right, and the right margin may be automatically extended in extreme cases. -.Pp .Ss Preprocessor lines In general, .Nm @@ -519,7 +517,6 @@ is recognized and .Nm attempts to correctly compensate for the syntactic peculiarities introduced. -.Pp .Ss C syntax The .Nm Modified: stable/9/usr.bin/jot/jot.1 ============================================================================== --- stable/9/usr.bin/jot/jot.1 Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/jot/jot.1 Thu Mar 5 09:55:35 2015 (r279643) @@ -242,7 +242,6 @@ specifying an integer format: .Bd -literal -offset indent $ jot -w %d 6 1 10 0.5 .Ed -.Pp .Sh EXIT STATUS .Ex -std .Sh EXAMPLES Modified: stable/9/usr.bin/setchannel/setchannel.1 ============================================================================== --- stable/9/usr.bin/setchannel/setchannel.1 Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/setchannel/setchannel.1 Thu Mar 5 09:55:35 2015 (r279643) @@ -33,7 +33,6 @@ .Nd Hauppage PVR250/350 channel selector .Sh SYNOPSIS .Cd pvr250-setchannel [-a {on | off}] [-c | -r | -s | -t] [-g geom] [-m channel_set] [channel | freq] -.Pp .Sh DESCRIPTION .Nm provides support for selecting channels on Hauppauge WinTV cards, Modified: stable/9/usr.bin/tr/tr.1 ============================================================================== --- stable/9/usr.bin/tr/tr.1 Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/tr/tr.1 Thu Mar 5 09:55:35 2015 (r279643) @@ -145,7 +145,6 @@ the octal sequence to the full 3 octal d .It \echaracter A backslash followed by certain special characters maps to special values. -.Pp .Bl -column "\ea" .It "\ea .It "\eb @@ -177,7 +176,6 @@ previous implementations. .It [:class:] Represents all characters belonging to the defined character class. Class names are: -.Pp .Bl -column "phonogram" .It "alnum .It "alpha Modified: stable/9/usr.bin/unifdef/unifdef.1 ============================================================================== --- stable/9/usr.bin/unifdef/unifdef.1 Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/unifdef/unifdef.1 Thu Mar 5 09:55:35 2015 (r279643) @@ -1,6 +1,6 @@ .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. -.\" Copyright (c) 2002 - 2010 Tony Finch . All rights reserved. +.\" Copyright (c) 2002 - 2013 Tony Finch . All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Dave Yost. It was rewritten to support ANSI C by Tony Finch. @@ -31,23 +31,24 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2010 -.Dt UNIFDEF 1 -.Os +.Dd January 7, 2014 +.Dt UNIFDEF 1 PRM +.Os " " .Sh NAME .Nm unifdef , unifdefall .Nd remove preprocessor conditionals from code .Sh SYNOPSIS .Nm -.Op Fl bBcdeKknsStV +.Op Fl bBcdehKkmnsStV .Op Fl I Ns Ar path -.Op Fl D Ns Ar sym Ns Op = Ns Ar val -.Op Fl U Ns Ar sym -.Op Fl iD Ns Ar sym Ns Op = Ns Ar val -.Op Fl iU Ns Ar sym +.Op Fl [i]D Ns Ar sym Ns Op = Ns Ar val +.Op Fl [i]U Ns Ar sym .Ar ... +.Op Fl f Ar defile +.Op Fl x Bro Ar 012 Brc +.Op Fl M Ar backext .Op Fl o Ar outfile -.Op Ar infile +.Op Ar infile ... .Nm unifdefall .Op Fl I Ns Ar path .Ar ... @@ -66,14 +67,21 @@ while otherwise leaving the file alone. The .Nm utility acts on -.Ic #if , #ifdef , #ifndef , #elif , #else , +.Ic #if , #ifdef , #ifndef , +.Ic #elif , #else , and .Ic #endif -lines. -A directive is only processed -if the symbols specified on the command line are sufficient to allow -.Nm -to get a definite value for its control expression. +lines, +using macros specified in +.Fl D +and +.Fl U +command line options or in +.Fl f +definitions files. +A directive is processed +if the macro specifications are sufficient to provide +a definite value for its control expression. If the result is false, the directive and the following lines under its control are removed. If the result is true, @@ -83,7 +91,7 @@ An or .Ic #ifndef directive is passed through unchanged -if its controlling symbol is not specified on the command line. +if its controlling macro is not specified. Any .Ic #if or @@ -109,12 +117,14 @@ and .Ic #elif lines: integer constants, -integer values of symbols defined on the command line, +integer values of macros defined on the command line, the .Fn defined operator, the operators -.Ic \&! , < , > , <= , >= , == , != , && , || , +.Ic \&! , < , > , +.Ic <= , >= , == , != , +.Ic && , || , and parenthesized expressions. A kind of .Dq "short circuit" @@ -128,16 +138,42 @@ if either operand of .Ic || is definitely true then the result is true. .Pp -In most cases, the +When evaluating an expression, .Nm -utility does not distinguish between object-like macros -(without arguments) and function-like arguments (with arguments). -If a macro is not explicitly defined, or is defined with the +does not expand macros first. +The value of a macro must be a simple number, +not an expression. +A limited form of indirection is allowed, +where one macro's value is the name of another. +.Pp +In most cases, +.Nm +does not distinguish between object-like macros +(without arguments) and function-like macros (with arguments). +A function-like macro invocation can appear in +.Ic #if +and +.Ic #elif +control expressions. +If the macro is not explicitly defined, +or is defined with the .Fl D -flag on the command-line, its arguments are ignored. +flag on the command-line, +or with +.Ic #define +in a +.Fl f +definitions file, +its arguments are ignored. If a macro is explicitly undefined on the command line with the .Fl U -flag, it may not have any arguments since this leads to a syntax error. +flag, +or with +.Ic #undef +in a +.Fl f +definitions file, +it may not have any arguments since this leads to a syntax error. .Pp The .Nm @@ -158,30 +194,65 @@ It uses .Nm Fl s and .Nm cpp Fl dM -to get lists of all the controlling symbols +to get lists of all the controlling macros and their definitions (or lack thereof), then invokes .Nm with appropriate arguments to process the file. .Sh OPTIONS -.Pp .Bl -tag -width indent -compact .It Fl D Ns Ar sym Ns = Ns Ar val -Specify that a symbol is defined to a given value -which is used when evaluating -.Ic #if -and -.Ic #elif -control expressions. +Specify that a macro is defined to a given value. .Pp .It Fl D Ns Ar sym -Specify that a symbol is defined to the value 1. +Specify that a macro is defined to the value 1. .Pp .It Fl U Ns Ar sym -Specify that a symbol is undefined. -If the same symbol appears in more than one argument, +Specify that a macro is undefined. +.Pp +If the same macro appears in more than one argument, the last occurrence dominates. .Pp +.It Fl iD Ns Ar sym Ns Op = Ns Ar val +.It Fl iU Ns Ar sym +C strings, comments, +and line continuations +are ignored within +.Ic #ifdef +and +.Ic #ifndef +blocks +controlled by macros +specified with these options. +.Pp +.It Fl f Ar defile +The file +.Ar defile +contains +.Ic #define +and +.Ic #undef +preprocessor directives, +which have the same effect as the corresponding +.Fl D +and +.Fl U +command-line arguments. +You can have multiple +.Fl f +arguments and mix them with +.Fl D +and +.Fl U +arguments; +later options override earlier ones. +.Pp +Each directive must be on a single line. +Object-like macro definitions (without arguments) +are set to the given value. +Function-like macro definitions (with arguments) +are treated as if they are set to 1. +.Pp .It Fl b Replace removed lines with blank lines instead of deleting them. @@ -196,35 +267,39 @@ Mutually exclusive with the option. .Pp .It Fl c -If the -.Fl c -flag is specified, -then the operation of -.Nm -is complemented, -i.e., the lines that would have been removed or blanked +Complement, +i.e., lines that would have been removed or blanked are retained and vice versa. .Pp .It Fl d Turn on printing of debugging messages. .Pp .It Fl e -Because -.Nm -processes its input one line at a time, -it cannot remove preprocessor directives that span more than one line. -The most common example of this is a directive with a multi-line -comment hanging off its right hand end. By default, -if .Nm -has to process such a directive, -it will complain that the line is too obfuscated. +will report an error if it needs to remove +a preprocessor directive that spans more than one line, +for example, if it has a multi-line +comment hanging off its right hand end. The .Fl e -option changes the behaviour so that, -where possible, -such lines are left unprocessed instead of reporting an error. +flag makes it ignore the line instead. +.Pp +.It Fl h +Print help. +.Pp +.It Fl I Ns Ar path +Specifies to +.Nm unifdefall +an additional place to look for +.Ic #include +files. +This option is ignored by +.Nm +for compatibility with +.Xr cpp 1 +and to simplify the implementation of +.Nm unifdefall . .Pp .It Fl K Always treat the result of @@ -248,6 +323,15 @@ because they typically start and are used as a kind of comment to sketch out future or past development. It would be rude to strip them out, just as it would be for normal comments. .Pp +.It Fl m +Modify one or more input files in place. +.Pp +.It Fl M Ar backext +Modify input files in place, and keep backups of the original files by +appending the +.Ar backext +to the input filenames. +.Pp .It Fl n Add .Li #line @@ -258,96 +342,57 @@ line numbers in the input file. .It Fl o Ar outfile Write output to the file .Ar outfile -instead of the standard output. -If -.Ar outfile -is the same as the input file, -the output is written to a temporary file -which is renamed into place when -.Nm -completes successfully. +instead of the standard output when processing a single file. .Pp .It Fl s -Instead of processing the input file as usual, +Instead of processing an input file as usual, this option causes .Nm -to produce a list of symbols that appear in expressions -that -.Nm -understands. -It is useful in conjunction with the -.Fl dM -option of -.Xr cpp 1 -for creating -.Nm -command lines. +to produce a list of macros that are used in +preprocessor directive controlling expressions. .Pp .It Fl S Like the .Fl s -option, but the nesting depth of each symbol is also printed. +option, but the nesting depth of each macro is also printed. This is useful for working out the number of possible combinations -of interdependent defined/undefined symbols. +of interdependent defined/undefined macros. .Pp .It Fl t -Disables parsing for C comments +Disables parsing for C strings, comments, and line continuations, which is useful for plain text. -.Pp -.It Fl iD Ns Ar sym Ns Op = Ns Ar val -.It Fl iU Ns Ar sym -Ignore -.Ic #ifdef Ns s . -If your C code uses -.Ic #ifdef Ns s -to delimit non-C lines, -such as comments -or code which is under construction, -then you must tell -.Nm -which symbols are used for that purpose so that it will not try to parse -comments -and line continuations -inside those -.Ic #ifdef Ns s . -You can specify ignored symbols with -.Fl iD Ns Ar sym Ns Oo = Ns Ar val Oc -and -.Fl iU Ns Ar sym -similar to -.Fl D Ns Ar sym Ns Op = Ns Ar val +This is a blanket version of the +.Fl iD and -.Fl U Ns Ar sym -above. -.Pp -.It Fl I Ns Ar path -Specifies to -.Nm unifdefall -an additional place to look for -.Ic #include -files. -This option is ignored by -.Nm -for compatibility with -.Xr cpp 1 -and to simplify the implementation of -.Nm unifdefall . +.Fl iU +flags. .Pp .It Fl V Print version details. +.Pp +.It Fl x Bro Ar 012 Brc +Set exit status mode to zero, one, or two. +See the +.Sx EXIT STATUS +section below for details. .El .Pp The .Nm -utility copies its output to -.Em stdout -and will take its input from +utility takes its input from .Em stdin -if no +if there are no .Ar file -argument is given. +arguments. +You must use the +.Fl m +or +.Fl M +options if there are multiple input files. +You can specify inut from stdin or output to stdout with +.Ql - . .Pp The .Nm @@ -356,10 +401,35 @@ utility works nicely with the option of .Xr diff 1 . .Sh EXIT STATUS -The +In normal usage the +.Nm +utility's exit status depends on the mode set using the +.Fl x +option. +.Pp +If the exit mode is zero (the default) then +.Nm +exits with status 0 if the output is an exact copy of the input, +or with status 1 if the output differs. +.Pp +If the exit mode is one, +.Nm +exits with status 1 if the output is unmodified +or 0 if it differs. +.Pp +If the exit mode is two, .Nm -utility exits 0 if the output is an exact copy of the input, -1 if not, and 2 if in trouble. +exits with status zero in both cases. +.Pp +In all exit modes, +.Nm +exits with status 2 if there is an error. +.Pp +The exit status is 0 if the +.Fl h +or +.Fl V +command line options are given. .Sh DIAGNOSTICS .Bl -item .It @@ -384,6 +454,9 @@ in comment. .Sh SEE ALSO .Xr cpp 1 , .Xr diff 1 +.Pp +The unifdef home page is +.Pa http://dotat.at/prog/unifdef .Sh HISTORY The .Nm @@ -401,13 +474,14 @@ rewrote it to support .Sh BUGS Expression evaluation is very limited. .Pp -Preprocessor control lines split across more than one physical line +Handling one line at a time means +preprocessor directives split across more than one physical line (because of comments or backslash-newline) cannot be handled in every situation. .Pp Trigraphs are not recognized. .Pp -There is no support for symbols with different definitions at +There is no support for macros with different definitions at different points in the source file. .Pp The text-mode and ignore functionality does not correspond to modern Modified: stable/9/usr.bin/unifdef/unifdef.c ============================================================================== --- stable/9/usr.bin/unifdef/unifdef.c Thu Mar 5 09:51:59 2015 (r279642) +++ stable/9/usr.bin/unifdef/unifdef.c Thu Mar 5 09:55:35 2015 (r279643) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 - 2011 Tony Finch + * Copyright (c) 2002 - 2014 Tony Finch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,21 +43,10 @@ * it possible to handle all "dodgy" directives correctly. */ -#include -#include +#include "unifdef.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -const char copyright[] = - "@(#) $Version: unifdef-2.5.6.21f1388 $\n" +static const char copyright[] = + "@(#) $Version: unifdef-2.10 $\n" "@(#) $FreeBSD$\n" "@(#) $Author: Tony Finch (dot@dotat.at) $\n" "@(#) $URL: http://dotat.at/prog/unifdef $\n" @@ -93,6 +82,9 @@ static char const * const linetype_name[ "PLAIN", "EOF", "ERROR" }; +#define linetype_if2elif(lt) ((Linetype)(lt - LT_IF + LT_ELIF)) +#define linetype_2dodgy(lt) ((Linetype)(lt + LT_DODGY)) + /* state of #if processing */ typedef enum { IS_OUTSIDE, @@ -146,7 +138,7 @@ static char const * const linestate_name */ #define MAXDEPTH 64 /* maximum #if nesting */ #define MAXLINE 4096 /* maximum length of line */ -#define MAXSYMS 4096 /* maximum number of symbols */ +#define MAXSYMS 16384 /* maximum number of symbols */ /* * Sometimes when editing a keyword the replacement text is longer, so @@ -155,11 +147,6 @@ static char const * const linestate_name #define EDITSLOP 10 /* - * For temporary filenames - */ -#define TEMPLATE "unifdef.XXXXXX" - -/* * Globals. */ @@ -167,6 +154,7 @@ static bool compblank; /* - static bool lnblank; /* -b: blank deleted lines */ static bool complement; /* -c: do the complement */ static bool debugging; /* -d: debugging reports */ +static bool inplace; /* -m: modify in place */ static bool iocccok; /* -e: fewer IOCCC errors */ static bool strictlogic; /* -K: keep ambiguous #ifs */ static bool killconsts; /* -k: eval constant #ifs */ @@ -183,14 +171,24 @@ static int nsyms; /* numb static FILE *input; /* input file pointer */ static const char *filename; /* input file name */ static int linenum; /* current line number */ +static const char *linefile; /* file name for #line */ static FILE *output; /* output file pointer */ static const char *ofilename; /* output file name */ -static bool overwriting; /* output overwrites input */ -static char tempname[FILENAME_MAX]; /* used when overwriting */ +static const char *backext; /* backup extension */ +static char *tempname; /* avoid splatting input */ static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */ static char *keyword; /* used for editing #elif's */ +/* + * When processing a file, the output's newline style will match the + * input's, and unifdef correctly handles CRLF or LF endings whatever + * the platform's native style. The stdio streams are opened in binary + * mode to accommodate platforms whose native newline style is CRLF. + * When the output isn't a processed input file (when it is error / + * debug / diagnostic messages) then unifdef uses native line endings. + */ + static const char *newline; /* input file format */ static const char newline_unix[] = "\n"; static const char newline_crlf[] = "\r\n"; @@ -205,33 +203,47 @@ static int delcount; /* co static unsigned blankcount; /* count of blank lines */ static unsigned blankmax; /* maximum recent blankcount */ static bool constexpr; /* constant #if expression */ -static bool zerosyms = true; /* to format symdepth output */ +static bool zerosyms; /* to format symdepth output */ static bool firstsym; /* ditto */ +static int exitmode; /* exit status mode */ static int exitstat; /* program exit status */ -static void addsym(bool, bool, char *); -static void closeout(void); +static void addsym1(bool, bool, char *); +static void addsym2(bool, const char *, const char *); +static char *astrcat(const char *, const char *); +static void cleantemp(void); +static void closeio(void); static void debug(const char *, ...); +static void debugsym(const char *, int); +static bool defundef(void); +static void defundefile(const char *); static void done(void); static void error(const char *); -static int findsym(const char *); +static int findsym(const char **); static void flushline(bool); -static Linetype parseline(void); +static void hashline(void); +static void help(void); static Linetype ifeval(const char **); static void ignoreoff(void); static void ignoreon(void); +static void indirectsym(void); static void keywordedit(const char *); +static const char *matchsym(const char *, const char *); static void nest(void); +static Linetype parseline(void); static void process(void); +static void processinout(const char *, const char *); static const char *skipargs(const char *); static const char *skipcomment(const char *); +static const char *skiphash(void); +static const char *skipline(const char *); static const char *skipsym(const char *); static void state(Ifstate); -static int strlcmp(const char *, const char *, size_t); static void unnest(void); static void usage(void); static void version(void); +static const char *xstrdup(const char *, const char *); #define endsym(c) (!isalnum((unsigned char)c) && c != '_') @@ -243,7 +255,7 @@ main(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "i:D:U:I:o:bBcdeKklnsStV")) != -1) + while ((opt = getopt(argc, argv, "i:D:U:f:I:M:o:x:bBcdehKklmnsStV")) != -1) switch (opt) { case 'i': /* treat stuff controlled by these symbols as text */ /* @@ -253,17 +265,17 @@ main(int argc, char *argv[]) */ opt = *optarg++; if (opt == 'D') - addsym(true, true, optarg); + addsym1(true, true, optarg); else if (opt == 'U') - addsym(true, false, optarg); + addsym1(true, false, optarg); else usage(); break; case 'D': /* define a symbol */ - addsym(false, true, optarg); + addsym1(false, true, optarg); break; case 'U': /* undef a symbol */ - addsym(false, false, optarg); + addsym1(false, false, optarg); break; case 'I': /* no-op for compatibility with cpp */ break; @@ -283,12 +295,25 @@ main(int argc, char *argv[]) case 'e': /* fewer errors from dodgy lines */ iocccok = true; break; + case 'f': /* definitions file */ + defundefile(optarg); + break; + case 'h': + help(); + break; case 'K': /* keep ambiguous #ifs */ strictlogic = true; break; case 'k': /* process constant #ifs */ killconsts = true; break; + case 'm': /* modify in place */ + inplace = true; + break; + case 'M': /* modify in place and keep backup */ + inplace = true; + backext = optarg; + break; case 'n': /* add #line directive after deleted lines */ lnnum = true; break; @@ -304,8 +329,14 @@ main(int argc, char *argv[]) case 't': /* don't parse C comments */ text = true; break; - case 'V': /* print version */ + case 'V': version(); + break; + case 'x': + exitmode = atoi(optarg); + if(exitmode < 0 || exitmode > 2) + usage(); + break; default: usage(); } @@ -313,54 +344,98 @@ main(int argc, char *argv[]) argv += optind; if (compblank && lnblank) errx(2, "-B and -b are mutually exclusive"); - if (argc > 1) { - errx(2, "can only do one file"); - } else if (argc == 1 && strcmp(*argv, "-") != 0) { - filename = *argv; - input = fopen(filename, "rb"); - if (input == NULL) - err(2, "can't open %s", filename); - } else { - filename = "[stdin]"; - input = stdin; + if (symlist && (ofilename != NULL || inplace || argc > 1)) + errx(2, "-s only works with one input file"); + if (argc > 1 && ofilename != NULL) + errx(2, "-o cannot be used with multiple input files"); + if (argc > 1 && !inplace) + errx(2, "multiple input files require -m or -M"); + if (argc == 0) + argc = 1; + if (argc == 1 && !inplace && ofilename == NULL) + ofilename = "-"; + indirectsym(); + + atexit(cleantemp); + if (ofilename != NULL) + processinout(*argv, ofilename); + else while (argc-- > 0) { + processinout(*argv, *argv); + argv++; } - if (ofilename == NULL) { - ofilename = "[stdout]"; - output = stdout; + switch(exitmode) { + case(0): exit(exitstat); + case(1): exit(!exitstat); + case(2): exit(0); + default: abort(); /* bug */ + } +} + +/* + * File logistics. + */ +static void +processinout(const char *ifn, const char *ofn) +{ + struct stat st; + + if (ifn == NULL || strcmp(ifn, "-") == 0) { + filename = "[stdin]"; + linefile = NULL; + input = fbinmode(stdin); } else { - struct stat ist, ost; - if (stat(ofilename, &ost) == 0 && - fstat(fileno(input), &ist) == 0) - overwriting = (ist.st_dev == ost.st_dev - && ist.st_ino == ost.st_ino); - if (overwriting) { - const char *dirsep; - int ofd; - - dirsep = strrchr(ofilename, '/'); - if (dirsep != NULL) - snprintf(tempname, sizeof(tempname), - "%.*s/" TEMPLATE, - (int)(dirsep - ofilename), ofilename); - else - snprintf(tempname, sizeof(tempname), - TEMPLATE); - ofd = mkstemp(tempname); - if (ofd != -1) - output = fdopen(ofd, "wb+"); - if (output == NULL) - err(2, "can't create temporary file"); - fchmod(ofd, ist.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO)); - } else { - output = fopen(ofilename, "wb"); - if (output == NULL) - err(2, "can't open %s", ofilename); - } + filename = ifn; + linefile = ifn; + input = fopen(ifn, "rb"); + if (input == NULL) + err(2, "can't open %s", ifn); + } + if (strcmp(ofn, "-") == 0) { + output = fbinmode(stdout); + process(); + return; } + if (stat(ofn, &st) < 0) { + output = fopen(ofn, "wb"); + if (output == NULL) + err(2, "can't create %s", ofn); + process(); + return; + } + + tempname = astrcat(ofn, ".XXXXXX"); + output = mktempmode(tempname, st.st_mode); + if (output == NULL) + err(2, "can't create %s", tempname); + process(); - abort(); /* bug */ + + if (backext != NULL) { + char *backname = astrcat(ofn, backext); + if (rename(ofn, backname) < 0) + err(2, "can't rename \"%s\" to \"%s\"", ofn, backname); + free(backname); + } + if (replace(tempname, ofn) < 0) + err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn); + free(tempname); + tempname = NULL; } +/* + * For cleaning up if there is an error. + */ +static void +cleantemp(void) +{ + if (tempname != NULL) + remove(tempname); +} + +/* + * Self-identification functions. + */ + static void version(void) { @@ -376,13 +451,54 @@ version(void) } static void +synopsis(FILE *fp) +{ + fprintf(fp, + "usage: unifdef [-bBcdehKkmnsStV] [-x{012}] [-Mext] [-opath] \\\n" + " [-[i]Dsym[=val]] [-[i]Usym] [-fpath] ... [file] ...\n"); +} + +static void usage(void) { - fprintf(stderr, "usage: unifdef [-bBcdeKknsStV] [-Ipath]" - " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n"); + synopsis(stderr); exit(2); } +static void +help(void) +{ + synopsis(stdout); + printf( + " -Dsym=val define preprocessor symbol with given value\n" + " -Dsym define preprocessor symbol with value 1\n" + " -Usym preprocessor symbol is undefined\n" + " -iDsym=val \\ ignore C strings and comments\n" + " -iDsym ) in sections controlled by these\n" + " -iUsym / preprocessor symbols\n" + " -fpath file containing #define and #undef directives\n" + " -b blank lines instead of deleting them\n" + " -B compress blank lines around deleted section\n" + " -c complement (invert) keep vs. delete\n" + " -d debugging mode\n" + " -e ignore multiline preprocessor directives\n" + " -h print help\n" + " -Ipath extra include file path (ignored)\n" + " -K disable && and || short-circuiting\n" + " -k process constant #if expressions\n" + " -Mext modify in place and keep backups\n" + " -m modify input files in place\n" + " -n add #line directives to output\n" + " -opath output file name\n" + " -S list #if control symbols with nesting\n" + " -s list #if control symbols\n" + " -t ignore C strings and comments\n" + " -V print version\n" + " -x{012} exit status mode\n" + ); + exit(0); +} + /* * A state transition function alters the global #if processing state * in a particular way. The table below is indexed by the current @@ -396,7 +512,7 @@ usage(void) * When we have processed a group that starts off with a known-false * #if/#elif sequence (which has therefore been deleted) followed by a * #elif that we don't understand and therefore must keep, we edit the - * latter into a #if to keep the nesting correct. We use strncpy() to + * latter into a #if to keep the nesting correct. We use memcpy() to * overwrite the 4 byte token "elif" with "if " without a '\0' byte. * * When we find a true #elif in a group, the following block will @@ -451,7 +567,7 @@ static void Idrop (void) { Fdrop(); ign static void Itrue (void) { Ftrue(); ignoreon(); } static void Ifalse(void) { Ffalse(); ignoreon(); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 10:04:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1207A6; Thu, 5 Mar 2015 10:04:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BED4CC56; Thu, 5 Mar 2015 10:04:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t25A4ZTU055892; Thu, 5 Mar 2015 10:04:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t25A4ZwB055888; Thu, 5 Mar 2015 10:04:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503051004.t25A4ZwB055888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 10:04: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: r279644 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 10:04:36 -0000 Author: hselasky Date: Thu Mar 5 10:04:34 2015 New Revision: 279644 URL: https://svnweb.freebsd.org/changeset/base/279644 Log: MFC r279210: Add support for the DWC OTG v2 chipset found in the STM32F4 series of processors. Make sure we pullup the data lines in device mode when we power on the port. Modified: stable/10/sys/dev/usb/controller/dwc_otg.c stable/10/sys/dev/usb/controller/dwc_otgreg.h 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 Thu Mar 5 09:55:35 2015 (r279643) +++ stable/10/sys/dev/usb/controller/dwc_otg.c Thu Mar 5 10:04:34 2015 (r279644) @@ -108,13 +108,20 @@ GINTSTS_WKUPINT | GINTSTS_USBSUSP | GINTMSK_OTGINTMSK | \ GINTSTS_SESSREQINT) -static int dwc_otg_use_hsic; +#define DWC_OTG_PHY_ULPI 0 +#define DWC_OTG_PHY_HSIC 1 +#define DWC_OTG_PHY_INTERNAL 2 -static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG"); +#ifndef DWC_OTG_PHY_DEFAULT +#define DWC_OTG_PHY_DEFAULT DWC_OTG_PHY_ULPI +#endif + +static int dwc_otg_phy_type = DWC_OTG_PHY_DEFAULT; -SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, use_hsic, CTLFLAG_RD | CTLFLAG_TUN, - &dwc_otg_use_hsic, 0, "DWC OTG uses HSIC interface"); -TUNABLE_INT("hw.usb.dwc_otg.use_hsic", &dwc_otg_use_hsic); +static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG"); +SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, phy_type, CTLFLAG_RDTUN, + &dwc_otg_phy_type, 0, "DWC OTG PHY TYPE - 0/1/2 - ULPI/HSIC/INTERNAL"); +TUNABLE_INT("hw.usb.dwc_otg.phy_type", &dwc_otg_phy_type); #ifdef USB_DEBUG static int dwc_otg_debug; @@ -3762,8 +3769,9 @@ dwc_otg_init(struct dwc_otg_softc *sc) break; } - /* select HSIC or non-HSIC mode */ - if (dwc_otg_use_hsic) { + /* select HSIC, ULPI or internal PHY mode */ + switch (dwc_otg_phy_type) { + case DWC_OTG_PHY_HSIC: DWC_OTG_WRITE_4(sc, DOTG_GUSBCFG, GUSBCFG_PHYIF | GUSBCFG_TRD_TIM_SET(5) | temp); @@ -3775,7 +3783,8 @@ dwc_otg_init(struct dwc_otg_softc *sc) temp & ~GLPMCFG_HSIC_CONN); DWC_OTG_WRITE_4(sc, DOTG_GLPMCFG, temp | GLPMCFG_HSIC_CONN); - } else { + break; + case DWC_OTG_PHY_ULPI: DWC_OTG_WRITE_4(sc, DOTG_GUSBCFG, GUSBCFG_ULPI_UTMI_SEL | GUSBCFG_TRD_TIM_SET(5) | temp); @@ -3784,6 +3793,25 @@ dwc_otg_init(struct dwc_otg_softc *sc) temp = DWC_OTG_READ_4(sc, DOTG_GLPMCFG); DWC_OTG_WRITE_4(sc, DOTG_GLPMCFG, temp & ~GLPMCFG_HSIC_CONN); + break; + case DWC_OTG_PHY_INTERNAL: + DWC_OTG_WRITE_4(sc, DOTG_GUSBCFG, + GUSBCFG_PHYSEL | + GUSBCFG_TRD_TIM_SET(5) | temp); + DWC_OTG_WRITE_4(sc, DOTG_GOTGCTL, 0); + + temp = DWC_OTG_READ_4(sc, DOTG_GLPMCFG); + DWC_OTG_WRITE_4(sc, DOTG_GLPMCFG, + temp & ~GLPMCFG_HSIC_CONN); + + temp = DWC_OTG_READ_4(sc, DOTG_GGPIO); + temp &= ~(DOTG_GGPIO_NOVBUSSENS | DOTG_GGPIO_I2CPADEN); + temp |= (DOTG_GGPIO_VBUSASEN | DOTG_GGPIO_VBUSBSEN | + DOTG_GGPIO_PWRDWN); + DWC_OTG_WRITE_4(sc, DOTG_GGPIO, temp); + break; + default: + break; } /* clear global nak */ @@ -3803,9 +3831,6 @@ dwc_otg_init(struct dwc_otg_softc *sc) /* wait 10ms */ usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100); - /* pull up D+ */ - dwc_otg_pull_up(sc); - temp = DWC_OTG_READ_4(sc, DOTG_GHWCFG3); sc->sc_fifo_size = 4 * GHWCFG3_DFIFODEPTH_GET(temp); @@ -4544,11 +4569,15 @@ tr_handle_set_port_feature: /* nops */ break; case UHF_PORT_POWER: + sc->sc_flags.port_powered = 1; if (sc->sc_mode == DWC_MODE_HOST || sc->sc_mode == DWC_MODE_OTG) { sc->sc_hprt_val |= HPRT_PRTPWR; DWC_OTG_WRITE_4(sc, DOTG_HPRT, sc->sc_hprt_val); } - sc->sc_flags.port_powered = 1; + if (sc->sc_mode == DWC_MODE_DEVICE || sc->sc_mode == DWC_MODE_OTG) { + /* pull up D+, if any */ + dwc_otg_pull_up(sc); + } break; default: err = USB_ERR_IOERROR; Modified: stable/10/sys/dev/usb/controller/dwc_otgreg.h ============================================================================== --- stable/10/sys/dev/usb/controller/dwc_otgreg.h Thu Mar 5 09:55:35 2015 (r279643) +++ stable/10/sys/dev/usb/controller/dwc_otgreg.h Thu Mar 5 10:04:34 2015 (r279644) @@ -196,6 +196,14 @@ #define GUSBCFG_TOUTCAL_MASK 0x00000007 #define GUSBCFG_TOUTCAL_SHIFT 0 +/* STM32F4 */ +#define DOTG_GGPIO_NOVBUSSENS (1 << 21) +#define DOTG_GGPIO_SOFOUTEN (1 << 20) +#define DOTG_GGPIO_VBUSBSEN (1 << 19) +#define DOTG_GGPIO_VBUSASEN (1 << 18) +#define DOTG_GGPIO_I2CPADEN (1 << 17) +#define DOTG_GGPIO_PWRDWN (1 << 16) + #define GRSTCTL_AHBIDLE (1<<31) #define GRSTCTL_DMAREQ (1<<30) #define GRSTCTL_TXFNUM_MASK 0x000007c0 From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 10:07:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A473F8F8; Thu, 5 Mar 2015 10:07:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 8EC00C75; Thu, 5 Mar 2015 10:07:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t25A7A5c056309; Thu, 5 Mar 2015 10:07:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t25A7AaL056308; Thu, 5 Mar 2015 10:07:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503051007.t25A7AaL056308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 5 Mar 2015 10:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279645 - stable/9/sbin/geom/class/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 10:07:10 -0000 Author: ae Date: Thu Mar 5 10:07:09 2015 New Revision: 279645 URL: https://svnweb.freebsd.org/changeset/base/279645 Log: MFC r279324: When gpart(8) is trying automatically determine the first available block of free space after existing partition, take into account provider's stripeoffset, since the result will be adjusted to this value. PR: 197989 Modified: stable/9/sbin/geom/class/part/geom_part.c Directory Properties: stable/9/sbin/geom/class/part/ (props changed) Modified: stable/9/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/9/sbin/geom/class/part/geom_part.c Thu Mar 5 10:04:34 2015 (r279644) +++ stable/9/sbin/geom/class/part/geom_part.c Thu Mar 5 10:07:09 2015 (r279645) @@ -550,7 +550,7 @@ gpart_autofill(struct gctl_req *req) s = find_provcfg(pp, "end"); first = (off_t)strtoimax(s, NULL, 0) + 1; - if (first > a_first) + if (first + offset > a_first) a_first = ALIGNUP(first + offset, alignment); } if (a_first <= last) { From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 10:08:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3C75A50; Thu, 5 Mar 2015 10:08:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DF851C8A; Thu, 5 Mar 2015 10:08:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t25A8bx6056555; Thu, 5 Mar 2015 10:08:37 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t25A8bID056554; Thu, 5 Mar 2015 10:08:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503051008.t25A8bID056554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 5 Mar 2015 10:08:37 +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: r279646 - stable/10/sbin/geom/class/part 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 10:08:38 -0000 Author: ae Date: Thu Mar 5 10:08:37 2015 New Revision: 279646 URL: https://svnweb.freebsd.org/changeset/base/279646 Log: MFC r279324: When gpart(8) is trying automatically determine the first available block of free space after existing partition, take into account provider's stripeoffset, since the result will be adjusted to this value. PR: 197989 Modified: stable/10/sbin/geom/class/part/geom_part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/10/sbin/geom/class/part/geom_part.c Thu Mar 5 10:07:09 2015 (r279645) +++ stable/10/sbin/geom/class/part/geom_part.c Thu Mar 5 10:08:37 2015 (r279646) @@ -550,7 +550,7 @@ gpart_autofill(struct gctl_req *req) s = find_provcfg(pp, "end"); first = (off_t)strtoimax(s, NULL, 0) + 1; - if (first > a_first) + if (first + offset > a_first) a_first = ALIGNUP(first + offset, alignment); } if (a_first <= last) { From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 10:12:29 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2368ABE4; Thu, 5 Mar 2015 10:12:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0F2F2D54; Thu, 5 Mar 2015 10:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t25ACS4W060564; Thu, 5 Mar 2015 10:12:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t25ACSpl060563; Thu, 5 Mar 2015 10:12:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503051012.t25ACSpl060563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 5 Mar 2015 10:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r279647 - stable/8/sbin/geom/class/part X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 10:12:29 -0000 Author: ae Date: Thu Mar 5 10:12:28 2015 New Revision: 279647 URL: https://svnweb.freebsd.org/changeset/base/279647 Log: MFC r279324: When gpart(8) is trying automatically determine the first available block of free space after existing partition, take into account provider's stripeoffset, since the result will be adjusted to this value. PR: 197989 Modified: stable/8/sbin/geom/class/part/geom_part.c Directory Properties: stable/8/sbin/geom/class/part/ (props changed) Modified: stable/8/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/8/sbin/geom/class/part/geom_part.c Thu Mar 5 10:08:37 2015 (r279646) +++ stable/8/sbin/geom/class/part/geom_part.c Thu Mar 5 10:12:28 2015 (r279647) @@ -565,7 +565,7 @@ gpart_autofill(struct gctl_req *req) (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else first = (off_t)strtoimax(s, NULL, 0) + 1; - if (first > a_first) + if (first + offset > a_first) a_first = ALIGNUP(first + offset, alignment); } if (a_first <= last) { From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 10:18:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D415DD73; Thu, 5 Mar 2015 10:18:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BF293D8D; Thu, 5 Mar 2015 10:18:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t25AI4bL061311; Thu, 5 Mar 2015 10:18:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t25AI40Q061306; Thu, 5 Mar 2015 10:18:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503051018.t25AI40Q061306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 10:18: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: r279648 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 10:18:05 -0000 Author: hselasky Date: Thu Mar 5 10:18:03 2015 New Revision: 279648 URL: https://svnweb.freebsd.org/changeset/base/279648 Log: MFC r279544: Add quirk to disable 64-bit XHCI DMA after r276717. Requested by: Gary Jennejohn Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h 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 Thu Mar 5 10:12:28 2015 (r279647) +++ stable/10/sys/dev/usb/controller/xhci.c Thu Mar 5 10:18:03 2015 (r279648) @@ -98,18 +98,23 @@ TUNABLE_INT("hw.usb.xhci.streams", &xhci static int xhcidebug; static int xhciroute; static int xhcipolling; +static int xhcidma32; SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &xhcidebug, 0, "Debug level"); TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, - &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); + &xhciroute, 0, "Routing bitmap for switching EHCI ports to the XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, - &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); + &xhcipolling, 0, "Set to enable software interrupt polling for the XHCI controller"); TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, dma32, CTLFLAG_RWTUN, + &xhcidma32, 0, "Set to only use 32-bit DMA for the XHCI controller"); +TUNABLE_INT("hw.usb.xhci.dma32", &xhcidma32); #else #define xhciroute 0 +#define xhcidma32 0 #endif #define XHCI_INTR_ENDPT 1 @@ -580,7 +585,7 @@ xhci_halt_controller(struct xhci_softc * } usb_error_t -xhci_init(struct xhci_softc *sc, device_t self) +xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32) { uint32_t temp; @@ -627,7 +632,8 @@ xhci_init(struct xhci_softc *sc, device_ } /* get DMA bits */ - sc->sc_bus.dma_bits = XHCI_HCS0_AC64(temp) ? 64 : 32; + sc->sc_bus.dma_bits = (XHCI_HCS0_AC64(temp) && + xhcidma32 == 0 && dma32 == 0) ? 64 : 32; 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); Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Thu Mar 5 10:12:28 2015 (r279647) +++ stable/10/sys/dev/usb/controller/xhci.h Thu Mar 5 10:18:03 2015 (r279648) @@ -522,7 +522,7 @@ struct xhci_softc { uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); -usb_error_t xhci_init(struct xhci_softc *, device_t); +usb_error_t xhci_init(struct xhci_softc *, device_t, uint8_t); usb_error_t xhci_start_controller(struct xhci_softc *); void xhci_interrupt(struct xhci_softc *); void xhci_uninit(struct xhci_softc *); Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Thu Mar 5 10:12:28 2015 (r279647) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Thu Mar 5 10:18:03 2015 (r279648) @@ -192,7 +192,7 @@ 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); - if (xhci_init(sc, self)) { + if (xhci_init(sc, self, 0)) { device_printf(self, "Could not initialize softc\n"); bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, sc->sc_io_res); From owner-svn-src-stable@FreeBSD.ORG Thu Mar 5 10:23:40 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29CBAFEA; Thu, 5 Mar 2015 10:23:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 14BE5E56; Thu, 5 Mar 2015 10:23:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t25ANd3x065536; Thu, 5 Mar 2015 10:23:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t25ANdZw065531; Thu, 5 Mar 2015 10:23:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503051023.t25ANdZw065531@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 5 Mar 2015 10:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279650 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 10:23:40 -0000 Author: hselasky Date: Thu Mar 5 10:23:38 2015 New Revision: 279650 URL: https://svnweb.freebsd.org/changeset/base/279650 Log: MFC r279544: Add quirk to disable 64-bit XHCI DMA after r276717. Requested by: Gary Jennejohn Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h stable/9/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Thu Mar 5 10:22:59 2015 (r279649) +++ stable/9/sys/dev/usb/controller/xhci.c Thu Mar 5 10:23:38 2015 (r279650) @@ -87,19 +87,24 @@ __FBSDID("$FreeBSD$"); static int xhcidebug; static int xhciroute; static int xhcipolling; +static int xhcidma32; static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &xhcidebug, 0, "Debug level"); TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, - &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); + &xhciroute, 0, "Routing bitmap for switching EHCI ports to the XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, - &xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); + &xhcipolling, 0, "Set to enable software interrupt polling for the XHCI controller"); TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, dma32, CTLFLAG_RWTUN, + &xhcidma32, 0, "Set to only use 32-bit DMA for the XHCI controller"); +TUNABLE_INT("hw.usb.xhci.dma32", &xhcidma32); #else #define xhciroute 0 +#define xhcidma32 0 #endif #define XHCI_INTR_ENDPT 1 @@ -569,7 +574,7 @@ xhci_halt_controller(struct xhci_softc * } usb_error_t -xhci_init(struct xhci_softc *sc, device_t self) +xhci_init(struct xhci_softc *sc, device_t self, uint8_t dma32) { uint32_t temp; @@ -616,7 +621,8 @@ xhci_init(struct xhci_softc *sc, device_ } /* get DMA bits */ - sc->sc_bus.dma_bits = XHCI_HCS0_AC64(temp) ? 64 : 32; + sc->sc_bus.dma_bits = (XHCI_HCS0_AC64(temp) && + xhcidma32 == 0 && dma32 == 0) ? 64 : 32; 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); Modified: stable/9/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.h Thu Mar 5 10:22:59 2015 (r279649) +++ stable/9/sys/dev/usb/controller/xhci.h Thu Mar 5 10:23:38 2015 (r279650) @@ -513,7 +513,7 @@ struct xhci_softc { uint8_t xhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); -usb_error_t xhci_init(struct xhci_softc *, device_t); +usb_error_t xhci_init(struct xhci_softc *, device_t, uint8_t); usb_error_t xhci_start_controller(struct xhci_softc *); void xhci_interrupt(struct xhci_softc *); void xhci_uninit(struct xhci_softc *); Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Thu Mar 5 10:22:59 2015 (r279649) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Thu Mar 5 10:23:38 2015 (r279650) @@ -192,7 +192,7 @@ 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); - if (xhci_init(sc, self)) { + if (xhci_init(sc, self, 0)) { device_printf(self, "Could not initialize softc\n"); bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, sc->sc_io_res); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 09:22:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ADEB174; Fri, 6 Mar 2015 09:22:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2C359A94; Fri, 6 Mar 2015 09:22:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t269M7F2027803; Fri, 6 Mar 2015 09:22:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t269M6x3027800; Fri, 6 Mar 2015 09:22:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503060922.t269M6x3027800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2015 09:22:06 +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: r279685 - in stable/10/sys: fs/devfs kern 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 09:22:07 -0000 Author: kib Date: Fri Mar 6 09:22:05 2015 New Revision: 279685 URL: https://svnweb.freebsd.org/changeset/base/279685 Log: MFC r279362: The VNASSERT in vflush() FORCECLOSE case is trying to panic early to prevent errors from yanking devices out from under filesystems. Only care about special vnodes on devfs, special nodes on other kinds of filesystems do not have special properties. Modified: stable/10/sys/fs/devfs/devfs_vnops.c stable/10/sys/kern/vfs_subr.c stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Fri Mar 6 05:50:39 2015 (r279684) +++ stable/10/sys/fs/devfs/devfs_vnops.c Fri Mar 6 09:22:05 2015 (r279685) @@ -63,7 +63,6 @@ #include static struct vop_vector devfs_vnodeops; -static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include @@ -1737,7 +1736,7 @@ static struct vop_vector devfs_vnodeops .vop_vptocnp = devfs_vptocnp, }; -static struct vop_vector devfs_specops = { +struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, .vop_access = devfs_access, Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Fri Mar 6 05:50:39 2015 (r279684) +++ stable/10/sys/kern/vfs_subr.c Fri Mar 6 09:22:05 2015 (r279685) @@ -2624,6 +2624,7 @@ loop: */ if (vp->v_usecount == 0 || (flags & FORCECLOSE)) { VNASSERT(vp->v_usecount == 0 || + vp->v_op != &devfs_specops || (vp->v_type != VCHR && vp->v_type != VBLK), vp, ("device VNODE %p is FORCECLOSED", vp)); vgonel(vp); Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Fri Mar 6 05:50:39 2015 (r279684) +++ stable/10/sys/sys/vnode.h Fri Mar 6 09:22:05 2015 (r279685) @@ -819,6 +819,7 @@ void vnode_destroy_vobject(struct vnode extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; extern struct vop_vector default_vnodeops; +extern struct vop_vector devfs_specops; #define VOP_PANIC ((void*)(uintptr_t)vop_panic) #define VOP_NULL ((void*)(uintptr_t)vop_null) From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 11:25:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7761969; Fri, 6 Mar 2015 11:25:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 785F3A78; Fri, 6 Mar 2015 11:25:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26BPAv3084716; Fri, 6 Mar 2015 11:25:10 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26BPAYW084715; Fri, 6 Mar 2015 11:25:10 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503061125.t26BPAYW084715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Fri, 6 Mar 2015 11:25: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: r279686 - stable/10/share/man/man4/man4.powerpc 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 11:25:11 -0000 Author: brueffer Date: Fri Mar 6 11:25:10 2015 New Revision: 279686 URL: https://svnweb.freebsd.org/changeset/base/279686 Log: MFH: r279050 Apply mdoc style. Modified: stable/10/share/man/man4/man4.powerpc/tsec.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/man4.powerpc/tsec.4 ============================================================================== --- stable/10/share/man/man4/man4.powerpc/tsec.4 Fri Mar 6 09:22:05 2015 (r279685) +++ stable/10/share/man/man4/man4.powerpc/tsec.4 Fri Mar 6 11:25:10 2015 (r279686) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2009 +.Dd February 20, 2015 .Dt TSEC 4 .Os .Sh NAME @@ -91,18 +91,23 @@ The driver supports interrupts coalescing (IC) so that raising a transmit/receive frame interrupt is delayed, if possible, until a threshold-defined period of time has elapsed, or a threshold-defined frame counter has been reached -(whichever occurs first). The following sysctls regulate this behaviour: +(whichever occurs first). +The following sysctls regulate this behaviour: .Bl -tag -width indent .It Va dev.tsec.X.int_coal.rx_time .It Va dev.tsec.X.int_coal.rx_count .It Va dev.tsec.X.int_coal.tx_time .It Va dev.tsec.X.int_coal.tx_count .Pp -Value of 0 for either time or count disables IC on the given path. Time value +Value of 0 for either time or count disables IC on the given path. +Time value 1-65535 corresponds to a real time period and is expressed in units equivalent -to 64 ticks of the TSEC clock. Count 1-255 represents the number of frames -(note that value of 1 is equivalent to IC disabled). User provided values -larger than supported will be trimmed to the maximum supported. More details +to 64 ticks of the TSEC clock. +Count 1-255 represents the number of frames +(note that value of 1 is equivalent to IC disabled). +User provided values +larger than supported will be trimmed to the maximum supported. +More details are available in the reference manual of the device. .El .Sh HARDWARE @@ -144,9 +149,9 @@ device driver first appeared in The base version of .Nm device driver was written by -.An Piotr Kruszynski. +.An Piotr Kruszynski . It has been extended with polling and interrupt coalescing support by -.An Rafal Jaworowski. +.An Rafal Jaworowski . It has been further enhanced with multicast, h/w checksum calculation and vlan support by .An Piotr Ziecik . From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 11:27:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D39E3B33; Fri, 6 Mar 2015 11:27:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 A41F8AA2; Fri, 6 Mar 2015 11:27:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26BRxdS085069; Fri, 6 Mar 2015 11:27:59 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26BRxGo085068; Fri, 6 Mar 2015 11:27:59 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503061127.t26BRxGo085068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Fri, 6 Mar 2015 11:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279687 - stable/9/share/man/man4/man4.powerpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 11:27:59 -0000 Author: brueffer Date: Fri Mar 6 11:27:58 2015 New Revision: 279687 URL: https://svnweb.freebsd.org/changeset/base/279687 Log: MFH: r279050 Apply mdoc style. Modified: stable/9/share/man/man4/man4.powerpc/tsec.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/man4.powerpc/tsec.4 ============================================================================== --- stable/9/share/man/man4/man4.powerpc/tsec.4 Fri Mar 6 11:25:10 2015 (r279686) +++ stable/9/share/man/man4/man4.powerpc/tsec.4 Fri Mar 6 11:27:58 2015 (r279687) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2009 +.Dd February 20, 2015 .Dt TSEC 4 .Os .Sh NAME @@ -91,18 +91,23 @@ The driver supports interrupts coalescing (IC) so that raising a transmit/receive frame interrupt is delayed, if possible, until a threshold-defined period of time has elapsed, or a threshold-defined frame counter has been reached -(whichever occurs first). The following sysctls regulate this behaviour: +(whichever occurs first). +The following sysctls regulate this behaviour: .Bl -tag -width indent .It Va dev.tsec.X.int_coal.rx_time .It Va dev.tsec.X.int_coal.rx_count .It Va dev.tsec.X.int_coal.tx_time .It Va dev.tsec.X.int_coal.tx_count .Pp -Value of 0 for either time or count disables IC on the given path. Time value +Value of 0 for either time or count disables IC on the given path. +Time value 1-65535 corresponds to a real time period and is expressed in units equivalent -to 64 ticks of the TSEC clock. Count 1-255 represents the number of frames -(note that value of 1 is equivalent to IC disabled). User provided values -larger than supported will be trimmed to the maximum supported. More details +to 64 ticks of the TSEC clock. +Count 1-255 represents the number of frames +(note that value of 1 is equivalent to IC disabled). +User provided values +larger than supported will be trimmed to the maximum supported. +More details are available in the reference manual of the device. .El .Sh HARDWARE @@ -144,9 +149,9 @@ device driver first appeared in The base version of .Nm device driver was written by -.An Piotr Kruszynski. +.An Piotr Kruszynski . It has been extended with polling and interrupt coalescing support by -.An Rafal Jaworowski. +.An Rafal Jaworowski . It has been further enhanced with multicast, h/w checksum calculation and vlan support by .An Piotr Ziecik . From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 16:08:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F9B1F62; Fri, 6 Mar 2015 16:08:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 8963CC86; Fri, 6 Mar 2015 16:08:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26G8Bhh020602; Fri, 6 Mar 2015 16:08:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26G8Bhb020601; Fri, 6 Mar 2015 16:08:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503061608.t26G8Bhb020601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2015 16: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: r279693 - 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 16:08:11 -0000 Author: hselasky Date: Fri Mar 6 16:08:10 2015 New Revision: 279693 URL: https://svnweb.freebsd.org/changeset/base/279693 Log: MFC r279563: Add quirk for USB 3.0 controllers which don't support 64-bit DMA. Modified: stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Fri Mar 6 16:08:03 2015 (r279692) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Fri Mar 6 16:08:10 2015 (r279693) @@ -180,6 +180,7 @@ xhci_pci_attach(device_t self) { struct xhci_softc *sc = device_get_softc(self); int count, err, rid; + uint8_t usedma32; rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, @@ -192,7 +193,17 @@ 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); - if (xhci_init(sc, self, 0)) { + /* 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 */ + usedma32 = 1; + break; + default: + usedma32 = 0; + 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, sc->sc_io_res); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 16:09:34 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81172142; Fri, 6 Mar 2015 16:09:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6AB74C9A; Fri, 6 Mar 2015 16:09:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26G9YJI020846; Fri, 6 Mar 2015 16:09:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26G9YLo020845; Fri, 6 Mar 2015 16:09:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503061609.t26G9YLo020845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2015 16:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279694 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 16:09:34 -0000 Author: hselasky Date: Fri Mar 6 16:09:33 2015 New Revision: 279694 URL: https://svnweb.freebsd.org/changeset/base/279694 Log: MFC r279563: Add quirk for USB 3.0 controllers which don't support 64-bit DMA. Modified: stable/9/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Fri Mar 6 16:08:10 2015 (r279693) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Fri Mar 6 16:09:33 2015 (r279694) @@ -180,6 +180,7 @@ xhci_pci_attach(device_t self) { struct xhci_softc *sc = device_get_softc(self); int count, err, rid; + uint8_t usedma32; rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, @@ -192,7 +193,17 @@ 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); - if (xhci_init(sc, self, 0)) { + /* 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 */ + usedma32 = 1; + break; + default: + usedma32 = 0; + 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, sc->sc_io_res); From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 21:56:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FB2271F; Fri, 6 Mar 2015 21:56:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 ED415959; Fri, 6 Mar 2015 21:56:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26LulpN003411; Fri, 6 Mar 2015 21:56:47 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26LujoL003399; Fri, 6 Mar 2015 21:56:45 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062156.t26LujoL003399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 21:56: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: r279707 - stable/10/contrib/tzdata 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 21:56:48 -0000 Author: edwin Date: Fri Mar 6 21:56:44 2015 New Revision: 279707 URL: https://svnweb.freebsd.org/changeset/base/279707 Log: MFC of 279706,tzdata10: Release 2015a - 2015-01-29 Changes affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.) Changes affecting past time stamps Iceland observed DST in 1919 and 1921, and its 1939 fallback transition was Oct. 29, not Nov. 29. Remove incorrect data from Shanks about time in Iceland between 1837 and 1908. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. Modified: stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/backward stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/leap-seconds.list stable/10/contrib/tzdata/northamerica stable/10/contrib/tzdata/southamerica stable/10/contrib/tzdata/zone.tab stable/10/contrib/tzdata/zone1970.tab Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/antarctica ============================================================================== --- stable/10/contrib/tzdata/antarctica Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/antarctica Fri Mar 6 21:56:44 2015 (r279707) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: stable/10/contrib/tzdata/asia ============================================================================== --- stable/10/contrib/tzdata/asia Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/asia Fri Mar 6 21:56:44 2015 (r279707) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: stable/10/contrib/tzdata/backward ============================================================================== --- stable/10/contrib/tzdata/backward Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/backward Fri Mar 6 21:56:44 2015 (r279707) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/europe Fri Mar 6 21:56:44 2015 (r279707) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: stable/10/contrib/tzdata/leap-seconds.list ============================================================================== --- stable/10/contrib/tzdata/leap-seconds.list Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/leap-seconds.list Fri Mar 6 21:56:44 2015 (r279707) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: stable/10/contrib/tzdata/northamerica ============================================================================== --- stable/10/contrib/tzdata/northamerica Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/northamerica Fri Mar 6 21:56:44 2015 (r279707) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: stable/10/contrib/tzdata/southamerica ============================================================================== --- stable/10/contrib/tzdata/southamerica Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/southamerica Fri Mar 6 21:56:44 2015 (r279707) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: stable/10/contrib/tzdata/zone.tab ============================================================================== --- stable/10/contrib/tzdata/zone.tab Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/zone.tab Fri Mar 6 21:56:44 2015 (r279707) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: stable/10/contrib/tzdata/zone1970.tab ============================================================================== --- stable/10/contrib/tzdata/zone1970.tab Fri Mar 6 21:45:35 2015 (r279706) +++ stable/10/contrib/tzdata/zone1970.tab Fri Mar 6 21:56:44 2015 (r279707) @@ -234,7 +234,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:08:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99C3BE01; Fri, 6 Mar 2015 22:08:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 82FD2A73; Fri, 6 Mar 2015 22:08:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26M8oEI009070; Fri, 6 Mar 2015 22:08:50 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26M8llB009054; Fri, 6 Mar 2015 22:08:47 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062208.t26M8llB009054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 22:08:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279708 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:08:50 -0000 Author: edwin Date: Fri Mar 6 22:08:47 2015 New Revision: 279708 URL: https://svnweb.freebsd.org/changeset/base/279708 Log: MFC of 279706,tzdata9: Release 2015a - 2015-01-29 Changes affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.) Changes affecting past time stamps Iceland observed DST in 1919 and 1921, and its 1939 fallback transition was Oct. 29, not Nov. 29. Remove incorrect data from Shanks about time in Iceland between 1837 and 1908. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. Modified: stable/9/contrib/tzdata/antarctica stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/backward stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/leap-seconds.list stable/9/contrib/tzdata/northamerica stable/9/contrib/tzdata/southamerica stable/9/contrib/tzdata/zone.tab stable/9/contrib/tzdata/zone1970.tab Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/antarctica ============================================================================== --- stable/9/contrib/tzdata/antarctica Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/antarctica Fri Mar 6 22:08:47 2015 (r279708) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: stable/9/contrib/tzdata/asia ============================================================================== --- stable/9/contrib/tzdata/asia Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/asia Fri Mar 6 22:08:47 2015 (r279708) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: stable/9/contrib/tzdata/backward ============================================================================== --- stable/9/contrib/tzdata/backward Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/backward Fri Mar 6 22:08:47 2015 (r279708) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/europe Fri Mar 6 22:08:47 2015 (r279708) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: stable/9/contrib/tzdata/leap-seconds.list ============================================================================== --- stable/9/contrib/tzdata/leap-seconds.list Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/leap-seconds.list Fri Mar 6 22:08:47 2015 (r279708) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: stable/9/contrib/tzdata/northamerica ============================================================================== --- stable/9/contrib/tzdata/northamerica Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/northamerica Fri Mar 6 22:08:47 2015 (r279708) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: stable/9/contrib/tzdata/southamerica ============================================================================== --- stable/9/contrib/tzdata/southamerica Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/southamerica Fri Mar 6 22:08:47 2015 (r279708) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: stable/9/contrib/tzdata/zone.tab ============================================================================== --- stable/9/contrib/tzdata/zone.tab Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/zone.tab Fri Mar 6 22:08:47 2015 (r279708) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: stable/9/contrib/tzdata/zone1970.tab ============================================================================== --- stable/9/contrib/tzdata/zone1970.tab Fri Mar 6 21:56:44 2015 (r279707) +++ stable/9/contrib/tzdata/zone1970.tab Fri Mar 6 22:08:47 2015 (r279708) @@ -234,7 +234,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:09:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0BD9F42; Fri, 6 Mar 2015 22:09:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B9FD6A82; Fri, 6 Mar 2015 22:09:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26M9lXn009281; Fri, 6 Mar 2015 22:09:47 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26M9jO9009270; Fri, 6 Mar 2015 22:09:45 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062209.t26M9jO9009270@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 22:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r279709 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:09:48 -0000 Author: edwin Date: Fri Mar 6 22:09:44 2015 New Revision: 279709 URL: https://svnweb.freebsd.org/changeset/base/279709 Log: MFC of 279706,tzdata8: Release 2015a - 2015-01-29 Changes affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.) Changes affecting past time stamps Iceland observed DST in 1919 and 1921, and its 1939 fallback transition was Oct. 29, not Nov. 29. Remove incorrect data from Shanks about time in Iceland between 1837 and 1908. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. Modified: stable/8/share/zoneinfo/antarctica stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/backward stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/leap-seconds.list stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/southamerica stable/8/share/zoneinfo/zone.tab stable/8/share/zoneinfo/zone1970.tab Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/antarctica ============================================================================== --- stable/8/share/zoneinfo/antarctica Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/antarctica Fri Mar 6 22:09:44 2015 (r279709) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/asia Fri Mar 6 22:09:44 2015 (r279709) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: stable/8/share/zoneinfo/backward ============================================================================== --- stable/8/share/zoneinfo/backward Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/backward Fri Mar 6 22:09:44 2015 (r279709) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/europe Fri Mar 6 22:09:44 2015 (r279709) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: stable/8/share/zoneinfo/leap-seconds.list ============================================================================== --- stable/8/share/zoneinfo/leap-seconds.list Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/leap-seconds.list Fri Mar 6 22:09:44 2015 (r279709) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: stable/8/share/zoneinfo/northamerica ============================================================================== --- stable/8/share/zoneinfo/northamerica Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/northamerica Fri Mar 6 22:09:44 2015 (r279709) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: stable/8/share/zoneinfo/southamerica ============================================================================== --- stable/8/share/zoneinfo/southamerica Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/southamerica Fri Mar 6 22:09:44 2015 (r279709) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: stable/8/share/zoneinfo/zone.tab ============================================================================== --- stable/8/share/zoneinfo/zone.tab Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/zone.tab Fri Mar 6 22:09:44 2015 (r279709) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: stable/8/share/zoneinfo/zone1970.tab ============================================================================== --- stable/8/share/zoneinfo/zone1970.tab Fri Mar 6 22:08:47 2015 (r279708) +++ stable/8/share/zoneinfo/zone1970.tab Fri Mar 6 22:09:44 2015 (r279709) @@ -234,7 +234,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:10:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C42AF7; Fri, 6 Mar 2015 22:10:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 8582CB60; Fri, 6 Mar 2015 22:10:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26MAGNX009509; Fri, 6 Mar 2015 22:10:16 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26MAE3h009496; Fri, 6 Mar 2015 22:10:14 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062210.t26MAE3h009496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 22:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r279710 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:10:16 -0000 Author: edwin Date: Fri Mar 6 22:10:13 2015 New Revision: 279710 URL: https://svnweb.freebsd.org/changeset/base/279710 Log: MFC of 279706,tzdata7: Release 2015a - 2015-01-29 Changes affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.) Changes affecting past time stamps Iceland observed DST in 1919 and 1921, and its 1939 fallback transition was Oct. 29, not Nov. 29. Remove incorrect data from Shanks about time in Iceland between 1837 and 1908. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. Modified: stable/7/share/zoneinfo/antarctica stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/backward stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/leap-seconds.list stable/7/share/zoneinfo/northamerica stable/7/share/zoneinfo/southamerica stable/7/share/zoneinfo/zone.tab stable/7/share/zoneinfo/zone1970.tab Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/antarctica ============================================================================== --- stable/7/share/zoneinfo/antarctica Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/antarctica Fri Mar 6 22:10:13 2015 (r279710) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/asia Fri Mar 6 22:10:13 2015 (r279710) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: stable/7/share/zoneinfo/backward ============================================================================== --- stable/7/share/zoneinfo/backward Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/backward Fri Mar 6 22:10:13 2015 (r279710) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/europe Fri Mar 6 22:10:13 2015 (r279710) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: stable/7/share/zoneinfo/leap-seconds.list ============================================================================== --- stable/7/share/zoneinfo/leap-seconds.list Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/leap-seconds.list Fri Mar 6 22:10:13 2015 (r279710) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/northamerica Fri Mar 6 22:10:13 2015 (r279710) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: stable/7/share/zoneinfo/southamerica ============================================================================== --- stable/7/share/zoneinfo/southamerica Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/southamerica Fri Mar 6 22:10:13 2015 (r279710) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: stable/7/share/zoneinfo/zone.tab ============================================================================== --- stable/7/share/zoneinfo/zone.tab Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/zone.tab Fri Mar 6 22:10:13 2015 (r279710) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: stable/7/share/zoneinfo/zone1970.tab ============================================================================== --- stable/7/share/zoneinfo/zone1970.tab Fri Mar 6 22:09:44 2015 (r279709) +++ stable/7/share/zoneinfo/zone1970.tab Fri Mar 6 22:10:13 2015 (r279710) @@ -234,7 +234,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:10:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C13A8225; Fri, 6 Mar 2015 22:10:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 AAADDB69; Fri, 6 Mar 2015 22:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26MAji3010136; Fri, 6 Mar 2015 22:10:45 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26MAhOf010127; Fri, 6 Mar 2015 22:10:43 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503062210.t26MAhOf010127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Fri, 6 Mar 2015 22:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r279711 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:10:46 -0000 Author: edwin Date: Fri Mar 6 22:10:42 2015 New Revision: 279711 URL: https://svnweb.freebsd.org/changeset/base/279711 Log: MFC of 279706,tzdata6: Release 2015a - 2015-01-29 Changes affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.) Changes affecting past time stamps Iceland observed DST in 1919 and 1921, and its 1939 fallback transition was Oct. 29, not Nov. 29. Remove incorrect data from Shanks about time in Iceland between 1837 and 1908. Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, and Asia/Muscat. Modified: stable/6/share/zoneinfo/antarctica stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/backward stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/leap-seconds.list stable/6/share/zoneinfo/northamerica stable/6/share/zoneinfo/southamerica stable/6/share/zoneinfo/zone.tab stable/6/share/zoneinfo/zone1970.tab Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/antarctica ============================================================================== --- stable/6/share/zoneinfo/antarctica Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/antarctica Fri Mar 6 22:10:42 2015 (r279711) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/asia Fri Mar 6 22:10:42 2015 (r279711) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: stable/6/share/zoneinfo/backward ============================================================================== --- stable/6/share/zoneinfo/backward Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/backward Fri Mar 6 22:10:42 2015 (r279711) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/europe Fri Mar 6 22:10:42 2015 (r279711) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: stable/6/share/zoneinfo/leap-seconds.list ============================================================================== --- stable/6/share/zoneinfo/leap-seconds.list Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/leap-seconds.list Fri Mar 6 22:10:42 2015 (r279711) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: stable/6/share/zoneinfo/northamerica ============================================================================== --- stable/6/share/zoneinfo/northamerica Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/northamerica Fri Mar 6 22:10:42 2015 (r279711) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: stable/6/share/zoneinfo/southamerica ============================================================================== --- stable/6/share/zoneinfo/southamerica Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/southamerica Fri Mar 6 22:10:42 2015 (r279711) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: stable/6/share/zoneinfo/zone.tab ============================================================================== --- stable/6/share/zoneinfo/zone.tab Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/zone.tab Fri Mar 6 22:10:42 2015 (r279711) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: stable/6/share/zoneinfo/zone1970.tab ============================================================================== --- stable/6/share/zoneinfo/zone1970.tab Fri Mar 6 22:10:13 2015 (r279710) +++ stable/6/share/zoneinfo/zone1970.tab Fri Mar 6 22:10:42 2015 (r279711) @@ -234,7 +234,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:31:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D96CE9E4; Fri, 6 Mar 2015 22:31:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C3D7ED7C; Fri, 6 Mar 2015 22:31:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26MVZfn022742; Fri, 6 Mar 2015 22:31:35 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26MVZe6022741; Fri, 6 Mar 2015 22:31:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503062231.t26MVZe6022741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 6 Mar 2015 22:31: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: r279713 - stable/10/libexec/rtld-elf 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:31:36 -0000 Author: jkim Date: Fri Mar 6 22:31:35 2015 New Revision: 279713 URL: https://svnweb.freebsd.org/changeset/base/279713 Log: MFC: r279364 Use realpath(3) to properly expand $ORIGIN to its absolute path. Modified: stable/10/libexec/rtld-elf/rtld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/rtld.c ============================================================================== --- stable/10/libexec/rtld-elf/rtld.c Fri Mar 6 22:22:57 2015 (r279712) +++ stable/10/libexec/rtld-elf/rtld.c Fri Mar 6 22:31:35 2015 (r279713) @@ -3420,17 +3420,16 @@ rtld_dirname(const char *path, char *bna static int rtld_dirname_abs(const char *path, char *base) { - char base_rel[PATH_MAX]; + char *last; - if (rtld_dirname(path, base) == -1) + if (realpath(path, base) == NULL) return (-1); - if (base[0] == '/') - return (0); - if (getcwd(base_rel, sizeof(base_rel)) == NULL || - strlcat(base_rel, "/", sizeof(base_rel)) >= sizeof(base_rel) || - strlcat(base_rel, base, sizeof(base_rel)) >= sizeof(base_rel)) + dbg("%s -> %s", path, base); + last = strrchr(base, '/'); + if (last == NULL) return (-1); - strcpy(base, base_rel); + if (last != base) + *last = '\0'; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:34:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19E15B4B; Fri, 6 Mar 2015 22:34:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 042A3D9B; Fri, 6 Mar 2015 22:34:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26MY9FB023412; Fri, 6 Mar 2015 22:34:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26MY9xR023411; Fri, 6 Mar 2015 22:34:09 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503062234.t26MY9xR023411@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 6 Mar 2015 22:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279714 - stable/9/libexec/rtld-elf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:34:10 -0000 Author: jkim Date: Fri Mar 6 22:34:09 2015 New Revision: 279714 URL: https://svnweb.freebsd.org/changeset/base/279714 Log: MFC: r279713 Use realpath(3) to properly expand $ORIGIN to its absolute path. Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Fri Mar 6 22:31:35 2015 (r279713) +++ stable/9/libexec/rtld-elf/rtld.c Fri Mar 6 22:34:09 2015 (r279714) @@ -3415,17 +3415,16 @@ rtld_dirname(const char *path, char *bna static int rtld_dirname_abs(const char *path, char *base) { - char base_rel[PATH_MAX]; + char *last; - if (rtld_dirname(path, base) == -1) + if (realpath(path, base) == NULL) return (-1); - if (base[0] == '/') - return (0); - if (getcwd(base_rel, sizeof(base_rel)) == NULL || - strlcat(base_rel, "/", sizeof(base_rel)) >= sizeof(base_rel) || - strlcat(base_rel, base, sizeof(base_rel)) >= sizeof(base_rel)) + dbg("%s -> %s", path, base); + last = strrchr(base, '/'); + if (last == NULL) return (-1); - strcpy(base, base_rel); + if (last != base) + *last = '\0'; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:35:02 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A2E6C85; Fri, 6 Mar 2015 22:35:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E91EDDA6; Fri, 6 Mar 2015 22:35:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t26MZ12g023605; Fri, 6 Mar 2015 22:35:01 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t26MZ1WQ023604; Fri, 6 Mar 2015 22:35:01 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503062235.t26MZ1WQ023604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 6 Mar 2015 22:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r279715 - stable/8/libexec/rtld-elf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:35:02 -0000 Author: jkim Date: Fri Mar 6 22:35:01 2015 New Revision: 279715 URL: https://svnweb.freebsd.org/changeset/base/279715 Log: MFC: r279364 Use realpath(3) to properly expand $ORIGIN to its absolute path. Modified: stable/8/libexec/rtld-elf/rtld.c Directory Properties: stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/libexec/rtld-elf/rtld.c ============================================================================== --- stable/8/libexec/rtld-elf/rtld.c Fri Mar 6 22:34:09 2015 (r279714) +++ stable/8/libexec/rtld-elf/rtld.c Fri Mar 6 22:35:01 2015 (r279715) @@ -2563,17 +2563,16 @@ rtld_dirname(const char *path, char *bna static int rtld_dirname_abs(const char *path, char *base) { - char base_rel[PATH_MAX]; + char *last; - if (rtld_dirname(path, base) == -1) + if (realpath(path, base) == NULL) return (-1); - if (base[0] == '/') - return (0); - if (getcwd(base_rel, sizeof(base_rel)) == NULL || - strlcat(base_rel, "/", sizeof(base_rel)) >= sizeof(base_rel) || - strlcat(base_rel, base, sizeof(base_rel)) >= sizeof(base_rel)) + dbg("%s -> %s", path, base); + last = strrchr(base, '/'); + if (last == NULL) return (-1); - strcpy(base, base_rel); + if (last != base) + *last = '\0'; return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 22:40:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC7E0C81; Fri, 6 Mar 2015 22:40:10 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 729C5116E; Fri, 6 Mar 2015 22:40:10 +0000 (UTC) Message-ID: <54FA2CC9.3030002@FreeBSD.org> Date: Fri, 06 Mar 2015 17:40:09 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r279714 - stable/9/libexec/rtld-elf References: <201503062234.t26MY9xR023411@svn.freebsd.org> In-Reply-To: <201503062234.t26MY9xR023411@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 22:40:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 03/06/2015 17:34, Jung-uk Kim wrote: > Author: jkim Date: Fri Mar 6 22:34:09 2015 New Revision: 279714 > URL: https://svnweb.freebsd.org/changeset/base/279714 > > Log: MFC: r279713 > > Use realpath(3) to properly expand $ORIGIN to its absolute path. ... I meant to write: MFC: r279364 Sorry for the copy-and-pasto. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU+izBAAoJEHyflib82/FGt6AH/jXGQ+augiSYk33BNYWQ32a/ 93tw00QUQ2TLaXtuadBUmuXIGznJiT7ZXMzJPxutJmi3L7gq4lqfoUAu5c/oLEKI nNy37szC7dxujwzCXysKLyom9fpAWYJ+lEoL13Bz0t9YRae+lgvRgyZTG62she3Y h5Q4ZDpiGj9UNdRZNpa3E4SidLn40oLIV3iqFB3jCMe95g9zoKTppCvmlHlNZKpb cIrrHPzI9KbuV6aw2geFcZG1DgYJD/xH/wr/yk/a/oZSOnZqYsOOdxfvA7g9ZOg3 A2O+w9qGkWDM03Ps1VvvlltXNfJkCk49j8mH12QD6FVG4ziW6TIkWzat4kDDI/I= =NTRb -----END PGP SIGNATURE----- From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 18:33:31 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A076F610; Sat, 7 Mar 2015 18:33:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 892AD32B; Sat, 7 Mar 2015 18:33:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27IXVxF092522; Sat, 7 Mar 2015 18:33:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27IXSGB092501; Sat, 7 Mar 2015 18:33:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503071833.t27IXSGB092501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Mar 2015 18:33:28 +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: r279731 - in stable/10/sys/ofed: drivers/net/mlx4 include/linux/mlx4 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 18:33:31 -0000 Author: hselasky Date: Sat Mar 7 18:33:28 2015 New Revision: 279731 URL: https://svnweb.freebsd.org/changeset/base/279731 Log: MFC r279584: Updates for the Mellanox ethernet driver > List of fixes: * use correct format for GID printouts * double array indexing * spelling in printouts * void pointer arithmetic * allow more receive rings * correct maximum number of transmit rings * use "const" instead of "static" for constants * check for invalid VLAN tags * check for lack of IRQ resources > Added more hardware specific defines > Added more verbose printouts of firmware status codes Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c stable/10/sys/ofed/drivers/net/mlx4/en_main.c stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/en_rx.c stable/10/sys/ofed/drivers/net/mlx4/en_tx.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/mcg.c stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h stable/10/sys/ofed/include/linux/mlx4/device.h stable/10/sys/ofed/include/linux/mlx4/qp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cmd.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c Sat Mar 7 18:33:28 2015 (r279731) @@ -757,6 +757,19 @@ static int mlx4_cmd_wait(struct mlx4_dev "in_mod=0x%x, op_mod=0x%x, fw status = 0x%x\n", cmd_to_str(op), op, (unsigned long long) in_param, in_modifier, op_modifier, context->fw_status); + + switch(context->fw_status) { + case CMD_STAT_BAD_PARAM: + mlx4_err(dev, "Parameter is not supported, " + "parameter is out of range\n"); + break; + case CMD_STAT_EXCEED_LIM: + mlx4_err(dev, "Required capability exceeded " + "device limits\n"); + break; + default: + break; + } goto out; } Modified: stable/10/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_main.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/en_main.c Sat Mar 7 18:33:28 2015 (r279731) @@ -239,8 +239,8 @@ static void *mlx4_en_add(struct mlx4_dev DEF_RX_RINGS))); } else { mdev->profile.prof[i].rx_ring_num = rounddown_pow_of_two( - min_t(int, dev->caps.comp_pool/ - dev->caps.num_ports - 1 , MAX_MSIX_P_PORT - 1)); + min_t(int, dev->caps.comp_pool / + dev->caps.num_ports, MAX_MSIX_P_PORT)); } } Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Mar 7 18:33:28 2015 (r279731) @@ -1305,7 +1305,7 @@ int mlx4_en_start_port(struct net_device cq = priv->tx_cq[i]; err = mlx4_en_activate_cq(priv, cq, i); if (err) { - en_err(priv, "Failed allocating Tx CQ\n"); + en_err(priv, "Failed activating Tx CQ\n"); goto tx_err; } err = mlx4_en_set_cq_moder(priv, cq); @@ -1323,7 +1323,7 @@ int mlx4_en_start_port(struct net_device err = mlx4_en_activate_tx_ring(priv, tx_ring, cq->mcq.cqn, i / priv->num_tx_rings_p_up); if (err) { - en_err(priv, "Failed allocating Tx ring\n"); + en_err(priv, "Failed activating Tx ring %d\n", i); mlx4_en_deactivate_cq(priv, cq); goto tx_err; } @@ -2189,6 +2189,7 @@ out: mlx4_en_destroy_netdev(dev); return err; } + static int mlx4_en_set_ring_size(struct net_device *dev, int rx_size, int tx_size) { @@ -2409,7 +2410,6 @@ static void mlx4_en_sysctl_conf(struct m "Enable adaptive rx coalescing"); } - static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct net_device *dev; Modified: stable/10/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_rx.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/en_rx.c Sat Mar 7 18:33:28 2015 (r279731) @@ -500,7 +500,7 @@ static int mlx4_en_complete_rx_desc(stru goto fail; /* Unmap buffer */ - pci_unmap_single(mdev->pdev, dma, frag_info[nr].frag_size, + pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, PCI_DMA_FROMDEVICE); } /* Adjust size of last fragment to match actual length */ Modified: stable/10/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_tx.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/en_tx.c Sat Mar 7 18:33:28 2015 (r279731) @@ -710,16 +710,16 @@ u16 mlx4_en_select_queue(struct net_devi { struct mlx4_en_priv *priv = netdev_priv(dev); u32 rings_p_up = priv->num_tx_rings_p_up; - u32 vlan_tag = 0; u32 up = 0; u32 queue_index; +#if (MLX4_EN_NUM_UP > 1) /* Obtain VLAN information if present */ if (mb->m_flags & M_VLANTAG) { - vlan_tag = mb->m_pkthdr.ether_vtag; - up = (vlan_tag >> 13); + u32 vlan_tag = mb->m_pkthdr.ether_vtag; + up = (vlan_tag >> 13) % MLX4_EN_NUM_UP; } - +#endif /* hash mbuf */ queue_index = mlx4_en_hashmbuf(MLX4_F_HASHL3 | MLX4_F_HASHL4, mb, hashrandom); Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Sat Mar 7 18:33:28 2015 (r279731) @@ -1307,8 +1307,9 @@ static ssize_t show_port_ib_mtu(struct d port_mtu_attr); struct mlx4_dev *mdev = info->dev; + /* When port type is eth, port mtu value isn't used. */ if (mdev->caps.port_type[info->port] == MLX4_PORT_TYPE_ETH) - mlx4_warn(mdev, "port level mtu is only used for IB ports\n"); + return -EINVAL; sprintf(buf, "%d\n", ibta_mtu_to_int(mdev->caps.port_ib_mtu[info->port])); @@ -2903,6 +2904,12 @@ static void mlx4_enable_msi_x(struct mlx goto retry; } kfree(entries); + /* if error, or can't alloc even 1 IRQ */ + if (err < 0) { + mlx4_err(dev, "No IRQs left, device can't " + "be started.\n"); + goto no_irq; + } goto no_msi; } @@ -2930,6 +2937,10 @@ no_msi: for (i = 0; i < 2; ++i) priv->eq_table.eq[i].irq = dev->pdev->irq; + return; +no_irq: + dev->caps.num_comp_vectors = 0; + dev->caps.comp_pool = 0; } static int mlx4_init_port_info(struct mlx4_dev *dev, int port) @@ -3305,6 +3316,13 @@ slave_start: mutex_init(&priv->msix_ctl.pool_lock); mlx4_enable_msi_x(dev); + + /* no MSIX and no shared IRQ */ + if (!dev->caps.num_comp_vectors && !dev->caps.comp_pool) { + err = -ENOSPC; + goto err_free_eq; + } + if ((mlx4_is_mfunc(dev)) && !(dev->flags & MLX4_FLAG_MSI_X)) { err = -ENOSYS; Modified: stable/10/sys/ofed/drivers/net/mlx4/mcg.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mcg.c Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/mcg.c Sat Mar 7 18:33:28 2015 (r279731) @@ -36,6 +36,7 @@ #include #include +#include #include "mlx4.h" @@ -690,8 +691,10 @@ static int find_entry(struct mlx4_dev *d if (err) return err; - if (0) - mlx4_dbg(dev, "Hash for %pI6 is %04x\n", gid, hash); + if (0) { + mlx4_dbg(dev, "Hash for "GID_PRINT_FMT" is %04x\n", + GID_PRINT_ARGS(gid), hash); + } *index = hash; *prev = -1; @@ -912,10 +915,11 @@ static void mlx4_err_rule(struct mlx4_de case MLX4_NET_TRANS_RULE_ID_IB: len += snprintf(buf + len, BUF_SIZE - len, - "dst-gid = %pI6\n", cur->ib.dst_gid); + "dst-gid = "GID_PRINT_FMT"\n", + GID_PRINT_ARGS(cur->ib.dst_gid)); len += snprintf(buf + len, BUF_SIZE - len, - "dst-gid-mask = %pI6\n", - cur->ib.dst_gid_msk); + "dst-gid-mask = "GID_PRINT_FMT"\n", + GID_PRINT_ARGS(cur->ib.dst_gid_msk)); break; case MLX4_NET_TRANS_RULE_ID_IPV6: @@ -1135,7 +1139,8 @@ int mlx4_qp_detach_common(struct mlx4_de goto out; if (index == -1) { - mlx4_err(dev, "MGID %pI6 not found\n", gid); + mlx4_err(dev, "MGID "GID_PRINT_FMT" not found\n", + GID_PRINT_ARGS(gid)); err = -EINVAL; goto out; } Modified: stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Sat Mar 7 18:33:28 2015 (r279731) @@ -154,7 +154,7 @@ enum { #define MLX4_EN_NUM_UP 1 #define MAX_TX_RINGS (MLX4_EN_MAX_TX_RING_P_UP * \ - (MLX4_EN_NUM_UP + 1)) + MLX4_EN_NUM_UP) #define MLX4_EN_DEF_TX_RING_SIZE 1024 #define MLX4_EN_DEF_RX_RING_SIZE 1024 @@ -358,11 +358,7 @@ struct mlx4_en_rx_ring { static inline int mlx4_en_can_lro(__be16 status) { - static __be16 status_all; - static __be16 status_ipv4_ipok_tcp; - static __be16 status_ipv6_ipok_tcp; - - status_all = cpu_to_be16( + const __be16 status_all = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | MLX4_CQE_STATUS_IPV4F | MLX4_CQE_STATUS_IPV6 | @@ -370,11 +366,11 @@ static inline int mlx4_en_can_lro(__be16 MLX4_CQE_STATUS_TCP | MLX4_CQE_STATUS_UDP | MLX4_CQE_STATUS_IPOK); - status_ipv4_ipok_tcp = cpu_to_be16( + const __be16 status_ipv4_ipok_tcp = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | MLX4_CQE_STATUS_IPOK | MLX4_CQE_STATUS_TCP); - status_ipv6_ipok_tcp = cpu_to_be16( + const __be16 status_ipv6_ipok_tcp = cpu_to_be16( MLX4_CQE_STATUS_IPV6 | MLX4_CQE_STATUS_IPOK | MLX4_CQE_STATUS_TCP); @@ -384,7 +380,6 @@ static inline int mlx4_en_can_lro(__be16 status == status_ipv6_ipok_tcp); } - struct mlx4_en_cq { struct mlx4_cq mcq; struct mlx4_hwq_resources wqres; Modified: stable/10/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/10/sys/ofed/include/linux/mlx4/device.h Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/include/linux/mlx4/device.h Sat Mar 7 18:33:28 2015 (r279731) @@ -186,8 +186,19 @@ enum { MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, - MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, - MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14 + MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, + MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, + MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, + MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, + MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, + MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, + MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, }; /* bit enums for an 8-bit flags field indicating special use @@ -948,9 +959,9 @@ void mlx4_buf_free(struct mlx4_dev *dev, static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) { if (BITS_PER_LONG == 64 || buf->nbufs == 1) - return buf->direct.buf + offset; + return (u8 *)buf->direct.buf + offset; else - return buf->page_list[offset >> PAGE_SHIFT].buf + + return (u8 *)buf->page_list[offset >> PAGE_SHIFT].buf + (offset & (PAGE_SIZE - 1)); } Modified: stable/10/sys/ofed/include/linux/mlx4/qp.h ============================================================================== --- stable/10/sys/ofed/include/linux/mlx4/qp.h Sat Mar 7 18:33:08 2015 (r279730) +++ stable/10/sys/ofed/include/linux/mlx4/qp.h Sat Mar 7 18:33:28 2015 (r279731) @@ -253,6 +253,8 @@ enum { MLX4_UPD_QP_PATH_MASK_SCHED_QUEUE = 14 + 32, MLX4_UPD_QP_PATH_MASK_IF_COUNTER_INDEX = 15 + 32, MLX4_UPD_QP_PATH_MASK_FVL_RX = 16 + 32, + MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_UC_LB = 18 + 32, + MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_MC_LB = 19 + 32, }; enum { /* param3 */ From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 18:39:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7349787; Sat, 7 Mar 2015 18:39:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7854335E; Sat, 7 Mar 2015 18:39:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27IdFuV093325; Sat, 7 Mar 2015 18:39:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27IdFT0093324; Sat, 7 Mar 2015 18:39:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503071839.t27IdFT0093324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Mar 2015 18:39: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: r279732 - stable/10/sys/ofed/include/linux 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 18:39:16 -0000 Author: hselasky Date: Sat Mar 7 18:39:15 2015 New Revision: 279732 URL: https://svnweb.freebsd.org/changeset/base/279732 Log: MFC r278866: Define standard formatting strings to print GIDs in a separate header file. Sponsored by: Mellanox Technologies Added: stable/10/sys/ofed/include/linux/printk.h - copied unchanged from r278866, head/sys/ofed/include/linux/printk.h Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/ofed/include/linux/printk.h (from r278866, head/sys/ofed/include/linux/printk.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/ofed/include/linux/printk.h Sat Mar 7 18:39:15 2015 (r279732, copy of r278866, head/sys/ofed/include/linux/printk.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _FBSD_PRINTK_H_ +#define _FBSD_PRINTK_H_ + +/* GID printing macros */ +#define GID_PRINT_FMT "%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x" +#define GID_PRINT_ARGS(gid_raw) htons(((u16 *)gid_raw)[0]), htons(((u16 *)gid_raw)[1]),\ + htons(((u16 *)gid_raw)[2]), htons(((u16 *)gid_raw)[3]),\ + htons(((u16 *)gid_raw)[4]), htons(((u16 *)gid_raw)[5]),\ + htons(((u16 *)gid_raw)[6]), htons(((u16 *)gid_raw)[7]) + +#endif /* _FBSD_PRINTK_H */ From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 18:42:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 907298DA; Sat, 7 Mar 2015 18:42:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 606A35FE; Sat, 7 Mar 2015 18:42:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Igcsx097223; Sat, 7 Mar 2015 18:42:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27IgcoB097222; Sat, 7 Mar 2015 18:42:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503071842.t27IgcoB097222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Mar 2015 18:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279733 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 18:42:38 -0000 Author: hselasky Date: Sat Mar 7 18:42:37 2015 New Revision: 279733 URL: https://svnweb.freebsd.org/changeset/base/279733 Log: MFC r278866: Define standard formatting strings to print GIDs in a separate header file. Sponsored by: Mellanox Technologies Added: stable/9/sys/ofed/include/linux/printk.h - copied unchanged from r278866, head/sys/ofed/include/linux/printk.h Modified: Directory Properties: stable/9/sys/ (props changed) Copied: stable/9/sys/ofed/include/linux/printk.h (from r278866, head/sys/ofed/include/linux/printk.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/ofed/include/linux/printk.h Sat Mar 7 18:42:37 2015 (r279733, copy of r278866, head/sys/ofed/include/linux/printk.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _FBSD_PRINTK_H_ +#define _FBSD_PRINTK_H_ + +/* GID printing macros */ +#define GID_PRINT_FMT "%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x" +#define GID_PRINT_ARGS(gid_raw) htons(((u16 *)gid_raw)[0]), htons(((u16 *)gid_raw)[1]),\ + htons(((u16 *)gid_raw)[2]), htons(((u16 *)gid_raw)[3]),\ + htons(((u16 *)gid_raw)[4]), htons(((u16 *)gid_raw)[5]),\ + htons(((u16 *)gid_raw)[6]), htons(((u16 *)gid_raw)[7]) + +#endif /* _FBSD_PRINTK_H */ From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 18:44:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B178CA1F; Sat, 7 Mar 2015 18:44:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 99E2A60D; Sat, 7 Mar 2015 18:44:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Iij6Q097601; Sat, 7 Mar 2015 18:44:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27IigHe097589; Sat, 7 Mar 2015 18:44:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503071844.t27IigHe097589@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Mar 2015 18:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279734 - in stable/9/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 18:44:45 -0000 Author: hselasky Date: Sat Mar 7 18:44:42 2015 New Revision: 279734 URL: https://svnweb.freebsd.org/changeset/base/279734 Log: MFC r279584: Updates for the Mellanox ethernet driver > List of fixes: * use correct format for GID printouts * double array indexing * spelling in printouts * void pointer arithmetic * allow more receive rings * correct maximum number of transmit rings * use "const" instead of "static" for constants * check for invalid VLAN tags * check for lack of IRQ resources > Added more hardware specific defines > Added more verbose printouts of firmware status codes Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/cmd.c stable/9/sys/ofed/drivers/net/mlx4/en_main.c stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c stable/9/sys/ofed/drivers/net/mlx4/en_rx.c stable/9/sys/ofed/drivers/net/mlx4/en_tx.c stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/mcg.c stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h stable/9/sys/ofed/include/linux/mlx4/device.h stable/9/sys/ofed/include/linux/mlx4/qp.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/cmd.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/cmd.c Sat Mar 7 18:44:42 2015 (r279734) @@ -757,6 +757,19 @@ static int mlx4_cmd_wait(struct mlx4_dev "in_mod=0x%x, op_mod=0x%x, fw status = 0x%x\n", cmd_to_str(op), op, (unsigned long long) in_param, in_modifier, op_modifier, context->fw_status); + + switch(context->fw_status) { + case CMD_STAT_BAD_PARAM: + mlx4_err(dev, "Parameter is not supported, " + "parameter is out of range\n"); + break; + case CMD_STAT_EXCEED_LIM: + mlx4_err(dev, "Required capability exceeded " + "device limits\n"); + break; + default: + break; + } goto out; } Modified: stable/9/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_main.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/en_main.c Sat Mar 7 18:44:42 2015 (r279734) @@ -239,8 +239,8 @@ static void *mlx4_en_add(struct mlx4_dev DEF_RX_RINGS))); } else { mdev->profile.prof[i].rx_ring_num = rounddown_pow_of_two( - min_t(int, dev->caps.comp_pool/ - dev->caps.num_ports - 1 , MAX_MSIX_P_PORT - 1)); + min_t(int, dev->caps.comp_pool / + dev->caps.num_ports, MAX_MSIX_P_PORT)); } } Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sat Mar 7 18:44:42 2015 (r279734) @@ -1305,7 +1305,7 @@ int mlx4_en_start_port(struct net_device cq = priv->tx_cq[i]; err = mlx4_en_activate_cq(priv, cq, i); if (err) { - en_err(priv, "Failed allocating Tx CQ\n"); + en_err(priv, "Failed activating Tx CQ\n"); goto tx_err; } err = mlx4_en_set_cq_moder(priv, cq); @@ -1323,7 +1323,7 @@ int mlx4_en_start_port(struct net_device err = mlx4_en_activate_tx_ring(priv, tx_ring, cq->mcq.cqn, i / priv->num_tx_rings_p_up); if (err) { - en_err(priv, "Failed allocating Tx ring\n"); + en_err(priv, "Failed activating Tx ring %d\n", i); mlx4_en_deactivate_cq(priv, cq); goto tx_err; } @@ -2189,6 +2189,7 @@ out: mlx4_en_destroy_netdev(dev); return err; } + static int mlx4_en_set_ring_size(struct net_device *dev, int rx_size, int tx_size) { @@ -2409,7 +2410,6 @@ static void mlx4_en_sysctl_conf(struct m "Enable adaptive rx coalescing"); } - static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct net_device *dev; Modified: stable/9/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_rx.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/en_rx.c Sat Mar 7 18:44:42 2015 (r279734) @@ -500,7 +500,7 @@ static int mlx4_en_complete_rx_desc(stru goto fail; /* Unmap buffer */ - pci_unmap_single(mdev->pdev, dma, frag_info[nr].frag_size, + pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, PCI_DMA_FROMDEVICE); } /* Adjust size of last fragment to match actual length */ Modified: stable/9/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_tx.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/en_tx.c Sat Mar 7 18:44:42 2015 (r279734) @@ -710,16 +710,16 @@ u16 mlx4_en_select_queue(struct net_devi { struct mlx4_en_priv *priv = netdev_priv(dev); u32 rings_p_up = priv->num_tx_rings_p_up; - u32 vlan_tag = 0; u32 up = 0; u32 queue_index; +#if (MLX4_EN_NUM_UP > 1) /* Obtain VLAN information if present */ if (mb->m_flags & M_VLANTAG) { - vlan_tag = mb->m_pkthdr.ether_vtag; - up = (vlan_tag >> 13); + u32 vlan_tag = mb->m_pkthdr.ether_vtag; + up = (vlan_tag >> 13) % MLX4_EN_NUM_UP; } - +#endif /* hash mbuf */ queue_index = mlx4_en_hashmbuf(MLX4_F_HASHL3 | MLX4_F_HASHL4, mb, hashrandom); Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Sat Mar 7 18:44:42 2015 (r279734) @@ -1307,8 +1307,9 @@ static ssize_t show_port_ib_mtu(struct d port_mtu_attr); struct mlx4_dev *mdev = info->dev; + /* When port type is eth, port mtu value isn't used. */ if (mdev->caps.port_type[info->port] == MLX4_PORT_TYPE_ETH) - mlx4_warn(mdev, "port level mtu is only used for IB ports\n"); + return -EINVAL; sprintf(buf, "%d\n", ibta_mtu_to_int(mdev->caps.port_ib_mtu[info->port])); @@ -2903,6 +2904,12 @@ static void mlx4_enable_msi_x(struct mlx goto retry; } kfree(entries); + /* if error, or can't alloc even 1 IRQ */ + if (err < 0) { + mlx4_err(dev, "No IRQs left, device can't " + "be started.\n"); + goto no_irq; + } goto no_msi; } @@ -2930,6 +2937,10 @@ no_msi: for (i = 0; i < 2; ++i) priv->eq_table.eq[i].irq = dev->pdev->irq; + return; +no_irq: + dev->caps.num_comp_vectors = 0; + dev->caps.comp_pool = 0; } static int mlx4_init_port_info(struct mlx4_dev *dev, int port) @@ -3305,6 +3316,13 @@ slave_start: mutex_init(&priv->msix_ctl.pool_lock); mlx4_enable_msi_x(dev); + + /* no MSIX and no shared IRQ */ + if (!dev->caps.num_comp_vectors && !dev->caps.comp_pool) { + err = -ENOSPC; + goto err_free_eq; + } + if ((mlx4_is_mfunc(dev)) && !(dev->flags & MLX4_FLAG_MSI_X)) { err = -ENOSYS; Modified: stable/9/sys/ofed/drivers/net/mlx4/mcg.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/mcg.c Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/mcg.c Sat Mar 7 18:44:42 2015 (r279734) @@ -36,6 +36,7 @@ #include #include +#include #include "mlx4.h" @@ -690,8 +691,10 @@ static int find_entry(struct mlx4_dev *d if (err) return err; - if (0) - mlx4_dbg(dev, "Hash for %pI6 is %04x\n", gid, hash); + if (0) { + mlx4_dbg(dev, "Hash for "GID_PRINT_FMT" is %04x\n", + GID_PRINT_ARGS(gid), hash); + } *index = hash; *prev = -1; @@ -912,10 +915,11 @@ static void mlx4_err_rule(struct mlx4_de case MLX4_NET_TRANS_RULE_ID_IB: len += snprintf(buf + len, BUF_SIZE - len, - "dst-gid = %pI6\n", cur->ib.dst_gid); + "dst-gid = "GID_PRINT_FMT"\n", + GID_PRINT_ARGS(cur->ib.dst_gid)); len += snprintf(buf + len, BUF_SIZE - len, - "dst-gid-mask = %pI6\n", - cur->ib.dst_gid_msk); + "dst-gid-mask = "GID_PRINT_FMT"\n", + GID_PRINT_ARGS(cur->ib.dst_gid_msk)); break; case MLX4_NET_TRANS_RULE_ID_IPV6: @@ -1135,7 +1139,8 @@ int mlx4_qp_detach_common(struct mlx4_de goto out; if (index == -1) { - mlx4_err(dev, "MGID %pI6 not found\n", gid); + mlx4_err(dev, "MGID "GID_PRINT_FMT" not found\n", + GID_PRINT_ARGS(gid)); err = -EINVAL; goto out; } Modified: stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Sat Mar 7 18:44:42 2015 (r279734) @@ -154,7 +154,7 @@ enum { #define MLX4_EN_NUM_UP 1 #define MAX_TX_RINGS (MLX4_EN_MAX_TX_RING_P_UP * \ - (MLX4_EN_NUM_UP + 1)) + MLX4_EN_NUM_UP) #define MLX4_EN_DEF_TX_RING_SIZE 1024 #define MLX4_EN_DEF_RX_RING_SIZE 1024 @@ -358,11 +358,7 @@ struct mlx4_en_rx_ring { static inline int mlx4_en_can_lro(__be16 status) { - static __be16 status_all; - static __be16 status_ipv4_ipok_tcp; - static __be16 status_ipv6_ipok_tcp; - - status_all = cpu_to_be16( + const __be16 status_all = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | MLX4_CQE_STATUS_IPV4F | MLX4_CQE_STATUS_IPV6 | @@ -370,11 +366,11 @@ static inline int mlx4_en_can_lro(__be16 MLX4_CQE_STATUS_TCP | MLX4_CQE_STATUS_UDP | MLX4_CQE_STATUS_IPOK); - status_ipv4_ipok_tcp = cpu_to_be16( + const __be16 status_ipv4_ipok_tcp = cpu_to_be16( MLX4_CQE_STATUS_IPV4 | MLX4_CQE_STATUS_IPOK | MLX4_CQE_STATUS_TCP); - status_ipv6_ipok_tcp = cpu_to_be16( + const __be16 status_ipv6_ipok_tcp = cpu_to_be16( MLX4_CQE_STATUS_IPV6 | MLX4_CQE_STATUS_IPOK | MLX4_CQE_STATUS_TCP); @@ -384,7 +380,6 @@ static inline int mlx4_en_can_lro(__be16 status == status_ipv6_ipok_tcp); } - struct mlx4_en_cq { struct mlx4_cq mcq; struct mlx4_hwq_resources wqres; Modified: stable/9/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/9/sys/ofed/include/linux/mlx4/device.h Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/include/linux/mlx4/device.h Sat Mar 7 18:44:42 2015 (r279734) @@ -186,8 +186,19 @@ enum { MLX4_DEV_CAP_FLAG2_ETH_BACKPL_AN_REP = 1LL << 10, MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN = 1LL << 11, MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 12, - MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, - MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14 + MLX4_DEV_CAP_FLAG2_TS = 1LL << 13, + MLX4_DEV_CAP_FLAG2_DRIVER_VERSION_TO_FW = 1LL << 14, + MLX4_DEV_CAP_FLAG2_REASSIGN_MAC_EN = 1LL << 15, + MLX4_DEV_CAP_FLAG2_VXLAN_OFFLOADS = 1LL << 16, + MLX4_DEV_CAP_FLAG2_FS_EN_NCSI = 1LL << 17, + MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, + MLX4_DEV_CAP_FLAG2_DMFS_TAG_MODE = 1LL << 19, + MLX4_DEV_CAP_FLAG2_ROCEV2 = 1LL << 20, + MLX4_DEV_CAP_FLAG2_ETH_PROT_CTRL = 1LL << 21, + MLX4_DEV_CAP_FLAG2_CQE_STRIDE = 1LL << 22, + MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, + MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, + MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, }; /* bit enums for an 8-bit flags field indicating special use @@ -948,9 +959,9 @@ void mlx4_buf_free(struct mlx4_dev *dev, static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) { if (BITS_PER_LONG == 64 || buf->nbufs == 1) - return buf->direct.buf + offset; + return (u8 *)buf->direct.buf + offset; else - return buf->page_list[offset >> PAGE_SHIFT].buf + + return (u8 *)buf->page_list[offset >> PAGE_SHIFT].buf + (offset & (PAGE_SIZE - 1)); } Modified: stable/9/sys/ofed/include/linux/mlx4/qp.h ============================================================================== --- stable/9/sys/ofed/include/linux/mlx4/qp.h Sat Mar 7 18:42:37 2015 (r279733) +++ stable/9/sys/ofed/include/linux/mlx4/qp.h Sat Mar 7 18:44:42 2015 (r279734) @@ -253,6 +253,8 @@ enum { MLX4_UPD_QP_PATH_MASK_SCHED_QUEUE = 14 + 32, MLX4_UPD_QP_PATH_MASK_IF_COUNTER_INDEX = 15 + 32, MLX4_UPD_QP_PATH_MASK_FVL_RX = 16 + 32, + MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_UC_LB = 18 + 32, + MLX4_UPD_QP_PATH_MASK_ETH_SRC_CHECK_MC_LB = 19 + 32, }; enum { /* param3 */ From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 18:46:22 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC85CCAC; Sat, 7 Mar 2015 18:46:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B712B62D; Sat, 7 Mar 2015 18:46:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27IkMhA097987; Sat, 7 Mar 2015 18:46:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27IkMKQ097986; Sat, 7 Mar 2015 18:46:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503071846.t27IkMKQ097986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Mar 2015 18:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279736 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 18:46:22 -0000 Author: hselasky Date: Sat Mar 7 18:46:21 2015 New Revision: 279736 URL: https://svnweb.freebsd.org/changeset/base/279736 Log: MFC r279587: Define PTR_ALIGN() macro which will be needed coming Mellanox driver releases. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/include/linux/kernel.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/kernel.h ============================================================================== --- stable/9/sys/ofed/include/linux/kernel.h Sat Mar 7 18:44:52 2015 (r279735) +++ stable/9/sys/ofed/include/linux/kernel.h Sat Mar 7 18:46:21 2015 (r279736) @@ -63,6 +63,8 @@ #undef ALIGN #define ALIGN(x, y) roundup2((x), (y)) +#undef PTR_ALIGN +#define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) #define DIV_ROUND_UP howmany #define printk(X...) printf(X) From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 18:48:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72C7FDF7; Sat, 7 Mar 2015 18:48:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5CFCB640; Sat, 7 Mar 2015 18:48:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Im1Hw098238; Sat, 7 Mar 2015 18:48:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27Im1mS098237; Sat, 7 Mar 2015 18:48:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503071848.t27Im1mS098237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 7 Mar 2015 18:48: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: r279737 - stable/10/sys/ofed/include/linux 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 18:48:01 -0000 Author: hselasky Date: Sat Mar 7 18:48:00 2015 New Revision: 279737 URL: https://svnweb.freebsd.org/changeset/base/279737 Log: MFC r279587: Define PTR_ALIGN() macro which will be needed coming Mellanox driver releases. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/include/linux/kernel.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/kernel.h ============================================================================== --- stable/10/sys/ofed/include/linux/kernel.h Sat Mar 7 18:46:21 2015 (r279736) +++ stable/10/sys/ofed/include/linux/kernel.h Sat Mar 7 18:48:00 2015 (r279737) @@ -63,6 +63,8 @@ #undef ALIGN #define ALIGN(x, y) roundup2((x), (y)) +#undef PTR_ALIGN +#define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) #define DIV_ROUND_UP howmany #define printk(X...) printf(X) From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:32:22 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D73DC6A; Sat, 7 Mar 2015 19:32:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 EA251AE1; Sat, 7 Mar 2015 19:32:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27JWLE0021265; Sat, 7 Mar 2015 19:32:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27JWK26021258; Sat, 7 Mar 2015 19:32:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071932.t27JWK26021258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:32:20 +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: r279741 - in stable/10: sys/fs/autofs usr.sbin/autofs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:32:22 -0000 Author: trasz Date: Sat Mar 7 19:32:19 2015 New Revision: 279741 URL: https://svnweb.freebsd.org/changeset/base/279741 Log: MFC r273127: Make automountd(8) inform autofs(4) whether directory being handled can have wildcards. This makes it possible for autofs(4) to avoid requesting automountd(8) action on access to nonexistent nodes - unless wildcards are actually used. Note that this change breaks ABI for automountd(8). MFC r278521: Restore ABI compatibility, broken in r273127. Note that while this fixes ABI with 10.1, it breaks ABI for 11-CURRENT, so rebuild of automountd(8) is neccessary. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs.h stable/10/sys/fs/autofs/autofs_ioctl.h stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sat Mar 7 19:29:53 2015 (r279740) +++ stable/10/sys/fs/autofs/autofs.c Sat Mar 7 19:32:19 2015 (r279741) @@ -274,6 +274,7 @@ autofs_task(void *context, int pending) * XXX: EIO perhaps? */ ar->ar_error = ETIMEDOUT; + ar->ar_wildcards = true; ar->ar_done = true; ar->ar_in_progress = false; cv_broadcast(&autofs_softc->sc_cv); @@ -291,12 +292,13 @@ autofs_cached(struct autofs_node *anp, c AUTOFS_ASSERT_UNLOCKED(amp); /* - * For top-level nodes we need to request automountd(8) - * assistance even if the node is marked as cached, - * but the requested subdirectory does not exist. This - * is necessary for wildcard indirect map keys to work. + * For root node we need to request automountd(8) assistance even + * if the node is marked as cached, but the requested top-level + * directory does not exist. This is necessary for wildcard indirect + * map keys to work. We don't do this if we know that there are + * no wildcards. */ - if (anp->an_parent == NULL && componentlen != 0) { + if (anp->an_parent == NULL && componentlen != 0 && anp->an_wildcards) { AUTOFS_SLOCK(amp); error = autofs_node_find(anp, component, componentlen, NULL); AUTOFS_SUNLOCK(amp); @@ -366,6 +368,7 @@ autofs_trigger_one(struct autofs_node *a struct autofs_request *ar; char *key, *path; int error = 0, request_error, last; + bool wildcards; amp = anp->an_mount; @@ -455,6 +458,8 @@ autofs_trigger_one(struct autofs_node *a ar->ar_path, request_error); } + wildcards = ar->ar_wildcards; + last = refcount_release(&ar->ar_refcount); if (last) { TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next); @@ -475,6 +480,7 @@ autofs_trigger_one(struct autofs_node *a */ if (error == 0 && request_error == 0 && autofs_cache > 0) { anp->an_cached = true; + anp->an_wildcards = wildcards; callout_reset(&anp->an_callout, autofs_cache * hz, autofs_cache_callout, anp); } @@ -577,6 +583,34 @@ autofs_ioctl_request(struct autofs_daemo } static int +autofs_ioctl_done_101(struct autofs_daemon_done_101 *add) +{ + struct autofs_request *ar; + + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { + if (ar->ar_id == add->add_id) + break; + } + + if (ar == NULL) { + sx_xunlock(&autofs_softc->sc_lock); + AUTOFS_DEBUG("id %d not found", add->add_id); + return (ESRCH); + } + + ar->ar_error = add->add_error; + ar->ar_wildcards = true; + ar->ar_done = true; + ar->ar_in_progress = false; + cv_broadcast(&autofs_softc->sc_cv); + + sx_xunlock(&autofs_softc->sc_lock); + + return (0); +} + +static int autofs_ioctl_done(struct autofs_daemon_done *add) { struct autofs_request *ar; @@ -594,6 +628,7 @@ autofs_ioctl_done(struct autofs_daemon_d } ar->ar_error = add->add_error; + ar->ar_wildcards = add->add_wildcards; ar->ar_done = true; ar->ar_in_progress = false; cv_broadcast(&autofs_softc->sc_cv); @@ -650,6 +685,9 @@ autofs_ioctl(struct cdev *dev, u_long cm case AUTOFSREQUEST: return (autofs_ioctl_request( (struct autofs_daemon_request *)arg)); + case AUTOFSDONE101: + return (autofs_ioctl_done_101( + (struct autofs_daemon_done_101 *)arg)); case AUTOFSDONE: return (autofs_ioctl_done( (struct autofs_daemon_done *)arg)); Modified: stable/10/sys/fs/autofs/autofs.h ============================================================================== --- stable/10/sys/fs/autofs/autofs.h Sat Mar 7 19:29:53 2015 (r279740) +++ stable/10/sys/fs/autofs/autofs.h Sat Mar 7 19:32:19 2015 (r279741) @@ -74,6 +74,7 @@ struct autofs_node { struct vnode *an_vnode; struct sx an_vnode_lock; bool an_cached; + bool an_wildcards; struct callout an_callout; int an_retries; struct timespec an_ctime; @@ -97,6 +98,7 @@ struct autofs_request { int ar_id; bool ar_done; int ar_error; + bool ar_wildcards; bool ar_in_progress; char ar_from[MAXPATHLEN]; char ar_path[MAXPATHLEN]; Modified: stable/10/sys/fs/autofs/autofs_ioctl.h ============================================================================== --- stable/10/sys/fs/autofs/autofs_ioctl.h Sat Mar 7 19:29:53 2015 (r279740) +++ stable/10/sys/fs/autofs/autofs_ioctl.h Sat Mar 7 19:32:19 2015 (r279741) @@ -71,6 +71,21 @@ struct autofs_daemon_request { char adr_options[MAXPATHLEN]; }; +/* + * Compatibility with 10.1-RELEASE automountd(8). + */ +struct autofs_daemon_done_101 { + /* + * Identifier, copied from adr_id. + */ + int add_id; + + /* + * Error number, possibly returned to userland. + */ + int add_error; +}; + struct autofs_daemon_done { /* * Identifier, copied from adr_id. @@ -78,12 +93,24 @@ struct autofs_daemon_done { int add_id; /* + * Set to 1 if the map may contain wildcard entries; + * otherwise autofs will do negative caching. + */ + int add_wildcards; + + /* * Error number, possibly returned to userland. */ int add_error; + + /* + * Reserved for future use. + */ + int add_spare[7]; }; #define AUTOFSREQUEST _IOR('I', 0x01, struct autofs_daemon_request) -#define AUTOFSDONE _IOW('I', 0x02, struct autofs_daemon_done) +#define AUTOFSDONE101 _IOW('I', 0x02, struct autofs_daemon_done_101) +#define AUTOFSDONE _IOW('I', 0x03, struct autofs_daemon_done) #endif /* !AUTOFS_IOCTL_H */ Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Sat Mar 7 19:29:53 2015 (r279740) +++ stable/10/usr.sbin/autofs/automountd.c Sat Mar 7 19:32:19 2015 (r279741) @@ -68,13 +68,14 @@ static int autofs_fd; static int request_id; static void -done(int request_error) +done(int request_error, bool wildcards) { struct autofs_daemon_done add; int error; memset(&add, 0, sizeof(add)); add.add_id = request_id; + add.add_wildcards = wildcards; add.add_error = request_error; log_debugx("completing request %d with error %d", @@ -172,7 +173,7 @@ static void exit_callback(void) { - done(EIO); + done(EIO, true); } static void @@ -184,6 +185,7 @@ handle_request(const struct autofs_daemo FILE *f; char *options, *fstype, *nobrowse, *retrycnt, *tmp; int error; + bool wildcards; log_debugx("got request %d: from %s, path %s, prefix \"%s\", " "key \"%s\", options \"%s\"", adr->adr_id, adr->adr_from, @@ -209,9 +211,26 @@ handle_request(const struct autofs_daemo checked_strdup(adr->adr_options), checked_strdup(map), checked_strdup("[kernel request]"), lineno); } - parse_map(parent, map, adr->adr_key[0] != '\0' ? adr->adr_key : NULL); + + /* + * "Wildcards" here actually means "make autofs(4) request + * automountd(8) action if the node being looked up does not + * exist, even though the parent is marked as cached". This + * needs to be done for maps with wildcard entries, but also + * for special and executable maps. + */ + parse_map(parent, map, adr->adr_key[0] != '\0' ? adr->adr_key : NULL, + &wildcards); + if (!wildcards) + wildcards = node_has_wildcards(parent); + if (wildcards) + log_debugx("map may contain wildcard entries"); + else + log_debugx("map does not contain wildcard entries"); + if (adr->adr_key[0] != '\0') node_expand_wildcard(root, adr->adr_key); + node = node_find(root, adr->adr_path); if (node == NULL) { log_errx(1, "map %s does not contain key for \"%s\"; " @@ -236,7 +255,7 @@ handle_request(const struct autofs_daemo if (nobrowse != NULL && adr->adr_key[0] == '\0') { log_debugx("skipping map %s due to \"nobrowse\" " "option; exiting", map); - done(0); + done(0, true); /* * Exit without calling exit_callback(). @@ -263,7 +282,7 @@ handle_request(const struct autofs_daemo } log_debugx("nothing to mount; exiting"); - done(0); + done(0, wildcards); /* * Exit without calling exit_callback(). @@ -337,7 +356,7 @@ handle_request(const struct autofs_daemo log_errx(1, "mount failed"); log_debugx("mount done; exiting"); - done(0); + done(0, wildcards); /* * Exit without calling exit_callback(). Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sat Mar 7 19:29:53 2015 (r279740) +++ stable/10/usr.sbin/autofs/common.c Sat Mar 7 19:32:19 2015 (r279741) @@ -498,6 +498,19 @@ node_is_direct_map(const struct node *n) return (true); } +bool +node_has_wildcards(const struct node *n) +{ + const struct node *child; + + TAILQ_FOREACH(child, &n->n_children, n_next) { + if (strcmp(child->n_key, "*") == 0) + return (true); + } + + return (false); +} + static void node_expand_maps(struct node *n, bool indirect) { @@ -526,7 +539,7 @@ node_expand_maps(struct node *n, bool in log_debugx("map \"%s\" is a direct map, parsing", child->n_map); } - parse_map(child, child->n_map, NULL); + parse_map(child, child->n_map, NULL, NULL); } } @@ -996,7 +1009,8 @@ parse_included_map(struct node *parent, } void -parse_map(struct node *parent, const char *map, const char *key) +parse_map(struct node *parent, const char *map, const char *key, + bool *wildcards) { char *path = NULL; int error, ret; @@ -1007,8 +1021,14 @@ parse_map(struct node *parent, const cha log_debugx("parsing map \"%s\"", map); - if (map[0] == '-') + if (wildcards != NULL) + *wildcards = false; + + if (map[0] == '-') { + if (wildcards != NULL) + *wildcards = true; return (parse_special_map(parent, map, key)); + } if (map[0] == '/') { path = checked_strdup(map); @@ -1035,6 +1055,9 @@ parse_map(struct node *parent, const cha if (executable) { log_debugx("map \"%s\" is executable", map); + if (wildcards != NULL) + *wildcards = true; + if (key != NULL) { yyin = auto_popen(path, key, NULL); } else { Modified: stable/10/usr.sbin/autofs/common.h ============================================================================== --- stable/10/usr.sbin/autofs/common.h Sat Mar 7 19:29:53 2015 (r279740) +++ stable/10/usr.sbin/autofs/common.h Sat Mar 7 19:32:19 2015 (r279741) @@ -80,6 +80,7 @@ struct node *node_new_map(struct node *p char *map, const char *config_file, int config_line); struct node *node_find(struct node *root, const char *mountpoint); bool node_is_direct_map(const struct node *n); +bool node_has_wildcards(const struct node *n); char *node_path(const struct node *n); char *node_options(const struct node *n); void node_expand_ampersand(struct node *root, const char *key); @@ -88,7 +89,8 @@ int node_expand_defined(struct node *roo void node_expand_indirect_maps(struct node *n); void node_print(const struct node *n); void parse_master(struct node *root, const char *path); -void parse_map(struct node *parent, const char *map, const char *args); +void parse_map(struct node *parent, const char *map, const char *args, + bool *wildcards); char *defined_expand(const char *string); void defined_init(void); void defined_parse_and_add(char *def); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:36:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B006DF5; Sat, 7 Mar 2015 19:36:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 44089B3F; Sat, 7 Mar 2015 19:36:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Ja8eB021827; Sat, 7 Mar 2015 19:36:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27Ja6rD021820; Sat, 7 Mar 2015 19:36:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071936.t27Ja6rD021820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:36:06 +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: r279742 - in stable/10: sys/fs/autofs usr.sbin/autofs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:36:08 -0000 Author: trasz Date: Sat Mar 7 19:36:06 2015 New Revision: 279742 URL: https://svnweb.freebsd.org/changeset/base/279742 Log: MFC r274859: Implement "automount -c". Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs.h stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/usr.sbin/autofs/automount.8 stable/10/usr.sbin/autofs/automount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sat Mar 7 19:32:19 2015 (r279741) +++ stable/10/sys/fs/autofs/autofs.c Sat Mar 7 19:36:06 2015 (r279742) @@ -318,6 +318,18 @@ autofs_cache_callout(void *context) anp->an_cached = false; } +void +autofs_flush(struct autofs_mount *amp) +{ + + /* + * XXX: This will do for now, but ideally we should iterate + * over all the nodes. + */ + amp->am_root->an_cached = false; + AUTOFS_DEBUG("%s flushed", amp->am_mountpoint); +} + /* * The set/restore sigmask functions are used to (temporarily) overwrite * the thread td_sigmask during triggering. Modified: stable/10/sys/fs/autofs/autofs.h ============================================================================== --- stable/10/sys/fs/autofs/autofs.h Sat Mar 7 19:32:19 2015 (r279741) +++ stable/10/sys/fs/autofs/autofs.h Sat Mar 7 19:36:06 2015 (r279742) @@ -133,6 +133,7 @@ int autofs_trigger(struct autofs_node *a int componentlen); bool autofs_cached(struct autofs_node *anp, const char *component, int componentlen); +void autofs_flush(struct autofs_mount *amp); bool autofs_ignore_thread(const struct thread *td); int autofs_node_new(struct autofs_node *parent, struct autofs_mount *amp, const char *name, int namelen, struct autofs_node **anpp); Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sat Mar 7 19:32:19 2015 (r279741) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sat Mar 7 19:36:06 2015 (r279742) @@ -61,8 +61,10 @@ autofs_mount(struct mount *mp) if (vfs_filteropt(mp->mnt_optnew, autofs_opts)) return (EINVAL); - if (mp->mnt_flag & MNT_UPDATE) + if (mp->mnt_flag & MNT_UPDATE) { + autofs_flush(VFSTOAUTOFS(mp)); return (0); + } if (vfs_getopt(mp->mnt_optnew, "from", (void **)&from, NULL)) return (EINVAL); Modified: stable/10/usr.sbin/autofs/automount.8 ============================================================================== --- stable/10/usr.sbin/autofs/automount.8 Sat Mar 7 19:32:19 2015 (r279741) +++ stable/10/usr.sbin/autofs/automount.8 Sat Mar 7 19:36:06 2015 (r279742) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2014 +.Dd November 22, 2014 .Dt AUTOMOUNT 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm .Op Fl D Ar name=value .Op Fl L +.Op Fl c .Op Fl f .Op Fl o Ar options .Op Fl v @@ -64,6 +65,9 @@ and any direct maps, then print them to When specified more than once, all the maps, including indirect ones, will be parsed and shown. This is useful when debugging configuration problems. +.It Fl c +Flush caches, discarding possibly stale information obtained from maps +and directory services. .It Fl f Force unmount, to be used with .Fl u . Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Sat Mar 7 19:32:19 2015 (r279741) +++ stable/10/usr.sbin/autofs/automount.c Sat Mar 7 19:36:06 2015 (r279742) @@ -230,6 +230,57 @@ mount_unmount(struct node *root) } static void +flush_autofs(const char *fspath) +{ + struct iovec *iov = NULL; + char errmsg[255]; + int error, iovlen = 0; + + log_debugx("flushing %s", fspath); + memset(errmsg, 0, sizeof(errmsg)); + + build_iovec(&iov, &iovlen, "fstype", + __DECONST(void *, "autofs"), (size_t)-1); + build_iovec(&iov, &iovlen, "fspath", + __DECONST(void *, fspath), (size_t)-1); + build_iovec(&iov, &iovlen, "errmsg", + errmsg, sizeof(errmsg)); + + error = nmount(iov, iovlen, MNT_UPDATE); + if (error != 0) { + if (*errmsg != '\0') { + log_err(1, "cannot flush %s: %s", + fspath, errmsg); + } else { + log_err(1, "cannot flush %s", fspath); + } + } +} + +static void +flush_caches(void) +{ + struct statfs *mntbuf; + int i, nitems; + + nitems = getmntinfo(&mntbuf, MNT_WAIT); + if (nitems <= 0) + log_err(1, "getmntinfo"); + + log_debugx("flushing autofs caches"); + + for (i = 0; i < nitems; i++) { + if (strcmp(mntbuf[i].f_fstypename, "autofs") != 0) { + log_debugx("skipping %s, filesystem type is not autofs", + mntbuf[i].f_mntonname); + continue; + } + + flush_autofs(mntbuf[i].f_mntonname); + } +} + +static void unmount_automounted(bool force) { struct statfs *mntbuf; @@ -262,7 +313,7 @@ static void usage_automount(void) { - fprintf(stderr, "usage: automount [-D name=value][-o opts][-Lfuv]\n"); + fprintf(stderr, "usage: automount [-D name=value][-o opts][-Lcfuv]\n"); exit(1); } @@ -272,7 +323,7 @@ main_automount(int argc, char **argv) struct node *root; int ch, debug = 0, show_maps = 0; char *options = NULL; - bool do_unmount = false, force_unmount = false; + bool do_unmount = false, force_unmount = false, flush = false; /* * Note that in automount(8), the only purpose of variable @@ -280,7 +331,7 @@ main_automount(int argc, char **argv) */ defined_init(); - while ((ch = getopt(argc, argv, "D:Lfo:uv")) != -1) { + while ((ch = getopt(argc, argv, "D:Lfco:uv")) != -1) { switch (ch) { case 'D': defined_parse_and_add(optarg); @@ -288,6 +339,9 @@ main_automount(int argc, char **argv) case 'L': show_maps++; break; + case 'c': + flush = true; + break; case 'f': force_unmount = true; break; @@ -319,6 +373,11 @@ main_automount(int argc, char **argv) log_init(debug); + if (flush) { + flush_caches(); + return (0); + } + if (do_unmount) { unmount_automounted(force_unmount); return (0); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:39:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E594DF5F; Sat, 7 Mar 2015 19:39:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 CFA3AB69; Sat, 7 Mar 2015 19:39:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27JdHBR022224; Sat, 7 Mar 2015 19:39:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27JdHNk022223; Sat, 7 Mar 2015 19:39:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071939.t27JdHNk022223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:39:17 +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: r279743 - stable/10/usr.sbin/autofs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:39:18 -0000 Author: trasz Date: Sat Mar 7 19:39:16 2015 New Revision: 279743 URL: https://svnweb.freebsd.org/changeset/base/279743 Log: MFC r275755: Fix spurious "child process X terminated with exit status 1" messages from automountd(8). Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/automountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Sat Mar 7 19:36:06 2015 (r279742) +++ stable/10/usr.sbin/autofs/automountd.c Sat Mar 7 19:39:16 2015 (r279743) @@ -82,14 +82,8 @@ done(int request_error, bool wildcards) request_id, request_error); error = ioctl(autofs_fd, AUTOFSDONE, &add); - if (error != 0) { - /* - * Do this instead of log_err() to avoid calling - * done() again with error, from atexit handler. - */ + if (error != 0) log_warn("AUTOFSDONE"); - } - quick_exit(1); } /* From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:41:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0E8C208; Sat, 7 Mar 2015 19:41:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DAB75C09; Sat, 7 Mar 2015 19:41:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Jfw05026179; Sat, 7 Mar 2015 19:41:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27JfwK5026178; Sat, 7 Mar 2015 19:41:58 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071941.t27JfwK5026178@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:41: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: r279744 - stable/10/usr.sbin/autofs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:41:59 -0000 Author: trasz Date: Sat Mar 7 19:41:58 2015 New Revision: 279744 URL: https://svnweb.freebsd.org/changeset/base/279744 Log: MFC r275756: Fix bug that made automount(8) never unmount stale autofs(5) mounts, ie mounts for entries that were there in auto_master(5), and then got removed. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sat Mar 7 19:39:16 2015 (r279743) +++ stable/10/usr.sbin/autofs/common.c Sat Mar 7 19:41:58 2015 (r279744) @@ -676,8 +676,8 @@ node_print(const struct node *n) node_print_indent(child, 0); } -struct node * -node_find(struct node *node, const char *path) +static struct node * +node_find_x(struct node *node, const char *path) { struct node *child, *found; char *tmp; @@ -702,7 +702,7 @@ node_find(struct node *node, const char free(tmp); TAILQ_FOREACH(child, &node->n_children, n_next) { - found = node_find(child, path); + found = node_find_x(child, path); if (found != NULL) return (found); } @@ -710,6 +710,17 @@ node_find(struct node *node, const char return (node); } +struct node * +node_find(struct node *root, const char *path) +{ + struct node *node; + + node = node_find_x(root, path); + if (node == root) + return (NULL); + return (node); +} + /* * Canonical form of a map entry looks like this: * From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:45:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF21834D; Sat, 7 Mar 2015 19:45:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7EFE8C21; Sat, 7 Mar 2015 19:45:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Jj8L1026687; Sat, 7 Mar 2015 19:45:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27Jj81b026686; Sat, 7 Mar 2015 19:45:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071945.t27Jj81b026686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:45: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: r279745 - stable/10/usr.sbin/autofs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:45:08 -0000 Author: trasz Date: Sat Mar 7 19:45:07 2015 New Revision: 279745 URL: https://svnweb.freebsd.org/changeset/base/279745 Log: MFC r277834: When there are no automounted filesystems, autounmountd(8) should wait for filesystem event, instead of looping on a timeout. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/autounmountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/autounmountd.c ============================================================================== --- stable/10/usr.sbin/autofs/autounmountd.c Sat Mar 7 19:41:58 2015 (r279744) +++ stable/10/usr.sbin/autofs/autounmountd.c Sat Mar 7 19:45:07 2015 (r279745) @@ -182,7 +182,7 @@ expire_automounted(double expiration_tim { struct automounted_fs *af, *tmpaf; time_t now; - double mounted_for, mounted_max = 0; + double mounted_for, mounted_max = -1.0; int error; now = time(NULL); @@ -231,21 +231,28 @@ do_wait(int kq, double sleep_time) { struct timespec timeout; struct kevent unused; - int error; - - assert(sleep_time > 0); - timeout.tv_sec = sleep_time; - timeout.tv_nsec = 0; + int nevents; - log_debugx("waiting for filesystem event for %.0f seconds", sleep_time); - error = kevent(kq, NULL, 0, &unused, 1, &timeout); - if (error < 0) + if (sleep_time != -1.0) { + assert(sleep_time > 0.0); + timeout.tv_sec = sleep_time; + timeout.tv_nsec = 0; + + log_debugx("waiting for filesystem event for %.0f seconds", sleep_time); + nevents = kevent(kq, NULL, 0, &unused, 1, &timeout); + } else { + log_debugx("waiting for filesystem event"); + nevents = kevent(kq, NULL, 0, &unused, 1, NULL); + } + if (nevents < 0) log_err(1, "kevent"); - if (error == 0) + if (nevents == 0) { log_debugx("timeout reached"); - else + assert(sleep_time > 0.0); + } else { log_debugx("got filesystem event"); + } } int @@ -324,7 +331,10 @@ main_autounmountd(int argc, char **argv) for (;;) { refresh_automounted(); mounted_max = expire_automounted(expiration_time); - if (mounted_max < expiration_time) { + if (mounted_max == -1.0) { + sleep_time = mounted_max; + log_debugx("no filesystems to expire"); + } else if (mounted_max < expiration_time) { sleep_time = difftime(expiration_time, mounted_max); log_debugx("some filesystems expire in %.0f seconds", sleep_time); From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:46:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D1CE485; Sat, 7 Mar 2015 19:46:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 26F8FC2F; Sat, 7 Mar 2015 19:46:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27JkmB1026935; Sat, 7 Mar 2015 19:46:48 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27Jkmjn026934; Sat, 7 Mar 2015 19:46:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071946.t27Jkmjn026934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:46: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: r279746 - stable/10/sbin/geom/class/mountver 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:46:48 -0000 Author: trasz Date: Sat Mar 7 19:46:47 2015 New Revision: 279746 URL: https://svnweb.freebsd.org/changeset/base/279746 Log: MFC r277799: Fix sysctl name. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/geom/class/mountver/gmountver.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- stable/10/sbin/geom/class/mountver/gmountver.8 Sat Mar 7 19:45:07 2015 (r279745) +++ stable/10/sbin/geom/class/mountver/gmountver.8 Sat Mar 7 19:46:47 2015 (r279746) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2010 +.Dd January 27, 2015 .Dt GMOUNTVER 8 .Os .Sh NAME @@ -110,7 +110,7 @@ GEOM class. This can be set to a number between 0 and 3 inclusive. If set to 0 minimal debug information is printed, and if set to 3 the maximum amount of debug information is printed. -.It Va kern.geom.mountver.check.check_ident : No 1 +.It Va kern.geom.mountver.check_ident : No 1 This can be set to 0 or 1. If set to 0, .Nm From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:49:03 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3F1C5D1; Sat, 7 Mar 2015 19:49:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 ADE95C42; Sat, 7 Mar 2015 19:49:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27Jn3Sa027270; Sat, 7 Mar 2015 19:49:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27Jn3fj027269; Sat, 7 Mar 2015 19:49:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071949.t27Jn3fj027269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:49:03 +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: r279747 - stable/10/share/man/man7 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:49:03 -0000 Author: trasz Date: Sat Mar 7 19:49:02 2015 New Revision: 279747 URL: https://svnweb.freebsd.org/changeset/base/279747 Log: MFC r277175: Mention /net in hier(7). Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man7/hier.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Sat Mar 7 19:46:47 2015 (r279746) +++ stable/10/share/man/man7/hier.7 Sat Mar 7 19:49:02 2015 (r279747) @@ -32,7 +32,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd January 14, 2015 .Dt HIER 7 .Os .Sh NAME @@ -163,6 +163,10 @@ floppy disks .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point +.It Pa /net/ +automounted NFS shares; +see +.Xr auto_master 5 .It Pa /proc/ process file system; see From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 19:52:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 506A3721; Sat, 7 Mar 2015 19:52:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3A920CED; Sat, 7 Mar 2015 19:52:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27JqE2T031149; Sat, 7 Mar 2015 19:52:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27JqEJE031148; Sat, 7 Mar 2015 19:52:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503071952.t27JqEJE031148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 19:52:14 +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: r279748 - stable/10/usr.sbin/fstyp 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 19:52:15 -0000 Author: trasz Date: Sat Mar 7 19:52:14 2015 New Revision: 279748 URL: https://svnweb.freebsd.org/changeset/base/279748 Log: MFC r277172: Improve wording. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/fstyp/fstyp.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/fstyp/fstyp.8 ============================================================================== --- stable/10/usr.sbin/fstyp/fstyp.8 Sat Mar 7 19:49:02 2015 (r279747) +++ stable/10/usr.sbin/fstyp/fstyp.8 Sat Mar 7 19:52:14 2015 (r279748) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 6, 2014 +.Dd January 14, 2015 .Dt FSTYP 8 .Os .Sh NAME @@ -58,9 +58,9 @@ is built specifically to detect filesyst .Xr file 1 in several ways. The output is machine-parsable, filesystem labels are supported, -and only filesystems are identified. -Security is improved with -.Xr capsicum 4 . +the utility runs sandboxed using +.Xr capsicum 4 , +and does not try to recognize any file format other than filesystems. .Pp These options are available: .Bl -tag -width ".Fl l" From owner-svn-src-stable@FreeBSD.ORG Sat Mar 7 20:00:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4069D8CB; Sat, 7 Mar 2015 20:00:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2AA81D15; Sat, 7 Mar 2015 20:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t27K0Rgq032382; Sat, 7 Mar 2015 20:00:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t27K0RAr032381; Sat, 7 Mar 2015 20:00:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201503072000.t27K0RAr032381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 7 Mar 2015 20:00: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: r279749 - stable/10/sys/fs/autofs 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@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2015 20:00:27 -0000 Author: trasz Date: Sat Mar 7 20:00:26 2015 New Revision: 279749 URL: https://svnweb.freebsd.org/changeset/base/279749 Log: MFC r271927: Turns out -1 is a perfectly valid error number, ERESTART. Remove useless code written under assumption that it wasn't. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sat Mar 7 19:52:14 2015 (r279748) +++ stable/10/sys/fs/autofs/autofs.c Sat Mar 7 20:00:26 2015 (r279749) @@ -450,11 +450,6 @@ autofs_trigger_one(struct autofs_node *a &autofs_softc->sc_lock); autofs_restore_sigmask(&oldset); if (error != 0) { - /* - * XXX: For some reson this returns -1 - * instead of EINTR, wtf?! - */ - error = EINTR; AUTOFS_WARN("cv_wait_sig for %s failed " "with error %d", ar->ar_path, error); break; @@ -520,7 +515,7 @@ autofs_trigger(struct autofs_node *anp, anp->an_retries = 0; return (0); } - if (error == EINTR) { + if (error == EINTR || error == ERESTART) { AUTOFS_DEBUG("trigger interrupted by signal, " "not retrying"); anp->an_retries = 0; @@ -566,11 +561,6 @@ autofs_ioctl_request(struct autofs_daemo error = cv_wait_sig(&autofs_softc->sc_cv, &autofs_softc->sc_lock); if (error != 0) { - /* - * XXX: For some reson this returns -1 instead - * of EINTR, wtf?! - */ - error = EINTR; sx_xunlock(&autofs_softc->sc_lock); AUTOFS_DEBUG("failed with error %d", error); return (error);