From owner-svn-src-stable-9@FreeBSD.ORG Sun Mar 1 00:47:39 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Sun Mar 1 01:08:15 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Mon Mar 2 08:00:01 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Thu Mar 5 09:27:40 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Thu Mar 5 09:35:16 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Thu Mar 5 09:55:38 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Thu Mar 5 10:07:10 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Thu Mar 5 10:23:40 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Fri Mar 6 11:27:59 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Fri Mar 6 16:09:34 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Fri Mar 6 22:08:50 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Fri Mar 6 22:34:10 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Fri Mar 6 22:40:10 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Sat Mar 7 18:42:38 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Sat Mar 7 18:44:45 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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-9@FreeBSD.ORG Sat Mar 7 18:46:22 2015 Return-Path: Delivered-To: svn-src-stable-9@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-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable 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)