From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 00:09:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 939DE1065673; Sun, 27 Nov 2011 00:09:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 830C18FC15; Sun, 27 Nov 2011 00:09:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAR09xSU014489; Sun, 27 Nov 2011 00:09:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAR09xMj014487; Sun, 27 Nov 2011 00:09:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201111270009.pAR09xMj014487@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 27 Nov 2011 00:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228015 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 00:09:59 -0000 Author: jilles Date: Sun Nov 27 00:09:59 2011 New Revision: 228015 URL: http://svn.freebsd.org/changeset/base/228015 Log: sh: Remove impossible evalskip check in 'for'. Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sat Nov 26 23:57:03 2011 (r228014) +++ head/bin/sh/eval.c Sun Nov 27 00:09:59 2011 (r228015) @@ -343,8 +343,6 @@ evalfor(union node *n, int flags) for (argp = n->nfor.args ; argp ; argp = argp->narg.next) { oexitstatus = exitstatus; expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); - if (evalskip) - goto out; } *arglist.lastp = NULL; @@ -364,7 +362,6 @@ evalfor(union node *n, int flags) } } loopnest--; -out: popstackmark(&smark); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 02:32:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE176106566B; Sun, 27 Nov 2011 02:32:08 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3E028FC08; Sun, 27 Nov 2011 02:32:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAR2W8uV018693; Sun, 27 Nov 2011 02:32:08 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAR2W86e018691; Sun, 27 Nov 2011 02:32:08 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111270232.pAR2W86e018691@svn.freebsd.org> From: Lawrence Stewart Date: Sun, 27 Nov 2011 02:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228016 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 02:32:09 -0000 Author: lstewart Date: Sun Nov 27 02:32:08 2011 New Revision: 228016 URL: http://svn.freebsd.org/changeset/base/228016 Log: Plug a TCP reassembly UMA zone leak introduced in r226113 by only using the backup stack queue entry when the zone is exhausted, otherwise we leak a zone allocation each time we plug a hole in the reassembly queue. Reported by: many on freebsd-stable@ (thread: "TCP Reassembly Issues") Tested by: many on freebsd-stable@ (thread: "TCP Reassembly Issues") Reviewed by: bz (very brief sanity check) MFC after: 3 days Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Sun Nov 27 00:09:59 2011 (r228015) +++ head/sys/netinet/tcp_reass.c Sun Nov 27 02:32:08 2011 (r228016) @@ -233,23 +233,28 @@ tcp_reass(struct tcpcb *tp, struct tcphd * when the zone is exhausted. Otherwise we may get stuck. */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); - if (te == NULL && th->th_seq != tp->rcv_nxt) { - TCPSTAT_INC(tcps_rcvmemdrop); - m_freem(m); - *tlenp = 0; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit reached, " - "segment dropped\n", s, __func__); - free(s, M_TCPLOG); - } - return (0); - } else if (th->th_seq == tp->rcv_nxt) { - bzero(&tqs, sizeof(struct tseg_qent)); - te = &tqs; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit reached, " - "using stack for missing segment\n", s, __func__); - free(s, M_TCPLOG); + if (te == NULL) { + if (th->th_seq != tp->rcv_nxt) { + TCPSTAT_INC(tcps_rcvmemdrop); + m_freem(m); + *tlenp = 0; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, + NULL))) { + log(LOG_DEBUG, "%s; %s: global zone limit " + "reached, segment dropped\n", s, __func__); + free(s, M_TCPLOG); + } + return (0); + } else { + bzero(&tqs, sizeof(struct tseg_qent)); + te = &tqs; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, + NULL))) { + log(LOG_DEBUG, + "%s; %s: global zone limit reached, using " + "stack for missing segment\n", s, __func__); + free(s, M_TCPLOG); + } } } tp->t_segqlen++; From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 04:29:22 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12427106566C; Sun, 27 Nov 2011 04:29:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 7242F8FC18; Sun, 27 Nov 2011 04:29:21 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pAR4TI0w023002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Nov 2011 15:29:19 +1100 Date: Sun, 27 Nov 2011 15:29:18 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pawel Jakub Dawidek In-Reply-To: <20111126171140.GF8794@garage.freebsd.pl> Message-ID: <20111127152712.X1152@besplex.bde.org> References: <201111230734.pAN7YA78032998@svn.freebsd.org> <20111126171140.GF8794@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Mikolaj Golub , mdf@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r227873 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 04:29:22 -0000 On Sat, 26 Nov 2011, Pawel Jakub Dawidek wrote: > On Wed, Nov 23, 2011 at 11:10:47AM -0800, mdf@FreeBSD.org wrote: >> I don't know if there's a style preference for 0x%lx versus %#lx, >> though, or a preference for a different type for the print (uintmax_t, >> for example). There is probably a preference for using u_long rather >> than unsigned long, since it's shorter. > > u_long is preferred in kernel, in userland unsigned long is better. u_long is preferred in FreeBSD code in both, but portable code cannot use it. Portable code is very rare. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 06:55:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED2D6106564A; Sun, 27 Nov 2011 06:55:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCD908FC12; Sun, 27 Nov 2011 06:55:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAR6tve0026867; Sun, 27 Nov 2011 06:55:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAR6tvRa026865; Sun, 27 Nov 2011 06:55:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201111270655.pAR6tvRa026865@svn.freebsd.org> From: Glen Barber Date: Sun, 27 Nov 2011 06:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228017 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 06:55:58 -0000 Author: gjb (doc committer) Date: Sun Nov 27 06:55:57 2011 New Revision: 228017 URL: http://svn.freebsd.org/changeset/base/228017 Log: Remove a seemingly unnecessary [1] ellipsis from netmap.4. Spotted by: manlint [1] Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Sun Nov 27 02:32:08 2011 (r228016) +++ head/share/man/man4/netmap.4 Sun Nov 27 06:55:57 2011 (r228017) @@ -155,7 +155,6 @@ Some macros support the access to object region. In particular: .Bd -literal struct netmap_if *nifp; -... struct netmap_ring *txring = NETMAP_TXRING(nifp, i); struct netmap_ring *rxring = NETMAP_RXRING(nifp, i); int i = txring->slot[txring->cur].buf_idx; From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 09:19:25 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21FE91065672; Sun, 27 Nov 2011 09:19:24 +0000 (UTC) (envelope-from bz@FreeBSD.ORG) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 939B48FC0A; Sun, 27 Nov 2011 09:19:24 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 753A625D37D1; Sun, 27 Nov 2011 09:19:23 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 7D675BD5C63; Sun, 27 Nov 2011 09:19:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gvcEBhmnN2UQ; Sun, 27 Nov 2011 09:19:19 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 59EEFBD5C62; Sun, 27 Nov 2011 09:19:19 +0000 (UTC) Date: Sun, 27 Nov 2011 09:19:18 +0000 (UTC) From: "Bjoern A. Zeeb" To: David Schultz In-Reply-To: <20111126202413.GA48676@zim.MIT.EDU> Message-ID: References: <201111261846.pAQIkXZk004285@svn.freebsd.org> <20111126202413.GA48676@zim.MIT.EDU> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, David Chisnall Subject: Re: svn commit: r228004 - in head: contrib/libcxxrt lib/libcxxrt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 09:19:25 -0000 On Sat, 26 Nov 2011, David Schultz wrote: > On Sat, Nov 26, 2011, Bjoern A. Zeeb wrote: >> On Sat, 26 Nov 2011, David Chisnall wrote: >> >>> Author: theraven >>> Date: Sat Nov 26 18:46:33 2011 >>> New Revision: 228004 >>> URL: http://svn.freebsd.org/changeset/base/228004 >>> >>> Log: >>> Update libcxxrt to remove the pthread dependency. >>> >>> Also add the license from upstream to contrib. >> >> Did the license really come in this format with long lines? It would >> be great, given it looks very close to a 2-clause BSD license to make >> it as close as we can get to our standard license template. > > It looks like the license file came from the vendor branch. If > it's published by the vendor that way, we shouldn't be introducing > gratuitous style differences. If it's coming like that from the vendor it would be nice if someone could reach out and ask them to consider the formating as in /usr/share/examples/etc/bsd-style-copyright. /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 11:15:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AD80106564A; Sun, 27 Nov 2011 11:15:59 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 797128FC13; Sun, 27 Nov 2011 11:15:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARBFxRt037301; Sun, 27 Nov 2011 11:15:59 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARBFxjA037295; Sun, 27 Nov 2011 11:15:59 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201111271115.pARBFxjA037295@svn.freebsd.org> From: Aleksandr Rybalko Date: Sun, 27 Nov 2011 11:15:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228018 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 11:15:59 -0000 Author: ray Date: Sun Nov 27 11:15:59 2011 New Revision: 228018 URL: http://svn.freebsd.org/changeset/base/228018 Log: Join chip depended methods for arge0 and arge1 into single call with unit. Approved by: adrian (mentor) Modified: head/sys/mips/atheros/ar71xx_chip.c head/sys/mips/atheros/ar71xx_cpudef.h head/sys/mips/atheros/ar724x_chip.c head/sys/mips/atheros/ar91xx_chip.c head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/ar71xx_chip.c ============================================================================== --- head/sys/mips/atheros/ar71xx_chip.c Sun Nov 27 06:55:57 2011 (r228017) +++ head/sys/mips/atheros/ar71xx_chip.c Sun Nov 27 11:15:59 2011 (r228018) @@ -140,7 +140,7 @@ ar71xx_chip_device_stopped(uint32_t mask /* Speed is either 10, 100 or 1000 */ static void -ar71xx_chip_set_pll_ge0(int speed) +ar71xx_chip_set_pll_ge(int unit, int speed) { uint32_t pll; @@ -155,46 +155,43 @@ ar71xx_chip_set_pll_ge0(int speed) pll = PLL_ETH_INT_CLK_1000; break; default: - printf("ar71xx_chip_set_pll_ge0: invalid speed %d\n", speed); + printf("%s%d: invalid speed %d\n", + __func__, unit, speed); return; } - - ar71xx_write_pll(AR71XX_PLL_SEC_CONFIG, AR71XX_PLL_ETH_INT0_CLK, pll, AR71XX_PLL_ETH0_SHIFT); -} - -static void -ar71xx_chip_set_pll_ge1(int speed) -{ - uint32_t pll; - - switch(speed) { - case 10: - pll = PLL_ETH_INT_CLK_10; - break; - case 100: - pll = PLL_ETH_INT_CLK_100; - break; - case 1000: - pll = PLL_ETH_INT_CLK_1000; - break; - default: - printf("ar71xx_chip_set_pll_ge1: invalid speed %d\n", speed); - return; + switch (unit) { + case 0: + ar71xx_write_pll(AR71XX_PLL_SEC_CONFIG, + AR71XX_PLL_ETH_INT0_CLK, pll, + AR71XX_PLL_ETH0_SHIFT); + break; + case 1: + ar71xx_write_pll(AR71XX_PLL_SEC_CONFIG, + AR71XX_PLL_ETH_INT1_CLK, pll, + AR71XX_PLL_ETH1_SHIFT); + break; + default: + printf("%s: invalid PLL set for arge unit: %d\n", + __func__, unit); + return; } - - ar71xx_write_pll(AR71XX_PLL_SEC_CONFIG, AR71XX_PLL_ETH_INT1_CLK, pll, AR71XX_PLL_ETH1_SHIFT); -} - -static void -ar71xx_chip_ddr_flush_ge0(void) -{ - ar71xx_ddr_flush(AR71XX_WB_FLUSH_GE0); } static void -ar71xx_chip_ddr_flush_ge1(void) +ar71xx_chip_ddr_flush_ge(int unit) { - ar71xx_ddr_flush(AR71XX_WB_FLUSH_GE1); + switch (unit) { + case 0: + ar71xx_ddr_flush(AR71XX_WB_FLUSH_GE0); + break; + case 1: + ar71xx_ddr_flush(AR71XX_WB_FLUSH_GE1); + break; + default: + printf("%s: invalid DDR flush for arge unit: %d\n", + __func__, unit); + return; + } } static void @@ -234,10 +231,8 @@ struct ar71xx_cpu_def ar71xx_chip_def = &ar71xx_chip_device_stop, &ar71xx_chip_device_start, &ar71xx_chip_device_stopped, - &ar71xx_chip_set_pll_ge0, - &ar71xx_chip_set_pll_ge1, - &ar71xx_chip_ddr_flush_ge0, - &ar71xx_chip_ddr_flush_ge1, + &ar71xx_chip_set_pll_ge, + &ar71xx_chip_ddr_flush_ge, &ar71xx_chip_get_eth_pll, &ar71xx_chip_ddr_flush_ip2, &ar71xx_chip_init_usb_peripheral, Modified: head/sys/mips/atheros/ar71xx_cpudef.h ============================================================================== --- head/sys/mips/atheros/ar71xx_cpudef.h Sun Nov 27 06:55:57 2011 (r228017) +++ head/sys/mips/atheros/ar71xx_cpudef.h Sun Nov 27 11:15:59 2011 (r228018) @@ -35,10 +35,8 @@ struct ar71xx_cpu_def { void (* ar71xx_chip_device_stop) (uint32_t); void (* ar71xx_chip_device_start) (uint32_t); int (* ar71xx_chip_device_stopped) (uint32_t); - void (* ar71xx_chip_set_pll_ge0) (int); - void (* ar71xx_chip_set_pll_ge1) (int); - void (* ar71xx_chip_ddr_flush_ge0) (void); - void (* ar71xx_chip_ddr_flush_ge1) (void); + void (* ar71xx_chip_set_pll_ge) (int, int); + void (* ar71xx_chip_ddr_flush_ge) (int); uint32_t (* ar71xx_chip_get_eth_pll) (unsigned int, int); /* @@ -81,24 +79,14 @@ static inline int ar71xx_device_stopped( return ar71xx_cpu_ops->ar71xx_chip_device_stopped(mask); } -static inline void ar71xx_device_set_pll_ge0(int speed) +static inline void ar71xx_device_set_pll_ge(int unit, int speed) { - ar71xx_cpu_ops->ar71xx_chip_set_pll_ge0(speed); + ar71xx_cpu_ops->ar71xx_chip_set_pll_ge(unit, speed); } -static inline void ar71xx_device_set_pll_ge1(int speed) +static inline void ar71xx_device_flush_ddr_ge(int unit) { - ar71xx_cpu_ops->ar71xx_chip_set_pll_ge1(speed); -} - -static inline void ar71xx_device_flush_ddr_ge0(void) -{ - ar71xx_cpu_ops->ar71xx_chip_ddr_flush_ge0(); -} - -static inline void ar71xx_device_flush_ddr_ge1(void) -{ - ar71xx_cpu_ops->ar71xx_chip_ddr_flush_ge1(); + ar71xx_cpu_ops->ar71xx_chip_ddr_flush_ge(unit); } static inline void ar71xx_init_usb_peripheral(void) Modified: head/sys/mips/atheros/ar724x_chip.c ============================================================================== --- head/sys/mips/atheros/ar724x_chip.c Sun Nov 27 06:55:57 2011 (r228017) +++ head/sys/mips/atheros/ar724x_chip.c Sun Nov 27 11:15:59 2011 (r228018) @@ -123,25 +123,37 @@ ar724x_chip_device_stopped(uint32_t mask } static void -ar724x_chip_set_pll_ge0(int speed) +ar724x_chip_set_pll_ge(int unit, int speed) { + switch (unit) { + case 0: + /* TODO */ + break; + case 1: + /* TODO */ + break; + default: + printf("%s: invalid PLL set for arge unit: %d\n", + __func__, unit); + return; + } } static void -ar724x_chip_set_pll_ge1(int speed) -{ -} - -static void -ar724x_chip_ddr_flush_ge0(void) -{ - ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_GE0); -} - -static void -ar724x_chip_ddr_flush_ge1(void) +ar724x_chip_ddr_flush_ge(int unit) { - ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_GE1); + switch (unit) { + case 0: + ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_GE0); + break; + case 1: + ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_GE1); + break; + default: + printf("%s: invalid DDR flush for arge unit: %d\n", + __func__, unit); + return; + } } static void @@ -207,10 +219,8 @@ struct ar71xx_cpu_def ar724x_chip_def = &ar724x_chip_device_stop, &ar724x_chip_device_start, &ar724x_chip_device_stopped, - &ar724x_chip_set_pll_ge0, - &ar724x_chip_set_pll_ge1, - &ar724x_chip_ddr_flush_ge0, - &ar724x_chip_ddr_flush_ge1, + &ar724x_chip_set_pll_ge, + &ar724x_chip_ddr_flush_ge, &ar724x_chip_get_eth_pll, &ar724x_chip_ddr_flush_ip2, &ar724x_chip_init_usb_peripheral Modified: head/sys/mips/atheros/ar91xx_chip.c ============================================================================== --- head/sys/mips/atheros/ar91xx_chip.c Sun Nov 27 06:55:57 2011 (r228017) +++ head/sys/mips/atheros/ar91xx_chip.c Sun Nov 27 11:15:59 2011 (r228018) @@ -113,7 +113,7 @@ ar91xx_chip_device_stopped(uint32_t mask } static void -ar91xx_chip_set_pll_ge0(int speed) +ar91xx_chip_set_pll_ge(int unit, int speed) { uint32_t pll; @@ -128,48 +128,43 @@ ar91xx_chip_set_pll_ge0(int speed) pll = AR91XX_PLL_VAL_1000; break; default: - printf("ar91xx_chip_set_pll_ge0: invalid speed %d\n", - speed); + printf("%s%d: invalid speed %d\n", + __func__, unit, speed); return; } - ar71xx_write_pll(AR91XX_PLL_REG_ETH_CONFIG, - AR91XX_PLL_REG_ETH0_INT_CLOCK, pll, AR91XX_ETH0_PLL_SHIFT); -} - -static void -ar91xx_chip_set_pll_ge1(int speed) -{ - uint32_t pll; - - switch(speed) { - case 10: - pll = AR91XX_PLL_VAL_10; - break; - case 100: - pll = AR91XX_PLL_VAL_100; - break; - case 1000: - pll = AR91XX_PLL_VAL_1000; - break; - default: - printf("ar91xx_chip_set_pll_ge0: invalid speed %d\n", - speed); - return; + switch (unit) { + case 0: + ar71xx_write_pll(AR91XX_PLL_REG_ETH_CONFIG, + AR91XX_PLL_REG_ETH0_INT_CLOCK, pll, + AR91XX_ETH0_PLL_SHIFT); + break; + case 1: + ar71xx_write_pll(AR91XX_PLL_REG_ETH_CONFIG, + AR91XX_PLL_REG_ETH1_INT_CLOCK, pll, + AR91XX_ETH1_PLL_SHIFT); + break; + default: + printf("%s: invalid PLL set for arge unit: %d\n", + __func__, unit); + return; } - ar71xx_write_pll(AR91XX_PLL_REG_ETH_CONFIG, - AR91XX_PLL_REG_ETH1_INT_CLOCK, pll, AR91XX_ETH1_PLL_SHIFT); } static void -ar91xx_chip_ddr_flush_ge0(void) +ar91xx_chip_ddr_flush_ge(int unit) { - ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_GE0); -} - -static void -ar91xx_chip_ddr_flush_ge1(void) -{ - ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_GE1); + switch (unit) { + case 0: + ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_GE0); + break; + case 1: + ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_GE1); + break; + default: + printf("%s: invalid DDR flush for arge unit: %d\n", + __func__, unit); + return; + } } static void @@ -211,10 +206,8 @@ struct ar71xx_cpu_def ar91xx_chip_def = &ar91xx_chip_device_stop, &ar91xx_chip_device_start, &ar91xx_chip_device_stopped, - &ar91xx_chip_set_pll_ge0, - &ar91xx_chip_set_pll_ge1, - &ar91xx_chip_ddr_flush_ge0, - &ar91xx_chip_ddr_flush_ge1, + &ar91xx_chip_set_pll_ge, + &ar91xx_chip_ddr_flush_ge, &ar91xx_chip_get_eth_pll, &ar91xx_chip_ddr_flush_ip2, &ar91xx_chip_init_usb_peripheral, Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Sun Nov 27 06:55:57 2011 (r228017) +++ head/sys/mips/atheros/if_arge.c Sun Nov 27 11:15:59 2011 (r228018) @@ -774,10 +774,7 @@ arge_set_pll(struct arge_softc *sc, int ARGE_WRITE(sc, AR71XX_MAC_FIFO_TX_THRESHOLD, fifo_tx); /* set PLL registers */ - if (sc->arge_mac_unit == 0) - ar71xx_device_set_pll_ge0(if_speed); - else - ar71xx_device_set_pll_ge1(if_speed); + ar71xx_device_set_pll_ge(sc->arge_mac_unit, if_speed); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 11:44:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FF0E106564A; Sun, 27 Nov 2011 11:44:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C7C78FC0C; Sun, 27 Nov 2011 11:44:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARBiKcO038164; Sun, 27 Nov 2011 11:44:20 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARBiKI7038160; Sun, 27 Nov 2011 11:44:20 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111271144.pARBiKI7038160@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 Nov 2011 11:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228019 - in head/cddl/contrib/opensolaris/cmd: zdb zfs zpool zstreamdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 11:44:20 -0000 Author: mm Date: Sun Nov 27 11:44:20 2011 New Revision: 228019 URL: http://svn.freebsd.org/changeset/base/228019 Log: Update ZFS manual pages to a mdoc(7) reimplementation. The zfs(8) and zpool(8) manual pages now match the state of the ZFS module and have been customized for FreeBSD. The new texts of the "Deduplication" subsection in zfs(8), the zpool "split" command, the zfs "dedup" property and several other missing parts have been added from illumos or OpenSolaris snv_134 (CDDL-licensed). The mdoc(7) reimplementation of whole manual pages, the descriptions of the zpool "readonly" property, "zfs diff" command and descriptions of several other missing command flags and/or options were authored by myself. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Nov 27 11:15:59 2011 (r228018) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Nov 27 11:44:20 2011 (r228019) @@ -1,65 +1,79 @@ '\" te +.\" Copyright (c) 2011, Martin Matuska . +.\" All Rights Reserved. +.\" +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License (the "License"). +.\" You may not use this file except in compliance with the License. +.\" +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +.\" or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions +.\" and limitations under the License. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. +.\" If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying +.\" information: Portions Copyright [yyyy] [name of copyright owner] +.\" .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.\" Portions Copyright 2011 Martin Matuska -.TH ZDB 8 "Oct 31, 2005" -.SH NAME -zdb \- ZFS debugger -.SH SYNOPSIS -.LP -.nf -\fBzdb\fR \fIpool\fR -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBzdb\fR command is used by support engineers to diagnose failures and -gather statistics. Since the \fBZFS\fR file system is always consistent on disk -and is self-repairing, \fBzdb\fR should only be run under the direction by a -support engineer. -.sp -.LP -If no arguments are specified, \fBzdb\fR, performs basic consistency checks on -the pool and associated datasets, and report any problems detected. -.sp -.LP +.\" +.\" $FreeBSD$ +.\" +.Dd November 26, 2011 +.Dt ZDB 8 +.Os +.Sh NAME +.Nm zdb +.Nd ZFS debugger +.Sh SYNOPSIS +.Nm +.Ar pool +.Sh DESCRIPTION +The +.Nm +command is used by support engineers to diagnose failures and +gather statistics. Since the +.Tn ZFS +file system is always consistent on disk and is self-repairing, +.Nm +should only be run under the direction by a support engineer. +.Pp +If no arguments are specified, +.Nm +performs basic consistency checks on the pool and associated datasets, and +report any problems detected. +.Nm Any options supported by this command are internal to Sun and subject to change at any time. -.SH EXIT STATUS -.sp -.LP +.Sh EXIT STATUS The following exit values are returned: -.sp -.ne 2 -.na -\fB\fB0\fR\fR -.ad -.RS 5n +.Bl -tag -offset 2n -width 2n +.It 0 The pool is consistent. -.RE - -.sp -.ne 2 -.na -\fB\fB1\fR\fR -.ad -.RS 5n +.It 1 An error was detected. -.RE - -.sp -.ne 2 -.na -\fB\fB2\fR\fR -.ad -.RS 5n +.It 2 Invalid command line options were specified. -.RE - -.SH SEE ALSO -.sp -.LP -zfs(8), zpool(8) +.El +.Sh SEE ALSO +.Xr zfs 8 , +.Xr zpool 8 +.Sh AUTHORS +This manual page is a +.Xr mdoc 7 +reimplementation of the +.Tn OpenSolaris +manual page +.Em zdb(1M) , +modified and customized for +.Fx +and licensed under the +.Tn Common Development and Distribution License +.Pq Tn CDDL . +.Pp +The +.Xr mdoc 7 +implementation of this manual page was initially written by +.An Martin Matuska Aq mm@FreeBSD.org . Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Nov 27 11:15:59 2011 (r228018) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Nov 27 11:44:20 2011 (r228019) @@ -1,561 +1,528 @@ '\" te -.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with -.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with -.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.\" Copyright (c) 2011, Martin Matuska . +.\" All Rights Reserved. +.\" +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License (the "License"). +.\" You may not use this file except in compliance with the License. +.\" +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +.\" or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions +.\" and limitations under the License. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. +.\" If applicable, add the following below this CDDL HEADER, with the +.\" fields enclosed by brackets "[]" replaced with your own identifying +.\" information: Portions Copyright [yyyy] [name of copyright owner] +.\" +.\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 2011 Nexenta Systems, Inc. All rights reserved. -.\" Copyright 2011 by Delphix. All rights reserved. -.\" Portions Copyright 2011 Pawel Jakub Dawidek -.\" Portions Copyright 2011 Martin Matuska -.TH ZFS 8 "September 24, 2009" FreeBSD -.SH NAME -zfs \- configures ZFS file systems -.SH SYNOPSIS -.LP -.nf -\fBzfs\fR [\fB-?\fR] -.fi - -.LP -.nf -\fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBcreate\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBdestroy\fR [\fB-rRf\fR] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBdestroy\fR [\fB-rRd\fR] \fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBsnapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR]... - \fIfilesystem@snapname\fR|\fIvolume@snapname\fR -.fi - -.LP -.nf -\fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBrename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR - \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBrename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBrename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] - [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... -.fi - -.LP -.nf -\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... -.fi - -.LP -.nf -\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] - "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... -.fi - -.LP -.nf -\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ... -.fi - -.LP -.nf -\fBzfs\fR \fBupgrade\fR [\fB-v\fR] -.fi - -.LP -.nf -\fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... - [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... - [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBmount\fR -.fi - -.LP -.nf -\fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR -.fi - -.LP -.nf -\fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR -.fi - -.LP -.nf -\fBzfs\fR \fBsend\fR [\fB-vR\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR -.fi - -.LP -.nf -\fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...] - \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]] - \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR -.fi - -.LP -.nf -\fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR... -.fi - -.LP -.nf -\fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR... -.fi - -.LP -.nf -\fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR... -.fi - -.LP -.nf -\fBzfs\fR \fBjail\fR \fIjailid\fR \fIfilesystem\fR -.fi - -.LP -.nf -\fBzfs\fR \fBunjail\fR \fIjailid\fR \fIfilesystem\fR -.fi - -.SH DESCRIPTION -.sp -.LP -The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage -pool, as described in \fBzpool\fR(8). A dataset is identified by a unique path -within the \fBZFS\fR namespace. For example: -.sp -.in +2 -.nf -pool/{filesystem,volume,snapshot} -.fi -.in -2 -.sp - -.sp -.LP -where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes). -.sp -.LP +.\" Copyright (c) 2011 by Delphix. All rights reserved. +.\" Copyright (c) 2011, Pawel Jakub Dawidek +.\" +.\" $FreeBSD$ +.\" +.Dd November 26, 2011 +.Dt ZFS 8 +.Os +.Sh NAME +.Nm zfs +.Nd configures ZFS file systems +.Sh SYNOPSIS +.Nm +.Op Fl \&? +.Nm +.Cm create +.Op Fl p +.Op Fl o Ar property Ns = Ns Ar value +.Ar ... filesystem +.Nm +.Cm create +.Op Fl ps +.Op Fl b Ar blocksize +.Op Fl o Ar property Ns = Ns Ar value +.Ar ... +.Fl V +.Ar size volume +.Nm +.Cm destroy +.Op Fl rRf +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm destroy +.Op Fl rRd +.Ar snapshot +.Nm +.Cm snapshot +.Op Fl r +.Op Fl o Ar property Ns = Ns Ar value +.Ar ... filesystem@snapname Ns | Ns Ar volume@snapname +.Nm +.Cm rollback +.Op Fl rRf +.Ar snapshot +.Nm +.Cm clone +.Op Fl p +.Op Fl o Ar property Ns = Ns Ar value +.Ar ... snapshot filesystem Ns | Ns Ar volume +.Nm +.Cm promote +.Ar clone-filesystem +.Nm +.Cm rename +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Nm +.Cm rename +.Fl p +.Ar filesystem Ns | Ns Ar volume +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm rename +.Fl r +.Ar snapshot snapshot +.Nm +.Cm rename +.Fl u +.Op Fl p +.Ar filesystem filesystem +.Nm +.Cm list +.Op Fl r Ns | Ns Fl d Ar depth +.Op Fl H +.Op Fl o Ar property Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... +.Op Fl s Ar property +.Ar ... +.Op Fl S Ar property +.Ar ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Nm +.Cm set +.Ar property Ns = Ns Ar value +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Nm +.Cm get +.Op Fl r Ns | Ns Fl d Ar depth +.Op Fl Hp +.Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl s Ar source Ns Op , Ns Ar ... +.Ar all | property Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Nm +.Cm inherit +.Op Fl rS +.Ar property +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Nm +.Cm upgrade +.Op Fl v +.Nm +.Cm upgrade +.Op Fl r +.Op Fl V Ar version +.Fl a | Ar filesystem +.Nm +.Cm userspace +.Op Fl niHp +.Op Fl o Ar field Ns Op , Ns Ar ... +.Op Fl sS Ar field +.Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar snapshot +.Nm +.Cm groupspace +.Op Fl niHp +.Op Fl o Ar field Ns Op , Ns Ar ... +.Op Fl sS Ar field +.Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar snapshot +.Nm +.Cm mount +.Nm +.Cm mount +.Op Fl vO +.Op Fl o Ar property Ns Op , Ns Ar ... +.Fl a | Ar filesystem +.Nm +.Cm unmount +.Op Fl f +.Fl a | Ar filesystem Ns | Ns Ar mountpoint +.Nm +.Cm share +.Fl a | Ar filesystem +.Nm +.Cm unshare +.Fl a | Ar filesystem Ns | Ns Ar mountpoint +.Nm +.Cm send +.Op Fl DvRp +.Op Fl i Ar snapshot | Fl I Ar snapshot +.Ar snapshot +.Nm +.Cm receive +.Op Fl vnFu +.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot +.Nm +.Cm receive +.Op Fl vnFu +.Op Fl d | e +.Ar filesystem +.Nm +.Cm allow +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm allow +.Op Fl ldug +.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm allow +.Op Fl ld +.Fl e +.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm allow +.Fl c +.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm allow +.Fl s +.Ar @setname +.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm unallow +.Op Fl rldug +.Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ... +.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm unallow +.Op Fl rld +.Fl e +.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm unallow +.Op Fl r +.Fl c +.Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm unallow +.Op Fl r +.Fl s +.Ar @setname +.Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ... +.Ar filesystem Ns | Ns Ar volume +.Nm +.Cm hold +.Op Fl r +.Ar tag snapshot ... +.Nm +.Cm holds +.Op Fl r +.Ar snapshot ... +.Nm +.Cm release +.Op Fl r +.Ar tag snapshot ... +.Nm +.Cm diff +.Op Fl FHt +.Ar snapshot +.Op Ar snapshot Ns | Ns Ar filesystem +.Nm +.Cm jail +.Ar jailid filesystem +.Nm +.Cm unjail +.Ar jailid filesystem +.Sh DESCRIPTION +The +.Nm +command configures +.Tn ZFS +datasets within a +.Tn ZFS +storage pool, as described in +.Xr zpool 8 . +A dataset is identified by a unique path within the +.Tn ZFS +namespace. For example: +.Bd -ragged -offset 4n +.No pool/ Ns Brq filesystem,volume,snapshot +.Ed +.Pp +where the maximum length of a dataset name is +.Dv MAXNAMELEN +(256 bytes). +.Pp A dataset can be one of the following: -.sp -.ne 2 -.na -\fB\fIfile system\fR\fR -.ad -.sp .6 -.RS 4n -A \fBZFS\fR dataset of type \fBfilesystem\fR can be mounted within the standard -system namespace and behaves like other file systems. While \fBZFS\fR file -systems are designed to be \fBPOSIX\fR compliant, known issues exist that -prevent compliance in some cases. Applications that depend on standards -conformance might fail due to nonstandard behavior when checking file system -free space. -.RE - -.sp -.ne 2 -.na -\fB\fIvolume\fR\fR -.ad -.sp .6 -.RS 4n +.Bl -hang -width 12n +.It Sy file system +A +.Tn ZFS +dataset of type +.Em filesystem +can be mounted within the standard system namespace and behaves like other file +systems. While +.Tn ZFS +file systems are designed to be +.Tn POSIX +compliant, known issues exist that prevent compliance in some cases. +Applications that depend on standards conformance might fail due to nonstandard +behavior when checking file system free space. +.It Sy volume A logical volume exported as a raw or block device. This type of dataset should only be used under special circumstances. File systems are typically used in most environments. -.RE - -.sp -.ne 2 -.na -\fB\fIsnapshot\fR\fR -.ad -.sp .6 -.RS 4n +.It Sy snapshot A read-only version of a file system or volume at a given point in time. It is -specified as \fIfilesystem@name\fR or \fIvolume@name\fR. -.RE - -.SS "ZFS File System Hierarchy" -.sp -.LP -A \fBZFS\fR storage pool is a logical collection of devices that provide space -for datasets. A storage pool is also the root of the \fBZFS\fR file system -hierarchy. -.sp -.LP +specified as +.Em filesystem@name +or +.Em volume@name . +.El +.Ss ZFS File System Hierarchy +A +.Tn ZFS +storage pool is a logical collection of devices that provide space for +datasets. A storage pool is also the root of the +.Tn ZFS +file system hierarchy. +.Pp The root of the pool can be accessed as a file system, such as mounting and unmounting, taking snapshots, and setting properties. The physical storage -characteristics, however, are managed by the \fBzpool\fR(8) command. -.sp -.LP -See \fBzpool\fR(8) for more information on creating and administering pools. -.SS "Snapshots" -.sp -.LP +characteristics, however, are managed by the +.Xr zpool 8 +command. +.Pp +See +.Xr zpool 8 +for more information on creating and administering pools. +.Ss Snapshots A snapshot is a read-only copy of a file system or volume. Snapshots can be created extremely quickly, and initially consume no additional space within the pool. As data within the active dataset changes, the snapshot consumes more data than would otherwise be shared with the active dataset. -.sp -.LP +.Pp Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back, but cannot be accessed independently. -.sp -.LP -File system snapshots can be accessed under the \fB\&.zfs/snapshot\fR directory -in the root of the file system. Snapshots are automatically mounted on demand -and may be unmounted at regular intervals. The visibility of the \fB\&.zfs\fR -directory can be controlled by the \fBsnapdir\fR property. -.SS "Clones" -.sp -.LP +.Pp +File system snapshots can be accessed under the +.Pa \&.zfs/snapshot +directory in the root of the file system. Snapshots are automatically mounted +on demand and may be unmounted at regular intervals. The visibility of the +.Pa \&.zfs +directory can be controlled by the +.Sy snapdir +property. +.Ss Clones A clone is a writable volume or file system whose initial contents are the same as another dataset. As with snapshots, creating a clone is nearly instantaneous, and initially consumes no additional space. -.sp -.LP +.Pp Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot -cannot be destroyed as long as a clone exists. The \fBorigin\fR property -exposes this dependency, and the \fBdestroy\fR command lists any such -dependencies, if they exist. -.sp -.LP +cannot be destroyed as long as a clone exists. The +.Sy origin +property exposes this dependency, and the +.Cm destroy +command lists any such dependencies, if they exist. +.Pp The clone parent-child dependency relationship can be reversed by using the -\fBpromote\fR subcommand. This causes the "origin" file system to become a -clone of the specified file system, which makes it possible to destroy the file -system that the clone was created from. -.SS "Mount Points" -.sp -.LP -Creating a \fBZFS\fR file system is a simple operation, so the number of file -systems per system is likely to be numerous. To cope with this, \fBZFS\fR +.Cm promote +subcommand. This causes the "origin" file system to become a clone of the +specified file system, which makes it possible to destroy the file system that +the clone was created from. +.Ss Mount Points +Creating a +.Tn ZFS +file system is a simple operation, so the number of file systems per system is +likely to be numerous. To cope with this, +.Tn ZFS automatically manages mounting and unmounting file systems without the need to -edit the \fB/etc/fstab\fR file. All automatically managed file systems are -mounted by \fBZFS\fR at boot time. -.sp -.LP -By default, file systems are mounted under \fB/\fIpath\fR\fR, where \fIpath\fR -is the name of the file system in the \fBZFS\fR namespace. Directories are -created and destroyed as needed. -.sp -.LP -A file system can also have a mount point set in the \fBmountpoint\fR property. -This directory is created as needed, and \fBZFS\fR automatically mounts the -file system when the \fBzfs mount -a\fR command is invoked (without editing -\fB/etc/fstab\fR). The \fBmountpoint\fR property can be inherited, so if -\fBpool/home\fR has a mount point of \fB/export/stuff\fR, then -\fBpool/home/user\fR automatically inherits a mount point of -\fB/export/stuff/user\fR. -.sp -.LP -A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system -from being mounted. -.sp -.LP -If needed, \fBZFS\fR file systems can also be managed with traditional tools -(\fBmount\fR, \fBumount\fR, \fB/etc/fstab\fR). If a file system's mount point -is set to \fBlegacy\fR, \fBZFS\fR makes no attempt to manage the file system, -and the administrator is responsible for mounting and unmounting the file -system. -.SS "Jails" -.sp -.LP -A \fBZFS\fR dataset can be attached to a jail by using the \fBzfs\fR -\fBjail\fR subcommand. You cannot attach a dataset to one jail and the -children of the same dataset to another jails. To allow managment of the -dataset from within a jail, the "\fBjailed\fR" property has to be set. -The \fBquota\fR property cannot be changed from within a jail. -.sp -.LP -A \fBZFS\fR dataset can be detached from a jail using the \fBzfs\fR -\fBunjail\fR subcommand. -.sp -.LP -After a dataset is attached to a jail and the \fBjailed\fR property is set, -a jailed file system cannot be mounted outside the jail, since the jail -administrator might have set the mount point to an unacceptable value. -.SS "Native Properties" -.sp -.LP +edit the +.Pa /etc/fstab +file. All automatically managed file systems are mounted by +.Tn ZFS +at boot time. +.Pp +By default, file systems are mounted under +.Pa /path , +where +.Ar path +is the name of the file system in the +.Tn ZFS +namespace. Directories are created and destroyed as needed. +.Pp +A file system can also have a mount point set in the +.Sy mountpoint +property. This directory is created as needed, and +.Tn ZFS +automatically mounts the file system when the +.Qq Nm Cm mount Fl a +command is invoked (without editing +.Pa /etc/fstab Ns ). +The +.Sy mountpoint +property can be inherited, so if +.Em pool/home +has a mount point of +.Pa /home , +then +.Em pool/home/user +automatically inherits a mount point of +.Pa /home/user . +.Pp +A file system +.Sy mountpoint +property of +.Cm none +prevents the file system from being mounted. +.Pp +If needed, +.Tn ZFS +file systems can also be managed with traditional tools +.Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 . +If a file system's mount point is set to +.Cm legacy , +.Tn ZFS +makes no attempt to manage the file system, and the administrator is +responsible for mounting and unmounting the file system. +.Ss Jails +.No A Tn ZFS +dataset can be attached to a jail by using the +.Qq Nm Cm jail +subcommand. You cannot attach a dataset to one jail and the children of the +same dataset to another jails. To allow managment of the dataset from within +a jail, the +.Sy jailed +property has to be set. The +.Sy quota +property cannot be changed from within a jail. +.Pp +.No A Tn ZFS +dataset can be detached from a jail using the +.Qq Nm Cm unjail +subcommand. +.Pp +After a dataset is attached to a jail and the jailed property is set, a jailed +file system cannot be mounted outside the jail, since the jail administrator +might have set the mount point to an unacceptable value. +.Ss Deduplication +Deduplication is the process for removing redundant data at the block-level, +reducing the total amount of data stored. If a file system has the +.Cm dedup +property enabled, duplicate data blocks are removed synchronously. The result +is that only unique data is stored and common components are shared among +files. +.Ss Native Properties Properties are divided into two types, native properties and user-defined (or "user") properties. Native properties either export internal statistics or -control \fBZFS\fR behavior. In addition, native properties are either editable -or read-only. User properties have no effect on \fBZFS\fR behavior, but you can -use them to annotate datasets in a way that is meaningful in your environment. -For more information about user properties, see the "User Properties" section, -below. -.sp -.LP +control +.Tn ZFS +behavior. In addition, native properties are either editable or read-only. User +properties have no effect on +.Tn ZFS +behavior, but you can use them to annotate datasets in a way that is meaningful +in your environment. For more information about user properties, see the +.Qq Sx User Properties +section, below. +.Pp Every dataset has a set of properties that export statistics about the dataset as well as control various behaviors. Properties are inherited from the parent unless overridden by the child. Some properties apply only to certain types of datasets (file systems, volumes, or snapshots). -.sp -.LP +.Pp The values of numeric properties can be specified using human-readable suffixes -(for example, \fBk\fR, \fBKB\fR, \fBM\fR, \fBGb\fR, and so forth, up to \fBZ\fR +(for example, +.Sy k , KB , M , Gb , +and so forth, up to +.Sy Z for zettabyte). The following are all valid (and equal) specifications: -.sp -.in +2 -.nf +.Bd -ragged -offset 4n 1536M, 1.5g, 1.50GB -.fi -.in -2 -.sp - -.sp -.LP +.Ed +.Pp The values of non-numeric properties are case sensitive and must be lowercase, -except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR. -.sp -.LP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 11:46:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97194106564A; Sun, 27 Nov 2011 11:46:09 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CD3C8FC0A; Sun, 27 Nov 2011 11:46:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARBk94E038265; Sun, 27 Nov 2011 11:46:09 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARBk9sE038262; Sun, 27 Nov 2011 11:46:09 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111271146.pARBk9sE038262@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 Nov 2011 11:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228020 - in head/cddl/contrib/opensolaris/cmd: zfs zpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 11:46:09 -0000 Author: mm Date: Sun Nov 27 11:46:09 2011 New Revision: 228020 URL: http://svn.freebsd.org/changeset/base/228020 Log: Fix zfs(8) and zpool(8) context help to repport supported flags. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Nov 27 11:44:20 2011 (r228019) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Nov 27 11:46:09 2011 (r228020) @@ -260,7 +260,8 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-RDp] [-[iI] snapshot] \n")); + return (gettext("\tsend [-DvRp] " + "[-i snapshot | -I snapshot] \n")); case HELP_SET: return (gettext("\tset " " ...\n")); @@ -296,11 +297,11 @@ get_usage(zfs_help_t idx) "\tunallow [-r] -s @setname [[,...]] " "\n")); case HELP_USERSPACE: - return (gettext("\tuserspace [-hniHp] [-o field[,...]] " + return (gettext("\tuserspace [-niHp] [-o field[,...]] " "[-sS field] ... [-t type[,...]]\n" "\t \n")); case HELP_GROUPSPACE: - return (gettext("\tgroupspace [-hniHpU] [-o field[,...]] " + return (gettext("\tgroupspace [-niHp] [-o field[,...]] " "[-sS field] ... [-t type[,...]]\n" "\t \n")); case HELP_HOLD: Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Nov 27 11:44:20 2011 (r228019) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Nov 27 11:46:09 2011 (r228020) @@ -228,7 +228,7 @@ get_usage(zpool_help_t idx) { case HELP_OFFLINE: return (gettext("\toffline [-t] ...\n")); case HELP_ONLINE: - return (gettext("\tonline ...\n")); + return (gettext("\tonline [-e] ...\n")); case HELP_REPLACE: return (gettext("\treplace [-f] " "[new-device]\n")); @@ -240,8 +240,7 @@ get_usage(zpool_help_t idx) { return (gettext("\tstatus [-vx] [-T d|u] [pool] ... [interval " "[count]]\n")); case HELP_UPGRADE: - return (gettext("\tupgrade\n" - "\tupgrade -v\n" + return (gettext("\tupgrade [-v]\n" "\tupgrade [-V version] <-a | pool ...>\n")); case HELP_GET: return (gettext("\tget <\"all\" | property[,...]> " From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 12:11:40 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9EF106566C; Sun, 27 Nov 2011 12:11:40 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 734718FC0A; Sun, 27 Nov 2011 12:11:40 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pARCBcwr076736 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 27 Nov 2011 12:11:39 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: Date: Sun, 27 Nov 2011 12:11:36 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201111261846.pAQIkXZk004285@svn.freebsd.org> <20111126202413.GA48676@zim.MIT.EDU> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, David Schultz , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r228004 - in head: contrib/libcxxrt lib/libcxxrt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 12:11:41 -0000 On 27 Nov 2011, at 09:19, Bjoern A. Zeeb wrote: > On Sat, 26 Nov 2011, David Schultz wrote: >=20 >> On Sat, Nov 26, 2011, Bjoern A. Zeeb wrote: >>> On Sat, 26 Nov 2011, David Chisnall wrote: >>>=20 >>>> Author: theraven >>>> Date: Sat Nov 26 18:46:33 2011 >>>> New Revision: 228004 >>>> URL: http://svn.freebsd.org/changeset/base/228004 >>>>=20 >>>> Log: >>>> Update libcxxrt to remove the pthread dependency. >>>>=20 >>>> Also add the license from upstream to contrib. >>>=20 >>> Did the license really come in this format with long lines? It = would >>> be great, given it looks very close to a 2-clause BSD license to = make >>> it as close as we can get to our standard license template. >>=20 >> It looks like the license file came from the vendor branch. If >> it's published by the vendor that way, we shouldn't be introducing >> gratuitous style differences. >=20 > If it's coming like that from the vendor it would be nice if someone > could reach out and ask them to consider the formating as in > /usr/share/examples/etc/bsd-style-copyright. I'll do that and import it in the next merge. David P.S. Rumour has that some very modern text editors have a feature that = lets them wrap the text to the size of the current window / terminal...= From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 13:53:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1818A106567A; Sun, 27 Nov 2011 13:53:37 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 082178FC15; Sun, 27 Nov 2011 13:53:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARDracC042140; Sun, 27 Nov 2011 13:53:36 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARDraTa042138; Sun, 27 Nov 2011 13:53:36 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201111271353.pARDraTa042138@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 27 Nov 2011 13:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228021 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 13:53:37 -0000 Author: jh Date: Sun Nov 27 13:53:36 2011 New Revision: 228021 URL: http://svn.freebsd.org/changeset/base/228021 Log: Add LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target. This was missed in r221353. Modified: head/sys/conf/makeLINT.mk Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Sun Nov 27 11:46:09 2011 (r228020) +++ head/sys/conf/makeLINT.mk Sun Nov 27 13:53:36 2011 (r228021) @@ -6,7 +6,7 @@ all: clean: rm -f LINT .if ${TARGET} == "amd64" || ${TARGET} == "i386" - rm -f LINT-VIMAGE + rm -f LINT-VIMAGE LINT-NOINET LINT-NOINET6 LINT-NOIP .endif NOTES= ../../conf/NOTES NOTES From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 15:43:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23B3D106566B; Sun, 27 Nov 2011 15:43:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11FFF8FC0C; Sun, 27 Nov 2011 15:43:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARFhe9N045504; Sun, 27 Nov 2011 15:43:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARFhek4045499; Sun, 27 Nov 2011 15:43:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111271543.pARFhek4045499@svn.freebsd.org> From: Marius Strobl Date: Sun, 27 Nov 2011 15:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228022 - in head/sys: cam conf sparc64/include sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 15:43:41 -0000 Author: marius Date: Sun Nov 27 15:43:40 2011 New Revision: 228022 URL: http://svn.freebsd.org/changeset/base/228022 Log: For sparc64 also adjust the geometry of da(4) driven disks to not overflow the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The geometry chosen for disks above that limit allows to use disks up to 2TB, which is the limit of the extended VTOC8 format. The geometry used for disks smaller than the 16-bit cylinders limit stays the same as used by cam_calc_geometry(9) for extended translation. Thanks to Hans-Joerg Sirtl for providing hardware for testing this change. MFC after: 3 days Added: head/sys/sparc64/sparc64/cam_machdep.c (contents, props changed) Modified: head/sys/cam/cam_xpt.c head/sys/conf/files.sparc64 head/sys/sparc64/include/md_var.h Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Nov 27 13:53:36 2011 (r228021) +++ head/sys/cam/cam_xpt.c Sun Nov 27 15:43:40 2011 (r228022) @@ -66,7 +66,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include /* geometry translation */ #include /* for xpt_print below */ + #include "opt_cam.h" /* @@ -2456,7 +2459,7 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_REQ_CMP; break; } -#ifdef PC98 +#if defined(PC98) || defined(__sparc64__) /* * In a PC-98 system, geometry translation depens on * the "real" device geometry obtained from mode page 4. @@ -2465,6 +2468,9 @@ xpt_action_default(union ccb *start_ccb) * stored in host memory. If the translation is available * in host memory, use it. If not, rely on the default * translation the device driver performs. + * For sparc64, we may need adjust the geometry of large + * disks in order to fit the limitations of the 16-bit + * fields of the VTOC8 disk label. */ if (scsi_da_bios_params(&start_ccb->ccg) != 0) { start_ccb->ccb_h.status = CAM_REQ_CMP; Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Sun Nov 27 13:53:36 2011 (r228021) +++ head/sys/conf/files.sparc64 Sun Nov 27 15:43:40 2011 (r228022) @@ -90,6 +90,7 @@ sparc64/sparc64/ata_machdep.c optional a sparc64/sparc64/autoconf.c standard sparc64/sparc64/bus_machdep.c standard sparc64/sparc64/cache.c standard +sparc64/sparc64/cam_machdep.c optional scbus sparc64/sparc64/cheetah.c standard sparc64/sparc64/clock.c standard sparc64/sparc64/counter.c standard Modified: head/sys/sparc64/include/md_var.h ============================================================================== --- head/sys/sparc64/include/md_var.h Sun Nov 27 13:53:36 2011 (r228021) +++ head/sys/sparc64/include/md_var.h Sun Nov 27 15:43:40 2011 (r228022) @@ -65,10 +65,11 @@ extern cpu_block_copy_t *cpu_block_copy; extern cpu_block_zero_t *cpu_block_zero; /* - * Given that the Sun disk label only uses 16-bit fields for cylinders, - * heads and sectors we might need to adjust the geometry of large IDE - * disks. + * Given that the VTOC8 disk label only uses 16-bit fields for cylinders, + * heads and sectors we might need to adjust the geometry of large disks. */ +struct ccb_calc_geometry; +int scsi_da_bios_params(struct ccb_calc_geometry *ccg); struct disk; void sparc64_ata_disk_firmware_geom_adjust(struct disk *disk); #define ata_disk_firmware_geom_adjust(disk) \ Added: head/sys/sparc64/sparc64/cam_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/sparc64/cam_machdep.c Sun Nov 27 15:43:40 2011 (r228022) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2011 Marius Strobl + * 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, 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include + +#include + +int +scsi_da_bios_params(struct ccb_calc_geometry *ccg) +{ + uint32_t secs_per_cylinder, size_mb; + + /* + * The VTOC8 disk label only uses 16-bit fields for cylinders, heads + * and sectors so the geometry of large disks has to be adjusted. + * We generally use the sizing used by cam_calc_geometry(9), except + * when it would overflow the cylinders, in which case we use 255 + * heads and sectors. This allows disks up to the 2TB limit of the + * extended VTOC8. + * XXX this doesn't match the sizing used by OpenSolaris, as that + * would exceed the 8-bit ccg->heads and ccg->secs_per_track. + */ + if (ccg->block_size == 0) + return (0); + size_mb = (1024L * 1024L) / ccg->block_size; + if (size_mb == 0) + return (0); + size_mb = ccg->volume_size / size_mb; + if (ccg->volume_size > (uint64_t)65535 * 255 * 63) { + ccg->heads = 255; + ccg->secs_per_track = 255; + } else if (size_mb > 1024) { + ccg->heads = 255; + ccg->secs_per_track = 63; + } else { + ccg->heads = 64; + ccg->secs_per_track = 32; + } + secs_per_cylinder = ccg->heads * ccg->secs_per_track; + if (secs_per_cylinder == 0) + return (0); + ccg->cylinders = ccg->volume_size / secs_per_cylinder; + return (1); +} From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 15:43:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77771065670; Sun, 27 Nov 2011 15:43:49 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9692D8FC15; Sun, 27 Nov 2011 15:43:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARFhnQM045546; Sun, 27 Nov 2011 15:43:49 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARFhnfW045542; Sun, 27 Nov 2011 15:43:49 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201111271543.pARFhnfW045542@svn.freebsd.org> From: Kevin Lo Date: Sun, 27 Nov 2011 15:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228023 - head/sys/fs/ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 15:43:49 -0000 Author: kevlo Date: Sun Nov 27 15:43:49 2011 New Revision: 228023 URL: http://svn.freebsd.org/changeset/base/228023 Log: Add unicode support to ntfs Obtained from: imura Modified: head/sys/fs/ntfs/ntfs_subr.c head/sys/fs/ntfs/ntfs_subr.h head/sys/fs/ntfs/ntfs_vnops.c Modified: head/sys/fs/ntfs/ntfs_subr.c ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.c Sun Nov 27 15:43:40 2011 (r228022) +++ head/sys/fs/ntfs/ntfs_subr.c Sun Nov 27 15:43:49 2011 (r228023) @@ -669,23 +669,17 @@ ntfs_uastricmp(ntmp, ustr, ustrlen, astr const char *astr; size_t astrlen; { - int len; + const char *astrp = astr; + int len, res; size_t i, j, mbstrlen = astrlen; - int res; - wchar wc; if (ntmp->ntm_ic_l2u) { - for (i = 0, j = 0; i < ustrlen && j < astrlen; i++, j++) { - if (j < astrlen -1) { - wc = (wchar)astr[j]<<8 | (astr[j+1]&0xFF); - len = 2; - } else { - wc = (wchar)astr[j]<<8 & 0xFF00; - len = 1; - } + for (i = 0, j = 0; i < ustrlen && j < astrlen; i++) { + len = 4; res = ((int) NTFS_TOUPPER(ustr[i])) - - ((int)NTFS_TOUPPER(NTFS_82U(wc, &len))); - j += len - 1; + ((int)NTFS_TOUPPER(NTFS_82U(astrp, &len))); + astrp += len; + j += len; mbstrlen -= len - 1; if (res) @@ -698,7 +692,8 @@ ntfs_uastricmp(ntmp, ustr, ustrlen, astr */ for (i = 0; i < ustrlen && i < astrlen; i++) { res = ((int) NTFS_TOUPPER(NTFS_82U(NTFS_U28(ustr[i]), &len))) - - ((int)NTFS_TOUPPER(NTFS_82U((wchar)astr[i], &len))); + ((int)NTFS_TOUPPER(NTFS_82U(astrp, &len))); + astrp++; if (res) return res; } @@ -717,23 +712,18 @@ ntfs_uastrcmp(ntmp, ustr, ustrlen, astr, const char *astr; size_t astrlen; { - char u, l; + char *c; size_t i, j, mbstrlen = astrlen; int res; - wchar wc; - for (i = 0, j = 0; (i < ustrlen) && (j < astrlen); i++, j++) { - res = 0; - wc = NTFS_U28(ustr[i]); - u = (char)(wc>>8); - l = (char)wc; - if (u != '\0' && j < astrlen -1) { - res = (int) (u - astr[j++]); + for (i = 0, j = 0; (i < ustrlen) && (j < astrlen); i++, mbstrlen++) { + c = NTFS_U28(ustr[i]); + while (*c != '\0') { + res = (int) (*c++ - astr[j++]); + if (res) + return res; mbstrlen--; } - res = (res<<8) + (int) (l - astr[j]); - if (res) - return res; } return (ustrlen - mbstrlen); } @@ -2137,50 +2127,47 @@ ntfs_82u_uninit(struct ntfsmount *ntmp) } /* - * maps the Unicode char to 8bit equivalent - * XXX currently only gets lower 8bit from the Unicode char - * and substitutes a '_' for it if the result would be '\0'; - * something better has to be definitely though out + * maps the Unicode char to local character */ -wchar +char * ntfs_u28( struct ntfsmount *ntmp, wchar wc) { - char *p, *outp, inbuf[3], outbuf[3]; + char *p, *outp, inbuf[3], outbuf[5];; size_t ilen, olen; + outp = outbuf; if (ntfs_iconv && ntmp->ntm_ic_u2l) { - ilen = olen = 2; + ilen = 2; + olen = 4; inbuf[0] = (char)(wc>>8); inbuf[1] = (char)wc; inbuf[2] = '\0'; p = inbuf; - outp = outbuf; ntfs_iconv->convchr(ntmp->ntm_ic_u2l, (const char **)&p, &ilen, &outp, &olen); - if (olen == 1) { - return ((wchar)(outbuf[0]&0xFF)); - } else if (olen == 0) { - return ((wchar)((outbuf[0]<<8) | (outbuf[1]&0xFF))); - } - return ('?'); + if (olen == 4) + *outp++ = '?'; + *outp = '\0'; + outp = outbuf; + return (outp); } p = ntmp->ntm_u28[(wc>>8)&0xFF]; - if (p == NULL) - return ('_'); - return (p[wc&0xFF]&0xFF); + outbuf[0] = (p == NULL) ? '_' : p[wc&0xFF] & 0xFF; + outbuf[1] = '\0'; + return (outp); } wchar ntfs_82u( struct ntfsmount *ntmp, - wchar wc, + const char *c, int *len) { - char *p, *outp, inbuf[3], outbuf[3]; + char *outp, outbuf[3]; wchar uc; size_t ilen, olen; @@ -2188,13 +2175,8 @@ ntfs_82u( ilen = (size_t)*len; olen = 2; - inbuf[0] = (char)(wc>>8); - inbuf[1] = (char)wc; - inbuf[2] = '\0'; - p = inbuf; outp = outbuf; - ntfs_iconv->convchr(ntmp->ntm_ic_l2u, (const char **)&p, &ilen, - &outp, &olen); + ntfs_iconv->convchr(ntmp->ntm_ic_l2u, &c, &ilen, &outp, &olen); *len -= (int)ilen; uc = (wchar)((outbuf[0]<<8) | (outbuf[1]&0xFF)); @@ -2202,7 +2184,7 @@ ntfs_82u( } if (ntmp->ntm_82u != NULL) - return (ntmp->ntm_82u[wc&0xFF]); + return (ntmp->ntm_82u[*c&0xFF]); return ('?'); } Modified: head/sys/fs/ntfs/ntfs_subr.h ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.h Sun Nov 27 15:43:40 2011 (r228022) +++ head/sys/fs/ntfs/ntfs_subr.h Sun Nov 27 15:43:49 2011 (r228023) @@ -112,8 +112,8 @@ int ntfs_u28_init(struct ntfsmount *ntmp int ntfs_u28_uninit(struct ntfsmount *ntmp); int ntfs_82u_init(struct ntfsmount *ntmp, char *cs_local, char *cs_ntfs); int ntfs_82u_uninit(struct ntfsmount *ntmp); -wchar ntfs_u28(struct ntfsmount *ntmp, wchar wc); -wchar ntfs_82u(struct ntfsmount *ntmp, wchar wc, int *len); +char * ntfs_u28(struct ntfsmount *ntmp, wchar wc); +wchar ntfs_82u(struct ntfsmount *ntmp, const char *c, int *len); #define NTFS_U28(ch) ntfs_u28(ntmp, (ch)) #define NTFS_82U(ch, len) ntfs_82u(ntmp, (ch), len) #define NTFS_UASTRCMP(ustr, ustrlen, astr, astrlen) \ Modified: head/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vnops.c Sun Nov 27 15:43:40 2011 (r228022) +++ head/sys/fs/ntfs/ntfs_vnops.c Sun Nov 27 15:43:49 2011 (r228023) @@ -481,7 +481,7 @@ ntfs_readdir(ap) struct uio *uio = ap->a_uio; struct ntfsmount *ntmp = ip->i_mp; int i, j, error = 0; - wchar c; + char *c; u_int32_t faked = 0, num; int ncookies = 0; struct dirent cde; @@ -538,11 +538,10 @@ ntfs_readdir(ap) if(!ntfs_isnamepermitted(ntmp,iep)) continue; - for(i=0, j=0; iie_fnamelen; i++, j++) { + for(i=0, j=0; iie_fnamelen; i++) { c = NTFS_U28(iep->ie_fname[i]); - if (c&0xFF00) - cde.d_name[j++] = (char)(c>>8); - cde.d_name[j] = (char)c&0xFF; + while (*c != '\0') + cde.d_name[j++] = *c++; } cde.d_name[j] = '\0'; dprintf(("ntfs_readdir: elem: %d, fname:[%s] type: %d, flag: %d, ", From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 15:49:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CC9B106566B; Sun, 27 Nov 2011 15:49:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1718FC16; Sun, 27 Nov 2011 15:49:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARFnk7u045767; Sun, 27 Nov 2011 15:49:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARFnkhj045765; Sun, 27 Nov 2011 15:49:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111271549.pARFnkhj045765@svn.freebsd.org> From: Marius Strobl Date: Sun, 27 Nov 2011 15:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228024 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 15:49:47 -0000 Author: marius Date: Sun Nov 27 15:49:46 2011 New Revision: 228024 URL: http://svn.freebsd.org/changeset/base/228024 Log: Update comment. Modified: head/sys/sparc64/sparc64/ata_machdep.c Modified: head/sys/sparc64/sparc64/ata_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/ata_machdep.c Sun Nov 27 15:43:49 2011 (r228023) +++ head/sys/sparc64/sparc64/ata_machdep.c Sun Nov 27 15:49:46 2011 (r228024) @@ -36,14 +36,13 @@ sparc64_ata_disk_firmware_geom_adjust(st { /* - * The Sun disk label only uses 16-bit fields for cylinders, - * heads and sectors so the geometry of large IDE disks has - * to be adjusted. If the disk is > 32GB at 16 heads and 63 - * sectors, the sectors have to be adjusted to 255. If the - * the disk is even > 128GB, additionally adjust the heads - * to 255. - * XXX the OpenSolaris dad(7D) driver limits the mediasize - * to 128GB. + * The VTOC8 disk label only uses 16-bit fields for cylinders, heads + * and sectors so the geometry of large disks has to be adjusted. + * If the disk is > 32GB at 16 heads and 63 sectors, adjust to 255 + * sectors (this matches what the OpenSolaris dad(7D) driver does). + * If the the disk is even > 128GB, additionally adjust the heads to + * 255. This allows disks up to the 2TB limit of the extended VTOC8. + * XXX the OpenSolaris dad(7D) driver limits the mediasize to 128GB. */ if (disk->d_mediasize > (off_t)65535 * 16 * 63 * disk->d_sectorsize) disk->d_fwsectors = 255; From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 15:53:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8403106566B; Sun, 27 Nov 2011 15:53:58 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6F368FC08; Sun, 27 Nov 2011 15:53:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARFrwcF045935; Sun, 27 Nov 2011 15:53:58 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARFrwsW045933; Sun, 27 Nov 2011 15:53:58 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201111271553.pARFrwsW045933@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 27 Nov 2011 15:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228025 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 15:53:59 -0000 Author: trociny Date: Sun Nov 27 15:53:58 2011 New Revision: 228025 URL: http://svn.freebsd.org/changeset/base/228025 Log: Make proctstat -x output more readable. This also fixes the issue, spotted by mdf, with values that were printed as decimal and had hex prefixes. Discussed with: kib, rwatson MFC after: 2 weeks Modified: head/usr.bin/procstat/procstat_auxv.c Modified: head/usr.bin/procstat/procstat_auxv.c ============================================================================== --- head/usr.bin/procstat/procstat_auxv.c Sun Nov 27 15:49:46 2011 (r228024) +++ head/usr.bin/procstat/procstat_auxv.c Sun Nov 27 15:53:58 2011 (r228025) @@ -27,9 +27,12 @@ */ #include +#include #include #include +#include + #include #include #include @@ -38,11 +41,15 @@ #include #include -#include - #include "procstat.h" static Elf_Auxinfo auxv[256]; +static char prefix[256]; + +#define PRINT(name, spec, val) \ + printf("%s %-16s " #spec "\n", prefix, #name, (val)) +#define PRINT_UNKNOWN(type, val) \ + printf("%s %16ld %#lx\n", prefix, (long)type, (u_long)(val)) void procstat_auxv(struct kinfo_proc *kipp) @@ -51,7 +58,7 @@ procstat_auxv(struct kinfo_proc *kipp) size_t len, i; if (!hflag) - printf("%5s %-16s %-53s\n", "PID", "COMM", "AUXV"); + printf("%5s %-16s %-16s %-16s\n", "PID", "COMM", "AUXV", "VALUE"); name[0] = CTL_KERN; name[1] = KERN_PROC; @@ -63,124 +70,101 @@ procstat_auxv(struct kinfo_proc *kipp) warn("sysctl: kern.proc.auxv: %d: %d", kipp->ki_pid, errno); return; } - if (error < 0) + if (error < 0 || len == 0) return; - printf("%5d ", kipp->ki_pid); - printf("%-16s", kipp->ki_comm); if (len == 0) { printf(" -\n"); return; } + snprintf(prefix, sizeof(prefix), "%5d %-16s", kipp->ki_pid, + kipp->ki_comm); for (i = 0; i < len; i++) { switch(auxv[i].a_type) { case AT_NULL: - printf(" (%zu)\n", i + 1); return; case AT_IGNORE: - printf(" AT_IGNORE=0x%lu", - (unsigned long)auxv[i].a_un.a_val); break; case AT_EXECFD: - printf(" AT_EXECFD=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_EXECFD, %ld, auxv[i].a_un.a_val); break; case AT_PHDR: - printf(" AT_PHDR=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_PHDR, %p, auxv[i].a_un.a_ptr); break; case AT_PHENT: - printf(" AT_PHENT=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_PHENT, %ld, auxv[i].a_un.a_val); break; case AT_PHNUM: - printf(" AT_PHNUM=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_PHNUM, %ld, auxv[i].a_un.a_val); break; case AT_PAGESZ: - printf(" AT_PAGESZ=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_PAGESZ, %ld, auxv[i].a_un.a_val); break; case AT_BASE: - printf(" AT_BASE=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_BASE, %p, auxv[i].a_un.a_ptr); break; case AT_FLAGS: - printf(" AT_FLAGS=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_FLAGS, %#lx, (u_long)auxv[i].a_un.a_val); break; case AT_ENTRY: - printf(" AT_ENTRY=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_ENTRY, %p, auxv[i].a_un.a_ptr); break; #ifdef AT_NOTELF case AT_NOTELF: - printf(" AT_NOTELF=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_NOTELF, %ld, auxv[i].a_un.a_val); break; #endif #ifdef AT_UID case AT_UID: - printf(" AT_UID=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_UID, %ld, auxv[i].a_un.a_val); break; #endif #ifdef AT_EUID case AT_EUID: - printf(" AT_EUID=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_EUID, %ld, auxv[i].a_un.a_val); break; #endif #ifdef AT_GID case AT_GID: - printf(" AT_GID=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_GID, %ld, auxv[i].a_un.a_val); break; #endif #ifdef AT_EGID case AT_EGID: - printf(" AT_EGID=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_EGID, %ld, auxv[i].a_un.a_val); break; #endif case AT_EXECPATH: - printf(" AT_EXECPATH=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_EXECPATH, %p, auxv[i].a_un.a_ptr); break; case AT_CANARY: - printf(" AT_CANARY=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_CANARY, %p, auxv[i].a_un.a_ptr); break; case AT_CANARYLEN: - printf(" AT_CANARYLEN=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_CANARYLEN, %ld, auxv[i].a_un.a_val); break; case AT_OSRELDATE: - printf(" AT_OSRELDATE=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_OSRELDATE, %ld, auxv[i].a_un.a_val); break; case AT_NCPUS: - printf(" AT_NCPUS=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_NCPUS, %ld, auxv[i].a_un.a_val); break; case AT_PAGESIZES: - printf(" AT_PAGESIZES=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_PAGESIZES, %p, auxv[i].a_un.a_ptr); break; case AT_PAGESIZESLEN: - printf(" AT_PAGESIZESLEN=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_PAGESIZESLEN, %ld, auxv[i].a_un.a_val); break; case AT_STACKPROT: - printf(" AT_STACKPROT=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + if ((auxv[i].a_un.a_val & VM_PROT_EXECUTE) != 0) + PRINT(AT_STACKPROT, %s, "NONEXECUTABLE"); + else + PRINT(AT_STACKPROT, %s, "EXECUTABLE"); break; case AT_COUNT: - printf(" AT_COUNT=0x%lu", - (unsigned long)auxv[i].a_un.a_val); + PRINT(AT_COUNT, %ld, auxv[i].a_un.a_val); break; default: - printf(" %ld=0x%lu", (long)auxv[i].a_type, - (unsigned long)auxv[i].a_un.a_val); + PRINT_UNKNOWN(auxv[i].a_type, auxv[i].a_un.a_val); break; } } From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 16:17:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6533F1065670; Sun, 27 Nov 2011 16:17:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 550238FC19; Sun, 27 Nov 2011 16:17:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARGHHTh046674; Sun, 27 Nov 2011 16:17:17 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARGHHOf046672; Sun, 27 Nov 2011 16:17:17 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111271617.pARGHHOf046672@svn.freebsd.org> From: Marius Strobl Date: Sun, 27 Nov 2011 16:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228026 - head/sys/modules/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 16:17:17 -0000 Author: marius Date: Sun Nov 27 16:17:17 2011 New Revision: 228026 URL: http://svn.freebsd.org/changeset/base/228026 Log: Compile cam_machdep.c if it exists, missed in r228022. Modified: head/sys/modules/cam/Makefile Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Sun Nov 27 15:53:58 2011 (r228025) +++ head/sys/modules/cam/Makefile Sun Nov 27 16:17:17 2011 (r228026) @@ -16,8 +16,11 @@ SRCS+= opt_pt.h SRCS+= opt_sa.h SRCS+= opt_ses.h SRCS+= device_if.h bus_if.h vnode_if.h -SRCS+= cam.c cam_periph.c cam_queue.c -SRCS+= cam_sim.c cam_xpt.c +SRCS+= cam.c +.if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c) +SRCS+= cam_machdep.c +.endif +SRCS+= cam_periph.c cam_queue.c cam_sim.c cam_xpt.c SRCS+= scsi_all.c scsi_cd.c scsi_ch.c SRCS+= scsi_da.c SRCS+= scsi_pass.c @@ -32,7 +35,7 @@ SRCS+= ata_all.c SRCS+= ata_xpt.c SRCS+= ata_da.c .if exists($S/${MACHINE}/${MACHINE}/ata_machdep.c) -SRCS+= ata_machdep.c +SRCS+= ata_machdep.c .endif SRCS+= ata_pmp.c From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 16:22:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07FB11065672; Sun, 27 Nov 2011 16:22:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1E2C8FC14; Sun, 27 Nov 2011 16:22:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARGMJ5f046875; Sun, 27 Nov 2011 16:22:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARGMJdC046871; Sun, 27 Nov 2011 16:22:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111271622.pARGMJdC046871@svn.freebsd.org> From: Marius Strobl Date: Sun, 27 Nov 2011 16:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228027 - in head/sys: cam pc98/include pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 16:22:20 -0000 Author: marius Date: Sun Nov 27 16:22:19 2011 New Revision: 228027 URL: http://svn.freebsd.org/changeset/base/228027 Log: Move the scsi_da_bios_params() prototype from pc98_machdep.h to md_var.h where the prototype for pc98_ata_disk_firmware_geom_adjust() also lives in order to avoid an #ifdef'ed include in cam(4). Modified: head/sys/cam/cam_xpt.c head/sys/pc98/include/md_var.h head/sys/pc98/pc98/pc98_machdep.h Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Nov 27 16:17:17 2011 (r228026) +++ head/sys/cam/cam_xpt.c Sun Nov 27 16:22:19 2011 (r228027) @@ -48,10 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef PC98 -#include /* geometry translation */ -#endif - #include #include #include Modified: head/sys/pc98/include/md_var.h ============================================================================== --- head/sys/pc98/include/md_var.h Sun Nov 27 16:17:17 2011 (r228026) +++ head/sys/pc98/include/md_var.h Sun Nov 27 16:22:19 2011 (r228027) @@ -39,10 +39,10 @@ extern int need_pre_dma_flush; extern int need_post_dma_flush; /* - * The ad driver maps the IDE disk's actual geometry to the firmware's - * notion of geometry. However, PC98 machines need to do something - * different sometimes, so override the hook so we can do so. + * The geometry of disks might need adjustment on PC98 machines. */ +struct ccb_calc_geometry; +int scsi_da_bios_params(struct ccb_calc_geometry *); struct disk; void pc98_ata_disk_firmware_geom_adjust(struct disk *); #define ata_disk_firmware_geom_adjust(disk) \ Modified: head/sys/pc98/pc98/pc98_machdep.h ============================================================================== --- head/sys/pc98/pc98/pc98_machdep.h Sun Nov 27 16:17:17 2011 (r228026) +++ head/sys/pc98/pc98/pc98_machdep.h Sun Nov 27 16:22:19 2011 (r228027) @@ -33,9 +33,6 @@ void pc98_init_dmac(void); unsigned int pc98_getmemsize(unsigned *, unsigned *); -struct ccb_calc_geometry; -int scsi_da_bios_params(struct ccb_calc_geometry *); - #define PC98_VECTOR_SIZE (0x400) #define PC98_SYSTEM_PARAMETER_SIZE (0x240) #define PC98_SAVE_AREA (0xa1000) From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 16:50:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ADA0106564A; Sun, 27 Nov 2011 16:50:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0E18FC0A; Sun, 27 Nov 2011 16:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARGoEcN047776; Sun, 27 Nov 2011 16:50:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARGoEaW047774; Sun, 27 Nov 2011 16:50:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111271650.pARGoEaW047774@svn.freebsd.org> From: Marius Strobl Date: Sun, 27 Nov 2011 16:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228028 - head/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 16:50:14 -0000 Author: marius Date: Sun Nov 27 16:50:13 2011 New Revision: 228028 URL: http://svn.freebsd.org/changeset/base/228028 Log: - Based on a report on sparc64@ move V245 to the list of known working machines. - Mention that V480 with broken centerplanes have a chance of working with the WAR in the upcoming 8.3-RELEASE and 9.0-RELEASE. MFC after: 3 days Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 27 16:22:19 2011 (r228027) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 27 16:50:13 2011 (r228028) @@ -593,6 +593,10 @@ + &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + + + &sun.fire; V250 @@ -603,7 +607,8 @@ &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE) + which support first appeared in 7.3-RELEASE and 8.1-RELEASE, + other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) @@ -629,10 +634,6 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) - - - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ CPU-configurations only) From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 16:56:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05142106566C; Sun, 27 Nov 2011 16:56:02 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8FE38FC0A; Sun, 27 Nov 2011 16:56:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARGu13N048004; Sun, 27 Nov 2011 16:56:01 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARGu1K5048002; Sun, 27 Nov 2011 16:56:01 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201111271656.pARGu1K5048002@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 27 Nov 2011 16:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228029 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 16:56:02 -0000 Author: trociny Date: Sun Nov 27 16:56:01 2011 New Revision: 228029 URL: http://svn.freebsd.org/changeset/base/228029 Log: In sysctl_kern_proc_auxv the process was released too early: we still need to hold it when checking process sv_flags. MFC after: 2 weeks Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 27 16:50:13 2011 (r228028) +++ head/sys/kern/kern_proc.c Sun Nov 27 16:56:01 2011 (r228029) @@ -1768,7 +1768,7 @@ sysctl_kern_proc_auxv(SYSCTL_HANDLER_ARG int *name = (int*) arg1; u_int namelen = arg2; struct proc *p; - size_t vsize; + size_t vsize, size; char **auxv; int error; @@ -1793,16 +1793,18 @@ sysctl_kern_proc_auxv(SYSCTL_HANDLER_ARG _PHOLD(p); PROC_UNLOCK(p); error = get_proc_vector(curthread, p, &auxv, &vsize, PROC_AUX); - PRELE(p); if (error == 0) { #ifdef COMPAT_FREEBSD32 if (SV_PROC_FLAG(p, SV_ILP32) != 0) - error = SYSCTL_OUT(req, auxv, vsize * - sizeof(Elf32_Auxinfo)); + size = vsize * sizeof(Elf32_Auxinfo); else #endif - error = SYSCTL_OUT(req, auxv, vsize * sizeof(Elf_Auxinfo)); + size = vsize * sizeof(Elf_Auxinfo); + PRELE(p); + error = SYSCTL_OUT(req, auxv, size); free(auxv, M_TEMP); + } else { + PRELE(p); } return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 17:05:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 124E5106564A; Sun, 27 Nov 2011 17:05:27 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC7828FC19; Sun, 27 Nov 2011 17:05:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARH5QF0048320; Sun, 27 Nov 2011 17:05:26 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARH5Qbv048318; Sun, 27 Nov 2011 17:05:26 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201111271705.pARH5Qbv048318@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 27 Nov 2011 17:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228030 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 17:05:27 -0000 Author: trociny Date: Sun Nov 27 17:05:26 2011 New Revision: 228030 URL: http://svn.freebsd.org/changeset/base/228030 Log: Add sysctl to retrieve ps_strings structure location of another process. Suggested by: kib Reviewed by: kib Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Nov 27 16:56:01 2011 (r228029) +++ head/sys/kern/kern_proc.c Sun Nov 27 17:05:26 2011 (r228030) @@ -2434,6 +2434,59 @@ sysctl_kern_proc_rlimit(SYSCTL_HANDLER_A return (error); } +/* + * This sysctl allows a process to retrieve ps_strings structure location of + * another process. + */ +static int +sysctl_kern_proc_ps_strings(SYSCTL_HANDLER_ARGS) +{ + int *name = (int*) arg1; + u_int namelen = arg2; + struct proc *p; + vm_offset_t ps_strings; + int error; +#ifdef COMPAT_FREEBSD32 + uint32_t ps_strings32; +#endif + + if (namelen != 1) + return (EINVAL); + + p = pfind((pid_t)name[0]); + if (p == NULL) + return (ESRCH); + if (p->p_flag & P_WEXIT) { + PROC_UNLOCK(p); + return (ESRCH); + } + if ((error = p_cansee(curthread, p)) != 0) { + PROC_UNLOCK(p); + return (error); + } + if ((p->p_flag & P_SYSTEM) != 0) { + PROC_UNLOCK(p); + return (0); + } +#ifdef COMPAT_FREEBSD32 + if ((req->flags & SCTL_MASK32) != 0) { + /* + * We return 0 if the 32 bit emulation request is for a 64 bit + * process. + */ + ps_strings32 = SV_PROC_FLAG(p, SV_ILP32) != 0 ? + PTROUT(p->p_sysent->sv_psstrings) : 0; + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &ps_strings32, sizeof(ps_strings32)); + return (error); + } +#endif + ps_strings = p->p_sysent->sv_psstrings; + PROC_UNLOCK(p); + error = SYSCTL_OUT(req, &ps_strings, sizeof(ps_strings)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2532,3 +2585,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_RLIMIT, rlimit, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_rlimit, "Process resource limits"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_PS_STRINGS, ps_strings, + CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + sysctl_kern_proc_ps_strings, "Process ps_strings location"); From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 17:51:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF977106566B; Sun, 27 Nov 2011 17:51:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955F08FC14; Sun, 27 Nov 2011 17:51:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARHpDC3049717; Sun, 27 Nov 2011 17:51:13 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARHpDdr049714; Sun, 27 Nov 2011 17:51:13 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111271751.pARHpDdr049714@svn.freebsd.org> From: Michael Tuexen Date: Sun, 27 Nov 2011 17:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228031 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 17:51:13 -0000 Author: tuexen Date: Sun Nov 27 17:51:13 2011 New Revision: 228031 URL: http://svn.freebsd.org/changeset/base/228031 Log: Fix a warning reported by arundel@. Fix a bug where the parameter length of a supported address types parameter is set to a wrong value if the kernel is built with with either INET or INET6, but not both. MFC after: 3 days. Modified: head/sys/netinet/sctp_header.h head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Sun Nov 27 17:05:26 2011 (r228030) +++ head/sys/netinet/sctp_header.h Sun Nov 27 17:51:13 2011 (r228031) @@ -81,8 +81,7 @@ struct sctp_host_name_param { /* supported address type */ struct sctp_supported_addr_param { struct sctp_paramhdr ph;/* type=SCTP_SUPPORTED_ADDRTYPE */ - uint16_t addr_type[SCTP_ARRAY_MIN_LEN]; /* array of supported address - * types */ + uint16_t addr_type[2]; /* array of supported address types */ } SCTP_PACKED; /* ECN parameter */ Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Nov 27 17:05:26 2011 (r228030) +++ head/sys/netinet/sctp_output.c Sun Nov 27 17:51:13 2011 (r228031) @@ -4680,24 +4680,24 @@ sctp_send_initiate(struct sctp_inpcb *in #ifdef INET6 #ifdef INET /* we support 2 types: IPv4/IPv6 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint16_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + 2 * sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); sup_addr->addr_type[1] = htons(SCTP_IPV6_ADDRESS); #else /* we support 1 type: IPv6 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV6_ADDRESS); sup_addr->addr_type[1] = htons(0); /* this is the padding */ #endif #else /* we support 1 type: IPv4 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); sup_addr->addr_type[1] = htons(0); /* this is the padding */ #endif - SCTP_BUF_LEN(m) += sizeof(*sup_addr) + sizeof(uint16_t); + SCTP_BUF_LEN(m) += sizeof(struct sctp_supported_addr_param); /* adaptation layer indication parameter */ - ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(*sup_addr) + sizeof(uint16_t)); + ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(struct sctp_supported_addr_param)); ali->ph.param_type = htons(SCTP_ULP_ADAPTATION); ali->ph.param_length = htons(sizeof(*ali)); ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator); From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 18:49:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FF0610657FE; Sun, 27 Nov 2011 18:49:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06C258FC0A; Sun, 27 Nov 2011 18:49:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARInGrh051587; Sun, 27 Nov 2011 18:49:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARInGkY051585; Sun, 27 Nov 2011 18:49:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111271849.pARInGkY051585@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 Nov 2011 18:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228032 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 18:49:21 -0000 Author: kib Date: Sun Nov 27 18:49:16 2011 New Revision: 228032 URL: http://svn.freebsd.org/changeset/base/228032 Log: MFC r227485: To limit amount of the kernel memory allocated, and to optimize the iteration over the fdsets, kern_select() limits the length of the fdsets copied in by the last valid file descriptor index. If any bit is set in a mask above the limit, current implementation ignores the filedescriptor, instead of returning EBADF. Fix the issue by scanning the tails of fdset before entering the select loop and returning EBADF if any bit above last valid filedescriptor index is set. The performance impact of the additional check is only imposed on the (somewhat) buggy applications that pass bad file descriptors to select(2) or pselect(2). PR: kern/155606, kern/162379 Approved by: re (bz) Modified: stable/9/sys/kern/sys_generic.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sys_generic.c ============================================================================== --- stable/9/sys/kern/sys_generic.c Sun Nov 27 17:51:13 2011 (r228031) +++ stable/9/sys/kern/sys_generic.c Sun Nov 27 18:49:16 2011 (r228032) @@ -831,6 +831,54 @@ sys_select(struct thread *td, struct sel NFDBITS)); } +/* + * In the unlikely case when user specified n greater then the last + * open file descriptor, check that no bits are set after the last + * valid fd. We must return EBADF if any is set. + * + * There are applications that rely on the behaviour. + * + * nd is fd_lastfile + 1. + */ +static int +select_check_badfd(fd_set *fd_in, int nd, int ndu, int abi_nfdbits) +{ + char *addr, *oaddr; + int b, i, res; + uint8_t bits; + + if (nd >= ndu || fd_in == NULL) + return (0); + + oaddr = NULL; + bits = 0; /* silence gcc */ + for (i = nd; i < ndu; i++) { + b = i / NBBY; +#if BYTE_ORDER == LITTLE_ENDIAN + addr = (char *)fd_in + b; +#else + addr = (char *)fd_in; + if (abi_nfdbits == NFDBITS) { + addr += rounddown(b, sizeof(fd_mask)) + + sizeof(fd_mask) - 1 - b % sizeof(fd_mask); + } else { + addr += rounddown(b, sizeof(uint32_t)) + + sizeof(uint32_t) - 1 - b % sizeof(uint32_t); + } +#endif + if (addr != oaddr) { + res = fubyte(addr); + if (res == -1) + return (EFAULT); + oaddr = addr; + bits = res; + } + if ((bits & (1 << (i % NBBY))) != 0) + return (EBADF); + } + return (0); +} + int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits) @@ -845,14 +893,26 @@ kern_select(struct thread *td, int nd, f fd_mask s_selbits[howmany(2048, NFDBITS)]; fd_mask *ibits[3], *obits[3], *selbits, *sbp; struct timeval atv, rtv, ttv; - int error, timo; + int error, lf, ndu, timo; u_int nbufbytes, ncpbytes, ncpubytes, nfdbits; if (nd < 0) return (EINVAL); fdp = td->td_proc->p_fd; - if (nd > fdp->fd_lastfile + 1) - nd = fdp->fd_lastfile + 1; + ndu = nd; + lf = fdp->fd_lastfile; + if (nd > lf + 1) + nd = lf + 1; + + error = select_check_badfd(fd_in, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ou, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ex, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); /* * Allocate just enough bits for the non-null fd_sets. Use the From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 18:56:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66327106564A; Sun, 27 Nov 2011 18:56:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 553D68FC13; Sun, 27 Nov 2011 18:56:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARIu4dg051847; Sun, 27 Nov 2011 18:56:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARIu478051845; Sun, 27 Nov 2011 18:56:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111271856.pARIu478051845@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 Nov 2011 18:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228033 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 18:56:04 -0000 Author: kib Date: Sun Nov 27 18:56:04 2011 New Revision: 228033 URL: http://svn.freebsd.org/changeset/base/228033 Log: MFC r227952: Fix a race between getvnode() dereferencing half-constructed file and dupfdopen(). Approved by: re (bz) Modified: stable/9/sys/kern/vfs_syscalls.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Sun Nov 27 18:49:16 2011 (r228032) +++ stable/9/sys/kern/vfs_syscalls.c Sun Nov 27 18:56:04 2011 (r228033) @@ -4342,7 +4342,20 @@ getvnode(struct filedesc *fdp, int fd, c fp = fp_fromcap; } #endif /* CAPABILITIES */ - if (fp->f_vnode == NULL) { + + /* + * The file could be not of the vnode type, or it may be not + * yet fully initialized, in which case the f_vnode pointer + * may be set, but f_ops is still badfileops. E.g., + * devfs_open() transiently create such situation to + * facilitate csw d_fdopen(). + * + * Dupfdopen() handling in kern_openat() installs the + * half-baked file into the process descriptor table, allowing + * other thread to dereference it. Guard against the race by + * checking f_ops. + */ + if (fp->f_vnode == NULL || fp->f_ops == &badfileops) { fdrop(fp, curthread); return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:00:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9145A1065678; Sun, 27 Nov 2011 19:00:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 809868FC19; Sun, 27 Nov 2011 19:00:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJ0qUx052059; Sun, 27 Nov 2011 19:00:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJ0qw9052057; Sun, 27 Nov 2011 19:00:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111271900.pARJ0qw9052057@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 Nov 2011 19:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228034 - releng/9.0/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:00:52 -0000 Author: kib Date: Sun Nov 27 19:00:52 2011 New Revision: 228034 URL: http://svn.freebsd.org/changeset/base/228034 Log: MFC r227485: To limit amount of the kernel memory allocated, and to optimize the iteration over the fdsets, kern_select() limits the length of the fdsets copied in by the last valid file descriptor index. If any bit is set in a mask above the limit, current implementation ignores the filedescriptor, instead of returning EBADF. Fix the issue by scanning the tails of fdset before entering the select loop and returning EBADF if any bit above last valid filedescriptor index is set. The performance impact of the additional check is only imposed on the (somewhat) buggy applications that pass bad file descriptors to select(2) or pselect(2). PR: kern/155606, kern/162379 Approved by: re (bz) Modified: releng/9.0/sys/kern/sys_generic.c Directory Properties: releng/9.0/sys/ (props changed) Modified: releng/9.0/sys/kern/sys_generic.c ============================================================================== --- releng/9.0/sys/kern/sys_generic.c Sun Nov 27 18:56:04 2011 (r228033) +++ releng/9.0/sys/kern/sys_generic.c Sun Nov 27 19:00:52 2011 (r228034) @@ -831,6 +831,54 @@ sys_select(struct thread *td, struct sel NFDBITS)); } +/* + * In the unlikely case when user specified n greater then the last + * open file descriptor, check that no bits are set after the last + * valid fd. We must return EBADF if any is set. + * + * There are applications that rely on the behaviour. + * + * nd is fd_lastfile + 1. + */ +static int +select_check_badfd(fd_set *fd_in, int nd, int ndu, int abi_nfdbits) +{ + char *addr, *oaddr; + int b, i, res; + uint8_t bits; + + if (nd >= ndu || fd_in == NULL) + return (0); + + oaddr = NULL; + bits = 0; /* silence gcc */ + for (i = nd; i < ndu; i++) { + b = i / NBBY; +#if BYTE_ORDER == LITTLE_ENDIAN + addr = (char *)fd_in + b; +#else + addr = (char *)fd_in; + if (abi_nfdbits == NFDBITS) { + addr += rounddown(b, sizeof(fd_mask)) + + sizeof(fd_mask) - 1 - b % sizeof(fd_mask); + } else { + addr += rounddown(b, sizeof(uint32_t)) + + sizeof(uint32_t) - 1 - b % sizeof(uint32_t); + } +#endif + if (addr != oaddr) { + res = fubyte(addr); + if (res == -1) + return (EFAULT); + oaddr = addr; + bits = res; + } + if ((bits & (1 << (i % NBBY))) != 0) + return (EBADF); + } + return (0); +} + int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits) @@ -845,14 +893,26 @@ kern_select(struct thread *td, int nd, f fd_mask s_selbits[howmany(2048, NFDBITS)]; fd_mask *ibits[3], *obits[3], *selbits, *sbp; struct timeval atv, rtv, ttv; - int error, timo; + int error, lf, ndu, timo; u_int nbufbytes, ncpbytes, ncpubytes, nfdbits; if (nd < 0) return (EINVAL); fdp = td->td_proc->p_fd; - if (nd > fdp->fd_lastfile + 1) - nd = fdp->fd_lastfile + 1; + ndu = nd; + lf = fdp->fd_lastfile; + if (nd > lf + 1) + nd = lf + 1; + + error = select_check_badfd(fd_in, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ou, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ex, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); /* * Allocate just enough bits for the non-null fd_sets. Use the From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:02:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 837C81065672; Sun, 27 Nov 2011 19:02:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 733CA8FC14; Sun, 27 Nov 2011 19:02:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJ2I85052155; Sun, 27 Nov 2011 19:02:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJ2IIk052153; Sun, 27 Nov 2011 19:02:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111271902.pARJ2IIk052153@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 Nov 2011 19:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228035 - releng/9.0/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:02:19 -0000 Author: kib Date: Sun Nov 27 19:02:18 2011 New Revision: 228035 URL: http://svn.freebsd.org/changeset/base/228035 Log: MFC r227952: Fix a race between getvnode() dereferencing half-constructed file and dupfdopen(). Approved by: re (bz) Modified: releng/9.0/sys/kern/vfs_syscalls.c Directory Properties: releng/9.0/sys/ (props changed) Modified: releng/9.0/sys/kern/vfs_syscalls.c ============================================================================== --- releng/9.0/sys/kern/vfs_syscalls.c Sun Nov 27 19:00:52 2011 (r228034) +++ releng/9.0/sys/kern/vfs_syscalls.c Sun Nov 27 19:02:18 2011 (r228035) @@ -4342,7 +4342,20 @@ getvnode(struct filedesc *fdp, int fd, c fp = fp_fromcap; } #endif /* CAPABILITIES */ - if (fp->f_vnode == NULL) { + + /* + * The file could be not of the vnode type, or it may be not + * yet fully initialized, in which case the f_vnode pointer + * may be set, but f_ops is still badfileops. E.g., + * devfs_open() transiently create such situation to + * facilitate csw d_fdopen(). + * + * Dupfdopen() handling in kern_openat() installs the + * half-baked file into the process descriptor table, allowing + * other thread to dereference it. Guard against the race by + * checking f_ops. + */ + if (fp->f_vnode == NULL || fp->f_ops == &badfileops) { fdrop(fp, curthread); return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:09:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5509C1065673; Sun, 27 Nov 2011 19:09:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E618FC0A; Sun, 27 Nov 2011 19:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJ9Wcc052445; Sun, 27 Nov 2011 19:09:32 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJ9WhH052442; Sun, 27 Nov 2011 19:09:32 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111271909.pARJ9WhH052442@svn.freebsd.org> From: Michael Tuexen Date: Sun, 27 Nov 2011 19:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228036 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:09:32 -0000 Author: tuexen Date: Sun Nov 27 19:09:31 2011 New Revision: 228036 URL: http://svn.freebsd.org/changeset/base/228036 Log: MFC r228031: Fix a warning reported by arundel@. Fix a bug where the parameter length of a supported address types parameter is set to a wrong value if the kernel is built with with either INET or INET6, but not both. Approved by: re@ Modified: stable/9/sys/netinet/sctp_header.h stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/sctp_header.h ============================================================================== --- stable/9/sys/netinet/sctp_header.h Sun Nov 27 19:02:18 2011 (r228035) +++ stable/9/sys/netinet/sctp_header.h Sun Nov 27 19:09:31 2011 (r228036) @@ -81,8 +81,7 @@ struct sctp_host_name_param { /* supported address type */ struct sctp_supported_addr_param { struct sctp_paramhdr ph;/* type=SCTP_SUPPORTED_ADDRTYPE */ - uint16_t addr_type[SCTP_ARRAY_MIN_LEN]; /* array of supported address - * types */ + uint16_t addr_type[2]; /* array of supported address types */ } SCTP_PACKED; /* ECN parameter */ Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Sun Nov 27 19:02:18 2011 (r228035) +++ stable/9/sys/netinet/sctp_output.c Sun Nov 27 19:09:31 2011 (r228036) @@ -4668,24 +4668,24 @@ sctp_send_initiate(struct sctp_inpcb *in #ifdef INET6 #ifdef INET /* we support 2 types: IPv4/IPv6 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint16_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + 2 * sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); sup_addr->addr_type[1] = htons(SCTP_IPV6_ADDRESS); #else /* we support 1 type: IPv6 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV6_ADDRESS); sup_addr->addr_type[1] = htons(0); /* this is the padding */ #endif #else /* we support 1 type: IPv4 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); sup_addr->addr_type[1] = htons(0); /* this is the padding */ #endif - SCTP_BUF_LEN(m) += sizeof(*sup_addr) + sizeof(uint16_t); + SCTP_BUF_LEN(m) += sizeof(struct sctp_supported_addr_param); /* adaptation layer indication parameter */ - ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(*sup_addr) + sizeof(uint16_t)); + ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(struct sctp_supported_addr_param)); ali->ph.param_type = htons(SCTP_ULP_ADAPTATION); ali->ph.param_length = htons(sizeof(*ali)); ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator); From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:13:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3374106564A; Sun, 27 Nov 2011 19:13:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A86908FC0C; Sun, 27 Nov 2011 19:13:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJDjCJ052643; Sun, 27 Nov 2011 19:13:45 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJDjG9052640; Sun, 27 Nov 2011 19:13:45 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111271913.pARJDjG9052640@svn.freebsd.org> From: Michael Tuexen Date: Sun, 27 Nov 2011 19:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228037 - releng/9.0/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:13:46 -0000 Author: tuexen Date: Sun Nov 27 19:13:45 2011 New Revision: 228037 URL: http://svn.freebsd.org/changeset/base/228037 Log: MFC r228031: Fix a warning reported by arundel@. Fix a bug where the parameter length of a supported address types parameter is set to a wrong value if the kernel is built with with either INET or INET6, but not both. Approved by: re@ Modified: releng/9.0/sys/netinet/sctp_header.h releng/9.0/sys/netinet/sctp_output.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/amd64/include/xen/ (props changed) releng/9.0/sys/boot/ (props changed) releng/9.0/sys/boot/i386/efi/ (props changed) releng/9.0/sys/boot/ia64/efi/ (props changed) releng/9.0/sys/boot/ia64/ski/ (props changed) releng/9.0/sys/boot/powerpc/boot1.chrp/ (props changed) releng/9.0/sys/boot/powerpc/ofw/ (props changed) releng/9.0/sys/cddl/contrib/opensolaris/ (props changed) releng/9.0/sys/conf/ (props changed) releng/9.0/sys/contrib/dev/acpica/ (props changed) releng/9.0/sys/contrib/octeon-sdk/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) releng/9.0/sys/contrib/x86emu/ (props changed) Modified: releng/9.0/sys/netinet/sctp_header.h ============================================================================== --- releng/9.0/sys/netinet/sctp_header.h Sun Nov 27 19:09:31 2011 (r228036) +++ releng/9.0/sys/netinet/sctp_header.h Sun Nov 27 19:13:45 2011 (r228037) @@ -81,8 +81,7 @@ struct sctp_host_name_param { /* supported address type */ struct sctp_supported_addr_param { struct sctp_paramhdr ph;/* type=SCTP_SUPPORTED_ADDRTYPE */ - uint16_t addr_type[SCTP_ARRAY_MIN_LEN]; /* array of supported address - * types */ + uint16_t addr_type[2]; /* array of supported address types */ } SCTP_PACKED; /* ECN parameter */ Modified: releng/9.0/sys/netinet/sctp_output.c ============================================================================== --- releng/9.0/sys/netinet/sctp_output.c Sun Nov 27 19:09:31 2011 (r228036) +++ releng/9.0/sys/netinet/sctp_output.c Sun Nov 27 19:13:45 2011 (r228037) @@ -4668,24 +4668,24 @@ sctp_send_initiate(struct sctp_inpcb *in #ifdef INET6 #ifdef INET /* we support 2 types: IPv4/IPv6 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint16_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + 2 * sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); sup_addr->addr_type[1] = htons(SCTP_IPV6_ADDRESS); #else /* we support 1 type: IPv6 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV6_ADDRESS); sup_addr->addr_type[1] = htons(0); /* this is the padding */ #endif #else /* we support 1 type: IPv4 */ - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); sup_addr->addr_type[1] = htons(0); /* this is the padding */ #endif - SCTP_BUF_LEN(m) += sizeof(*sup_addr) + sizeof(uint16_t); + SCTP_BUF_LEN(m) += sizeof(struct sctp_supported_addr_param); /* adaptation layer indication parameter */ - ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(*sup_addr) + sizeof(uint16_t)); + ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(struct sctp_supported_addr_param)); ali->ph.param_type = htons(SCTP_ULP_ADAPTATION); ali->ph.param_length = htons(sizeof(*ali)); ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator); From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:36:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2000D1065672; Sun, 27 Nov 2011 19:36:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC5A8FC14; Sun, 27 Nov 2011 19:36:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJaaYt053391; Sun, 27 Nov 2011 19:36:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJaakd053389; Sun, 27 Nov 2011 19:36:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111271936.pARJaakd053389@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 Nov 2011 19:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228038 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:36:37 -0000 Author: kib Date: Sun Nov 27 19:36:36 2011 New Revision: 228038 URL: http://svn.freebsd.org/changeset/base/228038 Log: MFC r227485: To limit amount of the kernel memory allocated, and to optimize the iteration over the fdsets, kern_select() limits the length of the fdsets copied in by the last valid file descriptor index. If any bit is set in a mask above the limit, current implementation ignores the filedescriptor, instead of returning EBADF. Fix the issue by scanning the tails of fdset before entering the select loop and returning EBADF if any bit above last valid filedescriptor index is set. The performance impact of the additional check is only imposed on the (somewhat) buggy applications that pass bad file descriptors to select(2) or pselect(2). PR: kern/155606, kern/162379 Modified: stable/8/sys/kern/sys_generic.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/sys_generic.c ============================================================================== --- stable/8/sys/kern/sys_generic.c Sun Nov 27 19:13:45 2011 (r228037) +++ stable/8/sys/kern/sys_generic.c Sun Nov 27 19:36:36 2011 (r228038) @@ -829,6 +829,54 @@ select(struct thread *td, struct select_ NFDBITS)); } +/* + * In the unlikely case when user specified n greater then the last + * open file descriptor, check that no bits are set after the last + * valid fd. We must return EBADF if any is set. + * + * There are applications that rely on the behaviour. + * + * nd is fd_lastfile + 1. + */ +static int +select_check_badfd(fd_set *fd_in, int nd, int ndu, int abi_nfdbits) +{ + char *addr, *oaddr; + int b, i, res; + uint8_t bits; + + if (nd >= ndu || fd_in == NULL) + return (0); + + oaddr = NULL; + bits = 0; /* silence gcc */ + for (i = nd; i < ndu; i++) { + b = i / NBBY; +#if BYTE_ORDER == LITTLE_ENDIAN + addr = (char *)fd_in + b; +#else + addr = (char *)fd_in; + if (abi_nfdbits == NFDBITS) { + addr += rounddown(b, sizeof(fd_mask)) + + sizeof(fd_mask) - 1 - b % sizeof(fd_mask); + } else { + addr += rounddown(b, sizeof(uint32_t)) + + sizeof(uint32_t) - 1 - b % sizeof(uint32_t); + } +#endif + if (addr != oaddr) { + res = fubyte(addr); + if (res == -1) + return (EFAULT); + oaddr = addr; + bits = res; + } + if ((bits & (1 << (i % NBBY))) != 0) + return (EBADF); + } + return (0); +} + int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits) @@ -843,14 +891,26 @@ kern_select(struct thread *td, int nd, f fd_mask s_selbits[howmany(2048, NFDBITS)]; fd_mask *ibits[3], *obits[3], *selbits, *sbp; struct timeval atv, rtv, ttv; - int error, timo; + int error, lf, ndu, timo; u_int nbufbytes, ncpbytes, ncpubytes, nfdbits; if (nd < 0) return (EINVAL); fdp = td->td_proc->p_fd; - if (nd > fdp->fd_lastfile + 1) - nd = fdp->fd_lastfile + 1; + ndu = nd; + lf = fdp->fd_lastfile; + if (nd > lf + 1) + nd = lf + 1; + + error = select_check_badfd(fd_in, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ou, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ex, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); /* * Allocate just enough bits for the non-null fd_sets. Use the From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:44:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A0A2106566B; Sun, 27 Nov 2011 19:44:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38BDB8FC0C; Sun, 27 Nov 2011 19:44:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJiG22053660; Sun, 27 Nov 2011 19:44:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJiG5p053657; Sun, 27 Nov 2011 19:44:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111271944.pARJiG5p053657@svn.freebsd.org> From: Robert Watson Date: Sun, 27 Nov 2011 19:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228039 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:44:16 -0000 Author: rwatson Date: Sun Nov 27 19:44:15 2011 New Revision: 228039 URL: http://svn.freebsd.org/changeset/base/228039 Log: Add an introductory Capsicum man page providing a high-level description of its mechanisms, pointing at other pertinent man pages, and cautioning about the experimental status of Capsicum in FreeBSD. MFC after: 3 days Sponsored by: Google, Inc. Added: head/share/man/man4/capsicum.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Nov 27 19:36:36 2011 (r228038) +++ head/share/man/man4/Makefile Sun Nov 27 19:44:15 2011 (r228039) @@ -67,6 +67,7 @@ MAN= aac.4 \ bt.4 \ bwi.4 \ bwn.4 \ + capsicum.4 \ cardbus.4 \ carp.4 \ cas.4 \ Added: head/share/man/man4/capsicum.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/capsicum.4 Sun Nov 27 19:44:15 2011 (r228039) @@ -0,0 +1,120 @@ +.\" +.\" Copyright (c) 2011 Robert N. M. Watson +.\" Copyright (c) 2011 Jonathan Anderson +.\" 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, 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 20, 2011 +.Dt CAPSICUM 4 +.Os +.Sh NAME +.Nm Capsicum +.Nd lightweight OS capability and sandbox framework +.Sh SYNOPSIS +.Cd "options CAPABILITY_MODE" +.Cd "options CAPABILITIES" +.Cd "options PROCDESC" +.Sh DESCRIPTION +.Nm +is a lightweight OS capability and sandbox framework implementing a hybrid +capability system model. +.Nm +can be used for application and library compartmentalisation, the +decomposition of larger bodies of software into isolated (sandboxed) +components in order to implement security policies and limit the impact of +software vulnerabilities. +.Pp +.Nm +provides two core kernel primitives: +.Bl -tag -width indent +.It capability mode +A process mode, entered by invoking +.Xr cap_enter 2 , +in which access to global OS namespaces (such as the file system and PID +namespaces) is restricted; only explicitly delegated rights, referenced by +memory mappings or file descriptors, may be used. +Once set, the flag is inherited by future children proceses, and may not be +cleared. +.It capabilities +File descriptors that wrap other file descriptors, masking operations that can +be called on them; for example, a file descriptor returned by +.Xr open 2 +may be refined using +.Xr cap_new 2 +so that only +.Xr read 2 +and +.Xr write 2 +can be called, but not +.Xr fchmod 2 . +.El +.Pp +In some cases, +.Nm +requires use of alternatives to traditional POSIX APIs in order to name +objects using capabilities rather than global namespaces: +.Bl -tag -width indent +.It process descriptors +File descriptors representing processes, allowing parent processes to manage +child processes without requiring access to the PID namespace. +.It anonymous shared memory +An extension to the POSIX shared memory API to support anonymous swap objects +associated with file descriptors. +.El +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr cap_getmode 2 , +.Xr cap_getrights 2 , +.Xr cap_new 2 , +.Xr fchmod 2 , +.Xr open 2 , +.Xr pdfork 2 , +.Xr pdgetpid 2 , +.Xr pdkill 2 , +.Xr pdwait4 2 , +.Xr read 2 , +.Xr shm_open 2 , +.Xr write 2 +.Sh HISTORY +.Nm +first appeared in +.Fx 9.0 , +and was developed at the University of Cambridge. +.Sh AUTHORS +.Nm +was developed by +.An -nosplit +.An "Robert Watson" Aq rwatson@FreeBSD.org +and +.An "Jonathan Anderson" Aq jonathan@FreeBSD.org +at the University of Cambridge, and +.An "Ben Laurie" Aq benl@FreeBSD.org +and +.An "Kris Kennaway" Aq kris@FreeBSD.org +at Google, Inc. +.Sh BUGS +.Nm +is considered experimental in +.Fx . From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 19:45:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B646D106564A; Sun, 27 Nov 2011 19:45:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5E408FC0A; Sun, 27 Nov 2011 19:45:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARJjfbi053747; Sun, 27 Nov 2011 19:45:41 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARJjfqQ053744; Sun, 27 Nov 2011 19:45:41 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111271945.pARJjfqQ053744@svn.freebsd.org> From: Robert Watson Date: Sun, 27 Nov 2011 19:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228040 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 19:45:41 -0000 Author: rwatson Date: Sun Nov 27 19:45:41 2011 New Revision: 228040 URL: http://svn.freebsd.org/changeset/base/228040 Log: Cross-reference capsicum.4 from cap_enter.2 and cap_new.2. MFC after: 3 days Sponsored by: Google, Inc. Modified: head/lib/libc/sys/cap_enter.2 head/lib/libc/sys/cap_new.2 Modified: head/lib/libc/sys/cap_enter.2 ============================================================================== --- head/lib/libc/sys/cap_enter.2 Sun Nov 27 19:44:15 2011 (r228039) +++ head/lib/libc/sys/cap_enter.2 Sun Nov 27 19:45:41 2011 (r228040) @@ -89,7 +89,8 @@ acquired rights as possible. .Rv -std cap_enter cap_getmode .Sh SEE ALSO .Xr cap_new 2 , -.Xr fexecve 2 +.Xr fexecve 2 , +.Xr capsicum 4 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the .Tn TrustedBSD Modified: head/lib/libc/sys/cap_new.2 ============================================================================== --- head/lib/libc/sys/cap_new.2 Sun Nov 27 19:44:15 2011 (r228039) +++ head/lib/libc/sys/cap_new.2 Sun Nov 27 19:45:41 2011 (r228040) @@ -456,6 +456,7 @@ argument is not a capability. .Xr sem_post 3 , .Xr sem_trywait 3 , .Xr sem_wait 3 , +.Xr capsicum 4 , .Xr snp 4 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 20:07:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F81A106564A; Sun, 27 Nov 2011 20:07:31 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1F28FC0C; Sun, 27 Nov 2011 20:07:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARK7Vr8054432; Sun, 27 Nov 2011 20:07:31 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARK7VPn054430; Sun, 27 Nov 2011 20:07:31 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201111272007.pARK7VPn054430@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 27 Nov 2011 20:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228041 - stable/9/sys/boot/ia64/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 20:07:31 -0000 Author: marcel Date: Sun Nov 27 20:07:30 2011 New Revision: 228041 URL: http://svn.freebsd.org/changeset/base/228041 Log: MFC rev. 227629: Wire the kernel text RWX, rather than RX. We're not quite ready for having kernel text non-writable, because we still need to apply relocations. On top of that, the PBVM page table has all pages marked as RWX, so it's an inconsistency to begin with. Approved by: re (kib) Modified: stable/9/sys/boot/ia64/common/exec.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/boot/ia64/common/exec.c ============================================================================== --- stable/9/sys/boot/ia64/common/exec.c Sun Nov 27 19:45:41 2011 (r228040) +++ stable/9/sys/boot/ia64/common/exec.c Sun Nov 27 20:07:30 2011 (r228041) @@ -187,7 +187,7 @@ mmu_setup_paged(struct bootinfo *bi) pa = ia64_va2pa(ia64_text_start, &ia64_text_size); ia64_text_size = sz; /* XXX */ shft = sz2shft(ia64_text_start, ia64_text_size); - shft = mmu_wire(ia64_text_start, (uintptr_t)pa, shft, PTE_AR_RX); + shft = mmu_wire(ia64_text_start, (uintptr_t)pa, shft, PTE_AR_RWX); ia64_copyin(&shft, (uintptr_t)&bi->bi_text_mapped, 4); /* Wire as much of the data segment as well. */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 20:10:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73D701065672; Sun, 27 Nov 2011 20:10:32 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62C2F8FC17; Sun, 27 Nov 2011 20:10:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARKAW2i054577; Sun, 27 Nov 2011 20:10:32 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARKAWaT054575; Sun, 27 Nov 2011 20:10:32 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201111272010.pARKAWaT054575@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 27 Nov 2011 20:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228042 - releng/9.0/sys/boot/ia64/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 20:10:32 -0000 Author: marcel Date: Sun Nov 27 20:10:32 2011 New Revision: 228042 URL: http://svn.freebsd.org/changeset/base/228042 Log: MFC rev. 227629, stable/9 rev 228041: Wire the kernel text RWX, rather than RX. We're not quite ready for having kernel text non-writable, because we still need to apply relocations. On top of that, the PBVM page table has all pages marked as RWX, so it's an inconsistency to begin with. Approved by: re (kib) Modified: releng/9.0/sys/boot/ia64/common/exec.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/amd64/include/xen/ (props changed) releng/9.0/sys/boot/ (props changed) releng/9.0/sys/boot/i386/efi/ (props changed) releng/9.0/sys/boot/ia64/efi/ (props changed) releng/9.0/sys/boot/ia64/ski/ (props changed) releng/9.0/sys/boot/powerpc/boot1.chrp/ (props changed) releng/9.0/sys/boot/powerpc/ofw/ (props changed) releng/9.0/sys/cddl/contrib/opensolaris/ (props changed) releng/9.0/sys/conf/ (props changed) releng/9.0/sys/contrib/dev/acpica/ (props changed) releng/9.0/sys/contrib/octeon-sdk/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) releng/9.0/sys/contrib/x86emu/ (props changed) Modified: releng/9.0/sys/boot/ia64/common/exec.c ============================================================================== --- releng/9.0/sys/boot/ia64/common/exec.c Sun Nov 27 20:07:30 2011 (r228041) +++ releng/9.0/sys/boot/ia64/common/exec.c Sun Nov 27 20:10:32 2011 (r228042) @@ -187,7 +187,7 @@ mmu_setup_paged(struct bootinfo *bi) pa = ia64_va2pa(ia64_text_start, &ia64_text_size); ia64_text_size = sz; /* XXX */ shft = sz2shft(ia64_text_start, ia64_text_size); - shft = mmu_wire(ia64_text_start, (uintptr_t)pa, shft, PTE_AR_RX); + shft = mmu_wire(ia64_text_start, (uintptr_t)pa, shft, PTE_AR_RWX); ia64_copyin(&shft, (uintptr_t)&bi->bi_text_mapped, 4); /* Wire as much of the data segment as well. */ From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 20:12:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20AB81065672; Sun, 27 Nov 2011 20:12:09 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FBE58FC0C; Sun, 27 Nov 2011 20:12:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARKC8q6054685; Sun, 27 Nov 2011 20:12:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARKC8pI054683; Sun, 27 Nov 2011 20:12:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201111272012.pARKC8pI054683@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 27 Nov 2011 20:12:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228043 - stable/9/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 20:12:09 -0000 Author: marcel Date: Sun Nov 27 20:12:08 2011 New Revision: 228043 URL: http://svn.freebsd.org/changeset/base/228043 Log: MFC rev. 227283: Add check-password.4th and screen.4th to the boot image. They are needed by the loader. Approved by: re (kib) Modified: stable/9/release/ia64/mkisoimages.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/ia64/mkisoimages.sh ============================================================================== --- stable/9/release/ia64/mkisoimages.sh Sun Nov 27 20:10:32 2011 (r228042) +++ stable/9/release/ia64/mkisoimages.sh Sun Nov 27 20:12:08 2011 (r228043) @@ -64,6 +64,8 @@ if [ $bootable = yes ]; then cp $BASE/boot/mfsroot.gz $MNT/boot fi cp $BASE/boot/support.4th $MNT/boot + cp $BASE/boot/check-password.4th $MNT/boot + cp $BASE/boot/screen.4th $MNT/boot mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi umount $MNT mdconfig -d -u $md From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 20:14:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36C761065675; Sun, 27 Nov 2011 20:14:01 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 263C28FC0C; Sun, 27 Nov 2011 20:14:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARKE1nd054780; Sun, 27 Nov 2011 20:14:01 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARKE1Dm054778; Sun, 27 Nov 2011 20:14:01 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201111272014.pARKE1Dm054778@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 27 Nov 2011 20:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228044 - releng/9.0/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 20:14:01 -0000 Author: marcel Date: Sun Nov 27 20:14:00 2011 New Revision: 228044 URL: http://svn.freebsd.org/changeset/base/228044 Log: MFC rev. 227283, stable/9 rev. 228043: Add check-password.4th and screen.4th to the boot image. They are needed by the loader. Approved by: re (kib) Modified: releng/9.0/release/ia64/mkisoimages.sh Directory Properties: releng/9.0/release/ (props changed) Modified: releng/9.0/release/ia64/mkisoimages.sh ============================================================================== --- releng/9.0/release/ia64/mkisoimages.sh Sun Nov 27 20:12:08 2011 (r228043) +++ releng/9.0/release/ia64/mkisoimages.sh Sun Nov 27 20:14:00 2011 (r228044) @@ -64,6 +64,8 @@ if [ $bootable = yes ]; then cp $BASE/boot/mfsroot.gz $MNT/boot fi cp $BASE/boot/support.4th $MNT/boot + cp $BASE/boot/check-password.4th $MNT/boot + cp $BASE/boot/screen.4th $MNT/boot mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi umount $MNT mdconfig -d -u $md From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 20:24:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E96106566C; Sun, 27 Nov 2011 20:24:08 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 046788FC16; Sun, 27 Nov 2011 20:24:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARKO7s3055129; Sun, 27 Nov 2011 20:24:07 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARKO7i5055127; Sun, 27 Nov 2011 20:24:07 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111272024.pARKO7i5055127@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 Nov 2011 20:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228045 - head/cddl/contrib/opensolaris/cmd/zpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 20:24:08 -0000 Author: mm Date: Sun Nov 27 20:24:07 2011 New Revision: 228045 URL: http://svn.freebsd.org/changeset/base/228045 Log: Add missing -n flag to "zpool import" description. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Nov 27 20:14:00 2011 (r228044) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Nov 27 20:24:07 2011 (r228045) @@ -1044,7 +1044,7 @@ Lists destroyed pools only. .Op Fl m .Op Fl N .Op Fl R Ar root -.Op Fl F Op Fl +.Op Fl F Op Fl n .Fl a .Xc .Pp From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 20:24:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 74D62106567C; Sun, 27 Nov 2011 20:24:51 +0000 (UTC) Date: Sun, 27 Nov 2011 20:24:51 +0000 From: Alexander Best To: Michael Tuexen Message-ID: <20111127202451.GA5466@freebsd.org> References: <201111271751.pARHpDdr049714@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <201111271751.pARHpDdr049714@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228031 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 20:24:51 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun Nov 27 11, Michael Tuexen wrote: > Author: tuexen > Date: Sun Nov 27 17:51:13 2011 > New Revision: 228031 > URL: http://svn.freebsd.org/changeset/base/228031 > > Log: > Fix a warning reported by arundel@. > Fix a bug where the parameter length of a supported address types > parameter is set to a wrong value if the kernel is built with > with either INET or INET6, but not both. > > MFC after: 3 days. > > Modified: > head/sys/netinet/sctp_header.h > head/sys/netinet/sctp_output.c > > Modified: head/sys/netinet/sctp_header.h > ============================================================================== > --- head/sys/netinet/sctp_header.h Sun Nov 27 17:05:26 2011 (r228030) > +++ head/sys/netinet/sctp_header.h Sun Nov 27 17:51:13 2011 (r228031) > @@ -81,8 +81,7 @@ struct sctp_host_name_param { > /* supported address type */ > struct sctp_supported_addr_param { > struct sctp_paramhdr ph;/* type=SCTP_SUPPORTED_ADDRTYPE */ > - uint16_t addr_type[SCTP_ARRAY_MIN_LEN]; /* array of supported address since SCTP_ARRAY_MIN_LEN is only used in one other place, i think we can remove it entirely (see the attached patch). cheers. alex > - * types */ > + uint16_t addr_type[2]; /* array of supported address types */ > } SCTP_PACKED; > > /* ECN parameter */ > > Modified: head/sys/netinet/sctp_output.c > ============================================================================== > --- head/sys/netinet/sctp_output.c Sun Nov 27 17:05:26 2011 (r228030) > +++ head/sys/netinet/sctp_output.c Sun Nov 27 17:51:13 2011 (r228031) > @@ -4680,24 +4680,24 @@ sctp_send_initiate(struct sctp_inpcb *in > #ifdef INET6 > #ifdef INET > /* we support 2 types: IPv4/IPv6 */ > - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint16_t)); > + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + 2 * sizeof(uint16_t)); > sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); > sup_addr->addr_type[1] = htons(SCTP_IPV6_ADDRESS); > #else > /* we support 1 type: IPv6 */ > - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); > + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); > sup_addr->addr_type[0] = htons(SCTP_IPV6_ADDRESS); > sup_addr->addr_type[1] = htons(0); /* this is the padding */ > #endif > #else > /* we support 1 type: IPv4 */ > - sup_addr->ph.param_length = htons(sizeof(*sup_addr) + sizeof(uint8_t)); > + sup_addr->ph.param_length = htons(sizeof(struct sctp_paramhdr) + sizeof(uint16_t)); > sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS); > sup_addr->addr_type[1] = htons(0); /* this is the padding */ > #endif > - SCTP_BUF_LEN(m) += sizeof(*sup_addr) + sizeof(uint16_t); > + SCTP_BUF_LEN(m) += sizeof(struct sctp_supported_addr_param); > /* adaptation layer indication parameter */ > - ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(*sup_addr) + sizeof(uint16_t)); > + ali = (struct sctp_adaptation_layer_indication *)((caddr_t)sup_addr + sizeof(struct sctp_supported_addr_param)); > ali->ph.param_type = htons(SCTP_ULP_ADAPTATION); > ali->ph.param_length = htons(sizeof(*ali)); > ali->indication = ntohl(inp->sctp_ep.adaptation_layer_indicator); --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sctp_header.h.diff" Index: sys/netinet/sctp_header.h =================================================================== --- sys/netinet/sctp_header.h (revision 228040) +++ sys/netinet/sctp_header.h (working copy) @@ -66,11 +66,10 @@ uint32_t time; /* time in ms to extend cookie */ } SCTP_PACKED; -#define SCTP_ARRAY_MIN_LEN 1 /* Host Name Address */ struct sctp_host_name_param { struct sctp_paramhdr ph;/* type=SCTP_HOSTNAME_ADDRESS */ - char name[SCTP_ARRAY_MIN_LEN]; /* host name */ + char name[1]; /* host name */ } SCTP_PACKED; /* --UugvWAfsgieZRqgk-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 21:01:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 465F01065675; Sun, 27 Nov 2011 21:01:52 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204738FC0A; Sun, 27 Nov 2011 21:01:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pARL1q9E056324; Sun, 27 Nov 2011 21:01:52 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pARL1q30056322; Sun, 27 Nov 2011 21:01:52 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201111272101.pARL1q30056322@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 27 Nov 2011 21:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228046 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 21:01:52 -0000 Author: trociny Date: Sun Nov 27 21:01:51 2011 New Revision: 228046 URL: http://svn.freebsd.org/changeset/base/228046 Log: This should have been committed in r228030. MFC after: 2 weeks Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Sun Nov 27 20:24:07 2011 (r228045) +++ head/sys/sys/sysctl.h Sun Nov 27 21:01:51 2011 (r228046) @@ -562,6 +562,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_ENV 35 /* get environment */ #define KERN_PROC_AUXV 36 /* get ELF auxiliary vector */ #define KERN_PROC_RLIMIT 37 /* process resource limits */ +#define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ /* * KERN_IPC identifiers From owner-svn-src-all@FreeBSD.ORG Sun Nov 27 21:44:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B207106566C; Sun, 27 Nov 2011 21:44:49 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id 039CF8FC0A; Sun, 27 Nov 2011 21:44:48 +0000 (UTC) Received: from [192.168.1.200] (p508FA47F.dip.t-dialin.net [80.143.164.127]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 645071C0B4610; Sun, 27 Nov 2011 22:44:46 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20111127202451.GA5466@freebsd.org> Date: Sun, 27 Nov 2011 22:44:45 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201111271751.pARHpDdr049714@svn.freebsd.org> <20111127202451.GA5466@freebsd.org> To: Alexander Best X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228031 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 21:44:49 -0000 On Nov 27, 2011, at 9:24 PM, Alexander Best wrote: > On Sun Nov 27 11, Michael Tuexen wrote: >> Author: tuexen >> Date: Sun Nov 27 17:51:13 2011 >> New Revision: 228031 >> URL: http://svn.freebsd.org/changeset/base/228031 >>=20 >> Log: >> Fix a warning reported by arundel@. >> Fix a bug where the parameter length of a supported address types >> parameter is set to a wrong value if the kernel is built with >> with either INET or INET6, but not both. >>=20 >> MFC after: 3 days. >>=20 >> Modified: >> head/sys/netinet/sctp_header.h >> head/sys/netinet/sctp_output.c >>=20 >> Modified: head/sys/netinet/sctp_header.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/sctp_header.h Sun Nov 27 17:05:26 2011 = (r228030) >> +++ head/sys/netinet/sctp_header.h Sun Nov 27 17:51:13 2011 = (r228031) >> @@ -81,8 +81,7 @@ struct sctp_host_name_param { >> /* supported address type */ >> struct sctp_supported_addr_param { >> struct sctp_paramhdr ph;/* type=3DSCTP_SUPPORTED_ADDRTYPE */ >> - uint16_t addr_type[SCTP_ARRAY_MIN_LEN]; /* array of supported = address >=20 > since SCTP_ARRAY_MIN_LEN is only used in one other place, i think we = can remove > it entirely (see the attached patch). >=20 > cheers. > alex >=20 >> - * types */ >> + uint16_t addr_type[2]; /* array of supported address types */ >> } SCTP_PACKED; >>=20 >> /* ECN parameter */ >>=20 >> Modified: head/sys/netinet/sctp_output.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/sctp_output.c Sun Nov 27 17:05:26 2011 = (r228030) >> +++ head/sys/netinet/sctp_output.c Sun Nov 27 17:51:13 2011 = (r228031) >> @@ -4680,24 +4680,24 @@ sctp_send_initiate(struct sctp_inpcb *in >> #ifdef INET6 >> #ifdef INET >> /* we support 2 types: IPv4/IPv6 */ >> - sup_addr->ph.param_length =3D htons(sizeof(*sup_addr) + = sizeof(uint16_t)); >> + sup_addr->ph.param_length =3D htons(sizeof(struct sctp_paramhdr) = + 2 * sizeof(uint16_t)); >> sup_addr->addr_type[0] =3D htons(SCTP_IPV4_ADDRESS); >> sup_addr->addr_type[1] =3D htons(SCTP_IPV6_ADDRESS); >> #else >> /* we support 1 type: IPv6 */ >> - sup_addr->ph.param_length =3D htons(sizeof(*sup_addr) + = sizeof(uint8_t)); >> + sup_addr->ph.param_length =3D htons(sizeof(struct sctp_paramhdr) = + sizeof(uint16_t)); >> sup_addr->addr_type[0] =3D htons(SCTP_IPV6_ADDRESS); >> sup_addr->addr_type[1] =3D htons(0); /* this is the padding = */ >> #endif >> #else >> /* we support 1 type: IPv4 */ >> - sup_addr->ph.param_length =3D htons(sizeof(*sup_addr) + = sizeof(uint8_t)); >> + sup_addr->ph.param_length =3D htons(sizeof(struct sctp_paramhdr) = + sizeof(uint16_t)); >> sup_addr->addr_type[0] =3D htons(SCTP_IPV4_ADDRESS); >> sup_addr->addr_type[1] =3D htons(0); /* this is the padding = */ >> #endif >> - SCTP_BUF_LEN(m) +=3D sizeof(*sup_addr) + sizeof(uint16_t); >> + SCTP_BUF_LEN(m) +=3D sizeof(struct sctp_supported_addr_param); >> /* adaptation layer indication parameter */ >> - ali =3D (struct sctp_adaptation_layer_indication = *)((caddr_t)sup_addr + sizeof(*sup_addr) + sizeof(uint16_t)); >> + ali =3D (struct sctp_adaptation_layer_indication = *)((caddr_t)sup_addr + sizeof(struct sctp_supported_addr_param)); >> ali->ph.param_type =3D htons(SCTP_ULP_ADAPTATION); >> ali->ph.param_length =3D htons(sizeof(*ali)); >> ali->indication =3D = ntohl(inp->sctp_ep.adaptation_layer_indicator); > yes, that is possible... Best regards Michael From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 03:59:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4C861065672; Mon, 28 Nov 2011 03:59:08 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by mx1.freebsd.org (Postfix) with ESMTP id 017678FC0A; Mon, 28 Nov 2011 03:59:07 +0000 (UTC) X-AuditID: 1209190c-b7f806d0000008d6-a1-4ed3070b1678 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id B5.89.02262.B0703DE4; Sun, 27 Nov 2011 22:59:07 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id pAS3x63v028384; Sun, 27 Nov 2011 22:59:06 -0500 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pAS3x2Io002295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 27 Nov 2011 22:59:05 -0500 (EST) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id pAS3x1Pg026802; Sun, 27 Nov 2011 22:59:01 -0500 (EST) Date: Sun, 27 Nov 2011 22:59:01 -0500 (EST) From: Benjamin Kaduk To: Lawrence Stewart In-Reply-To: <4ECCA2A1.4020408@freebsd.org> Message-ID: References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <648D11A8-3636-49E5-BF20-83E4EA87242C@cubinlab.ee.unimelb.edu.au> <4EC9FD8A.5040401@freebsd.org> <201111220830.05029.jhb@freebsd.org> <4ECBAB19.4010907@freebsd.org> <8805563E-60F9-4BF4-A292-1A43C4FA368A@cubinlab.ee.unimelb.edu.au> <4ECCA2A1.4020408@freebsd.org> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42IR4hTV1uVmv+xnMPGukMXeI9eZLaat38Vo sflWF7PFm5YfLBZ/2qcAiU0LWS2avixgcmD3aDjv4zHj03wWj52z7rIHMEdx2aSk5mSWpRbp 2yVwZfzcsZG1oFeyYveNSywNjG+Fuxg5OSQETCQWLPnFDmGLSVy4t54NxBYS2McoceKNexcj F5C9gVHiQ28TM4RzgEli3fQtrBBOA6PEm/vvWEFaWAS0JVbN3sIMYrMJqEjMfLMRbJQIUHzb 2c9gNcwC9xklNiwpA7GFBfQlvq6eyAJicwLVvJ9wmxHE5hWwl7i9ajvUtoNMEntaNzCBJEQF dCRW75/CAlEkKHFy5hMWiKGWEuf+XGebwCg4C0lqFpLUAkamVYyyKblVurmJmTnFqcm6xcmJ eXmpRbqGermZJXqpKaWbGMFhLsmzg/HNQaVDjAIcjEo8vBsvX/ITYk0sK67MPcQoycGkJMrr wHLZT4gvKT+lMiOxOCO+qDQntfgQowQHs5IIb89RoHLelMTKqtSifJiUNAeLkjjvwR0OfkIC 6YklqdmpqQWpRTBZGQ4OJQneZDagoYJFqempFWmZOSUIaSYOTpDhPEDD/UBqeIsLEnOLM9Mh 8qcYFaXEee1BEgIgiYzSPLheWBp6xSgO9IowbyhIFQ8whcF1vwIazAQ0mGPmBZDBJYkIKakG xpLKwkOya/+35sXe4DMu5DHyvVHt07jjz78s4xuSMpl/yk8ql05baWLQ/cDBtzjzY9Fjx1un RPkfml9YfS+1PnZ524IX1V43j+W5MViLidulv5gb83JPxdGlv3In7zkati0kK3Tlk/qspFML pLbVRv0/Mf3clP+vMy/Z7HGdwBbHtUQ0wnFaqBJLcUaioRZzUXEiAKXaz+AeAwAA Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , svn-src-head@freebsd.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 03:59:08 -0000 On Wed, 23 Nov 2011, Lawrence Stewart wrote: > On 11/23/11 17:42, Julien Ridoux wrote: >> >> Thanks all for the feedback. With some delay, I have a patch against >> r227871 that implements what Lawrence proposed. You can find it >> here: >> http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/ffclock-bpf-header-r227871.patch > > There are a few nits, but the patch implements what I envisaged, thanks > Julien. The use of the union for bh_ustamp feels a bit odd, as (e.g.) a bpf_ts is two 64-bit ints, but an ffcounter is just a single 64-bit int. > >> I have tested this under a few typical scenario, it works as >> expected but already brings some headaches (hence the long delay >> mentioned above :-)). >> >> I thought a bit more of user cases. I believe many of them call for >> having both feed-forward counter and its conversion in second be >> present in the BPF header. For example, this allows to have absolute >> packet departure/arrival times (as per usual), but also provides the >> opportunity to compute inter-arrival times accurately using the >> difference clock. There are other examples I can think of, and if one >> believe the feed-forward clock approach becomes more popular, such >> usages will be more and more common. >> Having read only the first introductory link that Lawrence posted when he first started introducing the ffclock code, it does really seem like there are lots of interesting things to do with both timestamps available. >> Assuming the BPF header grows by 8 bytes independent of any kernel >> option, I admit that the current implementation is a bit ugly. The >> BPF structure is not nicely packed and looks clunky. Ideally, the The +#define bh_tstamp bh_ustamp.ts_stamp is a sort of thing that can get annoying when poking around kernel cores, &c. I won't argue with you that the current implementation is a bit ugly. >> feed-forward counter should be placed just below the bh_tstamp >> member, but this would require libpcap and all ports depending on it >> to be recompiled after this change. > > Even though it looks a bit gross, we would still add it at the end to avoid > gratuitously breaking binaries. We would then also add some explicit padding > in the struct to soak up the redundant space left in between it and the > second last struct member. Though ... we are just after a release branch is forked. That seems to be a much better time to change the ABI for cleanliness' sake than right before a release ;) > >> What is your favourite option? > > FreeBSD parlance is to ask what colour you would like to paint the bikeshed > ;) > > As I've never experienced the pain John refers to, I'll defer to the wisdom > of others on whether the proposed patch will create pain down the road. I > think it's ok, but if consensus is 8bytes per packet isn't going to break the > bank, I guess we just go for it - but I guess I am cautious about this route > as we can push a lot of packets per second through the stack. Since other people seem to be keeping quiet, I'll add that I'm in favor of just always adding the 8 bytes per packet. Thanks, -Ben Kaduk From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 05:34:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3F401065670; Mon, 28 Nov 2011 05:34:16 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92F228FC0C; Mon, 28 Nov 2011 05:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS5YGdm073366; Mon, 28 Nov 2011 05:34:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS5YGvh073362; Mon, 28 Nov 2011 05:34:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201111280534.pAS5YGvh073362@svn.freebsd.org> From: Kevin Lo Date: Mon, 28 Nov 2011 05:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228048 - in head/usr.sbin/bsdinstall: distextract distfetch partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 05:34:16 -0000 Author: kevlo Date: Mon Nov 28 05:34:16 2011 New Revision: 228048 URL: http://svn.freebsd.org/changeset/base/228048 Log: Plug memory leaks and fix open(2) error check. Reviewed by: nwhitehorn MFC after: 3 days Modified: head/usr.sbin/bsdinstall/distextract/distextract.c head/usr.sbin/bsdinstall/distfetch/distfetch.c head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- head/usr.sbin/bsdinstall/distextract/distextract.c Sun Nov 27 23:31:22 2011 (r228047) +++ head/usr.sbin/bsdinstall/distextract/distextract.c Mon Nov 28 05:34:16 2011 (r228048) @@ -49,6 +49,7 @@ main(void) dists = calloc(ndists, sizeof(const char *)); if (dists == NULL) { fprintf(stderr, "Out of memory!\n"); + free(diststring); return (1); } Modified: head/usr.sbin/bsdinstall/distfetch/distfetch.c ============================================================================== --- head/usr.sbin/bsdinstall/distfetch/distfetch.c Sun Nov 27 23:31:22 2011 (r228047) +++ head/usr.sbin/bsdinstall/distfetch/distfetch.c Mon Nov 28 05:34:16 2011 (r228048) @@ -48,6 +48,7 @@ main(void) urls = calloc(ndists, sizeof(const char *)); if (urls == NULL) { fprintf(stderr, "Out of memory!\n"); + free(diststring); return (1); } Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Nov 27 23:31:22 2011 (r228047) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Mon Nov 28 05:34:16 2011 (r228048) @@ -301,7 +301,7 @@ gpart_bootcode(struct ggeom *gp) return; bootfd = open(bootcode, O_RDONLY); - if (bootfd <= 0) { + if (bootfd < 0) { dialog_msgbox("Bootcode Error", strerror(errno), 0, 0, TRUE); return; From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 05:46:22 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 501A3106564A; Mon, 28 Nov 2011 05:46:22 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id E9DB38FC13; Mon, 28 Nov 2011 05:46:21 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4963C628E; Mon, 28 Nov 2011 05:46:19 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A961D897C; Mon, 28 Nov 2011 06:46:18 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: David Chisnall References: <201111220250.pAM2oPWC070856@svn.freebsd.org> <20111122153332.GA20145@zim.MIT.EDU> <20111122202735.GA21442@zim.MIT.EDU> <0DC88C34-91B4-49D1-AA8A-73B14C99D35B@FreeBSD.org> Date: Mon, 28 Nov 2011 06:46:18 +0100 In-Reply-To: <0DC88C34-91B4-49D1-AA8A-73B14C99D35B@FreeBSD.org> (David Chisnall's message of "Wed, 23 Nov 2011 10:37:14 +0000") Message-ID: <86vcq4er4l.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@FreeBSD.org, Eitan Adler , svn-src-all@FreeBSD.org, dim@FreeBSD.org, Brooks Davis , bde@FreeBSD.org, svn-src-head@FreeBSD.org, David Schultz Subject: Re: svn commit: r227812 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 05:46:22 -0000 David Chisnall writes: > As to the | vs || issue - by all means change it to || if it fits > better with the FreeBSD style. In the general case I prefer to use | > to hint to the compiler and readers of the code that short-circuit > evaluation is not required and to remove a sequence point and make > life easier for the optimiser. The optimizer is smarter than you think, although it can sometimes get confused when programmers start talking about what they want the optimizer to do instead of what they want the program to do. > In this case, the two are equivalent so it's just a hint to the > reader, and apparently (judging by the responses so far) one that is > not well understood. The reader doesn't need a hint to understand what (n =3D=3D 0 || s1 =3D=3D = s2) means. The reader will however need a couple of seconds to understand what ((n =3D=3D 0) | (s1 =3D=3D s2)) means, and will waste a few more wonde= ring why the programmer didn't pick the more obvious solution. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 07:09:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29D841065672; Mon, 28 Nov 2011 07:09:30 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E3AA8FC08; Mon, 28 Nov 2011 07:09:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS79TOk078444; Mon, 28 Nov 2011 07:09:29 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS79ThV078442; Mon, 28 Nov 2011 07:09:29 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201111280709.pAS79ThV078442@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 28 Nov 2011 07:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228049 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:09:30 -0000 Author: trociny Date: Mon Nov 28 07:09:29 2011 New Revision: 228049 URL: http://svn.freebsd.org/changeset/base/228049 Log: Cast a_val on printing. This fixes build on mips. Modified: head/usr.bin/procstat/procstat_auxv.c Modified: head/usr.bin/procstat/procstat_auxv.c ============================================================================== --- head/usr.bin/procstat/procstat_auxv.c Mon Nov 28 05:34:16 2011 (r228048) +++ head/usr.bin/procstat/procstat_auxv.c Mon Nov 28 07:09:29 2011 (r228049) @@ -85,19 +85,19 @@ procstat_auxv(struct kinfo_proc *kipp) case AT_IGNORE: break; case AT_EXECFD: - PRINT(AT_EXECFD, %ld, auxv[i].a_un.a_val); + PRINT(AT_EXECFD, %ld, (long)auxv[i].a_un.a_val); break; case AT_PHDR: PRINT(AT_PHDR, %p, auxv[i].a_un.a_ptr); break; case AT_PHENT: - PRINT(AT_PHENT, %ld, auxv[i].a_un.a_val); + PRINT(AT_PHENT, %ld, (long)auxv[i].a_un.a_val); break; case AT_PHNUM: - PRINT(AT_PHNUM, %ld, auxv[i].a_un.a_val); + PRINT(AT_PHNUM, %ld, (long)auxv[i].a_un.a_val); break; case AT_PAGESZ: - PRINT(AT_PAGESZ, %ld, auxv[i].a_un.a_val); + PRINT(AT_PAGESZ, %ld, (long)auxv[i].a_un.a_val); break; case AT_BASE: PRINT(AT_BASE, %p, auxv[i].a_un.a_ptr); @@ -110,27 +110,27 @@ procstat_auxv(struct kinfo_proc *kipp) break; #ifdef AT_NOTELF case AT_NOTELF: - PRINT(AT_NOTELF, %ld, auxv[i].a_un.a_val); + PRINT(AT_NOTELF, %ld, (long)auxv[i].a_un.a_val); break; #endif #ifdef AT_UID case AT_UID: - PRINT(AT_UID, %ld, auxv[i].a_un.a_val); + PRINT(AT_UID, %ld, (long)auxv[i].a_un.a_val); break; #endif #ifdef AT_EUID case AT_EUID: - PRINT(AT_EUID, %ld, auxv[i].a_un.a_val); + PRINT(AT_EUID, %ld, (long)auxv[i].a_un.a_val); break; #endif #ifdef AT_GID case AT_GID: - PRINT(AT_GID, %ld, auxv[i].a_un.a_val); + PRINT(AT_GID, %ld, (long)auxv[i].a_un.a_val); break; #endif #ifdef AT_EGID case AT_EGID: - PRINT(AT_EGID, %ld, auxv[i].a_un.a_val); + PRINT(AT_EGID, %ld, (long)auxv[i].a_un.a_val); break; #endif case AT_EXECPATH: @@ -140,19 +140,19 @@ procstat_auxv(struct kinfo_proc *kipp) PRINT(AT_CANARY, %p, auxv[i].a_un.a_ptr); break; case AT_CANARYLEN: - PRINT(AT_CANARYLEN, %ld, auxv[i].a_un.a_val); + PRINT(AT_CANARYLEN, %ld, (long)auxv[i].a_un.a_val); break; case AT_OSRELDATE: - PRINT(AT_OSRELDATE, %ld, auxv[i].a_un.a_val); + PRINT(AT_OSRELDATE, %ld, (long)auxv[i].a_un.a_val); break; case AT_NCPUS: - PRINT(AT_NCPUS, %ld, auxv[i].a_un.a_val); + PRINT(AT_NCPUS, %ld, (long)auxv[i].a_un.a_val); break; case AT_PAGESIZES: PRINT(AT_PAGESIZES, %p, auxv[i].a_un.a_ptr); break; case AT_PAGESIZESLEN: - PRINT(AT_PAGESIZESLEN, %ld, auxv[i].a_un.a_val); + PRINT(AT_PAGESIZESLEN, %ld, (long)auxv[i].a_un.a_val); break; case AT_STACKPROT: if ((auxv[i].a_un.a_val & VM_PROT_EXECUTE) != 0) @@ -161,7 +161,7 @@ procstat_auxv(struct kinfo_proc *kipp) PRINT(AT_STACKPROT, %s, "EXECUTABLE"); break; case AT_COUNT: - PRINT(AT_COUNT, %ld, auxv[i].a_un.a_val); + PRINT(AT_COUNT, %ld, (long)auxv[i].a_un.a_val); break; default: PRINT_UNKNOWN(auxv[i].a_type, auxv[i].a_un.a_val); From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 08:10:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C00D9106564A; Mon, 28 Nov 2011 08:10:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6008FC14; Mon, 28 Nov 2011 08:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS8ACl5080341; Mon, 28 Nov 2011 08:10:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS8AC1w080339; Mon, 28 Nov 2011 08:10:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111280810.pAS8AC1w080339@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Nov 2011 08:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228050 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:10:12 -0000 Author: glebius Date: Mon Nov 28 08:10:12 2011 New Revision: 228050 URL: http://svn.freebsd.org/changeset/base/228050 Log: Fix build, fininshing r228018. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Mon Nov 28 07:09:29 2011 (r228049) +++ head/sys/mips/atheros/if_arge.c Mon Nov 28 08:10:12 2011 (r228050) @@ -192,9 +192,9 @@ static void arge_flush_ddr(struct arge_softc *sc) { if (sc->arge_mac_unit == 0) - ar71xx_device_flush_ddr_ge0(); + ar71xx_device_flush_ddr_ge(0); else - ar71xx_device_flush_ddr_ge1(); + ar71xx_device_flush_ddr_ge(1); } static int From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 08:12:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B66106566B; Mon, 28 Nov 2011 08:12:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2869E8FC17; Mon, 28 Nov 2011 08:12:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS8CcZ3080463; Mon, 28 Nov 2011 08:12:38 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS8CcaJ080461; Mon, 28 Nov 2011 08:12:38 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111280812.pAS8CcaJ080461@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Nov 2011 08:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228051 - stable/9/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:12:38 -0000 Author: glebius Date: Mon Nov 28 08:12:37 2011 New Revision: 228051 URL: http://svn.freebsd.org/changeset/base/228051 Log: MFhead r227901: Fix parsing of redirect_addr argument. PR: kern/162739 Approved by: re (kib) Modified: stable/9/sbin/ipfw/nat.c Directory Properties: stable/9/sbin/ipfw/ (props changed) Modified: stable/9/sbin/ipfw/nat.c ============================================================================== --- stable/9/sbin/ipfw/nat.c Mon Nov 28 08:10:12 2011 (r228050) +++ stable/9/sbin/ipfw/nat.c Mon Nov 28 08:12:37 2011 (r228051) @@ -345,11 +345,12 @@ setup_redir_addr(char *buf, int *ac, cha space = sizeof(struct cfg_redir); /* Extract local address. */ - if ((sep = strtok(**av, ",")) != NULL) { + if (strchr(**av, ',') != NULL) { struct cfg_spool *spool; /* Setup LSNAT server pool. */ r->laddr.s_addr = INADDR_NONE; + sep = strtok(**av, ","); while (sep != NULL) { spool = (struct cfg_spool *)buf; space += sizeof(struct cfg_spool); From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 08:15:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3E2C106566C; Mon, 28 Nov 2011 08:14:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E366F8FC18; Mon, 28 Nov 2011 08:14:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS8Exb0080591; Mon, 28 Nov 2011 08:14:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS8Ex6Q080589; Mon, 28 Nov 2011 08:14:59 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111280814.pAS8Ex6Q080589@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Nov 2011 08:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228052 - releng/9.0/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:15:00 -0000 Author: glebius Date: Mon Nov 28 08:14:59 2011 New Revision: 228052 URL: http://svn.freebsd.org/changeset/base/228052 Log: MFhead r227901: Fix parsing of redirect_addr argument. PR: kern/162739 Approved by: re (kib) Modified: releng/9.0/sbin/ipfw/nat.c Directory Properties: releng/9.0/sbin/ipfw/ (props changed) Modified: releng/9.0/sbin/ipfw/nat.c ============================================================================== --- releng/9.0/sbin/ipfw/nat.c Mon Nov 28 08:12:37 2011 (r228051) +++ releng/9.0/sbin/ipfw/nat.c Mon Nov 28 08:14:59 2011 (r228052) @@ -345,11 +345,12 @@ setup_redir_addr(char *buf, int *ac, cha space = sizeof(struct cfg_redir); /* Extract local address. */ - if ((sep = strtok(**av, ",")) != NULL) { + if (strchr(**av, ',') != NULL) { struct cfg_spool *spool; /* Setup LSNAT server pool. */ r->laddr.s_addr = INADDR_NONE; + sep = strtok(**av, ","); while (sep != NULL) { spool = (struct cfg_spool *)buf; space += sizeof(struct cfg_spool); From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 08:16:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76590106564A; Mon, 28 Nov 2011 08:16:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64FFB8FC23; Mon, 28 Nov 2011 08:16:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS8G0t1080682; Mon, 28 Nov 2011 08:16:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS8G0TG080680; Mon, 28 Nov 2011 08:16:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111280816.pAS8G0TG080680@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Nov 2011 08:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228053 - stable/8/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:16:00 -0000 Author: glebius Date: Mon Nov 28 08:16:00 2011 New Revision: 228053 URL: http://svn.freebsd.org/changeset/base/228053 Log: MFhead r227901: Fix parsing of redirect_addr argument. PR: kern/162739 Modified: stable/8/sbin/ipfw/nat.c Directory Properties: stable/8/sbin/ipfw/ (props changed) Modified: stable/8/sbin/ipfw/nat.c ============================================================================== --- stable/8/sbin/ipfw/nat.c Mon Nov 28 08:14:59 2011 (r228052) +++ stable/8/sbin/ipfw/nat.c Mon Nov 28 08:16:00 2011 (r228053) @@ -345,11 +345,12 @@ setup_redir_addr(char *buf, int *ac, cha space = sizeof(struct cfg_redir); /* Extract local address. */ - if ((sep = strtok(**av, ",")) != NULL) { + if (strchr(**av, ',') != NULL) { struct cfg_spool *spool; /* Setup LSNAT server pool. */ r->laddr.s_addr = INADDR_NONE; + sep = strtok(**av, ","); while (sep != NULL) { spool = (struct cfg_spool *)buf; space += sizeof(struct cfg_spool); From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 09:14:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9474106564A; Mon, 28 Nov 2011 09:14:51 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B860A8FC0A; Mon, 28 Nov 2011 09:14:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS9EpDI082530; Mon, 28 Nov 2011 09:14:51 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS9Epjo082528; Mon, 28 Nov 2011 09:14:51 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111280914.pAS9Epjo082528@svn.freebsd.org> From: Martin Matuska Date: Mon, 28 Nov 2011 09:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228054 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 09:14:51 -0000 Author: mm Date: Mon Nov 28 09:14:51 2011 New Revision: 228054 URL: http://svn.freebsd.org/changeset/base/228054 Log: Add missing warning to zfs(8) for using "zfs destroy" with -r and -R flags. Obtained from: illumos MFC after: 6 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 08:16:00 2011 (r228053) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 09:14:51 2011 (r228054) @@ -1423,6 +1423,13 @@ Force an unmount of any file systems usi command. This option has no effect on non-file systems or unmounted file systems. .El +.Pp +Extreme care should be taken when applying either the +.Fl r +or the +.Fl R +options, as they can destroy large portions of a pool and cause unexpected +behavior for mounted file systems in use. .It Xo .Nm .Cm destroy @@ -1450,6 +1457,13 @@ Recursively destroy all dependents. .It Fl d Defer snapshot deletion. .El +.Pp +Extreme care should be taken when applying either the +.Fl r +or the +.Fl R +options, as they can destroy large portions of a pool and cause unexpected +behavior for mounted file systems in use. .It Xo .Nm .Cm snapshot From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 09:33:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 639FC106566B; Mon, 28 Nov 2011 09:33:13 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52B9B8FC08; Mon, 28 Nov 2011 09:33:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS9XD6h083112; Mon, 28 Nov 2011 09:33:13 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS9XDhg083110; Mon, 28 Nov 2011 09:33:13 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111280933.pAS9XDhg083110@svn.freebsd.org> From: Martin Matuska Date: Mon, 28 Nov 2011 09:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228055 - head/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 09:33:13 -0000 Author: mm Date: Mon Nov 28 09:33:13 2011 New Revision: 228055 URL: http://svn.freebsd.org/changeset/base/228055 Log: Use singular form for zfs destroy snapshot in zfs(8). MFC after: 6 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 09:14:51 2011 (r228054) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 09:33:13 2011 (r228055) @@ -1437,7 +1437,7 @@ behavior for mounted file systems in use .Ar snapshot .Xc .Pp -The given snapshots are destroyed immediately if and only if the +The given snapshot is destroyed immediately if and only if the .Qq Nm Cm destroy command without the .Fl d @@ -1445,7 +1445,7 @@ option would have destroyed it. Such imm example, if the snapshot had no clones and the user-initiated reference count were zero. .Pp -If a snapshot does not qualify for immediate destruction, it is marked for +If the snapshot does not qualify for immediate destruction, it is marked for deferred deletion. In this state, it exists as a usable, visible snapshot until both of the preconditions listed above are met, at which point it is destroyed. .Bl -tag -width indent From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 09:54:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6DD01065679; Mon, 28 Nov 2011 09:54:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4408FC15; Mon, 28 Nov 2011 09:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAS9sfkY083777; Mon, 28 Nov 2011 09:54:41 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAS9sfs9083775; Mon, 28 Nov 2011 09:54:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201111280954.pAS9sfs9083775@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 28 Nov 2011 09:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228056 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 09:54:42 -0000 Author: hselasky Date: Mon Nov 28 09:54:41 2011 New Revision: 228056 URL: http://svn.freebsd.org/changeset/base/228056 Log: This commit marks the beginning of a new internal USB transfer statemachine. This work is about using a single state variable instead of multiple state bits as input for the USB statemachine to determine what to do in the various parts of the code. No APIs towards USB device drivers or USB host controller drivers will be changed. MFC after: 1 month Modified: head/sys/dev/usb/usb_transfer.h Modified: head/sys/dev/usb/usb_transfer.h ============================================================================== --- head/sys/dev/usb/usb_transfer.h Mon Nov 28 09:33:13 2011 (r228055) +++ head/sys/dev/usb/usb_transfer.h Mon Nov 28 09:54:41 2011 (r228056) @@ -28,6 +28,120 @@ #define _USB_TRANSFER_H_ /* + * Definition of internal USB transfer states: + * =========================================== + * + * The main reason there are many USB states is that we are allowed to + * cancel USB transfers, then start the USB transfer again and that + * this state transaction cannot always be done in a single atomic + * operation without blocking the calling thread. One reason for this + * is that the USB hardware sometimes needs to wait for DMA + * controllers to finish which is done asynchronously and grows the + * statemachine. + * + * When extending the following statemachine there are basically two + * things you should think about: Which states should be executed or + * modified in case of USB transfer stop and which states should be + * executed or modified in case of USB transfer start. Also respect + * the "can_cancel_immed" flag which basically tells if you can go + * directly from a wait state to the cancelling states. + */ + +enum { + /* XFER start execute state */ + + /* USB_ST_SETUP = 0 (already defined) */ + + /* XFER transferred execute state */ + + /* USB_ST_TRANSFERRED = 1 (already defined) */ + + /* XFER error execute state */ + + /* USB_ST_ERROR = 2 (already defined) */ + + /* XFER restart after error execute state */ + + USB_ST_RESTART = 8, + + /* XFER transfer idle state */ + + USB_ST_WAIT_SETUP, + + /* Other XFER execute states */ + + USB_ST_PIPE_OPEN = 16, + USB_ST_PIPE_OPEN_ERROR, + USB_ST_PIPE_OPEN_RESTART, + + USB_ST_BDMA_LOAD, + USB_ST_BDMA_LOAD_ERROR, + USB_ST_BDMA_LOAD_RESTART, + + USB_ST_IVAL_DLY, + USB_ST_IVAL_DLY_ERROR, + USB_ST_IVAL_DLY_RESTART, + + USB_ST_PIPE_STALL, + USB_ST_PIPE_STALL_ERROR, + USB_ST_PIPE_STALL_RESTART, + + USB_ST_ENTER, + USB_ST_ENTER_ERROR, + USB_ST_ENTER_RESTART, + + USB_ST_START, + USB_ST_START_ERROR, + USB_ST_START_RESTART, + + USB_ST_PIPE_CLOSE, + USB_ST_PIPE_CLOSE_ERROR, + USB_ST_PIPE_CLOSE_RESTART, + + USB_ST_BDMA_DLY, + USB_ST_BDMA_DLY_ERROR, + USB_ST_BDMA_DLY_RESTART, + + /* XFER transfer wait states */ + + USB_ST_WAIT_PIPE_OPEN = 64, + USB_ST_WAIT_PIPE_OPEN_ERROR, + USB_ST_WAIT_PIPE_OPEN_RESTART, + + USB_ST_WAIT_BDMA_LOAD, + USB_ST_WAIT_BDMA_LOAD_ERROR, + USB_ST_WAIT_BDMA_LOAD_RESTART, + + USB_ST_WAIT_IVAL_DLY, + USB_ST_WAIT_IVAL_DLY_ERROR, + USB_ST_WAIT_IVAL_DLY_RESTART, + + USB_ST_WAIT_PIPE_STALL, + USB_ST_WAIT_PIPE_STALL_ERROR, + USB_ST_WAIT_PIPE_STALL_RESTART, + + USB_ST_WAIT_ENTER, + USB_ST_WAIT_ENTER_ERROR, + USB_ST_WAIT_ENTER_RESTART, + + USB_ST_WAIT_START, + USB_ST_WAIT_START_ERROR, + USB_ST_WAIT_START_RESTART, + + USB_ST_WAIT_PIPE_CLOSE, + USB_ST_WAIT_PIPE_CLOSE_ERROR, + USB_ST_WAIT_PIPE_CLOSE_RESTART, + + USB_ST_WAIT_BDMA_DLY, + USB_ST_WAIT_BDMA_DLY_ERROR, + USB_ST_WAIT_BDMA_DLY_RESTART, + + USB_ST_WAIT_TRANSFERRED, + USB_ST_WAIT_TRANSFERRED_ERROR, + USB_ST_WAIT_TRANSFERRED_RESTART, +}; + +/* * The following structure defines the messages that is used to signal * the "done_p" USB process. */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 10:01:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCF23106564A; Mon, 28 Nov 2011 10:01:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC35E8FC0C; Mon, 28 Nov 2011 10:01:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASA1abX084082; Mon, 28 Nov 2011 10:01:36 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASA1ah7084080; Mon, 28 Nov 2011 10:01:36 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111281001.pASA1ah7084080@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 10:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228057 - head/cddl/lib/drti X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 10:01:36 -0000 Author: rwatson Date: Mon Nov 28 10:01:36 2011 New Revision: 228057 URL: http://svn.freebsd.org/changeset/base/228057 Log: Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of bsd.prog.mk -- we need to compile PIC, which requires a library build. With this change, USDT (userspace DTrace probes) work from within shared libraries. PR: kern/159046 Submitted by: Alex Samorukov Comments by: Scott Lystig Fritchie MFC after: 3 days Modified: head/cddl/lib/drti/Makefile Modified: head/cddl/lib/drti/Makefile ============================================================================== --- head/cddl/lib/drti/Makefile Mon Nov 28 09:54:41 2011 (r228056) +++ head/cddl/lib/drti/Makefile Mon Nov 28 10:01:36 2011 (r228057) @@ -18,4 +18,4 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \ -DPIC ${PICFLAG} -.include +.include From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 10:13:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AA96106564A; Mon, 28 Nov 2011 10:13:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id E5A398FC13; Mon, 28 Nov 2011 10:13:29 +0000 (UTC) Received: by mail-vx0-f182.google.com with SMTP id fk1so4529767vcb.13 for ; Mon, 28 Nov 2011 02:13:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wQ/Ql1NKiEq3UzbZxTH7fLQi+hLnNqxng7eWKM/QN6Y=; b=CjiderjnqiAdESGFkOUEvzAtTb+IE7hv0AgzAWn6BJz90lTaTZI1Q6ZKGq6diARzKE 95q/fTUPltYB62n5kcX8bmgMBbpq9mK/PYJZ741H0TJOpJkbBXUObKoM0QssGCREWhOk frzkpEb3cGhPAQ5MUderCHtwSULWeUxRwvt5o= MIME-Version: 1.0 Received: by 10.52.91.237 with SMTP id ch13mr42165785vdb.129.1322475209707; Mon, 28 Nov 2011 02:13:29 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Mon, 28 Nov 2011 02:13:29 -0800 (PST) In-Reply-To: <201111280810.pAS8AC1w080339@svn.freebsd.org> References: <201111280810.pAS8AC1w080339@svn.freebsd.org> Date: Mon, 28 Nov 2011 18:13:29 +0800 X-Google-Sender-Auth: rRBIOwTBxB3Oq-6mnUZfh_06yrQ Message-ID: From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228050 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 10:13:30 -0000 On 28 November 2011 16:10, Gleb Smirnoff wrote: > Author: glebius > Date: Mon Nov 28 08:10:12 2011 > New Revision: 228050 > URL: http://svn.freebsd.org/changeset/base/228050 > > Log: > =A0Fix build, fininshing r228018. Thanks, Adrian From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 10:44:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A7D1106564A; Mon, 28 Nov 2011 10:44:29 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id C6E468FC1A; Mon, 28 Nov 2011 10:44:28 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RUyKg-00037J-FP; Mon, 28 Nov 2011 12:21:06 +0200 Date: Mon, 28 Nov 2011 12:21:16 +0200 From: Aleksandr Rybalko To: Gleb Smirnoff Message-Id: <20111128122116.bb418eef.ray@dlink.ua> In-Reply-To: <201111280810.pAS8AC1w080339@svn.freebsd.org> References: <201111280810.pAS8AC1w080339@svn.freebsd.org> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228050 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 10:44:29 -0000 On Mon, 28 Nov 2011 08:10:12 +0000 (UTC) Gleb Smirnoff wrote: >> Author: glebius >> Date: Mon Nov 28 08:10:12 2011 >> New Revision: 228050 >> URL: http://svn.freebsd.org/changeset/base/228050 >> >> Log: >> Fix build, fininshing r228018. >> >> Modified: >> head/sys/mips/atheros/if_arge.c >> >> Modified: head/sys/mips/atheros/if_arge.c >> ============================================================================== >> --- head/sys/mips/atheros/if_arge.c Mon Nov 28 07:09:29 >> 2011 (r228049) +++ head/sys/mips/atheros/if_arge.c Mon >> Nov 28 08:10:12 2011 (r228050) @@ -192,9 +192,9 @@ static void >> arge_flush_ddr(struct arge_softc *sc) >> { >> if (sc->arge_mac_unit == 0) >> - ar71xx_device_flush_ddr_ge0(); >> + ar71xx_device_flush_ddr_ge(0); >> else >> - ar71xx_device_flush_ddr_ge1(); >> + ar71xx_device_flush_ddr_ge(1); >> } >> >> static int Hi, Pointy hat to: me Sorry for that. Thank you very much Gleb! WBW -- Alexandr Rybalko aka Alex RAY From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 11:10:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AD4D106564A; Mon, 28 Nov 2011 11:10:13 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3D1C8FC12; Mon, 28 Nov 2011 11:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASBAClR088056; Mon, 28 Nov 2011 11:10:12 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASBACYh088054; Mon, 28 Nov 2011 11:10:12 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111281110.pASBACYh088054@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 28 Nov 2011 11:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228058 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 11:10:13 -0000 Author: lstewart Date: Mon Nov 28 11:10:12 2011 New Revision: 228058 URL: http://svn.freebsd.org/changeset/base/228058 Log: Fast track MFC r228016: Plug a TCP reassembly UMA zone leak introduced in r226228 by only using the backup stack queue entry when the zone is exhausted, otherwise we leak a zone allocation each time we plug a hole in the reassembly queue. Reported by: many on freebsd-stable@ (thread: "TCP Reassembly Issues") Tested by: many on freebsd-stable@ (thread: "TCP Reassembly Issues") Reviewed by: bz (very brief sanity check) Approved by: re (kib) Modified: stable/9/sys/netinet/tcp_reass.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_reass.c ============================================================================== --- stable/9/sys/netinet/tcp_reass.c Mon Nov 28 10:01:36 2011 (r228057) +++ stable/9/sys/netinet/tcp_reass.c Mon Nov 28 11:10:12 2011 (r228058) @@ -233,23 +233,28 @@ tcp_reass(struct tcpcb *tp, struct tcphd * when the zone is exhausted. Otherwise we may get stuck. */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); - if (te == NULL && th->th_seq != tp->rcv_nxt) { - TCPSTAT_INC(tcps_rcvmemdrop); - m_freem(m); - *tlenp = 0; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit reached, " - "segment dropped\n", s, __func__); - free(s, M_TCPLOG); - } - return (0); - } else if (th->th_seq == tp->rcv_nxt) { - bzero(&tqs, sizeof(struct tseg_qent)); - te = &tqs; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit reached, " - "using stack for missing segment\n", s, __func__); - free(s, M_TCPLOG); + if (te == NULL) { + if (th->th_seq != tp->rcv_nxt) { + TCPSTAT_INC(tcps_rcvmemdrop); + m_freem(m); + *tlenp = 0; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, + NULL))) { + log(LOG_DEBUG, "%s; %s: global zone limit " + "reached, segment dropped\n", s, __func__); + free(s, M_TCPLOG); + } + return (0); + } else { + bzero(&tqs, sizeof(struct tseg_qent)); + te = &tqs; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, + NULL))) { + log(LOG_DEBUG, + "%s; %s: global zone limit reached, using " + "stack for missing segment\n", s, __func__); + free(s, M_TCPLOG); + } } } tp->t_segqlen++; From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 11:14:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C1F106567D; Mon, 28 Nov 2011 11:14:32 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8929B8FC1A; Mon, 28 Nov 2011 11:14:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASBEWZS088229; Mon, 28 Nov 2011 11:14:32 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASBEWtM088227; Mon, 28 Nov 2011 11:14:32 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111281114.pASBEWtM088227@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 28 Nov 2011 11:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228059 - releng/9.0/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 11:14:32 -0000 Author: lstewart Date: Mon Nov 28 11:14:32 2011 New Revision: 228059 URL: http://svn.freebsd.org/changeset/base/228059 Log: Fast track MFC r228016: Plug a TCP reassembly UMA zone leak introduced in r226228 by only using the backup stack queue entry when the zone is exhausted, otherwise we leak a zone allocation each time we plug a hole in the reassembly queue. Reported by: many on freebsd-stable@ (thread: "TCP Reassembly Issues") Tested by: many on freebsd-stable@ (thread: "TCP Reassembly Issues") Reviewed by: bz (very brief sanity check) Approved by: re (kib) Modified: releng/9.0/sys/netinet/tcp_reass.c Directory Properties: releng/9.0/sys/ (props changed) Modified: releng/9.0/sys/netinet/tcp_reass.c ============================================================================== --- releng/9.0/sys/netinet/tcp_reass.c Mon Nov 28 11:10:12 2011 (r228058) +++ releng/9.0/sys/netinet/tcp_reass.c Mon Nov 28 11:14:32 2011 (r228059) @@ -233,23 +233,28 @@ tcp_reass(struct tcpcb *tp, struct tcphd * when the zone is exhausted. Otherwise we may get stuck. */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); - if (te == NULL && th->th_seq != tp->rcv_nxt) { - TCPSTAT_INC(tcps_rcvmemdrop); - m_freem(m); - *tlenp = 0; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit reached, " - "segment dropped\n", s, __func__); - free(s, M_TCPLOG); - } - return (0); - } else if (th->th_seq == tp->rcv_nxt) { - bzero(&tqs, sizeof(struct tseg_qent)); - te = &tqs; - if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: global zone limit reached, " - "using stack for missing segment\n", s, __func__); - free(s, M_TCPLOG); + if (te == NULL) { + if (th->th_seq != tp->rcv_nxt) { + TCPSTAT_INC(tcps_rcvmemdrop); + m_freem(m); + *tlenp = 0; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, + NULL))) { + log(LOG_DEBUG, "%s; %s: global zone limit " + "reached, segment dropped\n", s, __func__); + free(s, M_TCPLOG); + } + return (0); + } else { + bzero(&tqs, sizeof(struct tseg_qent)); + te = &tqs; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, + NULL))) { + log(LOG_DEBUG, + "%s; %s: global zone limit reached, using " + "stack for missing segment\n", s, __func__); + free(s, M_TCPLOG); + } } } tp->t_segqlen++; From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 12:29:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFEBB106564A; Mon, 28 Nov 2011 12:29:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBEC8FC08; Mon, 28 Nov 2011 12:29:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASCTGng090821; Mon, 28 Nov 2011 12:29:16 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASCTGpC090816; Mon, 28 Nov 2011 12:29:16 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201111281229.pASCTGpC090816@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 28 Nov 2011 12:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228060 - in head: contrib/gperf contrib/gperf/doc contrib/gperf/lib contrib/gperf/src contrib/gperf/tests gnu/usr.bin/gperf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 12:29:16 -0000 Author: bapt (ports committer) Date: Mon Nov 28 12:29:16 2011 New Revision: 228060 URL: http://svn.freebsd.org/changeset/base/228060 Log: upgrade gperf to the last GPLv2 version (3.0.3) Reviewed by: cognet Approved by: cognet Added: head/contrib/gperf/configure.ac head/contrib/gperf/doc/configure.ac head/contrib/gperf/lib/configure.ac head/contrib/gperf/lib/getline.cc head/contrib/gperf/lib/getline.h head/contrib/gperf/src/config.h_vms head/contrib/gperf/src/configure.ac head/contrib/gperf/src/input.cc head/contrib/gperf/src/input.h head/contrib/gperf/src/keyword-list.cc head/contrib/gperf/src/keyword-list.h head/contrib/gperf/src/keyword-list.icc head/contrib/gperf/src/keyword.cc head/contrib/gperf/src/keyword.h head/contrib/gperf/src/keyword.icc head/contrib/gperf/src/output.cc head/contrib/gperf/src/output.h head/contrib/gperf/src/positions.cc head/contrib/gperf/src/positions.h head/contrib/gperf/src/positions.icc head/contrib/gperf/src/search.cc head/contrib/gperf/src/search.h Deleted: head/contrib/gperf/acconfig.h head/contrib/gperf/configure.in head/contrib/gperf/doc/configure.in head/contrib/gperf/doc/gperf.texi head/contrib/gperf/doc/gpl.texinfo head/contrib/gperf/doc/texinfo.tex head/contrib/gperf/lib/configure.in head/contrib/gperf/src/configure.in head/contrib/gperf/src/gen-perf.cc head/contrib/gperf/src/gen-perf.h head/contrib/gperf/src/iterator.cc head/contrib/gperf/src/iterator.h head/contrib/gperf/src/key-list.cc head/contrib/gperf/src/key-list.h head/contrib/gperf/src/list-node.cc head/contrib/gperf/src/list-node.h head/contrib/gperf/src/new.cc head/contrib/gperf/src/read-line.cc head/contrib/gperf/src/read-line.h head/contrib/gperf/src/read-line.icc head/contrib/gperf/src/trace.cc head/contrib/gperf/src/trace.h head/contrib/gperf/src/vectors.cc head/contrib/gperf/src/vectors.h head/contrib/gperf/tests/ Modified: head/contrib/gperf/AUTHORS head/contrib/gperf/COPYING head/contrib/gperf/ChangeLog head/contrib/gperf/FREEBSD-Xlist head/contrib/gperf/INSTALL head/contrib/gperf/Makefile.devel head/contrib/gperf/Makefile.in head/contrib/gperf/NEWS head/contrib/gperf/README head/contrib/gperf/aclocal.m4 head/contrib/gperf/configure head/contrib/gperf/doc/Makefile.in head/contrib/gperf/doc/configure head/contrib/gperf/doc/gperf.1 head/contrib/gperf/doc/help2man head/contrib/gperf/lib/Makefile.in head/contrib/gperf/lib/configure head/contrib/gperf/lib/hash.cc head/contrib/gperf/lib/hash.h head/contrib/gperf/src/Makefile.in head/contrib/gperf/src/bool-array.cc head/contrib/gperf/src/bool-array.h head/contrib/gperf/src/bool-array.icc head/contrib/gperf/src/config.h.in head/contrib/gperf/src/configure head/contrib/gperf/src/hash-table.cc head/contrib/gperf/src/hash-table.h head/contrib/gperf/src/main.cc head/contrib/gperf/src/options.cc head/contrib/gperf/src/options.h head/contrib/gperf/src/options.icc head/contrib/gperf/src/version.cc head/contrib/gperf/src/version.h head/gnu/usr.bin/gperf/Makefile head/gnu/usr.bin/gperf/config.h Modified: head/contrib/gperf/AUTHORS ============================================================================== --- head/contrib/gperf/AUTHORS Mon Nov 28 11:14:32 2011 (r228059) +++ head/contrib/gperf/AUTHORS Mon Nov 28 12:29:16 2011 (r228060) @@ -1,2 +1,2 @@ Douglas C. Schmidt -Bruno Haible +Bruno Haible Modified: head/contrib/gperf/COPYING ============================================================================== --- head/contrib/gperf/COPYING Mon Nov 28 11:14:32 2011 (r228059) +++ head/contrib/gperf/COPYING Mon Nov 28 12:29:16 2011 (r228060) @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Modified: head/contrib/gperf/ChangeLog ============================================================================== --- head/contrib/gperf/ChangeLog Mon Nov 28 11:14:32 2011 (r228059) +++ head/contrib/gperf/ChangeLog Mon Nov 28 12:29:16 2011 (r228060) @@ -1,3 +1,1646 @@ +2007-04-30 Brendan Kehoe + + * gperf-3.0.3 released. + * src/version.cc: Bump to 3.0.3. + * tests/*.exp: Bump to 3.0.3 in header. + * doc/gperf.1: Regenerate with gperf 3.0.3. + +2007-04-06 Bruno Haible + + Improve support for mingw. + * tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal, + check-lang-utf8, check-lang-ucs2): Remove '\r' from output before diff. + (POSTPROCESS_FOR_MINGW): New variable. + (check-test): Use it to postprocess output before diff. + +2007-04-04 Bruno Haible + + Support for newer GNU standards. + * doc/configure.ac (mandir): Remove assignment. + * doc/Makefile.in (datarootdir): New variable. + (docdir, dvidir, psdir, pdfdir, htmldir): Use value determined by + autoconf. + * configure.ac: Require autoconf >= 2.60. + * doc/configure.ac: Likewise. + * lib/configure.ac: Likewise. + * src/configure.ac: Likewise. + * tests/configure.ac: Likewise. + * configure: Regenerated with autoconf-2.61. + * doc/configure: Likewise. + * lib/configure: Likewise. + * src/configure: Likewise. + * tests/configure: Likewise. + * src/config.h.in: Likewise. + * src/config.h.msvc: Likewise. + * src/config.h_vms: Likewise. + +2007-04-04 Bruno Haible + + * doc/Makefile.in (MAKEINFO): Disable also the LC_MESSAGES and LC_ALL + environment variables. + +2007-04-04 Bruno Haible + + * configure.ac: Renamed from configure.in. + * doc/configure.ac: Renamed from doc/configure.in. + * lib/configure.ac: Renamed from lib/configure.in. + * src/configure.ac: Renamed from src/configure.in. + * tests/configure.ac: Renamed from tests/configure.in. + * Makefile.devel: Update. + * INSTALL: Update. + +2007-03-31 Bruno Haible + + * tests/test.c (in_word_set): New declaration. + * tests/test2.c (in_word_set): Likewise. + +2007-03-31 Bruno Haible + + * src/options.cc (Options::parse_options): Bump copyright year. + +2007-03-31 Bruno Haible + + * doc/gperf.texi: Fix typo. + +2007-03-31 Bruno Haible + + Change generated code after the meaning of __inline is changed in + GCC 4.3. + * src/output.cc (Output::output_lookup_function): Emit an inline + marker that also works with gcc-4.3 in c99 or gnu99 mode. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + Reported by Bruce Korb . + +2006-06-29 Brendan Kehoe + + * gperf-3.0.2 released. + + * doc/Makefile.in (all): No longer depend on dvi. + +2006-01-22 Brendan Kehoe + + * doc/gperf.texi: Update copyright to be 1989-2006. + (UPDATED): Change to 22 January 2006. + * doc/gperf.1 (TH): Fix date. + * configure.in: Update copyright years. + * configure: Regenerate. + * src/Makefile.in: Update copyright years. + + * doc/gperf.{dvi,ps,pdf}: Regenerated by manually invoking tex + instead of trying to use texi2dvi, whose run of etex ends up + actually always running pdfetex, thus always recreating gperf.pdf. + +2006-01-13 Brendan Kehoe + + * NEWS: Add note about #line directive fix. + * doc/gperf.1: Regenerate with Makefile.devel. + + * doc/gperf.texi (UPDATED): Correct to be today. + * doc: Regenerated by doing make in a configured tree. + Requires makeinfo, texi2dvi, texi2pdf, and texi2html. + + * configure.in: Add AC_OBJEXT and AC_EXEEXT. + * lib/Makefile.in (OBJEXT): Define for subst. + (OBJECTS): Use $(OBJEXT) instead of '.o'. + * src/Makefile.in: Make dependencies use $(OBJEXT). + (OBJEXT, EXEEXT): Define for subst. + (TARGETPROG): Add $(EXEEXT). + (OBJECTS): Use $(OBJEXT) instead of '.o'. + (clean): Remove *.$(OBJEXT) instead of *.o. + +2006-01-13 Bruno Haible + + Fix #line directives for filenames containing backslashes. + * src/output.cc (output_line_directive): New function. + (output_keyword_entry, Output::output): Use it. + Reported by Alexander . + + * src/options.cc (Options::parse_options): Update years in --version + output. + +2005-08-29 Brendan Kehoe + + * src/keyword.cc: Tweak comment to avoid nesting. + +2005-08-27 Bruno Haible + + Fix missing ranlib detection when cross-compiling. + * aclocal.m4 (CL_PROG_RANLIB): Remove macro. + * lib/configure.in: Use AC_PROG_RANLIB instead of CL_PROG_RANLIB. + +2005-07-30 Bruno Haible + + * src/version.cc: Bump version number to 3.0.2. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + +2005-07-30 Bruno Haible + + * src/positions.h: Add forward declarations of friend classes. + Needed for compilation with g++ 4.0. + +2004-08-22 Bruno Haible + + * tests/Makefile.in (check-lang-syntax): Add test for the + --length-table-name option. + * tests/test-6.exp: Update. + +2004-08-21 Bruce Lilly + + * src/input.cc (Input::read_input): Accept length-table-name + declaration. + * src/options.h (Options::get_lengthtable_name, + Options::set_lengthtable_name): New declarations. + (Options): Add field _lengthtable_name. + * src/options.icc (Options::get_lengthtable_name): New inline method. + * src/options.cc (DEFAULT_LENGTHTABLE_NAME): New constant. + (Options::long_usage): Document --length-table-name option. + (Options::Options): Initialize _lengthtable_name field. + (Options::~Options): Update. + (Options::set_lengthtable_name): New method. + (long_options): Add option --length-table-name. + (Options::parse_options): Implement --length-table-name option. + * src/output.cc (Output::output_keylength_table, output_switch_case, + Output::output_lookup_function_body): Use option.get_lengthtable_name. + * doc/gperf.texi (Gperf Declarations): Document %define + length-table-name. + (Output Details): Document --length-table-name option. + +2003-06-12 Bruno Haible + + * gperf-3.0.1 released. + + * src/version.cc: Bump version number to 3.0.1. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + +2003-05-31 Bruno Haible + + * doc/gperf.texi (User-supplied Struct): Mention the possibility of an + abbreviated struct declaration. + * src/input.cc (Input::read_input): Support struct declarations of the + form "struct foo;". + * tests/incomplete.gperf: New file. + * tests/incomplete.exp: New file. + * tests/Makefile.in (check-test): Check incomplete.gperf too. + Reported by Rob Leslie . + +2003-05-20 Bruno Haible + + * doc/Makefile.in (gperf.ps): Don't use $< in a target rule. + +2003-05-27 Bruno Haible + + * Makefile.vms (CC): Correct value. + (getopt.obj, getopt1.obj, getline.obj, hash.obj): Don't set + HAVE_CONFIG_H. + +2003-05-17 Bruno Haible + + * Makefile.msvc (DEBUGFLAGS): New variable. + (gperf.exe): Use it, and MFLAGS too. + +2003-05-08 Bruno Haible + + * gperf-3.0 released. + +2003-05-07 Bruno Haible + + * src/version.cc: Bump version number to 3.0. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + + * src/configure.in: Fix AC_INIT argument. + + * Makefile.devel (configure, lib/configure, src/configure, + tests/configure, doc/configure): Use the newest autoconf. + (src/config.h.in): Use the newest autoheader. + +2003-05-03 Bruno Haible + + * doc/gperf.texi: Use two spaces as sentence separator, as recommended + by the texinfo manual. + +2003-04-12 Bruno Haible + + * doc/configure.in (mandir): Change default value. + * doc/Makefile.in (docdir): Use datadir instead of prefix. + * Makefile.msvc (datadir): New variable. + (mandir, docdir): Use it instead of prefix. + (install, installdirs): Update. + * Makefile.vms (datadir): New variable. + (mandir, docdir): Use it instead of prefix. + (install, installdirs): Update. + +2003-04-12 Bruno Haible + + * README.vms: New file. + * Makefile.vms: New file. + * Makefile.devel (src/config.h_vms): New rule. + (all): Depend on it. + +2003-03-19 Bruno Haible + + * src/input.cc (Input::read_input): Ignore comments at the beginning + of the declarations section. + * doc/gperf.texi (Controls for GNU indent): New section. + Reported by Bruce Lilly . + +2003-03-19 Bruno Haible + + * src/output.cc (Output::output_hash_function): Avoid lint warning if + not all arguments of the hash function are used. Avoid lint warning + for fallthrough in switch. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/java.exp, tests/languages.exp, + tests/modula2.exp, tests/objc.exp: All /*FALLTHROUGH*/ to expected + output. + Reported by Bruce Lilly . + +2003-03-01 Bruno Haible + + * src/options.h (Options::set_initializer_suffix): New declaration. + * src/options.cc (Options::set_initializer_suffix): New method. + * src/input.cc (Input::read_input): Recognize %define + initializer-suffix. + * doc/gperf.texi (Gperf Declarations): Document %define + initializer-suffix. + * NEWS: Update. + +2003-02-26 Bruno Haible + + * Makefile.msvc: New file. + * README.woe32: New file. + * Makefile.devel (all): Depend on src/config.h.msvc. + (src/config.h.msvc): New rule. + +2003-01-07 Bruno Haible + + * src/input.h (Input::_charset_dependent): New field. + * src/input.cc (Input::read_input): Also set _charset_dependent. + * src/main.cc (main): Pass _charset_dependent from Input to Output. + * src/output.h (Output::Output): Add charset_dependent argument. + (Output::_charset_dependent): New field. + * src/output.cc (Output::Output): Add charset_dependent argument. + (Output::output): Provoke a compilation error if the execution + character set doesn't match the expectations. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + + * src/options.cc (Options::long_usage): Change bug report address to + . + * tests/test-6.exp: Update. + + * src/output.cc (USE_DOWNCASE_TABLE): New macro. + (output_upperlower_table): New function. + (output_upperlower_strcmp, output_upperlower_strncmp, + output_upperlower_memcmp): Emit gperf_downcase array accesses. + (Output::output): Call output_upperlower_table. + * tests/permutc2.exp: Update. + + * src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast. + (Only in GCC a cast of an lvalue is an lvalue.) + +2003-01-01 Bruno Haible + + * src/options.cc (Options::parse_options): Update copyright year. + + * doc/gperf.texi (@author): Add me. + + * src/options.h (NULLSTRINGS): New enum value. + (Options::get_stringpool_name, Options::set_stringpool_name): New + method declarations. + (Options::_stringpool_name): New field. + * src/options.icc (Options::get_stringpool_name): New method. + * src/options.cc (DEFAULT_STRINGPOOL_NAME): New variable. + (Options::long_usage): Document -Q and --null-strings. + (Options::Options): Initialize _stringpool_name. + (Options::~Options): Output _stringpool_name, NULLSTRINGS values too. + (Options::set_stringpool_name): New method. + (long_options): Add options --string-pool-name, --null-strings. + (Options::parse_options): Implement options -P, -Q and --null-strings. + * src/input.cc (Input::read_input): Recognize declarations %pic, + %define string-pool-name, %null-strings. + * src/output.h (Output::output_string_pool, + Output::output_lookup_pools): New method declarations. + (Output::_wordlist_eltype): New field. + * src/output.cc (Output::output_keylength_table): Trivial + simplification. + (Output::output_string_pool): New method. + (output_keyword_entry): Add stringpool_index argument. For SHAREDLIB, + use struct offsets. + (output_keyword_blank_entries): For SHAREDLIB, use -1 instead of "". + (Output::output_keyword_table): Use _wordlist_eltype instead of + _struct_tag. Compute stringpool_index for output_keyword_entry. + (Output::output_lookup_pools): New method. + (Output::output_lookup_function_body): Use _wordlist_eltype instead of + _struct_tag. For SHAREDLIB, use "+ stringpool" to convert offsets to + strings. Use "o >= 0" to test for nonempty table entry. + (Output::output_lookup_function): Call output_lookup_pools. + (Output::output): Initialize _wordlist_eltype. Call + output_lookup_pools. + * tests/jstest4.gperf: New file. + * tests/test-6.exp: Update. + * tests/Makefile.in (check-lang-syntax): Drop test of -p. Add tests of + -P and -Q. + * doc/gperf.texi (User-supplied Struct): Mention that first field has + to be of type 'int' if -P is given. + (Gperf Declarations): Document %pic, %define string-pool-name, + %null-strings. + (Output Details): Update description of option -P. Document options -Q + and --null-strings. + + * tests/Makefile.in (check-link-c, check-ada, check-pascal, + check-test): Omit option -p. + * tests/c-parse.exp: Regenerated. + * tests/chill.exp: Regenerated. + * tests/cplusplus.exp: Regenerated. + * tests/gpc.exp: Regenerated. + * tests/java.exp: Regenerated. + * tests/objc.exp: Regenerated. + * tests/test-4.exp: Regenerated. + + * src/output.cc (Output::output_lookup_function_body): Omit the + multicompare code section and its variables when it is not used. + * tests/chill.exp: Regenerated. + + * src/output.c (Output_Compare::output_firstchar_comparison): New + method. + (Output_Compare_Strcmp::output_comparison, + Output_Compare_Strncmp::output_comparison, + Output_Compare_Memcmp::output_comparison): Use it. + * tests/permutc2.exp: Update. + + * tests/smtp.gperf: New file, based on a contribution by Bruce Lilly. + * tests/Makefile.in (check-smtp): New rule. + (check): Depend on it. + (clean): Update. + +2002-12-12 Bruno Haible + + * src/search.h (Search::init_selchars_tuple, + Search::count_duplicates_tuple): Add alpha_unify argument. + (Search::count_duplicates_tuple): New method declaration. + * src/search.cc (Search::init_selchars_tuple, + Search::count_duplicates_tuple): Add alpha_unify argument. + (Search::find_positions): Update. + (Search::count_duplicates_tuple): New method. + (Search::count_duplicates_multiset): Free temp alpha_unify vector. + (Search::find_alpha_inc): Call count_duplicates_tuple. + + * src/configure.in: Add test for stack-allocated variable-size arrays. + * src/config.h.in: Regenerated. + * src/search.cc: Include config.h. + (DYNAMIC_ARRAY, FREE_DYNAMIC_ARRAY): New macros. + (Search::find_alpha_inc, Search::count_possible_collisions, + Search::find_asso_values): Use them. + * src/Makefile.in (search.o): Depend on config.h. + + * src/search.h (Search::keyword_list_length, Search::max_key_length, + Search::get_max_keysig_size, Search::prepare): Remove declarations. + (Search::prepare): Renamed from Search::preprepare. + (Search::_max_selchars_length): New field. + * src/search.cc (Search::prepare): Renamed from Search::preprepare. + (Search::prepare_asso_values): Merged with old Search::prepare. + Initialize _max_selchars_length. + (Search::keyword_list_length): Remove function. Use _list_len instead. + (Search::max_key_length): Remove function. Use _max_key_len instead. + (Search::get_max_keysig_size): Remove function. Use + _max_selchars_length instead. + (Search::count_possible_collisions, Search::find_asso_values): Update. + (Search::find_good_asso_values): Call just prepare_asso_values. + (Search::~Search): Update. + + * src/output.h (Output::output_asso_values_ref): New declaration. + * src/output.cc (char_to_index): Remove variable. + (Output::output_asso_values_ref): New function. + (Output::output_hash_function): Use it. + (Output::output): Update. + + * src/positions.h (Positions::is_useall, Positions::set_useall, + Positions::iterator, Positions::reviterator): New method declarations. + (Positions::_useall): New field. + (PositionIterator): Make constructor private. Add a constructor and a + copy constructor. + (PositionIterator::remaining): New declaration. + (PositionReverseIterator): Make constructor private. Add a constructor + and a copy constructor. + (PositionReverseIterator::remaining): New declaration. + (PositionReverseIterator::_minindex): New field. + * src/positions.icc (Positions::Positions): Initialize _useall. + (Positions::operator=): Likewise. + (Positions::is_useall, Positions::set_useall): New methods. + (Positions::sort): Do nothing if _useall is set. + (Positions::iterator, Positions::reviterator): New methods. + (PositionIterator::PositionIterator): New constructor. + (PositionIterator::remaining): New method. + (PositionReverseIterator::PositionReverseIterator): New constructor. + (PositionReverseIterator::next): Use _minindex as bound. + (PositionReverseIterator::remaining): New method. + * src/positions.cc (Positions::add, Positions::remove): Reset the + useall flag. + (Positions::print): Handle the useall case. + * src/options.h (ALLCHARS): Remove. + * src/options.cc (Options::~Options): Update. + (Options::parse_options): Use Positions::set_useall(). + * src/keyword.h (KeywordExt::init_selchars_tuple, + KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low): + Remove use_all_chars argument. + * src/keyword.cc (KeywordExt::init_selchars_low): Remove use_all_chars + argument. Tell the position iterator to stop at _allchars_length. + Remove special case code for -k'*'. + (KeywordExt::init_selchars_tuple, KeywordExt::init_selchars_multiset): + Remove use_all_chars argument. + * src/search.h (Search::init_selchars_tuple): Remove use_all_chars + argument. + (Search::init_selchars_multiset): Likewise. + * src/search.cc (Search::init_selchars_tuple): Remove use_all_chars + argument. + (Search::count_duplicates_tuple, Search::find_positions): Update. + (Search::compute_alpha_unify): Remove special case code for -k'*'. + (Search::init_selchars_multiset): Remove use_all_chars argument. + (Search::count_duplicates_multiset): Update. + (Search::find_alpha_inc): Remove special case code for -k'*'. + (Search::prepare): Update. + (Search::get_max_keysig_size): Update. + * src/output.cc (Output::output_hash_function): Remove special case + code for -k'*'. + * tests/chill.exp: Regenerated. + +2002-12-11 Bruno Haible + + Change the positions to be 0-based, instead of 1-based. + * src/positions.h (Positions::LASTCHAR): Set to -1. + (Positions::MAX_SIZE): New constant. + (Positions::pointer): Change return type. + (Positions::_positions): Change element type. + (PositionIterator::EOS, PositionReverseIterator::EOS): Set to -2. + * src/positions.icc (Positions::pointer): Change return type. + (Positions::sort): Update. + * src/positions.cc (Positions::contains, Positions::add, + Positions::remove): Update. + (Positions::print): Update. Fix off-by-one bug. + * src/options.cc (Options::~Options): Update. + (Options::parse_options): Set BAD_VALUE to -3. Update. + * src/keyword.cc (KeywordExt::init_selchars_low): Update. + * src/search.cc (Search::find_positions, Search::compute_alpha_unify, + Search::find_alpha_inc): Update. + * src/output.cc (Output::output_hash_function): Update. Don't emit + a 'case' statement right after 'default:'. + * tests/c-parse.exp: Regenerated. + * tests/charsets.exp: Regenerated. + * tests/cplusplus.exp: Regenerated. + * tests/java.exp: Regenerated. + * tests/languages.exp: Regenerated. + * tests/modula2.exp: Regenerated. + * tests/objc.exp: Regenerated. + +2002-12-10 Bruno Haible + + * src/options.h: Reorder enum values. + (Options::short_usage, Options::long_usage): Make static. + * src/options.cc (Options::short_usage); No longer print a monster + usage line. + (Options::print_options): Improve output of options like + --key-positions=1,2,$. + (Options::~Options): Update. + + * src/options.h (UPPERLOWER): New enum value. + * src/options.cc (Options::long_usage): Document option --ignore-case. + (Options::~Options): Update. + (long_options): Add option --ignore-case. + (Options::parse_options): Handle option --ignore-case. + * src/input.cc (Input::read_input): Recognize option %ignore-case. + * src/keyword.h (KeywordExt::init_selchars_tuple, + KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low): + Add alpha_unify argument. + * src/keyword.cc (KeywordExt::init_selchars_low): Add alpha_unify + argument. + (KeywordExt::init_selchars_tuple): Add alpha_unify argument. + (KeywordExt::init_selchars_multiset): Add alpha_unify argument. + * src/search.h (Search::compute_alpha_size, + Search::compute_alpha_unify): New declarations. + (Search::init_selchars_multiset): Add alpha_unify argument. + (Search::_alpha_unify): New field. + * src/search.cc (Search::compute_alpha_size, + Search::compute_alpha_unify): New functions. + (Search::init_selchars_tuple): Update. + (Search::find_positions): Temporarily set _alpha_unify. Perform a + case insensitive comparison if needed. + (Search::init_selchars_multiset): Add alpha_unify argument. + (Search::count_duplicates_multiset): Call compute_alpha_unify. + (Search::find_alpha_inc): Temporarily set _alpha_unify. At the end, + set _alpha_size and _alpha_unify. + (Search::prepare): Update. Don't compute _alpga_size here. + (Search::optimize): Propagate unified asso_values. + (Search::~Search) Delete _alpha_unify. + * src/output.cc (output_upperlower_strcmp, output_upperlower_strncmp, + output_upperlower_memcmp): New functions. + (Output_Compare_Strcmp::output_comparison, + Output_Compare_Strncmp::output_comparison, + Output_Compare_Memcmp::output_comparison): Use the case-insensitive + comparison function if --ignore-case was given. + (Output::output): Emit the auxiliary case-insensitive comparison + function if needed. + * tests/permutc2.gperf, tests/permutc2.exp: New files. + * tests/Makefile.in (check-test): Also check permutc2.gperf. + * tests/test-6.exp: Update. + * doc/gperf.texi (Gperf Declarations): Document %ignore-case. + (Input Details): Document option --ignore-case. + * NEWS: Update. + + * src/search.cc (Search::optimize): Fill unused asso_values[] entries + with a large value. + * src/output.h (Output::Output): Remove occurrences argument. + (Output::_occurrences): Remove field. + * src/output.cc (Output::Output): Remove occurrences argument. + (Output::output_hash_function): Ignore _occurrences. + * src/main.cc (main): Don't pass the _occurrences to Output. + + * src/search.cc (Search::preprepare): Exit if keywords contain + out-of-range characters. + + * src/search.cc (for): Define so as to avoid errors with old compilers. + + * src/options.h (SHAREDLIB): New enum value. + * src/options.cc (Options::short_usage): Mention option -P. + (Options::long_usage): Document option -P. + (long_options): Add option --pic. + (Options::parse_options): Handle option -P/--pic. + * src/output.cc (output_keyword_blank_entries): When SHAREDLIB is + specified, emit NULL pointers instead of "". + (Output::output_lookup_function_body): When SHAREDLIB is specified + and SWITCH and DUP and not specified, test the table entry against + NULL before the string comparison. + * tests/test-6.exp: Update. + * doc/gperf.texi (Output Details): Document option -P. + * NEWS: Update. + Suggested by Ulrich Drepper. + +2002-12-08 Bruno Haible + + * tests/permut2.gperf, tests/permut2.exp: New files. + * tests/permut3.gperf, tests/permut3.exp: New files. + * tests/charsets.gperf: New file, from Bruce Lilly. + * tests/charsets.exp: New file. + * tests/languages.gperf: New file, from Bruce Lilly. + * tests/languages.exp: New file. + * Makefile.in (check-test): Test them all. + + Completely new asso_values search algorithm. + * src/search.h (Search::compute_occurrence, Search::clear_determined, + Search::set_determined, Search::already_determined, Search::reorder): + Remove functions. + (Search::init_asso_values, Search::sort_by_occurrence, + Search::compute_occurrence, Search::sort_by_occurrence, + Search::has_collisions, Search::collision_prior_to): Remove functions. + (Search::compute_partition, Search::count_possible_collisions, + Search::unchanged_partition): New method declarations. + (Search::_determined): Remove field. + * src/search.cc (Search::prepare): Don't initialize _determined. + (Search::compute_occurrence, greater_by_occurrence, + Search::clear_determined, Search::set_determined, + Search::already_determined, Search::reorder): Remove functions. + (Search::init_asso_values, compute_disjoint_union, + Search::sort_by_occurrence, Search::compute_occurrence, + Search::sort_by_occurrence, Search::has_collisions, + Search::collision_prior_to): Remove functions. + (StackEntry): Remove class. + (EquivalenceClass, Step): New classes. + (equals, Search::compute_partition, delete_partition, + Search::count_possible_collisions, Search::unchanged_partition): New + functions. + (Search::find_asso_values): Completely rewritten. + (Search::find_good_asso_values): Don't call reorder(). + (Search::~Search): Don't free _determined. + * src/keyword.h (KeywordExt::_occurrence): Remove field. + * src/options.h (ORDER, FAST, OPT_CHOICE): Remove enum values. + (Options::_iterations): Remove field. + * src/options.icc (Options::get_iterations): Remove method. + * src/options.cc (Options::long_usage): Remove mention of -f and -o. + (Options::Options): Don't initialize _iterations. + (Options::~Options): Update. + (Options::parse_options): Do nothing for options -f, -o, -O. + * doc/gperf.texi: (Contributors): Update. + (Algorithmic Details): Remove options -f and -o. Update description + of option -s. + * tests/c-parse.exp, tests/chill.exp, tests/cplusplus.exp, + tests/gpc.exp, tests/java.exp, tests/modula2.exp, tests/objc.exp, + tests/test-4.exp): Regenerated, smaller than before. + * tests/test-6.exp: Update. + * NEWS: Update. + +2002-12-08 Bruno Haible + + * src/search.h (Search::_alpha_size): Change type to 'unsigned int'. + (Search::_asso_value_max): Likewise. + * src/search.cc (Search::prepare_asso_values): Update. + (Search::init_asso_values): Update. + (Search::~Search): Update. + * src/output.h (Output::Output): Change alpha_size type to + 'unsigned int'. + (Output::_alpha_size): Change type to 'unsigned int'. + * src/output.cc (Output::Output): Change alpha_size type to + 'unsigned int'. + (Output::output_hash_function): Update. + +2002-12-07 Bruno Haible + + * src/options.h (OPT_CHOICE): New enum value. + * src/options.cc (Options::~Options): Update. + (long_options): New option --optimized-collision-resolution. + (Options::parse_options): Accept option -O. + * src/search.h (Search::sort_by_occurrence): Change argument to + 'unsigned int'. + (Search::compute_occurrence, Search::sort_by_occurrence): New method + declarations. + * src/search.cc (Search::sort_by_occurrence): Change argument to + 'unsigned int'. + (Search::compute_occurrence, Search::sort_by_occurrence): New methods. + (Search::find_asso_values): Implement OPT_CHOICE. More debugging + output. + + * src/search.cc (Search::prepare_asso_values) [DEBUG]: Also print + the keyword list in order. + (Search::find_asso_values) [DEBUG]: Upon failure, print the union_set. + + * src/options.h (Options::get_size_multiple): Change return type to + float. + (Options::_size_multiple): Change type to float. + * src/options.icc (Options::get_size_multiple): Change return type to + float. + * src/options.cc (Options::long_usage): Update description of option + -s. + (Options::~Options): Update. + (Options::parse_options): For option -s, accept a fraction. + * src/search.cc (Search::prepare_asso_values): Use get_size_multiple + as it is. + * tests/test-6.exp: Update. + * doc/gperf.texi (Algorithmic Details): Update description of option + -s. + +2002-12-04 Bruno Haible + + Improve debugging output. + * src/hash-table.h (Hash_Table::dump): New method. + * src/hash-table.cc (Hash_Table::dump): New method, extracted from + destructor. + (Hash_Table::~Hash_Table): No longer print the contents. + * src/positions.h (PositionReverseIterator): New class. + * src/positions.icc (PositionReverseIterator::PositionReverseIterator, + PositionReverseIterator::next): New methods. + * src/search.cc (Search::find_positions): If debugging, print the + result. + (Search::find_alpha_inc): If debugging, print the result. + (Search::prepare): Explicitly dump the hash table's contents here. + + Portability fixes. + * src/positions.h (Positions::LASTCHAR, Positions::MAX_KEY_POS, + PositionIterator::EOS): Define as compile-time constants using enum. + * src/bool-array.cc (Bool_Array::~Bool_Array): Remove const qualifier + of pointer to be deleted. + * src/input.cc (Input::~Input): Likewise. + * src/keyword.cc (KeywordExt::delete_selchars): Likewise. + * src/main.cc (main): Likewise. + * src/hash-table.cc (Hash_Table::~Hash_Table): Limit scope of 'for' + variables. + * src/search.cc (Search::prepare_asso_values): Use a static_cast to + convert from time_t to long. This is possible because ISO C 99 says + time_t is a numeric type. + +2002-11-20 Bruno Haible + + * src/search.cc (Search::find_asso_values): Avoid gcc warnings about + uninitialized variables. + + Implement backtracking. + * src/search.h (Search::has_collisions): Renamed from + Search::less_collisions. Return a boolean. + * src/search.cc (Search::has_collisions): Renamed from + Search::less_collisions. Return a boolean. + (StackEntry): Remove field _collisions_so_far. + (Search::find_asso_values): Backtrack when encountering an unresolved + collision. Assume collisions_so_far is always zero. + (Search::optimize): Exit if there are accidental duplicates at the end. + * src/output.cc (Output::num_hash_values): Simply return the list + length. + (Output::output_keylength_table): Remove handling of accidental + duplicates. + (Output::output_keyword_table, Output::output_lookup_array): Likewise. + (output_switch_case, output_switches): Likewise. + * doc/gperf.texi (Algorithmic Details): Adjust description of options + -D, -f, -o, -r. + (Bugs): Remove note about missing backtracking. + (Projects): Likewise. + +2002-11-19 Bruno Haible + + Prepare for backtracking. + * src/search.h (Search::try_asso_value, Search::change_some_asso_value): + Remove declarations. + (Search::less_collisions, Search::collision_prior_to): New declarations. + (Search::_fewest_collisions, Search::_union_set, Search::_num_done): + Remove fields. + * src/search.cc (Search::prepare_asso_values): Don't initialize + _union_set. + (Search::try_asso_value, Search::change_some_asso_value): Remove + methods. + (Search::less_collisions, Search::collision_prior_to): New methods. + (StackEntry): New class. + (Search::find_asso_values): Reorganized to use pseudo-recursion. + (Search::~Search): Don't free _union_set. + + * src/search.h (Search::find_good_asso_values): New declaration. + * src/search.cc: Add comments about the basic structure of the + algorithm. + (Search::find_positions): Move the option[POSITIONS] test to here. + (Search::find_good_asso_values): New method, extracted from + Search::optimize. + (Search::optimize): Remove option[POSITIONS] test. Call + find_good_asso_values. + +2002-11-17 Bruno Haible + + * src/options.cc (Options::parse_options): Include copyright notice + and authors in --version output. + + Avoid artificial duplicates. + * src/keyword.h (KeywordExt::init_selchars_tuple): New declaration. + (KeywordExt::init_selchars_multiset): Renamed from + KeywordExt::init_selchars. + (KeywordExt::init_selchars_low): New declaration. + * src/keyword.cc (KeywordExt::init_selchars_low): Renamed from + KeywordExt::init_selchars. Add alpha_inc argument. Remove sorting. + (KeywordExt::init_selchars_tuple): New method. + (KeywordExt::init_selchars_multiset): New method, replaces + KeywordExt::init_selchars. + * src/search.h (Search::init_selchars_tuple): Renamed from + Search::init_selchars. + (Search::count_duplicates_tuple): Renamed from Search::count_duplicates. + (Search::init_selchars_multiset, Search::count_duplicates_multiset, + Search::find_alpha_inc): New declarations. + (Search::_alpha_inc): New field. + (Search::_alpha_size, Search::_occurrences, Search::_asso_values, + Search::_determined): Make non-const. + * src/search.cc (Search::Search): Don't initialize _key_positions, + _alpha_size, _occurrences, _asso_values, _determined here. + (Search::init_selchars_tuple): Renamed from Search::init_selchars. + (Search::count_duplicates_tuple): Renamed from Search::count_duplicates. + (Search::find_positions): Update. + (Search::init_selchars_multiset, Search::count_duplicates_multiset, + Search::find_alpha_inc): New methods. + (Search::prepare): Move preprepare, find_positions calls away. + Initialize _alpha_size, _occurrences, _asso_values, _determined here. + (Search::optimize): Call preprepare, find_positions here. Initialize + _key_positions here. + (Search::~Search): Deallocate _alpha_inc. + * src/output.cc (Output::Output): Add alpha_inc argument. + (Output::output_hash_function): Use _alpha_inc. + * src/output.h (Output::Output): Add alpha_inc argument. + (Output::_alpha_inc): New field. + * src/main.cc (main): Pass _alpha_inc from Search to Output. + * tests/chill.exp: Update. + * doc/gperf.texi (Algorithmic Details): Remove description of + artificial duplicates. + + * src/keyword.h (KeywordExt::_selchars): Change type to + 'const unsigned int *'. + * src/keyword.cc (sort_char_set): Change argument type to + 'unsigned int *'. + (KeywordExt::init_selchars): Update. + * src/search.h (Search::sort_by_occurrence): Change argument type to + 'unsigned int *'. + (Search::try_asso_value): Change argument type to 'unsigned int'. + (Search::_union_set): Change type to 'unsigned int *'. + * src/search.cc (Search::prepare, Search::compute_occurrence, + Search::set_determined, Search::already_determined, + Search::prepare_asso_values, Search::compute_hash): Update. + (compute_disjoint_union): Change argument types to 'unsigned int *'. + (Search::sort_by_occurrence): Likewise. + (Search::try_asso_value): Change argument type to 'unsigned int'. + (Search::change_some_asso_value, Search::~Search): Update. + * src/hash-table.cc (Hash_Table::~Hash_Table, Hash_Table::equal, + Hash_Table::insert): Update. + + * src/positions.h: New file, extracted from options.h. + * src/positions.icc: New file, extracted from options.icc. + * src/positions.cc: New file, extracted from options.cc. + * src/options.h: Include positions.h. Move classes Positions and + PositionsIterator away. + * src/options.icc: Move classes Positions and PositionsIterator away. + * src/options.cc: Move class Positions away. + * src/keyword.cc: Include positions.h instead of options.h. + * src/output.h: Include positions.h instead of options.h. + * src/search.h: Include positions.h instead of options.h. + * src/Makefile.in (OBJECTS): Add positions.o. + (POSITIONS_H): New variable. + (OPTIONS_H, SEARCH_H, OUTPUT_H, keyword.o): Use it. + (positions.o): New rule. + + * src/options.h (POSITIONS): New enum value. + (Positions::Positions): New copy constructor. + (Positions::operator=, Positions::contains, Position::add, + Positions::remove, Positions::print): New method declaration. + (Options::get_max_keysig_size): Remove method. + * src/options.icc (Positions::Positions): New copy constructor. + (Positions::operator=): New method. + (Options::get_max_keysig_size): Remove method. + * src/options.cc (Options::Options): Initialize _key_positions + trivially. + (Options::parse_options): Option -k sets POSITIONS. + (Positions::contains, Positions::add, Positions::remove, + Positions::print): New methods. + * src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field + width explicitly, instead of using Options::get_max_keysig_size. + * src/keyword.h (KeywordExt::init_selchars): Add arguments + use_all_chars, positions. + (KeywordExt::delete_selchars): New declaration. + * src/keyword.cc (KeywordExt::init_selchars): Add arguments + use_all_chars, positions. Remove error message if there are no key + positions. + (KeywordExt::delete_selchars): New method. + * src/search.h: Include options.h. + (Search::preprepare, Search::init_selchars, Search::delete_selchars, + Search::count_duplicates, Search::find_positions): New declarations. + (Search::_key_positions): New field. + * src/search.cc (Search::Search): Initialize _key_positions. + (Search::preprepare, Search::init_selchars, Search::delete_selchars, + Search::count_duplicates, Search::find_positions): New functions. + (Search::prepare): Call preprepare and find_positions. Tweak error + message. + (Search::get_max_keysig_size): Use _key_positions instead of + option.get_key_positions(). + (Search::optimize): Tweak error message. + * src/output.h: Include options.h. + (Output::Output): Add Positions argument. + (Output::_key_positions): New field. + * src/output.cc (Output::Output): Add Positions argument. + (Output::output_hash_function): Omit the table if there are no + positions at all. Use _key_positions instead of + option.get_key_positions(). + (Output::output): Output the computed positions as a comment. + * src/main.cc (main): Pass the Positions from Searcher to Output. + * src/Makefile.in (SEARCH_H, OUTPUT_H): Include OPTIONS_H. + * tests/Makefile.in (check-test): Pass key positions explicitly. + * tests/gpc.exp: Update. + * tests/test-4.exp: Update. + * doc/gperf.texi (Algorithmic Details): Mention that -k is not needed + usually. + +2002-11-16 Bruno Haible + + * src/options.h (Options::get_slot_name): Renamed from + Options::get_key_name. + (Options::set, Options::set_language, Options::set_total_switches, + Options::set_function_name, Options::set_slot_name, + Options::set_class_name, Options::set_hash_name, + Options::set_wordlist_name, Options::set_delimiters): New method + declarations. + (Options::_language): New field. + (Options::_slot_name): Renamed from Options::_key_name. + * src/options.icc (Options::set): New method. + (Options::get_slot_name): Renamed from Options::get_key_name. + * src/options.cc (DEFAULT_FUNCTION_NAME): Renamed from DEFAULT_NAME. + (DEFAULT_SLOT_NAME): Renamed from DEFAULT_NAME. + (Options::Options): Initialize _language. Update. + (Options::~Options): Update. + (Options::set_language, Options::set_total_switches, + Options::set_function_name, Options::set_slot_name, + Options::set_class_name, Options::set_hash_name, + Options::set_wordlist_name, Options::set_delimiters): New methods. + (Options::parse_options): Call set_language. Update. + * src/input.cc (is_declaration, is_declaration_with_arg, + is_define_declaration): New functions. + (Input::read_input): Accept %DECL declarations. + * src/output.cc (Output::output_lookup_function_body): Update. + * doc/gperf.texi (Declarations): Add new subnodes. + (User-supplied Struct, Gperf Declarations, C Code Inclusion): New + nodes. + (Keywords, Output Format, Binary Strings, Options): Mention % + declarations as being equivalent to the command line options. + + * src/options.cc (Options::long_usage): Rename options -H, -N, -l, -G. + (long_options): Add --hash-function-name, --lookup-function-name, + --compare-lengths. + * doc/gperf.texi (Output Details): Rename options -H, -N, -l, -G. + * tests/test-6.exp: Update. + + * src/options.cc (DEFAULT_DELIMITERS): Remove newline. + * src/options.cc (Options::long_usage): Change default --delimiters. + * doc/gperf.texi (Input Details): Likewise. + * tests/test-6.exp: Update. + + * doc/gperf.texi: Move description of option -l from section + Algorithmic Details to section Output Details. + * src/options.cc (Options::long_usage): Likewise. + * tests/test-6.exp: Update. + +2002-11-12 Bruno Haible + + * src/options.h (Output::get_output_file_name): New method. + (Output::_output_file_name): New field. + * src/options.icc (Options::get_output_file_name): New method. + * src/options.cc (Options::long_usage): Document option --output-file. + (Options::Options): Initialize _output_file_name. + (long_options): Add --output-file. + (Options::parse_options): Handle it. + * src/main.cc (main): Open the output file if given by name. + * doc/gperf.texi (Output File): New section. + * tests/test-6.exp: Update. + +2002-11-10 Bruno Haible + + * src/input.cc (pretty_input_file_name): New function. + (read_input): Use it in all error and warning messages. + + * src/keyword.h (Keyword::_lineno): New field. + * src/input.h (Input::_struct_decl_lineno): New field. + * src/input.cc (Input::read_input): Set _struct_decl_lineno. Fill + each keyword's _lineno field. + * src/main.cc (main): Pass _struct_decl_lineno from Input to Output. + * src/output.h (Output::Output) Add struct_decl_lineno argument. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 12:38:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46BB106564A; Mon, 28 Nov 2011 12:38:24 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D43718FC16; Mon, 28 Nov 2011 12:38:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASCcOR9091141; Mon, 28 Nov 2011 12:38:24 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASCcOU8091139; Mon, 28 Nov 2011 12:38:24 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201111281238.pASCcOU8091139@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 28 Nov 2011 12:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228061 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 12:38:25 -0000 Author: ae Date: Mon Nov 28 12:38:24 2011 New Revision: 228061 URL: http://svn.freebsd.org/changeset/base/228061 Log: The size of APM could be bigger than number of already allocated entries. And the first usable sector should not start from the inside of APM area. MFC after: 1 month Modified: head/sys/geom/part/g_part_apm.c Modified: head/sys/geom/part/g_part_apm.c ============================================================================== --- head/sys/geom/part/g_part_apm.c Mon Nov 28 12:29:16 2011 (r228060) +++ head/sys/geom/part/g_part_apm.c Mon Nov 28 12:38:24 2011 (r228061) @@ -443,7 +443,7 @@ g_part_apm_read(struct g_part_table *bas table = (struct g_part_apm_table *)basetable; - basetable->gpt_first = table->self.ent_pmblkcnt + 1; + basetable->gpt_first = table->self.ent_size + 1; basetable->gpt_last = table->ddr.ddr_blkcount - 1; basetable->gpt_entries = table->self.ent_pmblkcnt - 1; From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 13:30:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E2C106564A; Mon, 28 Nov 2011 13:30:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC9988FC08; Mon, 28 Nov 2011 13:30:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASDUE6S092876; Mon, 28 Nov 2011 13:30:14 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASDUEBD092874; Mon, 28 Nov 2011 13:30:14 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111281330.pASDUEBD092874@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Nov 2011 13:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228062 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 13:30:15 -0000 Author: glebius Date: Mon Nov 28 13:30:14 2011 New Revision: 228062 URL: http://svn.freebsd.org/changeset/base/228062 Log: Fix one more fallout from r227791: do not overwrite trimmed sa_len on the ia_sockmask when doing SIOCSIFNETMASK. Reported by: Stefan Bethke , gonzo Pointy hat to: glebius Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Mon Nov 28 12:38:24 2011 (r228061) +++ head/sys/netinet/in.c Mon Nov 28 13:30:14 2011 (r228062) @@ -533,7 +533,8 @@ in_control(struct socket *so, u_long cmd goto out; case SIOCSIFNETMASK: - ia->ia_sockmask = *(struct sockaddr_in *)&ifr->ifr_addr; + ia->ia_sockmask.sin_addr = ((struct sockaddr_in *) + &ifr->ifr_addr)->sin_addr; ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr); goto out; From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 13:32:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 116A4106564A; Mon, 28 Nov 2011 13:32:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F38C08FC14; Mon, 28 Nov 2011 13:32:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASDWdhd092985; Mon, 28 Nov 2011 13:32:39 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASDWdq6092980; Mon, 28 Nov 2011 13:32:39 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201111281332.pASDWdq6092980@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 28 Nov 2011 13:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228063 - in head/usr.bin/m4: . lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 13:32:40 -0000 Author: bapt (ports committer) Date: Mon Nov 28 13:32:39 2011 New Revision: 228063 URL: http://svn.freebsd.org/changeset/base/228063 Log: Synchronize with laster version of m4 from OpenBSD and NetBSD This bring better compatibility with gnum4 Reviewed by: cognet Approved by: cognet Obtained from: OpenBSD, NetBSD Added: head/usr.bin/m4/lib/ head/usr.bin/m4/lib/ohash.h (contents, props changed) head/usr.bin/m4/lib/ohash_create_entry.c (contents, props changed) head/usr.bin/m4/lib/ohash_delete.c (contents, props changed) head/usr.bin/m4/lib/ohash_do.c (contents, props changed) head/usr.bin/m4/lib/ohash_entries.c (contents, props changed) head/usr.bin/m4/lib/ohash_enum.c (contents, props changed) head/usr.bin/m4/lib/ohash_init.3 (contents, props changed) head/usr.bin/m4/lib/ohash_init.c (contents, props changed) head/usr.bin/m4/lib/ohash_int.h (contents, props changed) head/usr.bin/m4/lib/ohash_interval.3 (contents, props changed) head/usr.bin/m4/lib/ohash_interval.c (contents, props changed) head/usr.bin/m4/lib/ohash_lookup_interval.c (contents, props changed) head/usr.bin/m4/lib/ohash_lookup_memory.c (contents, props changed) head/usr.bin/m4/lib/ohash_qlookup.c (contents, props changed) head/usr.bin/m4/lib/ohash_qlookupi.c (contents, props changed) head/usr.bin/m4/parser.y (contents, props changed) head/usr.bin/m4/tokenizer.l (contents, props changed) Modified: head/usr.bin/m4/Makefile head/usr.bin/m4/eval.c head/usr.bin/m4/expr.c head/usr.bin/m4/extern.h head/usr.bin/m4/gnum4.c head/usr.bin/m4/look.c head/usr.bin/m4/m4.1 head/usr.bin/m4/main.c head/usr.bin/m4/mdef.h head/usr.bin/m4/misc.c head/usr.bin/m4/pathnames.h head/usr.bin/m4/stdd.h head/usr.bin/m4/trace.c Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Mon Nov 28 13:30:14 2011 (r228062) +++ head/usr.bin/m4/Makefile Mon Nov 28 13:32:39 2011 (r228063) @@ -5,8 +5,20 @@ # if you want the paste & spaste macros. PROG= m4 -CFLAGS+=-DEXTENDED +CFLAGS+=-DEXTENDED -I${.CURDIR}/lib +LDADD= -ly -ll +# clang needs 1 while with gcc we can use 2 +#WARNS= 1 -SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c +SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l +.PATH: ${.CURDIR}/lib +SRCS+= ohash_create_entry.c ohash_delete.c ohash_do.c ohash_entries.c \ + ohash_enum.c ohash_init.c ohash_int.h ohash_interval.c \ + ohash_lookup_interval.c ohash_lookup_memory.c ohash_qlookup.c \ + ohash_qlookupi.c + +tokenizer.o: parser.h + +CLEANFILES+= parser.c parser.h tokenizer.o .include Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Mon Nov 28 13:30:14 2011 (r228062) +++ head/usr.bin/m4/eval.c Mon Nov 28 13:32:39 2011 (r228063) @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.44 2002/04/26 16:15:16 espie Exp $ */ +/* $OpenBSD: eval.c,v 1.69 2011/03/24 11:23:08 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /* @@ -16,7 +16,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,19 +33,10 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)eval.c 8.2 (Berkeley) 4/27/95"; -#else -#if 0 -static char rcsid[] = "$OpenBSD: eval.c,v 1.44 2002/04/26 16:15:16 espie Exp $"; -#endif -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); + /* * eval.c * Facility: m4 macro processor @@ -53,21 +44,21 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include +#include #include +#include #include #include #include #include #include -#include #include "mdef.h" #include "stdd.h" #include "extern.h" #include "pathnames.h" -#define BUILTIN_MARKER "__builtin_" - static void dodefn(const char *); static void dopushdef(const char *, const char *); static void dodump(const char *[], int); @@ -75,10 +66,9 @@ static void dotrace(const char *[], int, static void doifelse(const char *[], int); static int doincl(const char *); static int dopaste(const char *); -static void gnu_dochq(const char *[], int); static void dochq(const char *[], int); -static void gnu_dochc(const char *[], int); static void dochc(const char *[], int); +static void dom4wrap(const char *); static void dodiv(int); static void doundiv(const char *[], int); static void dosub(const char *[], int); @@ -86,7 +76,7 @@ static void map(char *, const char *, co static const char *handledash(char *, char *, const char *); static void expand_builtin(const char *[], int, int); static void expand_macro(const char *[], int); -static void dump_one_def(ndptr); +static void dump_one_def(const char *, struct macro_definition *); unsigned long expansion_id; @@ -95,7 +85,7 @@ unsigned long expansion_id; * argc - number of elements in argv. * argv - element vector : * argv[0] = definition of a user - * macro or nil if built-in. + * macro or NULL if built-in. * argv[1] = name of the macro or * built-in. * argv[2] = parameters to user-defined @@ -110,21 +100,20 @@ unsigned long expansion_id; * argc is 3 for macro-or-builtin() and 2 for macro-or-builtin */ void -eval(const char *argv[], int argc, int td) +eval(const char *argv[], int argc, int td, int is_traced) { - ssize_t mark = -1; + size_t mark = SIZE_MAX; expansion_id++; if (td & RECDEF) - errx(1, "%s at line %lu: expanding recursive definition for %s", - CURRENT_NAME, CURRENT_LINE, argv[1]); - if (traced_macros && is_traced(argv[1])) + m4errx(1, "expanding recursive definition for %s.", argv[1]); + if (is_traced) mark = trace(argv, argc, infile+ilevel); if (td == MACRTYPE) expand_macro(argv, argc); else expand_builtin(argv, argc, td); - if (mark != -1) + if (mark != SIZE_MAX) finish_trace(mark); } @@ -150,9 +139,12 @@ expand_builtin(const char *argv[], int a * have macro-or-builtin() type call. We adjust * argc to avoid further checking.. */ - ac = argc; + /* we keep the initial value for those built-ins that differentiate + * between builtin() and builtin. + */ + ac = argc; - if (argc == 3 && !*(argv[2])) + if (argc == 3 && !*(argv[2]) && !mimic_gnu) argc--; switch (td & TYPEMASK) { @@ -184,9 +176,27 @@ expand_builtin(const char *argv[], int a * doexpr - evaluate arithmetic * expression */ + { + int base = 10; + int maxdigits = 0; + const char *errstr; + + if (argc > 3) { + base = strtonum(argv[3], 2, 36, &errstr); + if (errstr) { + m4errx(1, "expr: base %s invalid.", argv[3]); + } + } + if (argc > 4) { + maxdigits = strtonum(argv[4], 0, INT_MAX, &errstr); + if (errstr) { + m4errx(1, "expr: maxdigits %s invalid.", argv[4]); + } + } if (argc > 2) - pbnum(expr(argv[2])); + pbnumbase(expr(argv[2]), base, maxdigits); break; + } case IFELTYPE: if (argc > 4) @@ -200,7 +210,7 @@ expand_builtin(const char *argv[], int a * another definition */ if (argc > 3) { - if (lookup(argv[2]) != nil) + if (lookup_macro_definition(argv[2]) != NULL) pbstr(argv[3]); else if (argc > 4) pbstr(argv[4]); @@ -238,7 +248,7 @@ expand_builtin(const char *argv[], int a * dosys - execute system command */ if (argc > 2) { - fflush(NULL); + fflush(stdout); sysval = system(argv[2]); } break; @@ -255,7 +265,7 @@ expand_builtin(const char *argv[], int a case ESYSCMDTYPE: if (argc > 2) doesyscmd(argv[2]); - break; + break; case INCLTYPE: if (argc > 2) if (!doincl(argv[2])) @@ -271,7 +281,7 @@ expand_builtin(const char *argv[], int a case PASTTYPE: if (argc > 2) if (!dopaste(argv[2])) - err(1, "%s at line %lu: paste(%s)", + err(1, "%s at line %lu: paste(%s)", CURRENT_NAME, CURRENT_LINE, argv[2]); break; @@ -279,19 +289,16 @@ expand_builtin(const char *argv[], int a if (argc > 2) (void) dopaste(argv[2]); break; + case FORMATTYPE: + doformat(argv, argc); + break; #endif case CHNQTYPE: - if (mimic_gnu) - gnu_dochq(argv, ac); - else - dochq(argv, argc); + dochq(argv, ac); break; case CHNCTYPE: - if (mimic_gnu) - gnu_dochc(argv, ac); - else - dochc(argv, argc); + dochc(argv, argc); break; case SUBSTYPE: @@ -314,7 +321,7 @@ expand_builtin(const char *argv[], int a pbstr(rquote); pbstr(argv[n]); pbstr(lquote); - putback(COMMA); + pushback(COMMA); } pbstr(rquote); pbstr(argv[3]); @@ -350,7 +357,7 @@ expand_builtin(const char *argv[], int a */ if (argc > 2) for (n = 2; n < argc; n++) - remhash(argv[n], ALL); + macro_undefine(argv[n]); break; case POPDTYPE: @@ -361,7 +368,7 @@ expand_builtin(const char *argv[], int a */ if (argc > 2) for (n = 2; n < argc; n++) - remhash(argv[n], TOP); + macro_popdef(argv[n]); break; case MKTMTYPE: @@ -395,7 +402,7 @@ expand_builtin(const char *argv[], int a if (argc > 3) { char *temp; - temp = xalloc(strlen(argv[2])+1); + temp = xalloc(strlen(argv[2])+1, NULL); if (argc > 4) map(temp, argv[2], argv[3], argv[4]); else @@ -441,7 +448,8 @@ expand_builtin(const char *argv[], int a * dom4wrap - set up for * wrap-up/wind-down activity */ - m4wraps = (argc > 2) ? xstrdup(argv[2]) : null; + if (argc > 2) + dom4wrap(argv[2]); break; case EXITTYPE: @@ -488,8 +496,7 @@ expand_builtin(const char *argv[], int a pbstr(lquote); break; default: - errx(1, "%s at line %lu: eval: major botch.", - CURRENT_NAME, CURRENT_LINE); + m4errx(1, "eval: major botch."); break; } } @@ -512,7 +519,7 @@ expand_macro(const char *argv[], int arg p--; /* last character of defn */ while (p > t) { if (*(p - 1) != ARGFLAG) - PUTBACK(*p); + PUSHBACK(*p); else { switch (*p) { @@ -536,10 +543,10 @@ expand_macro(const char *argv[], int arg if (argc > 2) { for (n = argc - 1; n > 2; n--) { pbstr(argv[n]); - putback(COMMA); + pushback(COMMA); } pbstr(argv[2]); - } + } break; case '@': if (argc > 2) { @@ -547,7 +554,7 @@ expand_macro(const char *argv[], int arg pbstr(rquote); pbstr(argv[n]); pbstr(lquote); - putback(COMMA); + pushback(COMMA); } pbstr(rquote); pbstr(argv[2]); @@ -555,8 +562,8 @@ expand_macro(const char *argv[], int arg } break; default: - PUTBACK(*p); - PUTBACK('$'); + PUSHBACK(*p); + PUSHBACK('$'); break; } p--; @@ -564,42 +571,20 @@ expand_macro(const char *argv[], int arg p--; } if (p == t) /* do last character */ - PUTBACK(*p); + PUSHBACK(*p); } + /* * dodefine - install definition in the table */ void dodefine(const char *name, const char *defn) { - ndptr p; - int n; - - if (!*name) - errx(1, "%s at line %lu: null definition.", CURRENT_NAME, - CURRENT_LINE); - if ((p = lookup(name)) == nil) - p = addent(name); - else if (p->defn != null) - free((char *) p->defn); - if (strncmp(defn, BUILTIN_MARKER, sizeof(BUILTIN_MARKER)-1) == 0) { - n = builtin_type(defn+sizeof(BUILTIN_MARKER)-1); - if (n != -1) { - p->type = n & TYPEMASK; - if ((n & NOARGS) == 0) - p->type |= NEEDARGS; - p->defn = null; - return; - } - } - if (!*defn) - p->defn = null; + if (!*name && !mimic_gnu) + m4errx(1, "null definition."); else - p->defn = xstrdup(defn); - p->type = MACRTYPE; - if (STREQ(name, defn)) - p->type |= RECDEF; + macro_define(name, defn); } /* @@ -609,16 +594,15 @@ dodefine(const char *name, const char *d static void dodefn(const char *name) { - ndptr p; - const char *real; + struct macro_definition *p; - if ((p = lookup(name)) != nil) { - if (p->defn != null) { + if ((p = lookup_macro_definition(name)) != NULL) { + if ((p->type & TYPEMASK) == MACRTYPE) { pbstr(rquote); pbstr(p->defn); pbstr(lquote); - } else if ((real = builtin_realname(p->type)) != NULL) { - pbstr(real); + } else { + pbstr(p->defn); pbstr(BUILTIN_MARKER); } } @@ -634,40 +618,28 @@ dodefn(const char *name) static void dopushdef(const char *name, const char *defn) { - ndptr p; - - if (!*name) - errx(1, "%s at line %lu: null definition", CURRENT_NAME, - CURRENT_LINE); - p = addent(name); - if (!*defn) - p->defn = null; + if (!*name && !mimic_gnu) + m4errx(1, "null definition."); else - p->defn = xstrdup(defn); - p->type = MACRTYPE; - if (STREQ(name, defn)) - p->type |= RECDEF; + macro_pushdef(name, defn); } /* * dump_one_def - dump the specified definition. */ static void -dump_one_def(ndptr p) +dump_one_def(const char *name, struct macro_definition *p) { - const char *real; - + if (!traceout) + traceout = stderr; if (mimic_gnu) { if ((p->type & TYPEMASK) == MACRTYPE) - fprintf(traceout, "%s:\t%s\n", p->name, p->defn); + fprintf(traceout, "%s:\t%s\n", name, p->defn); else { - real = builtin_realname(p->type); - if (real == NULL) - real = null; - fprintf(traceout, "%s:\t<%s>\n", p->name, real); - } + fprintf(traceout, "%s:\t<%s>\n", name, p->defn); + } } else - fprintf(traceout, "`%s'\t`%s'\n", p->name, p->defn); + fprintf(traceout, "`%s'\t`%s'\n", name, p->defn); } /* @@ -679,17 +651,14 @@ static void dodump(const char *argv[], int argc) { int n; - ndptr p; + struct macro_definition *p; if (argc > 2) { for (n = 2; n < argc; n++) - if ((p = lookup(argv[n])) != nil) - dump_one_def(p); - } else { - for (n = 0; n < HASHSIZE; n++) - for (p = hashtab[n]; p != nil; p = p->nxtptr) - dump_one_def(p); - } + if ((p = lookup_macro_definition(argv[n])) != NULL) + dump_one_def(argv[n], p); + } else + macro_for_all(dump_one_def); } /* @@ -734,15 +703,10 @@ static int doincl(const char *ifile) { if (ilevel + 1 == MAXINP) - errx(1, "%s at line %lu: too many include files.", - CURRENT_NAME, CURRENT_LINE); + m4errx(1, "too many include files."); if (fopen_trypath(infile+ilevel+1, ifile) != NULL) { ilevel++; - if ((inname[ilevel] = strdup(ifile)) == NULL) - err(1, NULL); - inlineno[ilevel] = 1; bbase[ilevel] = bufbase = bp; - emitline(); return (1); } else return (0); @@ -760,97 +724,74 @@ dopaste(const char *pfile) int c; if ((pf = fopen(pfile, "r")) != NULL) { - fprintf(active, "#line 1 \"%s\"\n", pfile); + if (synch_lines) + fprintf(active, "#line 1 \"%s\"\n", pfile); while ((c = getc(pf)) != EOF) putc(c, active); (void) fclose(pf); - emitline(); + emit_synchline(); return (1); } else return (0); } #endif +/* + * dochq - change quote characters + */ static void -gnu_dochq(const char *argv[], int ac) +dochq(const char *argv[], int ac) { - /* In gnu-m4 mode, the only way to restore quotes is to have no - * arguments at all. */ if (ac == 2) { - lquote[0] = LQUOTE, lquote[1] = EOS; - rquote[0] = RQUOTE, rquote[1] = EOS; + lquote[0] = LQUOTE; lquote[1] = EOS; + rquote[0] = RQUOTE; rquote[1] = EOS; } else { strlcpy(lquote, argv[2], sizeof(lquote)); - if(ac > 3) + if (ac > 3) { strlcpy(rquote, argv[3], sizeof(rquote)); - else - rquote[0] = EOS; + } else { + rquote[0] = ECOMMT; rquote[1] = EOS; + } } } /* - * dochq - change quote characters + * dochc - change comment characters */ static void -dochq(const char *argv[], int argc) -{ - if (argc > 2) { - if (*argv[2]) - strlcpy(lquote, argv[2], sizeof(lquote)); - else { - lquote[0] = LQUOTE; - lquote[1] = EOS; - } - if (argc > 3) { - if (*argv[3]) - strlcpy(rquote, argv[3], sizeof(rquote)); - } else - strcpy(rquote, lquote); - } else { - lquote[0] = LQUOTE, lquote[1] = EOS; - rquote[0] = RQUOTE, rquote[1] = EOS; - } -} - -static void -gnu_dochc(const char *argv[], int ac) +dochc(const char *argv[], int argc) { - /* In gnu-m4 mode, no arguments mean no comment - * arguments at all. */ - if (ac == 2) { +/* XXX Note that there is no difference between no argument and a single + * empty argument. + */ + if (argc == 2) { scommt[0] = EOS; ecommt[0] = EOS; } else { - if (*argv[2]) - strlcpy(scommt, argv[2], sizeof(scommt)); - else - scommt[0] = SCOMMT, scommt[1] = EOS; - if(ac > 3 && *argv[3]) + strlcpy(scommt, argv[2], sizeof(scommt)); + if (argc == 3) { + ecommt[0] = ECOMMT; ecommt[1] = EOS; + } else { strlcpy(ecommt, argv[3], sizeof(ecommt)); - else - ecommt[0] = ECOMMT, ecommt[1] = EOS; + } } } + /* - * dochc - change comment characters + * dom4wrap - expand text at EOF */ static void -dochc(const char *argv[], int argc) +dom4wrap(const char *text) { - if (argc > 2) { - if (*argv[2]) - strlcpy(scommt, argv[2], sizeof(scommt)); - if (argc > 3) { - if (*argv[3]) - strlcpy(ecommt, argv[3], sizeof(ecommt)); - } + if (wrapindex >= maxwraps) { + if (maxwraps == 0) + maxwraps = 16; else - ecommt[0] = ECOMMT, ecommt[1] = EOS; - } - else { - scommt[0] = SCOMMT, scommt[1] = EOS; - ecommt[0] = ECOMMT, ecommt[1] = EOS; + maxwraps *= 2; + m4wraps = xrealloc(m4wraps, maxwraps * sizeof(*m4wraps), + "too many m4wraps"); } + m4wraps[wrapindex++] = xstrdup(text); } /* @@ -867,14 +808,14 @@ dodiv(int n) resizedivs(n + 10); else n = 0; /* bitbucket */ - } + } if (n < 0) n = 0; /* bitbucket */ if (outfile[n] == NULL) { char fname[] = _PATH_DIVNAME; - if ((fd = mkstemp(fname)) < 0 || + if ((fd = mkstemp(fname)) < 0 || (outfile[n] = fdopen(fd, "w+")) == NULL) err(1, "%s: cannot divert", fname); if (unlink(fname) == -1) @@ -895,10 +836,15 @@ doundiv(const char *argv[], int argc) if (argc > 2) { for (ind = 2; ind < argc; ind++) { - n = atoi(argv[ind]); - if (n > 0 && n < maxout && outfile[n] != NULL) - getdiv(n); - + const char *errstr; + n = strtonum(argv[ind], 1, INT_MAX, &errstr); + if (errstr) { + if (errno == EINVAL && mimic_gnu) + getdivfile(argv[ind]); + } else { + if (n < maxout && outfile[n] != NULL) + getdiv(n); + } } } else @@ -931,7 +877,7 @@ dosub(const char *argv[], int argc) #endif if (fc >= ap && fc < ap + strlen(ap)) for (k = fc + nc - 1; k >= fc; k--) - putback(*k); + pushback(*k); } /* @@ -939,25 +885,11 @@ dosub(const char *argv[], int argc) * map every character of s1 that is specified in from * into s3 and replace in s. (source s1 remains untouched) * - * This is a standard implementation of map(s,from,to) function of ICON - * language. Within mapvec, we replace every character of "from" with - * the corresponding character in "to". If "to" is shorter than "from", - * than the corresponding entries are null, which means that those - * characters dissapear altogether. Furthermore, imagine - * map(dest, "sourcestring", "srtin", "rn..*") type call. In this case, - * `s' maps to `r', `r' maps to `n' and `n' maps to `*'. Thus, `s' - * ultimately maps to `*'. In order to achieve this effect in an efficient - * manner (i.e. without multiple passes over the destination string), we - * loop over mapvec, starting with the initial source character. if the - * character value (dch) in this location is different than the source - * character (sch), sch becomes dch, once again to index into mapvec, until - * the character value stabilizes (i.e. sch = dch, in other words - * mapvec[n] == n). Even if the entry in the mapvec is null for an ordinary - * character, it will stabilize, since mapvec[0] == 0 at all times. At the - * end, we restore mapvec* back to normal where mapvec[n] == n for - * 0 <= n <= 127. This strategy, along with the restoration of mapvec, is - * about 5 times faster than any algorithm that makes multiple passes over - * destination string. + * This is derived from the a standard implementation of map(s,from,to) + * function of ICON language. Within mapvec, we replace every character + * of "from" with the corresponding character in "to". + * If "to" is shorter than "from", than the corresponding entries are null, + * which means that those characters dissapear altogether. */ static void map(char *dest, const char *src, const char *from, const char *to) @@ -966,6 +898,8 @@ map(char *dest, const char *src, const c unsigned char sch, dch; static char frombis[257]; static char tobis[257]; + int i; + char seen[256]; static unsigned char mapvec[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, @@ -1000,17 +934,21 @@ map(char *dest, const char *src, const c * create a mapping between "from" and * "to" */ - while (*from) - mapvec[(unsigned char)(*from++)] = (*to) ? - (unsigned char)(*to++) : 0; + for (i = 0; i < 256; i++) + seen[i] = 0; + while (*from) { + if (!seen[(unsigned char)(*from)]) { + mapvec[(unsigned char)(*from)] = (unsigned char)(*to); + seen[(unsigned char)(*from)] = 1; + } + from++; + if (*to) + to++; + } while (*src) { sch = (unsigned char)(*src++); dch = mapvec[sch]; - while (dch != sch) { - sch = dch; - dch = mapvec[sch]; - } if ((*dest = (char)dch)) dest++; } @@ -1040,12 +978,23 @@ handledash(char *buffer, char *end, cons while(*src) { if (src[1] == '-' && src[2]) { unsigned char i; - for (i = (unsigned char)src[0]; - i <= (unsigned char)src[2]; i++) { - *p++ = i; - if (p == end) { - *p = '\0'; - return buffer; + if ((unsigned char)src[0] <= (unsigned char)src[2]) { + for (i = (unsigned char)src[0]; + i <= (unsigned char)src[2]; i++) { + *p++ = i; + if (p == end) { + *p = '\0'; + return buffer; + } + } + } else { + for (i = (unsigned char)src[0]; + i >= (unsigned char)src[2]; i--) { + *p++ = i; + if (p == end) { + *p = '\0'; + return buffer; + } } } src += 3; Modified: head/usr.bin/m4/expr.c ============================================================================== --- head/usr.bin/m4/expr.c Mon Nov 28 13:30:14 2011 (r228062) +++ head/usr.bin/m4/expr.c Mon Nov 28 13:32:39 2011 (r228063) @@ -1,640 +1,47 @@ -/* $OpenBSD: expr.c,v 1.14 2002/04/26 16:15:16 espie Exp $ */ -/* $NetBSD: expr.c,v 1.7 1995/09/28 05:37:31 tls Exp $ */ - +/* $OpenBSD: expr.c,v 1.18 2010/09/07 19:58:09 marco Exp $ */ /* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ozan Yigit at York University. - * - * 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, 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * Copyright (c) 2004 Marc Espie * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -#ifndef lint -#if 0 -static char sccsid[] = "@(#)expr.c 8.2 (Berkeley) 4/29/95"; -#else -#if 0 -static char rcsid[] = "$OpenBSD: expr.c,v 1.14 2002/04/26 16:15:16 espie Exp $"; -#endif -#endif -#endif /* not lint */ - #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include +#include #include +#include #include "mdef.h" #include "extern.h" -/* - * expression evaluator: performs a standard recursive - * descent parse to evaluate any expression permissible - * within the following grammar: - * - * expr : query EOS - * query : lor - * | lor "?" query ":" query - * lor : land { "||" land } - * land : bor { "&&" bor } - * bor : xor { "|" xor } - * xor : band { "^" eqrel } - * band : eqrel { "&" eqrel } - * eqrel : nerel { ("==" | "!=") nerel } - * nerel : shift { ("<" | ">" | "<=" | ">=") shift } - * shift : primary { ("<<" | ">>") primary } - * primary : term { ("+" | "-") term } - * term : exponent { ("*" | "/" | "%") exponent } - * exponent: unary { "**" unary } - * unary : factor - * | ("+" | "-" | "~" | "!") unary - * factor : constant - * | "(" query ")" - * constant: num - * | "'" CHAR "'" - * num : DIGIT - * | DIGIT num - * - * - * This expression evaluator is lifted from a public-domain - * C Pre-Processor included with the DECUS C Compiler distribution. - * It is hacked somewhat to be suitable for m4. - * - * Originally by: Mike Lutz - * Bob Harper - */ - -#define EQL 0 -#define NEQ 1 -#define LSS 2 -#define LEQ 3 -#define GTR 4 -#define GEQ 5 -#define OCTAL 8 -#define DECIMAL 10 -#define HEX 16 - -static const char *nxtch; /* Parser scan pointer */ -static const char *where; - -static int query(int mayeval); -static int lor(int mayeval); -static int land(int mayeval); -static int bor(int mayeval); -static int xor(int mayeval); -static int band(int mayeval); -static int eqrel(int mayeval); -static int nerel(int mayeval); -static int shift(int mayeval); -static int primary(int mayeval); -static int term(int mayeval); -static int exponent(int mayeval); -static int unary(int mayeval); -static int factor(int mayeval); -static int constant(int mayeval); -static int num(int mayeval); -static int skipws(void); -static void experr(const char *); - -/* - * For longjmp - */ -#include -static jmp_buf expjump; +int32_t end_result; +const char *copy_toeval; +int yyerror(const char *msg); -/* - * macros: - * ungetch - Put back the last character examined. - * getch - return the next character from expr string. - */ -#define ungetch() nxtch-- -#define getch() *nxtch++ +extern void yy_scan_string(const char *); +extern int yyparse(void); int -expr(const char *expbuf) -{ - int rval; - - nxtch = expbuf; - where = expbuf; - if (setjmp(expjump) != 0) - return FALSE; - - rval = query(1); - if (skipws() == EOS) - return rval; - - printf("m4: ill-formed expression.\n"); - return FALSE; -} - -/* - * query : lor | lor '?' query ':' query - */ -static int -query(int mayeval) -{ - int result, true_val, false_val; - - result = lor(mayeval); - if (skipws() != '?') { - ungetch(); - return result; - } - - true_val = query(result); - if (skipws() != ':') - experr("bad query: missing \":\""); - - false_val = query(!result); - return result ? true_val : false_val; -} - -/* - * lor : land { '||' land } - */ -static int -lor(int mayeval) -{ - int c, vl, vr; - - vl = land(mayeval); - while ((c = skipws()) == '|') { - if (getch() != '|') { - ungetch(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 13:42:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2B90106566C; Mon, 28 Nov 2011 13:42:59 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A28C48FC19; Mon, 28 Nov 2011 13:42:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASDgx5l093350; Mon, 28 Nov 2011 13:42:59 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASDgx5S093348; Mon, 28 Nov 2011 13:42:59 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201111281342.pASDgx5S093348@svn.freebsd.org> From: Aleksandr Rybalko Date: Mon, 28 Nov 2011 13:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228064 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 13:42:59 -0000 Author: ray Date: Mon Nov 28 13:42:59 2011 New Revision: 228064 URL: http://svn.freebsd.org/changeset/base/228064 Log: Simplify arge_flush_ddr to use updated ar71xx_device_flush_ddr_ge(unit). Approved by: adrian (mentor) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Mon Nov 28 13:32:39 2011 (r228063) +++ head/sys/mips/atheros/if_arge.c Mon Nov 28 13:42:59 2011 (r228064) @@ -191,10 +191,8 @@ MTX_SYSINIT(miibus_mtx, &miibus_mtx, "ar static void arge_flush_ddr(struct arge_softc *sc) { - if (sc->arge_mac_unit == 0) - ar71xx_device_flush_ddr_ge(0); - else - ar71xx_device_flush_ddr_ge(1); + + ar71xx_device_flush_ddr_ge(sc->arge_mac_unit); } static int From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:01:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA8381065672; Mon, 28 Nov 2011 14:01:17 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA6218FC0A; Mon, 28 Nov 2011 14:01:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASE1H4d093975; Mon, 28 Nov 2011 14:01:17 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASE1HS6093973; Mon, 28 Nov 2011 14:01:17 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111281401.pASE1HS6093973@svn.freebsd.org> From: Max Khon Date: Mon, 28 Nov 2011 14:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228065 - head/lib/libpam/modules/pam_unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:01:18 -0000 Author: fjoe Date: Mon Nov 28 14:01:17 2011 New Revision: 228065 URL: http://svn.freebsd.org/changeset/base/228065 Log: .include instead of The former allows common settings from ../Makefile.inc to be used. Modified: head/lib/libpam/modules/pam_unix/Makefile Modified: head/lib/libpam/modules/pam_unix/Makefile ============================================================================== --- head/lib/libpam/modules/pam_unix/Makefile Mon Nov 28 13:42:59 2011 (r228064) +++ head/lib/libpam/modules/pam_unix/Makefile Mon Nov 28 14:01:17 2011 (r228065) @@ -34,9 +34,7 @@ # # $FreeBSD$ -NO_PROFILE= -NO_INSTALLLIB= -.include +.include LIB= pam_unix SRCS= pam_unix.c From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:03:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79A5B1065670; Mon, 28 Nov 2011 14:03:37 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69D4A8FC19; Mon, 28 Nov 2011 14:03:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASE3bIY094074; Mon, 28 Nov 2011 14:03:37 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASE3bnq094072; Mon, 28 Nov 2011 14:03:37 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111281403.pASE3bnq094072@svn.freebsd.org> From: Max Khon Date: Mon, 28 Nov 2011 14:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228066 - head/tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:03:37 -0000 Author: fjoe Date: Mon Nov 28 14:03:36 2011 New Revision: 228066 URL: http://svn.freebsd.org/changeset/base/228066 Log: Add a comment that shows how to limit the build to the specific list of arches. Modified: head/tools/tinder.sh Modified: head/tools/tinder.sh ============================================================================== --- head/tools/tinder.sh Mon Nov 28 14:01:17 2011 (r228065) +++ head/tools/tinder.sh Mon Nov 28 14:03:36 2011 (r228066) @@ -37,6 +37,8 @@ # sh tools/tinder.sh gnu/lib/libdialog usr.sbin/sade NO_CLEAN=yes # # build libdialog and sade for all architectures # # without making clean +# sh tools/tinder.sh gnu/lib/libdialog usr.sbin/sade TARGETS="amd64 i386" +# # build libdialog and sade only for amd64 and i386 # if [ $# -eq 0 ]; then From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:23:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00267106566C; Mon, 28 Nov 2011 14:23:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E23D08FC12; Mon, 28 Nov 2011 14:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASEN9gN094801; Mon, 28 Nov 2011 14:23:09 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASEN9og094797; Mon, 28 Nov 2011 14:23:09 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201111281423.pASEN9og094797@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 28 Nov 2011 14:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228068 - in head/contrib/gperf: . doc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:23:10 -0000 Author: bapt (ports committer) Date: Mon Nov 28 14:23:09 2011 New Revision: 228068 URL: http://svn.freebsd.org/changeset/base/228068 Log: Reimport .texi and .texinfo necessary to build the info documentation. Reported by: flo Approved by: cognet Added: head/contrib/gperf/doc/gperf.texi head/contrib/gperf/doc/gpl.texinfo Modified: head/contrib/gperf/FREEBSD-Xlist Modified: head/contrib/gperf/FREEBSD-Xlist ============================================================================== --- head/contrib/gperf/FREEBSD-Xlist Mon Nov 28 14:20:12 2011 (r228067) +++ head/contrib/gperf/FREEBSD-Xlist Mon Nov 28 14:23:09 2011 (r228068) @@ -8,7 +8,5 @@ $FreeBSD$ */getopt* */*.pdf */*.vms -*/*.texi -*/*.texinfo */*.msvc */*.woe32 Added: head/contrib/gperf/doc/gperf.texi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gperf/doc/gperf.texi Mon Nov 28 14:23:09 2011 (r228068) @@ -0,0 +1,1370 @@ +\input texinfo @c -*- texinfo -*- +@c %**start of header +@setfilename gperf.info +@settitle Perfect Hash Function Generator +@c @setchapternewpage odd +@c %**end of header + +@c some day we should @include version.texi instead of defining +@c these values at hand. +@set UPDATED 31 March 2007 +@set EDITION 3.0.3 +@set VERSION 3.0.3 +@c --------------------- + +@c remove the black boxes generated in the GPL appendix. +@finalout + +@c Merge functions into the concept index +@syncodeindex fn cp +@c @synindex pg cp + +@dircategory Programming Tools +@direntry +* Gperf: (gperf). Perfect Hash Function Generator. +@end direntry + +@ifinfo +This file documents the features of the GNU Perfect Hash Function +Generator @value{VERSION}. + +Copyright @copyright{} 1989-2006 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries a copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +@end ignore + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +section entitled ``GNU General Public License'' is included exactly as +in the original, and provided that the entire resulting derived work is +distributed under the terms of a permission notice identical to this +one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that the section entitled ``GNU General Public License'' and this +permission notice may be included in translations approved by the Free +Software Foundation instead of in the original English. + +@end ifinfo + +@titlepage +@title User's Guide to @code{gperf} @value{VERSION} +@subtitle The GNU Perfect Hash Function Generator +@subtitle Edition @value{EDITION}, @value{UPDATED} +@author Douglas C. Schmidt +@author Bruno Haible + +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 1989-2007 Free Software Foundation, Inc. + + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +section entitled ``GNU General Public License'' is included +exactly as in the original, and provided that the entire resulting +derived work is distributed under the terms of a permission notice +identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that the section entitled ``GNU General Public License'' may be +included in a translation approved by the author instead of in the +original English. +@end titlepage + +@ifinfo +@node Top, Copying, (dir), (dir) +@top Introduction + +This manual documents the GNU @code{gperf} perfect hash function generator +utility, focusing on its features and how to use them, and how to report +bugs. + +@menu +* Copying:: GNU @code{gperf} General Public License says + how you can copy and share @code{gperf}. +* Contributors:: People who have contributed to @code{gperf}. +* Motivation:: The purpose of @code{gperf}. +* Search Structures:: Static search structures and GNU @code{gperf} +* Description:: High-level discussion of how GPERF functions. +* Options:: A description of options to the program. +* Bugs:: Known bugs and limitations with GPERF. +* Projects:: Things still left to do. +* Bibliography:: Material Referenced in this Report. + +* Concept Index:: + +@detailmenu --- The Detailed Node Listing --- + +High-Level Description of GNU @code{gperf} + +* Input Format:: Input Format to @code{gperf} +* Output Format:: Output Format for Generated C Code with @code{gperf} +* Binary Strings:: Use of NUL bytes + +Input Format to @code{gperf} + +* Declarations:: Declarations. +* Keywords:: Format for Keyword Entries. +* Functions:: Including Additional C Functions. +* Controls for GNU indent:: Where to place directives for GNU @code{indent}. + +Declarations + +* User-supplied Struct:: Specifying keywords with attributes. +* Gperf Declarations:: Embedding command line options in the input. +* C Code Inclusion:: Including C declarations and definitions. + +Invoking @code{gperf} + +* Input Details:: Options that affect Interpretation of the Input File +* Output Language:: Specifying the Language for the Output Code +* Output Details:: Fine tuning Details in the Output Code +* Algorithmic Details:: Changing the Algorithms employed by @code{gperf} +* Verbosity:: Informative Output + +@end detailmenu +@end menu + +@end ifinfo + +@node Copying, Contributors, Top, Top +@unnumbered GNU GENERAL PUBLIC LICENSE +@include gpl.texinfo + +@node Contributors, Motivation, Copying, Top +@unnumbered Contributors to GNU @code{gperf} Utility + +@itemize @bullet +@item +@cindex Bugs +The GNU @code{gperf} perfect hash function generator utility was +written in GNU C++ by Douglas C. Schmidt. The general +idea for the perfect hash function generator was inspired by Keith +Bostic's algorithm written in C, and distributed to net.sources around +1984. The current program is a heavily modified, enhanced, and extended +implementation of Keith's basic idea, created at the University of +California, Irvine. Bugs, patches, and suggestions should be reported +to @code{}. + +@item +Special thanks is extended to Michael Tiemann and Doug Lea, for +providing a useful compiler, and for giving me a forum to exhibit my +creation. + +In addition, Adam de Boor and Nels Olson provided many tips and insights +that greatly helped improve the quality and functionality of @code{gperf}. + +@item +Bruno Haible enhanced and optimized the search algorithm. He also rewrote +the input routines and the output routines for better reliability, and +added a testsuite. +@end itemize + +@node Motivation, Search Structures, Contributors, Top +@chapter Introduction + +@code{gperf} is a perfect hash function generator written in C++. It +transforms an @var{n} element user-specified keyword set @var{W} into a +perfect hash function @var{F}. @var{F} uniquely maps keywords in +@var{W} onto the range 0..@var{k}, where @var{k} >= @var{n-1}. If @var{k} += @var{n-1} then @var{F} is a @emph{minimal} perfect hash function. +@code{gperf} generates a 0..@var{k} element static lookup table and a +pair of C functions. These functions determine whether a given +character string @var{s} occurs in @var{W}, using at most one probe into +the lookup table. + +@code{gperf} currently generates the reserved keyword recognizer for +lexical analyzers in several production and research compilers and +language processing tools, including GNU C, GNU C++, GNU Java, GNU Pascal, +GNU Modula 3, and GNU indent. Complete C++ source code for @code{gperf} is +available from @code{http://ftp.gnu.org/pub/gnu/gperf/}. +A paper describing @code{gperf}'s design and implementation in greater +detail is available in the Second USENIX C++ Conference proceedings +or from @code{http://www.cs.wustl.edu/~schmidt/resume.html}. + +@node Search Structures, Description, Motivation, Top +@chapter Static search structures and GNU @code{gperf} +@cindex Static search structure + +A @dfn{static search structure} is an Abstract Data Type with certain +fundamental operations, e.g., @emph{initialize}, @emph{insert}, +and @emph{retrieve}. Conceptually, all insertions occur before any +retrievals. In practice, @code{gperf} generates a @emph{static} array +containing search set keywords and any associated attributes specified +by the user. Thus, there is essentially no execution-time cost for the +insertions. It is a useful data structure for representing @emph{static +search sets}. Static search sets occur frequently in software system +applications. Typical static search sets include compiler reserved +words, assembler instruction opcodes, and built-in shell interpreter +commands. Search set members, called @dfn{keywords}, are inserted into +the structure only once, usually during program initialization, and are +not generally modified at run-time. + +Numerous static search structure implementations exist, e.g., +arrays, linked lists, binary search trees, digital search tries, and +hash tables. Different approaches offer trade-offs between space +utilization and search time efficiency. For example, an @var{n} element +sorted array is space efficient, though the average-case time +complexity for retrieval operations using binary search is +proportional to log @var{n}. Conversely, hash table implementations +often locate a table entry in constant time, but typically impose +additional memory overhead and exhibit poor worst case performance. + +@cindex Minimal perfect hash functions +@emph{Minimal perfect hash functions} provide an optimal solution for a +particular class of static search sets. A minimal perfect hash +function is defined by two properties: + +@itemize @bullet +@item +It allows keyword recognition in a static search set using at most +@emph{one} probe into the hash table. This represents the ``perfect'' +property. +@item +The actual memory allocated to store the keywords is precisely large +enough for the keyword set, and @emph{no larger}. This is the +``minimal'' property. +@end itemize + +For most applications it is far easier to generate @emph{perfect} hash +functions than @emph{minimal perfect} hash functions. Moreover, +non-minimal perfect hash functions frequently execute faster than +minimal ones in practice. This phenomena occurs since searching a +sparse keyword table increases the probability of locating a ``null'' +entry, thereby reducing string comparisons. @code{gperf}'s default +behavior generates @emph{near-minimal} perfect hash functions for +keyword sets. However, @code{gperf} provides many options that permit +user control over the degree of minimality and perfection. + +Static search sets often exhibit relative stability over time. For +example, Ada's 63 reserved words have remained constant for nearly a +decade. It is therefore frequently worthwhile to expend concerted +effort building an optimal search structure @emph{once}, if it +subsequently receives heavy use multiple times. @code{gperf} removes +the drudgery associated with constructing time- and space-efficient +search structures by hand. It has proven a useful and practical tool +for serious programming projects. Output from @code{gperf} is currently +used in several production and research compilers, including GNU C, GNU +C++, GNU Java, GNU Pascal, and GNU Modula 3. The latter two compilers are +not yet part of the official GNU distribution. Each compiler utilizes +@code{gperf} to automatically generate static search structures that +efficiently identify their respective reserved keywords. + +@node Description, Options, Search Structures, Top +@chapter High-Level Description of GNU @code{gperf} + +@menu +* Input Format:: Input Format to @code{gperf} +* Output Format:: Output Format for Generated C Code with @code{gperf} +* Binary Strings:: Use of NUL bytes +@end menu + +The perfect hash function generator @code{gperf} reads a set of +``keywords'' from an input file (or from the standard input by +default). It attempts to derive a perfect hashing function that +recognizes a member of the @dfn{static keyword set} with at most a +single probe into the lookup table. If @code{gperf} succeeds in +generating such a function it produces a pair of C source code routines +that perform hashing and table lookup recognition. All generated C code +is directed to the standard output. Command-line options described +below allow you to modify the input and output format to @code{gperf}. + +By default, @code{gperf} attempts to produce time-efficient code, with +less emphasis on efficient space utilization. However, several options +exist that permit trading-off execution time for storage space and vice +versa. In particular, expanding the generated table size produces a +sparse search structure, generally yielding faster searches. +Conversely, you can direct @code{gperf} to utilize a C @code{switch} +statement scheme that minimizes data space storage size. Furthermore, +using a C @code{switch} may actually speed up the keyword retrieval time +somewhat. Actual results depend on your C compiler, of course. + +In general, @code{gperf} assigns values to the bytes it is using +for hashing until some set of values gives each keyword a unique value. +A helpful heuristic is that the larger the hash value range, the easier +it is for @code{gperf} to find and generate a perfect hash function. +Experimentation is the key to getting the most from @code{gperf}. + +@node Input Format, Output Format, Description, Description +@section Input Format to @code{gperf} +@cindex Format +@cindex Declaration section +@cindex Keywords section +@cindex Functions section +You can control the input file format by varying certain command-line +arguments, in particular the @samp{-t} option. The input's appearance +is similar to GNU utilities @code{flex} and @code{bison} (or UNIX +utilities @code{lex} and @code{yacc}). Here's an outline of the general +format: + +@example +@group +declarations +%% +keywords +%% +functions +@end group +@end example + +@emph{Unlike} @code{flex} or @code{bison}, the declarations section and +the functions section are optional. The following sections describe the +input format for each section. + +@menu +* Declarations:: Declarations. +* Keywords:: Format for Keyword Entries. +* Functions:: Including Additional C Functions. +* Controls for GNU indent:: Where to place directives for GNU @code{indent}. +@end menu + +It is possible to omit the declaration section entirely, if the @samp{-t} +option is not given. In this case the input file begins directly with the +first keyword line, e.g.: + +@example +@group +january +february +march +april +... +@end group +@end example + +@node Declarations, Keywords, Input Format, Input Format +@subsection Declarations + +The keyword input file optionally contains a section for including +arbitrary C declarations and definitions, @code{gperf} declarations that +act like command-line options, as well as for providing a user-supplied +@code{struct}. + +@menu +* User-supplied Struct:: Specifying keywords with attributes. +* Gperf Declarations:: Embedding command line options in the input. +* C Code Inclusion:: Including C declarations and definitions. +@end menu + +@node User-supplied Struct, Gperf Declarations, Declarations, Declarations +@subsubsection User-supplied @code{struct} + +If the @samp{-t} option (or, equivalently, the @samp{%struct-type} declaration) +@emph{is} enabled, you @emph{must} provide a C @code{struct} as the last +component in the declaration section from the input file. The first +field in this struct must be of type @code{char *} or @code{const char *} +if the @samp{-P} option is not given, or of type @code{int} if the option +@samp{-P} (or, equivalently, the @samp{%pic} declaration) is enabled. +This first field must be called @samp{name}, although it is possible to modify +its name with the @samp{-K} option (or, equivalently, the +@samp{%define slot-name} declaration) described below. + +Here is a simple example, using months of the year and their attributes as +input: + +@example +@group +struct month @{ char *name; int number; int days; int leap_days; @}; +%% +january, 1, 31, 31 +february, 2, 28, 29 +march, 3, 31, 31 +april, 4, 30, 30 +may, 5, 31, 31 +june, 6, 30, 30 +july, 7, 31, 31 +august, 8, 31, 31 +september, 9, 30, 30 +october, 10, 31, 31 +november, 11, 30, 30 +december, 12, 31, 31 +@end group +@end example + +@cindex @samp{%%} +Separating the @code{struct} declaration from the list of keywords and +other fields are a pair of consecutive percent signs, @samp{%%}, +appearing left justified in the first column, as in the UNIX utility +@code{lex}. + +If the @code{struct} has already been declared in an include file, it can +be mentioned in an abbreviated form, like this: + +@example +@group +struct month; +%% +january, 1, 31, 31 +... +@end group +@end example + +@node Gperf Declarations, C Code Inclusion, User-supplied Struct, Declarations +@subsubsection Gperf Declarations + +The declaration section can contain @code{gperf} declarations. They +influence the way @code{gperf} works, like command line options do. +In fact, every such declaration is equivalent to a command line option. +There are three forms of declarations: + +@enumerate +@item +Declarations without argument, like @samp{%compare-lengths}. + +@item +Declarations with an argument, like @samp{%switch=@var{count}}. + +@item +Declarations of names of entities in the output file, like +@samp{%define lookup-function-name @var{name}}. +@end enumerate + +When a declaration is given both in the input file and as a command line +option, the command-line option's value prevails. + +The following @code{gperf} declarations are available. + +@table @samp +@item %delimiters=@var{delimiter-list} +@cindex @samp{%delimiters} +Allows you to provide a string containing delimiters used to +separate keywords from their attributes. The default is ",". This +option is essential if you want to use keywords that have embedded +commas or newlines. + +@item %struct-type +@cindex @samp{%struct-type} +Allows you to include a @code{struct} type declaration for generated +code; see above for an example. + +@item %ignore-case +@cindex @samp{%ignore-case} +Consider upper and lower case ASCII characters as equivalent. The string +comparison will use a case insignificant character comparison. Note that +locale dependent case mappings are ignored. + +@item %language=@var{language-name} +@cindex @samp{%language} +Instructs @code{gperf} to generate code in the language specified by the +option's argument. Languages handled are currently: + +@table @samp +@item KR-C +Old-style K&R C. This language is understood by old-style C compilers and +ANSI C compilers, but ANSI C compilers may flag warnings (or even errors) +because of lacking @samp{const}. + +@item C +Common C. This language is understood by ANSI C compilers, and also by +old-style C compilers, provided that you @code{#define const} to empty +for compilers which don't know about this keyword. + +@item ANSI-C +ANSI C. This language is understood by ANSI C compilers and C++ compilers. + +@item C++ +C++. This language is understood by C++ compilers. +@end table + +The default is C. + +@item %define slot-name @var{name} +@cindex @samp{%define slot-name} +This declaration is only useful when option @samp{-t} (or, equivalently, the +@samp{%struct-type} declaration) has been given. +By default, the program assumes the structure component identifier for +the keyword is @samp{name}. This option allows an arbitrary choice of +identifier for this component, although it still must occur as the first +field in your supplied @code{struct}. + +@item %define initializer-suffix @var{initializers} +@cindex @samp{%define initializer-suffix} +This declaration is only useful when option @samp{-t} (or, equivalently, the +@samp{%struct-type} declaration) has been given. +It permits to specify initializers for the structure members following +@var{slot-name} in empty hash table entries. The list of initializers +should start with a comma. By default, the emitted code will +zero-initialize structure members following @var{slot-name}. + +@item %define hash-function-name @var{name} +@cindex @samp{%define hash-function-name} +Allows you to specify the name for the generated hash function. Default +name is @samp{hash}. This option permits the use of two hash tables in +the same file. + +@item %define lookup-function-name @var{name} +@cindex @samp{%define lookup-function-name} +Allows you to specify the name for the generated lookup function. +Default name is @samp{in_word_set}. This option permits multiple +generated hash functions to be used in the same application. + +@item %define class-name @var{name} +@cindex @samp{%define class-name} +This option is only useful when option @samp{-L C++} (or, equivalently, +the @samp{%language=C++} declaration) has been given. It +allows you to specify the name of generated C++ class. Default name is +@code{Perfect_Hash}. + +@item %7bit +@cindex @samp{%7bit} +This option specifies that all strings that will be passed as arguments +to the generated hash function and the generated lookup function will +solely consist of 7-bit ASCII characters (bytes in the range 0..127). +(Note that the ANSI C functions @code{isalnum} and @code{isgraph} do +@emph{not} guarantee that a byte is in this range. Only an explicit +test like @samp{c >= 'A' && c <= 'Z'} guarantees this.) + +@item %compare-lengths +@cindex @samp{%compare-lengths} +Compare keyword lengths before trying a string comparison. This option +is mandatory for binary comparisons (@pxref{Binary Strings}). It also might +cut down on the number of string comparisons made during the lookup, since +keywords with different lengths are never compared via @code{strcmp}. +However, using @samp{%compare-lengths} might greatly increase the size of the +generated C code if the lookup table range is large (which implies that +the switch option @samp{-S} or @samp{%switch} is not enabled), since the length +table contains as many elements as there are entries in the lookup table. + +@item %compare-strncmp +@cindex @samp{%compare-strncmp} +Generates C code that uses the @code{strncmp} function to perform +string comparisons. The default action is to use @code{strcmp}. + +@item %readonly-tables +@cindex @samp{%readonly-tables} +Makes the contents of all generated lookup tables constant, i.e., +``readonly''. Many compilers can generate more efficient code for this +by putting the tables in readonly memory. + +@item %enum +@cindex @samp{%enum} +Define constant values using an enum local to the lookup function rather +than with #defines. This also means that different lookup functions can +reside in the same file. Thanks to James Clark @code{}. + +@item %includes +@cindex @samp{%includes} +Include the necessary system include file, @code{}, at the +beginning of the code. By default, this is not done; the user must +include this header file himself to allow compilation of the code. + +@item %global-table +@cindex @samp{%global-table} +Generate the static table of keywords as a static global variable, +rather than hiding it inside of the lookup function (which is the +default behavior). + +@item %pic +@cindex @samp{%pic} +Optimize the generated table for inclusion in shared libraries. This +reduces the startup time of programs using a shared library containing +the generated code. If the @samp{%struct-type} declaration (or, +equivalently, the option @samp{-t}) is also given, the first field of the +user-defined struct must be of type @samp{int}, not @samp{char *}, because +it will contain offsets into the string pool instead of actual strings. +To convert such an offset to a string, you can use the expression +@samp{stringpool + @var{o}}, where @var{o} is the offset. The string pool +name can be changed through the @samp{%define string-pool-name} declaration. + +@item %define string-pool-name @var{name} +@cindex @samp{%define string-pool-name} +Allows you to specify the name of the generated string pool created by +the declaration @samp{%pic} (or, equivalently, the option @samp{-P}). +The default name is @samp{stringpool}. This declaration permits the use of +two hash tables in the same file, with @samp{%pic} and even when the +@samp{%global-table} declaration (or, equivalently, the option @samp{-G}) +is given. + +@item %null-strings +@cindex @samp{%null-strings} +Use NULL strings instead of empty strings for empty keyword table entries. +This reduces the startup time of programs using a shared library containing +the generated code (but not as much as the declaration @samp{%pic}), at the +expense of one more test-and-branch instruction at run time. + +@item %define word-array-name @var{name} +@cindex @samp{%define word-array-name} +Allows you to specify the name for the generated array containing the +hash table. Default name is @samp{wordlist}. This option permits the +use of two hash tables in the same file, even when the option @samp{-G} +(or, equivalently, the @samp{%global-table} declaration) is given. + +@item %define length-table-name @var{name} +@cindex @samp{%define length-table-name} +Allows you to specify the name for the generated array containing the +length table. Default name is @samp{lengthtable}. This option permits the +use of two length tables in the same file, even when the option @samp{-G} +(or, equivalently, the @samp{%global-table} declaration) is given. + +@item %switch=@var{count} +@cindex @samp{%switch} +Causes the generated C code to use a @code{switch} statement scheme, +rather than an array lookup table. This can lead to a reduction in both +time and space requirements for some input files. The argument to this +option determines how many @code{switch} statements are generated. A +value of 1 generates 1 @code{switch} containing all the elements, a +value of 2 generates 2 tables with 1/2 the elements in each +@code{switch}, etc. This is useful since many C compilers cannot +correctly generate code for large @code{switch} statements. This option +was inspired in part by Keith Bostic's original C program. + +@item %omit-struct-type +@cindex @samp{%omit-struct-type} +Prevents the transfer of the type declaration to the output file. Use +this option if the type is already defined elsewhere. +@end table + +@node C Code Inclusion, , Gperf Declarations, Declarations +@subsubsection C Code Inclusion + +@cindex @samp{%@{} +@cindex @samp{%@}} +Using a syntax similar to GNU utilities @code{flex} and @code{bison}, it +is possible to directly include C source text and comments verbatim into +the generated output file. This is accomplished by enclosing the region +inside left-justified surrounding @samp{%@{}, @samp{%@}} pairs. Here is +an input fragment based on the previous example that illustrates this +feature: + +@example +@group +%@{ +#include +/* This section of code is inserted directly into the output. */ +int return_month_days (struct month *months, int is_leap_year); +%@} +struct month @{ char *name; int number; int days; int leap_days; @}; +%% +january, 1, 31, 31 +february, 2, 28, 29 +march, 3, 31, 31 +... +@end group +@end example + +@node Keywords, Functions, Declarations, Input Format +@subsection Format for Keyword Entries + +The second input file format section contains lines of keywords and any +associated attributes you might supply. A line beginning with @samp{#} +in the first column is considered a comment. Everything following the +@samp{#} is ignored, up to and including the following newline. A line +beginning with @samp{%} in the first column is an option declaration and +must not occur within the keywords section. + +The first field of each non-comment line is always the keyword itself. It +can be given in two ways: as a simple name, i.e., without surrounding +string quotation marks, or as a string enclosed in double-quotes, in +C syntax, possibly with backslash escapes like @code{\"} or @code{\234} +or @code{\xa8}. In either case, it must start right at the beginning +of the line, without leading whitespace. +In this context, a ``field'' is considered to extend up to, but +not include, the first blank, comma, or newline. Here is a simple +example taken from a partial list of C reserved words: + +@example +@group +# These are a few C reserved words, see the c.gperf file +# for a complete list of ANSI C reserved words. +unsigned +sizeof +switch +signed +if +default +for +while +return +@end group +@end example + +Note that unlike @code{flex} or @code{bison} the first @samp{%%} marker +may be elided if the declaration section is empty. + +Additional fields may optionally follow the leading keyword. Fields +should be separated by commas, and terminate at the end of line. What +these fields mean is entirely up to you; they are used to initialize the +elements of the user-defined @code{struct} provided by you in the +declaration section. If the @samp{-t} option (or, equivalently, the +@samp{%struct-type} declaration) is @emph{not} enabled +these fields are simply ignored. All previous examples except the last +one contain keyword attributes. + +@node Functions, Controls for GNU indent, Keywords, Input Format +@subsection Including Additional C Functions + +The optional third section also corresponds closely with conventions +found in @code{flex} and @code{bison}. All text in this section, +starting at the final @samp{%%} and extending to the end of the input +file, is included verbatim into the generated output file. Naturally, +it is your responsibility to ensure that the code contained in this +section is valid C. + +@node Controls for GNU indent, , Functions, Input Format +@subsection Where to place directives for GNU @code{indent}. + +If you want to invoke GNU @code{indent} on a @code{gperf} input file, +you will see that GNU @code{indent} doesn't understand the @samp{%%}, +@samp{%@{} and @samp{%@}} directives that control @code{gperf}'s +interpretation of the input file. Therefore you have to insert some +directives for GNU @code{indent}. More precisely, assuming the most +general input file structure + +@example +@group +declarations part 1 +%@{ +verbatim code +%@} +declarations part 2 +%% +keywords +%% +functions +@end group +@end example + +@noindent +you would insert @samp{*INDENT-OFF*} and @samp{*INDENT-ON*} comments +as follows: + +@example +@group +/* *INDENT-OFF* */ +declarations part 1 +%@{ +/* *INDENT-ON* */ +verbatim code +/* *INDENT-OFF* */ +%@} +declarations part 2 +%% +keywords +%% +/* *INDENT-ON* */ +functions +@end group +@end example + +@node Output Format, Binary Strings, Input Format, Description +@section Output Format for Generated C Code with @code{gperf} +@cindex hash table + +Several options control how the generated C code appears on the standard +output. Two C functions are generated. They are called @code{hash} and +@code{in_word_set}, although you may modify their names with a command-line +option. Both functions require two arguments, a string, @code{char *} +@var{str}, and a length parameter, @code{int} @var{len}. Their default +function prototypes are as follows: + +@deftypefun {unsigned int} hash (const char * @var{str}, unsigned int @var{len}) +By default, the generated @code{hash} function returns an integer value +created by adding @var{len} to several user-specified @var{str} byte +positions indexed into an @dfn{associated values} table stored in a +local static array. The associated values table is constructed +internally by @code{gperf} and later output as a static local C array +called @samp{hash_table}. The relevant selected positions (i.e. indices +into @var{str}) are specified via the @samp{-k} option when running +@code{gperf}, as detailed in the @emph{Options} section below (@pxref{Options}). +@end deftypefun + +@deftypefun {} in_word_set (const char * @var{str}, unsigned int @var{len}) +If @var{str} is in the keyword set, returns a pointer to that +keyword. More exactly, if the option @samp{-t} (or, equivalently, the +@samp{%struct-type} declaration) was given, it returns +a pointer to the matching keyword's structure. Otherwise it returns +@code{NULL}. +@end deftypefun + +If the option @samp{-c} (or, equivalently, the @samp{%compare-strncmp} +declaration) is not used, @var{str} must be a NUL terminated +string of exactly length @var{len}. If @samp{-c} (or, equivalently, the +@samp{%compare-strncmp} declaration) is used, @var{str} must +simply be an array of @var{len} bytes and does not need to be NUL +terminated. + +The code generated for these two functions is affected by the following +options: + +@table @samp +@item -t +@itemx --struct-type +Make use of the user-defined @code{struct}. + +@item -S @var{total-switch-statements} +@itemx --switch=@var{total-switch-statements} +@cindex @code{switch} +Generate 1 or more C @code{switch} statement rather than use a large, +(and potentially sparse) static array. Although the exact time and +space savings of this approach vary according to your C compiler's +degree of optimization, this method often results in smaller and faster +code. +@end table + +If the @samp{-t} and @samp{-S} options (or, equivalently, the +@samp{%struct-type} and @samp{%switch} declarations) are omitted, the default +action +is to generate a @code{char *} array containing the keywords, together with +additional empty strings used for padding the array. By experimenting +with the various input and output options, and timing the resulting C +code, you can determine the best option choices for different keyword +set characteristics. + +@node Binary Strings, , Output Format, Description +@section Use of NUL bytes +@cindex NUL + +By default, the code generated by @code{gperf} operates on zero +terminated strings, the usual representation of strings in C. This means +that the keywords in the input file must not contain NUL bytes, +and the @var{str} argument passed to @code{hash} or @code{in_word_set} +must be NUL terminated and have exactly length @var{len}. + +If option @samp{-c} (or, equivalently, the @samp{%compare-strncmp} +declaration) is used, then the @var{str} argument does not need +to be NUL terminated. The code generated by @code{gperf} will only +access the first @var{len}, not @var{len+1}, bytes starting at @var{str}. +However, the keywords in the input file still must not contain NUL +bytes. + +If option @samp{-l} (or, equivalently, the @samp{%compare-lengths} +declaration) is used, then the hash table performs binary +comparison. The keywords in the input file may contain NUL bytes, +written in string syntax as @code{\000} or @code{\x00}, and the code +generated by @code{gperf} will treat NUL like any other byte. +Also, in this case the @samp{-c} option (or, equivalently, the +@samp{%compare-strncmp} declaration) is ignored. + +@node Options, Bugs, Description, Top +@chapter Invoking @code{gperf} + +There are @emph{many} options to @code{gperf}. They were added to make +the program more convenient for use with real applications. ``On-line'' +help is readily available via the @samp{--help} option. Here is the +complete list of options. + +@menu +* Output File:: Specifying the Location of the Output File +* Input Details:: Options that affect Interpretation of the Input File +* Output Language:: Specifying the Language for the Output Code +* Output Details:: Fine tuning Details in the Output Code +* Algorithmic Details:: Changing the Algorithms employed by @code{gperf} +* Verbosity:: Informative Output +@end menu + +@node Output File, Input Details, Options, Options +@section Specifying the Location of the Output File + +@table @samp +@item --output-file=@var{file} +Allows you to specify the name of the file to which the output is written to. +@end table + +The results are written to standard output if no output file is specified +or if it is @samp{-}. + +@node Input Details, Output Language, Output File, Options +@section Options that affect Interpretation of the Input File + +These options are also available as declarations in the input file +(@pxref{Gperf Declarations}). + +@table @samp +@item -e @var{keyword-delimiter-list} +@itemx --delimiters=@var{keyword-delimiter-list} +@cindex Delimiters +Allows you to provide a string containing delimiters used to +separate keywords from their attributes. The default is ",". This +option is essential if you want to use keywords that have embedded +commas or newlines. One useful trick is to use -e'TAB', where TAB is +the literal tab character. + +@item -t +@itemx --struct-type +Allows you to include a @code{struct} type declaration for generated +code. Any text before a pair of consecutive @samp{%%} is considered +part of the type declaration. Keywords and additional fields may follow +this, one group of fields per line. A set of examples for generating +perfect hash tables and functions for Ada, C, C++, Pascal, Modula 2, +Modula 3 and JavaScript reserved words are distributed with this release. + +@item --ignore-case +Consider upper and lower case ASCII characters as equivalent. The string +comparison will use a case insignificant character comparison. Note that +locale dependent case mappings are ignored. This option is therefore not +suitable if a properly internationalized or locale aware case mapping +should be used. (For example, in a Turkish locale, the upper case equivalent +of the lowercase ASCII letter @samp{i} is the non-ASCII character +@samp{capital i with dot above}.) For this case, it is better to apply +an uppercase or lowercase conversion on the string before passing it to +the @code{gperf} generated function. +@end table + +@node Output Language, Output Details, Input Details, Options +@section Options to specify the Language for the Output Code + +These options are also available as declarations in the input file +(@pxref{Gperf Declarations}). + +@table @samp +@item -L @var{generated-language-name} +@itemx --language=@var{generated-language-name} +Instructs @code{gperf} to generate code in the language specified by the +option's argument. Languages handled are currently: + +@table @samp +@item KR-C +Old-style K&R C. This language is understood by old-style C compilers and +ANSI C compilers, but ANSI C compilers may flag warnings (or even errors) +because of lacking @samp{const}. + +@item C +Common C. This language is understood by ANSI C compilers, and also by +old-style C compilers, provided that you @code{#define const} to empty +for compilers which don't know about this keyword. + +@item ANSI-C +ANSI C. This language is understood by ANSI C compilers and C++ compilers. + +@item C++ +C++. This language is understood by C++ compilers. +@end table + +The default is C. + +@item -a +This option is supported for compatibility with previous releases of +@code{gperf}. It does not do anything. + +@item -g +This option is supported for compatibility with previous releases of +@code{gperf}. It does not do anything. +@end table + +@node Output Details, Algorithmic Details, Output Language, Options +@section Options for fine tuning Details in the Output Code + +Most of these options are also available as declarations in the input file +(@pxref{Gperf Declarations}). + +@table @samp +@item -K @var{slot-name} +@itemx --slot-name=@var{slot-name} +@cindex Slot name +This option is only useful when option @samp{-t} (or, equivalently, the +@samp{%struct-type} declaration) has been given. +By default, the program assumes the structure component identifier for +the keyword is @samp{name}. This option allows an arbitrary choice of +identifier for this component, although it still must occur as the first +field in your supplied @code{struct}. + +@item -F @var{initializers} +@itemx --initializer-suffix=@var{initializers} +@cindex Initializers +This option is only useful when option @samp{-t} (or, equivalently, the +@samp{%struct-type} declaration) has been given. +It permits to specify initializers for the structure members following +@var{slot-name} in empty hash table entries. The list of initializers +should start with a comma. By default, the emitted code will +zero-initialize structure members following @var{slot-name}. + +@item -H @var{hash-function-name} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:36:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A7F11065670; Mon, 28 Nov 2011 14:36:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687C98FC16; Mon, 28 Nov 2011 14:36:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASEa7Bg095240; Mon, 28 Nov 2011 14:36:07 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASEa69L095237; Mon, 28 Nov 2011 14:36:06 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111281436.pASEa69L095237@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 14:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228069 - stable/9/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:36:07 -0000 Author: rwatson Date: Mon Nov 28 14:36:06 2011 New Revision: 228069 URL: http://svn.freebsd.org/changeset/base/228069 Log: Merge r228039 from head to stable/9: Add an introductory Capsicum man page providing a high-level description of its mechanisms, pointing at other pertinent man pages, and cautioning about the experimental status of Capsicum in FreeBSD. Sponsored by: Google, Inc. Approved by: re (kib) Added: stable/9/share/man/man4/capsicum.4 - copied unchanged from r228039, head/share/man/man4/capsicum.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Nov 28 14:23:09 2011 (r228068) +++ stable/9/share/man/man4/Makefile Mon Nov 28 14:36:06 2011 (r228069) @@ -68,6 +68,7 @@ MAN= aac.4 \ bt.4 \ bwi.4 \ bwn.4 \ + capsicum.4 \ cardbus.4 \ carp.4 \ cas.4 \ Copied: stable/9/share/man/man4/capsicum.4 (from r228039, head/share/man/man4/capsicum.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/capsicum.4 Mon Nov 28 14:36:06 2011 (r228069, copy of r228039, head/share/man/man4/capsicum.4) @@ -0,0 +1,120 @@ +.\" +.\" Copyright (c) 2011 Robert N. M. Watson +.\" Copyright (c) 2011 Jonathan Anderson +.\" 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, 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 20, 2011 +.Dt CAPSICUM 4 +.Os +.Sh NAME +.Nm Capsicum +.Nd lightweight OS capability and sandbox framework +.Sh SYNOPSIS +.Cd "options CAPABILITY_MODE" +.Cd "options CAPABILITIES" +.Cd "options PROCDESC" +.Sh DESCRIPTION +.Nm +is a lightweight OS capability and sandbox framework implementing a hybrid +capability system model. +.Nm +can be used for application and library compartmentalisation, the +decomposition of larger bodies of software into isolated (sandboxed) +components in order to implement security policies and limit the impact of +software vulnerabilities. +.Pp +.Nm +provides two core kernel primitives: +.Bl -tag -width indent +.It capability mode +A process mode, entered by invoking +.Xr cap_enter 2 , +in which access to global OS namespaces (such as the file system and PID +namespaces) is restricted; only explicitly delegated rights, referenced by +memory mappings or file descriptors, may be used. +Once set, the flag is inherited by future children proceses, and may not be +cleared. +.It capabilities +File descriptors that wrap other file descriptors, masking operations that can +be called on them; for example, a file descriptor returned by +.Xr open 2 +may be refined using +.Xr cap_new 2 +so that only +.Xr read 2 +and +.Xr write 2 +can be called, but not +.Xr fchmod 2 . +.El +.Pp +In some cases, +.Nm +requires use of alternatives to traditional POSIX APIs in order to name +objects using capabilities rather than global namespaces: +.Bl -tag -width indent +.It process descriptors +File descriptors representing processes, allowing parent processes to manage +child processes without requiring access to the PID namespace. +.It anonymous shared memory +An extension to the POSIX shared memory API to support anonymous swap objects +associated with file descriptors. +.El +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr cap_getmode 2 , +.Xr cap_getrights 2 , +.Xr cap_new 2 , +.Xr fchmod 2 , +.Xr open 2 , +.Xr pdfork 2 , +.Xr pdgetpid 2 , +.Xr pdkill 2 , +.Xr pdwait4 2 , +.Xr read 2 , +.Xr shm_open 2 , +.Xr write 2 +.Sh HISTORY +.Nm +first appeared in +.Fx 9.0 , +and was developed at the University of Cambridge. +.Sh AUTHORS +.Nm +was developed by +.An -nosplit +.An "Robert Watson" Aq rwatson@FreeBSD.org +and +.An "Jonathan Anderson" Aq jonathan@FreeBSD.org +at the University of Cambridge, and +.An "Ben Laurie" Aq benl@FreeBSD.org +and +.An "Kris Kennaway" Aq kris@FreeBSD.org +at Google, Inc. +.Sh BUGS +.Nm +is considered experimental in +.Fx . From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:39:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00744106564A; Mon, 28 Nov 2011 14:39:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E39988FC14; Mon, 28 Nov 2011 14:39:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASEduuP095406; Mon, 28 Nov 2011 14:39:56 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASEduEI095403; Mon, 28 Nov 2011 14:39:56 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111281439.pASEduEI095403@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 14:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228070 - stable/9/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:39:57 -0000 Author: rwatson Date: Mon Nov 28 14:39:56 2011 New Revision: 228070 URL: http://svn.freebsd.org/changeset/base/228070 Log: Merge r228040 from head to stable/9: Cross-reference capsicum.4 from cap_enter.2 and cap_new.2. Sponsored by: Google, Inc. Approved by: re (kib) Modified: stable/9/lib/libc/sys/cap_enter.2 stable/9/lib/libc/sys/cap_new.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/sys/cap_enter.2 ============================================================================== --- stable/9/lib/libc/sys/cap_enter.2 Mon Nov 28 14:36:06 2011 (r228069) +++ stable/9/lib/libc/sys/cap_enter.2 Mon Nov 28 14:39:56 2011 (r228070) @@ -89,7 +89,8 @@ acquired rights as possible. .Rv -std cap_enter cap_getmode .Sh SEE ALSO .Xr cap_new 2 , -.Xr fexecve 2 +.Xr fexecve 2 , +.Xr capsicum 4 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the .Tn TrustedBSD Modified: stable/9/lib/libc/sys/cap_new.2 ============================================================================== --- stable/9/lib/libc/sys/cap_new.2 Mon Nov 28 14:36:06 2011 (r228069) +++ stable/9/lib/libc/sys/cap_new.2 Mon Nov 28 14:39:56 2011 (r228070) @@ -456,6 +456,7 @@ argument is not a capability. .Xr sem_post 3 , .Xr sem_trywait 3 , .Xr sem_wait 3 , +.Xr capsicum 4 , .Xr snp 4 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:44:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B01F11065670; Mon, 28 Nov 2011 14:44:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3168FC1B; Mon, 28 Nov 2011 14:44:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASEixYT095607; Mon, 28 Nov 2011 14:44:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASEixdO095604; Mon, 28 Nov 2011 14:44:59 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111281444.pASEixdO095604@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 28 Nov 2011 14:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:44:59 -0000 Author: glebius Date: Mon Nov 28 14:44:59 2011 New Revision: 228071 URL: http://svn.freebsd.org/changeset/base/228071 Log: - Use generic alloc_unr(9) allocator for if_clone, instead of hand-made. - When registering new cloner, check whether a cloner with same name already exist. - When allocating unit, also check with help of ifunit() whether such interface already exist or not. [1] PR: kern/162789 [1] Modified: head/sys/net/if_clone.c head/sys/net/if_clone.h Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Mon Nov 28 14:39:56 2011 (r228070) +++ head/sys/net/if_clone.c Mon Nov 28 14:44:59 2011 (r228071) @@ -282,33 +282,34 @@ if_clone_destroyif(struct if_clone *ifc, /* * Register a network interface cloner. */ -void +int if_clone_attach(struct if_clone *ifc) { - int len, maxclone; + struct if_clone *ifc1; + + KASSERT(ifc->ifc_name != NULL, ("%s: no name\n", __func__)); - /* - * Compute bitmap size and allocate it. - */ - maxclone = ifc->ifc_maxunit + 1; - len = maxclone >> 3; - if ((len << 3) < maxclone) - len++; - ifc->ifc_units = malloc(len, M_CLONE, M_WAITOK | M_ZERO); - ifc->ifc_bmlen = len; IF_CLONE_LOCK_INIT(ifc); IF_CLONE_ADDREF(ifc); + ifc->ifc_unrhdr = new_unrhdr(0, ifc->ifc_maxunit, &ifc->ifc_mtx); + LIST_INIT(&ifc->ifc_iflist); IF_CLONERS_LOCK(); + LIST_FOREACH(ifc1, &V_if_cloners, ifc_list) + if (strcmp(ifc->ifc_name, ifc1->ifc_name) == 0) { + IF_CLONERS_UNLOCK(); + IF_CLONE_REMREF(ifc); + return (EEXIST); + } LIST_INSERT_HEAD(&V_if_cloners, ifc, ifc_list); V_if_cloners_count++; IF_CLONERS_UNLOCK(); - LIST_INIT(&ifc->ifc_iflist); - if (ifc->ifc_attach != NULL) (*ifc->ifc_attach)(ifc); EVENTHANDLER_INVOKE(if_clone_event, ifc); + + return (0); } /* @@ -338,16 +339,12 @@ if_clone_detach(struct if_clone *ifc) static void if_clone_free(struct if_clone *ifc) { - for (int bytoff = 0; bytoff < ifc->ifc_bmlen; bytoff++) { - KASSERT(ifc->ifc_units[bytoff] == 0x00, - ("ifc_units[%d] is not empty", bytoff)); - } KASSERT(LIST_EMPTY(&ifc->ifc_iflist), ("%s: ifc_iflist not empty", __func__)); IF_CLONE_LOCK_DESTROY(ifc); - free(ifc->ifc_units, M_CLONE); + delete_unrhdr(ifc->ifc_unrhdr); } /* @@ -441,73 +438,40 @@ ifc_name2unit(const char *name, int *uni int ifc_alloc_unit(struct if_clone *ifc, int *unit) { - int wildcard, bytoff, bitoff; - int err = 0; - - IF_CLONE_LOCK(ifc); + char name[IFNAMSIZ]; + int wildcard; - bytoff = bitoff = 0; wildcard = (*unit < 0); - /* - * Find a free unit if none was given. - */ +retry: if (wildcard) { - while ((bytoff < ifc->ifc_bmlen) - && (ifc->ifc_units[bytoff] == 0xff)) - bytoff++; - if (bytoff >= ifc->ifc_bmlen) { - err = ENOSPC; - goto done; - } - while ((ifc->ifc_units[bytoff] & (1 << bitoff)) != 0) - bitoff++; - *unit = (bytoff << 3) + bitoff; - } - - if (*unit > ifc->ifc_maxunit) { - err = ENOSPC; - goto done; + *unit = alloc_unr(ifc->ifc_unrhdr); + if (*unit == -1) + return (ENOSPC); + } else { + *unit = alloc_unr_specific(ifc->ifc_unrhdr, *unit); + if (*unit == -1) + return (EEXIST); } - if (!wildcard) { - bytoff = *unit >> 3; - bitoff = *unit - (bytoff << 3); + snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, *unit); + if (ifunit(name) != NULL) { + if (wildcard) + goto retry; /* XXXGL: yep, it's a unit leak */ + else + return (EEXIST); } - if((ifc->ifc_units[bytoff] & (1 << bitoff)) != 0) { - err = EEXIST; - goto done; - } - /* - * Allocate the unit in the bitmap. - */ - KASSERT((ifc->ifc_units[bytoff] & (1 << bitoff)) == 0, - ("%s: bit is already set", __func__)); - ifc->ifc_units[bytoff] |= (1 << bitoff); - IF_CLONE_ADDREF_LOCKED(ifc); + IF_CLONE_ADDREF(ifc); -done: - IF_CLONE_UNLOCK(ifc); - return (err); + return (0); } void ifc_free_unit(struct if_clone *ifc, int unit) { - int bytoff, bitoff; - - /* - * Compute offset in the bitmap and deallocate the unit. - */ - bytoff = unit >> 3; - bitoff = unit - (bytoff << 3); - - IF_CLONE_LOCK(ifc); - KASSERT((ifc->ifc_units[bytoff] & (1 << bitoff)) != 0, - ("%s: bit is already cleared", __func__)); - ifc->ifc_units[bytoff] &= ~(1 << bitoff); - IF_CLONE_REMREF_LOCKED(ifc); /* releases lock */ + free_unr(ifc->ifc_unrhdr, unit); + IF_CLONE_REMREF(ifc); } void Modified: head/sys/net/if_clone.h ============================================================================== --- head/sys/net/if_clone.h Mon Nov 28 14:39:56 2011 (r228070) +++ head/sys/net/if_clone.h Mon Nov 28 14:44:59 2011 (r228071) @@ -37,7 +37,15 @@ #define IFC_CLONE_INITIALIZER(name, data, maxunit, \ attach, match, create, destroy) \ - { { 0 }, name, maxunit, NULL, 0, data, attach, match, create, destroy } + { \ + .ifc_name = name, \ + .ifc_maxunit = maxunit, \ + .ifc_data = data, \ + .ifc_attach = attach, \ + .ifc_match = match, \ + .ifc_create = create, \ + .ifc_destroy = destroy, \ + } /* * Structure describing a `cloning' interface. @@ -52,10 +60,7 @@ struct if_clone { LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */ const char *ifc_name; /* (c) Name of device, e.g. `gif' */ int ifc_maxunit; /* (c) Maximum unit number */ - unsigned char *ifc_units; /* (i) Bitmap to handle units. */ - /* Considered private, access */ - /* via ifc_(alloc|free)_unit(). */ - int ifc_bmlen; /* (c) Bitmap length. */ + struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ void *ifc_data; /* (*) Data for ifc_* functions. */ /* (c) Driver specific cloning functions. Called with no locks held. */ @@ -65,12 +70,12 @@ struct if_clone { int (*ifc_destroy)(struct if_clone *, struct ifnet *); long ifc_refcnt; /* (i) Refrence count. */ - struct mtx ifc_mtx; /* Muted to protect members. */ + struct mtx ifc_mtx; /* Mutex to protect members. */ LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces */ }; void if_clone_init(void); -void if_clone_attach(struct if_clone *); +int if_clone_attach(struct if_clone *); void if_clone_detach(struct if_clone *); void vnet_if_clone_init(void); From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 14:58:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F35106566B; Mon, 28 Nov 2011 14:58:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3BD78FC14; Mon, 28 Nov 2011 14:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASEwqlD096085; Mon, 28 Nov 2011 14:58:52 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASEwq61096078; Mon, 28 Nov 2011 14:58:52 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201111281458.pASEwq61096078@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 28 Nov 2011 14:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228072 - in vendor/flex: . dist dist/doc dist/m4 dist/usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:58:52 -0000 Author: bapt (ports committer) Date: Mon Nov 28 14:58:51 2011 New Revision: 228072 URL: http://svn.freebsd.org/changeset/base/228072 Log: import vanilla flex version 2.5.35 Reviewed by: cognet Approved by: cognet Added: vendor/flex/FREEBSD-Xlist vendor/flex/dist/ABOUT-NLS vendor/flex/dist/AUTHORS vendor/flex/dist/COPYING vendor/flex/dist/ChangeLog vendor/flex/dist/FlexLexer.h (contents, props changed) vendor/flex/dist/INSTALL vendor/flex/dist/Makefile.am (contents, props changed) vendor/flex/dist/Makefile.in (contents, props changed) vendor/flex/dist/NEWS vendor/flex/dist/ONEWS vendor/flex/dist/README vendor/flex/dist/README-alpha vendor/flex/dist/README.cvs vendor/flex/dist/THANKS vendor/flex/dist/TODO vendor/flex/dist/autogen.sh (contents, props changed) vendor/flex/dist/buf.c (contents, props changed) vendor/flex/dist/ccl.c (contents, props changed) vendor/flex/dist/compile (contents, props changed) vendor/flex/dist/conf.in (contents, props changed) vendor/flex/dist/config.guess (contents, props changed) vendor/flex/dist/config.rpath (contents, props changed) vendor/flex/dist/config.sub (contents, props changed) vendor/flex/dist/configure (contents, props changed) vendor/flex/dist/configure.in (contents, props changed) vendor/flex/dist/depcomp (contents, props changed) vendor/flex/dist/dfa.c (contents, props changed) vendor/flex/dist/doc/ vendor/flex/dist/doc/Makefile.am (contents, props changed) vendor/flex/dist/doc/Makefile.in (contents, props changed) vendor/flex/dist/doc/flex.1 (contents, props changed) vendor/flex/dist/doc/flex.info (contents, props changed) vendor/flex/dist/doc/flex.info-1 (contents, props changed) vendor/flex/dist/doc/flex.info-2 (contents, props changed) vendor/flex/dist/doc/mdate-sh (contents, props changed) vendor/flex/dist/doc/stamp-vti vendor/flex/dist/ecs.c (contents, props changed) vendor/flex/dist/filter.c (contents, props changed) vendor/flex/dist/flex.skl vendor/flex/dist/flexdef.h (contents, props changed) vendor/flex/dist/flexint.h (contents, props changed) vendor/flex/dist/gen.c (contents, props changed) vendor/flex/dist/gettext.h (contents, props changed) vendor/flex/dist/install-sh (contents, props changed) vendor/flex/dist/libmain.c (contents, props changed) vendor/flex/dist/libyywrap.c (contents, props changed) vendor/flex/dist/m4/ vendor/flex/dist/m4/Makefile.am (contents, props changed) vendor/flex/dist/m4/Makefile.in (contents, props changed) vendor/flex/dist/main.c (contents, props changed) vendor/flex/dist/misc.c (contents, props changed) vendor/flex/dist/missing (contents, props changed) vendor/flex/dist/mkinstalldirs (contents, props changed) vendor/flex/dist/mkskel.sh (contents, props changed) vendor/flex/dist/nfa.c (contents, props changed) vendor/flex/dist/options.c (contents, props changed) vendor/flex/dist/options.h (contents, props changed) vendor/flex/dist/parse.c (contents, props changed) vendor/flex/dist/parse.h (contents, props changed) vendor/flex/dist/parse.y (contents, props changed) vendor/flex/dist/regex.c (contents, props changed) vendor/flex/dist/scan.c (contents, props changed) vendor/flex/dist/scan.l (contents, props changed) vendor/flex/dist/scanflags.c (contents, props changed) vendor/flex/dist/scanopt.c (contents, props changed) vendor/flex/dist/scanopt.h (contents, props changed) vendor/flex/dist/skel.c (contents, props changed) vendor/flex/dist/sym.c (contents, props changed) vendor/flex/dist/tables.c (contents, props changed) vendor/flex/dist/tables.h (contents, props changed) vendor/flex/dist/tables_shared.c (contents, props changed) vendor/flex/dist/tables_shared.h (contents, props changed) vendor/flex/dist/tblcmp.c (contents, props changed) vendor/flex/dist/version.h (contents, props changed) vendor/flex/dist/yylex.c (contents, props changed) Deleted: vendor/flex/dist/usr.bin/ Added: vendor/flex/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/FREEBSD-Xlist Mon Nov 28 14:58:51 2011 (r228072) @@ -0,0 +1,9 @@ +*/examples +*/tests +*/*.tex +*/*.texi +*/tools +*/*.pro +*/po +*/*.m4 +*/*.pdf Added: vendor/flex/dist/ABOUT-NLS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/dist/ABOUT-NLS Mon Nov 28 14:58:51 2011 (r228072) @@ -0,0 +1,625 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of May 2003. +The matrix shows, in regard of each package, for which languages PO +files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files am az be bg ca cs da de el en en_GB eo es + +-------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + anubis | | + ap-utils | | + bash | [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] | + clisp | | + clisp | [] [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] | + gas | [] | + gawk | [] [] [] [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] [] | + gnucash | () [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-calendar | [] | + gpe-conf | [] | + gpe-contacts | [] | + gpe-edit | | + gpe-login | [] | + gpe-ownerinfo | [] | + gpe-sketchbook | [] | + gpe-timesheet | | + gpe-today | [] | + gpe-todo | [] | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + grep | [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | [] [] [] [] | + jwhois | [] | + kbd | [] [] [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] | + sh-utils | [] [] [] | + sharutils | [] [] [] [] [] [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] | + tin | () () | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +-------------------------------------------+ + am az be bg ca cs da de el en en_GB eo es + 0 1 4 2 31 17 54 60 14 1 4 12 56 + + et fa fi fr ga gl he hr hu id it ja ko + +----------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + anubis | [] | + ap-utils | [] | + bash | [] [] | + batchelor | [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] | + clisp | | + clisp | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] | + gas | [] | + gawk | [] [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnucash | [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-calendar | [] | + gpe-conf | | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () [] () () | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] [] [] [] | + jpilot | [] () | + jwhois | [] [] [] [] | + kbd | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | [] () () | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] | + sketch | [] | + soundtracker | [] [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +----------------------------------------+ + et fa fi fr ga gl he hr hu id it ja ko + 20 1 15 73 14 24 8 10 30 31 19 31 9 + + lg lt lv ms nb nl nn no pl pt pt_BR ro + +----------------------------------------+ + a2ps | [] [] () () () [] [] | + aegis | () | + anubis | [] [] | + ap-utils | () | + bash | [] | + batchelor | | + bfd | | + binutils | | + bison | [] [] [] [] | + bluez-pin | [] | + clisp | | + clisp | [] | + coreutils | [] | + cpio | [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] | + fetchmail | () () | + fileutils | [] | + findutils | [] [] [] [] | + flex | [] | + gas | | + gawk | [] | + gcal | | + gcc | | + gettext | [] | + gettext-runtime | [] | + gettext-tools | | + gimp-print | [] | + gliv | [] | + glunarclock | [] | + gnucash | | + gnucash-glossary | [] [] | + gnupg | | + gpe-calendar | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | () () () | + grep | [] [] [] [] | + gretl | | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] | + jpilot | () () | + jwhois | [] [] [] | + kbd | | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] | + lifelines | | + lilypond | [] | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] | + man-db | [] | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] | + screem | | + sed | [] [] | + sh-utils | [] | + sharutils | [] | + sketch | [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] | + textutils | [] | + tin | | + util-linux | [] [] | + vorbis-tools | [] [] | + wastesedge | | + wdiff | [] [] [] [] | + wget | [] [] [] | + xchat | [] [] | + xpad | [] | + +----------------------------------------+ + lg lt lv ms nb nl nn no pl pt pt_BR ro + 0 0 2 11 7 26 3 4 18 15 34 34 + + ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + +-------------------------------------------+ + a2ps | [] [] [] [] [] | 16 + aegis | () | 0 + anubis | [] [] | 5 + ap-utils | () | 1 + bash | [] | 7 + batchelor | | 1 + bfd | [] [] [] | 7 + binutils | [] [] [] | 7 + bison | [] [] | 13 + bluez-pin | | 7 + clisp | | 0 + clisp | | 5 + coreutils | [] [] [] [] [] | 14 + cpio | [] [] [] | 13 + darkstat | [] () () | 9 + diffutils | [] [] [] [] | 21 + e2fsprogs | [] | 3 + enscript | [] [] [] | 11 + error | [] [] [] | 14 + fetchmail | [] | 7 + fileutils | [] [] [] [] [] [] | 15 + findutils | [] [] [] [] [] [] | 27 + flex | [] [] [] | 10 + gas | [] | 3 + gawk | [] [] | 9 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 15 + gettext-runtime | [] [] [] [] [] [] | 16 + gettext-tools | [] [] | 5 + gimp-print | [] [] | 10 + gliv | | 1 + glunarclock | [] [] [] | 11 + gnucash | [] [] | 4 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 16 + gpe-calendar | [] | 5 + gpe-conf | | 3 + gpe-contacts | [] | 4 + gpe-edit | [] | 5 + gpe-login | [] | 5 + gpe-ownerinfo | [] | 7 + gpe-sketchbook | [] | 5 + gpe-timesheet | [] | 6 + gpe-today | [] | 6 + gpe-todo | [] | 6 + gphoto2 | [] [] | 9 + gprof | [] [] | 7 + gpsdrive | [] [] | 3 + grep | [] [] [] [] | 24 + gretl | | 2 + hello | [] [] [] [] [] | 33 + id-utils | [] [] [] | 11 + indent | [] [] [] [] | 19 + jpilot | [] [] [] [] [] | 10 + jwhois | () () [] [] | 10 + kbd | [] [] | 8 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | | 6 + libiconv | [] [] [] [] [] [] | 21 + lifelines | [] | 2 + lilypond | [] | 4 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] [] | 14 + m4 | [] [] [] | 15 + mailutils | | 2 + make | [] [] [] [] | 15 + man-db | [] | 6 + mysecretdiary | [] [] | 8 + nano | [] [] [] | 15 + nano_1_0 | [] [] [] | 15 + opcodes | [] [] | 9 + parted | [] [] | 13 + ptx | [] [] [] | 22 + python | | 0 + radius | | 0 + recode | [] [] [] [] | 19 + screem | [] | 1 + sed | [] [] [] [] [] | 20 + sh-utils | [] [] [] | 13 + sharutils | [] [] [] [] | 16 + sketch | [] | 5 + soundtracker | [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] [] | 13 + textutils | [] [] [] [] [] | 15 + tin | | 1 + util-linux | [] [] | 14 + vorbis-tools | [] | 7 + wastesedge | | 0 + wdiff | [] [] [] [] | 17 + wget | [] [] [] [] [] [] [] | 25 + xchat | [] [] [] | 11 + xpad | | 1 + +-------------------------------------------+ + 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If May 2003 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + + If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + Added: vendor/flex/dist/AUTHORS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/dist/AUTHORS Mon Nov 28 14:58:51 2011 (r228072) @@ -0,0 +1,16 @@ + +In 2001, Will Estes took over as maintainer of flex. + +John Millaway is a co-author of the current version of flex. He has +contributed a large number of new features, fixed a large number of +outstanding bugs and has made significant contributions to the flex +documentation. + +Aaron Stone has contributed several bug fixes to the flex codebase. + +Vern Paxson wrote flex with the help of many ideas and much +inspiration from Van Jacobson. Original version by Jef Poskanzer. + +The fast table representation is a partial implementation of a design +done by Van Jacobson. The implementation was done by Kevin Gong and +Vern Paxson. Added: vendor/flex/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/dist/COPYING Mon Nov 28 14:58:51 2011 (r228072) @@ -0,0 +1,42 @@ +Flex carries the copyright used for BSD software, slightly modified +because it originated at the Lawrence Berkeley (not Livermore!) Laboratory, +which operates under a contract with the Department of Energy: + +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The Flex Project. + +Copyright (c) 1990, 1997 The Regents of the University of California. +All rights reserved. + +This code is derived from software contributed to Berkeley by +Vern Paxson. + +The United States Government has rights in this work pursuant +to contract no. DE-AC03-76SF00098 between the United States +Department of Energy and the University of California. + +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, 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. + +Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + +This basically says "do whatever you please with this software except +remove this notice or take advantage of the University's (or the flex +authors') name". + +Note that the "flex.skl" scanner skeleton carries no copyright notice. +You are free to do whatever you please with scanners generated using flex; +for them, you are not even bound by the above copyright. Added: vendor/flex/dist/ChangeLog ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/dist/ChangeLog Mon Nov 28 14:58:51 2011 (r228072) @@ -0,0 +1,7439 @@ +2008-02-26 15:36 Will Estes + + * NEWS: add date of release + +2008-02-15 07:37 Will Estes + + * NEWS, parse.y: fix bug that prevented comments from working + properly + +2008-02-12 07:57 Will Estes + + * po/de.po: new de translation + +2008-02-10 06:08 Will Estes + + * NEWS, po/vi.po: new vi translation + +2008-02-09 19:22 Will Estes + + * NEWS, po/nl.po: new nl translation + +2008-02-09 14:59 Will Estes + + * NEWS, po/pl.po: new pl translation + +2008-02-09 14:19 Will Estes + + * NEWS, po/de.po, po/pt_BR.po: new de, pt_br translations + +2008-02-09 13:54 Will Estes + + * NEWS, flex.skl: generate headers for all functions (resolves bug + #1628314) + +2008-02-09 10:49 Will Estes + + * NEWS, flex.skl: change yy_size_t to be size_t (resolves bug + #1849812) + +2008-02-09 10:46 Will Estes + + * configure.in: start work on version 2.5.35 + +2007-12-12 16:00 Will Estes + + * NEWS, configure.in: revert NEWS and configure.in to version + 2.5.34 + +2007-09-12 11:28 Will Estes + + * NEWS, configure.in: update version number to 2.5.35 + +2007-09-10 02:17 Aaron Stone + + * tests/test-alloc-extra/scanner.l: Use %option extra-type. + +2007-09-10 02:16 Aaron Stone + + * NEWS, flex.skl, flexdef.h, main.c, parse.y, scan.l, + doc/flex.texi: Introduce %option extra-type="your_type *" (resolves + bug #1744505). + +2007-08-15 08:28 Will Estes + + * po/nl.po: new nl translations from the translation project + +2007-06-28 16:28 Will Estes + + * NEWS: change release date + +2007-06-27 21:59 Will Estes + + * flex.skl: adjustment for prefix classes; patch submitted by Petr + Machata + +2007-06-27 21:53 Will Estes + + * NEWS: NEWS item for yy_init_extra + +2007-06-12 12:33 Aaron Stone + + * doc/flex.texi: Docs and example for yylex_init_extra. + +2007-05-31 20:22 Will Estes + + * tests/test-alloc-extra/.cvsignore: ignore OUTPUT file in + test-alloc-extra + +2007-05-31 20:21 Will Estes + + * tests/descriptions: add description of concatenated options test + +2007-05-31 16:20 Will Estes + + * tests/test-alloc-extra/.cvsignore: add missing .cvsignore to + test-alloc-extra + +2007-05-31 02:21 Aaron Stone + + * configure.in, flex.skl, gen.c, main.c: Changes to resolve SF bugs + 1568325 and 1563589. + +2007-05-31 02:09 Aaron Stone + + * tests/: Makefile.am, descriptions, test-alloc-extra/Makefile.am, + test-alloc-extra/scanner.l, test-alloc-extra/test.input: Adding + test cases for yylex_init_extra. + +2007-05-12 11:27 Will Estes + + * configure.in, tests/test-pthread/scanner.l: fixes to test-pthread + +2007-05-12 09:13 Will Estes + + * NEWS: NEWS item for concatenated options + +2007-05-12 09:13 Will Estes + + * configure.in, tests/Makefile.am, + tests/test-concatenated-options/.cvsignore, + tests/test-concatenated-options/Makefile.am: unit test to verify + concatenated options parsing + +2007-05-12 09:11 Will Estes + + * scanopt.c: parse multiple short concatenated options; patch + submitted by Petr Machata + + * autogen.sh: remove --force option from autogen.sh; much faster + without it + +2007-05-11 14:35 Will Estes + + * NEWS, configure.in: version 2.5.34 + +2007-05-08 00:23 Aaron Stone + + * NEWS, flex.skl: Better checking after yyalloc/yyrealloc (resolves + bug #1595967) + +2007-05-01 08:10 Will Estes + + * doc/flex.texi: change title of manual to 'Lexical Analysis with + Flex' + +2007-04-25 14:16 Will Estes + + * flex.skl: c++ memory leak plug + +2007-04-23 09:29 Will Estes + + * flex.skl: roll back c++ memory patch as it causes the test suite + no end of grief + +2007-04-23 08:42 Will Estes + + * flex.skl: fix function definitions for non-ANSI environments + (from Manoj Srivastava from Debian patchset) + +2007-04-23 08:37 Will Estes + + * flex.skl: fix c++ memory leak (from Manoj Srivastava from Debian + patchset) + +2007-04-23 06:59 Will Estes + + * flex.skl: fix parameter name in comment (patch from Manoj + Srivastava from the debian patchset + +2007-04-23 06:57 Will Estes + + * flex.skl: add a size_t cast (patch from Manoj Srivastava from the + debian patchset + +2007-04-16 17:06 Will Estes + + * tests/: test-extended/Makefile.am, test-quotes/Makefile.am: + cleanups to handle VPATH builds better; passifies make distcheck + +2007-04-16 16:42 Will Estes + + * doc/flex.texi: drop using the \ in \ escaping as it throws pdf + generation for a loop + +2007-04-14 08:33 Will Estes + + * .cvsignore: add compile and *.tar.bz2 to .cvsignore + +2007-04-14 08:27 Will Estes + + * main.c: add call to setlocale for ctype as per debian patchset + +2007-04-14 08:25 Will Estes + + * Makefile.am, NEWS: provide for a PIC version of libfl.a for + shared libraries using flex scanners + +2007-04-13 13:24 Will Estes + + * FlexLexer.h: annotate endifs since they're a bit far from their + opening #if statements + +2007-04-13 12:55 Will Estes + + * flexdef.h, parse.y: refactor and slightly redo alloca testing, + resolves bug #1675899 + +2007-04-13 12:50 Will Estes + + * configure.in: overhaul configure.in: use octathorps for comments + so they're passed through m4 processing; better bracketing of m4 + arguments; retool checks as per suggestions from autoscan(1) + +2007-04-13 12:43 Will Estes + + * flex.skl: better handling of class that use the prefix + functionality; from submitted patch + +2007-04-13 12:32 Will Estes + + * flex.skl: fix skeleton for reentrant scanners + +2007-04-12 21:50 Will Estes + + * Makefile.am: remove homegrown tags target; automake does that for + us + +2007-04-12 15:12 Will Estes + + * FlexLexer.h: declare some const where missing in c++ header file + +2007-04-12 15:12 Will Estes + + * flex.skl: fix skeleton for reentrant scanners, resolves bug + #1694318 + +2007-04-10 15:20 Will Estes + + * doc/flex.texi: corrections to the manual as per suggestions from + flex-help@ + +2007-04-03 15:16 Will Estes + + * doc/flex.texi: include author names in online versions of the + manual + +2007-04-03 15:07 Will Estes + + * COPYING: update copyright notice + +2007-04-03 14:54 Will Estes + + * AUTHORS: rearrange and update AUTHORS + +2007-03-29 11:45 Will Estes + + * NEWS: note sf feature request 1658379 in NEWS + +2007-03-29 11:36 Will Estes + + * tools/cvsauthors: add sodabrew to cvsauthors file + +2007-03-29 11:25 Aaron Stone + + * flex.skl: + SourceForge feature request #1658379: Expose YY_BUF_SIZE in the + header file. + +2007-03-07 16:50 Will Estes + + * NEWS, filter.c, flex.skl: apply patches submitted by sodabrew + +2007-03-07 16:20 Will Estes + + * README.cvs: more changes describing building flex from cvs + +2007-03-07 16:16 Will Estes + + * Makefile.am, README.cvs, README.cvs-snapshot: rename + README.cvs-snapshot to README.cvs + +2007-03-07 16:14 Will Estes + + * README.cvs-snapshot: update to explain where flex cvs lives + +2007-03-07 15:45 Will Estes + + * README, doc/flex.texi: correct how to submit bugs + +2007-02-16 10:38 Will Estes + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 15:09:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1D5D1065673; Mon, 28 Nov 2011 15:09:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C31F68FC08; Mon, 28 Nov 2011 15:09:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASF9VaK096494; Mon, 28 Nov 2011 15:09:31 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASF9VYa096492; Mon, 28 Nov 2011 15:09:31 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111281509.pASF9VYa096492@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 15:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228073 - stable/9/cddl/lib/drti X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 15:09:32 -0000 Author: rwatson Date: Mon Nov 28 15:09:31 2011 New Revision: 228073 URL: http://svn.freebsd.org/changeset/base/228073 Log: Merge r228057 from head to stable/9: Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of bsd.prog.mk -- we need to compile PIC, which requires a library build. With this change, USDT (userspace DTrace probes) work from within shared libraries. PR: kern/159046 Submitted by: Alex Samorukov Comments by: Scott Lystig Fritchie Approved by: re (xxx) Modified: stable/9/cddl/lib/drti/Makefile Directory Properties: stable/9/cddl/lib/drti/ (props changed) Modified: stable/9/cddl/lib/drti/Makefile ============================================================================== --- stable/9/cddl/lib/drti/Makefile Mon Nov 28 14:58:51 2011 (r228072) +++ stable/9/cddl/lib/drti/Makefile Mon Nov 28 15:09:31 2011 (r228073) @@ -18,4 +18,4 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \ -DPIC ${PICFLAG} -.include +.include From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 15:34:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41CFA106566C; Mon, 28 Nov 2011 15:34:23 +0000 (UTC) (envelope-from joel@vnode.se) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id E7C298FC13; Mon, 28 Nov 2011 15:34:22 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 8C629E3F07C; Mon, 28 Nov 2011 16:16:23 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VgRkNUgf5nMx; Mon, 28 Nov 2011 16:16:16 +0100 (CET) Received: from goofy01.vnodelab.local (unknown [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id C7B5EE3F079; Mon, 28 Nov 2011 16:16:15 +0100 (CET) Date: Mon, 28 Nov 2011 16:16:14 +0100 From: Joel Dahl To: Robert Watson Message-ID: <20111128151613.GG23987@goofy01.vnodelab.local> References: <201111281509.pASF9VYa096492@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111281509.pASF9VYa096492@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r228073 - stable/9/cddl/lib/drti X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 15:34:23 -0000 On 28-11-2011 15:09, Robert Watson wrote: > Author: rwatson > Date: Mon Nov 28 15:09:31 2011 > New Revision: 228073 > URL: http://svn.freebsd.org/changeset/base/228073 > > Log: > Merge r228057 from head to stable/9: > > Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of > bsd.prog.mk -- we need to compile PIC, which requires a library build. > With this change, USDT (userspace DTrace probes) work from within > shared libraries. > > PR: kern/159046 > Submitted by: Alex Samorukov > Comments by: Scott Lystig Fritchie > > Approved by: re (xxx) xxx ? :-) -- Joel From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 15:36:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11479106564A; Mon, 28 Nov 2011 15:36:11 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E0B088FC1C; Mon, 28 Nov 2011 15:36:10 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 7CF4546B0A; Mon, 28 Nov 2011 10:36:10 -0500 (EST) Date: Mon, 28 Nov 2011 15:36:10 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Joel Dahl In-Reply-To: <20111128151613.GG23987@goofy01.vnodelab.local> Message-ID: References: <201111281509.pASF9VYa096492@svn.freebsd.org> <20111128151613.GG23987@goofy01.vnodelab.local> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r228073 - stable/9/cddl/lib/drti X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 15:36:11 -0000 On Mon, 28 Nov 2011, Joel Dahl wrote: >> Log: >> Merge r228057 from head to stable/9: >> >> Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of >> bsd.prog.mk -- we need to compile PIC, which requires a library build. >> With this change, USDT (userspace DTrace probes) work from within >> shared libraries. >> >> PR: kern/159046 >> Submitted by: Alex Samorukov >> Comments by: Scott Lystig Fritchie >> >> Approved by: re (xxx) > > xxx ? :-) Sigh -- what I get for rushing before a meeting! This commit was approved by re (bz). He was worried there would be an extra 'x' due to his username being two rather than three characters, and instead there were three extra x's! Robert From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 15:44:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFE921065675; Mon, 28 Nov 2011 15:44:04 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFF7F8FC1F; Mon, 28 Nov 2011 15:44:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASFi4TZ097650; Mon, 28 Nov 2011 15:44:04 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASFi46Y097648; Mon, 28 Nov 2011 15:44:04 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111281544.pASFi46Y097648@svn.freebsd.org> From: Max Khon Date: Mon, 28 Nov 2011 15:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228074 - head/rescue/rescue X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 15:44:04 -0000 Author: fjoe Date: Mon Nov 28 15:44:04 2011 New Revision: 228074 URL: http://svn.freebsd.org/changeset/base/228074 Log: -lpthread is required by -lzfs so should be later in LIBS list. There were no "undefined symbol pthread_xxx" errors during the link before this fix only because of STATIC_LIB_REQUIRE() declarations in lib/libthr/thread/thr_init.c. Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Mon Nov 28 15:09:31 2011 (r228073) +++ head/rescue/rescue/Makefile Mon Nov 28 15:44:04 2011 (r228074) @@ -123,7 +123,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem +CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 15:56:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1893F106564A; Mon, 28 Nov 2011 15:56:56 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 054BE8FC08; Mon, 28 Nov 2011 15:56:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASFuumb098073; Mon, 28 Nov 2011 15:56:56 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASFuthL098067; Mon, 28 Nov 2011 15:56:55 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201111281556.pASFuthL098067@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 28 Nov 2011 15:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228075 - in vendor/flex/2.5.35: . doc m4 usr.bin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 15:56:56 -0000 Author: bapt (ports committer) Date: Mon Nov 28 15:56:55 2011 New Revision: 228075 URL: http://svn.freebsd.org/changeset/base/228075 Log: Tag 2.5.35 import Approved by: cognet Added: vendor/flex/2.5.35/ - copied from r227653, vendor/flex/dist/ vendor/flex/2.5.35/ABOUT-NLS - copied unchanged from r228072, vendor/flex/dist/ABOUT-NLS vendor/flex/2.5.35/AUTHORS - copied unchanged from r228072, vendor/flex/dist/AUTHORS vendor/flex/2.5.35/COPYING - copied unchanged from r228072, vendor/flex/dist/COPYING vendor/flex/2.5.35/ChangeLog - copied unchanged from r228072, vendor/flex/dist/ChangeLog vendor/flex/2.5.35/FlexLexer.h - copied unchanged from r228072, vendor/flex/dist/FlexLexer.h vendor/flex/2.5.35/INSTALL - copied unchanged from r228072, vendor/flex/dist/INSTALL vendor/flex/2.5.35/Makefile.am - copied unchanged from r228072, vendor/flex/dist/Makefile.am vendor/flex/2.5.35/Makefile.in - copied unchanged from r228072, vendor/flex/dist/Makefile.in vendor/flex/2.5.35/NEWS - copied unchanged from r228072, vendor/flex/dist/NEWS vendor/flex/2.5.35/ONEWS - copied unchanged from r228072, vendor/flex/dist/ONEWS vendor/flex/2.5.35/README - copied unchanged from r228072, vendor/flex/dist/README vendor/flex/2.5.35/README-alpha - copied unchanged from r228072, vendor/flex/dist/README-alpha vendor/flex/2.5.35/README.cvs - copied unchanged from r228072, vendor/flex/dist/README.cvs vendor/flex/2.5.35/THANKS - copied unchanged from r228072, vendor/flex/dist/THANKS vendor/flex/2.5.35/TODO - copied unchanged from r228072, vendor/flex/dist/TODO vendor/flex/2.5.35/autogen.sh - copied unchanged from r228072, vendor/flex/dist/autogen.sh vendor/flex/2.5.35/buf.c - copied unchanged from r228072, vendor/flex/dist/buf.c vendor/flex/2.5.35/ccl.c - copied unchanged from r228072, vendor/flex/dist/ccl.c vendor/flex/2.5.35/compile - copied unchanged from r228072, vendor/flex/dist/compile vendor/flex/2.5.35/conf.in - copied unchanged from r228072, vendor/flex/dist/conf.in vendor/flex/2.5.35/config.guess - copied unchanged from r228072, vendor/flex/dist/config.guess vendor/flex/2.5.35/config.rpath - copied unchanged from r228072, vendor/flex/dist/config.rpath vendor/flex/2.5.35/config.sub - copied unchanged from r228072, vendor/flex/dist/config.sub vendor/flex/2.5.35/configure - copied unchanged from r228072, vendor/flex/dist/configure vendor/flex/2.5.35/configure.in - copied unchanged from r228072, vendor/flex/dist/configure.in vendor/flex/2.5.35/depcomp - copied unchanged from r228072, vendor/flex/dist/depcomp vendor/flex/2.5.35/dfa.c - copied unchanged from r228072, vendor/flex/dist/dfa.c vendor/flex/2.5.35/doc/ - copied from r228072, vendor/flex/dist/doc/ vendor/flex/2.5.35/ecs.c - copied unchanged from r228072, vendor/flex/dist/ecs.c vendor/flex/2.5.35/filter.c - copied unchanged from r228072, vendor/flex/dist/filter.c vendor/flex/2.5.35/flex.skl - copied unchanged from r228072, vendor/flex/dist/flex.skl vendor/flex/2.5.35/flexdef.h - copied unchanged from r228072, vendor/flex/dist/flexdef.h vendor/flex/2.5.35/flexint.h - copied unchanged from r228072, vendor/flex/dist/flexint.h vendor/flex/2.5.35/gen.c - copied unchanged from r228072, vendor/flex/dist/gen.c vendor/flex/2.5.35/gettext.h - copied unchanged from r228072, vendor/flex/dist/gettext.h vendor/flex/2.5.35/install-sh - copied unchanged from r228072, vendor/flex/dist/install-sh vendor/flex/2.5.35/libmain.c - copied unchanged from r228072, vendor/flex/dist/libmain.c vendor/flex/2.5.35/libyywrap.c - copied unchanged from r228072, vendor/flex/dist/libyywrap.c vendor/flex/2.5.35/m4/ - copied from r228072, vendor/flex/dist/m4/ vendor/flex/2.5.35/main.c - copied unchanged from r228072, vendor/flex/dist/main.c vendor/flex/2.5.35/misc.c - copied unchanged from r228072, vendor/flex/dist/misc.c vendor/flex/2.5.35/missing - copied unchanged from r228072, vendor/flex/dist/missing vendor/flex/2.5.35/mkinstalldirs - copied unchanged from r228072, vendor/flex/dist/mkinstalldirs vendor/flex/2.5.35/mkskel.sh - copied unchanged from r228072, vendor/flex/dist/mkskel.sh vendor/flex/2.5.35/nfa.c - copied unchanged from r228072, vendor/flex/dist/nfa.c vendor/flex/2.5.35/options.c - copied unchanged from r228072, vendor/flex/dist/options.c vendor/flex/2.5.35/options.h - copied unchanged from r228072, vendor/flex/dist/options.h vendor/flex/2.5.35/parse.c - copied unchanged from r228072, vendor/flex/dist/parse.c vendor/flex/2.5.35/parse.h - copied unchanged from r228072, vendor/flex/dist/parse.h vendor/flex/2.5.35/parse.y - copied unchanged from r228072, vendor/flex/dist/parse.y vendor/flex/2.5.35/regex.c - copied unchanged from r228072, vendor/flex/dist/regex.c vendor/flex/2.5.35/scan.c - copied unchanged from r228072, vendor/flex/dist/scan.c vendor/flex/2.5.35/scan.l - copied unchanged from r228072, vendor/flex/dist/scan.l vendor/flex/2.5.35/scanflags.c - copied unchanged from r228072, vendor/flex/dist/scanflags.c vendor/flex/2.5.35/scanopt.c - copied unchanged from r228072, vendor/flex/dist/scanopt.c vendor/flex/2.5.35/scanopt.h - copied unchanged from r228072, vendor/flex/dist/scanopt.h vendor/flex/2.5.35/skel.c - copied unchanged from r228072, vendor/flex/dist/skel.c vendor/flex/2.5.35/sym.c - copied unchanged from r228072, vendor/flex/dist/sym.c vendor/flex/2.5.35/tables.c - copied unchanged from r228072, vendor/flex/dist/tables.c vendor/flex/2.5.35/tables.h - copied unchanged from r228072, vendor/flex/dist/tables.h vendor/flex/2.5.35/tables_shared.c - copied unchanged from r228072, vendor/flex/dist/tables_shared.c vendor/flex/2.5.35/tables_shared.h - copied unchanged from r228072, vendor/flex/dist/tables_shared.h vendor/flex/2.5.35/tblcmp.c - copied unchanged from r228072, vendor/flex/dist/tblcmp.c vendor/flex/2.5.35/version.h - copied unchanged from r228072, vendor/flex/dist/version.h vendor/flex/2.5.35/yylex.c - copied unchanged from r228072, vendor/flex/dist/yylex.c Deleted: vendor/flex/2.5.35/usr.bin/ Copied: vendor/flex/2.5.35/ABOUT-NLS (from r228072, vendor/flex/dist/ABOUT-NLS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/2.5.35/ABOUT-NLS Mon Nov 28 15:56:55 2011 (r228075, copy of r228072, vendor/flex/dist/ABOUT-NLS) @@ -0,0 +1,625 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of May 2003. +The matrix shows, in regard of each package, for which languages PO +files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files am az be bg ca cs da de el en en_GB eo es + +-------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + anubis | | + ap-utils | | + bash | [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] | + clisp | | + clisp | [] [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] | + gas | [] | + gawk | [] [] [] [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] [] | + gnucash | () [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-calendar | [] | + gpe-conf | [] | + gpe-contacts | [] | + gpe-edit | | + gpe-login | [] | + gpe-ownerinfo | [] | + gpe-sketchbook | [] | + gpe-timesheet | | + gpe-today | [] | + gpe-todo | [] | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + grep | [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | [] [] [] [] | + jwhois | [] | + kbd | [] [] [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] | + sh-utils | [] [] [] | + sharutils | [] [] [] [] [] [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] | + tin | () () | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +-------------------------------------------+ + am az be bg ca cs da de el en en_GB eo es + 0 1 4 2 31 17 54 60 14 1 4 12 56 + + et fa fi fr ga gl he hr hu id it ja ko + +----------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + anubis | [] | + ap-utils | [] | + bash | [] [] | + batchelor | [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] | + clisp | | + clisp | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] | + gas | [] | + gawk | [] [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnucash | [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-calendar | [] | + gpe-conf | | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () [] () () | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] [] [] [] | + jpilot | [] () | + jwhois | [] [] [] [] | + kbd | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | [] () () | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] [] [] [] | + screem | | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] | + sketch | [] | + soundtracker | [] [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] | + xchat | [] [] [] | + xpad | | + +----------------------------------------+ + et fa fi fr ga gl he hr hu id it ja ko + 20 1 15 73 14 24 8 10 30 31 19 31 9 + + lg lt lv ms nb nl nn no pl pt pt_BR ro + +----------------------------------------+ + a2ps | [] [] () () () [] [] | + aegis | () | + anubis | [] [] | + ap-utils | () | + bash | [] | + batchelor | | + bfd | | + binutils | | + bison | [] [] [] [] | + bluez-pin | [] | + clisp | | + clisp | [] | + coreutils | [] | + cpio | [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] | + fetchmail | () () | + fileutils | [] | + findutils | [] [] [] [] | + flex | [] | + gas | | + gawk | [] | + gcal | | + gcc | | + gettext | [] | + gettext-runtime | [] | + gettext-tools | | + gimp-print | [] | + gliv | [] | + glunarclock | [] | + gnucash | | + gnucash-glossary | [] [] | + gnupg | | + gpe-calendar | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-timesheet | [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | | + gprof | [] | + gpsdrive | () () () | + grep | [] [] [] [] | + gretl | | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] | + jpilot | () () | + jwhois | [] [] [] | + kbd | | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] | + lifelines | | + lilypond | [] | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] | + man-db | [] | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | | + recode | [] [] [] | + screem | | + sed | [] [] | + sh-utils | [] | + sharutils | [] | + sketch | [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] | + textutils | [] | + tin | | + util-linux | [] [] | + vorbis-tools | [] [] | + wastesedge | | + wdiff | [] [] [] [] | + wget | [] [] [] | + xchat | [] [] | + xpad | [] | + +----------------------------------------+ + lg lt lv ms nb nl nn no pl pt pt_BR ro + 0 0 2 11 7 26 3 4 18 15 34 34 + + ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + +-------------------------------------------+ + a2ps | [] [] [] [] [] | 16 + aegis | () | 0 + anubis | [] [] | 5 + ap-utils | () | 1 + bash | [] | 7 + batchelor | | 1 + bfd | [] [] [] | 7 + binutils | [] [] [] | 7 + bison | [] [] | 13 + bluez-pin | | 7 + clisp | | 0 + clisp | | 5 + coreutils | [] [] [] [] [] | 14 + cpio | [] [] [] | 13 + darkstat | [] () () | 9 + diffutils | [] [] [] [] | 21 + e2fsprogs | [] | 3 + enscript | [] [] [] | 11 + error | [] [] [] | 14 + fetchmail | [] | 7 + fileutils | [] [] [] [] [] [] | 15 + findutils | [] [] [] [] [] [] | 27 + flex | [] [] [] | 10 + gas | [] | 3 + gawk | [] [] | 9 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 15 + gettext-runtime | [] [] [] [] [] [] | 16 + gettext-tools | [] [] | 5 + gimp-print | [] [] | 10 + gliv | | 1 + glunarclock | [] [] [] | 11 + gnucash | [] [] | 4 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 16 + gpe-calendar | [] | 5 + gpe-conf | | 3 + gpe-contacts | [] | 4 + gpe-edit | [] | 5 + gpe-login | [] | 5 + gpe-ownerinfo | [] | 7 + gpe-sketchbook | [] | 5 + gpe-timesheet | [] | 6 + gpe-today | [] | 6 + gpe-todo | [] | 6 + gphoto2 | [] [] | 9 + gprof | [] [] | 7 + gpsdrive | [] [] | 3 + grep | [] [] [] [] | 24 + gretl | | 2 + hello | [] [] [] [] [] | 33 + id-utils | [] [] [] | 11 + indent | [] [] [] [] | 19 + jpilot | [] [] [] [] [] | 10 + jwhois | () () [] [] | 10 + kbd | [] [] | 8 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | | 6 + libiconv | [] [] [] [] [] [] | 21 + lifelines | [] | 2 + lilypond | [] | 4 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] [] | 14 + m4 | [] [] [] | 15 + mailutils | | 2 + make | [] [] [] [] | 15 + man-db | [] | 6 + mysecretdiary | [] [] | 8 + nano | [] [] [] | 15 + nano_1_0 | [] [] [] | 15 + opcodes | [] [] | 9 + parted | [] [] | 13 + ptx | [] [] [] | 22 + python | | 0 + radius | | 0 + recode | [] [] [] [] | 19 + screem | [] | 1 + sed | [] [] [] [] [] | 20 + sh-utils | [] [] [] | 13 + sharutils | [] [] [] [] | 16 + sketch | [] | 5 + soundtracker | [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] [] | 13 + textutils | [] [] [] [] [] | 15 + tin | | 1 + util-linux | [] [] | 14 + vorbis-tools | [] | 7 + wastesedge | | 0 + wdiff | [] [] [] [] | 17 + wget | [] [] [] [] [] [] [] | 25 + xchat | [] [] [] | 11 + xpad | | 1 + +-------------------------------------------+ + 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If May 2003 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + + If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + Copied: vendor/flex/2.5.35/AUTHORS (from r228072, vendor/flex/dist/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/2.5.35/AUTHORS Mon Nov 28 15:56:55 2011 (r228075, copy of r228072, vendor/flex/dist/AUTHORS) @@ -0,0 +1,16 @@ + +In 2001, Will Estes took over as maintainer of flex. + +John Millaway is a co-author of the current version of flex. He has +contributed a large number of new features, fixed a large number of +outstanding bugs and has made significant contributions to the flex +documentation. + +Aaron Stone has contributed several bug fixes to the flex codebase. + +Vern Paxson wrote flex with the help of many ideas and much +inspiration from Van Jacobson. Original version by Jef Poskanzer. + +The fast table representation is a partial implementation of a design +done by Van Jacobson. The implementation was done by Kevin Gong and +Vern Paxson. Copied: vendor/flex/2.5.35/COPYING (from r228072, vendor/flex/dist/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/2.5.35/COPYING Mon Nov 28 15:56:55 2011 (r228075, copy of r228072, vendor/flex/dist/COPYING) @@ -0,0 +1,42 @@ +Flex carries the copyright used for BSD software, slightly modified +because it originated at the Lawrence Berkeley (not Livermore!) Laboratory, +which operates under a contract with the Department of Energy: + +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The Flex Project. + +Copyright (c) 1990, 1997 The Regents of the University of California. +All rights reserved. + +This code is derived from software contributed to Berkeley by +Vern Paxson. + +The United States Government has rights in this work pursuant +to contract no. DE-AC03-76SF00098 between the United States +Department of Energy and the University of California. + +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, 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. + +Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + +This basically says "do whatever you please with this software except +remove this notice or take advantage of the University's (or the flex +authors') name". + +Note that the "flex.skl" scanner skeleton carries no copyright notice. +You are free to do whatever you please with scanners generated using flex; +for them, you are not even bound by the above copyright. Copied: vendor/flex/2.5.35/ChangeLog (from r228072, vendor/flex/dist/ChangeLog) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/flex/2.5.35/ChangeLog Mon Nov 28 15:56:55 2011 (r228075, copy of r228072, vendor/flex/dist/ChangeLog) @@ -0,0 +1,7439 @@ +2008-02-26 15:36 Will Estes + + * NEWS: add date of release + +2008-02-15 07:37 Will Estes + + * NEWS, parse.y: fix bug that prevented comments from working + properly + +2008-02-12 07:57 Will Estes + + * po/de.po: new de translation + +2008-02-10 06:08 Will Estes + + * NEWS, po/vi.po: new vi translation + +2008-02-09 19:22 Will Estes + + * NEWS, po/nl.po: new nl translation + +2008-02-09 14:59 Will Estes + + * NEWS, po/pl.po: new pl translation + +2008-02-09 14:19 Will Estes + + * NEWS, po/de.po, po/pt_BR.po: new de, pt_br translations + +2008-02-09 13:54 Will Estes + + * NEWS, flex.skl: generate headers for all functions (resolves bug + #1628314) + +2008-02-09 10:49 Will Estes + + * NEWS, flex.skl: change yy_size_t to be size_t (resolves bug + #1849812) + +2008-02-09 10:46 Will Estes + + * configure.in: start work on version 2.5.35 + +2007-12-12 16:00 Will Estes + + * NEWS, configure.in: revert NEWS and configure.in to version + 2.5.34 + +2007-09-12 11:28 Will Estes + + * NEWS, configure.in: update version number to 2.5.35 + +2007-09-10 02:17 Aaron Stone + + * tests/test-alloc-extra/scanner.l: Use %option extra-type. + +2007-09-10 02:16 Aaron Stone + + * NEWS, flex.skl, flexdef.h, main.c, parse.y, scan.l, + doc/flex.texi: Introduce %option extra-type="your_type *" (resolves + bug #1744505). + +2007-08-15 08:28 Will Estes + + * po/nl.po: new nl translations from the translation project + +2007-06-28 16:28 Will Estes + + * NEWS: change release date + +2007-06-27 21:59 Will Estes + + * flex.skl: adjustment for prefix classes; patch submitted by Petr + Machata + +2007-06-27 21:53 Will Estes + + * NEWS: NEWS item for yy_init_extra + +2007-06-12 12:33 Aaron Stone + + * doc/flex.texi: Docs and example for yylex_init_extra. + +2007-05-31 20:22 Will Estes + + * tests/test-alloc-extra/.cvsignore: ignore OUTPUT file in + test-alloc-extra + +2007-05-31 20:21 Will Estes + + * tests/descriptions: add description of concatenated options test + +2007-05-31 16:20 Will Estes + + * tests/test-alloc-extra/.cvsignore: add missing .cvsignore to + test-alloc-extra + +2007-05-31 02:21 Aaron Stone + + * configure.in, flex.skl, gen.c, main.c: Changes to resolve SF bugs + 1568325 and 1563589. + +2007-05-31 02:09 Aaron Stone + + * tests/: Makefile.am, descriptions, test-alloc-extra/Makefile.am, + test-alloc-extra/scanner.l, test-alloc-extra/test.input: Adding + test cases for yylex_init_extra. + +2007-05-12 11:27 Will Estes + + * configure.in, tests/test-pthread/scanner.l: fixes to test-pthread + +2007-05-12 09:13 Will Estes + + * NEWS: NEWS item for concatenated options + +2007-05-12 09:13 Will Estes + + * configure.in, tests/Makefile.am, + tests/test-concatenated-options/.cvsignore, + tests/test-concatenated-options/Makefile.am: unit test to verify + concatenated options parsing + +2007-05-12 09:11 Will Estes + + * scanopt.c: parse multiple short concatenated options; patch + submitted by Petr Machata + + * autogen.sh: remove --force option from autogen.sh; much faster + without it + +2007-05-11 14:35 Will Estes + + * NEWS, configure.in: version 2.5.34 + +2007-05-08 00:23 Aaron Stone + + * NEWS, flex.skl: Better checking after yyalloc/yyrealloc (resolves + bug #1595967) + +2007-05-01 08:10 Will Estes + + * doc/flex.texi: change title of manual to 'Lexical Analysis with + Flex' + +2007-04-25 14:16 Will Estes + + * flex.skl: c++ memory leak plug + +2007-04-23 09:29 Will Estes + + * flex.skl: roll back c++ memory patch as it causes the test suite + no end of grief + +2007-04-23 08:42 Will Estes + + * flex.skl: fix function definitions for non-ANSI environments + (from Manoj Srivastava from Debian patchset) + +2007-04-23 08:37 Will Estes + + * flex.skl: fix c++ memory leak (from Manoj Srivastava from Debian + patchset) + +2007-04-23 06:59 Will Estes + + * flex.skl: fix parameter name in comment (patch from Manoj + Srivastava from the debian patchset + +2007-04-23 06:57 Will Estes + + * flex.skl: add a size_t cast (patch from Manoj Srivastava from the + debian patchset + +2007-04-16 17:06 Will Estes + + * tests/: test-extended/Makefile.am, test-quotes/Makefile.am: + cleanups to handle VPATH builds better; passifies make distcheck + +2007-04-16 16:42 Will Estes + + * doc/flex.texi: drop using the \ in \ escaping as it throws pdf + generation for a loop + +2007-04-14 08:33 Will Estes + + * .cvsignore: add compile and *.tar.bz2 to .cvsignore + +2007-04-14 08:27 Will Estes + + * main.c: add call to setlocale for ctype as per debian patchset + +2007-04-14 08:25 Will Estes + + * Makefile.am, NEWS: provide for a PIC version of libfl.a for + shared libraries using flex scanners + +2007-04-13 13:24 Will Estes + + * FlexLexer.h: annotate endifs since they're a bit far from their + opening #if statements + +2007-04-13 12:55 Will Estes + + * flexdef.h, parse.y: refactor and slightly redo alloca testing, + resolves bug #1675899 + +2007-04-13 12:50 Will Estes + + * configure.in: overhaul configure.in: use octathorps for comments + so they're passed through m4 processing; better bracketing of m4 + arguments; retool checks as per suggestions from autoscan(1) + +2007-04-13 12:43 Will Estes + + * flex.skl: better handling of class that use the prefix + functionality; from submitted patch + +2007-04-13 12:32 Will Estes + + * flex.skl: fix skeleton for reentrant scanners + +2007-04-12 21:50 Will Estes + + * Makefile.am: remove homegrown tags target; automake does that for + us + +2007-04-12 15:12 Will Estes + + * FlexLexer.h: declare some const where missing in c++ header file + +2007-04-12 15:12 Will Estes + + * flex.skl: fix skeleton for reentrant scanners, resolves bug + #1694318 + +2007-04-10 15:20 Will Estes + + * doc/flex.texi: corrections to the manual as per suggestions from + flex-help@ + +2007-04-03 15:16 Will Estes + + * doc/flex.texi: include author names in online versions of the + manual + +2007-04-03 15:07 Will Estes + + * COPYING: update copyright notice + +2007-04-03 14:54 Will Estes + + * AUTHORS: rearrange and update AUTHORS + +2007-03-29 11:45 Will Estes + + * NEWS: note sf feature request 1658379 in NEWS + +2007-03-29 11:36 Will Estes + + * tools/cvsauthors: add sodabrew to cvsauthors file + +2007-03-29 11:25 Aaron Stone + + * flex.skl: + SourceForge feature request #1658379: Expose YY_BUF_SIZE in the + header file. + +2007-03-07 16:50 Will Estes + + * NEWS, filter.c, flex.skl: apply patches submitted by sodabrew + +2007-03-07 16:20 Will Estes + + * README.cvs: more changes describing building flex from cvs + +2007-03-07 16:16 Will Estes + + * Makefile.am, README.cvs, README.cvs-snapshot: rename + README.cvs-snapshot to README.cvs + +2007-03-07 16:14 Will Estes + + * README.cvs-snapshot: update to explain where flex cvs lives + +2007-03-07 15:45 Will Estes + + * README, doc/flex.texi: correct how to submit bugs + +2007-02-16 10:38 Will Estes + + * NEWS: clarify NEWS item re man page and pdf manual + +2007-02-14 12:03 Will Estes + + * po/Makevars: update bug address to point to flex-devel instead of + lex-help + +2007-02-13 12:54 Will Estes + + * configure.in, doc/Makefile.am: make better use of AC_INIT; clean + up, simplify and make more robust the generation of the man page + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 16:07:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DC57106566C; Mon, 28 Nov 2011 16:07:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD808FC15; Mon, 28 Nov 2011 16:07:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASG7Quq098426; Mon, 28 Nov 2011 16:07:26 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASG7Q6H098424; Mon, 28 Nov 2011 16:07:26 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201111281607.pASG7Q6H098424@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 28 Nov 2011 16:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228076 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 16:07:26 -0000 Author: ae Date: Mon Nov 28 16:07:26 2011 New Revision: 228076 URL: http://svn.freebsd.org/changeset/base/228076 Log: Add an ability to increase number of allocated APM entries when we have reserved free space in the APM area. Also instead of one write request per each APM entry, use MAXPHY sized writes when we are updating APM. MFC after: 1 month Modified: head/sys/geom/part/g_part_apm.c Modified: head/sys/geom/part/g_part_apm.c ============================================================================== --- head/sys/geom/part/g_part_apm.c Mon Nov 28 15:56:55 2011 (r228075) +++ head/sys/geom/part/g_part_apm.c Mon Nov 28 16:07:26 2011 (r228076) @@ -234,6 +234,12 @@ g_part_apm_add(struct g_part_table *base strncpy(entry->ent.ent_name, gpp->gpp_label, sizeof(entry->ent.ent_name)); } + if (baseentry->gpe_index >= table->self.ent_pmblkcnt) + table->self.ent_pmblkcnt = baseentry->gpe_index + 1; + KASSERT(table->self.ent_size >= table->self.ent_pmblkcnt, + ("%s", __func__)); + KASSERT(table->self.ent_size > baseentry->gpe_index, + ("%s", __func__)); return (0); } @@ -445,7 +451,7 @@ g_part_apm_read(struct g_part_table *bas basetable->gpt_first = table->self.ent_size + 1; basetable->gpt_last = table->ddr.ddr_blkcount - 1; - basetable->gpt_entries = table->self.ent_pmblkcnt - 1; + basetable->gpt_entries = table->self.ent_size - 1; for (index = table->self.ent_pmblkcnt - 1; index > 0; index--) { error = apm_read_ent(cp, index + 1, &ent, table->tivo_series1); @@ -497,67 +503,78 @@ g_part_apm_type(struct g_part_table *bas static int g_part_apm_write(struct g_part_table *basetable, struct g_consumer *cp) { - char buf[512]; + struct g_provider *pp; struct g_part_entry *baseentry; struct g_part_apm_entry *entry; struct g_part_apm_table *table; - int error, index; + char *buf, *ptr; + uint32_t index; + int error; + size_t tblsz; + pp = cp->provider; table = (struct g_part_apm_table *)basetable; /* * Tivo Series 1 disk partitions are currently read-only. */ if (table->tivo_series1) return (EOPNOTSUPP); - bzero(buf, sizeof(buf)); - /* Write the DDR and 'self' entry only when we're newly created. */ + /* Write the DDR only when we're newly created. */ if (basetable->gpt_created) { + buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); be16enc(buf, table->ddr.ddr_sig); be16enc(buf + 2, table->ddr.ddr_blksize); be32enc(buf + 4, table->ddr.ddr_blkcount); - error = g_write_data(cp, 0, buf, sizeof(buf)); + error = g_write_data(cp, 0, buf, pp->sectorsize); + g_free(buf); if (error) return (error); } - be16enc(buf, table->self.ent_sig); - be16enc(buf + 2, 0); - be32enc(buf + 4, table->self.ent_pmblkcnt); + /* Allocate the buffer for all entries */ + tblsz = table->self.ent_pmblkcnt; + buf = g_malloc(tblsz * pp->sectorsize, M_WAITOK | M_ZERO); - if (basetable->gpt_created) { - be32enc(buf + 8, table->self.ent_start); - be32enc(buf + 12, table->self.ent_size); - bcopy(table->self.ent_name, buf + 16, - sizeof(table->self.ent_name)); - bcopy(table->self.ent_type, buf + 48, - sizeof(table->self.ent_type)); - error = g_write_data(cp, 512, buf, sizeof(buf)); - if (error) - return (error); - } + /* Fill the self entry */ + be16enc(buf, APM_ENT_SIG); + be32enc(buf + 4, table->self.ent_pmblkcnt); + be32enc(buf + 8, table->self.ent_start); + be32enc(buf + 12, table->self.ent_size); + bcopy(table->self.ent_name, buf + 16, sizeof(table->self.ent_name)); + bcopy(table->self.ent_type, buf + 48, sizeof(table->self.ent_type)); baseentry = LIST_FIRST(&basetable->gpt_entry); - for (index = 1; index <= basetable->gpt_entries; index++) { + for (index = 1; index < tblsz; index++) { entry = (baseentry != NULL && index == baseentry->gpe_index) ? (struct g_part_apm_entry *)baseentry : NULL; + ptr = buf + index * pp->sectorsize; + be16enc(ptr, APM_ENT_SIG); + be32enc(ptr + 4, table->self.ent_pmblkcnt); if (entry != NULL && !baseentry->gpe_deleted) { - be32enc(buf + 8, entry->ent.ent_start); - be32enc(buf + 12, entry->ent.ent_size); - bcopy(entry->ent.ent_name, buf + 16, + be32enc(ptr + 8, entry->ent.ent_start); + be32enc(ptr + 12, entry->ent.ent_size); + bcopy(entry->ent.ent_name, ptr + 16, sizeof(entry->ent.ent_name)); - bcopy(entry->ent.ent_type, buf + 48, + bcopy(entry->ent.ent_type, ptr + 48, sizeof(entry->ent.ent_type)); } else { - bzero(buf + 8, 4 + 4 + 32 + 32); - strcpy(buf + 48, APM_ENT_TYPE_UNUSED); + strcpy(ptr + 48, APM_ENT_TYPE_UNUSED); } - error = g_write_data(cp, (index + 1) * 512, buf, sizeof(buf)); - if (error) - return (error); if (entry != NULL) baseentry = LIST_NEXT(baseentry, gpe_entry); } + for (index = 0; index < tblsz; index += MAXPHYS / pp->sectorsize) { + error = g_write_data(cp, (1 + index) * pp->sectorsize, + buf + index * pp->sectorsize, + (tblsz - index > MAXPHYS / pp->sectorsize) ? MAXPHYS: + (tblsz - index) * pp->sectorsize); + if (error) { + g_free(buf); + return (error); + } + } + g_free(buf); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 16:25:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 507F9106564A; Mon, 28 Nov 2011 16:25:28 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 405068FC1D; Mon, 28 Nov 2011 16:25:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASGPScS099091; Mon, 28 Nov 2011 16:25:28 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASGPSfv099089; Mon, 28 Nov 2011 16:25:28 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201111281625.pASGPSfv099089@svn.freebsd.org> From: Philip Paeps Date: Mon, 28 Nov 2011 16:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228077 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 16:25:28 -0000 Author: philip Date: Mon Nov 28 16:25:27 2011 New Revision: 228077 URL: http://svn.freebsd.org/changeset/base/228077 Log: Only install the sfxge(4) manpage on amd64, while the driver is amd64-only. Pointed out by: bz Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Nov 28 16:07:26 2011 (r228076) +++ head/share/man/man4/Makefile Mon Nov 28 16:25:27 2011 (r228077) @@ -378,7 +378,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ sf.4 \ - sfxge.4 \ + ${_sfxge.4} \ sge.4 \ si.4 \ siba.4 \ @@ -718,6 +718,7 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 +_sfxge.4= sfxge.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 16:45:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76E54106566B; Mon, 28 Nov 2011 16:45:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 47C338FC16; Mon, 28 Nov 2011 16:45:49 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id DDD3746B37; Mon, 28 Nov 2011 11:45:48 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6E71CB942; Mon, 28 Nov 2011 11:45:48 -0500 (EST) From: John Baldwin To: David Chisnall Date: Mon, 28 Nov 2011 11:00:30 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111261557.pAQFv9s1097893@svn.freebsd.org> In-Reply-To: <201111261557.pAQFv9s1097893@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111281100.30432.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 28 Nov 2011 11:45:48 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227999 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 16:45:49 -0000 On Saturday, November 26, 2011 10:57:09 am David Chisnall wrote: > Author: theraven > Date: Sat Nov 26 15:57:09 2011 > New Revision: 227999 > URL: http://svn.freebsd.org/changeset/base/227999 > > Log: > Return not-implemented from pthread_once and pthread_key_create, rather > than silently failing and returning success. > > Without this, code calls pthread_once(), receives a return value of > success, and thinks that the passed function has been called. > > Approved by: dim (mentor) Hmmm, is this really the best fix? I really want pthread_once() to always work (see the hack I have to do with _once() in libc to workaround the fact that it doesn't now). The current behavior exists to appease libstdc++ which uses a silently failing pthread_once() to figure out if it is linked against working threads. If this is for libc++, can you provide some other way than abusing pthread_once() to determine this? Ideally it would be as smart as libc and use __isthreaded in some fastion. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 17:19:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F046106564A; Mon, 28 Nov 2011 17:19:06 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCF28FC12; Mon, 28 Nov 2011 17:19:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASHJ6EH000846; Mon, 28 Nov 2011 17:19:06 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASHJ6Hg000811; Mon, 28 Nov 2011 17:19:06 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201111281719.pASHJ6Hg000811@svn.freebsd.org> From: Philip Paeps Date: Mon, 28 Nov 2011 17:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228078 - head/sys/dev/sfxge/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 17:19:06 -0000 Author: philip Date: Mon Nov 28 17:19:05 2011 New Revision: 228078 URL: http://svn.freebsd.org/changeset/base/228078 Log: sfxge: Add $FreeBSD$ tags to common code files. Requested by: bz Modified: head/sys/dev/sfxge/common/efsys.h head/sys/dev/sfxge/common/efx.h (contents, props changed) head/sys/dev/sfxge/common/efx_bootcfg.c (contents, props changed) head/sys/dev/sfxge/common/efx_ev.c (contents, props changed) head/sys/dev/sfxge/common/efx_filter.c (contents, props changed) head/sys/dev/sfxge/common/efx_impl.h (contents, props changed) head/sys/dev/sfxge/common/efx_intr.c (contents, props changed) head/sys/dev/sfxge/common/efx_mac.c (contents, props changed) head/sys/dev/sfxge/common/efx_mcdi.c (contents, props changed) head/sys/dev/sfxge/common/efx_mcdi.h (contents, props changed) head/sys/dev/sfxge/common/efx_mon.c (contents, props changed) head/sys/dev/sfxge/common/efx_nic.c (contents, props changed) head/sys/dev/sfxge/common/efx_nvram.c (contents, props changed) head/sys/dev/sfxge/common/efx_phy.c (contents, props changed) head/sys/dev/sfxge/common/efx_port.c (contents, props changed) head/sys/dev/sfxge/common/efx_regs.h (contents, props changed) head/sys/dev/sfxge/common/efx_regs_ef10.h (contents, props changed) head/sys/dev/sfxge/common/efx_regs_mcdi.h (contents, props changed) head/sys/dev/sfxge/common/efx_regs_pci.h (contents, props changed) head/sys/dev/sfxge/common/efx_rx.c (contents, props changed) head/sys/dev/sfxge/common/efx_sram.c (contents, props changed) head/sys/dev/sfxge/common/efx_tx.c (contents, props changed) head/sys/dev/sfxge/common/efx_types.h (contents, props changed) head/sys/dev/sfxge/common/efx_vpd.c (contents, props changed) head/sys/dev/sfxge/common/efx_wol.c (contents, props changed) head/sys/dev/sfxge/common/siena_flash.h (contents, props changed) head/sys/dev/sfxge/common/siena_impl.h (contents, props changed) head/sys/dev/sfxge/common/siena_mac.c (contents, props changed) head/sys/dev/sfxge/common/siena_mon.c (contents, props changed) head/sys/dev/sfxge/common/siena_nic.c (contents, props changed) head/sys/dev/sfxge/common/siena_nvram.c (contents, props changed) head/sys/dev/sfxge/common/siena_phy.c (contents, props changed) head/sys/dev/sfxge/common/siena_sram.c (contents, props changed) head/sys/dev/sfxge/common/siena_vpd.c (contents, props changed) Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efsys.h Mon Nov 28 17:19:05 2011 (r228078) @@ -25,14 +25,13 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFSYS_H #define _SYS_EFSYS_H -#include -__FBSDID("$FreeBSD$"); - #ifdef __cplusplus extern "C" { #endif Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_H Modified: head/sys/dev/sfxge/common/efx_bootcfg.c ============================================================================== --- head/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- head/sys/dev/sfxge/common/efx_ev.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_ev.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_filter.c ============================================================================== --- head/sys/dev/sfxge/common/efx_filter.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_filter.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_impl.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_IMPL_H Modified: head/sys/dev/sfxge/common/efx_intr.c ============================================================================== --- head/sys/dev/sfxge/common/efx_intr.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_intr.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_mac.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mac.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_mac.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_mcdi.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_MCDI_H Modified: head/sys/dev/sfxge/common/efx_mon.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mon.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_mon.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nic.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_nic.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nvram.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_nvram.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_phy.c ============================================================================== --- head/sys/dev/sfxge/common/efx_phy.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_phy.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_port.c ============================================================================== --- head/sys/dev/sfxge/common/efx_port.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_port.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_regs.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_regs.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_REGS_H Modified: head/sys/dev/sfxge/common/efx_regs_ef10.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_ef10.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_regs_ef10.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_EF10_REGS_H Modified: head/sys/dev/sfxge/common/efx_regs_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,10 +21,10 @@ * 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. + * + * $FreeBSD$ */ -/*! \cidoxg_firmware_mc_cmd */ - #ifndef _SIENA_MC_DRIVER_PCOL_H #define _SIENA_MC_DRIVER_PCOL_H @@ -2783,4 +2783,3 @@ #define MC_CMD_TCM_TXQ_INIT_OUT_LEN 0 #endif /* _SIENA_MC_DRIVER_PCOL_H */ -/*! \cidoxg_end */ Modified: head/sys/dev/sfxge/common/efx_regs_pci.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_pci.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_regs_pci.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_REGS_PCI_H Modified: head/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_rx.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_rx.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_sram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_sram.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_sram.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_tx.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_types.h ============================================================================== --- head/sys/dev/sfxge/common/efx_types.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_types.h Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,8 @@ * SUCH DAMAGE. * * Ackowledgement to Fen Systems Ltd. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_TYPES_H Modified: head/sys/dev/sfxge/common/efx_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/efx_vpd.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_vpd.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/efx_wol.c ============================================================================== --- head/sys/dev/sfxge/common/efx_wol.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/efx_wol.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/siena_flash.h ============================================================================== --- head/sys/dev/sfxge/common/siena_flash.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_flash.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,9 +21,10 @@ * 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. + * + * $FreeBSD$ */ - #ifndef _SYS_SIENA_FLASH_H #define _SYS_SIENA_FLASH_H Modified: head/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_impl.h Mon Nov 28 17:19:05 2011 (r228078) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_SIENA_IMPL_H Modified: head/sys/dev/sfxge/common/siena_mac.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mac.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_mac.c Mon Nov 28 17:19:05 2011 (r228078) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: head/sys/dev/sfxge/common/siena_mon.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mon.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_mon.c Mon Nov 28 17:19:05 2011 (r228078) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: head/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nic.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_nic.c Mon Nov 28 17:19:05 2011 (r228078) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: head/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nvram.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_nvram.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: head/sys/dev/sfxge/common/siena_phy.c ============================================================================== --- head/sys/dev/sfxge/common/siena_phy.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_phy.c Mon Nov 28 17:19:05 2011 (r228078) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: head/sys/dev/sfxge/common/siena_sram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_sram.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_sram.c Mon Nov 28 17:19:05 2011 (r228078) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: head/sys/dev/sfxge/common/siena_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/siena_vpd.c Mon Nov 28 16:25:27 2011 (r228077) +++ head/sys/dev/sfxge/common/siena_vpd.c Mon Nov 28 17:19:05 2011 (r228078) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 17:41:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 022C2106564A; Mon, 28 Nov 2011 17:41:21 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 3AC8B8FC0C; Mon, 28 Nov 2011 17:41:20 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id pASHeBjk057566; Mon, 28 Nov 2011 11:40:11 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id pASHeBLi057565; Mon, 28 Nov 2011 11:40:11 -0600 (CST) (envelope-from brooks) Date: Mon, 28 Nov 2011 11:40:11 -0600 From: Brooks Davis To: Gleb Smirnoff Message-ID: <20111128174011.GM39998@lor.one-eyed-alien.net> References: <201111281444.pASEixdO095604@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline In-Reply-To: <201111281444.pASEixdO095604@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 17:41:21 -0000 --5I6of5zJg18YgZEa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 28, 2011 at 02:44:59PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Mon Nov 28 14:44:59 2011 > New Revision: 228071 > URL: http://svn.freebsd.org/changeset/base/228071 >=20 > Log: > - Use generic alloc_unr(9) allocator for if_clone, instead > of hand-made. > - When registering new cloner, check whether a cloner with > same name already exist. > - When allocating unit, also check with help of ifunit() > whether such interface already exist or not. [1] Thanks! This was long over due. -- Brooks --5I6of5zJg18YgZEa Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFO08d7XY6L6fI4GtQRArjtAKDK7UB9ZZnWzufX6fEW6EVqwiiV+ACaA6FZ AGXxaPBGZ/Hew+DnmfXHeOs= =QWxO -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa-- From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 17:54:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C099106564A; Mon, 28 Nov 2011 17:54:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6A3F8FC08; Mon, 28 Nov 2011 17:54:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASHsYnK002116; Mon, 28 Nov 2011 17:54:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASHsY5I002115; Mon, 28 Nov 2011 17:54:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201111281754.pASHsY5I002115@svn.freebsd.org> From: Dimitry Andric Date: Mon, 28 Nov 2011 17:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228081 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 17:54:35 -0000 Author: dim Date: Mon Nov 28 17:54:34 2011 New Revision: 228081 URL: http://svn.freebsd.org/changeset/base/228081 Log: Under tools/build/options, add missing svn:keywords properties to WITH_OFED and WITHOUT_GPIO. Modified: Directory Properties: head/tools/build/options/WITHOUT_GPIO (props changed) head/tools/build/options/WITH_OFED (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 17:56:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E749B106564A; Mon, 28 Nov 2011 17:56:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D74498FC18; Mon, 28 Nov 2011 17:56:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASHukiU002229; Mon, 28 Nov 2011 17:56:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASHukP8002228; Mon, 28 Nov 2011 17:56:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201111281756.pASHukP8002228@svn.freebsd.org> From: Dimitry Andric Date: Mon, 28 Nov 2011 17:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228082 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 17:56:47 -0000 Author: dim Date: Mon Nov 28 17:56:46 2011 New Revision: 228082 URL: http://svn.freebsd.org/changeset/base/228082 Log: Add WITH_LIBCPLUSPLUS under tools/build/options; the knob itself was already added in a previous revision. Added: head/tools/build/options/WITH_LIBCPLUSPLUS (contents, props changed) Added: head/tools/build/options/WITH_LIBCPLUSPLUS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LIBCPLUSPLUS Mon Nov 28 17:56:46 2011 (r228082) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build libcxxrt and libc++. From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 17:58:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A33CC1065672; Mon, 28 Nov 2011 17:58:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 925D18FC13; Mon, 28 Nov 2011 17:58:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASHwv6R002321; Mon, 28 Nov 2011 17:58:57 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASHwvqX002319; Mon, 28 Nov 2011 17:58:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201111281758.pASHwvqX002319@svn.freebsd.org> From: Dimitry Andric Date: Mon, 28 Nov 2011 17:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228083 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 17:58:57 -0000 Author: dim Date: Mon Nov 28 17:58:57 2011 New Revision: 228083 URL: http://svn.freebsd.org/changeset/base/228083 Log: Regenerate src.conf.5. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Nov 28 17:56:46 2011 (r228082) +++ head/share/man/man5/src.conf.5 Mon Nov 28 17:58:57 2011 (r228083) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd June 17, 2011 +.Dd November 28, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -265,13 +265,13 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler. .Pp It is a default setting on -arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64 and sparc64/sparc64. +arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb and sparc64/sparc64. .It Va WITH_CLANG .\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru Set to build the Clang C/C++ compiler. .Pp It is a default setting on -amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc. +amd64/amd64, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CPP .\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build @@ -345,14 +345,14 @@ Set to not build Flattened Device Tree s This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on -amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64 and sparc64/sparc64. +amd64/amd64, i386/i386, ia64/ia64, pc98/i386 and sparc64/sparc64. .It Va WITH_FDT .\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru Set to build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .Pp It is a default setting on -arm/arm, arm/armeb and powerpc/powerpc. +arm/arm, arm/armeb, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_FLOPPY .\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs @@ -409,7 +409,7 @@ Set to build some programs without optio .\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. .It Va WITHOUT_GPIO -.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 221541 2011-05-06 19:14:06Z ru +.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. @@ -563,6 +563,9 @@ and On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. +.It Va WITH_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim +Set to build libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the @@ -734,7 +737,7 @@ Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: head/tools/build/options/WITH_OFED 222016 2011-05-17 11:06:41Z ru +.\" from FreeBSD: head/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 18:30:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1451065675; Mon, 28 Nov 2011 18:30:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 24F3D8FC12; Mon, 28 Nov 2011 18:30:14 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id CF16A46B0D; Mon, 28 Nov 2011 13:30:13 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 02806B94C; Mon, 28 Nov 2011 13:30:13 -0500 (EST) From: John Baldwin To: Mikolaj Golub Date: Mon, 28 Nov 2011 13:30:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111242054.pAOKs6vj012296@svn.freebsd.org> In-Reply-To: <201111242054.pAOKs6vj012296@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111281330.11720.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 28 Nov 2011 13:30:13 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227956 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 18:30:14 -0000 On Thursday, November 24, 2011 3:54:06 pm Mikolaj Golub wrote: > Author: trociny > Date: Thu Nov 24 20:54:06 2011 > New Revision: 227956 > URL: http://svn.freebsd.org/changeset/base/227956 > > Log: > usr.bin/procstat > > Add -l flag to display resource limits. > > PR: bin/161257 > Reviewed by: kib > MFC after: 2 weeks Thanks for doing this! Did you consider making the procstat -l output use "pretty" output similar to the output of /usr/bin/limits? For example, using "infinity" instead of -1 and using humanize_number() for finite limits that are in units of bytes? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 18:32:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86581106564A; Mon, 28 Nov 2011 18:32:35 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2A18FC0A; Mon, 28 Nov 2011 18:32:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASIWZmU003487; Mon, 28 Nov 2011 18:32:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASIWZ8O003484; Mon, 28 Nov 2011 18:32:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201111281832.pASIWZ8O003484@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 28 Nov 2011 18:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228084 - head/sys/dev/vr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 18:32:35 -0000 Author: yongari Date: Mon Nov 28 18:32:35 2011 New Revision: 228084 URL: http://svn.freebsd.org/changeset/base/228084 Log: Reuse flag variable to represent driver internal states rather than using member variables in softc. While I'm here change media after setting IFF_DRV_RUNNING. This will remove unnecessary link state handling in vr_tick() if controller established a link immediately. Modified: head/sys/dev/vr/if_vr.c head/sys/dev/vr/if_vrreg.h Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Mon Nov 28 17:58:57 2011 (r228083) +++ head/sys/dev/vr/if_vr.c Mon Nov 28 18:32:35 2011 (r228084) @@ -305,20 +305,20 @@ vr_miibus_statchg(device_t dev) (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - sc->vr_link = 0; + sc->vr_flags &= ~VR_F_LINK; if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == (IFM_ACTIVE | IFM_AVALID)) { switch (IFM_SUBTYPE(mii->mii_media_active)) { case IFM_10_T: case IFM_100_TX: - sc->vr_link = 1; + sc->vr_flags |= VR_F_LINK; break; default: break; } } - if (sc->vr_link != 0) { + if ((sc->vr_flags & VR_F_LINK) != 0) { cr0 = CSR_READ_1(sc, VR_CR0); cr1 = CSR_READ_1(sc, VR_CR1); mfdx = (cr1 & VR_CR1_FULLDUPLEX) != 0; @@ -821,7 +821,7 @@ vr_detach(device_t dev) /* These should only be active if attach succeeded. */ if (device_is_attached(dev)) { VR_LOCK(sc); - sc->vr_detach = 1; + sc->vr_flags |= VR_F_DETACHED; vr_stop(sc); VR_UNLOCK(sc); callout_drain(&sc->vr_stat_callout); @@ -1542,7 +1542,7 @@ vr_tick(void *xsc) mii = device_get_softc(sc->vr_miibus); mii_tick(mii); - if (sc->vr_link == 0) + if ((sc->vr_flags & VR_F_LINK) == 0) vr_miibus_statchg(sc->vr_dev); vr_watchdog(sc); callout_reset(&sc->vr_stat_callout, hz, vr_tick, sc); @@ -1652,7 +1652,7 @@ vr_intr(void *arg) VR_LOCK(sc); - if (sc->vr_suspended != 0) + if ((sc->vr_flags & VR_F_SUSPENDED) != 0) goto done_locked; status = CSR_READ_2(sc, VR_ISR); @@ -1933,7 +1933,7 @@ vr_start_locked(struct ifnet *ifp) VR_LOCK_ASSERT(sc); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || sc->vr_link == 0) + IFF_DRV_RUNNING || (sc->vr_flags & VR_F_LINK) == 0) return; for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd) && @@ -2103,12 +2103,12 @@ vr_init_locked(struct vr_softc *sc) if (sc->vr_revid > REV_ID_VT6102_A) CSR_WRITE_2(sc, VR_MII_IMR, 0); - sc->vr_link = 0; - mii_mediachg(mii); - ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + sc->vr_flags &= ~VR_F_LINK; + mii_mediachg(mii); + callout_reset(&sc->vr_stat_callout, hz, vr_tick, sc); } @@ -2177,7 +2177,7 @@ vr_ioctl(struct ifnet *ifp, u_long comma (IFF_PROMISC | IFF_ALLMULTI)) vr_set_filter(sc); } else { - if (sc->vr_detach == 0) + if ((sc->vr_flags & VR_F_DETACHED) == 0) vr_init_locked(sc); } } else { @@ -2265,7 +2265,7 @@ vr_watchdog(struct vr_softc *sc) if (sc->vr_cdata.vr_tx_cnt == 0) return; - if (sc->vr_link == 0) { + if ((sc->vr_flags & VR_F_LINK) == 0) { if (bootverbose) if_printf(sc->vr_ifp, "watchdog timeout " "(missed link)\n"); @@ -2443,7 +2443,7 @@ vr_suspend(device_t dev) VR_LOCK(sc); vr_stop(sc); vr_setwol(sc); - sc->vr_suspended = 1; + sc->vr_flags |= VR_F_SUSPENDED; VR_UNLOCK(sc); return (0); @@ -2464,7 +2464,7 @@ vr_resume(device_t dev) if (ifp->if_flags & IFF_UP) vr_init_locked(sc); - sc->vr_suspended = 0; + sc->vr_flags &= ~VR_F_SUSPENDED; VR_UNLOCK(sc); return (0); Modified: head/sys/dev/vr/if_vrreg.h ============================================================================== --- head/sys/dev/vr/if_vrreg.h Mon Nov 28 17:58:57 2011 (r228083) +++ head/sys/dev/vr/if_vrreg.h Mon Nov 28 18:32:35 2011 (r228084) @@ -720,20 +720,20 @@ struct vr_softc { void *vr_intrhand; device_t vr_miibus; uint8_t vr_revid; /* Rhine chip revision */ - uint8_t vr_flags; /* See VR_F_* below */ -#define VR_F_RESTART 0x01 /* Restart unit on next tick */ + int vr_flags; /* See VR_F_* below */ +#define VR_F_RESTART 0x0001 /* Restart unit on next tick */ +#define VR_F_SUSPENDED 0x2000 +#define VR_F_DETACHED 0x4000 +#define VR_F_LINK 0x8000 int vr_if_flags; struct vr_chain_data vr_cdata; struct vr_ring_data vr_rdata; struct vr_statistics vr_stat; struct callout vr_stat_callout; struct mtx vr_mtx; - int vr_suspended; /* if 1, sleeping/detaching */ int vr_quirks; - int vr_link; int vr_watchdog_timer; int vr_txthresh; - int vr_detach; #ifdef DEVICE_POLLING int rxcycles; #endif From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 18:51:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E9A1065677; Mon, 28 Nov 2011 18:51:41 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85A428FC1E; Mon, 28 Nov 2011 18:51:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASIpfpD004086; Mon, 28 Nov 2011 18:51:41 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASIpfac004082; Mon, 28 Nov 2011 18:51:41 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201111281851.pASIpfac004082@svn.freebsd.org> From: Philip Paeps Date: Mon, 28 Nov 2011 18:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228085 - in head/sys: amd64/conf conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 18:51:41 -0000 Author: philip Date: Mon Nov 28 18:51:40 2011 New Revision: 228085 URL: http://svn.freebsd.org/changeset/base/228085 Log: Limit building sfxge(4) in-kernel to amd64 for the time being. We can put it back after I fix the breakages on some of our more exotic platforms. While here, add the driver to the amd64 NOTES, so it can be picked up in LINT builds. Modified: head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Mon Nov 28 18:32:35 2011 (r228084) +++ head/sys/amd64/conf/NOTES Mon Nov 28 18:51:40 2011 (r228085) @@ -294,6 +294,7 @@ options DRM_DEBUG # Include debug print # Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking +# sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -307,6 +308,7 @@ device iwn device mwl device nfe device nve +device sfxge device wpi # IEEE 802.11 adapter firmware modules Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Nov 28 18:32:35 2011 (r228084) +++ head/sys/conf/files Mon Nov 28 18:51:40 2011 (r228085) @@ -1674,37 +1674,6 @@ dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa dev/sdhci/sdhci.c optional sdhci pci dev/sf/if_sf.c optional sf pci -dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci -dev/sfxge/common/efx_ev.c optional sfxge inet pci -dev/sfxge/common/efx_filter.c optional sfxge inet pci -dev/sfxge/common/efx_intr.c optional sfxge inet pci -dev/sfxge/common/efx_mac.c optional sfxge inet pci -dev/sfxge/common/efx_mcdi.c optional sfxge inet pci -dev/sfxge/common/efx_mon.c optional sfxge inet pci -dev/sfxge/common/efx_nic.c optional sfxge inet pci -dev/sfxge/common/efx_nvram.c optional sfxge inet pci -dev/sfxge/common/efx_phy.c optional sfxge inet pci -dev/sfxge/common/efx_port.c optional sfxge inet pci -dev/sfxge/common/efx_rx.c optional sfxge inet pci -dev/sfxge/common/efx_sram.c optional sfxge inet pci -dev/sfxge/common/efx_tx.c optional sfxge inet pci -dev/sfxge/common/efx_vpd.c optional sfxge inet pci -dev/sfxge/common/efx_wol.c optional sfxge inet pci -dev/sfxge/common/siena_mac.c optional sfxge inet pci -dev/sfxge/common/siena_mon.c optional sfxge inet pci -dev/sfxge/common/siena_nic.c optional sfxge inet pci -dev/sfxge/common/siena_nvram.c optional sfxge inet pci -dev/sfxge/common/siena_phy.c optional sfxge inet pci -dev/sfxge/common/siena_sram.c optional sfxge inet pci -dev/sfxge/common/siena_vpd.c optional sfxge inet pci -dev/sfxge/sfxge.c optional sfxge inet pci -dev/sfxge/sfxge_dma.c optional sfxge inet pci -dev/sfxge/sfxge_ev.c optional sfxge inet pci -dev/sfxge/sfxge_intr.c optional sfxge inet pci -dev/sfxge/sfxge_mcdi.c optional sfxge inet pci -dev/sfxge/sfxge_port.c optional sfxge inet pci -dev/sfxge/sfxge_rx.c optional sfxge inet pci -dev/sfxge/sfxge_tx.c optional sfxge inet pci dev/sge/if_sge.c optional sge pci dev/si/si.c optional si dev/si/si2_z280.c optional si Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Nov 28 18:32:35 2011 (r228084) +++ head/sys/conf/files.amd64 Mon Nov 28 18:51:40 2011 (r228085) @@ -214,6 +214,37 @@ dev/qlxgb/qla_ioctl.c optional qlxgb pc dev/qlxgb/qla_isr.c optional qlxgb pci dev/qlxgb/qla_misc.c optional qlxgb pci dev/qlxgb/qla_os.c optional qlxgb pci +dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci +dev/sfxge/common/efx_ev.c optional sfxge inet pci +dev/sfxge/common/efx_filter.c optional sfxge inet pci +dev/sfxge/common/efx_intr.c optional sfxge inet pci +dev/sfxge/common/efx_mac.c optional sfxge inet pci +dev/sfxge/common/efx_mcdi.c optional sfxge inet pci +dev/sfxge/common/efx_mon.c optional sfxge inet pci +dev/sfxge/common/efx_nic.c optional sfxge inet pci +dev/sfxge/common/efx_nvram.c optional sfxge inet pci +dev/sfxge/common/efx_phy.c optional sfxge inet pci +dev/sfxge/common/efx_port.c optional sfxge inet pci +dev/sfxge/common/efx_rx.c optional sfxge inet pci +dev/sfxge/common/efx_sram.c optional sfxge inet pci +dev/sfxge/common/efx_tx.c optional sfxge inet pci +dev/sfxge/common/efx_vpd.c optional sfxge inet pci +dev/sfxge/common/efx_wol.c optional sfxge inet pci +dev/sfxge/common/siena_mac.c optional sfxge inet pci +dev/sfxge/common/siena_mon.c optional sfxge inet pci +dev/sfxge/common/siena_nic.c optional sfxge inet pci +dev/sfxge/common/siena_nvram.c optional sfxge inet pci +dev/sfxge/common/siena_phy.c optional sfxge inet pci +dev/sfxge/common/siena_sram.c optional sfxge inet pci +dev/sfxge/common/siena_vpd.c optional sfxge inet pci +dev/sfxge/sfxge.c optional sfxge inet pci +dev/sfxge/sfxge_dma.c optional sfxge inet pci +dev/sfxge/sfxge_ev.c optional sfxge inet pci +dev/sfxge/sfxge_intr.c optional sfxge inet pci +dev/sfxge/sfxge_mcdi.c optional sfxge inet pci +dev/sfxge/sfxge_port.c optional sfxge inet pci +dev/sfxge/sfxge_rx.c optional sfxge inet pci +dev/sfxge/sfxge_tx.c optional sfxge inet pci dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/sio/sio_pccard.c optional sio pccard From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:03:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C78F71065672; Mon, 28 Nov 2011 19:03:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6A188FC0C; Mon, 28 Nov 2011 19:03:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASJ3xcr004501; Mon, 28 Nov 2011 19:03:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASJ3x34004498; Mon, 28 Nov 2011 19:03:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201111281903.pASJ3x34004498@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 28 Nov 2011 19:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228086 - head/sys/dev/vr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:03:59 -0000 Author: yongari Date: Mon Nov 28 19:03:59 2011 New Revision: 228086 URL: http://svn.freebsd.org/changeset/base/228086 Log: Announce flow control capability to PHY drivers and enable flow control for all vr(4) controllers that support it. It's known that old vr(4) controllers(Rhine II) does not support TX pause but Rhine III supports both TX and RX pause. Make TX pause really work on Rhine III by letting controller know available RX buffers. While here, adjust XON/XOFF parameters to get better performance with flow control. Modified: head/sys/dev/vr/if_vr.c head/sys/dev/vr/if_vrreg.h Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Mon Nov 28 18:51:40 2011 (r228085) +++ head/sys/dev/vr/if_vr.c Mon Nov 28 19:03:59 2011 (r228086) @@ -305,7 +305,7 @@ vr_miibus_statchg(device_t dev) (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - sc->vr_flags &= ~VR_F_LINK; + sc->vr_flags &= ~(VR_F_LINK | VR_F_TXPAUSE); if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == (IFM_ACTIVE | IFM_AVALID)) { switch (IFM_SUBTYPE(mii->mii_media_active)) { @@ -342,7 +342,6 @@ vr_miibus_statchg(device_t dev) CSR_WRITE_1(sc, VR_CR1, cr1); } fc = 0; -#ifdef notyet /* Configure flow-control. */ if (sc->vr_revid >= REV_ID_VT6105_A0) { fc = CSR_READ_1(sc, VR_FLOWCR1); @@ -351,8 +350,10 @@ vr_miibus_statchg(device_t dev) IFM_ETH_RXPAUSE) != 0) fc |= VR_FLOWCR1_RXPAUSE; if ((IFM_OPTIONS(mii->mii_media_active) & - IFM_ETH_TXPAUSE) != 0) + IFM_ETH_TXPAUSE) != 0) { fc |= VR_FLOWCR1_TXPAUSE; + sc->vr_flags |= VR_F_TXPAUSE; + } CSR_WRITE_1(sc, VR_FLOWCR1, fc); } else if (sc->vr_revid >= REV_ID_VT6102_A) { /* No Tx puase capability available for Rhine II. */ @@ -363,7 +364,6 @@ vr_miibus_statchg(device_t dev) fc |= VR_MISCCR0_RXPAUSE; CSR_WRITE_1(sc, VR_MISC_CR0, fc); } -#endif vr_rx_start(sc); vr_tx_start(sc); } else { @@ -766,7 +766,8 @@ vr_attach(device_t dev) else phy = CSR_READ_1(sc, VR_PHYADDR) & VR_PHYADDR_MASK; error = mii_attach(dev, &sc->vr_miibus, ifp, vr_ifmedia_upd, - vr_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + vr_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, + sc->vr_revid >= REV_ID_VT6102_A ? MIIF_DOPAUSE : 0); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto fail; @@ -1396,6 +1397,17 @@ vr_rxeof(struct vr_softc *sc) } if (prog > 0) { + /* + * Let controller know how many number of RX buffers + * are posted but avoid expensive register access if + * TX pause capability was not negotiated with link + * partner. + */ + if ((sc->vr_flags & VR_F_TXPAUSE) != 0) { + if (prog >= VR_RX_RING_CNT) + prog = VR_RX_RING_CNT - 1; + CSR_WRITE_1(sc, VR_FLOWCR0, prog); + } sc->vr_cdata.vr_rx_cons = cons; bus_dmamap_sync(sc->vr_cdata.vr_rx_ring_tag, sc->vr_cdata.vr_rx_ring_map, @@ -2071,14 +2083,32 @@ vr_init_locked(struct vr_softc *sc) /* Set flow-control parameters for Rhine III. */ if (sc->vr_revid >= REV_ID_VT6105_A0) { - /* Rx buffer count available for incoming packet. */ - CSR_WRITE_1(sc, VR_FLOWCR0, VR_RX_RING_CNT); /* - * Tx pause low threshold : 16 free receive buffers - * Tx pause XON high threshold : 48 free receive buffers + * Configure Rx buffer count available for incoming + * packet. + * Even though data sheet says almost nothing about + * this register, this register should be updated + * whenever driver adds new RX buffers to controller. + * Otherwise, XON frame is not sent to link partner + * even if controller has enough RX buffers and you + * would be isolated from network. + * The controller is not smart enough to know number + * of available RX buffers so driver have to let + * controller know how many RX buffers are posted. + * In other words, this register works like a residue + * counter for RX buffers and should be initialized + * to the number of total RX buffers - 1 before + * enabling RX MAC. Note, this register is 8bits so + * it effectively limits the maximum number of RX + * buffer to be configured by controller is 255. + */ + CSR_WRITE_1(sc, VR_FLOWCR0, VR_RX_RING_CNT - 1); + /* + * Tx pause low threshold : 8 free receive buffers + * Tx pause XON high threshold : 24 free receive buffers */ CSR_WRITE_1(sc, VR_FLOWCR1, - VR_FLOWCR1_TXLO16 | VR_FLOWCR1_TXHI48 | VR_FLOWCR1_XONXOFF); + VR_FLOWCR1_TXLO8 | VR_FLOWCR1_TXHI24 | VR_FLOWCR1_XONXOFF); /* Set Tx pause timer. */ CSR_WRITE_2(sc, VR_PAUSETIMER, 0xffff); } @@ -2106,7 +2136,7 @@ vr_init_locked(struct vr_softc *sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sc->vr_flags &= ~VR_F_LINK; + sc->vr_flags &= ~(VR_F_LINK | VR_F_TXPAUSE); mii_mediachg(mii); callout_reset(&sc->vr_stat_callout, hz, vr_tick, sc); @@ -2128,6 +2158,7 @@ vr_ifmedia_upd(struct ifnet *ifp) mii = device_get_softc(sc->vr_miibus); LIST_FOREACH(miisc, &mii->mii_phys, mii_list) PHY_RESET(miisc); + sc->vr_flags &= ~(VR_F_LINK | VR_F_TXPAUSE); error = mii_mediachg(mii); VR_UNLOCK(sc); Modified: head/sys/dev/vr/if_vrreg.h ============================================================================== --- head/sys/dev/vr/if_vrreg.h Mon Nov 28 18:51:40 2011 (r228085) +++ head/sys/dev/vr/if_vrreg.h Mon Nov 28 19:03:59 2011 (r228086) @@ -722,6 +722,7 @@ struct vr_softc { uint8_t vr_revid; /* Rhine chip revision */ int vr_flags; /* See VR_F_* below */ #define VR_F_RESTART 0x0001 /* Restart unit on next tick */ +#define VR_F_TXPAUSE 0x0010 #define VR_F_SUSPENDED 0x2000 #define VR_F_DETACHED 0x4000 #define VR_F_LINK 0x8000 From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:28:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BA53106566C; Mon, 28 Nov 2011 19:28:30 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B3BD8FC0A; Mon, 28 Nov 2011 19:28:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASJSUX4005396; Mon, 28 Nov 2011 19:28:30 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASJSUUc005394; Mon, 28 Nov 2011 19:28:30 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201111281928.pASJSUUc005394@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 28 Nov 2011 19:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228088 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:28:30 -0000 Author: gonzo Date: Mon Nov 28 19:28:29 2011 New Revision: 228088 URL: http://svn.freebsd.org/changeset/base/228088 Log: - Copy base MAC address from bootinfo descriptor to sysinfo struct Reviewed by: Andrew Duane Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Mon Nov 28 19:14:38 2011 (r228087) +++ head/sys/mips/cavium/octeon_machdep.c Mon Nov 28 19:28:29 2011 (r228088) @@ -569,6 +569,8 @@ octeon_process_app_desc_ver_6(void) octeon_bootinfo->board_rev_major, octeon_bootinfo->board_rev_minor, octeon_bootinfo->eclock_hz); + memcpy(cvmx_sysinfo_get()->mac_addr_base, octeon_bootinfo->mac_addr_base, 6); + cvmx_sysinfo_get()->mac_addr_count = octeon_bootinfo->mac_addr_count; } static void From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:35:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70444106564A; Mon, 28 Nov 2011 19:35:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F42B8FC0C; Mon, 28 Nov 2011 19:35:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASJZ8QK005646; Mon, 28 Nov 2011 19:35:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASJZ8BG005644; Mon, 28 Nov 2011 19:35:08 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111281935.pASJZ8BG005644@svn.freebsd.org> From: John Baldwin Date: Mon, 28 Nov 2011 19:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228089 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:35:08 -0000 Author: jhb Date: Mon Nov 28 19:35:08 2011 New Revision: 228089 URL: http://svn.freebsd.org/changeset/base/228089 Log: Change the if_vlan driver to use if_transmit for forwarding packets to the parent interface. This avoids the overhead of queueing a packet to an IFQ only to immediately dequeue it again. Suggested by: np Reviewed by: brooks MFC after: 1 month Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Mon Nov 28 19:28:29 2011 (r228088) +++ head/sys/net/if_vlan.c Mon Nov 28 19:35:08 2011 (r228089) @@ -34,9 +34,8 @@ * we need to pretend to be enough of an Ethernet implementation * to make arp work. The way we do this is by telling everyone * that we are an Ethernet, and then catch the packets that - * ether_output() left on our output queue when it calls - * if_start(), rewrite them for use by the real outgoing interface, - * and ask it to send them. + * ether_output() sends to us via if_transmit(), rewrite them for + * use by the real outgoing interface, and ask it to send them. */ #include @@ -183,14 +182,15 @@ static __inline struct ifvlan * vlan_get #endif static void trunk_destroy(struct ifvlantrunk *trunk); -static void vlan_start(struct ifnet *ifp); static void vlan_init(void *foo); static void vlan_input(struct ifnet *ifp, struct mbuf *m); static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr); +static void vlan_qflush(struct ifnet *ifp); static int vlan_setflag(struct ifnet *ifp, int flag, int status, int (*func)(struct ifnet *, int)); static int vlan_setflags(struct ifnet *ifp, int status); static int vlan_setmulti(struct ifnet *ifp); +static int vlan_transmit(struct ifnet *ifp, struct mbuf *m); static void vlan_unconfig(struct ifnet *ifp); static void vlan_unconfig_locked(struct ifnet *ifp); static int vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t tag); @@ -944,9 +944,9 @@ vlan_clone_create(struct if_clone *ifc, /* NB: mtu is not set here */ ifp->if_init = vlan_init; - ifp->if_start = vlan_start; + ifp->if_transmit = vlan_transmit; + ifp->if_qflush = vlan_qflush; ifp->if_ioctl = vlan_ioctl; - ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_flags = VLAN_IFFLAGS; ether_ifattach(ifp, eaddr); /* Now undo some of the damage... */ @@ -1005,99 +1005,95 @@ vlan_init(void *foo __unused) } /* - * The if_start method for vlan(4) interface. It doesn't - * raises the IFF_DRV_OACTIVE flag, since it is called - * only from IFQ_HANDOFF() macro in ether_output_frame(). - * If the interface queue is full, and vlan_start() is - * not called, the queue would never get emptied and - * interface would stall forever. + * The if_transmit method for vlan(4) interface. */ -static void -vlan_start(struct ifnet *ifp) +static int +vlan_transmit(struct ifnet *ifp, struct mbuf *m) { struct ifvlan *ifv; struct ifnet *p; - struct mbuf *m; int error; ifv = ifp->if_softc; p = PARENT(ifv); - for (;;) { - IF_DEQUEUE(&ifp->if_snd, m); - if (m == NULL) - break; - BPF_MTAP(ifp, m); + BPF_MTAP(ifp, m); - /* - * Do not run parent's if_start() if the parent is not up, - * or parent's driver will cause a system crash. - */ - if (!UP_AND_RUNNING(p)) { - m_freem(m); - ifp->if_collisions++; - continue; - } + /* + * Do not run parent's if_transmit() if the parent is not up, + * or parent's driver will cause a system crash. + */ + if (!UP_AND_RUNNING(p)) { + m_freem(m); + ifp->if_collisions++; + return (0); + } - /* - * Pad the frame to the minimum size allowed if told to. - * This option is in accord with IEEE Std 802.1Q, 2003 Ed., - * paragraph C.4.4.3.b. It can help to work around buggy - * bridges that violate paragraph C.4.4.3.a from the same - * document, i.e., fail to pad short frames after untagging. - * E.g., a tagged frame 66 bytes long (incl. FCS) is OK, but - * untagging it will produce a 62-byte frame, which is a runt - * and requires padding. There are VLAN-enabled network - * devices that just discard such runts instead or mishandle - * them somehow. - */ - if (soft_pad && p->if_type == IFT_ETHER) { - static char pad[8]; /* just zeros */ - int n; - - for (n = ETHERMIN + ETHER_HDR_LEN - m->m_pkthdr.len; - n > 0; n -= sizeof(pad)) - if (!m_append(m, min(n, sizeof(pad)), pad)) - break; - - if (n > 0) { - if_printf(ifp, "cannot pad short frame\n"); - ifp->if_oerrors++; - m_freem(m); - continue; - } - } + /* + * Pad the frame to the minimum size allowed if told to. + * This option is in accord with IEEE Std 802.1Q, 2003 Ed., + * paragraph C.4.4.3.b. It can help to work around buggy + * bridges that violate paragraph C.4.4.3.a from the same + * document, i.e., fail to pad short frames after untagging. + * E.g., a tagged frame 66 bytes long (incl. FCS) is OK, but + * untagging it will produce a 62-byte frame, which is a runt + * and requires padding. There are VLAN-enabled network + * devices that just discard such runts instead or mishandle + * them somehow. + */ + if (soft_pad && p->if_type == IFT_ETHER) { + static char pad[8]; /* just zeros */ + int n; + + for (n = ETHERMIN + ETHER_HDR_LEN - m->m_pkthdr.len; + n > 0; n -= sizeof(pad)) + if (!m_append(m, min(n, sizeof(pad)), pad)) + break; - /* - * If underlying interface can do VLAN tag insertion itself, - * just pass the packet along. However, we need some way to - * tell the interface where the packet came from so that it - * knows how to find the VLAN tag to use, so we attach a - * packet tag that holds it. - */ - if (p->if_capenable & IFCAP_VLAN_HWTAGGING) { - m->m_pkthdr.ether_vtag = ifv->ifv_tag; - m->m_flags |= M_VLANTAG; - } else { - m = ether_vlanencap(m, ifv->ifv_tag); - if (m == NULL) { - if_printf(ifp, - "unable to prepend VLAN header\n"); - ifp->if_oerrors++; - continue; - } + if (n > 0) { + if_printf(ifp, "cannot pad short frame\n"); + ifp->if_oerrors++; + m_freem(m); + return (0); } + } - /* - * Send it, precisely as ether_output() would have. - * We are already running at splimp. - */ - error = (p->if_transmit)(p, m); - if (!error) - ifp->if_opackets++; - else + /* + * If underlying interface can do VLAN tag insertion itself, + * just pass the packet along. However, we need some way to + * tell the interface where the packet came from so that it + * knows how to find the VLAN tag to use, so we attach a + * packet tag that holds it. + */ + if (p->if_capenable & IFCAP_VLAN_HWTAGGING) { + m->m_pkthdr.ether_vtag = ifv->ifv_tag; + m->m_flags |= M_VLANTAG; + } else { + m = ether_vlanencap(m, ifv->ifv_tag); + if (m == NULL) { + if_printf(ifp, "unable to prepend VLAN header\n"); ifp->if_oerrors++; + return (0); + } } + + /* + * Send it, precisely as ether_output() would have. + */ + error = (p->if_transmit)(p, m); + if (!error) + ifp->if_opackets++; + else + ifp->if_oerrors++; + return (error); +} + +/* + * The ifp->if_qflush entry point for vlan(4) is a no-op. + */ +static void +vlan_qflush(struct ifnet *ifp __unused) +{ } static void From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:45:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4A441065670; Mon, 28 Nov 2011 19:45:47 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9424C8FC12; Mon, 28 Nov 2011 19:45:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASJjllO006014; Mon, 28 Nov 2011 19:45:47 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASJjl2e006012; Mon, 28 Nov 2011 19:45:47 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201111281945.pASJjl2e006012@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 28 Nov 2011 19:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228090 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:45:47 -0000 Author: trociny Date: Mon Nov 28 19:45:47 2011 New Revision: 228090 URL: http://svn.freebsd.org/changeset/base/228090 Log: Update SYNOPSIS to include the flags added recently. Spotted by: jhb Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Mon Nov 28 19:35:08 2011 (r228089) +++ head/usr.bin/procstat/procstat.1 Mon Nov 28 19:45:47 2011 (r228090) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2011 +.Dd November 28, 2011 .Dt PROCSTAT 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Op Fl n .Op Fl C .Op Fl w Ar interval -.Op Fl b | c | f | i | j | k | s | t | v +.Op Fl b | c | e | f | i | j | k | l | s | t | v | x .Op Fl a | Ar pid ... .Sh DESCRIPTION The From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:47:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF3CB106564A; Mon, 28 Nov 2011 19:47:28 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB488FC12; Mon, 28 Nov 2011 19:47:28 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id EFFFD25D3892; Mon, 28 Nov 2011 19:47:26 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BEBE7BD5E01; Mon, 28 Nov 2011 19:47:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id o+WK4J4T2ajv; Mon, 28 Nov 2011 19:47:23 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 56DFDBD5E00; Mon, 28 Nov 2011 19:47:23 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201111281444.pASEixdO095604@svn.freebsd.org> Date: Mon, 28 Nov 2011 19:47:22 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201111281444.pASEixdO095604@svn.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:47:28 -0000 On 28. Nov 2011, at 14:44 , Gleb Smirnoff wrote: > Author: glebius > Date: Mon Nov 28 14:44:59 2011 > New Revision: 228071 > URL: http://svn.freebsd.org/changeset/base/228071 >=20 > Log: > - Use generic alloc_unr(9) allocator for if_clone, instead > of hand-made. > - When registering new cloner, check whether a cloner with > same name already exist. > - When allocating unit, also check with help of ifunit() > whether such interface already exist or not. [1] This forces packages to be recompiled; they might like to have a = __FreeBSD_version for that? It's not MFCable, at least I think - don't see a MFC after, just want to = be sure. See one more comment inline? >=20 > PR: kern/162789 [1] >=20 > Modified: > head/sys/net/if_clone.c > head/sys/net/if_clone.h >=20 > Modified: head/sys/net/if_clone.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/net/if_clone.c Mon Nov 28 14:39:56 2011 = (r228070) > +++ head/sys/net/if_clone.c Mon Nov 28 14:44:59 2011 = (r228071) > @@ -282,33 +282,34 @@ if_clone_destroyif(struct if_clone *ifc, > /* > * Register a network interface cloner. > */ > -void > +int > if_clone_attach(struct if_clone *ifc) > { > - int len, maxclone; > + struct if_clone *ifc1; > + > + KASSERT(ifc->ifc_name !=3D NULL, ("%s: no name\n", __func__)); >=20 > - /* > - * Compute bitmap size and allocate it. > - */ > - maxclone =3D ifc->ifc_maxunit + 1; > - len =3D maxclone >> 3; > - if ((len << 3) < maxclone) > - len++; > - ifc->ifc_units =3D malloc(len, M_CLONE, M_WAITOK | M_ZERO); > - ifc->ifc_bmlen =3D len; > IF_CLONE_LOCK_INIT(ifc); > IF_CLONE_ADDREF(ifc); > + ifc->ifc_unrhdr =3D new_unrhdr(0, ifc->ifc_maxunit, = &ifc->ifc_mtx); > + LIST_INIT(&ifc->ifc_iflist); >=20 > IF_CLONERS_LOCK(); > + LIST_FOREACH(ifc1, &V_if_cloners, ifc_list) > + if (strcmp(ifc->ifc_name, ifc1->ifc_name) =3D=3D 0) { > + IF_CLONERS_UNLOCK(); > + IF_CLONE_REMREF(ifc); > + return (EEXIST); At this point you may have a problem not freeing the unr? > + } > LIST_INSERT_HEAD(&V_if_cloners, ifc, ifc_list); > V_if_cloners_count++; > IF_CLONERS_UNLOCK(); >=20 > - LIST_INIT(&ifc->ifc_iflist); > - > if (ifc->ifc_attach !=3D NULL) > (*ifc->ifc_attach)(ifc); > EVENTHANDLER_INVOKE(if_clone_event, ifc); > + > + return (0); > } >=20 > /* > @@ -338,16 +339,12 @@ if_clone_detach(struct if_clone *ifc) > static void > if_clone_free(struct if_clone *ifc) > { > - for (int bytoff =3D 0; bytoff < ifc->ifc_bmlen; bytoff++) { > - KASSERT(ifc->ifc_units[bytoff] =3D=3D 0x00, > - ("ifc_units[%d] is not empty", bytoff)); > - } >=20 > KASSERT(LIST_EMPTY(&ifc->ifc_iflist), > ("%s: ifc_iflist not empty", __func__)); >=20 > IF_CLONE_LOCK_DESTROY(ifc); > - free(ifc->ifc_units, M_CLONE); > + delete_unrhdr(ifc->ifc_unrhdr); > } >=20 > /* > @@ -441,73 +438,40 @@ ifc_name2unit(const char *name, int *uni > int > ifc_alloc_unit(struct if_clone *ifc, int *unit) > { > - int wildcard, bytoff, bitoff; > - int err =3D 0; > - > - IF_CLONE_LOCK(ifc); > + char name[IFNAMSIZ]; > + int wildcard; >=20 > - bytoff =3D bitoff =3D 0; > wildcard =3D (*unit < 0); > - /* > - * Find a free unit if none was given. > - */ > +retry: > if (wildcard) { > - while ((bytoff < ifc->ifc_bmlen) > - && (ifc->ifc_units[bytoff] =3D=3D 0xff)) > - bytoff++; > - if (bytoff >=3D ifc->ifc_bmlen) { > - err =3D ENOSPC; > - goto done; > - } > - while ((ifc->ifc_units[bytoff] & (1 << bitoff)) !=3D 0) > - bitoff++; > - *unit =3D (bytoff << 3) + bitoff; > - } > - > - if (*unit > ifc->ifc_maxunit) { > - err =3D ENOSPC; > - goto done; > + *unit =3D alloc_unr(ifc->ifc_unrhdr); > + if (*unit =3D=3D -1) > + return (ENOSPC); > + } else { > + *unit =3D alloc_unr_specific(ifc->ifc_unrhdr, *unit); > + if (*unit =3D=3D -1) > + return (EEXIST); > } >=20 > - if (!wildcard) { > - bytoff =3D *unit >> 3; > - bitoff =3D *unit - (bytoff << 3); > + snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, *unit); > + if (ifunit(name) !=3D NULL) { > + if (wildcard) > + goto retry; /* XXXGL: yep, it's a unit leak = */ > + else > + return (EEXIST); > } >=20 > - if((ifc->ifc_units[bytoff] & (1 << bitoff)) !=3D 0) { > - err =3D EEXIST; > - goto done; > - } > - /* > - * Allocate the unit in the bitmap. > - */ > - KASSERT((ifc->ifc_units[bytoff] & (1 << bitoff)) =3D=3D 0, > - ("%s: bit is already set", __func__)); > - ifc->ifc_units[bytoff] |=3D (1 << bitoff); > - IF_CLONE_ADDREF_LOCKED(ifc); > + IF_CLONE_ADDREF(ifc); >=20 > -done: > - IF_CLONE_UNLOCK(ifc); > - return (err); > + return (0); > } >=20 > void > ifc_free_unit(struct if_clone *ifc, int unit) > { > - int bytoff, bitoff; > - >=20 > - /* > - * Compute offset in the bitmap and deallocate the unit. > - */ > - bytoff =3D unit >> 3; > - bitoff =3D unit - (bytoff << 3); > - > - IF_CLONE_LOCK(ifc); > - KASSERT((ifc->ifc_units[bytoff] & (1 << bitoff)) !=3D 0, > - ("%s: bit is already cleared", __func__)); > - ifc->ifc_units[bytoff] &=3D ~(1 << bitoff); > - IF_CLONE_REMREF_LOCKED(ifc); /* releases lock */ > + free_unr(ifc->ifc_unrhdr, unit); > + IF_CLONE_REMREF(ifc); > } >=20 > void >=20 > Modified: head/sys/net/if_clone.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/net/if_clone.h Mon Nov 28 14:39:56 2011 = (r228070) > +++ head/sys/net/if_clone.h Mon Nov 28 14:44:59 2011 = (r228071) > @@ -37,7 +37,15 @@ >=20 > #define IFC_CLONE_INITIALIZER(name, data, maxunit, = \ > attach, match, create, destroy) = \ > - { { 0 }, name, maxunit, NULL, 0, data, attach, match, create, = destroy } > + { = \ > + .ifc_name =3D name, = \ > + .ifc_maxunit =3D maxunit, = \ > + .ifc_data =3D data, = \ > + .ifc_attach =3D attach, = \ > + .ifc_match =3D match, = \ > + .ifc_create =3D create, = \ > + .ifc_destroy =3D destroy, = \ > + } >=20 > /* > * Structure describing a `cloning' interface. > @@ -52,10 +60,7 @@ struct if_clone { > LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */ > const char *ifc_name; /* (c) Name of device, e.g. = `gif' */ > int ifc_maxunit; /* (c) Maximum unit number */ > - unsigned char *ifc_units; /* (i) Bitmap to handle units. = */ > - /* Considered private, = access */ > - /* via = ifc_(alloc|free)_unit(). */ > - int ifc_bmlen; /* (c) Bitmap length. */ > + struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ > void *ifc_data; /* (*) Data for ifc_* functions. = */ >=20 > /* (c) Driver specific cloning functions. Called with no locks = held. */ > @@ -65,12 +70,12 @@ struct if_clone { > int (*ifc_destroy)(struct if_clone *, struct ifnet *); >=20 > long ifc_refcnt; /* (i) Refrence count. */ > - struct mtx ifc_mtx; /* Muted to protect members. */ > + struct mtx ifc_mtx; /* Mutex to protect members. */ > LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces = */ > }; >=20 > void if_clone_init(void); > -void if_clone_attach(struct if_clone *); > +int if_clone_attach(struct if_clone *); > void if_clone_detach(struct if_clone *); > void vnet_if_clone_init(void); >=20 --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:48:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 604A4106564A; Mon, 28 Nov 2011 19:48:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC1E8FC13; Mon, 28 Nov 2011 19:48:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASJm4Mk006151; Mon, 28 Nov 2011 19:48:04 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASJm4tc006149; Mon, 28 Nov 2011 19:48:04 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201111281948.pASJm4tc006149@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 28 Nov 2011 19:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228091 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:48:04 -0000 Author: gonzo Date: Mon Nov 28 19:48:04 2011 New Revision: 228091 URL: http://svn.freebsd.org/changeset/base/228091 Log: - Fix backtrace for MIPS64 platform Modified: head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Mon Nov 28 19:45:47 2011 (r228090) +++ head/sys/mips/mips/db_trace.c Mon Nov 28 19:48:04 2011 (r228091) @@ -30,7 +30,7 @@ extern char edata[]; /* * A function using a stack frame has the following instruction as the first - * one: addiu sp,sp,- + * one: [d]addiu sp,sp,- * * We make use of this to detect starting address of a function. This works * better than using 'j ra' instruction to signify end of the previous @@ -39,7 +39,8 @@ extern char edata[]; * * XXX the abi does not require that the addiu instruction be the first one. */ -#define MIPS_START_OF_FUNCTION(ins) (((ins) & 0xffff8000) == 0x27bd8000) +#define MIPS_START_OF_FUNCTION(ins) ((((ins) & 0xffff8000) == 0x27bd8000) \ + || (((ins) & 0xffff8000) == 0x67bd8000)) /* * MIPS ABI 3.0 requires that all functions return using the 'j ra' instruction @@ -329,6 +330,8 @@ loop: case OP_ADDI: case OP_ADDIU: + case OP_DADDI: + case OP_DADDIU: /* look for stack pointer adjustment */ if (i.IType.rs != 29 || i.IType.rt != 29) break; From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:51:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2F2D106564A; Mon, 28 Nov 2011 19:51:10 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id EE1348FC17; Mon, 28 Nov 2011 19:51:09 +0000 (UTC) Received: by faak28 with SMTP id k28so616241faa.13 for ; Mon, 28 Nov 2011 11:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=WHqWou1hID4PHMb0zRiE7UVqJxLgpYcvcCvZHCFU8XA=; b=SsH0BM63FBDao3r+HmmTk+aKixMlYWU4d7/ts98jcNqp2sXSDCpdFZkmLu4ARkc5rd 6OgYDTQcOTViKs96mLnfYjzWv9GSfamrG0op40Ok5Ee7eMlgdYL20VmCd5o/8O8i10Th +BYiw4Lq7XHsCoWoyZ9UtO9UsFvqJtmwSg9js= Received: by 10.204.149.212 with SMTP id u20mr1189030bkv.120.1322509868835; Mon, 28 Nov 2011 11:51:08 -0800 (PST) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id hw14sm18871395bkc.16.2011.11.28.11.51.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 11:51:06 -0800 (PST) From: Mikolaj Golub To: John Baldwin References: <201111242054.pAOKs6vj012296@svn.freebsd.org> <201111281330.11720.jhb@freebsd.org> X-Comment-To: John Baldwin Sender: Mikolaj Golub Date: Mon, 28 Nov 2011 21:51:04 +0200 In-Reply-To: <201111281330.11720.jhb@freebsd.org> (John Baldwin's message of "Mon, 28 Nov 2011 13:30:11 -0500") Message-ID: <86wrakt49j.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227956 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:51:11 -0000 On Mon, 28 Nov 2011 13:30:11 -0500 John Baldwin wrote: JB> On Thursday, November 24, 2011 3:54:06 pm Mikolaj Golub wrote: >> Author: trociny >> Date: Thu Nov 24 20:54:06 2011 >> New Revision: 227956 >> URL: http://svn.freebsd.org/changeset/base/227956 >> >> Log: >> usr.bin/procstat >> >> Add -l flag to display resource limits. >> >> PR: bin/161257 >> Reviewed by: kib >> MFC after: 2 weeks JB> Thanks for doing this! Did you consider making the procstat -l output use JB> "pretty" output similar to the output of /usr/bin/limits? For example, JB> using "infinity" instead of -1 and using humanize_number() for finite limits JB> that are in units of bytes? Looks like a good idea. I used procfs output as a reference but limits(1) looks prettier :-). Will do. -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:53:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1207B106566B; Mon, 28 Nov 2011 19:53:17 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB37D8FC08; Mon, 28 Nov 2011 19:53:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASJrGrT006355; Mon, 28 Nov 2011 19:53:16 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASJrG1Y006350; Mon, 28 Nov 2011 19:53:16 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201111281953.pASJrG1Y006350@svn.freebsd.org> From: Qing Li Date: Mon, 28 Nov 2011 19:53:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228092 - stable/8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:53:17 -0000 Author: qingli Date: Mon Nov 28 19:53:16 2011 New Revision: 228092 URL: http://svn.freebsd.org/changeset/base/228092 Log: MFC 227460 A default route learned from the RAs could be deleted manually after its installation. This removal may be accidental and can prevent the default route from being installed in the future if the associated default router has the best preference. The cause is the lack of status update in the default router on the state of its route installation in the kernel FIB. This patch fixes the described problem. Reviewed by: hrs, discussed with hrs Modified: stable/8/sys/netinet6/in6.c stable/8/sys/netinet6/nd6.c stable/8/sys/netinet6/nd6.h stable/8/sys/netinet6/nd6_rtr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Mon Nov 28 19:48:04 2011 (r228091) +++ stable/8/sys/netinet6/in6.c Mon Nov 28 19:53:16 2011 (r228092) @@ -1802,7 +1802,7 @@ in6_ifinit(struct ifnet *ifp, struct in6 struct sockaddr_in6 mask, addr; IF_AFDATA_LOCK(ifp); - ia->ia_ifa.ifa_rtrequest = NULL; + ia->ia_ifa.ifa_rtrequest = nd6_rtrequest; /* XXX QL * we need to report rt_newaddrmsg Modified: stable/8/sys/netinet6/nd6.c ============================================================================== --- stable/8/sys/netinet6/nd6.c Mon Nov 28 19:48:04 2011 (r228091) +++ stable/8/sys/netinet6/nd6.c Mon Nov 28 19:53:16 2011 (r228092) @@ -1170,6 +1170,46 @@ done: } +/* + * Rejuvenate this function for routing operations related + * processing. + */ +void +nd6_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info) +{ + struct sockaddr_in6 *gateway = (struct sockaddr_in6 *)rt->rt_gateway; + struct nd_defrouter *dr; + struct ifnet *ifp = rt->rt_ifp; + + RT_LOCK_ASSERT(rt); + + switch (req) { + case RTM_ADD: + break; + + case RTM_DELETE: + if (!ifp) + return; + /* + * Only indirect routes are interesting. + */ + if ((rt->rt_flags & RTF_GATEWAY) == 0) + return; + /* + * check for default route + */ + if (IN6_ARE_ADDR_EQUAL(&in6addr_any, + &SIN6(rt_key(rt))->sin6_addr)) { + + dr = defrouter_lookup(&gateway->sin6_addr, ifp); + if (dr != NULL) + dr->installed = 0; + } + break; + } +} + + int nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) { Modified: stable/8/sys/netinet6/nd6.h ============================================================================== --- stable/8/sys/netinet6/nd6.h Mon Nov 28 19:48:04 2011 (r228091) +++ stable/8/sys/netinet6/nd6.h Mon Nov 28 19:53:16 2011 (r228092) @@ -404,6 +404,7 @@ void nd6_purge __P((struct ifnet *)); void nd6_nud_hint __P((struct rtentry *, struct in6_addr *, int)); int nd6_resolve __P((struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *)); +void nd6_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *)); int nd6_ioctl __P((u_long, caddr_t, struct ifnet *)); struct llentry *nd6_cache_lladdr __P((struct ifnet *, struct in6_addr *, char *, int, int, int)); Modified: stable/8/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/8/sys/netinet6/nd6_rtr.c Mon Nov 28 19:48:04 2011 (r228091) +++ stable/8/sys/netinet6/nd6_rtr.c Mon Nov 28 19:53:16 2011 (r228092) @@ -755,9 +755,10 @@ defrtrlist_update(struct nd_defrouter *n /* * If the preference does not change, there's no need - * to sort the entries. + * to sort the entries. Also make sure the selected + * router is still installed in the kernel. */ - if (rtpref(new) == oldpref) { + if (dr->installed && rtpref(new) == oldpref) { splx(s); return (dr); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 19:55:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E9C106564A; Mon, 28 Nov 2011 19:55:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id C47E28FC16; Mon, 28 Nov 2011 19:55:46 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D0BC225D3A90; Mon, 28 Nov 2011 19:55:45 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 783BCBD5E01; Mon, 28 Nov 2011 19:55:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ctNrQFQ2A-45; Mon, 28 Nov 2011 19:55:43 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 32A10BD5E00; Mon, 28 Nov 2011 19:55:43 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201111271353.pARDraTa042138@svn.freebsd.org> Date: Mon, 28 Nov 2011 19:55:42 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <671575FC-BA0F-43A1-BDEE-6C9E3BD06076@FreeBSD.org> References: <201111271353.pARDraTa042138@svn.freebsd.org> To: Jaakko Heinonen X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228021 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 19:55:47 -0000 On 27. Nov 2011, at 13:53 , Jaakko Heinonen wrote: > Author: jh > Date: Sun Nov 27 13:53:36 2011 > New Revision: 228021 > URL: http://svn.freebsd.org/changeset/base/228021 >=20 > Log: > Add LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target. > This was missed in r221353. >=20 Thanks! > Modified: > head/sys/conf/makeLINT.mk >=20 > Modified: head/sys/conf/makeLINT.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/makeLINT.mk Sun Nov 27 11:46:09 2011 = (r228020) > +++ head/sys/conf/makeLINT.mk Sun Nov 27 13:53:36 2011 = (r228021) > @@ -6,7 +6,7 @@ all: > clean: > rm -f LINT > .if ${TARGET} =3D=3D "amd64" || ${TARGET} =3D=3D "i386" > - rm -f LINT-VIMAGE > + rm -f LINT-VIMAGE LINT-NOINET LINT-NOINET6 LINT-NOIP > .endif >=20 > NOTES=3D ../../conf/NOTES NOTES --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:00:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6086106566C; Mon, 28 Nov 2011 20:00:31 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5CE88FC0A; Mon, 28 Nov 2011 20:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASK0Vdi006651; Mon, 28 Nov 2011 20:00:31 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASK0VfU006649; Mon, 28 Nov 2011 20:00:31 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201111282000.pASK0VfU006649@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 28 Nov 2011 20:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228093 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:00:32 -0000 Author: gabor Date: Mon Nov 28 20:00:31 2011 New Revision: 228093 URL: http://svn.freebsd.org/changeset/base/228093 Log: - Fix behavior of --null to match GNU grep PR: bin/162906 Submitted by: Jan Beich MFC after: 3 days Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Mon Nov 28 19:53:16 2011 (r228092) +++ head/usr.bin/grep/util.c Mon Nov 28 20:00:31 2011 (r228093) @@ -246,9 +246,9 @@ procfile(const char *fn) printf("%u\n", c); } if (lflag && !qflag && c != 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (Lflag && !qflag && c == 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) printf(getstr(8), fn); @@ -440,13 +440,13 @@ printline(struct str *line, int sep, reg int i, n = 0; if (!hflag) { - if (nullflag == 0) + if (!nullflag) { fputs(line->file, stdout); - else { + ++n; + } else { printf("%s", line->file); putchar(0); } - ++n; } if (nflag) { if (n > 0) From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:04:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AF871065672; Mon, 28 Nov 2011 20:04:26 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ACD88FC18; Mon, 28 Nov 2011 20:04:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASK4Quh006929; Mon, 28 Nov 2011 20:04:26 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASK4Qxg006926; Mon, 28 Nov 2011 20:04:26 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201111282004.pASK4Qxg006926@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 28 Nov 2011 20:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228097 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:04:26 -0000 Author: gabor Date: Mon Nov 28 20:04:26 2011 New Revision: 228097 URL: http://svn.freebsd.org/changeset/base/228097 Log: - Call warnx() instead of errx() if a directory is not readable when using a recursive search. This is the expected behavior instead of aborting. PR: bin/162907 Submitted by: Jan Beich MFC after: 3 days Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Mon Nov 28 20:03:33 2011 (r228096) +++ head/usr.bin/grep/util.c Mon Nov 28 20:04:26 2011 (r228097) @@ -130,7 +130,9 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - errx(2, "%s: %s", p->fts_path, strerror(p->fts_errno)); + notfound = true; + if(!sflag) + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; case FTS_D: /* FALLTHROUGH */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:13:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D8A1065678; Mon, 28 Nov 2011 20:13:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7798FC14; Mon, 28 Nov 2011 20:13:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id A373F46B09; Mon, 28 Nov 2011 15:13:18 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1CE16B96B; Mon, 28 Nov 2011 15:13:18 -0500 (EST) From: John Baldwin To: Lawrence Stewart Date: Mon, 28 Nov 2011 14:20:43 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <8805563E-60F9-4BF4-A292-1A43C4FA368A@cubinlab.ee.unimelb.edu.au> <4ECCA2A1.4020408@freebsd.org> In-Reply-To: <4ECCA2A1.4020408@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111281420.43310.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 28 Nov 2011 15:13:18 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julien Ridoux , Ben Kaduk Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:13:19 -0000 On Wednesday, November 23, 2011 2:37:05 am Lawrence Stewart wrote: > On 11/23/11 17:42, Julien Ridoux wrote: > > > > On 23/11/2011, at 1:00 AM, Lawrence Stewart wrote: > > > >> On 11/23/11 00:30, John Baldwin wrote: > >>> Think of standalone modules that are not built as part of a > >>> kernel (e.g. 3rd party device drivers). In general we should > >>> avoid having structures change size for kernel options, > >>> especially common structures. It just adds lots of pain and > >>> suffering and complexity. We are stuck with it for PAE on i386 > >>> (which causes pain), and for LOCK_PROFILING (but that is > >>> sufficiently rare and expensive it seems to be ok). I think 8 > >>> bytes for bpf packet is not sufficiently expensive to justify the > >>> extra headache. Just always leave the new field in. > >> > >> hmm... Julien almost has a patch finished which accomplishes what > >> my most recent email in this thread describes. Julien, I suggest we > >> get it finished and follow up to this thread with a pointer to the > >> patch for people to look at. If there's still a strong feeling that > >> what it does is going to bring pain we can do away with the new > >> BPF_FFCOUNTER config option and have the bpf header struct just > >> grow by 8 bytes. > >> > >> Stay tuned... > > > > Thanks all for the feedback. With some delay, I have a patch against > > r227871 that implements what Lawrence proposed. You can find it > > here: > > http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/ffclock-bpf-header- r227871.patch > > There are a few nits, but the patch implements what I envisaged, thanks > Julien. > > > I have tested this under a few typical scenario, it works as > > expected but already brings some headaches (hence the long delay > > mentioned above :-)). > > > > I thought a bit more of user cases. I believe many of them call for > > having both feed-forward counter and its conversion in second be > > present in the BPF header. For example, this allows to have absolute > > packet departure/arrival times (as per usual), but also provides the > > opportunity to compute inter-arrival times accurately using the > > difference clock. There are other examples I can think of, and if one > > believe the feed-forward clock approach becomes more popular, such > > usages will be more and more common. > > > > Assuming the BPF header grows by 8 bytes independent of any kernel > > option, I admit that the current implementation is a bit ugly. The > > BPF structure is not nicely packed and looks clunky. Ideally, the > > feed-forward counter should be placed just below the bh_tstamp > > member, but this would require libpcap and all ports depending on it > > to be recompiled after this change. > > Even though it looks a bit gross, we would still add it at the end to > avoid gratuitously breaking binaries. We would then also add some > explicit padding in the struct to soak up the redundant space left in > between it and the second last struct member. If this is not something you expect to MFC, then I would just add it where it makes the most sense. One question I have is if this affects the file format of what tcpdump -w writes out and tcpdump -r reads in? If that is affected then changing this will need much more thought. If not, then I think it should be fixed "right" in 10. If you need to MFC it then you may need to do some gymnatics to preserve the ABI in stable branches, but we prefer to keep HEAD clean so we don't build up layer upon layer of compat hacks. > > What is your favourite option? > > FreeBSD parlance is to ask what colour you would like to paint the > bikeshed ;) > > As I've never experienced the pain John refers to, I'll defer to the > wisdom of others on whether the proposed patch will create pain down the > road. I think it's ok, but if consensus is 8bytes per packet isn't going > to break the bank, I guess we just go for it - but I guess I am cautious > about this route as we can push a lot of packets per second through the > stack. In my limited experience the limit on pushing pps through bpf(4) isn't due to the size of the bpf packet header itself but has more to do with disk I/O transactions, etc. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:16:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95AFD106564A; Mon, 28 Nov 2011 20:16:55 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854948FC17; Mon, 28 Nov 2011 20:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASKGtQk007385; Mon, 28 Nov 2011 20:16:55 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASKGtcf007383; Mon, 28 Nov 2011 20:16:55 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201111282016.pASKGtcf007383@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 28 Nov 2011 20:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228099 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:16:55 -0000 Author: gabor Date: Mon Nov 28 20:16:55 2011 New Revision: 228099 URL: http://svn.freebsd.org/changeset/base/228099 Log: - Create links to the xz and lzma versions even if BSD grep is not the default. Nor GNU nor liblzma in base provides such functionality so it may be useful. MFC after: 3 days Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Mon Nov 28 20:08:19 2011 (r228098) +++ head/usr.bin/grep/Makefile Mon Nov 28 20:16:55 2011 (r228099) @@ -25,13 +25,7 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/xzgrep \ - ${BINDIR}/grep ${BINDIR}/xzegrep \ - ${BINDIR}/grep ${BINDIR}/xzfgrep \ - ${BINDIR}/grep ${BINDIR}/lzgrep \ - ${BINDIR}/grep ${BINDIR}/lzegrep \ - ${BINDIR}/grep ${BINDIR}/lzfgrep + ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ @@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzfgrep + LDADD= -lz -llzma DPADD= ${LIBZ} ${LIBLZMA} From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:22:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4982106566C; Mon, 28 Nov 2011 20:22:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id C8A4E8FC12; Mon, 28 Nov 2011 20:22:28 +0000 (UTC) Received: from delta.delphij.net (c-76-102-50-245.hsd1.ca.comcast.net [76.102.50.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 31B03EC2F; Mon, 28 Nov 2011 12:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1322511748; bh=UOECOnLtWeYfTa9LizaV9GInsXBZ4OyUMgqmbPez7fY=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=vxVq0d1xHfNF/H9/aJr8owfRDlJ19LABu8DZi9OPGz1EAbMjHbWjyuD3aH/aJdjcO Jrbz/8qeoQlkIqFrpgZbPSCob4qJ3/F8F62jv9mik4UeS0GooUPpPO1sYQXV7hxQhG U1zrAja1WzXAR4RpNvs6YTdNT7U0k/KzeePM77ZE= Message-ID: <4ED3ED83.9000001@delphij.net> Date: Mon, 28 Nov 2011 12:22:27 -0800 From: Xin LI Organization: The FreeBSD Project MIME-Version: 1.0 To: Gabor Kovesdan References: <201111282016.pASKGtcf007383@svn.freebsd.org> In-Reply-To: <201111282016.pASKGtcf007383@svn.freebsd.org> OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228099 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:22:29 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 11/28/11 12:16, Gabor Kovesdan wrote: > Author: gabor Date: Mon Nov 28 20:16:55 2011 New Revision: 228099 > URL: http://svn.freebsd.org/changeset/base/228099 > > Log: - Create links to the xz and lzma versions even if BSD grep is > not the default. Nor GNU nor liblzma in base provides such > functionality so it may be useful. This is useful but could be confusing since xzgrep's behavior could be different from zgrep. Another topic would be ObsoleteFiles.inc (or OptionalObsoleteFiles.inc) needs to be updated for this as well. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJO0+2DAAoJEATO+BI/yjfBdY8H/j06mWzfsQYqXLLTA8T2G7kj fo9VqE3FrdZ43kuaSV+IsZOuXGJHA9ttSCuvbByq9VhD3n0Ybr3XyB032B5FuoIg yLGSQe1olsStAvMaYCfMdxEyjptMsxFbOhtGN1p3Whb69HT6Hp58SlEiQ//LUgdW oCAJagbDg3pUsYP/qCehharT2X4EaE2m0aqXc/FPOXUWLOZ/8+nnkbBz8BO0D6Gj pMrVNFt+42py4K+g7pYhfbY6iv6KXhs00M5KCRDQs/aPZmDcqLGf01XAmaJUMgUY qoCVCg9naP26oYNgQHLlUrE72EY9q4zK+s9B502f4PPoxrUxp28n1Hc8lce5Y3U= =XzVB -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:28:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2CF6106566C; Mon, 28 Nov 2011 20:28:24 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDF7B8FC13; Mon, 28 Nov 2011 20:28:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASKSOsH007870; Mon, 28 Nov 2011 20:28:24 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASKSOFw007825; Mon, 28 Nov 2011 20:28:24 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201111282028.pASKSOFw007825@svn.freebsd.org> From: Philip Paeps Date: Mon, 28 Nov 2011 20:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228100 - in stable/9: share/man/man4 sys/amd64/conf sys/conf sys/dev/sfxge sys/dev/sfxge/common sys/modules sys/modules/sfxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:28:24 -0000 Author: philip Date: Mon Nov 28 20:28:23 2011 New Revision: 228100 URL: http://svn.freebsd.org/changeset/base/228100 Log: MFC r227569,227633,227640-227641,227662,227699-227700,228077-228078,228085 Add the sfxge(4) driver providing support for 10Gb Ethernet adapters based on Solarflare SFC9000 family controllers. The driver supports jumbo frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side Scaling (RSS) using MSI-X interrupts. This work was sponsored by Solarflare Communications, Inc. My sincere thanks to Ben Hutchings for doing a lot of the hard work! Sponsored by: Solarflare Communications, Inc. Approved by: re (bz) Added: stable/9/share/man/man4/sfxge.4 - copied, changed from r227569, head/share/man/man4/sfxge.4 stable/9/sys/dev/sfxge/ - copied from r227569, head/sys/dev/sfxge/ stable/9/sys/modules/sfxge/ - copied from r227569, head/sys/modules/sfxge/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/amd64/conf/NOTES stable/9/sys/conf/files.amd64 stable/9/sys/dev/sfxge/common/efsys.h stable/9/sys/dev/sfxge/common/efx.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_bootcfg.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_ev.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_filter.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_impl.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_intr.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_mac.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_mcdi.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_mcdi.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_mon.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_nic.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_nvram.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_phy.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_port.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_regs.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_regs_ef10.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_regs_mcdi.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_regs_pci.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_rx.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_sram.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_tx.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_types.h (contents, props changed) stable/9/sys/dev/sfxge/common/efx_vpd.c (contents, props changed) stable/9/sys/dev/sfxge/common/efx_wol.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_flash.h (contents, props changed) stable/9/sys/dev/sfxge/common/siena_impl.h (contents, props changed) stable/9/sys/dev/sfxge/common/siena_mac.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_mon.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_nic.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_nvram.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_phy.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_sram.c (contents, props changed) stable/9/sys/dev/sfxge/common/siena_vpd.c (contents, props changed) stable/9/sys/dev/sfxge/sfxge.h stable/9/sys/dev/sfxge/sfxge_dma.c stable/9/sys/dev/sfxge/sfxge_intr.c stable/9/sys/dev/sfxge/sfxge_port.c stable/9/sys/dev/sfxge/sfxge_tx.c stable/9/sys/modules/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Nov 28 20:16:55 2011 (r228099) +++ stable/9/share/man/man4/Makefile Mon Nov 28 20:28:23 2011 (r228100) @@ -378,6 +378,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ sf.4 \ + ${_sfxge.4} \ sge.4 \ si.4 \ siba.4 \ @@ -717,6 +718,7 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 +_sfxge.4= sfxge.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" Copied and modified: stable/9/share/man/man4/sfxge.4 (from r227569, head/share/man/man4/sfxge.4) ============================================================================== --- head/share/man/man4/sfxge.4 Wed Nov 16 17:11:13 2011 (r227569, copy source) +++ stable/9/share/man/man4/sfxge.4 Mon Nov 28 20:28:23 2011 (r228100) @@ -48,25 +48,29 @@ sfxge_load="YES" The .Nm driver provides support for 10Gb Ethernet adapters based on -Solarflare SFC9000 family controllers. The driver supports jumbo +Solarflare SFC9000 family controllers. +The driver supports jumbo frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side Scaling (RSS) using MSI-X interrupts. .Pp The driver allocates 1 receive queue, transmit queue, event queue and -IRQ per CPU up to a maximum of 64. IRQ affinities should be spread -out using +IRQ per CPU up to a maximum of 64. +IRQ affinities should be spread out using .Xr cpuset 8 . Interrupt moderation may be controlled through the sysctl -dev.sfxge.\fIindex\fR.int_mod (units are microseconds). +.Va dev.sfxge.%d.int_mod +(units are microseconds). .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Pp A large number of MAC, PHY and data path statistics are available -under the sysctl dev.sfxge.\fIindex\fR.stats. The adapter's VPD +under the sysctl +.Va dev.sfxge.%d.stats . +The adapter's VPD fields including its serial number are available under the sysctl -dev.sfxge.\fIindex\fR.vpd. +.Va dev.sfxge.%d.vpd . .Sh HARDWARE The .Nm Modified: stable/9/sys/amd64/conf/NOTES ============================================================================== --- stable/9/sys/amd64/conf/NOTES Mon Nov 28 20:16:55 2011 (r228099) +++ stable/9/sys/amd64/conf/NOTES Mon Nov 28 20:28:23 2011 (r228100) @@ -294,6 +294,7 @@ options DRM_DEBUG # Include debug print # Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking +# sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -307,6 +308,7 @@ device iwn device mwl device nfe device nve +device sfxge device wpi # IEEE 802.11 adapter firmware modules Modified: stable/9/sys/conf/files.amd64 ============================================================================== --- stable/9/sys/conf/files.amd64 Mon Nov 28 20:16:55 2011 (r228099) +++ stable/9/sys/conf/files.amd64 Mon Nov 28 20:28:23 2011 (r228100) @@ -214,6 +214,37 @@ dev/qlxgb/qla_ioctl.c optional qlxgb pc dev/qlxgb/qla_isr.c optional qlxgb pci dev/qlxgb/qla_misc.c optional qlxgb pci dev/qlxgb/qla_os.c optional qlxgb pci +dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci +dev/sfxge/common/efx_ev.c optional sfxge inet pci +dev/sfxge/common/efx_filter.c optional sfxge inet pci +dev/sfxge/common/efx_intr.c optional sfxge inet pci +dev/sfxge/common/efx_mac.c optional sfxge inet pci +dev/sfxge/common/efx_mcdi.c optional sfxge inet pci +dev/sfxge/common/efx_mon.c optional sfxge inet pci +dev/sfxge/common/efx_nic.c optional sfxge inet pci +dev/sfxge/common/efx_nvram.c optional sfxge inet pci +dev/sfxge/common/efx_phy.c optional sfxge inet pci +dev/sfxge/common/efx_port.c optional sfxge inet pci +dev/sfxge/common/efx_rx.c optional sfxge inet pci +dev/sfxge/common/efx_sram.c optional sfxge inet pci +dev/sfxge/common/efx_tx.c optional sfxge inet pci +dev/sfxge/common/efx_vpd.c optional sfxge inet pci +dev/sfxge/common/efx_wol.c optional sfxge inet pci +dev/sfxge/common/siena_mac.c optional sfxge inet pci +dev/sfxge/common/siena_mon.c optional sfxge inet pci +dev/sfxge/common/siena_nic.c optional sfxge inet pci +dev/sfxge/common/siena_nvram.c optional sfxge inet pci +dev/sfxge/common/siena_phy.c optional sfxge inet pci +dev/sfxge/common/siena_sram.c optional sfxge inet pci +dev/sfxge/common/siena_vpd.c optional sfxge inet pci +dev/sfxge/sfxge.c optional sfxge inet pci +dev/sfxge/sfxge_dma.c optional sfxge inet pci +dev/sfxge/sfxge_ev.c optional sfxge inet pci +dev/sfxge/sfxge_intr.c optional sfxge inet pci +dev/sfxge/sfxge_mcdi.c optional sfxge inet pci +dev/sfxge/sfxge_port.c optional sfxge inet pci +dev/sfxge/sfxge_rx.c optional sfxge inet pci +dev/sfxge/sfxge_tx.c optional sfxge inet pci dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/sio/sio_pccard.c optional sio pccard Modified: stable/9/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efsys.h Mon Nov 28 20:28:23 2011 (r228100) @@ -25,14 +25,13 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFSYS_H #define _SYS_EFSYS_H -#include -__FBSDID("$FreeBSD$"); - #ifdef __cplusplus extern "C" { #endif @@ -97,10 +96,11 @@ extern "C" { MALLOC_DECLARE(M_SFXGE); /* Machine dependend prefetch wrappers */ -#if defined(__i386) || defined(__amd64) +#if defined(__i386__) || defined(__amd64__) static __inline void prefetch_read_many(void *addr) { + __asm__( "prefetcht0 (%0)" : @@ -110,11 +110,44 @@ prefetch_read_many(void *addr) static __inline void prefetch_read_once(void *addr) { + __asm__( "prefetchnta (%0)" : : "r" (addr)); } +#elif defined(__sparc64__) +static __inline void +prefetch_read_many(void *addr) +{ + + __asm__( + "prefetch [%0], 0" + : + : "r" (addr)); +} + +static __inline void +prefetch_read_once(void *addr) +{ + + __asm__( + "prefetch [%0], 1" + : + : "r" (addr)); +} +#else +static __inline void +prefetch_read_many(void *addr) +{ + +} + +static __inline void +prefetch_read_once(void *addr) +{ + +} #endif #if defined(__i386__) || defined(__amd64__) Modified: stable/9/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_H Modified: stable/9/sys/dev/sfxge/common/efx_bootcfg.c ============================================================================== --- head/sys/dev/sfxge/common/efx_bootcfg.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- head/sys/dev/sfxge/common/efx_ev.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_ev.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_filter.c ============================================================================== --- head/sys/dev/sfxge/common/efx_filter.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_filter.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_impl.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_IMPL_H Modified: stable/9/sys/dev/sfxge/common/efx_intr.c ============================================================================== --- head/sys/dev/sfxge/common/efx_intr.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_intr.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_mac.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mac.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_mac.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_mcdi.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_MCDI_H Modified: stable/9/sys/dev/sfxge/common/efx_mon.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mon.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_mon.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nic.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_nic.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nvram.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_nvram.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_phy.c ============================================================================== --- head/sys/dev/sfxge/common/efx_phy.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_phy.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_port.c ============================================================================== --- head/sys/dev/sfxge/common/efx_port.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_port.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_regs.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_regs.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_REGS_H Modified: stable/9/sys/dev/sfxge/common/efx_regs_ef10.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_ef10.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_regs_ef10.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_EF10_REGS_H Modified: stable/9/sys/dev/sfxge/common/efx_regs_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,10 +21,10 @@ * 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. + * + * $FreeBSD$ */ -/*! \cidoxg_firmware_mc_cmd */ - #ifndef _SIENA_MC_DRIVER_PCOL_H #define _SIENA_MC_DRIVER_PCOL_H @@ -2783,4 +2783,3 @@ #define MC_CMD_TCM_TXQ_INIT_OUT_LEN 0 #endif /* _SIENA_MC_DRIVER_PCOL_H */ -/*! \cidoxg_end */ Modified: stable/9/sys/dev/sfxge/common/efx_regs_pci.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_pci.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_regs_pci.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_REGS_PCI_H Modified: stable/9/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_rx.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_rx.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_sram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_sram.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_sram.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_tx.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_types.h ============================================================================== --- head/sys/dev/sfxge/common/efx_types.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_types.h Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,8 @@ * SUCH DAMAGE. * * Ackowledgement to Fen Systems Ltd. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_TYPES_H Modified: stable/9/sys/dev/sfxge/common/efx_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/efx_vpd.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_vpd.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/efx_wol.c ============================================================================== --- head/sys/dev/sfxge/common/efx_wol.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/efx_wol.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/siena_flash.h ============================================================================== --- head/sys/dev/sfxge/common/siena_flash.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_flash.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,9 +21,10 @@ * 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. + * + * $FreeBSD$ */ - #ifndef _SYS_SIENA_FLASH_H #define _SYS_SIENA_FLASH_H Modified: stable/9/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_impl.h Mon Nov 28 20:28:23 2011 (r228100) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_SIENA_IMPL_H Modified: stable/9/sys/dev/sfxge/common/siena_mac.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mac.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_mac.c Mon Nov 28 20:28:23 2011 (r228100) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: stable/9/sys/dev/sfxge/common/siena_mon.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mon.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_mon.c Mon Nov 28 20:28:23 2011 (r228100) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: stable/9/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nic.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_nic.c Mon Nov 28 20:28:23 2011 (r228100) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: stable/9/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nvram.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_nvram.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/common/siena_phy.c ============================================================================== --- head/sys/dev/sfxge/common/siena_phy.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_phy.c Mon Nov 28 20:28:23 2011 (r228100) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: stable/9/sys/dev/sfxge/common/siena_sram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_sram.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_sram.c Mon Nov 28 20:28:23 2011 (r228100) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: stable/9/sys/dev/sfxge/common/siena_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/siena_vpd.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/common/siena_vpd.c Mon Nov 28 20:28:23 2011 (r228100) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: stable/9/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/sfxge.h Mon Nov 28 20:28:23 2011 (r228100) @@ -144,7 +144,6 @@ struct sfxge_intr { int n_alloc; int type; efsys_mem_t status; - uint64_t mask; uint32_t zero_count; }; Modified: stable/9/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- head/sys/dev/sfxge/sfxge_dma.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/sfxge_dma.c Mon Nov 28 20:28:23 2011 (r228100) @@ -134,8 +134,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, /* Create the child DMA tag. */ if (bus_dma_tag_create(sc->parent_dma_tag, PAGE_SIZE, 0, - 0x3FFFFFFFFFFFULL, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, - NULL, NULL, &esmp->esm_tag) != 0) { + MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, + NULL, len, 1, len, 0, NULL, NULL, &esmp->esm_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); return (ENOMEM); } Modified: stable/9/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- head/sys/dev/sfxge/sfxge_intr.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/sfxge_intr.c Mon Nov 28 20:28:23 2011 (r228100) @@ -65,15 +65,9 @@ sfxge_intr_line_filter(void *arg) KASSERT(intr->type == EFX_INTR_LINE, ("intr->type != EFX_INTR_LINE")); - if (intr->state != SFXGE_INTR_STARTED && - intr->state != SFXGE_INTR_TESTING) + if (intr->state != SFXGE_INTR_STARTED) return FILTER_STRAY; - if (intr->state == SFXGE_INTR_TESTING) { - intr->mask |= 1; /* only one interrupt */ - return FILTER_HANDLED; - } - (void)efx_intr_status_line(enp, &fatal, &qmask); if (fatal) { @@ -137,21 +131,9 @@ sfxge_intr_message(void *arg) KASSERT(intr->type == EFX_INTR_MESSAGE, ("intr->type != EFX_INTR_MESSAGE")); - if (intr->state != SFXGE_INTR_STARTED && - intr->state != SFXGE_INTR_TESTING) + if (intr->state != SFXGE_INTR_STARTED) return; - if (intr->state == SFXGE_INTR_TESTING) { - uint64_t mask; - - do { - mask = intr->mask; - } while (atomic_cmpset_long(&intr->mask, mask, - mask | (1 << index)) == 0); - - return; - } - (void)efx_intr_status_message(enp, index, &fatal); if (fatal) { @@ -447,7 +429,6 @@ sfxge_intr_stop(struct sfxge_softc *sc) intr->state = SFXGE_INTR_INITIALIZED; /* Disable interrupts at the NIC */ - intr->mask = 0; efx_intr_disable(sc->enp); /* Disable interrupts at the bus */ @@ -480,13 +461,11 @@ sfxge_intr_start(struct sfxge_softc *sc) if ((rc = sfxge_intr_bus_enable(sc)) != 0) goto fail; - intr->state = SFXGE_INTR_TESTING; + intr->state = SFXGE_INTR_STARTED; /* Enable interrupts at the NIC */ efx_intr_enable(sc->enp); - intr->state = SFXGE_INTR_STARTED; - return (0); fail: Modified: stable/9/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/sfxge_port.c Mon Nov 28 20:28:23 2011 (r228100) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -219,14 +220,14 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE #endif /* SFXGE_HAVE_PAUSE_MEDIAOPTS */ -static const int sfxge_link_speed_kbit[EFX_LINK_NMODES] = { - [EFX_LINK_10HDX] = 10000, - [EFX_LINK_10FDX] = 10000, - [EFX_LINK_100HDX] = 100000, - [EFX_LINK_100FDX] = 100000, - [EFX_LINK_1000HDX] = 1000000, - [EFX_LINK_1000FDX] = 1000000, - [EFX_LINK_10000FDX] = 10000000, +static const u_long sfxge_link_baudrate[EFX_LINK_NMODES] = { + [EFX_LINK_10HDX] = IF_Mbps(10), + [EFX_LINK_10FDX] = IF_Mbps(10), + [EFX_LINK_100HDX] = IF_Mbps(100), + [EFX_LINK_100FDX] = IF_Mbps(100), + [EFX_LINK_1000HDX] = IF_Gbps(1), + [EFX_LINK_1000FDX] = IF_Gbps(1), + [EFX_LINK_10000FDX] = MIN(IF_Gbps(10ULL), ULONG_MAX), }; void @@ -245,7 +246,7 @@ sfxge_mac_link_update(struct sfxge_softc /* Push link state update to the OS */ link_state = (port->link_mode != EFX_LINK_DOWN ? LINK_STATE_UP : LINK_STATE_DOWN); - sc->ifnet->if_baudrate = sfxge_link_speed_kbit[port->link_mode]; + sc->ifnet->if_baudrate = sfxge_link_baudrate[port->link_mode]; if_link_state_change(sc->ifnet, link_state); } Modified: stable/9/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Wed Nov 16 17:11:13 2011 (r227569) +++ stable/9/sys/dev/sfxge/sfxge_tx.c Mon Nov 28 20:28:23 2011 (r228100) @@ -135,7 +135,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * /* Acquire the put list. */ putp = &stdp->std_put; - put = atomic_readandclear_long(putp); + put = atomic_readandclear_ptr(putp); mbuf = (void *)put; if (mbuf == NULL) @@ -484,7 +484,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, return ENOBUFS; mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; - } while (atomic_cmpset_long(putp, old, new) == 0); + } while (atomic_cmpset_ptr(putp, old, new) == 0); } return (0); @@ -1323,9 +1323,9 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u &txq->buf_base_id); /* Create a DMA tag for packet mappings. */ - if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, 0x3FFFFFFFFFFFULL, - BUS_SPACE_MAXADDR, NULL, NULL, 0x11000, - SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, + if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, + MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, + NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, &txq->packet_dma_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); rc = ENOMEM; Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Mon Nov 28 20:16:55 2011 (r228099) +++ stable/9/sys/modules/Makefile Mon Nov 28 20:28:23 2011 (r228100) @@ -275,6 +275,7 @@ SUBDIR= ${_3dfx} \ sem \ send \ sf \ + ${_sfxge} \ sge \ siba_bwn \ siftr \ @@ -627,6 +628,7 @@ _rdma= rdma _s3= s3 _safe= safe _scsi_low= scsi_low +_sfxge= sfxge _smbfs= smbfs _sound= sound _speaker= speaker From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:40:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58982106566B; Mon, 28 Nov 2011 20:40:02 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 075288FC08; Mon, 28 Nov 2011 20:40:01 +0000 (UTC) Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208]) by gw02.mail.saunalahti.fi (Postfix) with SMTP id B15831395DD; Mon, 28 Nov 2011 22:23:07 +0200 (EET) Date: Mon, 28 Nov 2011 22:23:07 +0200 From: Jaakko Heinonen To: Gleb Smirnoff Message-ID: <20111128202307.GA4064@jh> References: <201111281444.pASEixdO095604@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:40:02 -0000 On 2011-11-28, Bjoern A. Zeeb wrote: > > static void > > if_clone_free(struct if_clone *ifc) > > { > > - for (int bytoff = 0; bytoff < ifc->ifc_bmlen; bytoff++) { > > - KASSERT(ifc->ifc_units[bytoff] == 0x00, > > - ("ifc_units[%d] is not empty", bytoff)); > > - } > > > > KASSERT(LIST_EMPTY(&ifc->ifc_iflist), > > ("%s: ifc_iflist not empty", __func__)); > > > > IF_CLONE_LOCK_DESTROY(ifc); > > - free(ifc->ifc_units, M_CLONE); > > + delete_unrhdr(ifc->ifc_unrhdr); > > } delete_unrhdr() KASSERTs that all allocations has been freed. Thus if the leak below has occurred, the result will be a panic at this point with INVARIANTS enabled kernel. If INVARIANTS is disabled, a memory leak is possible. > > + snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, *unit); > > + if (ifunit(name) != NULL) { > > + if (wildcard) > > + goto retry; /* XXXGL: yep, it's a unit leak */ > > + else > > + return (EEXIST); -- Jaakko From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:43:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D901106566B; Mon, 28 Nov 2011 20:43:51 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493918FC0A; Mon, 28 Nov 2011 20:43:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASKhpZF008467; Mon, 28 Nov 2011 20:43:51 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASKhof4008422; Mon, 28 Nov 2011 20:43:50 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <201111282043.pASKhof4008422@svn.freebsd.org> From: Philip Paeps Date: Mon, 28 Nov 2011 20:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228101 - in releng/9.0: share/man/man4 sys/amd64/conf sys/conf sys/dev/sfxge sys/dev/sfxge/common sys/modules sys/modules/sfxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:43:51 -0000 Author: philip Date: Mon Nov 28 20:43:50 2011 New Revision: 228101 URL: http://svn.freebsd.org/changeset/base/228101 Log: Add the sfxge(4) device driver, providing support for 10Gb Ethernet adapters based on Solarflare SFC9000 family controllers. The driver supports jumbo frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side Scaling (RSS) using MSI-X interrupts. This work was sponsored by Solarflare Communications, Inc. My sincere thanks to Ben Hutchings for doing a lot of the hard work! Sponsored by: Solarflare Communications, Inc. Approved by: re (bz) Added: releng/9.0/share/man/man4/sfxge.4 - copied, changed from r227569, head/share/man/man4/sfxge.4 releng/9.0/sys/dev/sfxge/ - copied from r227569, head/sys/dev/sfxge/ releng/9.0/sys/modules/sfxge/ - copied from r227569, head/sys/modules/sfxge/ Modified: releng/9.0/share/man/man4/Makefile releng/9.0/sys/amd64/conf/NOTES releng/9.0/sys/conf/files.amd64 releng/9.0/sys/dev/sfxge/common/efsys.h releng/9.0/sys/dev/sfxge/common/efx.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_bootcfg.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_ev.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_filter.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_impl.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_intr.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_mac.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_mcdi.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_mcdi.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_mon.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_nic.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_nvram.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_phy.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_port.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_regs.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_regs_ef10.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_regs_mcdi.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_regs_pci.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_rx.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_sram.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_tx.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_types.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_vpd.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/efx_wol.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_flash.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_impl.h (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_mac.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_mon.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_nic.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_nvram.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_phy.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_sram.c (contents, props changed) releng/9.0/sys/dev/sfxge/common/siena_vpd.c (contents, props changed) releng/9.0/sys/dev/sfxge/sfxge.h releng/9.0/sys/dev/sfxge/sfxge_dma.c releng/9.0/sys/dev/sfxge/sfxge_intr.c releng/9.0/sys/dev/sfxge/sfxge_port.c releng/9.0/sys/dev/sfxge/sfxge_tx.c releng/9.0/sys/modules/Makefile Directory Properties: releng/9.0/share/man/man4/ (props changed) releng/9.0/sys/ (props changed) releng/9.0/sys/conf/ (props changed) Modified: releng/9.0/share/man/man4/Makefile ============================================================================== --- releng/9.0/share/man/man4/Makefile Mon Nov 28 20:28:23 2011 (r228100) +++ releng/9.0/share/man/man4/Makefile Mon Nov 28 20:43:50 2011 (r228101) @@ -377,6 +377,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ sf.4 \ + ${_sfxge.4} \ sge.4 \ si.4 \ siba.4 \ @@ -716,6 +717,7 @@ MLINKS+=lindev.4 full.4 .if ${MACHINE_CPUARCH} == "amd64" _qlxgb.4= qlxgb.4 +_sfxge.4= sfxge.4 .endif .if ${MACHINE_CPUARCH} == "powerpc" Copied and modified: releng/9.0/share/man/man4/sfxge.4 (from r227569, head/share/man/man4/sfxge.4) ============================================================================== --- head/share/man/man4/sfxge.4 Wed Nov 16 17:11:13 2011 (r227569, copy source) +++ releng/9.0/share/man/man4/sfxge.4 Mon Nov 28 20:43:50 2011 (r228101) @@ -48,25 +48,29 @@ sfxge_load="YES" The .Nm driver provides support for 10Gb Ethernet adapters based on -Solarflare SFC9000 family controllers. The driver supports jumbo +Solarflare SFC9000 family controllers. +The driver supports jumbo frames, transmit/receive checksum offload, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO, and Receive Side Scaling (RSS) using MSI-X interrupts. .Pp The driver allocates 1 receive queue, transmit queue, event queue and -IRQ per CPU up to a maximum of 64. IRQ affinities should be spread -out using +IRQ per CPU up to a maximum of 64. +IRQ affinities should be spread out using .Xr cpuset 8 . Interrupt moderation may be controlled through the sysctl -dev.sfxge.\fIindex\fR.int_mod (units are microseconds). +.Va dev.sfxge.%d.int_mod +(units are microseconds). .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Pp A large number of MAC, PHY and data path statistics are available -under the sysctl dev.sfxge.\fIindex\fR.stats. The adapter's VPD +under the sysctl +.Va dev.sfxge.%d.stats . +The adapter's VPD fields including its serial number are available under the sysctl -dev.sfxge.\fIindex\fR.vpd. +.Va dev.sfxge.%d.vpd . .Sh HARDWARE The .Nm Modified: releng/9.0/sys/amd64/conf/NOTES ============================================================================== --- releng/9.0/sys/amd64/conf/NOTES Mon Nov 28 20:28:23 2011 (r228100) +++ releng/9.0/sys/amd64/conf/NOTES Mon Nov 28 20:43:50 2011 (r228101) @@ -294,6 +294,7 @@ options DRM_DEBUG # Include debug print # Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking +# sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -307,6 +308,7 @@ device iwn device mwl device nfe device nve +device sfxge device wpi # IEEE 802.11 adapter firmware modules Modified: releng/9.0/sys/conf/files.amd64 ============================================================================== --- releng/9.0/sys/conf/files.amd64 Mon Nov 28 20:28:23 2011 (r228100) +++ releng/9.0/sys/conf/files.amd64 Mon Nov 28 20:43:50 2011 (r228101) @@ -214,6 +214,37 @@ dev/qlxgb/qla_ioctl.c optional qlxgb pc dev/qlxgb/qla_isr.c optional qlxgb pci dev/qlxgb/qla_misc.c optional qlxgb pci dev/qlxgb/qla_os.c optional qlxgb pci +dev/sfxge/common/efx_bootcfg.c optional sfxge inet pci +dev/sfxge/common/efx_ev.c optional sfxge inet pci +dev/sfxge/common/efx_filter.c optional sfxge inet pci +dev/sfxge/common/efx_intr.c optional sfxge inet pci +dev/sfxge/common/efx_mac.c optional sfxge inet pci +dev/sfxge/common/efx_mcdi.c optional sfxge inet pci +dev/sfxge/common/efx_mon.c optional sfxge inet pci +dev/sfxge/common/efx_nic.c optional sfxge inet pci +dev/sfxge/common/efx_nvram.c optional sfxge inet pci +dev/sfxge/common/efx_phy.c optional sfxge inet pci +dev/sfxge/common/efx_port.c optional sfxge inet pci +dev/sfxge/common/efx_rx.c optional sfxge inet pci +dev/sfxge/common/efx_sram.c optional sfxge inet pci +dev/sfxge/common/efx_tx.c optional sfxge inet pci +dev/sfxge/common/efx_vpd.c optional sfxge inet pci +dev/sfxge/common/efx_wol.c optional sfxge inet pci +dev/sfxge/common/siena_mac.c optional sfxge inet pci +dev/sfxge/common/siena_mon.c optional sfxge inet pci +dev/sfxge/common/siena_nic.c optional sfxge inet pci +dev/sfxge/common/siena_nvram.c optional sfxge inet pci +dev/sfxge/common/siena_phy.c optional sfxge inet pci +dev/sfxge/common/siena_sram.c optional sfxge inet pci +dev/sfxge/common/siena_vpd.c optional sfxge inet pci +dev/sfxge/sfxge.c optional sfxge inet pci +dev/sfxge/sfxge_dma.c optional sfxge inet pci +dev/sfxge/sfxge_ev.c optional sfxge inet pci +dev/sfxge/sfxge_intr.c optional sfxge inet pci +dev/sfxge/sfxge_mcdi.c optional sfxge inet pci +dev/sfxge/sfxge_port.c optional sfxge inet pci +dev/sfxge/sfxge_rx.c optional sfxge inet pci +dev/sfxge/sfxge_tx.c optional sfxge inet pci dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/sio/sio_pccard.c optional sio pccard Modified: releng/9.0/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efsys.h Mon Nov 28 20:43:50 2011 (r228101) @@ -25,14 +25,13 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFSYS_H #define _SYS_EFSYS_H -#include -__FBSDID("$FreeBSD$"); - #ifdef __cplusplus extern "C" { #endif @@ -97,10 +96,11 @@ extern "C" { MALLOC_DECLARE(M_SFXGE); /* Machine dependend prefetch wrappers */ -#if defined(__i386) || defined(__amd64) +#if defined(__i386__) || defined(__amd64__) static __inline void prefetch_read_many(void *addr) { + __asm__( "prefetcht0 (%0)" : @@ -110,11 +110,44 @@ prefetch_read_many(void *addr) static __inline void prefetch_read_once(void *addr) { + __asm__( "prefetchnta (%0)" : : "r" (addr)); } +#elif defined(__sparc64__) +static __inline void +prefetch_read_many(void *addr) +{ + + __asm__( + "prefetch [%0], 0" + : + : "r" (addr)); +} + +static __inline void +prefetch_read_once(void *addr) +{ + + __asm__( + "prefetch [%0], 1" + : + : "r" (addr)); +} +#else +static __inline void +prefetch_read_many(void *addr) +{ + +} + +static __inline void +prefetch_read_once(void *addr) +{ + +} #endif #if defined(__i386__) || defined(__amd64__) Modified: releng/9.0/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_H Modified: releng/9.0/sys/dev/sfxge/common/efx_bootcfg.c ============================================================================== --- head/sys/dev/sfxge/common/efx_bootcfg.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_bootcfg.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- head/sys/dev/sfxge/common/efx_ev.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_ev.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_filter.c ============================================================================== --- head/sys/dev/sfxge/common/efx_filter.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_filter.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_impl.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_IMPL_H Modified: releng/9.0/sys/dev/sfxge/common/efx_intr.c ============================================================================== --- head/sys/dev/sfxge/common/efx_intr.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_intr.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_mac.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mac.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_mac.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_mcdi.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_MCDI_H Modified: releng/9.0/sys/dev/sfxge/common/efx_mon.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mon.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_mon.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nic.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_nic.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nvram.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_nvram.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_phy.c ============================================================================== --- head/sys/dev/sfxge/common/efx_phy.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_phy.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_port.c ============================================================================== --- head/sys/dev/sfxge/common/efx_port.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_port.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_regs.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_regs.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_REGS_H Modified: releng/9.0/sys/dev/sfxge/common/efx_regs_ef10.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_ef10.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_regs_ef10.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_EF10_REGS_H Modified: releng/9.0/sys/dev/sfxge/common/efx_regs_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,10 +21,10 @@ * 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. + * + * $FreeBSD$ */ -/*! \cidoxg_firmware_mc_cmd */ - #ifndef _SIENA_MC_DRIVER_PCOL_H #define _SIENA_MC_DRIVER_PCOL_H @@ -2783,4 +2783,3 @@ #define MC_CMD_TCM_TXQ_INIT_OUT_LEN 0 #endif /* _SIENA_MC_DRIVER_PCOL_H */ -/*! \cidoxg_end */ Modified: releng/9.0/sys/dev/sfxge/common/efx_regs_pci.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_pci.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_regs_pci.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_REGS_PCI_H Modified: releng/9.0/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_rx.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_rx.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_sram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_sram.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_sram.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- head/sys/dev/sfxge/common/efx_tx.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_tx.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_types.h ============================================================================== --- head/sys/dev/sfxge/common/efx_types.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_types.h Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,8 @@ * SUCH DAMAGE. * * Ackowledgement to Fen Systems Ltd. + * + * $FreeBSD$ */ #ifndef _SYS_EFX_TYPES_H Modified: releng/9.0/sys/dev/sfxge/common/efx_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/efx_vpd.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_vpd.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/efx_wol.c ============================================================================== --- head/sys/dev/sfxge/common/efx_wol.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/efx_wol.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_flash.h ============================================================================== --- head/sys/dev/sfxge/common/siena_flash.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_flash.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,9 +21,10 @@ * 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. + * + * $FreeBSD$ */ - #ifndef _SYS_SIENA_FLASH_H #define _SYS_SIENA_FLASH_H Modified: releng/9.0/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_impl.h Mon Nov 28 20:43:50 2011 (r228101) @@ -21,6 +21,8 @@ * 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. + * + * $FreeBSD$ */ #ifndef _SYS_SIENA_IMPL_H Modified: releng/9.0/sys/dev/sfxge/common/siena_mac.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mac.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_mac.c Mon Nov 28 20:43:50 2011 (r228101) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_mon.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mon.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_mon.c Mon Nov 28 20:43:50 2011 (r228101) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nic.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_nic.c Mon Nov 28 20:43:50 2011 (r228101) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nvram.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_nvram.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_phy.c ============================================================================== --- head/sys/dev/sfxge/common/siena_phy.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_phy.c Mon Nov 28 20:43:50 2011 (r228101) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_sram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_sram.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_sram.c Mon Nov 28 20:43:50 2011 (r228101) @@ -22,6 +22,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_impl.h" Modified: releng/9.0/sys/dev/sfxge/common/siena_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/siena_vpd.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/common/siena_vpd.c Mon Nov 28 20:43:50 2011 (r228101) @@ -23,6 +23,9 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "efsys.h" #include "efx.h" #include "efx_types.h" Modified: releng/9.0/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/sfxge.h Mon Nov 28 20:43:50 2011 (r228101) @@ -144,7 +144,6 @@ struct sfxge_intr { int n_alloc; int type; efsys_mem_t status; - uint64_t mask; uint32_t zero_count; }; Modified: releng/9.0/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- head/sys/dev/sfxge/sfxge_dma.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/sfxge_dma.c Mon Nov 28 20:43:50 2011 (r228101) @@ -134,8 +134,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, /* Create the child DMA tag. */ if (bus_dma_tag_create(sc->parent_dma_tag, PAGE_SIZE, 0, - 0x3FFFFFFFFFFFULL, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, - NULL, NULL, &esmp->esm_tag) != 0) { + MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, + NULL, len, 1, len, 0, NULL, NULL, &esmp->esm_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); return (ENOMEM); } Modified: releng/9.0/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- head/sys/dev/sfxge/sfxge_intr.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/sfxge_intr.c Mon Nov 28 20:43:50 2011 (r228101) @@ -65,15 +65,9 @@ sfxge_intr_line_filter(void *arg) KASSERT(intr->type == EFX_INTR_LINE, ("intr->type != EFX_INTR_LINE")); - if (intr->state != SFXGE_INTR_STARTED && - intr->state != SFXGE_INTR_TESTING) + if (intr->state != SFXGE_INTR_STARTED) return FILTER_STRAY; - if (intr->state == SFXGE_INTR_TESTING) { - intr->mask |= 1; /* only one interrupt */ - return FILTER_HANDLED; - } - (void)efx_intr_status_line(enp, &fatal, &qmask); if (fatal) { @@ -137,21 +131,9 @@ sfxge_intr_message(void *arg) KASSERT(intr->type == EFX_INTR_MESSAGE, ("intr->type != EFX_INTR_MESSAGE")); - if (intr->state != SFXGE_INTR_STARTED && - intr->state != SFXGE_INTR_TESTING) + if (intr->state != SFXGE_INTR_STARTED) return; - if (intr->state == SFXGE_INTR_TESTING) { - uint64_t mask; - - do { - mask = intr->mask; - } while (atomic_cmpset_long(&intr->mask, mask, - mask | (1 << index)) == 0); - - return; - } - (void)efx_intr_status_message(enp, index, &fatal); if (fatal) { @@ -447,7 +429,6 @@ sfxge_intr_stop(struct sfxge_softc *sc) intr->state = SFXGE_INTR_INITIALIZED; /* Disable interrupts at the NIC */ - intr->mask = 0; efx_intr_disable(sc->enp); /* Disable interrupts at the bus */ @@ -480,13 +461,11 @@ sfxge_intr_start(struct sfxge_softc *sc) if ((rc = sfxge_intr_bus_enable(sc)) != 0) goto fail; - intr->state = SFXGE_INTR_TESTING; + intr->state = SFXGE_INTR_STARTED; /* Enable interrupts at the NIC */ efx_intr_enable(sc->enp); - intr->state = SFXGE_INTR_STARTED; - return (0); fail: Modified: releng/9.0/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/sfxge_port.c Mon Nov 28 20:43:50 2011 (r228101) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -219,14 +220,14 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE #endif /* SFXGE_HAVE_PAUSE_MEDIAOPTS */ -static const int sfxge_link_speed_kbit[EFX_LINK_NMODES] = { - [EFX_LINK_10HDX] = 10000, - [EFX_LINK_10FDX] = 10000, - [EFX_LINK_100HDX] = 100000, - [EFX_LINK_100FDX] = 100000, - [EFX_LINK_1000HDX] = 1000000, - [EFX_LINK_1000FDX] = 1000000, - [EFX_LINK_10000FDX] = 10000000, +static const u_long sfxge_link_baudrate[EFX_LINK_NMODES] = { + [EFX_LINK_10HDX] = IF_Mbps(10), + [EFX_LINK_10FDX] = IF_Mbps(10), + [EFX_LINK_100HDX] = IF_Mbps(100), + [EFX_LINK_100FDX] = IF_Mbps(100), + [EFX_LINK_1000HDX] = IF_Gbps(1), + [EFX_LINK_1000FDX] = IF_Gbps(1), + [EFX_LINK_10000FDX] = MIN(IF_Gbps(10ULL), ULONG_MAX), }; void @@ -245,7 +246,7 @@ sfxge_mac_link_update(struct sfxge_softc /* Push link state update to the OS */ link_state = (port->link_mode != EFX_LINK_DOWN ? LINK_STATE_UP : LINK_STATE_DOWN); - sc->ifnet->if_baudrate = sfxge_link_speed_kbit[port->link_mode]; + sc->ifnet->if_baudrate = sfxge_link_baudrate[port->link_mode]; if_link_state_change(sc->ifnet, link_state); } Modified: releng/9.0/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Wed Nov 16 17:11:13 2011 (r227569) +++ releng/9.0/sys/dev/sfxge/sfxge_tx.c Mon Nov 28 20:43:50 2011 (r228101) @@ -135,7 +135,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * /* Acquire the put list. */ putp = &stdp->std_put; - put = atomic_readandclear_long(putp); + put = atomic_readandclear_ptr(putp); mbuf = (void *)put; if (mbuf == NULL) @@ -484,7 +484,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, return ENOBUFS; mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; - } while (atomic_cmpset_long(putp, old, new) == 0); + } while (atomic_cmpset_ptr(putp, old, new) == 0); } return (0); @@ -1323,9 +1323,9 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u &txq->buf_base_id); /* Create a DMA tag for packet mappings. */ - if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, 0x3FFFFFFFFFFFULL, - BUS_SPACE_MAXADDR, NULL, NULL, 0x11000, - SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, + if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, + MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, + NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL, &txq->packet_dma_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); rc = ENOMEM; Modified: releng/9.0/sys/modules/Makefile ============================================================================== --- releng/9.0/sys/modules/Makefile Mon Nov 28 20:28:23 2011 (r228100) +++ releng/9.0/sys/modules/Makefile Mon Nov 28 20:43:50 2011 (r228101) @@ -275,6 +275,7 @@ SUBDIR= ${_3dfx} \ sem \ send \ sf \ + ${_sfxge} \ sge \ siba_bwn \ siftr \ @@ -627,6 +628,7 @@ _rdma= rdma _s3= s3 _safe= safe _scsi_low= scsi_low +_sfxge= sfxge _smbfs= smbfs _sound= sound _speaker= speaker From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 20:48:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77A34106564A; Mon, 28 Nov 2011 20:48:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 672BD8FC1B; Mon, 28 Nov 2011 20:48:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASKmZl7008655; Mon, 28 Nov 2011 20:48:35 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASKmZro008653; Mon, 28 Nov 2011 20:48:35 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111282048.pASKmZro008653@svn.freebsd.org> From: Michael Tuexen Date: Mon, 28 Nov 2011 20:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228102 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 20:48:35 -0000 Author: tuexen Date: Mon Nov 28 20:48:35 2011 New Revision: 228102 URL: http://svn.freebsd.org/changeset/base/228102 Log: Remove debug code. MFC after: 1 month. Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Nov 28 20:43:50 2011 (r228101) +++ head/sys/netinet/sctp_pcb.c Mon Nov 28 20:48:35 2011 (r228102) @@ -6895,11 +6895,6 @@ skip_vtag_check: return (1); } - -static sctp_assoc_t reneged_asoc_ids[256]; -static uint8_t reneged_at = 0; - - static void sctp_drain_mbufs(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { @@ -7004,8 +6999,6 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, /* sa_ignore NO_NULL_CHK */ sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_DRAIN, SCTP_SO_NOT_LOCKED); - reneged_asoc_ids[reneged_at] = sctp_get_associd(stcb); - reneged_at++; } /* * Another issue, in un-setting the TSN's in the mapping array we From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 21:40:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2EEA1065675; Mon, 28 Nov 2011 21:40:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB1798FC17; Mon, 28 Nov 2011 21:40:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASLe0fV010294; Mon, 28 Nov 2011 21:40:00 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASLe0A9010284; Mon, 28 Nov 2011 21:40:00 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111282140.pASLe0A9010284@svn.freebsd.org> From: Martin Matuska Date: Mon, 28 Nov 2011 21:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228103 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/opensolaris/lib/libzfs/common cddl/lib/libzfs sys/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 21:40:01 -0000 Author: mm Date: Mon Nov 28 21:40:00 2011 New Revision: 228103 URL: http://svn.freebsd.org/changeset/base/228103 Log: Merge new ZFS features from illumos: 1644 add ZFS "clones" property https://www.illumos.org/issues/1644 1645 add ZFS "written" and "written@..." properties https://www.illumos.org/issues/1645 1646 "zfs send" should estimate size of stream https://www.illumos.org/issues/1646 1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots https://www.illumos.org/issues/1647 1693 persistent 'comment' field for a zpool https://www.illumos.org/issues/1693 1708 adjust size of zpool history data https://www.illumos.org/issues/1708 1748 desire support for reguid in zfs https://www.illumos.org/issues/1748 Obtained from: illumos (changesets 13514, 13524, 13525) MFC after: 1 month Added: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Deleted: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/lib/libzfs/Makefile head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.h head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 20:48:35 2011 (r228102) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Nov 28 21:40:00 2011 (r228103) @@ -48,12 +48,16 @@ .Ar size volume .Nm .Cm destroy -.Op Fl rRf +.Op Fl fnpRrv .Ar filesystem Ns | Ns Ar volume .Nm .Cm destroy -.Op Fl rRd +.Op Fl dnpRrv +.Sm off .Ar snapshot +.Ns Op % Ns Ar snapname +.Ns Op , Ns Ar ... +.Sm on .Nm .Cm snapshot .Op Fl r @@ -160,7 +164,7 @@ .Fl a | Ar filesystem Ns | Ns Ar mountpoint .Nm .Cm send -.Op Fl DvRp +.Op Fl DnPpRrv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm @@ -487,6 +491,17 @@ The default value is .Cm off . .It Sy creation The time this dataset was created. +.It Sy clones +For snapshots, this property is a comma-separated list of filesystems or +volumes which are clones of this snapshot. The clones' +.Sy origin +property is this snapshot. If the +.Sy clones +property is not empty, then this snapshot can not be destroyed (even with the +.Fl r +or +.Fl f +options). .It Sy defer_destroy This property is .Cm on @@ -644,6 +659,28 @@ power of 2 from 512 bytes to 128 Kbytes .Pp This property can also be referred to by its shortened column name, .Sy volblock . +.It Sy written +The amount of +.Sy referenced +space written to this dataset since the previous snapshot. +.It Sy written@ Ns Ar snapshot +The amount of +.Sy referenced +space written to this dataset since the specified snapshot. This is the space +that is referenced by this dataset but was not referenced by the specified +snapshot. +.Pp +The +.Ar snapshot +may be specified as a short snapshot name (just the part after the +.Sy @ Ns ), +in which case it will be interpreted as a snapshot in the same filesystem as +this dataset. The +.Ar snapshot +may be a full snapshot name +.Pq Em filesystem@snapshot , +which for clones may be a snapshot in the origin's filesystem (or the origin of +the origin's filesystem, etc). .El .Pp The following native properties can be used to change the behavior of a @@ -1403,7 +1440,7 @@ options. .It Xo .Nm .Cm destroy -.Op Fl rRf +.Op Fl fnpRrv .Ar filesystem Ns | Ns Ar volume .Xc .Pp @@ -1422,6 +1459,17 @@ Force an unmount of any file systems usi .Qq Nm Cm unmount Fl f command. This option has no effect on non-file systems or unmounted file systems. +.It Fl n +Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in +conjunction with the +.Fl v +or +.Fl p +flags to determine what data would be deleted. +.It Fl p +Print machine-parsable verbose information about the deleted data. +.It Fl v +Print verbose information about the deleted data. .El .Pp Extreme care should be taken when applying either the @@ -1433,11 +1481,15 @@ behavior for mounted file systems in use .It Xo .Nm .Cm destroy -.Op Fl rRd +.Op Fl dnpRrv +.Sm off .Ar snapshot +.Ns Op % Ns Ar snapname +.Ns Op , Ns Ar ... +.Sm on .Xc .Pp -The given snapshot is destroyed immediately if and only if the +The given snapshots are destroyed immediately if and only if the .Qq Nm Cm destroy command without the .Fl d @@ -1445,15 +1497,41 @@ option would have destroyed it. Such imm example, if the snapshot had no clones and the user-initiated reference count were zero. .Pp -If the snapshot does not qualify for immediate destruction, it is marked for +If a snapshot does not qualify for immediate destruction, it is marked for deferred deletion. In this state, it exists as a usable, visible snapshot until both of the preconditions listed above are met, at which point it is destroyed. +.Pp +An inclusive range of snapshots may be specified by separating the +first and last snapshots with a percent sign +.Pq Sy % . +The first and/or last snapshots may be left blank, in which case the +filesystem's oldest or newest snapshot will be implied. +.Pp +Multiple snapshots +(or ranges of snapshots) of the same filesystem or volume may be specified +in a comma-separated list of snapshots. +Only the snapshot's short name (the +part after the +.Sy @ ) +should be specified when using a range or comma-separated list to identify +multiple snapshots. .Bl -tag -width indent .It Fl r Destroy (or mark for deferred deletion) all snapshots with this name in descendent file systems. .It Fl R Recursively destroy all dependents. +.It Fl n +Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in +conjunction with the +.Fl v +or +.Fl p +flags to determine what data would be deleted. +.It Fl p +Print machine-parsable verbose information about the deleted data. +.It Fl v +Print verbose information about the deleted data. .It Fl d Defer snapshot deletion. .El @@ -2080,7 +2158,7 @@ file system shared on the system. .It Xo .Nm .Cm send -.Op Fl DvRp +.Op Fl DnPpRrv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2151,10 +2229,26 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 Ns ). +.It Fl r +Recursively send all descendant snapshots. This is similar to the +.Fl R +flag, but information about deleted and renamed datasets is not included, and +property information is only included if the +.Fl p +flag is specified. .It Fl p Include the dataset's properties in the stream. This flag is implicit when .Fl R is specified. The receiving system must also support this feature. +.It Fl n +Do a dry-run ("No-op") send. Do not generate any actual send data. This is +useful in conjunction with the +.Fl v +or +.Fl P +flags to determine what data will be sent. +.It Fl P +Print machine-parsable verbose information about the stream package generated. .It Fl v Print verbose information about the stream package generated. .El Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Nov 28 20:48:35 2011 (r228102) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Nov 28 21:40:00 2011 (r228103) @@ -22,8 +22,9 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . - * All rights reserved. + * Copyright (c) 2011 Martin Matuska . All rights reserved. */ #include @@ -145,7 +146,7 @@ typedef enum { HELP_HOLD, HELP_HOLDS, HELP_RELEASE, - HELP_DIFF + HELP_DIFF, } zfs_help_t; typedef struct zfs_command { @@ -220,8 +221,9 @@ get_usage(zfs_help_t idx) "\tcreate [-ps] [-b blocksize] [-o property=value] ... " "-V \n")); case HELP_DESTROY: - return (gettext("\tdestroy [-rRf] \n" - "\tdestroy [-rRd] \n")); + return (gettext("\tdestroy [-fnpRrv] \n" + "\tdestroy [-dnpRrv] " + "[%][,...]\n")); case HELP_GET: return (gettext("\tget [-rHp] [-d max] " "[-o \"all\" | field[,...]] [-s source[,...]]\n" @@ -260,7 +262,7 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DvRp] " + return (gettext("\tsend [-DnPpRrv] " "[-i snapshot | -I snapshot] \n")); case HELP_SET: return (gettext("\tset " @@ -440,6 +442,8 @@ usage(boolean_t requested) (void) fprintf(fp, "YES NO | none\n"); (void) fprintf(fp, "\t%-15s ", "groupquota@..."); (void) fprintf(fp, "YES NO | none\n"); + (void) fprintf(fp, "\t%-15s ", "written@"); + (void) fprintf(fp, " NO NO \n"); (void) fprintf(fp, gettext("\nSizes are specified in bytes " "with standard units such as K, M, G, etc.\n")); @@ -885,15 +889,23 @@ badusage: */ typedef struct destroy_cbdata { boolean_t cb_first; - int cb_force; - int cb_recurse; - int cb_error; - int cb_needforce; - int cb_doclones; - boolean_t cb_closezhp; + boolean_t cb_force; + boolean_t cb_recurse; + boolean_t cb_error; + boolean_t cb_doclones; zfs_handle_t *cb_target; - char *cb_snapname; boolean_t cb_defer_destroy; + boolean_t cb_verbose; + boolean_t cb_parsable; + boolean_t cb_dryrun; + nvlist_t *cb_nvl; + + /* first snap in contiguous run */ + zfs_handle_t *cb_firstsnap; + /* previous snap in contiguous run */ + zfs_handle_t *cb_prevsnap; + int64_t cb_snapused; + char *cb_snapspec; } destroy_cbdata_t; /* @@ -923,7 +935,7 @@ destroy_check_dependent(zfs_handle_t *zh (void) fprintf(stderr, gettext("use '-r' to destroy " "the following datasets:\n")); cbp->cb_first = B_FALSE; - cbp->cb_error = 1; + cbp->cb_error = B_TRUE; } (void) fprintf(stderr, "%s\n", zfs_get_name(zhp)); @@ -944,7 +956,8 @@ destroy_check_dependent(zfs_handle_t *zh (void) fprintf(stderr, gettext("use '-R' to destroy " "the following datasets:\n")); cbp->cb_first = B_FALSE; - cbp->cb_error = 1; + cbp->cb_error = B_TRUE; + cbp->cb_dryrun = B_TRUE; } (void) fprintf(stderr, "%s\n", zfs_get_name(zhp)); @@ -958,7 +971,20 @@ out: static int destroy_callback(zfs_handle_t *zhp, void *data) { - destroy_cbdata_t *cbp = data; + destroy_cbdata_t *cb = data; + const char *name = zfs_get_name(zhp); + + if (cb->cb_verbose) { + if (cb->cb_parsable) { + (void) printf("destroy\t%s\n", name); + } else if (cb->cb_dryrun) { + (void) printf(gettext("would destroy %s\n"), + name); + } else { + (void) printf(gettext("will destroy %s\n"), + name); + } + } /* * Ignore pools (which we've already flagged as an error before getting @@ -970,13 +996,12 @@ destroy_callback(zfs_handle_t *zhp, void return (0); } - /* - * Bail out on the first error. - */ - if (zfs_unmount(zhp, NULL, cbp->cb_force ? MS_FORCE : 0) != 0 || - zfs_destroy(zhp, cbp->cb_defer_destroy) != 0) { - zfs_close(zhp); - return (-1); + if (!cb->cb_dryrun) { + if (zfs_unmount(zhp, NULL, cb->cb_force ? MS_FORCE : 0) != 0 || + zfs_destroy(zhp, cb->cb_defer_destroy) != 0) { + zfs_close(zhp); + return (-1); + } } zfs_close(zhp); @@ -984,39 +1009,142 @@ destroy_callback(zfs_handle_t *zhp, void } static int -destroy_snap_clones(zfs_handle_t *zhp, void *arg) +destroy_print_cb(zfs_handle_t *zhp, void *arg) { - destroy_cbdata_t *cbp = arg; - char thissnap[MAXPATHLEN]; - zfs_handle_t *szhp; - boolean_t closezhp = cbp->cb_closezhp; - int rv; + destroy_cbdata_t *cb = arg; + const char *name = zfs_get_name(zhp); + int err = 0; - (void) snprintf(thissnap, sizeof (thissnap), - "%s@%s", zfs_get_name(zhp), cbp->cb_snapname); + if (nvlist_exists(cb->cb_nvl, name)) { + if (cb->cb_firstsnap == NULL) + cb->cb_firstsnap = zfs_handle_dup(zhp); + if (cb->cb_prevsnap != NULL) + zfs_close(cb->cb_prevsnap); + /* this snap continues the current range */ + cb->cb_prevsnap = zfs_handle_dup(zhp); + if (cb->cb_verbose) { + if (cb->cb_parsable) { + (void) printf("destroy\t%s\n", name); + } else if (cb->cb_dryrun) { + (void) printf(gettext("would destroy %s\n"), + name); + } else { + (void) printf(gettext("will destroy %s\n"), + name); + } + } + } else if (cb->cb_firstsnap != NULL) { + /* end of this range */ + uint64_t used = 0; + err = zfs_get_snapused_int(cb->cb_firstsnap, + cb->cb_prevsnap, &used); + cb->cb_snapused += used; + zfs_close(cb->cb_firstsnap); + cb->cb_firstsnap = NULL; + zfs_close(cb->cb_prevsnap); + cb->cb_prevsnap = NULL; + } + zfs_close(zhp); + return (err); +} - libzfs_print_on_error(g_zfs, B_FALSE); - szhp = zfs_open(g_zfs, thissnap, ZFS_TYPE_SNAPSHOT); - libzfs_print_on_error(g_zfs, B_TRUE); - if (szhp) { - /* - * Destroy any clones of this snapshot - */ - if (zfs_iter_dependents(szhp, B_FALSE, destroy_callback, - cbp) != 0) { - zfs_close(szhp); - if (closezhp) - zfs_close(zhp); - return (-1); +static int +destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_cbdata_t *cb) +{ + int err; + assert(cb->cb_firstsnap == NULL); + assert(cb->cb_prevsnap == NULL); + err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb); + if (cb->cb_firstsnap != NULL) { + uint64_t used = 0; + if (err == 0) { + err = zfs_get_snapused_int(cb->cb_firstsnap, + cb->cb_prevsnap, &used); } - zfs_close(szhp); + cb->cb_snapused += used; + zfs_close(cb->cb_firstsnap); + cb->cb_firstsnap = NULL; + zfs_close(cb->cb_prevsnap); + cb->cb_prevsnap = NULL; } + return (err); +} - cbp->cb_closezhp = B_TRUE; - rv = zfs_iter_filesystems(zhp, destroy_snap_clones, arg); - if (closezhp) - zfs_close(zhp); - return (rv); +static int +snapshot_to_nvl_cb(zfs_handle_t *zhp, void *arg) +{ + destroy_cbdata_t *cb = arg; + int err = 0; + + /* Check for clones. */ + if (!cb->cb_doclones) { + cb->cb_target = zhp; + cb->cb_first = B_TRUE; + err = zfs_iter_dependents(zhp, B_TRUE, + destroy_check_dependent, cb); + } + + if (err == 0) { + if (nvlist_add_boolean(cb->cb_nvl, zfs_get_name(zhp))) + nomem(); + } + zfs_close(zhp); + return (err); +} + +static int +gather_snapshots(zfs_handle_t *zhp, void *arg) +{ + destroy_cbdata_t *cb = arg; + int err = 0; + + err = zfs_iter_snapspec(zhp, cb->cb_snapspec, snapshot_to_nvl_cb, cb); + if (err == ENOENT) + err = 0; + if (err != 0) + goto out; + + if (cb->cb_verbose) { + err = destroy_print_snapshots(zhp, cb); + if (err != 0) + goto out; + } + + if (cb->cb_recurse) + err = zfs_iter_filesystems(zhp, gather_snapshots, cb); + +out: + zfs_close(zhp); + return (err); +} + +static int +destroy_clones(destroy_cbdata_t *cb) +{ + nvpair_t *pair; + for (pair = nvlist_next_nvpair(cb->cb_nvl, NULL); + pair != NULL; + pair = nvlist_next_nvpair(cb->cb_nvl, pair)) { + zfs_handle_t *zhp = zfs_open(g_zfs, nvpair_name(pair), + ZFS_TYPE_SNAPSHOT); + if (zhp != NULL) { + boolean_t defer = cb->cb_defer_destroy; + int err; + + /* + * We can't defer destroy non-snapshots, so set it to + * false while destroying the clones. + */ + cb->cb_defer_destroy = B_FALSE; + err = zfs_iter_dependents(zhp, B_FALSE, + destroy_callback, cb); + cb->cb_defer_destroy = defer; + zfs_close(zhp); + if (err != 0) + return (err); + } + } + return (0); } static int @@ -1025,25 +1153,35 @@ zfs_do_destroy(int argc, char **argv) destroy_cbdata_t cb = { 0 }; int c; zfs_handle_t *zhp; - char *cp; + char *at; zfs_type_t type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, "dfrR")) != -1) { + while ((c = getopt(argc, argv, "vpndfrR")) != -1) { switch (c) { + case 'v': + cb.cb_verbose = B_TRUE; + break; + case 'p': + cb.cb_verbose = B_TRUE; + cb.cb_parsable = B_TRUE; + break; + case 'n': + cb.cb_dryrun = B_TRUE; + break; case 'd': cb.cb_defer_destroy = B_TRUE; type = ZFS_TYPE_SNAPSHOT; break; case 'f': - cb.cb_force = 1; + cb.cb_force = B_TRUE; break; case 'r': - cb.cb_recurse = 1; + cb.cb_recurse = B_TRUE; break; case 'R': - cb.cb_recurse = 1; - cb.cb_doclones = 1; + cb.cb_recurse = B_TRUE; + cb.cb_doclones = B_TRUE; break; case '?': default: @@ -1058,7 +1196,7 @@ zfs_do_destroy(int argc, char **argv) /* check number of arguments */ if (argc == 0) { - (void) fprintf(stderr, gettext("missing path argument\n")); + (void) fprintf(stderr, gettext("missing dataset argument\n")); usage(B_FALSE); } if (argc > 1) { @@ -1066,91 +1204,117 @@ zfs_do_destroy(int argc, char **argv) usage(B_FALSE); } - /* - * If we are doing recursive destroy of a snapshot, then the - * named snapshot may not exist. Go straight to libzfs. - */ - if (cb.cb_recurse && (cp = strchr(argv[0], '@'))) { - int ret; + at = strchr(argv[0], '@'); + if (at != NULL) { + int err; - *cp = '\0'; - if ((zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_DATASET)) == NULL) + /* Build the list of snaps to destroy in cb_nvl. */ + if (nvlist_alloc(&cb.cb_nvl, NV_UNIQUE_NAME, 0) != 0) + nomem(); + + *at = '\0'; + zhp = zfs_open(g_zfs, argv[0], + ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME); + if (zhp == NULL) return (1); - *cp = '@'; - cp++; - if (cb.cb_doclones) { - boolean_t defer = cb.cb_defer_destroy; + cb.cb_snapspec = at + 1; + if (gather_snapshots(zfs_handle_dup(zhp), &cb) != 0 || + cb.cb_error) { + zfs_close(zhp); + nvlist_free(cb.cb_nvl); + return (1); + } - /* - * Temporarily ignore the defer_destroy setting since - * it's not supported for clones. - */ - cb.cb_defer_destroy = B_FALSE; - cb.cb_snapname = cp; - if (destroy_snap_clones(zhp, &cb) != 0) { - zfs_close(zhp); - return (1); + if (nvlist_empty(cb.cb_nvl)) { + (void) fprintf(stderr, gettext("could not find any " + "snapshots to destroy; check snapshot names.\n")); + zfs_close(zhp); + nvlist_free(cb.cb_nvl); + return (1); + } + + if (cb.cb_verbose) { + char buf[16]; + zfs_nicenum(cb.cb_snapused, buf, sizeof (buf)); + if (cb.cb_parsable) { + (void) printf("reclaim\t%llu\n", + cb.cb_snapused); + } else if (cb.cb_dryrun) { + (void) printf(gettext("would reclaim %s\n"), + buf); + } else { + (void) printf(gettext("will reclaim %s\n"), + buf); } - cb.cb_defer_destroy = defer; } - ret = zfs_destroy_snaps(zhp, cp, cb.cb_defer_destroy); - zfs_close(zhp); - if (ret) { - (void) fprintf(stderr, - gettext("no snapshots destroyed\n")); + if (!cb.cb_dryrun) { + if (cb.cb_doclones) + err = destroy_clones(&cb); + if (err == 0) { + err = zfs_destroy_snaps_nvl(zhp, cb.cb_nvl, + cb.cb_defer_destroy); + } } - return (ret != 0); - } - /* Open the given dataset */ - if ((zhp = zfs_open(g_zfs, argv[0], type)) == NULL) - return (1); + zfs_close(zhp); + nvlist_free(cb.cb_nvl); + if (err != 0) + return (1); + } else { + /* Open the given dataset */ + if ((zhp = zfs_open(g_zfs, argv[0], type)) == NULL) + return (1); - cb.cb_target = zhp; + cb.cb_target = zhp; - /* - * Perform an explicit check for pools before going any further. - */ - if (!cb.cb_recurse && strchr(zfs_get_name(zhp), '/') == NULL && - zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) { - (void) fprintf(stderr, gettext("cannot destroy '%s': " - "operation does not apply to pools\n"), - zfs_get_name(zhp)); - (void) fprintf(stderr, gettext("use 'zfs destroy -r " - "%s' to destroy all datasets in the pool\n"), - zfs_get_name(zhp)); - (void) fprintf(stderr, gettext("use 'zpool destroy %s' " - "to destroy the pool itself\n"), zfs_get_name(zhp)); - zfs_close(zhp); - return (1); - } + /* + * Perform an explicit check for pools before going any further. + */ + if (!cb.cb_recurse && strchr(zfs_get_name(zhp), '/') == NULL && + zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) { + (void) fprintf(stderr, gettext("cannot destroy '%s': " + "operation does not apply to pools\n"), + zfs_get_name(zhp)); + (void) fprintf(stderr, gettext("use 'zfs destroy -r " + "%s' to destroy all datasets in the pool\n"), + zfs_get_name(zhp)); + (void) fprintf(stderr, gettext("use 'zpool destroy %s' " + "to destroy the pool itself\n"), zfs_get_name(zhp)); + zfs_close(zhp); + return (1); + } - /* - * Check for any dependents and/or clones. - */ - cb.cb_first = B_TRUE; - if (!cb.cb_doclones && !cb.cb_defer_destroy && - zfs_iter_dependents(zhp, B_TRUE, destroy_check_dependent, - &cb) != 0) { - zfs_close(zhp); - return (1); - } + /* + * Check for any dependents and/or clones. + */ + cb.cb_first = B_TRUE; + if (!cb.cb_doclones && + zfs_iter_dependents(zhp, B_TRUE, destroy_check_dependent, + &cb) != 0) { + zfs_close(zhp); + return (1); + } - if (cb.cb_error || (!cb.cb_defer_destroy && - (zfs_iter_dependents(zhp, B_FALSE, destroy_callback, &cb) != 0))) { - zfs_close(zhp); - return (1); - } + if (cb.cb_error) { + zfs_close(zhp); + return (1); + } - /* - * Do the real thing. The callback will close the handle regardless of - * whether it succeeds or not. - */ + if (zfs_iter_dependents(zhp, B_FALSE, destroy_callback, + &cb) != 0) { + zfs_close(zhp); + return (1); + } - if (destroy_callback(zhp, &cb) != 0) - return (1); + /* + * Do the real thing. The callback will close the + * handle regardless of whether it succeeds or not. + */ + if (destroy_callback(zhp, &cb) != 0) + return (1); + } return (0); } @@ -1252,6 +1416,17 @@ get_callback(zfs_handle_t *zhp, void *da zprop_print_one_property(zfs_get_name(zhp), cbp, pl->pl_user_prop, buf, sourcetype, source, NULL); + } else if (zfs_prop_written(pl->pl_user_prop)) { + sourcetype = ZPROP_SRC_LOCAL; + + if (zfs_prop_get_written(zhp, pl->pl_user_prop, + buf, sizeof (buf), cbp->cb_literal) != 0) { + sourcetype = ZPROP_SRC_NONE; + (void) strlcpy(buf, "-", sizeof (buf)); + } + + zprop_print_one_property(zfs_get_name(zhp), cbp, + pl->pl_user_prop, buf, sourcetype, source, NULL); } else { if (nvlist_lookup_nvlist(user_props, pl->pl_user_prop, &propval) != 0) { @@ -1796,8 +1971,8 @@ zfs_do_upgrade(int argc, char **argv) "---------------\n"); (void) printf(gettext(" 1 Initial ZFS filesystem version\n")); (void) printf(gettext(" 2 Enhanced directory entries\n")); - (void) printf(gettext(" 3 Case insensitive and File system " - "unique identifier (FUID)\n")); + (void) printf(gettext(" 3 Case insensitive and filesystem " + "user identifier (FUID)\n")); (void) printf(gettext(" 4 userquota, groupquota " "properties\n")); (void) printf(gettext(" 5 System attributes\n")); @@ -2677,6 +2852,13 @@ print_dataset(zfs_handle_t *zhp, zprop_l else propstr = property; right_justify = B_TRUE; + } else if (zfs_prop_written(pl->pl_user_prop)) { + if (zfs_prop_get_written(zhp, pl->pl_user_prop, + property, sizeof (property), B_FALSE) != 0) + propstr = "-"; + else + propstr = property; + right_justify = B_TRUE; } else { if (nvlist_lookup_nvlist(userprops, pl->pl_user_prop, &propval) != 0) @@ -3303,9 +3485,6 @@ usage: } /* - * zfs send [-vDp] -R [-i|-I <@snap>] - * zfs send [-vDp] [-i|-I <@snap>] - * * Send a backup stream to stdout. */ static int @@ -3317,11 +3496,11 @@ zfs_do_send(int argc, char **argv) zfs_handle_t *zhp; sendflags_t flags = { 0 }; int c, err; - nvlist_t *dbgnv; + nvlist_t *dbgnv = NULL; boolean_t extraverbose = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, ":i:I:RDpv")) != -1) { + while ((c = getopt(argc, argv, ":i:I:RDpvnP")) != -1) { switch (c) { case 'i': if (fromname) @@ -3340,6 +3519,10 @@ zfs_do_send(int argc, char **argv) case 'p': flags.props = B_TRUE; break; + case 'P': + flags.parsable = B_TRUE; + flags.verbose = B_TRUE; + break; case 'v': if (flags.verbose) extraverbose = B_TRUE; @@ -3348,6 +3531,9 @@ zfs_do_send(int argc, char **argv) case 'D': flags.dedup = B_TRUE; break; + case 'n': + flags.dryrun = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -3373,7 +3559,7 @@ zfs_do_send(int argc, char **argv) usage(B_FALSE); } - if (isatty(STDOUT_FILENO)) { + if (!flags.dryrun && isatty(STDOUT_FILENO)) { (void) fprintf(stderr, gettext("Error: Stream can not be written to a terminal.\n" "You must redirect standard output.\n")); @@ -3427,10 +3613,10 @@ zfs_do_send(int argc, char **argv) if (flags.replicate && fromname == NULL) flags.doall = B_TRUE; - err = zfs_send(zhp, fromname, toname, flags, STDOUT_FILENO, NULL, 0, + err = zfs_send(zhp, fromname, toname, &flags, STDOUT_FILENO, NULL, 0, extraverbose ? &dbgnv : NULL); - if (extraverbose) { + if (extraverbose && dbgnv != NULL) { /* * dump_nvlist prints to stdout, but that's been * redirected to a file. Make it print to stderr @@ -3511,7 +3697,7 @@ zfs_do_receive(int argc, char **argv) return (1); } - err = zfs_receive(g_zfs, argv[0], flags, STDIN_FILENO, NULL); + err = zfs_receive(g_zfs, argv[0], &flags, STDIN_FILENO, NULL); return (err != 0); } Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Nov 28 20:48:35 2011 (r228102) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Mon Nov 28 21:40:00 2011 (r228103) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2011 +.Dd November 28, 2011 .Dt ZPOOL 8 .Os .Sh NAME @@ -133,6 +133,9 @@ .Op Fl e .Ar pool device ... .Nm +.Cm reguid +.Ar pool +.Nm .Cm remove .Ar pool device ... .Nm @@ -1346,6 +1349,14 @@ available to the pool. .El .It Xo .Nm +.Cm reguid +.Ar pool +.Xc +.Pp +Generates a new unique identifier for the pool. You must ensure that all +devices in this pool are online and healthy before performing this action. +.It Xo +.Nm .Cm remove .Ar pool device ... .Xc Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Nov 28 20:48:35 2011 (r228102) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Nov 28 21:40:00 2011 (r228103) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2011 Martin Matuska . All rights reserved. */ #include @@ -68,6 +70,8 @@ static int zpool_do_online(int, char **) static int zpool_do_offline(int, char **); static int zpool_do_clear(int, char **); +static int zpool_do_reguid(int, char **); + static int zpool_do_attach(int, char **); static int zpool_do_detach(int, char **); static int zpool_do_replace(int, char **); @@ -126,7 +130,8 @@ typedef enum { HELP_UPGRADE, HELP_GET, HELP_SET, - HELP_SPLIT + HELP_SPLIT, + HELP_REGUID } zpool_help_t; @@ -172,6 +177,7 @@ static zpool_command_t command_table[] = { "import", zpool_do_import, HELP_IMPORT }, { "export", zpool_do_export, HELP_EXPORT }, { "upgrade", zpool_do_upgrade, HELP_UPGRADE }, + { "reguid", zpool_do_reguid, HELP_REGUID }, { NULL }, { "history", zpool_do_history, HELP_HISTORY }, { "get", zpool_do_get, HELP_GET }, @@ -251,6 +257,8 @@ get_usage(zpool_help_t idx) { return (gettext("\tsplit [-n] [-R altroot] [-o mntopts]\n" "\t [-o property=value] " "[ ...]\n")); + case HELP_REGUID: + return (gettext("\treguid \n")); } abort(); @@ -1454,6 +1462,7 @@ show_import(nvlist_t *config) const char *health; uint_t vsc; int namewidth; + char *comment; verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &name) == 0); @@ -1470,9 +1479,9 @@ show_import(nvlist_t *config) reason = zpool_import_status(config, &msgid); - (void) printf(gettext(" pool: %s\n"), name); - (void) printf(gettext(" id: %llu\n"), (u_longlong_t)guid); - (void) printf(gettext(" state: %s"), health); + (void) printf(gettext(" pool: %s\n"), name); + (void) printf(gettext(" id: %llu\n"), (u_longlong_t)guid); + (void) printf(gettext(" state: %s"), health); if (pool_state == POOL_STATE_DESTROYED) (void) printf(gettext(" (DESTROYED)")); (void) printf("\n"); @@ -1481,58 +1490,59 @@ show_import(nvlist_t *config) case ZPOOL_STATUS_MISSING_DEV_R: case ZPOOL_STATUS_MISSING_DEV_NR: case ZPOOL_STATUS_BAD_GUID_SUM: - (void) printf(gettext("status: One or more devices are missing " - "from the system.\n")); + (void) printf(gettext(" status: One or more devices are " + "missing from the system.\n")); break; case ZPOOL_STATUS_CORRUPT_LABEL_R: case ZPOOL_STATUS_CORRUPT_LABEL_NR: - (void) printf(gettext("status: One or more devices contains " + (void) printf(gettext(" status: One or more devices contains " "corrupted data.\n")); break; case ZPOOL_STATUS_CORRUPT_DATA: - (void) printf(gettext("status: The pool data is corrupted.\n")); + (void) printf( + gettext(" status: The pool data is corrupted.\n")); break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 21:42:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A85471065673; Mon, 28 Nov 2011 21:42:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9757B8FC16; Mon, 28 Nov 2011 21:42:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASLgVBZ010406; Mon, 28 Nov 2011 21:42:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASLgVVf010404; Mon, 28 Nov 2011 21:42:31 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111282142.pASLgVVf010404@svn.freebsd.org> From: Martin Matuska Date: Mon, 28 Nov 2011 21:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228104 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 21:42:31 -0000 Author: mm Date: Mon Nov 28 21:42:31 2011 New Revision: 228104 URL: http://svn.freebsd.org/changeset/base/228104 Log: Fix typo in copyright notice. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Nov 28 21:40:00 2011 (r228103) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Nov 28 21:42:31 2011 (r228104) @@ -23,7 +23,7 @@ * Copyright (c) 2011 by Delphix. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Portions Copyright 2011 Martin Matuska + * Portions Copyright (c) 2011 Martin Matuska */ #include From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 22:13:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59A05106566C; Mon, 28 Nov 2011 22:13:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47ECD8FC19; Mon, 28 Nov 2011 22:13:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASMDC2Y011440; Mon, 28 Nov 2011 22:13:12 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASMDCg8011437; Mon, 28 Nov 2011 22:13:12 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111282213.pASMDCg8011437@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 22:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228105 - releng/9.0/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:13:12 -0000 Author: rwatson Date: Mon Nov 28 22:13:11 2011 New Revision: 228105 URL: http://svn.freebsd.org/changeset/base/228105 Log: Merge r228039 from head to releng/9.0: Add an introductory Capsicum man page providing a high-level description of its mechanisms, pointing at other pertinent man pages, and cautioning about the experimental status of Capsicum in FreeBSD. Sponsored by: Google, Inc. Approved by: re (kib) Added: releng/9.0/share/man/man4/capsicum.4 - copied unchanged from r228039, head/share/man/man4/capsicum.4 Modified: releng/9.0/share/man/man4/Makefile Directory Properties: releng/9.0/share/man/man4/ (props changed) Modified: releng/9.0/share/man/man4/Makefile ============================================================================== --- releng/9.0/share/man/man4/Makefile Mon Nov 28 21:42:31 2011 (r228104) +++ releng/9.0/share/man/man4/Makefile Mon Nov 28 22:13:11 2011 (r228105) @@ -68,6 +68,7 @@ MAN= aac.4 \ bt.4 \ bwi.4 \ bwn.4 \ + capsicum.4 \ cardbus.4 \ carp.4 \ cas.4 \ Copied: releng/9.0/share/man/man4/capsicum.4 (from r228039, head/share/man/man4/capsicum.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/9.0/share/man/man4/capsicum.4 Mon Nov 28 22:13:11 2011 (r228105, copy of r228039, head/share/man/man4/capsicum.4) @@ -0,0 +1,120 @@ +.\" +.\" Copyright (c) 2011 Robert N. M. Watson +.\" Copyright (c) 2011 Jonathan Anderson +.\" 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, 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 20, 2011 +.Dt CAPSICUM 4 +.Os +.Sh NAME +.Nm Capsicum +.Nd lightweight OS capability and sandbox framework +.Sh SYNOPSIS +.Cd "options CAPABILITY_MODE" +.Cd "options CAPABILITIES" +.Cd "options PROCDESC" +.Sh DESCRIPTION +.Nm +is a lightweight OS capability and sandbox framework implementing a hybrid +capability system model. +.Nm +can be used for application and library compartmentalisation, the +decomposition of larger bodies of software into isolated (sandboxed) +components in order to implement security policies and limit the impact of +software vulnerabilities. +.Pp +.Nm +provides two core kernel primitives: +.Bl -tag -width indent +.It capability mode +A process mode, entered by invoking +.Xr cap_enter 2 , +in which access to global OS namespaces (such as the file system and PID +namespaces) is restricted; only explicitly delegated rights, referenced by +memory mappings or file descriptors, may be used. +Once set, the flag is inherited by future children proceses, and may not be +cleared. +.It capabilities +File descriptors that wrap other file descriptors, masking operations that can +be called on them; for example, a file descriptor returned by +.Xr open 2 +may be refined using +.Xr cap_new 2 +so that only +.Xr read 2 +and +.Xr write 2 +can be called, but not +.Xr fchmod 2 . +.El +.Pp +In some cases, +.Nm +requires use of alternatives to traditional POSIX APIs in order to name +objects using capabilities rather than global namespaces: +.Bl -tag -width indent +.It process descriptors +File descriptors representing processes, allowing parent processes to manage +child processes without requiring access to the PID namespace. +.It anonymous shared memory +An extension to the POSIX shared memory API to support anonymous swap objects +associated with file descriptors. +.El +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr cap_getmode 2 , +.Xr cap_getrights 2 , +.Xr cap_new 2 , +.Xr fchmod 2 , +.Xr open 2 , +.Xr pdfork 2 , +.Xr pdgetpid 2 , +.Xr pdkill 2 , +.Xr pdwait4 2 , +.Xr read 2 , +.Xr shm_open 2 , +.Xr write 2 +.Sh HISTORY +.Nm +first appeared in +.Fx 9.0 , +and was developed at the University of Cambridge. +.Sh AUTHORS +.Nm +was developed by +.An -nosplit +.An "Robert Watson" Aq rwatson@FreeBSD.org +and +.An "Jonathan Anderson" Aq jonathan@FreeBSD.org +at the University of Cambridge, and +.An "Ben Laurie" Aq benl@FreeBSD.org +and +.An "Kris Kennaway" Aq kris@FreeBSD.org +at Google, Inc. +.Sh BUGS +.Nm +is considered experimental in +.Fx . From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 22:24:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3515B106566B; Mon, 28 Nov 2011 22:24:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 242D78FC14; Mon, 28 Nov 2011 22:24:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASMONG0011842; Mon, 28 Nov 2011 22:24:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASMONTV011839; Mon, 28 Nov 2011 22:24:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111282224.pASMONTV011839@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 22:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228106 - releng/9.0/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:24:23 -0000 Author: rwatson Date: Mon Nov 28 22:24:22 2011 New Revision: 228106 URL: http://svn.freebsd.org/changeset/base/228106 Log: Merge r228040 from head to releng/9.0: Cross-reference capsicum.4 from cap_enter.2 and cap_new.2. Sponsored by: Google, Inc. Approved by: re (kib) Modified: releng/9.0/lib/libc/sys/cap_enter.2 releng/9.0/lib/libc/sys/cap_new.2 Directory Properties: releng/9.0/lib/libc/ (props changed) releng/9.0/lib/libc/stdtime/ (props changed) Modified: releng/9.0/lib/libc/sys/cap_enter.2 ============================================================================== --- releng/9.0/lib/libc/sys/cap_enter.2 Mon Nov 28 22:13:11 2011 (r228105) +++ releng/9.0/lib/libc/sys/cap_enter.2 Mon Nov 28 22:24:22 2011 (r228106) @@ -89,7 +89,8 @@ acquired rights as possible. .Rv -std cap_enter cap_getmode .Sh SEE ALSO .Xr cap_new 2 , -.Xr fexecve 2 +.Xr fexecve 2 , +.Xr capsicum 4 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the .Tn TrustedBSD Modified: releng/9.0/lib/libc/sys/cap_new.2 ============================================================================== --- releng/9.0/lib/libc/sys/cap_new.2 Mon Nov 28 22:13:11 2011 (r228105) +++ releng/9.0/lib/libc/sys/cap_new.2 Mon Nov 28 22:24:22 2011 (r228106) @@ -456,6 +456,7 @@ argument is not a capability. .Xr sem_post 3 , .Xr sem_trywait 3 , .Xr sem_wait 3 , +.Xr capsicum 4 , .Xr snp 4 .Sh HISTORY Support for capabilities and capabilities mode was developed as part of the From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 22:30:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28B91106566B; Mon, 28 Nov 2011 22:30:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17C088FC16; Mon, 28 Nov 2011 22:30:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASMUJsJ012128; Mon, 28 Nov 2011 22:30:19 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASMUJKN012126; Mon, 28 Nov 2011 22:30:19 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201111282230.pASMUJKN012126@svn.freebsd.org> From: Robert Watson Date: Mon, 28 Nov 2011 22:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228107 - releng/9.0/cddl/lib/drti X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:30:20 -0000 Author: rwatson Date: Mon Nov 28 22:30:19 2011 New Revision: 228107 URL: http://svn.freebsd.org/changeset/base/228107 Log: Merge r228057 from head to releng/9.0: Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of bsd.prog.mk -- we need to compile PIC, which requires a library build. With this change, USDT (userspace DTrace probes) work from within shared libraries. PR: kern/159046 Submitted by: Alex Samorukov Comments by: Scott Lystig Fritchie Approved by: re (bz) Modified: releng/9.0/cddl/lib/drti/Makefile Directory Properties: releng/9.0/cddl/lib/drti/ (props changed) Modified: releng/9.0/cddl/lib/drti/Makefile ============================================================================== --- releng/9.0/cddl/lib/drti/Makefile Mon Nov 28 22:24:22 2011 (r228106) +++ releng/9.0/cddl/lib/drti/Makefile Mon Nov 28 22:30:19 2011 (r228107) @@ -18,4 +18,4 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \ -DPIC ${PICFLAG} -.include +.include From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 23:10:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47DC0106566C; Mon, 28 Nov 2011 23:10:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3711E8FC13; Mon, 28 Nov 2011 23:10:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASNAsUI013508; Mon, 28 Nov 2011 23:10:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASNAs9d013506; Mon, 28 Nov 2011 23:10:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201111282310.pASNAs9d013506@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 28 Nov 2011 23:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228109 - head/tools/regression/bin/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 23:10:54 -0000 Author: jilles Date: Mon Nov 28 23:10:53 2011 New Revision: 228109 URL: http://svn.freebsd.org/changeset/base/228109 Log: test: Add more testcases. The new testcases pass even on old stable/7, but some other implementations manage to get them wrong. Also remove a few duplicate testcases. Modified: head/tools/regression/bin/test/regress.sh Modified: head/tools/regression/bin/test/regress.sh ============================================================================== --- head/tools/regression/bin/test/regress.sh Mon Nov 28 22:37:00 2011 (r228108) +++ head/tools/regression/bin/test/regress.sh Mon Nov 28 23:10:53 2011 (r228109) @@ -52,7 +52,7 @@ t () } count=0 -echo "1..97" +echo "1..130" t 0 'b = b' t 0 'b == b' @@ -138,8 +138,6 @@ t 1 '! = a' t 0 '! != -n' t 0 '! -c /etc/passwd' -t 0 '! \( = \)' -t 1 '! \( != \)' t 1 '! = = =' t 0 '! = = \)' t 0 '! "" -o ""' @@ -147,7 +145,6 @@ t 1 '! "x" -o ""' t 1 '! "" -o "x"' t 1 '! "x" -o "x"' t 0 '\( -f /etc/passwd \)' -t 1 '\( ! = \)' t 0 '\( ! "" \)' t 1 '\( ! -e \)' @@ -160,3 +157,40 @@ t 1 '-z y -o y = "#" -o y = x' t 0 '0 -ne 0 -o ! -f /' t 0 '1 -ne 0 -o ! -f /etc/passwd' t 1 '0 -ne 0 -o ! -f /etc/passwd' + +t 0 '-n =' +t 1 '-z =' +t 1 '! =' +t 0 '-n -eq' +t 1 '-z -eq' +t 1 '! -eq' +t 0 '-n -a' +t 1 '-z -a' +t 1 '! -a' +t 0 '-n -o' +t 1 '-z -o' +t 1 '! -o' +t 1 '! -n =' +t 0 '! -z =' +t 0 '! ! =' +t 1 '! -n -eq' +t 0 '! -z -eq' +t 0 '! ! -eq' +t 1 '! -n -a' +t 0 '! -z -a' +t 0 '! ! -a' +t 1 '! -n -o' +t 0 '! -z -o' +t 0 '! ! -o' +t 0 '\( -n = \)' +t 1 '\( -z = \)' +t 1 '\( ! = \)' +t 0 '\( -n -eq \)' +t 1 '\( -z -eq \)' +t 1 '\( ! -eq \)' +t 0 '\( -n -a \)' +t 1 '\( -z -a \)' +t 1 '\( ! -a \)' +t 0 '\( -n -o \)' +t 1 '\( -z -o \)' +t 1 '\( ! -o \)' From owner-svn-src-all@FreeBSD.ORG Mon Nov 28 23:36:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCC041065672; Mon, 28 Nov 2011 23:36:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57C2B8FC1F; Mon, 28 Nov 2011 23:36:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pASNanFv014396; Mon, 28 Nov 2011 23:36:49 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pASNan7m014387; Mon, 28 Nov 2011 23:36:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201111282336.pASNan7m014387@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 28 Nov 2011 23:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228110 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler sys/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 23:36:49 -0000 Author: jkim Date: Mon Nov 28 23:36:48 2011 New Revision: 228110 URL: http://svn.freebsd.org/changeset/base/228110 Log: Merge ACPICA 20111123. Added: head/sys/contrib/dev/acpica/compiler/aslrestype2s.c - copied, changed from r227909, vendor-sys/acpica/dist/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/disassembler/dmresrcl2.c - copied, changed from r227909, vendor-sys/acpica/dist/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/include/actbl3.h - copied unchanged from r227909, vendor-sys/acpica/dist/include/actbl3.h head/sys/contrib/dev/acpica/os_specific/ head/sys/contrib/dev/acpica/os_specific/service_layers/ head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c - copied, changed from r227896, vendor-sys/acpica/dist/os_specific/service_layers/osunixxf.c head/sys/contrib/dev/acpica/resources/rsserial.c - copied, changed from r227909, vendor-sys/acpica/dist/resources/rsserial.c head/sys/contrib/dev/acpica/utilities/utxfmutex.c - copied, changed from r227896, vendor-sys/acpica/dist/utilities/utxfmutex.c Deleted: head/sys/contrib/dev/acpica/osunixxf.c head/sys/contrib/dev/acpica/tools/ Modified: head/sys/conf/files head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcompiler.y head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype1i.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2q.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/debugger/dbcmds.c head/sys/contrib/dev/acpica/debugger/dbdisply.c head/sys/contrib/dev/acpica/debugger/dbfileio.c head/sys/contrib/dev/acpica/debugger/dbinput.c head/sys/contrib/dev/acpica/debugger/dbutils.c head/sys/contrib/dev/acpica/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/disassembler/dmopcode.c head/sys/contrib/dev/acpica/disassembler/dmresrc.c head/sys/contrib/dev/acpica/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/disassembler/dmutils.c head/sys/contrib/dev/acpica/disassembler/dmwalk.c head/sys/contrib/dev/acpica/dispatcher/dsargs.c head/sys/contrib/dev/acpica/dispatcher/dsfield.c head/sys/contrib/dev/acpica/events/evevent.c head/sys/contrib/dev/acpica/events/evglock.c head/sys/contrib/dev/acpica/events/evregion.c head/sys/contrib/dev/acpica/executer/exconfig.c head/sys/contrib/dev/acpica/executer/excreate.c head/sys/contrib/dev/acpica/executer/exdump.c head/sys/contrib/dev/acpica/executer/exfield.c head/sys/contrib/dev/acpica/executer/exfldio.c head/sys/contrib/dev/acpica/executer/exprep.c head/sys/contrib/dev/acpica/executer/exutils.c head/sys/contrib/dev/acpica/hardware/hwvalid.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/namespace/nspredef.c head/sys/contrib/dev/acpica/namespace/nsrepair.c head/sys/contrib/dev/acpica/namespace/nsrepair2.c head/sys/contrib/dev/acpica/parser/psargs.c head/sys/contrib/dev/acpica/parser/psopcode.c head/sys/contrib/dev/acpica/parser/pstree.c head/sys/contrib/dev/acpica/resources/rscalc.c head/sys/contrib/dev/acpica/resources/rscreate.c head/sys/contrib/dev/acpica/resources/rsdump.c head/sys/contrib/dev/acpica/resources/rsinfo.c head/sys/contrib/dev/acpica/resources/rsirq.c head/sys/contrib/dev/acpica/resources/rslist.c head/sys/contrib/dev/acpica/resources/rsmisc.c head/sys/contrib/dev/acpica/resources/rsutils.c head/sys/contrib/dev/acpica/resources/rsxface.c head/sys/contrib/dev/acpica/tables/tbfadt.c head/sys/contrib/dev/acpica/tables/tbutils.c head/sys/contrib/dev/acpica/utilities/utdecode.c head/sys/contrib/dev/acpica/utilities/utmutex.c head/sys/contrib/dev/acpica/utilities/utresrc.c head/sys/modules/acpi/acpi/Makefile head/usr.sbin/acpi/Makefile.inc head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/acpidb/acpidb.c head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/conf/files Mon Nov 28 23:36:48 2011 (r228110) @@ -172,6 +172,7 @@ contrib/dev/acpica/disassembler/dmopcode contrib/dev/acpica/disassembler/dmobject.c optional acpi acpi_debug contrib/dev/acpica/disassembler/dmresrc.c optional acpi acpi_debug contrib/dev/acpica/disassembler/dmresrcl.c optional acpi acpi_debug +contrib/dev/acpica/disassembler/dmresrcl2.c optional acpi acpi_debug contrib/dev/acpica/disassembler/dmresrcs.c optional acpi acpi_debug contrib/dev/acpica/disassembler/dmutils.c optional acpi acpi_debug contrib/dev/acpica/disassembler/dmwalk.c optional acpi acpi_debug @@ -272,6 +273,7 @@ contrib/dev/acpica/resources/rsirq.c op contrib/dev/acpica/resources/rslist.c optional acpi contrib/dev/acpica/resources/rsmemory.c optional acpi contrib/dev/acpica/resources/rsmisc.c optional acpi +contrib/dev/acpica/resources/rsserial.c optional acpi contrib/dev/acpica/resources/rsutils.c optional acpi contrib/dev/acpica/resources/rsxface.c optional acpi contrib/dev/acpica/tables/tbfadt.c optional acpi @@ -300,6 +302,7 @@ contrib/dev/acpica/utilities/utresrc.c contrib/dev/acpica/utilities/utstate.c optional acpi contrib/dev/acpica/utilities/utxface.c optional acpi contrib/dev/acpica/utilities/utxferror.c optional acpi +#contrib/dev/acpica/utilities/utxfmutex.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Mon Nov 28 23:36:48 2011 (r228110) @@ -15,16 +15,14 @@ dst=`realpath ./acpi_ca_destination` # files that should keep their full directory path fulldirs="common compiler debugger disassembler dispatcher events \ - executer hardware include namespace parser resources tables \ - tools utilities" + executer hardware include namespace os_specific parser \ + resources tables utilities" # files to remove -stripdirs="acpinames acpisrc acpixtract examples generate os_specific \ - tests" +stripdirs="generate tests tools" stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ - acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c \ - aehandlers.c aemain.c aetables.c aetables.h osunixdir.c \ - readme.txt utclib.c" + acos2.h accygwin.h acefi.h acwin.h acwin64.h osunixdir.c \ + oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c" # include files to canonify src_headers="acapps.h accommon.h acconfig.h acdebug.h acdisasm.h \ @@ -32,7 +30,7 @@ src_headers="acapps.h accommon.h acconfi aclocal.h acmacros.h acnames.h acnamesp.h acobject.h acopcode.h \ acoutput.h acparser.h acpi.h acpiosxf.h acpixf.h acpredef.h \ acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h \ - actbl2.h actypes.h acutils.h amlcode.h amlresrc.h \ + actbl2.h actbl3.h actypes.h acutils.h amlcode.h amlresrc.h \ platform/acenv.h platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ asltypes.h dtcompiler.h dttemplate.h" @@ -84,8 +82,8 @@ echo post-clean rm -rf ${wrk} # assist the developer in generating a diff -echo "Directories you may want to 'cvs diff':" -echo " src/sys/contrib/dev/acpica src/sys/dev/acpica \\" -echo " src/sys/amd64/acpica src/sys/i386/acpica src/sys/ia64/acpica \\" -echo " src/sys/amd64/include src/sys/i386/include src/sys/ia64/include \\" -echo " src/sys/boot src/sys/conf src/sys/modules/acpi src/usr.sbin/acpi" +echo "Directories you may want to 'svn diff':" +echo " sys/contrib/dev/acpica sys/dev/acpica \\" +echo " sys/amd64/acpica sys/i386/acpica sys/ia64/acpica sys/x86/acpica \\" +echo " sys/amd64/include sys/i386/include sys/ia64/include \\" +echo " sys/boot sys/conf sys/modules/acpi usr.sbin/acpi" Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/contrib/dev/acpica/changes.txt Mon Nov 28 23:36:48 2011 (r228110) @@ -1,7 +1,356 @@ ---------------------------------------- -27 May 2011. Summary of changes for version 20110527: +23 November 2011. Summary of changes for version 20111123: This release is available at www.acpica.org/downloads +The ACPI 5.0 specification is available at www.acpi.info + +0) ACPI 5.0 Support: + +This release contains full support for the ACPI 5.0 specification, as +summarized below. + +Reduced Hardware Support: +------------------------- + +This support allows for ACPI systems without the usual ACPI hardware. This +support is enabled by a flag in the revision 5 FADT. If it is set, ACPICA will +not attempt to initialize or use any of the usual ACPI hardware. Note, when +this flag is set, all of the following ACPI hardware is assumed to be not +present and is not initialized or accessed: + + General Purpose Events (GPEs) + Fixed Events (PM1a/PM1b and PM Control) + Power Management Timer and Console Buttons (power/sleep) + Real-time Clock Alarm + Global Lock + System Control Interrupt (SCI) + The FACS is assumed to be non-existent + +ACPI Tables: +------------ + +All new tables and updates to existing tables are fully supported in the +ACPICA headers (for use by device drivers), the disassembler, and the iASL +Data Table Compiler. ACPI 5.0 defines these new tables: + + BGRT /* Boot Graphics Resource Table */ + DRTM /* Dynamic Root of Trust for Measurement table */ + FPDT /* Firmware Performance Data Table */ + GTDT /* Generic Timer Description Table */ + MPST /* Memory Power State Table */ + PCCT /* Platform Communications Channel Table */ + PMTT /* Platform Memory Topology Table */ + RASF /* RAS Feature table */ + +Operation Regions/SpaceIDs: +--------------------------- + +All new operation regions are fully supported by the iASL compiler, the +disassembler, and the ACPICA runtime code (for dispatch to region handlers.) +The new operation region Space IDs are: + + GeneralPurposeIo + GenericSerialBus + +Resource Descriptors: +--------------------- + +All new ASL resource descriptors are fully supported by the iASL compiler, the +ASL/AML disassembler, and the ACPICA runtime Resource Manager code (including +all new predefined resource tags). New descriptors are: + + FixedDma + GpioIo + GpioInt + I2cSerialBus + SpiSerialBus + UartSerialBus + +ASL/AML Operators, New and Modified: +------------------------------------ + +One new operator is added, the Connection operator, which is used to associate +a GeneralPurposeIo or GenericSerialBus resource descriptor with individual +field objects within an operation region. Several new protocols are associated +with the AccessAs operator. All are fully supported by the iASL compiler, +disassembler, and runtime ACPICA AML interpreter: + + Connection // Declare Field Connection attributes + AccessAs: AttribBytes (n) // Read/Write N-Bytes Protocol + AccessAs: AttribRawBytes (n) // Raw Read/Write N-Bytes Protocol + AccessAs: AttribRawProcessBytes (n) // Raw Process Call Protocol + RawDataBuffer // Data type for Vendor Data fields + +Predefined ASL/AML Objects: +--------------------------- + +All new predefined objects/control-methods are supported by the iASL compiler +and the ACPICA runtime validation/repair (arguments and return values.) New +predefined names include the following: + +Standard Predefined Names (Objects or Control Methods): + _AEI, _CLS, _CPC, _CWS, _DEP, + _DLM, _EVT, _GCP, _CRT, _GWS, + _HRV, _PRE, _PSE, _SRT, _SUB. + +Resource Tags (Names used to access individual fields within resource +descriptors): + _DBT, _DPL, _DRS, _END, _FLC, + _IOR, _LIN, _MOD, _PAR, _PHA, + _PIN, _PPI, _POL, _RXL, _SLV, + _SPE, _STB, _TXL, _VEN. + +ACPICA External Interfaces: +--------------------------- + +Several new interfaces have been defined for use by ACPI-related device +drivers and other host OS services: + +AcpiAcquireMutex and AcpiReleaseMutex: These interfaces allow the host OS to +acquire and release AML mutexes that are defined in the DSDT/SSDT tables +provided by the BIOS. They are intended to be used in conjunction with the +ACPI 5.0 _DLM (Device Lock Method) in order to provide transaction-level +mutual exclusion with the AML code/interpreter. + +AcpiGetEventResources: Returns the (formatted) resource descriptors as defined +by the ACPI 5.0 _AEI object (ACPI Event Information). This object provides +resource descriptors associated with hardware-reduced platform events, similar +to the AcpiGetCurrentResources interface. + +Operation Region Handlers: For General Purpose IO and Generic Serial Bus +operation regions, information about the Connection() object and any optional +length information is passed to the region handler within the Context +parameter. + +AcpiBufferToResource: This interface converts a raw AML buffer containing a +resource template or resource descriptor to the ACPI_RESOURCE internal format +suitable for use by device drivers. Can be used by an operation region handler +to convert the Connection() buffer object into a ACPI_RESOURCE. + +Miscellaneous/Tools/TestSuites: +------------------------------- + +Support for extended _HID names (Four alpha characters instead of three). +Support for ACPI 5.0 features in the AcpiExec and AcpiHelp utilities. +Support for ACPI 5.0 features in the ASLTS test suite. +Fully updated documentation (ACPICA and iASL reference documents.) + +ACPI Table Definition Language: +------------------------------- + +Support for this language was implemented and released as a subsystem of the +iASL compiler in 2010. (See the iASL compiler User Guide.) + + +Non-ACPI 5.0 changes for this release: +-------------------------------------- + +1) ACPICA Core Subsystem: + +Fix a problem with operation region declarations where a failure can occur if +the region name and an argument that evaluates to an object (such as the +region address) are in different namespace scopes. Lin Ming, ACPICA BZ 937. + +Do not abort an ACPI table load if an invalid space ID is found within. This +will be caught later if the offending method is executed. ACPICA BZ 925. + +Fixed an issue with the FFixedHW space ID where the ID was not always +recognized properly (Both ACPICA and iASL). ACPICA BZ 926. + +Fixed a problem with the 32-bit generation of the unix-specific OSL +(osunixxf.c). Lin Ming, ACPICA BZ 936. + +Several changes made to enable generation with the GCC 4.6 compiler. ACPICA BZ +935. + +New error messages: Unsupported I/O requests (not 8/16/32 bit), and Index/Bank +field registers out-of-range. + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented the __PATH__ operator, which returns the full pathname of +the current source file. + +AcpiHelp: Automatically display expanded keyword information for all ASL +operators. + +Debugger: Add "Template" command to disassemble/dump resource template +buffers. + +Added a new master script to generate and execute the ASLTS test suite. +Automatically handles 32- and 64-bit generation. See tests/aslts.sh + +iASL: Fix problem with listing generation during processing of the Switch() +operator where AML listing was disabled until the entire Switch block was +completed. + +iASL: Improve support for semicolon statement terminators. Fix "invalid +character" message for some cases when the semicolon is used. Semicolons are +now allowed after every grammar element. ACPICA BZ 927. + +iASL: Fixed some possible aliasing warnings during generation. ACPICA BZ 923. + +Disassembler: Fix problem with disassembly of the DataTableRegion operator +where an inadvertent "Unhandled deferred opcode" message could be generated. + +3) Example Code and Data Size + +These are the sizes for the OS-independent acpica.lib produced by the +Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code +includes the debug output trace mechanism and has a much larger code and data +size. + + Previous Release: + Non-Debug Version: 90.2K Code, 23.9K Data, 114.1K Total + Debug Version: 165.6K Code, 68.4K Data, 234.0K Total + Current Release: + Non-Debug Version: 92.3K Code, 24.9K Data, 117.2K Total + Debug Version: 170.8K Code, 72.6K Data, 243.4K Total + +---------------------------------------- +22 September 2011. Summary of changes for version 20110922: + +0) ACPI 5.0 News: + +Support for ACPI 5.0 in ACPICA has been underway for several months and will +be released at the same time that ACPI 5.0 is officially released. + +The ACPI 5.0 specification is on track for release in the next few months. + +1) ACPICA Core Subsystem: + +Fixed a problem where the maximum sleep time for the Sleep() operator was +intended to be limited to two seconds, but was inadvertently limited to 20 +seconds instead. + +Linux and Unix makefiles: Added header file dependencies to ensure correct +generation of ACPICA core code and utilities. Also simplified the makefiles +considerably through the use of the vpath variable to specify search paths. +ACPICA BZ 924. + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented support to check the access length for all fields created to +access named Resource Descriptor fields. For example, if a resource field is +defined to be two bits, a warning is issued if a CreateXxxxField() is used +with an incorrect bit length. This is implemented for all current resource +descriptor names. ACPICA BZ 930. + +Disassembler: Fixed a byte ordering problem with the output of 24-bit and 56- +bit integers. + +iASL: Fixed a couple of issues associated with variable-length package +objects. 1) properly handle constants like One, Ones, Zero -- do not make a +VAR_PACKAGE when these are used as a package length. 2) Allow the VAR_PACKAGE +opcode (in addition to PACKAGE) when validating object types for predefined +names. + +iASL: Emit statistics for all output files (instead of just the ASL input and +AML output). Includes listings, hex files, etc. + +iASL: Added -G option to the table compiler to allow the compilation of custom +ACPI tables. The only part of a table that is required is the standard 36-byte +ACPI header. + +AcpiXtract: Ported to the standard ACPICA environment (with ACPICA headers), +which also adds correct 64-bit support. Also, now all output filenames are +completely lower case. + +AcpiExec: Ignore any non-AML tables (tables other than DSDT or SSDT) when +loading table files. A warning is issued for any such tables. The only +exception is an FADT. This also fixes a possible fault when attempting to load +non-AML tables. ACPICA BZ 932. + +AcpiHelp: Added the AccessAs and Offset operators. Fixed a problem where a +missing table terminator could cause a fault when using the -p option. + +AcpiSrc: Fixed a possible divide-by-zero fault when generating file +statistics. + +3) Example Code and Data Size + +These are the sizes for the OS-independent acpica.lib produced by the +Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code +includes the debug output trace mechanism and has a much larger code and data +size. + + Previous Release (VC 9.0): + Non-Debug Version: 90.2K Code, 23.9K Data, 114.1K Total + Debug Version: 165.6K Code, 68.4K Data, 234.0K Total + Current Release (VC 9.0): + Non-Debug Version: 90.2K Code, 23.9K Data, 114.1K Total + Debug Version: 165.6K Code, 68.4K Data, 234.0K Total + + +---------------------------------------- +23 June 2011. Summary of changes for version 20110623: + +1) ACPI CA Core Subsystem: + +Updated the predefined name repair mechanism to not attempt repair of a _TSS +return object if a _PSS object is present. We can only sort the _TSS return +package if there is no _PSS within the same scope. This is because if _PSS is +present, the ACPI specification dictates that the _TSS Power Dissipation field +is to be ignored, and therefore some BIOSs leave garbage values in the _TSS +Power field(s). In this case, it is best to just return the _TSS package as- +is. Reported by, and fixed with assistance from Fenghua Yu. + +Added an option to globally disable the control method return value validation +and repair. This runtime option can be used to disable return value repair if +this is causing a problem on a particular machine. Also added an option to +AcpiExec (-dr) to set this disable flag. + +All makefiles and project files: Major changes to improve generation of ACPICA +tools. ACPICA BZ 912: + Reduce default optimization levels to improve compatibility + For Linux, add strict-aliasing=0 for gcc 4 + Cleanup and simplify use of command line defines + Cleanup multithread library support + Improve usage messages + +Linux-specific header: update handling of THREAD_ID and pthread. For the 32- +bit case, improve casting to eliminate possible warnings, especially with the +acpica tools. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug +version of the code includes the debug output trace mechanism and has a much +larger code and data size. + + Previous Release (VC 9.0): + Non-Debug Version: 90.1K Code, 23.9K Data, 114.0K Total + Debug Version: 165.6K Code, 68.4K Data, 234.0K Total + Current Release (VC 9.0): + Non-Debug Version: 90.2K Code, 23.9K Data, 114.1K Total + Debug Version: 165.6K Code, 68.4K Data, 234.0K Total + +2) iASL Compiler/Disassembler and Tools: + +With this release, a new utility named "acpihelp" has been added to the ACPICA +package. This utility summarizes the ACPI specification chapters for the ASL +and AML languages. It generates under Linux/Unix as well as Windows, and +provides the following functionality: + Find/display ASL operator(s) -- with description and syntax. + Find/display ASL keyword(s) -- with exact spelling and descriptions. + Find/display ACPI predefined name(s) -- with description, number + of arguments, and the return value data type. + Find/display AML opcode name(s) -- with opcode, arguments, and grammar. + Decode/display AML opcode -- with opcode name, arguments, and grammar. + +Service Layers: Make multi-thread support configurable. Conditionally compile +the multi-thread support so that threading libraries will not be linked if not +necessary. The only tool that requires multi-thread support is AcpiExec. + +iASL: Update yyerrror/AslCompilerError for "const" errors. Newer versions of +Bison appear to want the interface to yyerror to be a const char * (or at +least this is a problem when generating iASL on some systems.) ACPICA BZ 923 +Pierre Lejeune. + +Tools: Fix for systems where O_BINARY is not defined. Only used for Windows +versions of the tools. + +---------------------------------------- +27 May 2011. Summary of changes for version 20110527: 1) ACPI CA Core Subsystem: Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/contrib/dev/acpica/common/adisasm.c Mon Nov 28 23:36:48 2011 (r228110) @@ -868,6 +868,7 @@ AdParseDeferredOps ( break; case AML_REGION_OP: + case AML_DATA_REGION_OP: case AML_CREATE_QWORD_FIELD_OP: case AML_CREATE_DWORD_FIELD_OP: case AML_CREATE_WORD_FIELD_OP: Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/contrib/dev/acpica/common/adwalk.c Mon Nov 28 23:36:48 2011 (r228110) @@ -378,6 +378,10 @@ AcpiDmDumpDescending ( AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer); break; + case AML_QWORD_OP: + AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (Op->Common.Value.Integer)); + break; + case AML_INT_NAMEPATH_OP: if (Op->Common.Value.String) { Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Mon Nov 28 23:36:48 2011 (r228110) @@ -63,7 +63,7 @@ AcpiDmUpdateResourceName ( static char * AcpiDmSearchTagList ( UINT32 BitIndex, - ACPI_RESOURCE_TAG *TagList); + const ACPI_RESOURCE_TAG *TagList); static char * AcpiDmGetResourceTag ( @@ -108,7 +108,7 @@ AcpiDmAddResourcesToNamespace ( * ******************************************************************************/ -static ACPI_RESOURCE_TAG AcpiDmIrqTags[] = +static const ACPI_RESOURCE_TAG AcpiDmIrqTags[] = { {( 1 * 8), ACPI_RESTAG_INTERRUPT}, {( 3 * 8) + 0, ACPI_RESTAG_INTERRUPTTYPE}, @@ -117,7 +117,7 @@ static ACPI_RESOURCE_TAG AcpiDmIr {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmDmaTags[] = +static const ACPI_RESOURCE_TAG AcpiDmDmaTags[] = { {( 1 * 8), ACPI_RESTAG_DMA}, {( 2 * 8) + 0, ACPI_RESTAG_XFERTYPE}, @@ -126,7 +126,7 @@ static ACPI_RESOURCE_TAG AcpiDmDm {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmIoTags[] = +static const ACPI_RESOURCE_TAG AcpiDmIoTags[] = { {( 1 * 8) + 0, ACPI_RESTAG_DECODE}, {( 2 * 8), ACPI_RESTAG_MINADDR}, @@ -136,14 +136,22 @@ static ACPI_RESOURCE_TAG AcpiDmIo {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmFixedIoTags[] = +static const ACPI_RESOURCE_TAG AcpiDmFixedIoTags[] = { {( 1 * 8), ACPI_RESTAG_BASEADDRESS}, {( 3 * 8), ACPI_RESTAG_LENGTH}, {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmMemory24Tags[] = +static const ACPI_RESOURCE_TAG AcpiDmFixedDmaTags[] = +{ + {( 1 * 8), ACPI_RESTAG_DMA}, + {( 3 * 8), ACPI_RESTAG_DMATYPE}, + {( 5 * 8), ACPI_RESTAG_XFERTYPE}, + {0, NULL} +}; + +static const ACPI_RESOURCE_TAG AcpiDmMemory24Tags[] = { {( 3 * 8) + 0, ACPI_RESTAG_READWRITETYPE}, {( 4 * 8), ACPI_RESTAG_MINADDR}, @@ -153,7 +161,7 @@ static ACPI_RESOURCE_TAG AcpiDmMe {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmRegisterTags[] = +static const ACPI_RESOURCE_TAG AcpiDmRegisterTags[] = { {( 3 * 8), ACPI_RESTAG_ADDRESSSPACE}, {( 4 * 8), ACPI_RESTAG_REGISTERBITWIDTH}, @@ -163,7 +171,7 @@ static ACPI_RESOURCE_TAG AcpiDmRe {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmMemory32Tags[] = +static const ACPI_RESOURCE_TAG AcpiDmMemory32Tags[] = { {( 3 * 8) + 0, ACPI_RESTAG_READWRITETYPE}, {( 4 * 8), ACPI_RESTAG_MINADDR}, @@ -173,7 +181,7 @@ static ACPI_RESOURCE_TAG AcpiDmMe {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmFixedMemory32Tags[] = +static const ACPI_RESOURCE_TAG AcpiDmFixedMemory32Tags[] = { {( 3 * 8) + 0, ACPI_RESTAG_READWRITETYPE}, {( 4 * 8), ACPI_RESTAG_BASEADDRESS}, @@ -181,7 +189,7 @@ static ACPI_RESOURCE_TAG AcpiDmFi {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmInterruptTags[] = +static const ACPI_RESOURCE_TAG AcpiDmInterruptTags[] = { {( 3 * 8) + 1, ACPI_RESTAG_INTERRUPTTYPE}, {( 3 * 8) + 2, ACPI_RESTAG_INTERRUPTLEVEL}, @@ -190,7 +198,7 @@ static ACPI_RESOURCE_TAG AcpiDmIn {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmAddress16Tags[] = +static const ACPI_RESOURCE_TAG AcpiDmAddress16Tags[] = { {( 4 * 8) + 1, ACPI_RESTAG_DECODE}, {( 4 * 8) + 2, ACPI_RESTAG_MINTYPE}, @@ -203,7 +211,7 @@ static ACPI_RESOURCE_TAG AcpiDmAd {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmAddress32Tags[] = +static const ACPI_RESOURCE_TAG AcpiDmAddress32Tags[] = { {( 4 * 8) + 1, ACPI_RESTAG_DECODE}, {( 4 * 8) + 2, ACPI_RESTAG_MINTYPE}, @@ -216,7 +224,7 @@ static ACPI_RESOURCE_TAG AcpiDmAd {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmAddress64Tags[] = +static const ACPI_RESOURCE_TAG AcpiDmAddress64Tags[] = { {( 4 * 8) + 1, ACPI_RESTAG_DECODE}, {( 4 * 8) + 2, ACPI_RESTAG_MINTYPE}, @@ -229,7 +237,7 @@ static ACPI_RESOURCE_TAG AcpiDmAd {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmExtendedAddressTags[] = +static const ACPI_RESOURCE_TAG AcpiDmExtendedAddressTags[] = { {( 4 * 8) + 1, ACPI_RESTAG_DECODE}, {( 4 * 8) + 2, ACPI_RESTAG_MINTYPE}, @@ -243,9 +251,71 @@ static ACPI_RESOURCE_TAG AcpiDmEx {0, NULL} }; -/* Special-case tables for the type-specific flags */ +/* Subtype tables for GPIO descriptors */ + +static const ACPI_RESOURCE_TAG AcpiDmGpioIntTags[] = +{ + {( 7 * 8) + 0, ACPI_RESTAG_MODE}, + {( 7 * 8) + 1, ACPI_RESTAG_POLARITY}, + {( 7 * 8) + 3, ACPI_RESTAG_INTERRUPTSHARE}, + {( 9 * 8), ACPI_RESTAG_PINCONFIG}, + {(10 * 8), ACPI_RESTAG_DRIVESTRENGTH}, + {(12 * 8), ACPI_RESTAG_DEBOUNCETIME}, + {0, NULL} +}; + +static const ACPI_RESOURCE_TAG AcpiDmGpioIoTags[] = +{ + {( 7 * 8) + 0, ACPI_RESTAG_IORESTRICTION}, + {( 7 * 8) + 3, ACPI_RESTAG_INTERRUPTSHARE}, + {( 9 * 8), ACPI_RESTAG_PINCONFIG}, + {(10 * 8), ACPI_RESTAG_DRIVESTRENGTH}, + {(12 * 8), ACPI_RESTAG_DEBOUNCETIME}, + {0, NULL} +}; + +/* Subtype tables for SerialBus descriptors */ + +static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] = +{ + {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, + {( 7 * 8) + 0, ACPI_RESTAG_MODE}, + {(12 * 8), ACPI_RESTAG_SPEED}, + {(16 * 8), ACPI_RESTAG_ADDRESS}, + {0, NULL} +}; + +static const ACPI_RESOURCE_TAG AcpiDmSpiSerialBusTags[] = +{ + {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, + {( 7 * 8) + 0, ACPI_RESTAG_MODE}, + {( 7 * 8) + 1, ACPI_RESTAG_DEVICEPOLARITY}, + {(12 * 8), ACPI_RESTAG_SPEED}, + {(16 * 8), ACPI_RESTAG_LENGTH}, + {(17 * 8), ACPI_RESTAG_PHASE}, + {(18 * 8), ACPI_RESTAG_POLARITY}, + {(19 * 8), ACPI_RESTAG_ADDRESS}, + {0, NULL} +}; + +static const ACPI_RESOURCE_TAG AcpiDmUartSerialBusTags[] = +{ + {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */ + {( 7 * 8) + 0, ACPI_RESTAG_FLOWCONTROL}, + {( 7 * 8) + 2, ACPI_RESTAG_STOPBITS}, + {( 7 * 8) + 4, ACPI_RESTAG_LENGTH}, + {( 7 * 8) + 7, ACPI_RESTAG_ENDIANNESS}, + {(12 * 8), ACPI_RESTAG_SPEED}, + {(16 * 8), ACPI_RESTAG_LENGTH_RX}, + {(18 * 8), ACPI_RESTAG_LENGTH_TX}, + {(20 * 8), ACPI_RESTAG_PARITY}, + {(21 * 8), ACPI_RESTAG_LINE}, + {0, NULL} +}; + +/* Subtype tables for Address descriptor type-specific flags */ -static ACPI_RESOURCE_TAG AcpiDmMemoryFlagTags[] = +static const ACPI_RESOURCE_TAG AcpiDmMemoryFlagTags[] = { {( 5 * 8) + 0, ACPI_RESTAG_READWRITETYPE}, {( 5 * 8) + 1, ACPI_RESTAG_MEMTYPE}, @@ -254,7 +324,7 @@ static ACPI_RESOURCE_TAG AcpiDmMe {0, NULL} }; -static ACPI_RESOURCE_TAG AcpiDmIoFlagTags[] = +static const ACPI_RESOURCE_TAG AcpiDmIoFlagTags[] = { {( 5 * 8) + 0, ACPI_RESTAG_RANGETYPE}, {( 5 * 8) + 4, ACPI_RESTAG_TYPE}, @@ -263,9 +333,15 @@ static ACPI_RESOURCE_TAG AcpiDmIo }; -/* Dispatch table used to obtain the correct tag table for a descriptor */ - -static ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags [] = +/* + * Dispatch table used to obtain the correct tag table for a descriptor. + * + * A NULL in this table means one of three things: + * 1) The descriptor ID is reserved and invalid + * 2) The descriptor has no tags associated with it + * 3) The descriptor has subtypes and a separate table will be used. + */ +static const ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags[] = { /* Small descriptors */ @@ -279,7 +355,7 @@ static ACPI_RESOURCE_TAG *AcpiGbl NULL, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ AcpiDmIoTags, /* 0x08, ACPI_RESOURCE_NAME_IO_PORT */ AcpiDmFixedIoTags, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO_PORT */ - NULL, /* 0x0A, Reserved */ + AcpiDmFixedDmaTags, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */ NULL, /* 0x0B, Reserved */ NULL, /* 0x0C, Reserved */ NULL, /* 0x0D, Reserved */ @@ -299,9 +375,29 @@ static ACPI_RESOURCE_TAG *AcpiGbl AcpiDmAddress16Tags, /* 0x08, ACPI_RESOURCE_NAME_WORD_ADDRESS_SPACE */ AcpiDmInterruptTags, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_XRUPT */ AcpiDmAddress64Tags, /* 0x0A, ACPI_RESOURCE_NAME_QWORD_ADDRESS_SPACE */ - AcpiDmExtendedAddressTags /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */ + AcpiDmExtendedAddressTags, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */ + NULL, /* 0x0C, ACPI_RESOURCE_NAME_GPIO - Use Subtype table below */ + NULL, /* 0x0D, Reserved */ + NULL /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use Subtype table below */ +}; + +/* GPIO Subtypes */ + +static const ACPI_RESOURCE_TAG *AcpiGbl_GpioResourceTags[] = +{ + AcpiDmGpioIntTags, /* 0x00 Interrupt Connection */ + AcpiDmGpioIoTags /* 0x01 I/O Connection */ }; +/* Serial Bus Subtypes */ + +static const ACPI_RESOURCE_TAG *AcpiGbl_SerialResourceTags[] = +{ + NULL, /* 0x00 Reserved */ + AcpiDmI2cSerialBusTags, /* 0x01 I2C SerialBus */ + AcpiDmSpiSerialBusTags, /* 0x02 SPI SerialBus */ + AcpiDmUartSerialBusTags /* 0x03 UART SerialBus */ +}; /* * Globals used to generate unique resource descriptor names. We use names that @@ -666,6 +762,9 @@ AcpiDmUpdateResourceName ( * * DESCRIPTION: Convert a BitIndex into a symbolic resource tag. * + * Note: ResourceIndex should be previously validated and guaranteed to ve + * valid. + * ******************************************************************************/ static char * @@ -674,23 +773,16 @@ AcpiDmGetResourceTag ( AML_RESOURCE *Resource, UINT8 ResourceIndex) { - ACPI_RESOURCE_TAG *TagList; + const ACPI_RESOURCE_TAG *TagList; char *Tag = NULL; /* Get the tag list for this resource descriptor type */ TagList = AcpiGbl_ResourceTags[ResourceIndex]; - if (!TagList) - { - /* There are no tags for this resource type */ - - return (NULL); - } /* - * Handle the type-specific flags field for the address descriptors. - * Kindof brute force, but just blindly search for an index match. + * Handle descriptors that have multiple subtypes */ switch (Resource->DescriptorType) { @@ -699,6 +791,10 @@ AcpiDmGetResourceTag ( case ACPI_RESOURCE_NAME_ADDRESS64: case ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64: + /* + * Subtype differentiation is the flags. + * Kindof brute force, but just blindly search for an index match + */ if (Resource->Address.ResourceType == ACPI_ADDRESS_TYPE_MEMORY_RANGE) { Tag = AcpiDmSearchTagList (BitIndex, AcpiDmMemoryFlagTags); @@ -716,13 +812,42 @@ AcpiDmGetResourceTag ( } break; + case ACPI_RESOURCE_NAME_GPIO: + + /* GPIO connection has 2 subtypes: Interrupt and I/O */ + + if (Resource->Gpio.ConnectionType > AML_RESOURCE_MAX_GPIOTYPE) + { + return (NULL); + } + + TagList = AcpiGbl_GpioResourceTags[Resource->Gpio.ConnectionType]; + break; + + case ACPI_RESOURCE_NAME_SERIAL_BUS: + + /* SerialBus has 3 subtypes: I2C, SPI, and UART */ + + if ((Resource->CommonSerialBus.Type == 0) || + (Resource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)) + { + return (NULL); + } + + TagList = AcpiGbl_SerialResourceTags[Resource->CommonSerialBus.Type]; + break; + default: break; } - /* Search the tag list for this descriptor type */ + /* Search for a match against the BitIndex */ + + if (TagList) + { + Tag = AcpiDmSearchTagList (BitIndex, TagList); + } - Tag = AcpiDmSearchTagList (BitIndex, TagList); return (Tag); } @@ -744,7 +869,7 @@ AcpiDmGetResourceTag ( static char * AcpiDmSearchTagList ( UINT32 BitIndex, - ACPI_RESOURCE_TAG *TagList) + const ACPI_RESOURCE_TAG *TagList) { /* Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Mon Nov 28 23:10:53 2011 (r228109) +++ head/sys/contrib/dev/acpica/common/dmtable.c Mon Nov 28 23:36:48 2011 (r228110) @@ -196,6 +196,16 @@ static const char *AcpiDmMadtS "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */ "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */ "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */ + "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */ + "Generic Interrupt Distributor",/* ACPI_MADT_GENERIC_DISTRIBUTOR */ + "Unknown SubTable Type" /* Reserved */ +}; + +static const char *AcpiDmPmttSubnames[] = +{ + "Socket", /* ACPI_PMTT_TYPE_SOCKET */ + "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */ + "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */ "Unknown SubTable Type" /* Reserved */ }; @@ -268,6 +278,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf, "Alert Standard Format table"}, {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot, "Simple Boot Flag Table"}, {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert, "Boot Error Record Table"}, + {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt, "Boot Graphics Resource Table"}, {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep, "Corrected Platform Error Polling table"}, {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp, "Debug Port table"}, {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar, "DMA Remapping table"}, @@ -275,14 +286,20 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj, "Error Injection table"}, {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst, "Error Record Serialization Table"}, {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt, "Fixed ACPI Description Table"}, + {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt, "Firmware Performance Data Table"}, + {ACPI_SIG_GTDT, AcpiDmTableInfoGtdt, NULL, NULL, TemplateGtdt, "Generic Timer Description Table"}, {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest, "Hardware Error Source Table"}, {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet, "High Precision Event Timer table"}, {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs, "I/O Virtualization Reporting Structure"}, {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt, "Multiple APIC Description Table"}, {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg, "Memory Mapped Configuration table"}, {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"}, + {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"}, {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"}, + {ACPI_SIG_PCCT, NULL, AcpiDmDumpPcct, NULL, NULL, "Platform Communications Channel Table"}, + {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt, "Root System Description Table"}, + {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt, "S3 Performance Table"}, {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst, "Smart Battery Specification Table"}, {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic, "Software Licensing Description Table"}, {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit, "System Locality Information Table"}, @@ -400,7 +417,7 @@ AcpiDmDumpDataTable ( /* * Handle tables that don't use the common ACPI table header structure. - * Currently, these are the FACS and RSDP. + * Currently, these are the FACS, RSDP, and S3PT. */ if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) { @@ -411,6 +428,10 @@ AcpiDmDumpDataTable ( { Length = AcpiDmDumpRsdp (Table); } + else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT)) + { + Length = AcpiDmDumpS3pt (Table); + } else { /* @@ -646,6 +667,7 @@ AcpiDmDumpTable ( case ACPI_DMT_ACCWIDTH: case ACPI_DMT_IVRS: case ACPI_DMT_MADT: + case ACPI_DMT_PMTT: case ACPI_DMT_SRAT: case ACPI_DMT_ASF: case ACPI_DMT_HESTNTYP: @@ -670,6 +692,10 @@ AcpiDmDumpTable ( case ACPI_DMT_SLIC: ByteLength = 4; break; + case ACPI_DMT_UINT40: + ByteLength = 5; + break; + case ACPI_DMT_UINT48: case ACPI_DMT_NAME6: ByteLength = 6; break; @@ -718,6 +744,12 @@ AcpiDmDumpTable ( return (AE_BAD_DATA); } + if (Info->Opcode == ACPI_DMT_EXTRA_TEXT) + { + AcpiOsPrintf ("%s", Info->Name); + continue; + } + /* Start a new line and decode the opcode */ AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name); @@ -745,49 +777,42 @@ AcpiDmDumpTable ( AcpiOsPrintf ("%1.1X\n", *Target & 0x03); break; - case ACPI_DMT_FLAGS2: + case ACPI_DMT_FLAGS1: - AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03); + AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03); break; - /* Standard Data Types */ - - case ACPI_DMT_UINT8: + case ACPI_DMT_FLAGS2: - AcpiOsPrintf ("%2.2X\n", *Target); + AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03); break; - case ACPI_DMT_UINT16: + case ACPI_DMT_FLAGS4: - AcpiOsPrintf ("%4.4X\n", ACPI_GET16 (Target)); + AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03); break; - case ACPI_DMT_UINT24: - - AcpiOsPrintf ("%2.2X%2.2X%2.2X\n", - *Target, *(Target + 1), *(Target + 2)); - break; + /* Integer Data Types */ + case ACPI_DMT_UINT8: + case ACPI_DMT_UINT16: + case ACPI_DMT_UINT24: case ACPI_DMT_UINT32: - - AcpiOsPrintf ("%8.8X\n", ACPI_GET32 (Target)); - break; - + case ACPI_DMT_UINT40: + case ACPI_DMT_UINT48: case ACPI_DMT_UINT56: - - for (Temp8 = 0; Temp8 < 7; Temp8++) + case ACPI_DMT_UINT64: + /* + * Dump bytes - high byte first, low byte last. + * Note: All ACPI tables are little-endian. + */ + for (Temp8 = (UINT8) ByteLength; Temp8 > 0; Temp8--) { - AcpiOsPrintf ("%2.2X", Target[Temp8]); + AcpiOsPrintf ("%2.2X", Target[Temp8 - 1]); } AcpiOsPrintf ("\n"); break; - case ACPI_DMT_UINT64: - - AcpiOsPrintf ("%8.8X%8.8X\n", - ACPI_FORMAT_UINT64 (ACPI_GET64 (Target))); - break; - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 00:17:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60DA5106564A; Tue, 29 Nov 2011 00:17:07 +0000 (UTC) (envelope-from gabor@t-hosting.hu) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id DE3B48FC17; Tue, 29 Nov 2011 00:17:06 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 133D014E66E3; Tue, 29 Nov 2011 00:58:32 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RyWfc2thLE1q; Tue, 29 Nov 2011 00:58:30 +0100 (CET) Received: from [192.168.1.117] (catv-80-98-232-12.catv.broadband.hu [80.98.232.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 160BC14E66E0; Tue, 29 Nov 2011 00:58:30 +0100 (CET) Message-ID: <4ED42023.3080301@t-hosting.hu> Date: Tue, 29 Nov 2011 00:58:27 +0100 From: =?UTF-8?B?R8OhYm9yIEvDtnZlc2TDoW4=?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a2) Gecko/20111122 Thunderbird/10.0a2 MIME-Version: 1.0 To: d@delphij.net References: <201111282016.pASKGtcf007383@svn.freebsd.org> <4ED3ED83.9000001@delphij.net> In-Reply-To: <4ED3ED83.9000001@delphij.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228099 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 00:17:07 -0000 On 2011.11.28. 21:22, Xin LI wrote: > This is useful but could be confusing since xzgrep's behavior could be > different from zgrep. What do you refer to exactly? That zgrep is GNU grep and xzgrep is BSD grep? I acknowledge that this is not documented but xzgrep is a non-standard addition so personally think it is acceptable. Someone called my attention to the archivers/xz port that had a wrapper script for grep, callled xzgrep. This was installed with the port but is not installed in base any more so I got the suggestion to implement it in BSD grep and I think it is a better idea than a wrapper script and it was easy to support. So with this change, this functionality can be used again w/o installing the port although it is not documented. > > Another topic would be ObsoleteFiles.inc (or > OptionalObsoleteFiles.inc) needs to be updated for this as well. I don't think they should be updated. From now on, xzgrep and such are always created and they always point to BSD grep, which can be /usr/bin/grep or /usr/bin/bsdgrep depending on WITH_BSD_GREP. But they always exist and point to one or another. I cannot think of any case when they should be removed. Gabor From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 00:33:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B69106564A; Tue, 29 Nov 2011 00:33:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 54E538FC08; Tue, 29 Nov 2011 00:33:03 +0000 (UTC) Received: from delta.delphij.net (c-76-102-50-245.hsd1.ca.comcast.net [76.102.50.245]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id DFB876B6F; Mon, 28 Nov 2011 16:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1322526783; bh=sCx/DqFttzUGfJHnK8cHgEZj8DY/MvK5Ei+T9ApeKF8=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=AIOkHWttgGgzhB1SJvvUjcQYTzV8UNUqVw9niQY2v8pXrlT3S7XflWFtnuGbPtLL6 F6QI6zJFHUTh68DW9X1+wa9mX77pQDTmGX+RyrkqLXX1MWB/jDNhNFmmGzPmf74hn6 YnltJ3gLheG4r1D1mjn031g3/+8oxPrI+2NR2yN8= Message-ID: <4ED4283E.4040003@delphij.net> Date: Mon, 28 Nov 2011 16:33:02 -0800 From: Xin LI Organization: The FreeBSD Project MIME-Version: 1.0 To: =?UTF-8?B?R8OhYm9yIEvDtnZlc2TDoW4=?= References: <201111282016.pASKGtcf007383@svn.freebsd.org> <4ED3ED83.9000001@delphij.net> <4ED42023.3080301@t-hosting.hu> In-Reply-To: <4ED42023.3080301@t-hosting.hu> OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net Subject: Re: svn commit: r228099 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 00:33:03 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 11/28/11 15:58, Gábor Kövesdán wrote: > On 2011.11.28. 21:22, Xin LI wrote: >> This is useful but could be confusing since xzgrep's behavior >> could be different from zgrep. > What do you refer to exactly? That zgrep is GNU grep and xzgrep is > BSD grep? I acknowledge that this is not documented but xzgrep is > a Yes. > non-standard addition so personally think it is acceptable. > Someone called my attention to the archivers/xz port that had a > wrapper script for grep, callled xzgrep. This was installed with > the port but is not installed in base any more so I got the > suggestion to implement it in BSD grep and I think it is a better > idea than a wrapper script and it was easy to support. So with this > change, this functionality can be used again w/o installing the > port although it is not documented. I'm not quite convinced but your reasoning do have something so let's keep it as-is for now, at least. Eventually we would have the two behave the same so it would not even be a problem for the future. >> Another topic would be ObsoleteFiles.inc (or >> OptionalObsoleteFiles.inc) needs to be updated for this as well. > I don't think they should be updated. From now on, xzgrep and such > are always created and they always point to BSD grep, which can be > /usr/bin/grep or /usr/bin/bsdgrep depending on WITH_BSD_GREP. But > they always exist and point to one or another. I cannot think of > any case when they should be removed. Ah ok, I thought there was an option to disable building of bsdgrep but I were wrong here. Sorry for the noise. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJO1Cg9AAoJEATO+BI/yjfB+yAIAK7v7GJNaBIa25TFnbw4siRb c7LZ0VOp2W3i+QlmzhoWDFkW4SLedol93dKiD5ymDAhTrgaN/KS1ul2vb3kYrrr7 ZblinAfb1/NSWEtmQaUqZffExT1wBpGhLPRKm979Mn6BMHgaV5f+PqKw36uTwuqA 9O8AFZnEsplkf5FI71758yXugS48DzJnaAD/7/jC7v/l2GNHs7l+HMTBOS50/I/2 mLX98uerCYvIZ9U51Le4J9WI62oN9HcmVqTG0brUvVYCyEtL7Cjf8MrYE3b1m16l q5YU1uyTMQPTpQhIlRGUe80hcNN0kROpjR5hez0i/2gKXp3BSKVPyB0peTC34n0= =6v/S -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 01:24:07 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7245E106564A; Tue, 29 Nov 2011 01:24:07 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id D90468FC16; Tue, 29 Nov 2011 01:24:06 +0000 (UTC) Received: from lstewart1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 272F47E820; Tue, 29 Nov 2011 12:24:04 +1100 (EST) Message-ID: <4ED43433.7090400@freebsd.org> Date: Tue, 29 Nov 2011 12:24:03 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111016 Thunderbird/7.0.1 MIME-Version: 1.0 To: John Baldwin References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <8805563E-60F9-4BF4-A292-1A43C4FA368A@cubinlab.ee.unimelb.edu.au> <4ECCA2A1.4020408@freebsd.org> <201111281420.43310.jhb@freebsd.org> In-Reply-To: <201111281420.43310.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Julien Ridoux , Ben Kaduk Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 01:24:07 -0000 On 11/29/11 06:20, John Baldwin wrote: > On Wednesday, November 23, 2011 2:37:05 am Lawrence Stewart wrote: >> On 11/23/11 17:42, Julien Ridoux wrote: >>> >>> On 23/11/2011, at 1:00 AM, Lawrence Stewart wrote: >>> >>>> On 11/23/11 00:30, John Baldwin wrote: >>>>> Think of standalone modules that are not built as part of a >>>>> kernel (e.g. 3rd party device drivers). In general we should >>>>> avoid having structures change size for kernel options, >>>>> especially common structures. It just adds lots of pain and >>>>> suffering and complexity. We are stuck with it for PAE on i386 >>>>> (which causes pain), and for LOCK_PROFILING (but that is >>>>> sufficiently rare and expensive it seems to be ok). I think 8 >>>>> bytes for bpf packet is not sufficiently expensive to justify the >>>>> extra headache. Just always leave the new field in. >>>> >>>> hmm... Julien almost has a patch finished which accomplishes what >>>> my most recent email in this thread describes. Julien, I suggest we >>>> get it finished and follow up to this thread with a pointer to the >>>> patch for people to look at. If there's still a strong feeling that >>>> what it does is going to bring pain we can do away with the new >>>> BPF_FFCOUNTER config option and have the bpf header struct just >>>> grow by 8 bytes. >>>> >>>> Stay tuned... >>> >>> Thanks all for the feedback. With some delay, I have a patch against >>> r227871 that implements what Lawrence proposed. You can find it >>> here: >>> http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/ffclock-bpf-header- > r227871.patch >> >> There are a few nits, but the patch implements what I envisaged, thanks >> Julien. >> >>> I have tested this under a few typical scenario, it works as >>> expected but already brings some headaches (hence the long delay >>> mentioned above :-)). >>> >>> I thought a bit more of user cases. I believe many of them call for >>> having both feed-forward counter and its conversion in second be >>> present in the BPF header. For example, this allows to have absolute >>> packet departure/arrival times (as per usual), but also provides the >>> opportunity to compute inter-arrival times accurately using the >>> difference clock. There are other examples I can think of, and if one >>> believe the feed-forward clock approach becomes more popular, such >>> usages will be more and more common. >>> >>> Assuming the BPF header grows by 8 bytes independent of any kernel >>> option, I admit that the current implementation is a bit ugly. The >>> BPF structure is not nicely packed and looks clunky. Ideally, the >>> feed-forward counter should be placed just below the bh_tstamp >>> member, but this would require libpcap and all ports depending on it >>> to be recompiled after this change. >> >> Even though it looks a bit gross, we would still add it at the end to >> avoid gratuitously breaking binaries. We would then also add some >> explicit padding in the struct to soak up the redundant space left in >> between it and the second last struct member. > > If this is not something you expect to MFC, then I would just add it > where it makes the most sense. One question I have is if this affects > the file format of what tcpdump -w writes out and tcpdump -r reads in? My understanding from discussion with Julien and a brief code inspection is that libpcap asks for the fields from the BPF header by name, and therefore any new field is opaque until libpcap is patched to care about it. > If that is affected then changing this will need much more thought. If > not, then I think it should be fixed "right" in 10. If you need to MFC > it then you may need to do some gymnatics to preserve the ABI in stable > branches, but we prefer to keep HEAD clean so we don't build up layer > upon layer of compat hacks. hmm, ok. >>> What is your favourite option? >> >> FreeBSD parlance is to ask what colour you would like to paint the >> bikeshed ;) >> >> As I've never experienced the pain John refers to, I'll defer to the >> wisdom of others on whether the proposed patch will create pain down the >> road. I think it's ok, but if consensus is 8bytes per packet isn't going >> to break the bank, I guess we just go for it - but I guess I am cautious >> about this route as we can push a lot of packets per second through the >> stack. > > In my limited experience the limit on pushing pps through bpf(4) isn't due > to the size of the bpf packet header itself but has more to do with disk > I/O transactions, etc. I was more concerned about the fact that when pushing lots of packets per second, an extra 8 bytes could add up to a noticeable increase in memory usage, though it wouldn't really be an issue until we're talking about Mpps - I guess at 10GigE rates we can assume memory is likely to be abundant and a worst case extra ~100Mbytes of kernel mem usage won't hurt? Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 03:27:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63B0A1065672; Tue, 29 Nov 2011 03:27:10 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535988FC08; Tue, 29 Nov 2011 03:27:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT3RAwt021702; Tue, 29 Nov 2011 03:27:10 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT3RAs2021700; Tue, 29 Nov 2011 03:27:10 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290327.pAT3RAs2021700@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 03:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228112 - head/rescue/rescue X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 03:27:10 -0000 Author: fjoe Date: Tue Nov 29 03:27:09 2011 New Revision: 228112 URL: http://svn.freebsd.org/changeset/base/228112 Log: -lreadline is not required anymore. Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Tue Nov 29 02:07:07 2011 (r228111) +++ head/rescue/rescue/Makefile Tue Nov 29 03:27:09 2011 (r228112) @@ -125,7 +125,7 @@ CRUNCH_LIBS+= -lipx .if ${MK_ZFS} != "no" CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem .endif -CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz +CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz .if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 03:49:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 390F61065670; Tue, 29 Nov 2011 03:49:04 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2821A8FC18; Tue, 29 Nov 2011 03:49:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT3n3s1022404; Tue, 29 Nov 2011 03:49:03 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT3n3xP022401; Tue, 29 Nov 2011 03:49:03 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290349.pAT3n3xP022401@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 03:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228113 - in head/kerberos5: usr.bin/kadmin usr.sbin/ktutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 03:49:04 -0000 Author: fjoe Date: Tue Nov 29 03:49:03 2011 New Revision: 228113 URL: http://svn.freebsd.org/changeset/base/228113 Log: Link with -ledit instead of -lreadline. Modified: head/kerberos5/usr.bin/kadmin/Makefile head/kerberos5/usr.sbin/ktutil/Makefile Modified: head/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- head/kerberos5/usr.bin/kadmin/Makefile Tue Nov 29 03:27:09 2011 (r228112) +++ head/kerberos5/usr.bin/kadmin/Makefile Tue Nov 29 03:49:03 2011 (r228113) @@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DI DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \ ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \ ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBREADLINE} ${LIBNCURSES} ${LDAPDPADD} + ${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD} LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \ ${LIBSL} -lroken ${LIBVERS} -lasn1 \ -lcrypto -lcrypt -lcom_err \ - -lreadline -lncurses ${LDAPLDADD} + -ledit -lncurses ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include Modified: head/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- head/kerberos5/usr.sbin/ktutil/Makefile Tue Nov 29 03:27:09 2011 (r228112) +++ head/kerberos5/usr.sbin/ktutil/Makefile Tue Nov 29 03:49:03 2011 (r228113) @@ -18,10 +18,10 @@ SRCS= add.c \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I. DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBHX509} ${LIBSL} ${LIBROKEN} ${LIBVERS} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBREADLINE} ${LIBNCURSES} + ${LIBEDIT} ${LIBNCURSES} LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBSL} -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err \ - -lreadline -lncurses + -ledit -lncurses .include From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 04:50:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC9CC1065673; Tue, 29 Nov 2011 04:50:57 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C16F8FC0A; Tue, 29 Nov 2011 04:50:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT4ovbX024317; Tue, 29 Nov 2011 04:50:57 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT4ovZf024314; Tue, 29 Nov 2011 04:50:57 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290450.pAT4ovZf024314@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 04:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228114 - head/lib/libedit/edit/readline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 04:50:57 -0000 Author: fjoe Date: Tue Nov 29 04:50:57 2011 New Revision: 228114 URL: http://svn.freebsd.org/changeset/base/228114 Log: - Hide _rl_qsort_string_compare() that should be private to libreadline() implementation. - Add symlink /usr/include/edit/readline/tilde.h -> readline.h All this makes it possible to build and link gdb with -ledit. Modified: head/lib/libedit/edit/readline/Makefile head/lib/libedit/edit/readline/readline.h Modified: head/lib/libedit/edit/readline/Makefile ============================================================================== --- head/lib/libedit/edit/readline/Makefile Tue Nov 29 03:49:03 2011 (r228113) +++ head/lib/libedit/edit/readline/Makefile Tue Nov 29 04:50:57 2011 (r228114) @@ -2,6 +2,7 @@ # $FreeBSD$ INCS= readline.h history.h +SYMLINKS= readline.h ${INCLUDEDIR}/edit/readline/tilde.h INCSDIR= ${INCLUDEDIR}/edit/readline Modified: head/lib/libedit/edit/readline/readline.h ============================================================================== --- head/lib/libedit/edit/readline/readline.h Tue Nov 29 03:49:03 2011 (r228113) +++ head/lib/libedit/edit/readline/readline.h Tue Nov 29 04:50:57 2011 (r228114) @@ -200,7 +200,6 @@ void rl_get_screen_size(int *, int *); void rl_set_screen_size(int, int); char *rl_filename_completion_function (const char *, int); int _rl_abort_internal(void); -int _rl_qsort_string_compare(char **, char **); char **rl_completion_matches(const char *, rl_compentry_func_t *); void rl_forced_update_display(void); int rl_set_prompt(const char *); From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 06:12:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45AC3106564A; Tue, 29 Nov 2011 06:12:20 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F00F18FC0A; Tue, 29 Nov 2011 06:12:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT6CJNe026829; Tue, 29 Nov 2011 06:12:19 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT6CJ5P026827; Tue, 29 Nov 2011 06:12:19 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111290612.pAT6CJ5P026827@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 29 Nov 2011 06:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228115 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 06:12:20 -0000 Author: lstewart Date: Tue Nov 29 06:12:19 2011 New Revision: 228115 URL: http://svn.freebsd.org/changeset/base/228115 Log: Fix an oversight in r227747 by calling fbclock_bin{up}time() directly from the fbclock_{nanouptime|microuptime|bintime|nanotime|microtime}() functions to avoid indirecting through a sysclock_ops wrapper function. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Nov 29 04:50:57 2011 (r228114) +++ head/sys/kern/kern_tc.c Tue Nov 29 06:12:19 2011 (r228115) @@ -197,7 +197,7 @@ fbclock_nanouptime(struct timespec *tsp) { struct bintime bt; - binuptime(&bt); + fbclock_binuptime(&bt); bintime2timespec(&bt, tsp); } @@ -206,7 +206,7 @@ fbclock_microuptime(struct timeval *tvp) { struct bintime bt; - binuptime(&bt); + fbclock_binuptime(&bt); bintime2timeval(&bt, tvp); } @@ -214,7 +214,7 @@ static void fbclock_bintime(struct bintime *bt) { - binuptime(bt); + fbclock_binuptime(bt); bintime_add(bt, &boottimebin); } @@ -223,7 +223,7 @@ fbclock_nanotime(struct timespec *tsp) { struct bintime bt; - bintime(&bt); + fbclock_bintime(&bt); bintime2timespec(&bt, tsp); } @@ -232,7 +232,7 @@ fbclock_microtime(struct timeval *tvp) { struct bintime bt; - bintime(&bt); + fbclock_bintime(&bt); bintime2timeval(&bt, tvp); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 06:21:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A611F106566B; Tue, 29 Nov 2011 06:21:01 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95AB28FC08; Tue, 29 Nov 2011 06:21:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT6L15v027180; Tue, 29 Nov 2011 06:21:01 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT6L1XG027178; Tue, 29 Nov 2011 06:21:01 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290621.pAT6L1XG027178@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 06:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228116 - head/lib/libedit/edit/readline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 06:21:01 -0000 Author: fjoe Date: Tue Nov 29 06:21:01 2011 New Revision: 228116 URL: http://svn.freebsd.org/changeset/base/228116 Log: Use INCSLINKS so that "make installincludes" installs links during buildworld. Modified: head/lib/libedit/edit/readline/Makefile Modified: head/lib/libedit/edit/readline/Makefile ============================================================================== --- head/lib/libedit/edit/readline/Makefile Tue Nov 29 06:12:19 2011 (r228115) +++ head/lib/libedit/edit/readline/Makefile Tue Nov 29 06:21:01 2011 (r228116) @@ -2,7 +2,7 @@ # $FreeBSD$ INCS= readline.h history.h -SYMLINKS= readline.h ${INCLUDEDIR}/edit/readline/tilde.h +INCSLINKS= readline.h ${INCSDIR}/tilde.h INCSDIR= ${INCLUDEDIR}/edit/readline From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 06:53:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D8A1065672; Tue, 29 Nov 2011 06:53:36 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EBFC8FC12; Tue, 29 Nov 2011 06:53:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT6rauT028154; Tue, 29 Nov 2011 06:53:36 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT6ras1028151; Tue, 29 Nov 2011 06:53:36 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111290653.pAT6ras1028151@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 29 Nov 2011 06:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228117 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 06:53:36 -0000 Author: lstewart Date: Tue Nov 29 06:53:36 2011 New Revision: 228117 URL: http://svn.freebsd.org/changeset/base/228117 Log: Make the fbclock_[get]{bin,nano,micro}[up]time() function prototypes public so that new APIs with some performance sensitivity can be built on top of them. These functions should not be called directly except in special circumstances. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/kern/kern_tc.c head/sys/sys/timeffc.h Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Nov 29 06:21:01 2011 (r228116) +++ head/sys/kern/kern_tc.c Tue Nov 29 06:53:36 2011 (r228117) @@ -178,7 +178,7 @@ tc_delta(struct timehands *th) */ #ifdef FFCLOCK -static void +void fbclock_binuptime(struct bintime *bt) { struct timehands *th; @@ -192,7 +192,7 @@ fbclock_binuptime(struct bintime *bt) } while (gen == 0 || gen != th->th_generation); } -static void +void fbclock_nanouptime(struct timespec *tsp) { struct bintime bt; @@ -201,7 +201,7 @@ fbclock_nanouptime(struct timespec *tsp) bintime2timespec(&bt, tsp); } -static void +void fbclock_microuptime(struct timeval *tvp) { struct bintime bt; @@ -210,7 +210,7 @@ fbclock_microuptime(struct timeval *tvp) bintime2timeval(&bt, tvp); } -static void +void fbclock_bintime(struct bintime *bt) { @@ -218,7 +218,7 @@ fbclock_bintime(struct bintime *bt) bintime_add(bt, &boottimebin); } -static void +void fbclock_nanotime(struct timespec *tsp) { struct bintime bt; @@ -227,7 +227,7 @@ fbclock_nanotime(struct timespec *tsp) bintime2timespec(&bt, tsp); } -static void +void fbclock_microtime(struct timeval *tvp) { struct bintime bt; @@ -236,7 +236,7 @@ fbclock_microtime(struct timeval *tvp) bintime2timeval(&bt, tvp); } -static void +void fbclock_getbinuptime(struct bintime *bt) { struct timehands *th; @@ -249,7 +249,7 @@ fbclock_getbinuptime(struct bintime *bt) } while (gen == 0 || gen != th->th_generation); } -static void +void fbclock_getnanouptime(struct timespec *tsp) { struct timehands *th; @@ -262,7 +262,7 @@ fbclock_getnanouptime(struct timespec *t } while (gen == 0 || gen != th->th_generation); } -static void +void fbclock_getmicrouptime(struct timeval *tvp) { struct timehands *th; @@ -275,7 +275,7 @@ fbclock_getmicrouptime(struct timeval *t } while (gen == 0 || gen != th->th_generation); } -static void +void fbclock_getbintime(struct bintime *bt) { struct timehands *th; @@ -289,7 +289,7 @@ fbclock_getbintime(struct bintime *bt) bintime_add(bt, &boottimebin); } -static void +void fbclock_getnanotime(struct timespec *tsp) { struct timehands *th; @@ -302,7 +302,7 @@ fbclock_getnanotime(struct timespec *tsp } while (gen == 0 || gen != th->th_generation); } -static void +void fbclock_getmicrotime(struct timeval *tvp) { struct timehands *th; Modified: head/sys/sys/timeffc.h ============================================================================== --- head/sys/sys/timeffc.h Tue Nov 29 06:21:01 2011 (r228116) +++ head/sys/sys/timeffc.h Tue Nov 29 06:53:36 2011 (r228117) @@ -164,6 +164,28 @@ void ffclock_bindifftime(ffcounter ffdel void ffclock_nanodifftime(ffcounter ffdelta, struct timespec *tsp); void ffclock_microdifftime(ffcounter ffdelta, struct timeval *tvp); +/* + * When FFCLOCK is enabled in the kernel, [get]{bin,nano,micro}[up]time() become + * wrappers around equivalent feedback or feed-forward functions. Provide access + * outside of kern_tc.c to the feedback clock equivalent functions for + * specialised use i.e. these are not for general consumption. + */ +void fbclock_bintime(struct bintime *bt); +void fbclock_nanotime(struct timespec *tsp); +void fbclock_microtime(struct timeval *tvp); + +void fbclock_getbintime(struct bintime *bt); +void fbclock_getnanotime(struct timespec *tsp); +void fbclock_getmicrotime(struct timeval *tvp); + +void fbclock_binuptime(struct bintime *bt); +void fbclock_nanouptime(struct timespec *tsp); +void fbclock_microuptime(struct timeval *tvp); + +void fbclock_getbinuptime(struct bintime *bt); +void fbclock_getnanouptime(struct timespec *tsp); +void fbclock_getmicrouptime(struct timeval *tvp); + #else /* !_KERNEL */ /* Feed-Forward Clock system calls. */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 07:59:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93C2D1065670; Tue, 29 Nov 2011 07:59:45 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82E978FC16; Tue, 29 Nov 2011 07:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT7xjo1030208; Tue, 29 Nov 2011 07:59:45 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT7xjGe030206; Tue, 29 Nov 2011 07:59:45 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111290759.pAT7xjGe030206@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 29 Nov 2011 07:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228118 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 07:59:45 -0000 Author: lstewart Date: Tue Nov 29 07:59:45 2011 New Revision: 228118 URL: http://svn.freebsd.org/changeset/base/228118 Log: Introduce the new "fromclock" public wrapper API which allows consumers to select which system clock to obtain time from, independent of the current default system clock. In the brave new multi sysclock world, both feedback and feed-forward system clocks can be maintained and used concurrently, so this API provides a minimalist first step for interested consumers to exercise control over their choice of system clock. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/sys/timeffc.h Modified: head/sys/sys/timeffc.h ============================================================================== --- head/sys/sys/timeffc.h Tue Nov 29 06:53:36 2011 (r228117) +++ head/sys/sys/timeffc.h Tue Nov 29 07:59:45 2011 (r228118) @@ -186,6 +186,132 @@ void fbclock_getbinuptime(struct bintime void fbclock_getnanouptime(struct timespec *tsp); void fbclock_getmicrouptime(struct timeval *tvp); +/* + * Public system clock wrapper API which allows consumers to select which clock + * to obtain time from, independent of the current default system clock. These + * wrappers should be used instead of directly calling the underlying fbclock_ + * or ffclock_ functions. + */ +static inline void +bintime_fromclock(struct bintime *bt, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_bintime(bt); + else + fbclock_bintime(bt); +} + +static inline void +nanotime_fromclock(struct timespec *tsp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_nanotime(tsp); + else + fbclock_nanotime(tsp); +} + +static inline void +microtime_fromclock(struct timeval *tvp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_microtime(tvp); + else + fbclock_microtime(tvp); +} + +static inline void +getbintime_fromclock(struct bintime *bt, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_getbintime(bt); + else + fbclock_getbintime(bt); +} + +static inline void +getnanotime_fromclock(struct timespec *tsp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_getnanotime(tsp); + else + fbclock_getnanotime(tsp); +} + +static inline void +getmicrotime_fromclock(struct timeval *tvp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_getmicrotime(tvp); + else + fbclock_getmicrotime(tvp); +} + +static inline void +binuptime_fromclock(struct bintime *bt, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_binuptime(bt); + else + fbclock_binuptime(bt); +} + +static inline void +nanouptime_fromclock(struct timespec *tsp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_nanouptime(tsp); + else + fbclock_nanouptime(tsp); +} + +static inline void +microuptime_fromclock(struct timeval *tvp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_microuptime(tvp); + else + fbclock_microuptime(tvp); +} + +static inline void +getbinuptime_fromclock(struct bintime *bt, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_getbinuptime(bt); + else + fbclock_getbinuptime(bt); +} + +static inline void +getnanouptime_fromclock(struct timespec *tsp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_getnanouptime(tsp); + else + fbclock_getnanouptime(tsp); +} + +static inline void +getmicrouptime_fromclock(struct timeval *tvp, int whichclock) +{ + + if (whichclock == SYSCLOCK_FFWD) + ffclock_getmicrouptime(tvp); + else + fbclock_getmicrouptime(tvp); +} + #else /* !_KERNEL */ /* Feed-Forward Clock system calls. */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:16:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFE091065672; Tue, 29 Nov 2011 08:16:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF69B8FC0A; Tue, 29 Nov 2011 08:16:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8GErL030805; Tue, 29 Nov 2011 08:16:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8GENU030803; Tue, 29 Nov 2011 08:16:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201111290816.pAT8GENU030803@svn.freebsd.org> From: Xin LI Date: Tue, 29 Nov 2011 08:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228119 - head/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:16:14 -0000 Author: delphij Date: Tue Nov 29 08:16:14 2011 New Revision: 228119 URL: http://svn.freebsd.org/changeset/base/228119 Log: In build_volume(), check if arrays is allocated before traversing its items. While parsing the arrays input, it's possible that we reach the error path before initializing the 'arrays' pointer, which in turn leads to a NULL deference. Submitted by: Garrett Cooper MFC after: 1 week Modified: head/usr.sbin/mfiutil/mfi_config.c Modified: head/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_config.c Tue Nov 29 07:59:45 2011 (r228118) +++ head/usr.sbin/mfiutil/mfi_config.c Tue Nov 29 08:16:14 2011 (r228119) @@ -820,9 +820,11 @@ error: free(config); free(state.volumes); free(state.arrays); - for (i = 0; i < narrays; i++) - free(arrays[i].drives); - free(arrays); + if (arrays != NULL) { + for (i = 0; i < narrays; i++) + free(arrays[i].drives); + free(arrays); + } close(fd); return (error); From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:20:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F303106566B; Tue, 29 Nov 2011 08:20:23 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0438FC19; Tue, 29 Nov 2011 08:20:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8KN58030983; Tue, 29 Nov 2011 08:20:23 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8KNRS030981; Tue, 29 Nov 2011 08:20:23 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290820.pAT8KNRS030981@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 08:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228120 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:20:23 -0000 Author: fjoe Date: Tue Nov 29 08:20:23 2011 New Revision: 228120 URL: http://svn.freebsd.org/changeset/base/228120 Log: Allow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf. This is required to override knobs (e.g. WITH_PROFILE) during buildworld stages in Makefile.inc1 (otherwise the build is stopped due to both WITH_FOO and WITHOUT_FOO defined). Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Nov 29 08:16:14 2011 (r228119) +++ head/share/mk/bsd.own.mk Tue Nov 29 08:20:23 2011 (r228120) @@ -207,6 +207,9 @@ COMPRESS_EXT?= .gz MAN \ PROFILE .if defined(NO_${var}) +.if defined(WITH_${var}) +.undef WITH_${var} +.endif WITHOUT_${var}= .endif .endfor From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:21:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD3DC1065670; Tue, 29 Nov 2011 08:21:54 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3AA78FC13; Tue, 29 Nov 2011 08:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8LsTM031064; Tue, 29 Nov 2011 08:21:54 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8Lsnc031062; Tue, 29 Nov 2011 08:21:54 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290821.pAT8Lsnc031062@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 08:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228121 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:21:55 -0000 Author: fjoe Date: Tue Nov 29 08:21:54 2011 New Revision: 228121 URL: http://svn.freebsd.org/changeset/base/228121 Log: Fix typo in comments (conversation -> conversion). Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Nov 29 08:20:23 2011 (r228120) +++ head/sys/conf/kern.mk Tue Nov 29 08:21:54 2011 (r228121) @@ -128,7 +128,7 @@ CFLAGS+= -fstack-protector .endif # -# Enable CTF conversation on request +# Enable CTF conversion on request # .if defined(WITH_CTF) .undef NO_CTF From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:22:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AFFA1065680; Tue, 29 Nov 2011 08:22:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7AB8FC13; Tue, 29 Nov 2011 08:22:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8MCX6031119; Tue, 29 Nov 2011 08:22:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8MCSD031117; Tue, 29 Nov 2011 08:22:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201111290822.pAT8MCSD031117@svn.freebsd.org> From: Doug Barton Date: Tue, 29 Nov 2011 08:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228122 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:22:13 -0000 Author: dougb Date: Tue Nov 29 08:22:12 2011 New Revision: 228122 URL: http://svn.freebsd.org/changeset/base/228122 Log: If using DISTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo PR: bin/162891 Submitted by: Helge Oldach Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Tue Nov 29 08:21:54 2011 (r228121) +++ head/usr.sbin/mergemaster/mergemaster.sh Tue Nov 29 08:22:12 2011 (r228122) @@ -1336,14 +1336,14 @@ esac if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC echo '' + [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime" - [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" tzsetup $tzs_args -r else echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime." echo ' You should run tzsetup' - run_it_now tzsetup + run_it_now "tzsetup $tzs_args" fi fi From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:33:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D446B106566B; Tue, 29 Nov 2011 08:33:40 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C31B48FC0C; Tue, 29 Nov 2011 08:33:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8XevP031529; Tue, 29 Nov 2011 08:33:40 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8Xevg031527; Tue, 29 Nov 2011 08:33:40 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111290833.pAT8Xevg031527@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 29 Nov 2011 08:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228123 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:33:40 -0000 Author: lstewart Date: Tue Nov 29 08:33:40 2011 New Revision: 228123 URL: http://svn.freebsd.org/changeset/base/228123 Log: Do away with the somewhat clunky sysclock_ops structure and associated code, reimplementing the [get]{bin,nano,micro}[up]time() wrapper functions in terms of the new "fromclock" API instead. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Nov 29 08:22:12 2011 (r228122) +++ head/sys/kern/kern_tc.c Tue Nov 29 08:33:40 2011 (r228123) @@ -470,38 +470,6 @@ uint32_t ffclock_status; /* Feed-forwar int8_t ffclock_updated; /* New estimates are available. */ struct mtx ffclock_mtx; /* Mutex on ffclock_estimate. */ -struct sysclock_ops { - int active; - void (*binuptime) (struct bintime *bt); - void (*nanouptime) (struct timespec *tsp); - void (*microuptime) (struct timeval *tvp); - void (*bintime) (struct bintime *bt); - void (*nanotime) (struct timespec *tsp); - void (*microtime) (struct timeval *tvp); - void (*getbinuptime) (struct bintime *bt); - void (*getnanouptime) (struct timespec *tsp); - void (*getmicrouptime) (struct timeval *tvp); - void (*getbintime) (struct bintime *bt); - void (*getnanotime) (struct timespec *tsp); - void (*getmicrotime) (struct timeval *tvp); -}; - -static struct sysclock_ops sysclock = { - .active = SYSCLOCK_FBCK, - .binuptime = fbclock_binuptime, - .nanouptime = fbclock_nanouptime, - .microuptime = fbclock_microuptime, - .bintime = fbclock_bintime, - .nanotime = fbclock_nanotime, - .microtime = fbclock_microtime, - .getbinuptime = fbclock_getbinuptime, - .getnanouptime = fbclock_getnanouptime, - .getmicrouptime = fbclock_getmicrouptime, - .getbintime = fbclock_getbintime, - .getnanotime = fbclock_getnanotime, - .getmicrotime = fbclock_getmicrotime -}; - struct fftimehands { struct ffclock_estimate cest; struct bintime tick_time; @@ -794,46 +762,6 @@ ffclock_change_tc(struct timehands *th) fftimehands = ffth; } -static void -change_sysclock(int new_sysclock) -{ - - sysclock.active = new_sysclock; - - switch (sysclock.active) { - case SYSCLOCK_FBCK: - sysclock.binuptime = fbclock_binuptime; - sysclock.nanouptime = fbclock_nanouptime; - sysclock.microuptime = fbclock_microuptime; - sysclock.bintime = fbclock_bintime; - sysclock.nanotime = fbclock_nanotime; - sysclock.microtime = fbclock_microtime; - sysclock.getbinuptime = fbclock_getbinuptime; - sysclock.getnanouptime = fbclock_getnanouptime; - sysclock.getmicrouptime = fbclock_getmicrouptime; - sysclock.getbintime = fbclock_getbintime; - sysclock.getnanotime = fbclock_getnanotime; - sysclock.getmicrotime = fbclock_getmicrotime; - break; - case SYSCLOCK_FFWD: - sysclock.binuptime = ffclock_binuptime; - sysclock.nanouptime = ffclock_nanouptime; - sysclock.microuptime = ffclock_microuptime; - sysclock.bintime = ffclock_bintime; - sysclock.nanotime = ffclock_nanotime; - sysclock.microtime = ffclock_microtime; - sysclock.getbinuptime = ffclock_getbinuptime; - sysclock.getnanouptime = ffclock_getnanouptime; - sysclock.getmicrouptime = ffclock_getmicrouptime; - sysclock.getbintime = ffclock_getbintime; - sysclock.getnanotime = ffclock_getnanotime; - sysclock.getmicrotime = ffclock_getmicrotime; - break; - default: - break; - } -} - /* * Retrieve feed-forward counter and time of last kernel tick. */ @@ -949,84 +877,84 @@ void binuptime(struct bintime *bt) { - sysclock.binuptime(bt); + binuptime_fromclock(bt, sysclock_active); } void nanouptime(struct timespec *tsp) { - sysclock.nanouptime(tsp); + nanouptime_fromclock(tsp, sysclock_active); } void microuptime(struct timeval *tvp) { - sysclock.microuptime(tvp); + microuptime_fromclock(tvp, sysclock_active); } void bintime(struct bintime *bt) { - sysclock.bintime(bt); + bintime_fromclock(bt, sysclock_active); } void nanotime(struct timespec *tsp) { - sysclock.nanotime(tsp); + nanotime_fromclock(tsp, sysclock_active); } void microtime(struct timeval *tvp) { - sysclock.microtime(tvp); + microtime_fromclock(tvp, sysclock_active); } void getbinuptime(struct bintime *bt) { - sysclock.getbinuptime(bt); + getbinuptime_fromclock(bt, sysclock_active); } void getnanouptime(struct timespec *tsp) { - sysclock.getnanouptime(tsp); + getnanouptime_fromclock(tsp, sysclock_active); } void getmicrouptime(struct timeval *tvp) { - sysclock.getmicrouptime(tvp); + getmicrouptime_fromclock(tvp, sysclock_active); } void getbintime(struct bintime *bt) { - sysclock.getbintime(bt); + getbintime_fromclock(bt, sysclock_active); } void getnanotime(struct timespec *tsp) { - sysclock.getnanotime(tsp); + getnanotime_fromclock(tsp, sysclock_active); } void getmicrotime(struct timeval *tvp) { - sysclock.getmicrouptime(tvp); + getmicrouptime_fromclock(tvp, sysclock_active); } #endif /* FFCLOCK */ @@ -1268,11 +1196,6 @@ tc_windup(void) scale /= th->th_counter->tc_frequency; th->th_scale = scale * 2; -#ifdef FFCLOCK - if (sysclock_active != sysclock.active) - change_sysclock(sysclock_active); -#endif - /* * Now that the struct timehands is again consistent, set the new * generation number, making sure to not make it zero. @@ -1641,7 +1564,6 @@ inittimecounter(void *dummy) #ifdef FFCLOCK ffclock_init(); - change_sysclock(sysclock_active); #endif /* warm up new timecounter (again) and get rolling. */ (void)timecounter->tc_get_timecount(timecounter); From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:38:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07159106564A; Tue, 29 Nov 2011 08:38:48 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E94E08FC1A; Tue, 29 Nov 2011 08:38:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8cl0N031716; Tue, 29 Nov 2011 08:38:47 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8clOa031710; Tue, 29 Nov 2011 08:38:47 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111290838.pAT8clOa031710@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 08:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228124 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:38:48 -0000 Author: fjoe Date: Tue Nov 29 08:38:47 2011 New Revision: 228124 URL: http://svn.freebsd.org/changeset/base/228124 Log: Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead of executing a shell on every object or executable/library file. This shaves off more than 30,000 shell invocations during buildworld. Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Nov 29 08:33:40 2011 (r228123) +++ head/share/mk/bsd.lib.mk Tue Nov 29 08:38:47 2011 (r228124) @@ -75,15 +75,15 @@ PO_FLAG=-pg .c.po: ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .c.So: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -96,47 +96,47 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.po: ${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif all: objwarn @@ -211,9 +211,9 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}) +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} +.endif .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Tue Nov 29 08:33:40 2011 (r228123) +++ head/share/mk/bsd.prog.mk Tue Nov 29 08:38:47 2011 (r228124) @@ -60,9 +60,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .else # !defined(SRCS) @@ -90,9 +90,9 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} && \ - ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}) +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .endif .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Nov 29 08:33:40 2011 (r228123) +++ head/share/mk/sys.mk Tue Nov 29 08:38:47 2011 (r228124) @@ -158,15 +158,15 @@ YFLAGS ?= -d # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .sh: cp -f ${.IMPSRC} ${.TARGET} @@ -176,33 +176,33 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -240,15 +240,15 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -258,15 +258,15 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -277,38 +277,38 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # XXX not -j safe .y.c: @@ -320,34 +320,34 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Nov 29 08:33:40 2011 (r228123) +++ head/sys/conf/kern.post.mk Tue Nov 29 08:38:47 2011 (r228124) @@ -94,7 +94,9 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} - @${SYSTEM_CTFMERGE} +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o +.endif .if !defined(DEBUG) ${OBJCOPY} --strip-debug ${.TARGET} .endif @@ -247,7 +249,9 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.if !defined(NO_CTF) + ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.endif config.ln env.ln hints.ln vers.ln vnode_if.ln: ${NORMAL_LINT} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Nov 29 08:33:40 2011 (r228123) +++ head/sys/conf/kern.pre.mk Tue Nov 29 08:38:47 2011 (r228124) @@ -123,8 +123,11 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.if !defined(NO_CTF) +NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.else +NORMAL_CTFCONVERT= : +.endif NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} @@ -142,7 +145,6 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So -SYSTEM_CTFMERGE= [ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Nov 29 08:33:40 2011 (r228123) +++ head/sys/conf/kmod.mk Tue Nov 29 08:38:47 2011 (r228124) @@ -206,7 +206,9 @@ ${KMOD}.kld: ${OBJS} ${FULLPROG}: ${OBJS} .endif ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} - @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.if !defined(NO_CTF) + ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} +.endif .if defined(EXPORT_SYMS) .if ${EXPORT_SYMS} != YES .if ${EXPORT_SYMS} == NO From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:43:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED0CE106566C; Tue, 29 Nov 2011 08:43:04 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC49F8FC13; Tue, 29 Nov 2011 08:43:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT8h43L031875; Tue, 29 Nov 2011 08:43:04 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT8h4nl031872; Tue, 29 Nov 2011 08:43:04 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111290843.pAT8h4nl031872@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 29 Nov 2011 08:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228125 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:43:05 -0000 Author: lstewart Date: Tue Nov 29 08:43:04 2011 New Revision: 228125 URL: http://svn.freebsd.org/changeset/base/228125 Log: Make sysclock_active publicly available to external consumers. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/kern/kern_ffclock.c head/sys/sys/timeffc.h Modified: head/sys/kern/kern_ffclock.c ============================================================================== --- head/sys/kern/kern_ffclock.c Tue Nov 29 08:38:47 2011 (r228124) +++ head/sys/kern/kern_ffclock.c Tue Nov 29 08:43:04 2011 (r228125) @@ -190,8 +190,6 @@ sysctl_kern_ffclock_choice(SYSCTL_HANDLE SYSCTL_PROC(_kern_ffclock, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD, 0, 0, sysctl_kern_ffclock_choice, "A", "Clock paradigms available"); -extern int sysclock_active; - static int sysctl_kern_ffclock_active(SYSCTL_HANDLER_ARGS) { Modified: head/sys/sys/timeffc.h ============================================================================== --- head/sys/sys/timeffc.h Tue Nov 29 08:38:47 2011 (r228124) +++ head/sys/sys/timeffc.h Tue Nov 29 08:43:04 2011 (r228125) @@ -61,6 +61,7 @@ struct ffclock_estimate { */ #define SYSCLOCK_FBCK 0 #define SYSCLOCK_FFWD 1 +extern int sysclock_active; /* * Parameters of counter characterisation required by feed-forward algorithms. From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 08:43:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61271106564A; Tue, 29 Nov 2011 08:43:33 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 94D9D8FC0C; Tue, 29 Nov 2011 08:43:32 +0000 (UTC) Received: by ywp17 with SMTP id 17so6650514ywp.13 for ; Tue, 29 Nov 2011 00:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=1omFKzM++VyfNYge2XgMIIkvDSK272d97uuwryhqjtQ=; b=KUJqDP5xhQzIKax9EKm9HFzo9bGVhgx3asSPdp8N7d2H9fGexnHy0td5lXc6uNt+Qa clSa984oUm9zZgFkgqzMRGPCPvz014KfrXb48cz6mIZoISl7Q29+64EuAgBIxF59F3u2 tII0aT7NS8CL/ICqThG/mo3dIo8X96RHGi+Q4= MIME-Version: 1.0 Received: by 10.182.218.100 with SMTP id pf4mr1651725obc.12.1322556212112; Tue, 29 Nov 2011 00:43:32 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 29 Nov 2011 00:43:32 -0800 (PST) In-Reply-To: <201111290838.pAT8clOa031710@svn.freebsd.org> References: <201111290838.pAT8clOa031710@svn.freebsd.org> Date: Tue, 29 Nov 2011 00:43:32 -0800 Message-ID: From: Garrett Cooper To: Max Khon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228124 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 08:43:33 -0000 On Tue, Nov 29, 2011 at 12:38 AM, Max Khon wrote: > Author: fjoe > Date: Tue Nov 29 08:38:47 2011 > New Revision: 228124 > URL: http://svn.freebsd.org/changeset/base/228124 > > Log: > =A0Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) ins= tead > =A0of executing a shell on every object or executable/library file. > > =A0This shaves off more than 30,000 shell invocations during buildworld. Thank you!!!! Great minds truly do think alike. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 09:35:52 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B78BA1065673; Tue, 29 Nov 2011 09:35:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 2204B8FC13; Tue, 29 Nov 2011 09:35:51 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAT9ZpsR074498; Tue, 29 Nov 2011 13:35:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAT9ZoJs074497; Tue, 29 Nov 2011 13:35:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Nov 2011 13:35:50 +0400 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Message-ID: <20111129093550.GZ44498@FreeBSD.org> References: <201111281444.pASEixdO095604@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 09:35:52 -0000 On Mon, Nov 28, 2011 at 07:47:22PM +0000, Bjoern A. Zeeb wrote: B> On 28. Nov 2011, at 14:44 , Gleb Smirnoff wrote: B> B> > Author: glebius B> > Date: Mon Nov 28 14:44:59 2011 B> > New Revision: 228071 B> > URL: http://svn.freebsd.org/changeset/base/228071 B> > B> > Log: B> > - Use generic alloc_unr(9) allocator for if_clone, instead B> > of hand-made. B> > - When registering new cloner, check whether a cloner with B> > same name already exist. B> > - When allocating unit, also check with help of ifunit() B> > whether such interface already exist or not. [1] B> B> This forces packages to be recompiled; they might like to have a __FreeBSD_version for that? B> It's not MFCable, at least I think - don't see a MFC after, just want to be sure. No plans for MFC. btw, I don't like the static initializer of cloners, since it require re-compile of dependencies. What about making an API change: remove the static initializer and make an initializer function. Modules should have only a pointer to opaque structure. We will bump __FreeBSD_version for that. But later with any change to the if_clone struct, we won't have ABI change. If everyone agrees, I can go for that. B> See one more comment inline? B> > + ifc->ifc_unrhdr = new_unrhdr(0, ifc->ifc_maxunit, &ifc->ifc_mtx); B> > + LIST_INIT(&ifc->ifc_iflist); B> > B> > IF_CLONERS_LOCK(); B> > + LIST_FOREACH(ifc1, &V_if_cloners, ifc_list) B> > + if (strcmp(ifc->ifc_name, ifc1->ifc_name) == 0) { B> > + IF_CLONERS_UNLOCK(); B> > + IF_CLONE_REMREF(ifc); B> > + return (EEXIST); B> B> At this point you may have a problem not freeing the unr? No, there is no problem. The code path that goes to delete_unrhdr() is the following: IF_CLONE_REMREF calls IF_CLONE_REMREF_LOCKED, the latter calls if_clone_free(), and the last one calls delete_unrhdr(). -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 09:36:20 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A3EA106566B; Tue, 29 Nov 2011 09:36:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id A1C5B8FC18; Tue, 29 Nov 2011 09:36:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAT9aIkM074518; Tue, 29 Nov 2011 13:36:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAT9aItR074517; Tue, 29 Nov 2011 13:36:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Nov 2011 13:36:18 +0400 From: Gleb Smirnoff To: Jaakko Heinonen Message-ID: <20111129093618.GA44498@FreeBSD.org> References: <201111281444.pASEixdO095604@svn.freebsd.org> <20111128202307.GA4064@jh> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20111128202307.GA4064@jh> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , src-committers@FreeBSD.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 09:36:20 -0000 On Mon, Nov 28, 2011 at 10:23:07PM +0200, Jaakko Heinonen wrote: J> On 2011-11-28, Bjoern A. Zeeb wrote: J> > > static void J> > > if_clone_free(struct if_clone *ifc) J> > > { J> > > - for (int bytoff = 0; bytoff < ifc->ifc_bmlen; bytoff++) { J> > > - KASSERT(ifc->ifc_units[bytoff] == 0x00, J> > > - ("ifc_units[%d] is not empty", bytoff)); J> > > - } J> > > J> > > KASSERT(LIST_EMPTY(&ifc->ifc_iflist), J> > > ("%s: ifc_iflist not empty", __func__)); J> > > J> > > IF_CLONE_LOCK_DESTROY(ifc); J> > > - free(ifc->ifc_units, M_CLONE); J> > > + delete_unrhdr(ifc->ifc_unrhdr); J> > > } J> J> delete_unrhdr() KASSERTs that all allocations has been freed. Thus if J> the leak below has occurred, the result will be a panic at this point J> with INVARIANTS enabled kernel. If INVARIANTS is disabled, a memory leak J> is possible. Thanks, Jaakko! Good catch. I will try to fix that. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 09:43:41 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FEB4106564A; Tue, 29 Nov 2011 09:43:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 0026E8FC13; Tue, 29 Nov 2011 09:43:40 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 17A7725D385E; Tue, 29 Nov 2011 09:43:40 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 45345BD5EA8; Tue, 29 Nov 2011 09:43:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id pzQcOFXmkqqd; Tue, 29 Nov 2011 09:43:38 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D6E57BD5EA7; Tue, 29 Nov 2011 09:43:37 +0000 (UTC) Date: Tue, 29 Nov 2011 09:43:37 +0000 (UTC) From: "Bjoern A. Zeeb" To: Gleb Smirnoff In-Reply-To: <20111129093550.GZ44498@FreeBSD.org> Message-ID: References: <201111281444.pASEixdO095604@svn.freebsd.org> <20111129093550.GZ44498@FreeBSD.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 09:43:41 -0000 On Tue, 29 Nov 2011, Gleb Smirnoff wrote: > On Mon, Nov 28, 2011 at 07:47:22PM +0000, Bjoern A. Zeeb wrote: > B> On 28. Nov 2011, at 14:44 , Gleb Smirnoff wrote: > B> > B> > Author: glebius > B> > Date: Mon Nov 28 14:44:59 2011 > B> > New Revision: 228071 > B> > URL: http://svn.freebsd.org/changeset/base/228071 > B> > > B> > Log: > B> > - Use generic alloc_unr(9) allocator for if_clone, instead > B> > of hand-made. > B> > - When registering new cloner, check whether a cloner with > B> > same name already exist. > B> > - When allocating unit, also check with help of ifunit() > B> > whether such interface already exist or not. [1] > B> > B> This forces packages to be recompiled; they might like to have a __FreeBSD_version for that? > B> It's not MFCable, at least I think - don't see a MFC after, just want to be sure. > > No plans for MFC. > > btw, I don't like the static initializer of cloners, since it require re-compile of > dependencies. > > What about making an API change: remove the static initializer and make an initializer > function. Modules should have only a pointer to opaque structure. We will bump > __FreeBSD_version for that. But later with any change to the if_clone struct, we > won't have ABI change. If everyone agrees, I can go for that. I have some fairly intrusive changes to cloners sitting in p4 for the V_irtualization but it could make my life easier; I'll be happy to look at the patch. > B> See one more comment inline? > B> > + ifc->ifc_unrhdr = new_unrhdr(0, ifc->ifc_maxunit, &ifc->ifc_mtx); > B> > + LIST_INIT(&ifc->ifc_iflist); > B> > > B> > IF_CLONERS_LOCK(); > B> > + LIST_FOREACH(ifc1, &V_if_cloners, ifc_list) > B> > + if (strcmp(ifc->ifc_name, ifc1->ifc_name) == 0) { > B> > + IF_CLONERS_UNLOCK(); > B> > + IF_CLONE_REMREF(ifc); > B> > + return (EEXIST); > B> > B> At this point you may have a problem not freeing the unr? > > No, there is no problem. The code path that goes to delete_unrhdr() is the > following: > > IF_CLONE_REMREF calls IF_CLONE_REMREF_LOCKED, the latter calls if_clone_free(), > and the last one calls delete_unrhdr(). > > -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 09:59:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A02F106566B; Tue, 29 Nov 2011 09:59:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 289678FC0C; Tue, 29 Nov 2011 09:59:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT9xqs9034250; Tue, 29 Nov 2011 09:59:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT9xqnH034248; Tue, 29 Nov 2011 09:59:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111290959.pAT9xqnH034248@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 09:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228126 - stable/9/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 09:59:52 -0000 Author: marius Date: Tue Nov 29 09:59:51 2011 New Revision: 228126 URL: http://svn.freebsd.org/changeset/base/228126 Log: MFC: r227960 Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by OpenSolaris. One second turned out to be not enough for certain loads while 10 seconds were sufficient. Reported by: Peter Jeremy Approved by: re (bz) Modified: stable/9/sys/sparc64/pci/schizo.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/sparc64/pci/schizo.c ============================================================================== --- stable/9/sys/sparc64/pci/schizo.c Tue Nov 29 08:43:04 2011 (r228125) +++ stable/9/sys/sparc64/pci/schizo.c Tue Nov 29 09:59:51 2011 (r228126) @@ -1171,7 +1171,7 @@ schizo_dmamap_sync(bus_dma_tag_t dt, bus ; SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); - end.tv_sec = 1; + end.tv_sec = 15; end.tv_usec = 0; timevaladd(&end, &cur); for (; (res = atomic_cmpset_rel_32(&sc->sc_cdma_state, From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 09:59:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76444106566C; Tue, 29 Nov 2011 09:59:55 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 652AE8FC1A; Tue, 29 Nov 2011 09:59:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAT9xtdC034287; Tue, 29 Nov 2011 09:59:55 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAT9xtWm034285; Tue, 29 Nov 2011 09:59:55 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111290959.pAT9xtWm034285@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 09:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228127 - releng/9.0/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 09:59:55 -0000 Author: marius Date: Tue Nov 29 09:59:55 2011 New Revision: 228127 URL: http://svn.freebsd.org/changeset/base/228127 Log: MFC: r227960 Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by OpenSolaris. One second turned out to be not enough for certain loads while 10 seconds were sufficient. Reported by: Peter Jeremy Approved by: re (bz) Modified: releng/9.0/sys/sparc64/pci/schizo.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/amd64/include/xen/ (props changed) releng/9.0/sys/boot/ (props changed) releng/9.0/sys/boot/i386/efi/ (props changed) releng/9.0/sys/boot/ia64/efi/ (props changed) releng/9.0/sys/boot/ia64/ski/ (props changed) releng/9.0/sys/boot/powerpc/boot1.chrp/ (props changed) releng/9.0/sys/boot/powerpc/ofw/ (props changed) releng/9.0/sys/cddl/contrib/opensolaris/ (props changed) releng/9.0/sys/conf/ (props changed) releng/9.0/sys/contrib/dev/acpica/ (props changed) releng/9.0/sys/contrib/octeon-sdk/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) releng/9.0/sys/contrib/x86emu/ (props changed) Modified: releng/9.0/sys/sparc64/pci/schizo.c ============================================================================== --- releng/9.0/sys/sparc64/pci/schizo.c Tue Nov 29 09:59:51 2011 (r228126) +++ releng/9.0/sys/sparc64/pci/schizo.c Tue Nov 29 09:59:55 2011 (r228127) @@ -1171,7 +1171,7 @@ schizo_dmamap_sync(bus_dma_tag_t dt, bus ; SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); - end.tv_sec = 1; + end.tv_sec = 15; end.tv_usec = 0; timevaladd(&end, &cur); for (; (res = atomic_cmpset_rel_32(&sc->sc_cdma_state, From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 11:24:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFAE11065675; Tue, 29 Nov 2011 11:24:25 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D66B8FC08; Tue, 29 Nov 2011 11:24:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATBOPmQ041504; Tue, 29 Nov 2011 11:24:25 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATBOPj7041501; Tue, 29 Nov 2011 11:24:25 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201111291124.pATBOPj7041501@svn.freebsd.org> From: Christian Brueffer Date: Tue, 29 Nov 2011 11:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228128 - in stable/9/release/doc: en_US.ISO8859-1/hardware share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 11:24:25 -0000 Author: brueffer Date: Tue Nov 29 11:24:25 2011 New Revision: 228128 URL: http://svn.freebsd.org/changeset/base/228128 Log: MFC: r227666 Add sfxge(4) to the hardware notes. Approved by: re (bz) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/9/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 09:59:55 2011 (r228127) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 11:24:25 2011 (r228128) @@ -964,6 +964,8 @@ &hwlist.sf; + &hwlist.sfxge; + &hwlist.sge; &hwlist.sis; Modified: stable/9/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/9/release/doc/share/misc/dev.archlist.txt Tue Nov 29 09:59:55 2011 (r228127) +++ stable/9/release/doc/share/misc/dev.archlist.txt Tue Nov 29 11:24:25 2011 (r228128) @@ -108,6 +108,7 @@ rum i386,amd64 run i386,amd64 safe i386,pc98,amd64 sbp i386,sparc64,ia64,amd64 +sfgxe amd64 sn i386,amd64 snc pc98 snd_ad1816 i386,amd64 From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 11:25:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07F74106566C; Tue, 29 Nov 2011 11:25:01 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E88158FC0A; Tue, 29 Nov 2011 11:25:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATBP00J041561; Tue, 29 Nov 2011 11:25:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATBP0UN041558; Tue, 29 Nov 2011 11:25:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201111291125.pATBP0UN041558@svn.freebsd.org> From: Christian Brueffer Date: Tue, 29 Nov 2011 11:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228129 - in releng/9.0/release/doc: en_US.ISO8859-1/hardware share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 11:25:01 -0000 Author: brueffer Date: Tue Nov 29 11:25:00 2011 New Revision: 228129 URL: http://svn.freebsd.org/changeset/base/228129 Log: MFC: r227666 Add sfxge(4) to the hardware notes. Approved by: re (bz) Modified: releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml releng/9.0/release/doc/share/misc/dev.archlist.txt Directory Properties: releng/9.0/release/ (props changed) Modified: releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 11:24:25 2011 (r228128) +++ releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 11:25:00 2011 (r228129) @@ -964,6 +964,8 @@ &hwlist.sf; + &hwlist.sfxge; + &hwlist.sge; &hwlist.sis; Modified: releng/9.0/release/doc/share/misc/dev.archlist.txt ============================================================================== --- releng/9.0/release/doc/share/misc/dev.archlist.txt Tue Nov 29 11:24:25 2011 (r228128) +++ releng/9.0/release/doc/share/misc/dev.archlist.txt Tue Nov 29 11:25:00 2011 (r228129) @@ -108,6 +108,7 @@ rum i386,amd64 run i386,amd64 safe i386,pc98,amd64 sbp i386,sparc64,ia64,amd64 +sfgxe amd64 sn i386,amd64 snc pc98 snd_ad1816 i386,amd64 From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 11:28:28 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E3C106566C; Tue, 29 Nov 2011 11:28:28 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 619C28FC15; Tue, 29 Nov 2011 11:28:27 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pATBRShB097767 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 29 Nov 2011 11:28:26 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <201111290450.pAT4ovZf024314@svn.freebsd.org> Date: Tue, 29 Nov 2011 11:28:28 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <5C6732A6-98B3-4EE3-9A29-E01704B58E88@FreeBSD.org> References: <201111290450.pAT4ovZf024314@svn.freebsd.org> To: Max Khon X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228114 - head/lib/libedit/edit/readline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 11:28:29 -0000 On 29 Nov 2011, at 04:50, Max Khon wrote: > All this makes it possible to build and link gdb with -ledit. When I had a quick look a couple of days ago, kadmin and [k]gdb were the = only things that linked against readline in base. With them now linking = against libedit, can we remove readline from base? David= From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 11:42:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EB6C106566B; Tue, 29 Nov 2011 11:42:01 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9243F8FC0A; Tue, 29 Nov 2011 11:42:00 +0000 (UTC) Received: by ggnk5 with SMTP id k5so9040406ggn.13 for ; Tue, 29 Nov 2011 03:42:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.45.6 with SMTP id i6mr13332305obm.3.1322566919943; Tue, 29 Nov 2011 03:41:59 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Tue, 29 Nov 2011 03:41:59 -0800 (PST) X-Originating-IP: [93.92.220.178] In-Reply-To: <5C6732A6-98B3-4EE3-9A29-E01704B58E88@FreeBSD.org> References: <201111290450.pAT4ovZf024314@svn.freebsd.org> <5C6732A6-98B3-4EE3-9A29-E01704B58E88@FreeBSD.org> Date: Tue, 29 Nov 2011 18:41:59 +0700 X-Google-Sender-Auth: 2o81PD2vIv383_3ZNuBinll_59U Message-ID: From: Max Khon To: David Chisnall X-Mailman-Approved-At: Tue, 29 Nov 2011 12:23:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228114 - head/lib/libedit/edit/readline X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 11:42:01 -0000 David, On Tue, Nov 29, 2011 at 6:28 PM, David Chisnall wrote: > All this makes it possible to build and link gdb with -ledit. > > When I had a quick look a couple of days ago, kadmin and [k]gdb were the > only things that linked against readline in base. With them now linking > against libedit, can we remove readline from base? Yes, I am working on it. Stay tuned. Max From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 12:38:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D913106564A; Tue, 29 Nov 2011 12:38:14 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BE128FC16; Tue, 29 Nov 2011 12:38:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATCcE37043974; Tue, 29 Nov 2011 12:38:14 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATCcEEq043972; Tue, 29 Nov 2011 12:38:14 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201111291238.pATCcEEq043972@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 29 Nov 2011 12:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228130 - stable/9/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 12:38:14 -0000 Author: pluknet Date: Tue Nov 29 12:38:13 2011 New Revision: 228130 URL: http://svn.freebsd.org/changeset/base/228130 Log: MFC r225757,r225764: Update the default cvs tag for RELENG_9 by merging the following revisions: r225757 (by kensmith, partial): Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing it from the 9.0-RELEASE release cycle code freeze. r225764 (by kensmith): Forgot to add "RELENG_8" to list of CVS tags. Reported by: Milan Obuch (cvs tag) Approved by: re (kib) Modified: stable/9/share/examples/cvsup/stable-supfile Directory Properties: stable/9/share/examples/ (props changed) Modified: stable/9/share/examples/cvsup/stable-supfile ============================================================================== --- stable/9/share/examples/cvsup/stable-supfile Tue Nov 29 11:25:00 2011 (r228129) +++ stable/9/share/examples/cvsup/stable-supfile Tue Nov 29 12:38:13 2011 (r228130) @@ -66,11 +66,11 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -# The following line is for 8-stable. If you want 7-stable, 6-stable, -# 5-stable, 4-stable, 3-stable, or 2.2-stable, change to "RELENG_7", -# "RELENG_6", "RELENG_5", "RELENG_4", "RELENG_3", or "RELENG_2_2" -# respectively. -*default release=cvs tag=RELENG_8 +# The following line is for 9-stable. If you want 8-stable, 7-stable, +# 6-stable, 5-stable, 4-stable, 3-stable, or 2.2-stable, change to "RELENG_8", +# "RELENG_7", "RELENG_6", "RELENG_5", "RELENG_4", "RELENG_3", or +# "RELENG_2_2" respectively. +*default release=cvs tag=RELENG_9 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 12:41:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7499D1065688; Tue, 29 Nov 2011 12:41:44 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 637C98FC19; Tue, 29 Nov 2011 12:41:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATCfiFn044118; Tue, 29 Nov 2011 12:41:44 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATCfi6u044116; Tue, 29 Nov 2011 12:41:44 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201111291241.pATCfi6u044116@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 29 Nov 2011 12:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228131 - releng/9.0/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 12:41:44 -0000 Author: pluknet Date: Tue Nov 29 12:41:44 2011 New Revision: 228131 URL: http://svn.freebsd.org/changeset/base/228131 Log: MFC r225757,r225764: Update the default cvs tag for RELENG_9 by merging the following revisions: r225757 (by kensmith, partial): Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing it from the 9.0-RELEASE release cycle code freeze. r225764 (by kensmith): Forgot to add "RELENG_8" to list of CVS tags. Reported by: Milan Obuch (cvs tag) Approved by: re (kib) Modified: releng/9.0/share/examples/cvsup/stable-supfile Directory Properties: releng/9.0/share/examples/ (props changed) Modified: releng/9.0/share/examples/cvsup/stable-supfile ============================================================================== --- releng/9.0/share/examples/cvsup/stable-supfile Tue Nov 29 12:38:13 2011 (r228130) +++ releng/9.0/share/examples/cvsup/stable-supfile Tue Nov 29 12:41:44 2011 (r228131) @@ -66,11 +66,11 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -# The following line is for 8-stable. If you want 7-stable, 6-stable, -# 5-stable, 4-stable, 3-stable, or 2.2-stable, change to "RELENG_7", -# "RELENG_6", "RELENG_5", "RELENG_4", "RELENG_3", or "RELENG_2_2" -# respectively. -*default release=cvs tag=RELENG_8 +# The following line is for 9-stable. If you want 8-stable, 7-stable, +# 6-stable, 5-stable, 4-stable, 3-stable, or 2.2-stable, change to "RELENG_8", +# "RELENG_7", "RELENG_6", "RELENG_5", "RELENG_4", "RELENG_3", or +# "RELENG_2_2" respectively. +*default release=cvs tag=RELENG_9 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 12:55:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B7401065670; Tue, 29 Nov 2011 12:55:26 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7935E8FC08; Tue, 29 Nov 2011 12:55:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATCtQvl044582; Tue, 29 Nov 2011 12:55:26 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATCtQ14044579; Tue, 29 Nov 2011 12:55:26 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201111291255.pATCtQ14044579@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 29 Nov 2011 12:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228132 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 12:55:26 -0000 Author: lstewart Date: Tue Nov 29 12:55:26 2011 New Revision: 228132 URL: http://svn.freebsd.org/changeset/base/228132 Log: Revert r227778 in preparation for committing reworked patches in its place. Modified: head/sys/net/bpf.c head/sys/net/bpf.h Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue Nov 29 12:41:44 2011 (r228131) +++ head/sys/net/bpf.c Tue Nov 29 12:55:26 2011 (r228132) @@ -1,17 +1,12 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. - * Copyright (c) 2011 The FreeBSD Foundation. - * All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * - * Portions of this software were developed by Julien Ridoux at the University - * of Melbourne under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -44,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include "opt_bpf.h" #include "opt_compat.h" -#include "opt_ffclock.h" #include "opt_netgraph.h" #include @@ -61,9 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef FFCLOCK -#include -#endif #include #include @@ -99,13 +90,8 @@ MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); #define PRINET 26 /* interruptible */ -#ifdef FFCLOCK -#define SIZEOF_BPF_HDR(type) \ - (offsetof(type, ffcount_stamp) + sizeof(((type *)0)->ffcount_stamp)) -#else #define SIZEOF_BPF_HDR(type) \ (offsetof(type, bh_hdrlen) + sizeof(((type *)0)->bh_hdrlen)) -#endif #ifdef COMPAT_FREEBSD32 #include @@ -125,9 +111,6 @@ struct bpf_hdr32 { uint32_t bh_datalen; /* original length of packet */ uint16_t bh_hdrlen; /* length of bpf header (this struct plus alignment padding) */ -#ifdef FFCLOCK - ffcounter ffcount_stamp; /* ffcounter timestamp of packet */ -#endif }; #endif @@ -168,16 +151,9 @@ static int bpf_setif(struct bpf_d *, str static void bpf_timed_out(void *); static __inline void bpf_wakeup(struct bpf_d *); -#ifdef FFCLOCK -static void catchpacket(struct bpf_d *, u_char *, unsigned int, - unsigned int, void (*)(struct bpf_d *, caddr_t, - unsigned int, void *, unsigned int), struct bintime *, - ffcounter *); -#else static void catchpacket(struct bpf_d *, u_char *, u_int, u_int, void (*)(struct bpf_d *, caddr_t, u_int, void *, u_int), struct bintime *); -#endif static void reset_d(struct bpf_d *); static int bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd); static int bpf_getdltlist(struct bpf_d *, struct bpf_dltlist *); @@ -196,12 +172,6 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_ &bpf_zerocopy_enable, 0, "Enable new zero-copy BPF buffer sessions"); static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); -#ifdef FFCLOCK -static int bpf_ffclock_tstamp = 0; -SYSCTL_INT(_net_bpf, OID_AUTO, ffclock_tstamp, CTLFLAG_RW, - &bpf_ffclock_tstamp, 0, - "Set BPF to timestamp using Feed-Forward clock by default"); -#endif static d_open_t bpfopen; static d_read_t bpfread; @@ -728,15 +698,6 @@ bpfopen(struct cdev *dev, int flags, int callout_init_mtx(&d->bd_callout, &d->bd_mtx, 0); knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx); -#ifdef FFCLOCK - /* - * Set the timestamping mode for this device, i.e. which clock is used. - * The default option is to use the feedback/ntpd system clock. - */ - if (bpf_ffclock_tstamp) - d->bd_tstamp = d->bd_tstamp | BPF_T_FFCLOCK; -#endif - return (0); } @@ -1815,13 +1776,8 @@ bpf_ts_quality(int tstype) return (BPF_TSTAMP_NORMAL); } -#ifdef FFCLOCK -static int -bpf_gettime(struct bintime *bt, ffcounter *ffcount, int tstype, struct mbuf *m) -#else static int bpf_gettime(struct bintime *bt, int tstype, struct mbuf *m) -#endif { struct m_tag *tag; int quality; @@ -1837,31 +1793,11 @@ bpf_gettime(struct bintime *bt, int tsty return (BPF_TSTAMP_EXTERN); } } - if (quality == BPF_TSTAMP_NORMAL) { -#ifdef FFCLOCK - if ((tstype & BPF_T_FFCLOCK) == 0) { - ffclock_read_counter(ffcount); -#endif - binuptime(bt); -#ifdef FFCLOCK - } else { - if ((tstype & BPF_T_MONOTONIC) == 0) - ffclock_abstime(ffcount, bt, NULL, - (FFCLOCK_LERP | FFCLOCK_LEAPSEC)); - else - ffclock_abstime(ffcount, bt, NULL, - (FFCLOCK_LERP | FFCLOCK_UPTIME)); - } -#endif - } else { -#ifdef FFCLOCK - if ((tstype & BPF_T_FFCLOCK) == BPF_T_FFCLOCK) - ffclock_abstime(ffcount, bt, NULL, - (FFCLOCK_LERP | FFCLOCK_LEAPSEC | FFCLOCK_FAST)); - else -#endif - getbinuptime(bt); - } + if (quality == BPF_TSTAMP_NORMAL) + binuptime(bt); + else + getbinuptime(bt); + return (quality); } @@ -1881,9 +1817,6 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, #endif u_int slen; int gottime; -#ifdef FFCLOCK - ffcounter ffcount; -#endif gottime = BPF_TSTAMP_NONE; BPFIF_LOCK(bp); @@ -1905,24 +1838,13 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); if (slen != 0) { d->bd_fcount++; - if (gottime < bpf_ts_quality(d->bd_tstamp)) { -#ifdef FFCLOCK - gottime = bpf_gettime(&bt, &ffcount, - d->bd_tstamp, NULL); -#else + if (gottime < bpf_ts_quality(d->bd_tstamp)) gottime = bpf_gettime(&bt, d->bd_tstamp, NULL); -#endif - } #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif -#ifdef FFCLOCK - catchpacket(d, pkt, pktlen, slen, - bpf_append_bytes, &bt, &ffcount); -#else catchpacket(d, pkt, pktlen, slen, bpf_append_bytes, &bt); -#endif } BPFD_UNLOCK(d); } @@ -1946,9 +1868,6 @@ bpf_mtap(struct bpf_if *bp, struct mbuf #endif u_int pktlen, slen; int gottime; -#ifdef FFCLOCK - ffcounter ffcount; -#endif /* Skip outgoing duplicate packets. */ if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { @@ -1976,24 +1895,12 @@ bpf_mtap(struct bpf_if *bp, struct mbuf if (slen != 0) { d->bd_fcount++; if (gottime < bpf_ts_quality(d->bd_tstamp)) - { -#ifdef FFCLOCK - gottime = bpf_gettime(&bt, &ffcount, - d->bd_tstamp, m); -#else gottime = bpf_gettime(&bt, d->bd_tstamp, m); -#endif - } #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif -#ifdef FFCLOCK - catchpacket(d, (u_char *)m, pktlen, slen, - bpf_append_mbuf, &bt, &ffcount); -#else catchpacket(d, (u_char *)m, pktlen, slen, bpf_append_mbuf, &bt); -#endif } BPFD_UNLOCK(d); } @@ -2012,9 +1919,6 @@ bpf_mtap2(struct bpf_if *bp, void *data, struct bpf_d *d; u_int pktlen, slen; int gottime; -#ifdef FFCLOCK - ffcounter ffcount; -#endif /* Skip outgoing duplicate packets. */ if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { @@ -2044,24 +1948,12 @@ bpf_mtap2(struct bpf_if *bp, void *data, if (slen != 0) { d->bd_fcount++; if (gottime < bpf_ts_quality(d->bd_tstamp)) - { -#ifdef FFCLOCK - gottime = bpf_gettime(&bt, &ffcount, - d->bd_tstamp, m); -#else gottime = bpf_gettime(&bt, d->bd_tstamp, m); -#endif - } #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif -#ifdef FFCLOCK - catchpacket(d, (u_char *)m, pktlen, slen, - bpf_append_mbuf, &bt, &ffcount); -#else catchpacket(d, (u_char *)&mb, pktlen, slen, bpf_append_mbuf, &bt); -#endif } BPFD_UNLOCK(d); } @@ -2110,17 +2002,11 @@ bpf_bintime2ts(struct bintime *bt, struc struct timeval tsm; struct timespec tsn; -#ifdef FFCLOCK - if ((tstype & BPF_T_FFCLOCK) == 0) { -#endif - if ((tstype & BPF_T_MONOTONIC) == 0) { - bt2 = *bt; - bintime_add(&bt2, &boottimebin); - bt = &bt2; - } -#ifdef FFCLOCK + if ((tstype & BPF_T_MONOTONIC) == 0) { + bt2 = *bt; + bintime_add(&bt2, &boottimebin); + bt = &bt2; } -#endif switch (BPF_T_FORMAT(tstype)) { case BPF_T_MICROTIME: bintime2timeval(bt, &tsm); @@ -2146,17 +2032,10 @@ bpf_bintime2ts(struct bintime *bt, struc * bpf_append_mbuf is passed in to copy mbuf chains. In the latter case, * pkt is really an mbuf. */ -#ifdef FFCLOCK -static void -catchpacket(struct bpf_d *d, u_char *pkt, unsigned int pktlen, - unsigned int snaplen, void (*cpfn)(struct bpf_d *, caddr_t, unsigned int, - void *, unsigned int), struct bintime *bt, ffcounter *ffcount) -#else static void catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen, void (*cpfn)(struct bpf_d *, caddr_t, u_int, void *, u_int), struct bintime *bt) -#endif { struct bpf_xhdr hdr; #ifndef BURN_BRIDGES @@ -2244,9 +2123,6 @@ catchpacket(struct bpf_d *d, u_char *pkt if (d->bd_compat32) { bzero(&hdr32_old, sizeof(hdr32_old)); if (do_timestamp) { -#ifdef FFCLOCK - hdr32_old.ffcount_stamp = *ffcount; -#endif hdr32_old.bh_tstamp.tv_sec = ts.bt_sec; hdr32_old.bh_tstamp.tv_usec = ts.bt_frac; } @@ -2260,9 +2136,6 @@ catchpacket(struct bpf_d *d, u_char *pkt #endif bzero(&hdr_old, sizeof(hdr_old)); if (do_timestamp) { -#ifdef FFCLOCK - hdr_old.ffcount_stamp = *ffcount; -#endif hdr_old.bh_tstamp.tv_sec = ts.bt_sec; hdr_old.bh_tstamp.tv_usec = ts.bt_frac; } @@ -2281,12 +2154,7 @@ catchpacket(struct bpf_d *d, u_char *pkt */ bzero(&hdr, sizeof(hdr)); if (do_timestamp) - { -#ifdef FFCLOCK - hdr.ffcount_stamp = *ffcount; -#endif bpf_bintime2ts(bt, &hdr.bh_tstamp, tstype); - } hdr.bh_datalen = pktlen; hdr.bh_hdrlen = hdrlen; hdr.bh_caplen = caplen; Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Tue Nov 29 12:41:44 2011 (r228131) +++ head/sys/net/bpf.h Tue Nov 29 12:55:26 2011 (r228132) @@ -1,17 +1,12 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. - * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * - * Portions of this software were developed by Julien Ridoux at the University - * of Melbourne under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -175,21 +170,11 @@ enum bpf_direction { #define BPF_T_MONOTONIC 0x0200 #define BPF_T_MONOTONIC_FAST (BPF_T_FAST | BPF_T_MONOTONIC) #define BPF_T_FLAG_MASK 0x0300 -#ifdef FFCLOCK -#define BPF_T_FFCLOCK 0x8000 -#define BPF_T_CLOCK_MASK 0x8000 -#endif #define BPF_T_FORMAT(t) ((t) & BPF_T_FORMAT_MASK) #define BPF_T_FLAG(t) ((t) & BPF_T_FLAG_MASK) -#ifdef FFCLOCK -#define BPF_T_VALID(t) \ - ((t) == BPF_T_NONE || (BPF_T_FORMAT(t) != BPF_T_NONE && \ - ((t) & ~(BPF_T_FORMAT_MASK | BPF_T_FLAG_MASK | BPF_T_CLOCK_MASK)) == 0)) -#else #define BPF_T_VALID(t) \ ((t) == BPF_T_NONE || (BPF_T_FORMAT(t) != BPF_T_NONE && \ ((t) & ~(BPF_T_FORMAT_MASK | BPF_T_FLAG_MASK)) == 0)) -#endif #define BPF_T_MICROTIME_FAST (BPF_T_MICROTIME | BPF_T_FAST) #define BPF_T_NANOTIME_FAST (BPF_T_NANOTIME | BPF_T_FAST) @@ -214,9 +199,6 @@ struct bpf_xhdr { bpf_u_int32 bh_datalen; /* original length of packet */ u_short bh_hdrlen; /* length of bpf header (this struct plus alignment padding) */ -#ifdef FFCLOCK - ffcounter ffcount_stamp; /* feed-forward counter timestamp */ -#endif }; /* Obsolete */ struct bpf_hdr { @@ -225,9 +207,6 @@ struct bpf_hdr { bpf_u_int32 bh_datalen; /* original length of packet */ u_short bh_hdrlen; /* length of bpf header (this struct plus alignment padding) */ -#ifdef FFCLOCK - ffcounter ffcount_stamp; /* feed-forward counter timestamp */ -#endif }; #ifdef _KERNEL #define MTAG_BPF 0x627066 From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 13:05:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DAA4106566B; Tue, 29 Nov 2011 13:05:36 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id E3EEB8FC18; Tue, 29 Nov 2011 13:05:35 +0000 (UTC) Received: from lstewart1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 0E2EB7E820; Wed, 30 Nov 2011 00:05:33 +1100 (EST) Message-ID: <4ED4D89D.9000904@freebsd.org> Date: Wed, 30 Nov 2011 00:05:33 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111016 Thunderbird/7.0.1 MIME-Version: 1.0 To: Benjamin Kaduk References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <648D11A8-3636-49E5-BF20-83E4EA87242C@cubinlab.ee.unimelb.edu.au> <4EC9FD8A.5040401@freebsd.org> <201111220830.05029.jhb@freebsd.org> <4ECBAB19.4010907@freebsd.org> <8805563E-60F9-4BF4-A292-1A43C4FA368A@cubinlab.ee.unimelb.edu.au> <4ECCA2A1.4020408@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , svn-src-head@freebsd.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 13:05:36 -0000 On 11/28/11 14:59, Benjamin Kaduk wrote: > On Wed, 23 Nov 2011, Lawrence Stewart wrote: > >> On 11/23/11 17:42, Julien Ridoux wrote: >>> >>> Thanks all for the feedback. With some delay, I have a patch against >>> r227871 that implements what Lawrence proposed. You can find it >>> here: >>> http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/ffclock-bpf-header-r227871.patch >>> >> >> There are a few nits, but the patch implements what I envisaged, >> thanks Julien. > > The use of the union for bh_ustamp feels a bit odd, as (e.g.) a bpf_ts > is two 64-bit ints, but an ffcounter is just a single 64-bit int. Julien and I discussed this - the alternative of somehow casting that struct member to something else is probably worse, so we're going to stick with a union. >> >>> I have tested this under a few typical scenario, it works as >>> expected but already brings some headaches (hence the long delay >>> mentioned above :-)). >>> >>> I thought a bit more of user cases. I believe many of them call for >>> having both feed-forward counter and its conversion in second be >>> present in the BPF header. For example, this allows to have absolute >>> packet departure/arrival times (as per usual), but also provides the >>> opportunity to compute inter-arrival times accurately using the >>> difference clock. There are other examples I can think of, and if one >>> believe the feed-forward clock approach becomes more popular, such >>> usages will be more and more common. >>> > > Having read only the first introductory link that Lawrence posted when > he first started introducing the ffclock code, it does really seem like > there are lots of interesting things to do with both timestamps available. > > >>> Assuming the BPF header grows by 8 bytes independent of any kernel >>> option, I admit that the current implementation is a bit ugly. The >>> BPF structure is not nicely packed and looks clunky. Ideally, the > > The > +#define bh_tstamp bh_ustamp.ts_stamp > is a sort of thing that can get annoying when poking around kernel > cores, &c. I won't argue with you that the current implementation is a > bit ugly. Agreed it's gross, but in sticking with the union route, this is a necessary evil to reduce the impact of integrating FFCLOCK support into BPF. >>> feed-forward counter should be placed just below the bh_tstamp >>> member, but this would require libpcap and all ports depending on it >>> to be recompiled after this change. >> >> Even though it looks a bit gross, we would still add it at the end to >> avoid gratuitously breaking binaries. We would then also add some >> explicit padding in the struct to soak up the redundant space left in >> between it and the second last struct member. > > Though ... we are just after a release branch is forked. That seems to > be a much better time to change the ABI for cleanliness' sake than right > before a release ;) True. >> >>> What is your favourite option? >> >> FreeBSD parlance is to ask what colour you would like to paint the >> bikeshed ;) >> >> As I've never experienced the pain John refers to, I'll defer to the >> wisdom of others on whether the proposed patch will create pain down >> the road. I think it's ok, but if consensus is 8bytes per packet isn't >> going to break the bank, I guess we just go for it - but I guess I am >> cautious about this route as we can push a lot of packets per second >> through the stack. > > Since other people seem to be keeping quiet, I'll add that I'm in favor > of just always adding the 8 bytes per packet. Julien and I discussed this at length today, and agree that for head, we'll add the new bh_ffcounter member to the BPF header unconditionally. Thanks to you and John for the input. I'm going to revert r227778 in order to start form a clean slate, and add two separate patches. One will reintegrate FFCLOCK support with BPF without breaking the ABI. A follow up patch will bump the ffclock version and add the bh_ffcounter to the bpf header (after the timestamp member). Then a final patch will bump __FreeBSD_version and add a note to UPDATING about recompiling to get kernel/world in sync, which should seal the deal. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 13:07:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 059031065672; Tue, 29 Nov 2011 13:07:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3DB8FC1B; Tue, 29 Nov 2011 13:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATD7W5g044993; Tue, 29 Nov 2011 13:07:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATD7WTg044990; Tue, 29 Nov 2011 13:07:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111291307.pATD7WTg044990@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 29 Nov 2011 13:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228133 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 13:07:33 -0000 Author: kib Date: Tue Nov 29 13:07:32 2011 New Revision: 228133 URL: http://svn.freebsd.org/changeset/base/228133 Log: Hide the internals of vm_page_lock(9) from the loadable modules. Since the address of vm_page lock mutex depends on the kernel options, it is easy for module to get out of sync with the kernel. No vm_page_lockptr() accessor is provided for modules. It can be added later if needed, unless proper KPI is developed to serve the needs. Reviewed by: attilio, alc MFC after: 3 weeks Modified: head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Nov 29 12:55:26 2011 (r228132) +++ head/sys/vm/vm_page.c Tue Nov 29 13:07:32 2011 (r228133) @@ -2843,6 +2843,36 @@ vm_page_test_dirty(vm_page_t m) vm_page_dirty(m); } +void +vm_page_lock_KBI(vm_page_t m, const char *file, int line) +{ + + mtx_lock_flags_(vm_page_lockptr(m), 0, file, line); +} + +void +vm_page_unlock_KBI(vm_page_t m, const char *file, int line) +{ + + mtx_unlock_flags_(vm_page_lockptr(m), 0, file, line); +} + +int +vm_page_trylock_KBI(vm_page_t m, const char *file, int line) +{ + + return (mtx_trylock_flags_(vm_page_lockptr(m), 0, file, line)); +} + +#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) +void +vm_page_lock_assert_KBI(vm_page_t m, int a, const char *file, int line) +{ + + mtx_assert_(vm_page_lockptr(m), a, file, line); +} +#endif + int so_zerocp_fullpage = 0; /* Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Tue Nov 29 12:55:26 2011 (r228132) +++ head/sys/vm/vm_page.h Tue Nov 29 13:07:32 2011 (r228133) @@ -218,11 +218,23 @@ extern struct vpglocks pa_lock[]; #define PA_LOCK_ASSERT(pa, a) mtx_assert(PA_LOCKPTR(pa), (a)) +#ifdef KLD_MODULE +#define vm_page_lock(m) vm_page_lock_KBI((m), LOCK_FILE, LOCK_LINE) +#define vm_page_unlock(m) vm_page_unlock_KBI((m), LOCK_FILE, LOCK_LINE) +#define vm_page_trylock(m) vm_page_trylock_KBI((m), LOCK_FILE, LOCK_LINE) +#if defined(INVARIANTS) +#define vm_page_lock_assert(m, a) \ + vm_page_lock_assert_KBI((m), (a), __FILE__, __LINE__) +#else +#define vm_page_lock_assert(m, a) +#endif +#else /* !KLD_MODULE */ #define vm_page_lockptr(m) (PA_LOCKPTR(VM_PAGE_TO_PHYS((m)))) #define vm_page_lock(m) mtx_lock(vm_page_lockptr((m))) #define vm_page_unlock(m) mtx_unlock(vm_page_lockptr((m))) #define vm_page_trylock(m) mtx_trylock(vm_page_lockptr((m))) #define vm_page_lock_assert(m, a) mtx_assert(vm_page_lockptr((m)), (a)) +#endif #define vm_page_queue_free_mtx vm_page_queue_free_lock.data /* @@ -405,6 +417,13 @@ void vm_page_cowfault (vm_page_t); int vm_page_cowsetup(vm_page_t); void vm_page_cowclear (vm_page_t); +void vm_page_lock_KBI(vm_page_t m, const char *file, int line); +void vm_page_unlock_KBI(vm_page_t m, const char *file, int line); +int vm_page_trylock_KBI(vm_page_t m, const char *file, int line); +#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) +void vm_page_lock_assert_KBI(vm_page_t m, int a, const char *file, int line); +#endif + #ifdef INVARIANTS void vm_page_object_lock_assert(vm_page_t m); #define VM_PAGE_OBJECT_LOCK_ASSERT(m) vm_page_object_lock_assert(m) From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 13:55:09 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46BB1065673; Tue, 29 Nov 2011 13:55:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id E56288FC0C; Tue, 29 Nov 2011 13:55:07 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pATDt68n077016; Tue, 29 Nov 2011 17:55:06 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pATDt6Bv077015; Tue, 29 Nov 2011 17:55:06 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Nov 2011 17:55:06 +0400 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Message-ID: <20111129135506.GB44498@FreeBSD.org> References: <201111281444.pASEixdO095604@svn.freebsd.org> <20111129093550.GZ44498@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228071 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 13:55:09 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Tue, Nov 29, 2011 at 09:43:37AM +0000, Bjoern A. Zeeb wrote: B> On Tue, 29 Nov 2011, Gleb Smirnoff wrote: B> > btw, I don't like the static initializer of cloners, since it require re-compile of B> > dependencies. B> > B> > What about making an API change: remove the static initializer and make an initializer B> > function. Modules should have only a pointer to opaque structure. We will bump B> > __FreeBSD_version for that. But later with any change to the if_clone struct, we B> > won't have ABI change. If everyone agrees, I can go for that. B> B> I have some fairly intrusive changes to cloners sitting in p4 for the B> V_irtualization but it could make my life easier; I'll be happy to B> look at the patch. Okay, here is what I am suggesting: - make struct if_clone opaque, and remove if from if_clone.h - IF_CLONE_INITIALIZER and IFC_SIMPLE_DECLARE substituted with if_clone_advanced() and if_clone_simple() Now, with all our guts obscure to the callers, we can simplify things: - kill ifc_data, that was an old attempt to support simple & advanced cloners w/o changes to the struct ifclone - make union that stores either simple or advanced methods and data - kill ifc_attach, that was used only for simple callers, embed it into if_clone_simple() Modifications to the callers are quite simple: - substitute static initializer to 'static struct if_clone *fooclone;'; - substitite if_clone_attach() to either if_clone_advanced() or if_clone_simple() - fix argument for if_clone_detach() - if module reads ifc_name, substitute it to some locally stored name Attached patch includes the core changes, changes to lo(4) - a simple cloner, vlan(4) - advanced one, and epair(4) - API abuser :) All three work, so I think converting others won't be a problem. I am only not 100% sure that I've put correct code under VIMAGE ifdefs. Can you review this part thoroughly? If you agree with suggested changes, I can proceed to converting other callers and commit. -- Totus tuus, Glebius. --KN5l+BnMqAQyZLvT Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="if_clone.diff" Index: if_clone.c =================================================================== --- if_clone.c (revision 228129) +++ if_clone.c (working copy) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2011 Gleb Smirnoff * Copyright (c) 1980, 1986, 1993 * The Regents of the University of California. All rights reserved. * @@ -42,19 +43,64 @@ #include #include -#if 0 -#include -#endif -#include #include #include #include #include +/* Current IF_MAXUNIT expands maximum to 5 characters. */ +#define IFCLOSIZ (IFNAMSIZ - 5) + +/* + * Structure describing a `cloning' interface. + * + * List of locks + * (c) const until freeing + * (d) driver specific data, may need external protection. + * (e) locked by if_cloners_mtx + * (i) locked by ifc_mtx mtx + */ +struct if_clone { + char ifc_name[IFCLOSIZ]; /* (c) Name of device, e.g. `gif' */ + struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ + long ifc_refcnt; /* (i) Reference count. */ + LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces */ + struct mtx ifc_mtx; /* Mutex to protect members. */ + + enum { SIMPLE, ADVANCED } ifc_type; /* (c) */ + + /* (c) Driver specific cloning functions. Called with no locks held. */ + union { + struct { /* advanced cloner */ + ifc_match_t *_ifc_match; + ifc_create_t *_ifc_create; + ifc_destroy_t *_ifc_destroy; + } A; + struct { /* simple cloner */ + ifcs_create_t *_ifcs_create; + ifcs_destroy_t *_ifcs_destroy; + int _ifcs_minifs; /* minimum ifs */ + + } S; + } U; +#define ifc_match U.A._ifc_match +#define ifc_create U.A._ifc_create +#define ifc_destroy U.A._ifc_destroy +#define ifcs_create U.S._ifcs_create +#define ifcs_destroy U.S._ifcs_destroy +#define ifcs_minifs U.S._ifcs_minifs + + LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */ +}; + static void if_clone_free(struct if_clone *ifc); static int if_clone_createif(struct if_clone *ifc, char *name, size_t len, caddr_t params); +static int ifc_simple_match(struct if_clone *, const char *); +static int ifc_simple_create(struct if_clone *, char *, size_t, caddr_t); +static int ifc_simple_destroy(struct if_clone *, struct ifnet *); + static struct mtx if_cloners_mtx; static VNET_DEFINE(int, if_cloners_count); VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); @@ -138,18 +184,25 @@ /* Try to find an applicable cloner for this request */ IF_CLONERS_LOCK(); - LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { - if (ifc->ifc_match(ifc, name)) { - break; + LIST_FOREACH(ifc, &V_if_cloners, ifc_list) + if (ifc->ifc_type == SIMPLE) { + if (ifc_simple_match(ifc, name)) + break; + } else { + if (ifc->ifc_match(ifc, name)) + break; } - } #ifdef VIMAGE if (ifc == NULL && !IS_DEFAULT_VNET(curvnet)) { CURVNET_SET_QUIET(vnet0); - LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { - if (ifc->ifc_match(ifc, name)) - break; - } + LIST_FOREACH(ifc, &V_if_cloners, ifc_list) + if (ifc->ifc_type == SIMPLE) { + if (ifc_simple_match(ifc, name)) + break; + } else { + if (ifc->ifc_match(ifc, name)) + break; + } CURVNET_RESTORE(); } #endif @@ -173,7 +226,10 @@ if (ifunit(name) != NULL) return (EEXIST); - err = (*ifc->ifc_create)(ifc, name, len, params); + if (ifc->ifc_type == SIMPLE) + err = ifc_simple_create(ifc, name, len, params); + else + err = (*ifc->ifc_create)(ifc, name, len, params); if (!err) { ifp = ifunit(name); @@ -214,10 +270,14 @@ #ifdef VIMAGE if (ifc == NULL && !IS_DEFAULT_VNET(curvnet)) { CURVNET_SET_QUIET(vnet0); - LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { - if (ifc->ifc_match(ifc, name)) - break; - } + LIST_FOREACH(ifc, &V_if_cloners, ifc_list) + if (ifc->type == SIMPLE) { + if (ifc_simple_match(ifc, name)) + break; + } else { + if (ifc->ifc_match(ifc, name)) + break; + } CURVNET_RESTORE(); } #endif @@ -241,7 +301,7 @@ int err; struct ifnet *ifcifp; - if (ifc->ifc_destroy == NULL) + if (ifc->ifc_type == ADVANCED && ifc->ifc_destroy == NULL) return(EOPNOTSUPP); /* @@ -266,7 +326,10 @@ if_delgroup(ifp, ifc->ifc_name); - err = (*ifc->ifc_destroy)(ifc, ifp); + if (ifc->ifc_type == SIMPLE) + err = ifc_simple_destroy(ifc, ifp); + else + err = (*ifc->ifc_destroy)(ifc, ifp); if (err != 0) { if_addgroup(ifp, ifc->ifc_name); @@ -279,21 +342,29 @@ return (err); } -/* - * Register a network interface cloner. - */ -int -if_clone_attach(struct if_clone *ifc) +static struct if_clone * +if_clone_alloc(const char *name, int maxunit) { - struct if_clone *ifc1; + struct if_clone *ifc; - KASSERT(ifc->ifc_name != NULL, ("%s: no name\n", __func__)); + KASSERT(name != NULL, ("%s: no name\n", __func__)); + ifc = malloc(sizeof(struct if_clone), M_CLONE, M_WAITOK | M_ZERO); + strncpy(ifc->ifc_name, name, IFCLOSIZ-1); IF_CLONE_LOCK_INIT(ifc); IF_CLONE_ADDREF(ifc); - ifc->ifc_unrhdr = new_unrhdr(0, ifc->ifc_maxunit, &ifc->ifc_mtx); + ifc->ifc_unrhdr = new_unrhdr(0, (maxunit ? maxunit : IF_MAXUNIT), + &ifc->ifc_mtx); LIST_INIT(&ifc->ifc_iflist); + return (ifc); +} + +static int +if_clone_attach(struct if_clone *ifc) +{ + struct if_clone *ifc1; + IF_CLONERS_LOCK(); LIST_FOREACH(ifc1, &V_if_cloners, ifc_list) if (strcmp(ifc->ifc_name, ifc1->ifc_name) == 0) { @@ -305,20 +376,67 @@ V_if_cloners_count++; IF_CLONERS_UNLOCK(); - if (ifc->ifc_attach != NULL) - (*ifc->ifc_attach)(ifc); + return (0); +} + +struct if_clone * +if_clone_advanced(const char *name, u_int maxunit, ifc_match_t match, + ifc_create_t create, ifc_destroy_t destroy) +{ + struct if_clone *ifc; + + ifc = if_clone_alloc(name, maxunit); + ifc->ifc_type = ADVANCED; + ifc->ifc_match = match; + ifc->ifc_create = create; + ifc->ifc_destroy = destroy; + + if (if_clone_attach(ifc) != 0) + return (NULL); + EVENTHANDLER_INVOKE(if_clone_event, ifc); - return (0); + return (ifc); } +struct if_clone * +if_clone_simple(const char *name, ifcs_create_t create, ifcs_destroy_t destroy, + u_int minifs) +{ + struct if_clone *ifc; + u_int unit; + + ifc = if_clone_alloc(name, 0); + ifc->ifc_type = SIMPLE; + ifc->ifcs_create = create; + ifc->ifcs_destroy = destroy; + ifc->ifcs_minifs = minifs; + + if (if_clone_attach(ifc) != 0) + return (NULL); + + for (unit = 0; unit < minifs; unit++) { + char name[IFNAMSIZ]; + int error; + + snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit); + error = if_clone_createif(ifc, name, IFNAMSIZ, NULL); + KASSERT(error == 0, + ("%s: failed to create required interface %s", + __func__, name)); + } + + EVENTHANDLER_INVOKE(if_clone_event, ifc); + + return (ifc); +} + /* * Unregister a network interface cloner. */ void if_clone_detach(struct if_clone *ifc) { - struct ifc_simple_data *ifcs = ifc->ifc_data; IF_CLONERS_LOCK(); LIST_REMOVE(ifc, ifc_list); @@ -326,8 +444,8 @@ IF_CLONERS_UNLOCK(); /* Allow all simples to be destroyed */ - if (ifc->ifc_attach == ifc_simple_attach) - ifcs->ifcs_minifs = 0; + if (ifc->ifc_type == SIMPLE) + ifc->ifcs_minifs = 0; /* destroy all interfaces for this cloner */ while (!LIST_EMPTY(&ifc->ifc_iflist)) @@ -345,6 +463,7 @@ IF_CLONE_LOCK_DESTROY(ifc); delete_unrhdr(ifc->ifc_unrhdr); + free(ifc, M_CLONE); } /* @@ -474,29 +593,7 @@ IF_CLONE_REMREF(ifc); } -void -ifc_simple_attach(struct if_clone *ifc) -{ - int err; - int unit; - char name[IFNAMSIZ]; - struct ifc_simple_data *ifcs = ifc->ifc_data; - - KASSERT(ifcs->ifcs_minifs - 1 <= ifc->ifc_maxunit, - ("%s: %s requested more units than allowed (%d > %d)", - __func__, ifc->ifc_name, ifcs->ifcs_minifs, - ifc->ifc_maxunit + 1)); - - for (unit = 0; unit < ifcs->ifcs_minifs; unit++) { - snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit); - err = if_clone_createif(ifc, name, IFNAMSIZ, NULL); - KASSERT(err == 0, - ("%s: failed to create required interface %s", - __func__, name)); - } -} - -int +static int ifc_simple_match(struct if_clone *ifc, const char *name) { const char *cp; @@ -517,14 +614,13 @@ return (1); } -int +static int ifc_simple_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) { char *dp; int wildcard; int unit; int err; - struct ifc_simple_data *ifcs = ifc->ifc_data; err = ifc_name2unit(name, &unit); if (err != 0) @@ -536,7 +632,7 @@ if (err != 0) return (err); - err = ifcs->ifcs_create(ifc, unit, params); + err = ifc->ifcs_create(ifc, unit, params); if (err != 0) { ifc_free_unit(ifc, unit); return (err); @@ -560,18 +656,17 @@ return (0); } -int +static int ifc_simple_destroy(struct if_clone *ifc, struct ifnet *ifp) { int unit; - struct ifc_simple_data *ifcs = ifc->ifc_data; unit = ifp->if_dunit; - if (unit < ifcs->ifcs_minifs) + if (unit < ifc->ifcs_minifs) return (EINVAL); - ifcs->ifcs_destroy(ifp); + ifc->ifcs_destroy(ifp); ifc_free_unit(ifc, unit); Index: if_clone.h =================================================================== --- if_clone.h (revision 228129) +++ if_clone.h (working copy) @@ -35,87 +35,42 @@ #ifdef _KERNEL -#define IFC_CLONE_INITIALIZER(name, data, maxunit, \ - attach, match, create, destroy) \ - { \ - .ifc_name = name, \ - .ifc_maxunit = maxunit, \ - .ifc_data = data, \ - .ifc_attach = attach, \ - .ifc_match = match, \ - .ifc_create = create, \ - .ifc_destroy = destroy, \ - } +struct if_clone; -/* - * Structure describing a `cloning' interface. - * - * List of locks - * (c) const until freeing - * (d) driver specific data, may need external protection. - * (e) locked by if_cloners_mtx - * (i) locked by ifc_mtx mtx - */ -struct if_clone { - LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */ - const char *ifc_name; /* (c) Name of device, e.g. `gif' */ - int ifc_maxunit; /* (c) Maximum unit number */ - struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ - void *ifc_data; /* (*) Data for ifc_* functions. */ +/* Methods. */ +typedef int ifc_match_t(struct if_clone *, const char *); +typedef int ifc_create_t(struct if_clone *, char *, size_t, caddr_t); +typedef int ifc_destroy_t(struct if_clone *, struct ifnet *); - /* (c) Driver specific cloning functions. Called with no locks held. */ - void (*ifc_attach)(struct if_clone *); - int (*ifc_match)(struct if_clone *, const char *); - int (*ifc_create)(struct if_clone *, char *, size_t, caddr_t); - int (*ifc_destroy)(struct if_clone *, struct ifnet *); +typedef int ifcs_create_t(struct if_clone *, int, caddr_t); +typedef void ifcs_destroy_t(struct ifnet *); - long ifc_refcnt; /* (i) Refrence count. */ - struct mtx ifc_mtx; /* Mutex to protect members. */ - LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces */ -}; - -void if_clone_init(void); -int if_clone_attach(struct if_clone *); +/* Interface cloner (de)allocating functions. */ +struct if_clone * + if_clone_advanced(const char *, u_int, ifc_match_t, ifc_create_t, + ifc_destroy_t); +struct if_clone * + if_clone_simple(const char *, ifcs_create_t, ifcs_destroy_t, u_int); void if_clone_detach(struct if_clone *); -void vnet_if_clone_init(void); -int if_clone_create(char *, size_t, caddr_t); -int if_clone_destroy(const char *); -int if_clone_destroyif(struct if_clone *, struct ifnet *); -int if_clone_list(struct if_clonereq *); - +/* Unit (de)allocating fucntions. */ int ifc_name2unit(const char *name, int *unit); int ifc_alloc_unit(struct if_clone *, int *); void ifc_free_unit(struct if_clone *, int); -/* - * The ifc_simple functions, structures, and macros implement basic - * cloning as in 5.[012]. - */ - -struct ifc_simple_data { - int ifcs_minifs; /* minimum number of interfaces */ - - int (*ifcs_create)(struct if_clone *, int, caddr_t); - void (*ifcs_destroy)(struct ifnet *); -}; - -/* interface clone event */ +/* Interface clone event. */ typedef void (*if_clone_event_handler_t)(void *, struct if_clone *); EVENTHANDLER_DECLARE(if_clone_event, if_clone_event_handler_t); -#define IFC_SIMPLE_DECLARE(name, minifs) \ -struct ifc_simple_data name##_cloner_data = \ - {minifs, name##_clone_create, name##_clone_destroy}; \ -struct if_clone name##_cloner = \ - IFC_CLONE_INITIALIZER(#name, &name##_cloner_data, IF_MAXUNIT, \ - ifc_simple_attach, ifc_simple_match, ifc_simple_create, ifc_simple_destroy) +/* The below interfaces used only by net/if.c. */ +void if_clone_init(void); +void vnet_if_clone_init(void); +int if_clone_create(char *, size_t, caddr_t); +int if_clone_destroy(const char *); +int if_clone_list(struct if_clonereq *); -void ifc_simple_attach(struct if_clone *); -int ifc_simple_match(struct if_clone *, const char *); -int ifc_simple_create(struct if_clone *, char *, size_t, caddr_t); -int ifc_simple_destroy(struct if_clone *, struct ifnet *); +/* The below interface used only by epair(4). */ +int if_clone_destroyif(struct if_clone *, struct ifnet *); #endif /* _KERNEL */ - #endif /* !_NET_IF_CLONE_H_ */ Index: if_vlan.c =================================================================== --- if_vlan.c (revision 228129) +++ if_vlan.c (working copy) @@ -207,11 +207,10 @@ static void vlan_ifdetach(void *arg, struct ifnet *ifp); static void vlan_iflladdr(void *arg, struct ifnet *ifp); -static struct if_clone vlan_cloner = IFC_CLONE_INITIALIZER(VLANNAME, NULL, - IF_MAXUNIT, NULL, vlan_clone_match, vlan_clone_create, vlan_clone_destroy); +static struct if_clone *vlan_cloner; #ifdef VIMAGE -static VNET_DEFINE(struct if_clone, vlan_cloner); +static VNET_DEFINE(struct if_clone *, vlan_cloner); #define V_vlan_cloner VNET(vlan_cloner) #endif @@ -719,7 +718,8 @@ vlan_tag_p = vlan_tag; vlan_devat_p = vlan_devat; #ifndef VIMAGE - if_clone_attach(&vlan_cloner); + vlan_cloner = if_clone_advanced(VLANNAME, 0, vlan_clone_match, + vlan_clone_create, vlan_clone_destroy); #endif if (bootverbose) printf("vlan: initialized, using " @@ -733,7 +733,7 @@ break; case MOD_UNLOAD: #ifndef VIMAGE - if_clone_detach(&vlan_cloner); + if_clone_detach(vlan_cloner); #endif EVENTHANDLER_DEREGISTER(ifnet_departure_event, ifdetach_tag); EVENTHANDLER_DEREGISTER(iflladdr_event, iflladdr_tag); @@ -769,8 +769,9 @@ vnet_vlan_init(const void *unused __unused) { + vlan_cloner = if_clone_advanced(VLANNAME, 0, vlan_clone_match, + vlan_clone_create, vlan_clone_destroy); V_vlan_cloner = vlan_cloner; - if_clone_attach(&V_vlan_cloner); } VNET_SYSINIT(vnet_vlan_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, vnet_vlan_init, NULL); @@ -779,7 +780,7 @@ vnet_vlan_uninit(const void *unused __unused) { - if_clone_detach(&V_vlan_cloner); + if_clone_detach(V_vlan_cloner); } VNET_SYSUNINIT(vnet_vlan_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST, vnet_vlan_uninit, NULL); @@ -936,7 +937,7 @@ * we don't conform to the default naming convention for interfaces. */ strlcpy(ifp->if_xname, name, IFNAMSIZ); - ifp->if_dname = ifc->ifc_name; + ifp->if_dname = VLANNAME; ifp->if_dunit = unit; /* NB: flags are not set here */ ifp->if_linkmib = &ifv->ifv_mib; Index: if_loop.c =================================================================== --- if_loop.c (revision 228129) +++ if_loop.c (working copy) @@ -106,13 +106,12 @@ VNET_DEFINE(struct ifnet *, loif); /* Used externally */ #ifdef VIMAGE -static VNET_DEFINE(struct ifc_simple_data, lo_cloner_data); -static VNET_DEFINE(struct if_clone, lo_cloner); -#define V_lo_cloner_data VNET(lo_cloner_data) +static VNET_DEFINE(struct if_clone *, lo_cloner); #define V_lo_cloner VNET(lo_cloner) #endif -IFC_SIMPLE_DECLARE(lo, 1); +static struct if_clone *lo_cloner; +static const char *loname = "lo"; static void lo_clone_destroy(struct ifnet *ifp) @@ -137,7 +136,7 @@ if (ifp == NULL) return (ENOSPC); - if_initname(ifp, ifc->ifc_name, unit); + if_initname(ifp, loname, unit); ifp->if_mtu = LOMTU; ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST; ifp->if_ioctl = loioctl; @@ -158,12 +157,12 @@ { #ifdef VIMAGE + lo_cloner = if_clone_simple(loname, lo_clone_create, lo_clone_destroy, + 1); V_lo_cloner = lo_cloner; - V_lo_cloner_data = lo_cloner_data; - V_lo_cloner.ifc_data = &V_lo_cloner_data; - if_clone_attach(&V_lo_cloner); #else - if_clone_attach(&lo_cloner); + lo_cloner = if_clone_simple(loname, lo_clone_create, lo_clone_destroy, + 1); #endif } VNET_SYSINIT(vnet_loif_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, @@ -174,7 +173,7 @@ vnet_loif_uninit(const void *unused __unused) { - if_clone_detach(&V_lo_cloner); + if_clone_detach(V_lo_cloner); V_loif = NULL; } VNET_SYSUNINIT(vnet_loif_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, Index: if_epair.c =================================================================== --- if_epair.c (revision 228129) +++ if_epair.c (working copy) @@ -171,9 +171,7 @@ static MALLOC_DEFINE(M_EPAIR, EPAIRNAME, "Pair of virtual cross-over connected Ethernet-like interfaces"); -static struct if_clone epair_cloner = IFC_CLONE_INITIALIZER( - EPAIRNAME, NULL, IF_MAXUNIT, - NULL, epair_clone_match, epair_clone_create, epair_clone_destroy); +static struct if_clone *epair_cloner; /* * DPCPU area and functions. @@ -714,7 +712,7 @@ /* * We are abusing params to create our second interface. - * Actually we already created it and called if_clone_createif() + * Actually we already created it and called if_clone_create() * for it to do the official insertion procedure the moment we knew * it cannot fail anymore. So just do attach it here. */ @@ -807,7 +805,7 @@ ifp = sca->ifp; ifp->if_softc = sca; strlcpy(ifp->if_xname, name, IFNAMSIZ); - ifp->if_dname = ifc->ifc_name; + ifp->if_dname = EPAIRNAME; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -833,7 +831,7 @@ ifp = scb->ifp; ifp->if_softc = scb; strlcpy(ifp->if_xname, name, IFNAMSIZ); - ifp->if_dname = ifc->ifc_name; + ifp->if_dname = EPAIRNAME; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -846,7 +844,7 @@ strlcpy(name, EPAIRNAME, len); error = if_clone_create(name, len, (caddr_t)scb); if (error) - panic("%s: if_clone_createif() for our 2nd iface failed: %d", + panic("%s: if_clone_create() for our 2nd iface failed: %d", __func__, error); scb->if_qflush = ifp->if_qflush; ifp->if_qflush = epair_qflush; @@ -956,12 +954,13 @@ if (TUNABLE_INT_FETCH("net.link.epair.netisr_maxqlen", &qlimit)) epair_nh.nh_qlimit = qlimit; netisr_register(&epair_nh); - if_clone_attach(&epair_cloner); + epair_cloner = if_clone_advanced(EPAIRNAME, 0, + epair_clone_match, epair_clone_create, epair_clone_destroy); if (bootverbose) printf("%s initialized.\n", EPAIRNAME); break; case MOD_UNLOAD: - if_clone_detach(&epair_cloner); + if_clone_detach(epair_cloner); netisr_unregister(&epair_nh); epair_dpcpu_detach(); if (bootverbose) --KN5l+BnMqAQyZLvT-- From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 14:18:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21B321065670; Tue, 29 Nov 2011 14:18:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FBA78FC19; Tue, 29 Nov 2011 14:18:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATEI5Vo048519; Tue, 29 Nov 2011 14:18:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATEI5iu048517; Tue, 29 Nov 2011 14:18:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111291418.pATEI5iu048517@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 14:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228134 - stable/9/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 14:18:06 -0000 Author: marius Date: Tue Nov 29 14:18:05 2011 New Revision: 228134 URL: http://svn.freebsd.org/changeset/base/228134 Log: MFC: r228028 - Based on a report on sparc64@ move V245 to the list of known working machines. - Mention that V480 with broken centerplanes have a chance of working with the WAR in the upcoming 8.3-RELEASE and 9.0-RELEASE. Approved by: re (kib) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 13:07:32 2011 (r228133) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 14:18:05 2011 (r228134) @@ -593,6 +593,10 @@ + &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + + + &sun.fire; V250 @@ -603,7 +607,8 @@ &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE) + which support first appeared in 7.3-RELEASE and 8.1-RELEASE, + other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) @@ -629,10 +634,6 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) - - - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ CPU-configurations only) From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 14:18:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1D41065675; Tue, 29 Nov 2011 14:18:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3982A8FC1B; Tue, 29 Nov 2011 14:18:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATEIJbw048573; Tue, 29 Nov 2011 14:18:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATEIJ6X048570; Tue, 29 Nov 2011 14:18:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111291418.pATEIJ6X048570@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 14:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228135 - releng/9.0/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 14:18:20 -0000 Author: marius Date: Tue Nov 29 14:18:19 2011 New Revision: 228135 URL: http://svn.freebsd.org/changeset/base/228135 Log: MFC: r228028 - Based on a report on sparc64@ move V245 to the list of known working machines. - Mention that V480 with broken centerplanes have a chance of working with the WAR in the upcoming 8.3-RELEASE and 9.0-RELEASE. Approved by: re (kib) Modified: releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: releng/9.0/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 14:18:05 2011 (r228134) +++ releng/9.0/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 14:18:19 2011 (r228135) @@ -593,6 +593,10 @@ + &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + + + &sun.fire; V250 @@ -603,7 +607,8 @@ &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE) + which support first appeared in 7.3-RELEASE and 8.1-RELEASE, + other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) @@ -629,10 +634,6 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) - - - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ CPU-configurations only) From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 14:27:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F005B1065675; Tue, 29 Nov 2011 14:27:22 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 73B558FC18; Tue, 29 Nov 2011 14:27:22 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so6220967vcb.13 for ; Tue, 29 Nov 2011 06:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=E7+3ECEV/ag78cZ3oySoWZAL38lCbsrdDO1b/56n9Z4=; b=XNCju4C3+33yTn8yyoxa6Z+jsFxXYBHAnY9tjoWQVFmsYSihA9wvDDo4wW4XwTrxao YA6b2IH5NmD6uJ4fp5qvIYQ+ceB4a5FjDk/7jOYGHILaKsIJof1b0qcMJ5O+eBK+D3l0 OdNxkP3b/FftoDn/SHRXRqeT5rqQraQFXo7HY= Received: by 10.220.151.196 with SMTP id d4mr5810752vcw.154.1322575261953; Tue, 29 Nov 2011 06:01:01 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id b10sm14513993vdf.7.2011.11.29.06.00.50 (version=SSLv3 cipher=OTHER); Tue, 29 Nov 2011 06:00:52 -0800 (PST) Date: Tue, 29 Nov 2011 09:00:43 -0500 From: Alexander Kabaev To: Max Khon Message-ID: <20111129090043.0ac7fa56@kan.dyndns.org> In-Reply-To: <201111290838.pAT8clOa031710@svn.freebsd.org> References: <201111290838.pAT8clOa031710@svn.freebsd.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/wq7m6Z40XqWZ.45aOh48Tv/"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228124 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 14:27:23 -0000 --Sig_/wq7m6Z40XqWZ.45aOh48Tv/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 29 Nov 2011 08:38:47 +0000 (UTC) Max Khon wrote: > Author: fjoe > Date: Tue Nov 29 08:38:47 2011 > New Revision: 228124 > URL: http://svn.freebsd.org/changeset/base/228124 >=20 > Log: > Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) > instead of executing a shell on every object or executable/library > file.=20 > This shaves off more than 30,000 shell invocations during > buildworld. Have you looked as to _why_ it was done through shell invocation in the first place before removing it? You now have broken CTF support in cases where WITH_CTF is set not on make command line or in environment, but say in each individual Makefile. --=20 Alexander Kabaev --Sig_/wq7m6Z40XqWZ.45aOh48Tv/ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFO1OWRQ6z1jMm+XZYRAh7mAKCsGgJTFJttHn/Q0ULzWU18GqhCdACeMq+J 1bqqTM/o1iyU125x5tp7glI= =vbrC -----END PGP SIGNATURE----- --Sig_/wq7m6Z40XqWZ.45aOh48Tv/-- From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 16:13:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ECA51065670; Tue, 29 Nov 2011 16:13:21 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id E57828FC0A; Tue, 29 Nov 2011 16:13:20 +0000 (UTC) Received: from lstewart1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id CE9047E820; Wed, 30 Nov 2011 03:13:18 +1100 (EST) Message-ID: <4ED5049E.60307@freebsd.org> Date: Wed, 30 Nov 2011 03:13:18 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111016 Thunderbird/7.0.1 MIME-Version: 1.0 To: Julien Ridoux References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <648D11A8-3636-49E5-BF20-83E4EA87242C@cubinlab.ee.unimelb.edu.au> <4EC9FD8A.5040401@freebsd.org> <201111220830.05029.jhb@freebsd.org> <4ECBAB19.4010907@freebsd.org> <8805563E-60F9-4BF4-A292-1A43C4FA368A@cubinlab.ee.unimelb.edu.au> <4ECCA2A1.4020408@freebsd.org> <4ED4D89D.9000904@freebsd.org> In-Reply-To: <4ED4D89D.9000904@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, Ben Kaduk , Benjamin Kaduk , svn-src-head@FreeBSD.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 16:13:21 -0000 On 11/30/11 00:05, Lawrence Stewart wrote: > On 11/28/11 14:59, Benjamin Kaduk wrote: >> On Wed, 23 Nov 2011, Lawrence Stewart wrote: >>> On 11/23/11 17:42, Julien Ridoux wrote: [snip] >>>> What is your favourite option? >>> >>> FreeBSD parlance is to ask what colour you would like to paint the >>> bikeshed ;) >>> >>> As I've never experienced the pain John refers to, I'll defer to the >>> wisdom of others on whether the proposed patch will create pain down >>> the road. I think it's ok, but if consensus is 8bytes per packet isn't >>> going to break the bank, I guess we just go for it - but I guess I am >>> cautious about this route as we can push a lot of packets per second >>> through the stack. >> >> Since other people seem to be keeping quiet, I'll add that I'm in favor >> of just always adding the 8 bytes per packet. > > Julien and I discussed this at length today, and agree that for head, > we'll add the new bh_ffcounter member to the BPF header unconditionally. > > Thanks to you and John for the input. > > I'm going to revert r227778 in order to start form a clean slate, and > add two separate patches. One will reintegrate FFCLOCK support with BPF > without breaking the ABI. A follow up patch will bump the ffclock > version and add the bh_ffcounter to the bpf header (after the timestamp > member). Then a final patch will bump __FreeBSD_version and add a note > to UPDATING about recompiling to get kernel/world in sync, which should > seal the deal. Here's the first of the patches: http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_intactabi_10.x.r228130.patch Julien, it's basically what you sent me today, but is against vanilla bpf.c/bpf.h (I decided at the last minute that reverting r227778 first was going to be cleaner and easier to follow). Relative to what you sent, it also has some tweaks to reduce the diff size, remove the unnecessary uses of BPF_T_FLAG()/BPF_T_FORMAT() and fix the "(u_char *)&mb" buglet. If I don't hear any objections, I'll commit it tomorrow. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 16:34:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DB36106566B; Tue, 29 Nov 2011 16:34:45 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27E8C8FC1C; Tue, 29 Nov 2011 16:34:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATGYjm0056128; Tue, 29 Nov 2011 16:34:45 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATGYisH056119; Tue, 29 Nov 2011 16:34:44 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111291634.pATGYisH056119@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 16:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228137 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 16:34:45 -0000 Author: fjoe Date: Tue Nov 29 16:34:44 2011 New Revision: 228137 URL: http://svn.freebsd.org/changeset/base/228137 Log: - fix WITH_CTF when specified in /etc/src.conf [1] - CTFCONVERT_CMD=... is a hack (should be defined to empty string instead): make(1) should be taught to ignore empty commands silently in compat mode (as it does in !compat mode, GNU make also silently ignores empty commands) and to skip printing empty commands in !compat mode - config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@': this will allow to simplify kern.pre.mk even more and lessen the number of shell invocations during kernel build when CTF is turned off - WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure Pointy hat to: fjoe [1] Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk head/share/mk/sys.mk head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/share/mk/bsd.lib.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -33,15 +33,10 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif -# Enable CTF conversion on request. -.if defined(WITH_CTF) -.undef NO_CTF -.endif - .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} -.if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") +.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "") CTFFLAGS+= -g .endif .endif @@ -69,21 +64,15 @@ PO_FLAG=-pg .c.o: ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \ - (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \ - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}) + ${CTFCONVERT_CMD} .c.po: ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .c.So: ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .cc.o: ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -96,47 +85,33 @@ PO_FLAG=-pg .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .f.So: ${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .s.po .s.So: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .asm.po: ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .asm.So: ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .S.po: ${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .S.So: ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} all: objwarn @@ -211,7 +186,7 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif -.if !defined(NO_CTF) +.if defined(WITH_CTF) ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif .endif Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/share/mk/bsd.own.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -189,6 +189,12 @@ STRIP?= -s COMPRESS_CMD?= gzip -cn COMPRESS_EXT?= .gz +.if defined(WITH_CTF) +CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.else +CTFCONVERT_CMD= ... +.endif + .if !defined(_WITHOUT_SRCCONF) # # Define MK_* variables (which are either "yes" or "no") for users Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/share/mk/bsd.prog.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -15,16 +15,11 @@ CFLAGS+= -DNDEBUG NO_WERROR= .endif -# Enable CTF conversion on request. -.if defined(WITH_CTF) -.undef NO_CTF -.endif - .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} -.if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "") +.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "") CTFFLAGS+= -g .endif .endif @@ -60,7 +55,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if !defined(NO_CTF) +.if defined(WITH_CTF) ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif @@ -90,7 +85,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if !defined(NO_CTF) +.if defined(WITH_CTF) ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/share/mk/sys.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -59,12 +59,6 @@ CFLAGS += -fno-strict-aliasing .endif PO_CFLAGS ?= ${CFLAGS} -# Turn CTF conversion off by default for now. This default could be -# changed later if DTrace becomes popular. -.if !defined(WITH_CTF) -NO_CTF = 1 -.endif - # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION @@ -158,15 +152,11 @@ YFLAGS ?= -d # SINGLE SUFFIX RULES .c: ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .f: ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .sh: cp -f ${.IMPSRC} ${.TARGET} @@ -176,33 +166,25 @@ YFLAGS ?= -d .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .f.o: ${FC} ${FFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .y.c: ${YACC} ${YFLAGS} ${.IMPSRC} @@ -240,15 +222,11 @@ YFLAGS ?= -d .c: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .c.o: ${CC} ${CFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} @@ -258,15 +236,11 @@ YFLAGS ?= -d .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .p.o: ${PC} ${PFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .e .r .F .f: ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \ @@ -277,38 +251,28 @@ YFLAGS ?= -d .S.o: ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .asm.o: ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .s.o: ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .l.o: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET} rm -f ${.PREFIX}.tmp.c -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} # XXX not -j safe .y.c: @@ -320,34 +284,26 @@ YFLAGS ?= -d .s.out .c.out .o.out: ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .f.out .F.out .r.out .e.out: ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \ ${LDLIBS} -o ${.TARGET} rm -f ${.PREFIX}.o -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} rm -f y.tab.c -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} rm -f ${.PREFIX}.tmp.c -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + ${CTFCONVERT_CMD} # FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef. __MAKE_CONF?=/etc/make.conf Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/sys/conf/kern.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -126,10 +126,3 @@ CFLAGS+= -ffreestanding ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" CFLAGS+= -fstack-protector .endif - -# -# Enable CTF conversion on request -# -.if defined(WITH_CTF) -.undef NO_CTF -.endif Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/sys/conf/kern.post.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -94,7 +94,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} -.if !defined(NO_CTF) +.if defined(WITH_CTF) ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o .endif .if !defined(DEBUG) @@ -249,9 +249,7 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} -.if !defined(NO_CTF) - ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.endif + @${NORMAL_CTFCONVERT} config.ln env.ln hints.ln vers.ln vnode_if.ln: ${NORMAL_LINT} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/sys/conf/kern.pre.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -123,8 +123,9 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -.if !defined(NO_CTF) -NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.if defined(WITH_CTF) +CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +NORMAL_CTFCONVERT= ${ECHO} ${CTFCONVERT_CMD} && ${CTFCONVERT_CMD} .else NORMAL_CTFCONVERT= : .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Nov 29 15:24:19 2011 (r228136) +++ head/sys/conf/kmod.mk Tue Nov 29 16:34:44 2011 (r228137) @@ -72,11 +72,6 @@ OBJCOPY?= objcopy .error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" .endif -# Enable CTF conversion on request. -.if defined(WITH_CTF) -.undef NO_CTF -.endif - .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 16:36:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F151106564A; Tue, 29 Nov 2011 16:36:00 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id CF9EB8FC1D; Tue, 29 Nov 2011 16:35:59 +0000 (UTC) Received: by qadc10 with SMTP id c10so5419217qad.13 for ; Tue, 29 Nov 2011 08:35:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.45.6 with SMTP id i6mr13612691obm.3.1322584558960; Tue, 29 Nov 2011 08:35:58 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Tue, 29 Nov 2011 08:35:58 -0800 (PST) X-Originating-IP: [80.89.199.122] In-Reply-To: <20111129090043.0ac7fa56@kan.dyndns.org> References: <201111290838.pAT8clOa031710@svn.freebsd.org> <20111129090043.0ac7fa56@kan.dyndns.org> Date: Tue, 29 Nov 2011 22:35:58 +0600 X-Google-Sender-Auth: FmZDv4WQ1MaWLzydocXjnTMTUOI Message-ID: From: Max Khon To: Alexander Kabaev Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228124 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 16:36:00 -0000 Alexander, On Tue, Nov 29, 2011 at 9:00 PM, Alexander Kabaev wrote: > Author: fjoe > > Date: Tue Nov 29 08:38:47 2011 > > New Revision: 228124 > > URL: http://svn.freebsd.org/changeset/base/228124 > > > > Log: > > Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) > > instead of executing a shell on every object or executable/library > > file. > > This shaves off more than 30,000 shell invocations during > > buildworld. > > Have you looked as to _why_ it was done through shell invocation in the > first place before removing it? You now have broken CTF support in > cases where WITH_CTF is set not on make command line or in environment, > but say in each individual Makefile. I tested all the use-cases mentioned in the original commit but it looks like I specified the location of modified share/mk incorrectly when I did WITH_CTF userland tests. Should be fixed now. Sorry for the breakage. Max From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 18:09:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 63E84106566B; Tue, 29 Nov 2011 18:09:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Lawrence Stewart Date: Tue, 29 Nov 2011 13:09:19 -0500 User-Agent: KMail/1.6.2 References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <4ED4D89D.9000904@freebsd.org> <4ED5049E.60307@freebsd.org> In-Reply-To: <4ED5049E.60307@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111291309.20419.jkim@FreeBSD.org> Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , Benjamin Kaduk , svn-src-head@freebsd.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 18:09:28 -0000 On Tuesday 29 November 2011 11:13 am, Lawrence Stewart wrote: > On 11/30/11 00:05, Lawrence Stewart wrote: > > On 11/28/11 14:59, Benjamin Kaduk wrote: > >> On Wed, 23 Nov 2011, Lawrence Stewart wrote: > >>> On 11/23/11 17:42, Julien Ridoux wrote: > > [snip] > > >>>> What is your favourite option? > >>> > >>> FreeBSD parlance is to ask what colour you would like to paint > >>> the bikeshed ;) > >>> > >>> As I've never experienced the pain John refers to, I'll defer > >>> to the wisdom of others on whether the proposed patch will > >>> create pain down the road. I think it's ok, but if consensus is > >>> 8bytes per packet isn't going to break the bank, I guess we > >>> just go for it - but I guess I am cautious about this route as > >>> we can push a lot of packets per second through the stack. > >> > >> Since other people seem to be keeping quiet, I'll add that I'm > >> in favor of just always adding the 8 bytes per packet. > > > > Julien and I discussed this at length today, and agree that for > > head, we'll add the new bh_ffcounter member to the BPF header > > unconditionally. > > > > Thanks to you and John for the input. > > > > I'm going to revert r227778 in order to start form a clean slate, > > and add two separate patches. One will reintegrate FFCLOCK > > support with BPF without breaking the ABI. A follow up patch will > > bump the ffclock version and add the bh_ffcounter to the bpf > > header (after the timestamp member). Then a final patch will bump > > __FreeBSD_version and add a note to UPDATING about recompiling to > > get kernel/world in sync, which should seal the deal. > > Here's the first of the patches: > > http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_intact >abi_10.x.r228130.patch I only glanced at it but it looks very close to what I wanted to suggest. Thanks! Jung-uk Kim > Julien, it's basically what you sent me today, but is against > vanilla bpf.c/bpf.h (I decided at the last minute that reverting > r227778 first was going to be cleaner and easier to follow). > Relative to what you sent, it also has some tweaks to reduce the > diff size, remove the unnecessary uses of > BPF_T_FLAG()/BPF_T_FORMAT() and fix the "(u_char *)&mb" buglet. > > If I don't hear any objections, I'll commit it tomorrow. > > Cheers, > Lawrence From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 18:21:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EF14106566C; Tue, 29 Nov 2011 18:21:35 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C91B8FC14; Tue, 29 Nov 2011 18:21:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATILZru060924; Tue, 29 Nov 2011 18:21:35 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATILZFj060922; Tue, 29 Nov 2011 18:21:35 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201111291821.pATILZFj060922@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 29 Nov 2011 18:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228138 - stable/9/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 18:21:35 -0000 Author: pluknet Date: Tue Nov 29 18:21:34 2011 New Revision: 228138 URL: http://svn.freebsd.org/changeset/base/228138 Log: Update for RELENG_9. This is a direct commit. Approved by: re (kib) Modified: stable/9/share/examples/cvsup/standard-supfile Modified: stable/9/share/examples/cvsup/standard-supfile ============================================================================== --- stable/9/share/examples/cvsup/standard-supfile Tue Nov 29 16:34:44 2011 (r228137) +++ stable/9/share/examples/cvsup/standard-supfile Tue Nov 29 18:21:34 2011 (r228138) @@ -49,7 +49,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=. +*default release=cvs tag=RELENG_9 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 18:23:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F2E91065672; Tue, 29 Nov 2011 18:23:09 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA0A8FC22; Tue, 29 Nov 2011 18:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATIN9P4061024; Tue, 29 Nov 2011 18:23:09 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATIN94m061022; Tue, 29 Nov 2011 18:23:09 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201111291823.pATIN94m061022@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 29 Nov 2011 18:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228139 - releng/9.0/share/examples/cvsup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 18:23:09 -0000 Author: pluknet Date: Tue Nov 29 18:23:08 2011 New Revision: 228139 URL: http://svn.freebsd.org/changeset/base/228139 Log: Adjust branch tag. This is a direct commit. Approved by: re (kib) Modified: releng/9.0/share/examples/cvsup/standard-supfile Modified: releng/9.0/share/examples/cvsup/standard-supfile ============================================================================== --- releng/9.0/share/examples/cvsup/standard-supfile Tue Nov 29 18:21:34 2011 (r228138) +++ releng/9.0/share/examples/cvsup/standard-supfile Tue Nov 29 18:23:08 2011 (r228139) @@ -49,7 +49,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=. +*default release=cvs tag=RELENG_9_0 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 18:52:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAF20106564A; Tue, 29 Nov 2011 18:52:02 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9A1A8FC0C; Tue, 29 Nov 2011 18:52:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATIq2rU061893; Tue, 29 Nov 2011 18:52:02 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATIq2eU061891; Tue, 29 Nov 2011 18:52:02 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111291852.pATIq2eU061891@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 18:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228140 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 18:52:02 -0000 Author: fjoe Date: Tue Nov 29 18:52:02 2011 New Revision: 228140 URL: http://svn.freebsd.org/changeset/base/228140 Log: Do not echo ${CTFCONVERT} command: config(8) will be fixed to not emit '@' for ${NORMAL_CTFCONVERT} invocation. Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Nov 29 18:23:08 2011 (r228139) +++ head/sys/conf/kern.pre.mk Tue Nov 29 18:52:02 2011 (r228140) @@ -124,8 +124,7 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops. ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c .if defined(WITH_CTF) -CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -NORMAL_CTFCONVERT= ${ECHO} ${CTFCONVERT_CMD} && ${CTFCONVERT_CMD} +NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .else NORMAL_CTFCONVERT= : .endif From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 19:13:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28A1E1065679; Tue, 29 Nov 2011 19:13:02 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 178068FC15; Tue, 29 Nov 2011 19:13:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATJD1eF062883; Tue, 29 Nov 2011 19:13:01 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATJD15Z062881; Tue, 29 Nov 2011 19:13:01 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111291913.pATJD15Z062881@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 19:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228141 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 19:13:02 -0000 Author: fjoe Date: Tue Nov 29 19:13:01 2011 New Revision: 228141 URL: http://svn.freebsd.org/changeset/base/228141 Log: Call CTFMERGE only when WITH_CTF is defined. Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Nov 29 18:52:02 2011 (r228140) +++ head/sys/conf/kmod.mk Tue Nov 29 19:13:01 2011 (r228141) @@ -201,7 +201,7 @@ ${KMOD}.kld: ${OBJS} ${FULLPROG}: ${OBJS} .endif ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} -.if !defined(NO_CTF) +.if defined(WITH_CTF) ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .if defined(EXPORT_SYMS) From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 19:45:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B81E71065670; Tue, 29 Nov 2011 19:45:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5A808FC12; Tue, 29 Nov 2011 19:45:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATJjw9p064038; Tue, 29 Nov 2011 19:45:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATJjwkJ064036; Tue, 29 Nov 2011 19:45:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111291945.pATJjwkJ064036@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 19:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228142 - stable/8/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 19:45:58 -0000 Author: marius Date: Tue Nov 29 19:45:58 2011 New Revision: 228142 URL: http://svn.freebsd.org/changeset/base/228142 Log: MFC: r228028 - Based on a report on sparc64@ move V245 to the list of known working machines. - Mention that V480 with broken centerplanes have a chance of working with the WAR in the upcoming 8.3-RELEASE and 9.0-RELEASE. Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 19:13:01 2011 (r228141) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Nov 29 19:45:58 2011 (r228142) @@ -540,6 +540,10 @@ + &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + + + &sun.fire; V250 @@ -550,7 +554,8 @@ &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE) + which support first appeared in 7.3-RELEASE and 8.1-RELEASE, + other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) @@ -576,10 +581,6 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) - - - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ CPU-configurations only) From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 19:46:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E167F106566B; Tue, 29 Nov 2011 19:46:17 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFF8A8FC19; Tue, 29 Nov 2011 19:46:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATJkHXN064098; Tue, 29 Nov 2011 19:46:17 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATJkHMs064094; Tue, 29 Nov 2011 19:46:17 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111291946.pATJkHMs064094@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 19:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 19:46:18 -0000 Author: fjoe Date: Tue Nov 29 19:46:17 2011 New Revision: 228143 URL: http://svn.freebsd.org/changeset/base/228143 Log: Turn off profiled libs build by default. Can be enabled back using WITH_PROFILE=yes in /etc/src.conf Added: head/tools/build/options/WITH_PROFILE - copied, changed from r227900, head/tools/build/options/WITHOUT_PROFILE Deleted: head/tools/build/options/WITHOUT_PROFILE Modified: head/Makefile.inc1 head/share/mk/bsd.own.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Nov 29 19:45:58 2011 (r228142) +++ head/Makefile.inc1 Tue Nov 29 19:46:17 2011 (r228143) @@ -239,7 +239,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ - -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ + -DNO_PIC -DNO_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF # build-tools stage @@ -438,7 +438,7 @@ _libraries: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; \ ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ - -DWITHOUT_MAN -DWITHOUT_PROFILE libraries + -DWITHOUT_MAN -DNO_PROFILE libraries _depend: @echo @echo "--------------------------------------------------------------" @@ -1321,8 +1321,8 @@ ${_lib}__PL: .PHONY cd ${.CURDIR}/${_lib}; \ ${MAKE} DIRPRFX=${_lib}/ obj; \ ${MAKE} DIRPRFX=${_lib}/ depend; \ - ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \ - ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install + ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \ + ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install .endif .endfor @@ -1555,7 +1555,7 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE} .endif NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ - -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \ + -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \ -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \ TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Nov 29 19:45:58 2011 (r228142) +++ head/share/mk/bsd.own.mk Tue Nov 29 19:46:17 2011 (r228143) @@ -388,7 +388,6 @@ __DEFAULT_YES_OPTIONS = \ PMC \ PORTSNAP \ PPP \ - PROFILE \ QUOTAS \ RCMDS \ RCS \ @@ -423,7 +422,8 @@ __DEFAULT_NO_OPTIONS = \ ICONV \ IDEA \ LIBCPLUSPLUS \ - OFED + OFED \ + PROFILE # # Default behaviour of some options depends on the architecture. Unfortunately Copied and modified: head/tools/build/options/WITH_PROFILE (from r227900, head/tools/build/options/WITHOUT_PROFILE) ============================================================================== --- head/tools/build/options/WITHOUT_PROFILE Wed Nov 23 18:15:49 2011 (r227900, copy source) +++ head/tools/build/options/WITH_PROFILE Tue Nov 29 19:46:17 2011 (r228143) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to avoid compiling profiled libraries. +Set to build profiled libraries. From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 19:49:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C60561065670; Tue, 29 Nov 2011 19:49:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B40A88FC08; Tue, 29 Nov 2011 19:49:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATJn9XW064274; Tue, 29 Nov 2011 19:49:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATJn9oO064272; Tue, 29 Nov 2011 19:49:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111291949.pATJn9oO064272@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 19:49:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228145 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 19:49:09 -0000 Author: marius Date: Tue Nov 29 19:49:09 2011 New Revision: 228145 URL: http://svn.freebsd.org/changeset/base/228145 Log: MFC: r227960 Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by OpenSolaris. One second turned out to be not enough for certain loads while 10 seconds were sufficient. Reported by: Peter Jeremy Modified: stable/8/sys/sparc64/pci/schizo.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Tue Nov 29 19:47:11 2011 (r228144) +++ stable/8/sys/sparc64/pci/schizo.c Tue Nov 29 19:49:09 2011 (r228145) @@ -1171,7 +1171,7 @@ schizo_dmamap_sync(bus_dma_tag_t dt, bus ; SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); - end.tv_sec = 1; + end.tv_sec = 15; end.tv_usec = 0; timevaladd(&end, &cur); for (; (res = atomic_cmpset_rel_32(&sc->sc_cdma_state, From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 19:49:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B7F0106566B; Tue, 29 Nov 2011 19:49:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 097E78FC0A; Tue, 29 Nov 2011 19:49:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATJnBdK064309; Tue, 29 Nov 2011 19:49:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATJnBsS064307; Tue, 29 Nov 2011 19:49:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111291949.pATJnBsS064307@svn.freebsd.org> From: Marius Strobl Date: Tue, 29 Nov 2011 19:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228146 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 19:49:12 -0000 Author: marius Date: Tue Nov 29 19:49:11 2011 New Revision: 228146 URL: http://svn.freebsd.org/changeset/base/228146 Log: MFC: r227960 Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by OpenSolaris. One second turned out to be not enough for certain loads while 10 seconds were sufficient. Reported by: Peter Jeremy Modified: stable/7/sys/sparc64/pci/schizo.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Tue Nov 29 19:49:09 2011 (r228145) +++ stable/7/sys/sparc64/pci/schizo.c Tue Nov 29 19:49:11 2011 (r228146) @@ -1171,7 +1171,7 @@ schizo_dmamap_sync(bus_dma_tag_t dt, bus ; SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); - end.tv_sec = 1; + end.tv_sec = 15; end.tv_usec = 0; timevaladd(&end, &cur); for (; (res = atomic_cmpset_rel_32(&sc->sc_cdma_state, From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 20:06:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7AAC1065670; Tue, 29 Nov 2011 20:06:27 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96CE48FC08; Tue, 29 Nov 2011 20:06:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATK6R0A064879; Tue, 29 Nov 2011 20:06:27 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATK6RvU064877; Tue, 29 Nov 2011 20:06:27 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111292006.pATK6RvU064877@svn.freebsd.org> From: Max Khon Date: Tue, 29 Nov 2011 20:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228147 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 20:06:27 -0000 Author: fjoe Date: Tue Nov 29 20:06:27 2011 New Revision: 228147 URL: http://svn.freebsd.org/changeset/base/228147 Log: CTFCONVERT_CMD=... hack does not work sufficiently well in parallel builds. Put a bandaid until make(1) is taught to ignore empty commands. Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Nov 29 19:49:11 2011 (r228146) +++ head/share/mk/bsd.own.mk Tue Nov 29 20:06:27 2011 (r228147) @@ -192,7 +192,7 @@ COMPRESS_EXT?= .gz .if defined(WITH_CTF) CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .else -CTFCONVERT_CMD= ... +CTFCONVERT_CMD= @: .endif .if !defined(_WITHOUT_SRCCONF) From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 20:36:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 301C3106566B; Tue, 29 Nov 2011 20:36:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 06F3A8FC14; Tue, 29 Nov 2011 20:36:35 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id B194C46B0D; Tue, 29 Nov 2011 15:36:34 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 336DAB942; Tue, 29 Nov 2011 15:36:34 -0500 (EST) From: John Baldwin To: Max Khon Date: Tue, 29 Nov 2011 15:36:33 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111291946.pATJkHMs064094@svn.freebsd.org> In-Reply-To: <201111291946.pATJkHMs064094@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201111291536.33736.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 29 Nov 2011 15:36:34 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 20:36:35 -0000 On Tuesday, November 29, 2011 2:46:17 pm Max Khon wrote: > Author: fjoe > Date: Tue Nov 29 19:46:17 2011 > New Revision: 228143 > URL: http://svn.freebsd.org/changeset/base/228143 > > Log: > Turn off profiled libs build by default. > Can be enabled back using WITH_PROFILE=yes in /etc/src.conf Hmm, was discussed anywhere? (I haven't seen it if so, but am a bit behind on a few lists from last week still.) Also, it seems you are hacking on several build-related things currently, is there a larger project you are working on to reduce build world times or some such? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 20:47:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23DDA106566B; Tue, 29 Nov 2011 20:47:40 +0000 (UTC) (envelope-from gabor@t-hosting.hu) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 888EA8FC08; Tue, 29 Nov 2011 20:47:39 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id EB23414E6704; Tue, 29 Nov 2011 21:47:37 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XkE7zKbDyRot; Tue, 29 Nov 2011 21:47:32 +0100 (CET) Received: from [192.168.1.117] (catv-80-98-232-12.catv.broadband.hu [80.98.232.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id A83E814E6025; Tue, 29 Nov 2011 21:47:32 +0100 (CET) Message-ID: <4ED544E1.3050307@t-hosting.hu> Date: Tue, 29 Nov 2011 21:47:29 +0100 From: =?UTF-8?B?R8OhYm9yIEvDtnZlc2TDoW4=?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a2) Gecko/20111122 Thunderbird/10.0a2 MIME-Version: 1.0 To: Max Khon References: <201111291946.pATJkHMs064094@svn.freebsd.org> In-Reply-To: <201111291946.pATJkHMs064094@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 20:47:40 -0000 On 2011.11.29. 20:46, Max Khon wrote: > Log: > Turn off profiled libs build by default. > Can be enabled back using WITH_PROFILE=yes in /etc/src.conf I think it was useful. Profiling is useful for developing any piece of software that builds on libc or other common libs, even for software that is not directly related to FreeBSD. I think it should be reverted. Gabor From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 20:50:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 3625A106566C; Tue, 29 Nov 2011 20:50:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 90E0D14F23C; Tue, 29 Nov 2011 20:50:49 +0000 (UTC) Message-ID: <4ED545A9.8000304@FreeBSD.org> Date: Tue, 29 Nov 2011 12:50:49 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> In-Reply-To: <4ED544E1.3050307@t-hosting.hu> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 20:50:50 -0000 On 11/29/2011 12:47, Gábor Kövesdán wrote: > On 2011.11.29. 20:46, Max Khon wrote: >> Log: >> Turn off profiled libs build by default. >> Can be enabled back using WITH_PROFILE=yes in /etc/src.conf > I think it was useful. Profiling is useful for developing any piece of > software that builds on libc or other common libs, even for software > that is not directly related to FreeBSD. I think it should be reverted. Since we ask users to read -current, it would be useful if our developers did too. :) As Max pointed out in his message about this, the profiled libs are only really useful to a tiny percentage of developers. If you need them, twist the knob. Building them should be off by default. Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 20:53:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB127106564A; Tue, 29 Nov 2011 20:53:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0DECA8FC13; Tue, 29 Nov 2011 20:53:01 +0000 (UTC) Received: by qyg36 with SMTP id 36so6215185qyg.13 for ; Tue, 29 Nov 2011 12:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=lSZ0dd2prcob5SCG5NHw0Y1Hzizstri16X7ez91XZ2Q=; b=Lc2kyqYwacijUywgfcl2rRkJuTLkeKD688xdE1EaaE2ID+k4pGO9SXyHgc20k2Z1sc H24WnpNnuNriQvCrEtnokttCoNioKKYPpN2tZoFeijHDrvr1BI2MROEJjKddJhpLqukb xs0wXhq2tXuTUFeSAXDi8rTGy3RQSSfqDdCv4= MIME-Version: 1.0 Received: by 10.182.154.66 with SMTP id vm2mr9655216obb.52.1322599981449; Tue, 29 Nov 2011 12:53:01 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 29 Nov 2011 12:53:01 -0800 (PST) In-Reply-To: <4ED545A9.8000304@FreeBSD.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> Date: Tue, 29 Nov 2011 12:53:01 -0800 Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?ISO-8859-1?B?R+Fib3IgS/Z2ZXNk4W4=?= Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 20:53:02 -0000 2011/11/29 Doug Barton : > On 11/29/2011 12:47, G=E1bor K=F6vesd=E1n wrote: >> On 2011.11.29. 20:46, Max Khon wrote: >>> Log: >>> =A0 =A0Turn off profiled libs build by default. >>> =A0 =A0Can be enabled back using WITH_PROFILE=3Dyes in /etc/src.conf >> I think it was useful. Profiling is useful for developing any piece of >> software that builds on libc or other common libs, even for software >> that is not directly related to FreeBSD. I think it should be reverted. > > Since we ask users to read -current, it would be useful if our > developers did too. :) > > As Max pointed out in his message about this, the profiled libs are only > really useful to a tiny percentage of developers. If you need them, > twist the knob. Building them should be off by default. +1. The needs of the many outweigh the needs of the few. As suggested elsewhere, I think it would also be a good idea to enable it in tinderbox builds. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 21:19:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57DD5106564A; Tue, 29 Nov 2011 21:19:40 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id AB8EF8FC16; Tue, 29 Nov 2011 21:19:38 +0000 (UTC) Received: from outgoing.leidinger.net (p4FC425BB.dip.t-dialin.net [79.196.37.187]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 9475084400D; Tue, 29 Nov 2011 22:02:25 +0100 (CET) Received: from localhost (Tab.Leidinger.net [192.168.1.16]) by outgoing.leidinger.net (Postfix) with ESMTPSA id C2B4453AF; Tue, 29 Nov 2011 22:02:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1322600542; bh=ncHYddrVXruHFSZZaXienlFsHhLiytibSW+fdWsr0UI=; h=Date:Subject:Message-ID:From:To:MIME-Version:Content-Type; b=u5znWG5Vry9uMNKTt8Fh3PUcmnAM+2mPRxIPfNBqmKi5QD4Sr2GSjIKh4VYSlBJ+/ mkwsTanaAJxhRCA6SS8DcRqn5EDJSuNLclfcmRSyR2I+BgAgxVz9YedvxVpL2/2hqO EUCovo0ij7EcJ5zYEbbfqQNYr3wPBBCd6JoLPO/hUUOxXyKNpusYQ7z2OLmzhQ/YQq 5umhi25tNZONMymyxTS4EKXwFEvRvJzzK47umEILqaIyOWlEL+Yffs0OJXE/0weRR3 S8kWnmQVAPN4M1oP4Xa3cKUlLHLzXILDtuSrnJoXczilzfn5nOiDr3hruU1a8q2E4b /PmKlMpEo/4+Q== Date: Tue, 29 Nov 2011 22:01:46 +0100 Message-ID: Importance: normal From: Alexander Leidinger To: fjoe@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 9475084400D.AF947 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.646, required 6, autolearn=disabled, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, HTML_MESSAGE 0.00, J_CHICKENPOX_32 0.60, J_CHICKENPOX_42 0.60, J_CHICKENPOX_52 0.60, TW_BJ 0.08, TW_SV 0.08, UPPERCASE_50_75 0.79) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1323205350.98072@zaQWMWYIQjjgR1h8ECJDzw X-EBL-Spam-Status: No Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: svn commit: r228124 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 21:19:40 -0000 SGksCgpkaWQgeW91IHZlcmlmeSB0aGF0IHRoaXMgd29ya3Mgd2l0aCBzZXR0aW5ncyBpbiBzcmMu Y29uZiBmb3IgYnVpbGR3b3JsZCBhbmQgZm9yIGNvcnJlc3BvbmRpbmcgbWFrZW9wdGlvbnMgaW4g dGhlIGtlcm5lbCBjb25maWcgZm9yIGJ1aWxka2VybmVsIGFuZCBmb3IgdGhlIG9sZCB3YXkgb2Yg YnVpbGRpbmcga2VybmVscz8KClRoZSByZWFzb24gd2UgaGFkIHRoZSBzaGVsbCBjb25kaXRpb25h bHMgd2FzIGJlY2F1c2Ugd2UgZGlkbid0IG1hbmFnZSB0byBnZXQgYWxsIGNhc2VzIHdvcmtpbmcg d2l0aCBtYWtlIGNvbmRpdGlvbmFscyBkdWUgdG8gdGhlIGV2YWx1YXRpb24gb3JkZXIgb2YgdGhl IHZhcmlvdXMgZmlsZXMuCgpCeWUsCkFsZXhhbmRlci4KCi0tIApTZW5kIHZpYSBhbiBBbmRyb2lk IGRldmljZSwgcGxlYXNlIGZvcmdpdmUgYnJldml0eSBhbmQgdHlwb2dyYXBoaWMgYW5kIHNwZWxs aW5nIGVycm9ycy7CoE1heCBLaG9uIDxmam9lQEZyZWVCU0Qub3JnPiBoYXQgZ2VzY2hyaWViZW46 QXV0aG9yOiBmam9lCkRhdGU6IFR1ZSBOb3YgMjkgMDg6Mzg6NDcgMjAxMQpOZXcgUmV2aXNpb246 IDIyODEyNApVUkw6IGh0dHA6Ly9zdm4uZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMjI4MTI0 CgpMb2c6CsKgIENvbmRpdGlvbmFsaXplIGN0ZmNvbnZlcnQvY3RmbWVyZ2UgcnVucyBvbiBtYWtl IGxldmVsICguaWYvLmVuZGlmKSBpbnN0ZWFkCsKgIG9mIGV4ZWN1dGluZyBhIHNoZWxsIG9uIGV2 ZXJ5IG9iamVjdCBvciBleGVjdXRhYmxlL2xpYnJhcnkgZmlsZS4KwqAgCsKgIFRoaXMgc2hhdmVz IG9mZiBtb3JlIHRoYW4gMzAsMDAwIHNoZWxsIGludm9jYXRpb25zIGR1cmluZyBidWlsZHdvcmxk LgoKTW9kaWZpZWQ6CsKgIGhlYWQvc2hhcmUvbWsvYnNkLmxpYi5tawrCoCBoZWFkL3NoYXJlL21r L2JzZC5wcm9nLm1rCsKgIGhlYWQvc2hhcmUvbWsvc3lzLm1rCsKgIGhlYWQvc3lzL2NvbmYva2Vy bi5wb3N0Lm1rCsKgIGhlYWQvc3lzL2NvbmYva2Vybi5wcmUubWsKwqAgaGVhZC9zeXMvY29uZi9r bW9kLm1rCgpNb2RpZmllZDogaGVhZC9zaGFyZS9tay9ic2QubGliLm1rCj09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PQotLS0gaGVhZC9zaGFyZS9tay9ic2QubGliLm1rCVR1ZSBOb3YgMjkgMDg6MzM6NDAg MjAxMQkocjIyODEyMykKKysrIGhlYWQvc2hhcmUvbWsvYnNkLmxpYi5tawlUdWUgTm92IDI5IDA4 OjM4OjQ3IDIwMTEJKHIyMjgxMjQpCkBAIC03NSwxNSArNzUsMTUgQEAgUE9fRkxBRz0tcGcKCi5j LnBvOgoke0NDfSAke1BPX0ZMQUd9ICR7U1RBVElDX0NGTEFHU30gJHtQT19DRkxBR1N9IC1jICR7 LklNUFNSQ30gLW8gJHsuVEFSR0VUfQotCUBbIC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtO T19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5U QVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlm ICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0K Ky5lbmRpZgoKLmMuU286CiR7Q0N9ICR7UElDRkxBR30gLURQSUMgJHtTSEFSRURfQ0ZMQUdTfSAk e0NGTEFHU30gLWMgJHsuSU1QU1JDfSAtbyAkey5UQVJHRVR9Ci0JQFsgLXogIiR7Q1RGQ09OVkVS VH0iIC1vIC1uICIke05PX0NURn0iIF0gfHwgXAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7 Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYgXAotCSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7 LlRBUkdFVH0pCisuaWYgIWRlZmluZWQoTk9fQ1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFH U30gJHsuVEFSR0VUfQorLmVuZGlmCgouY2MubzoKJHtDWFh9ICR7U1RBVElDX0NYWEZMQUdTfSAk e0NYWEZMQUdTfSAtYyAkey5JTVBTUkN9IC1vICR7LlRBUkdFVH0KQEAgLTk2LDQ3ICs5Niw0NyBA QCBQT19GTEFHPS1wZwoKLmYucG86CiR7RkN9IC1wZyAke0ZGTEFHU30gLW8gJHsuVEFSR0VUfSAt YyAkey5JTVBTUkN9Ci0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0g fHwgXAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYg XAotCSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQo Tk9fQ1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgou Zi5TbzoKJHtGQ30gJHtQSUNGTEFHfSAtRFBJQyAke0ZGTEFHU30gLW8gJHsuVEFSR0VUfSAtYyAk ey5JTVBTUkN9Ci0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0gfHwg XAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYgXAot CSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQoTk9f Q1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgoucy5w byAucy5TbzoKJHtBU30gJHtBRkxBR1N9IC1vICR7LlRBUkdFVH0gJHsuSU1QU1JDfQotCUBbIC16 ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtD VEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAk e0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZF UlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoKLmFzbS5wbzoKJHtDQ30gLXggYXNz ZW1ibGVyLXdpdGgtY3BwIC1EUFJPRiAke1BPX0NGTEFHU30gJHtBQ0ZMQUdTfSBcCi1jICR7LklN UFNSQ30gLW8gJHsuVEFSR0VUfQotCUBbIC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19D VEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJH RVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFk ZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5l bmRpZgoKLmFzbS5TbzoKJHtDQ30gLXggYXNzZW1ibGVyLXdpdGgtY3BwICR7UElDRkxBR30gLURQ SUMgJHtDRkxBR1N9ICR7QUNGTEFHU30gXArCoMKgwqAgLWMgJHsuSU1QU1JDfSAtbyAkey5UQVJH RVR9Ci0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0gfHwgXAotCSAo JHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYgXAotCSAke0NU RkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQoTk9fQ1RGKQor CSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgouUy5wbzoKJHtD Q30gLURQUk9GICR7UE9fQ0ZMQUdTfSAke0FDRkxBR1N9IC1jICR7LklNUFNSQ30gLW8gJHsuVEFS R0VUfQotCUBbIC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBdIHx8IFwKLQkg KCR7RUNIT30gJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9ICYmIFwKLQkgJHtD VEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFkZWZpbmVkKE5PX0NURikK Kwkke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoKLlMuU286CiR7 Q0N9ICR7UElDRkxBR30gLURQSUMgJHtDRkxBR1N9ICR7QUNGTEFHU30gLWMgJHsuSU1QU1JDfSAt byAkey5UQVJHRVR9Ci0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0g fHwgXAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYg XAotCSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQo Tk9fQ1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgph bGw6IG9iandhcm4KCkBAIC0yMTEsOSArMjExLDkgQEAgJHtTSExJQl9OQU1FfTogJHtTT0JKU30K wqDCoMKgIC1vICR7LlRBUkdFVH0gLVdsLC1zb25hbWUsJHtTT05BTUV9IFwKwqDCoMKgIGBOTT0n JHtOTX0nIGxvcmRlciAke1NPQkpTfSB8IHRzb3J0IC1xYCAke0xEQUREfQouZW5kaWYKLQlAWyAt eiAiJHtDVEZNRVJHRX0iIC1vIC1uICIke05PX0NURn0iIF0gfHwgXAotCSAoJHtFQ0hPfSAke0NU Rk1FUkdFfSAke0NURkZMQUdTfSAtbyAkey5UQVJHRVR9ICR7U09CSlN9ICYmIFwKLQkgJHtDVEZN RVJHRX0gJHtDVEZGTEFHU30gLW8gJHsuVEFSR0VUfSAke1NPQkpTfSkKKy5pZiAhZGVmaW5lZChO T19DVEYpCisJJHtDVEZNRVJHRX0gJHtDVEZGTEFHU30gLW8gJHsuVEFSR0VUfSAke1NPQkpTfQor LmVuZGlmCi5lbmRpZgoKLmlmIGRlZmluZWQoSU5TVEFMTF9QSUNfQVJDSElWRSkgJiYgZGVmaW5l ZChMSUIpICYmICFlbXB0eShMSUIpICYmICR7TUtfVE9PTENIQUlOfSAhPSAibm8iCgpNb2RpZmll ZDogaGVhZC9zaGFyZS9tay9ic2QucHJvZy5tawo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhl YWQvc2hhcmUvbWsvYnNkLnByb2cubWsJVHVlIE5vdiAyOSAwODozMzo0MCAyMDExCShyMjI4MTIz KQorKysgaGVhZC9zaGFyZS9tay9ic2QucHJvZy5tawlUdWUgTm92IDI5IDA4OjM4OjQ3IDIwMTEJ KHIyMjgxMjQpCkBAIC02MCw5ICs2MCw5IEBAICR7UFJPR306ICR7T0JKU30KLmVsc2UKJHtDQ30g JHtDRkxBR1N9ICR7TERGTEFHU30gLW8gJHsuVEFSR0VUfSAke09CSlN9ICR7TERBRER9Ci5lbmRp ZgotCUBbIC16ICIke0NURk1FUkdFfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VD SE99ICR7Q1RGTUVSR0V9ICR7Q1RGRkxBR1N9IC1vICR7LlRBUkdFVH0gJHtPQkpTfSAmJiBcCi0J ICR7Q1RGTUVSR0V9ICR7Q1RGRkxBR1N9IC1vICR7LlRBUkdFVH0gJHtPQkpTfSkKKy5pZiAhZGVm aW5lZChOT19DVEYpCisJJHtDVEZNRVJHRX0gJHtDVEZGTEFHU30gLW8gJHsuVEFSR0VUfSAke09C SlN9CisuZW5kaWYKCi5lbHNlCSMgIWRlZmluZWQoU1JDUykKCkBAIC05MCw5ICs5MCw5IEBAICR7 UFJPR306ICR7T0JKU30KLmVsc2UKJHtDQ30gJHtDRkxBR1N9ICR7TERGTEFHU30gLW8gJHsuVEFS R0VUfSAke09CSlN9ICR7TERBRER9Ci5lbmRpZgotCUBbIC16ICIke0NURk1FUkdFfSIgLW8gLW4g IiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VDSE99ICR7Q1RGTUVSR0V9ICR7Q1RGRkxBR1N9IC1v ICR7LlRBUkdFVH0gJHtPQkpTfSAmJiBcCi0JICR7Q1RGTUVSR0V9ICR7Q1RGRkxBR1N9IC1vICR7 LlRBUkdFVH0gJHtPQkpTfSkKKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZNRVJHRX0gJHtD VEZGTEFHU30gLW8gJHsuVEFSR0VUfSAke09CSlN9CisuZW5kaWYKLmVuZGlmCgouZW5kaWYKCk1v ZGlmaWVkOiBoZWFkL3NoYXJlL21rL3N5cy5tawo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhl YWQvc2hhcmUvbWsvc3lzLm1rCVR1ZSBOb3YgMjkgMDg6MzM6NDAgMjAxMQkocjIyODEyMykKKysr IGhlYWQvc2hhcmUvbWsvc3lzLm1rCVR1ZSBOb3YgMjkgMDg6Mzg6NDcgMjAxMQkocjIyODEyNCkK QEAgLTE1OCwxNSArMTU4LDE1IEBAIFlGTEFHUwkgPz0JLWQKIyBTSU5HTEUgU1VGRklYIFJVTEVT Ci5jOgoke0NDfSAke0NGTEFHU30gJHtMREZMQUdTfSAtbyAkey5UQVJHRVR9ICR7LklNUFNSQ30K LQlAWyAteiAiJHtDVEZDT05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VD SE99ICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBcCi0JICR7Q1RGQ09O VkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtD VEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi5mOgoke0ZDfSAke0ZG TEFHU30gJHtMREZMQUdTfSAtbyAkey5UQVJHRVR9ICR7LklNUFNSQ30KLQlAWyAteiAiJHtDVEZD T05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VDSE99ICR7Q1RGQ09OVkVS VH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBcCi0JICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFH U30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZDT05WRVJUfSAke0NU RkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi5zaDoKY3AgLWYgJHsuSU1QU1JDfSAkey5UQVJH RVR9CkBAIC0xNzYsMzMgKzE3NiwzMyBAQCBZRkxBR1MJID89CS1kCgouYy5vOgoke0NDfSAke0NG TEFHU30gLWMgJHsuSU1QU1JDfQotCUBbIC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19D VEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJH RVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFk ZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5l bmRpZgoKLmYubzoKJHtGQ30gJHtGRkxBR1N9IC1jICR7LklNUFNSQ30KLQlAWyAteiAiJHtDVEZD T05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VDSE99ICR7Q1RGQ09OVkVS VH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBcCi0JICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFH U30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZDT05WRVJUfSAke0NU RkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi55Lm86CiR7WUFDQ30gJHtZRkxBR1N9ICR7LklN UFNSQ30KJHtDQ30gJHtDRkxBR1N9IC1jIHkudGFiLmMKcm0gLWYgeS50YWIuYwptdiB5LnRhYi5v ICR7LlRBUkdFVH0KLQlAWyAteiAiJHtDVEZDT05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8 fCBcCi0JICgke0VDSE99ICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBc Ci0JICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChO T19DVEYpCisJJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi5s Lm86CiR7TEVYfSAke0xGTEFHU30gJHsuSU1QU1JDfQoke0NDfSAke0NGTEFHU30gLWMgbGV4Lnl5 LmMKcm0gLWYgbGV4Lnl5LmMKbXYgbGV4Lnl5Lm8gJHsuVEFSR0VUfQotCUBbIC16ICIke0NURkNP TlZFUlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJU fSAke0NURkZMQUdTfSAkey5UQVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdT fSAkey5UQVJHRVR9KQorLmlmICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RG RkxBR1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoKLnkuYzoKJHtZQUNDfSAke1lGTEFHU30gJHsuSU1Q U1JDfQpAQCAtMjQwLDE1ICsyNDAsMTUgQEAgWUZMQUdTCSA/PQktZAoKLmM6CiR7Q0N9ICR7Q0ZM QUdTfSAke0xERkxBR1N9ICR7LklNUFNSQ30gJHtMRExJQlN9IC1vICR7LlRBUkdFVH0KLQlAWyAt eiAiJHtDVEZDT05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VDSE99ICR7 Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBcCi0JICR7Q1RGQ09OVkVSVH0g JHtDVEZGTEFHU30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZDT05W RVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi5jLm86CiR7Q0N9ICR7Q0ZMQUdT fSAtYyAkey5JTVBTUkN9Ci0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0i IF0gfHwgXAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0g JiYgXAotCSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmlu ZWQoTk9fQ1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlm CgouY2MgLmNwcCAuY3h4IC5DOgoke0NYWH0gJHtDWFhGTEFHU30gJHtMREZMQUdTfSAkey5JTVBT UkN9ICR7TERMSUJTfSAtbyAkey5UQVJHRVR9CkBAIC0yNTgsMTUgKzI1OCwxNSBAQCBZRkxBR1MJ ID89CS1kCgoubS5vOgoke09CSkN9ICR7T0JKQ0ZMQUdTfSAtYyAkey5JTVBTUkN9Ci0JQFsgLXog IiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0gfHwgXAotCSAoJHtFQ0hPfSAke0NU RkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYgXAotCSAke0NURkNPTlZFUlR9ICR7 Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQoTk9fQ1RGKQorCSR7Q1RGQ09OVkVS VH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgoucC5vOgoke1BDfSAke1BGTEFHU30g LWMgJHsuSU1QU1JDfQotCUBbIC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBd IHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9ICYm IFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFkZWZpbmVk KE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoK LmUgLnIgLkYgLmY6CiR7RkN9ICR7UkZMQUdTfSAke0VGTEFHU30gJHtGRkxBR1N9ICR7TERGTEFH U30gJHsuSU1QU1JDfSAke0xETElCU30gXApAQCAtMjc3LDM4ICsyNzcsMzggQEAgWUZMQUdTCSA/ PQktZAoKLlMubzoKJHtDQ30gJHtDRkxBR1N9ICR7QUNGTEFHU30gLWMgJHsuSU1QU1JDfQotCUBb IC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30g JHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJU fSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNP TlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoKLmFzbS5vOgoke0NDfSAteCBh c3NlbWJsZXItd2l0aC1jcHAgJHtDRkxBR1N9ICR7QUNGTEFHU30gLWMgJHsuSU1QU1JDfQotCUBb IC16ICIke0NURkNPTlZFUlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30g JHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJU fSAke0NURkZMQUdTfSAkey5UQVJHRVR9KQorLmlmICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNP TlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoKLnMubzoKJHtBU30gJHtBRkxB R1N9IC1vICR7LlRBUkdFVH0gJHsuSU1QU1JDfQotCUBbIC16ICIke0NURkNPTlZFUlR9IiAtbyAt biAiJHtOT19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJUfSAke0NURkZMQUdT fSAkey5UQVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9 KQorLmlmICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRB UkdFVH0KKy5lbmRpZgoKIyBYWFggbm90IC1qIHNhZmUKLnkubzoKJHtZQUNDfSAke1lGTEFHU30g JHsuSU1QU1JDfQoke0NDfSAke0NGTEFHU30gLWMgeS50YWIuYyAtbyAkey5UQVJHRVR9CnJtIC1m IHkudGFiLmMKLQlAWyAteiAiJHtDVEZDT05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBc Ci0JICgke0VDSE99ICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBcCi0J ICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChOT19D VEYpCisJJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi5sLm86 CiR7TEVYfSAtdCAke0xGTEFHU30gJHsuSU1QU1JDfSA+ICR7LlBSRUZJWH0udG1wLmMKJHtDQ30g JHtDRkxBR1N9IC1jICR7LlBSRUZJWH0udG1wLmMgLW8gJHsuVEFSR0VUfQpybSAtZiAkey5QUkVG SVh9LnRtcC5jCi0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0gfHwg XAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYgXAot CSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQoTk9f Q1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgojIFhY WCBub3QgLWogc2FmZQoueS5jOgpAQCAtMzIwLDM0ICszMjAsMzQgQEAgWUZMQUdTCSA/PQktZAoK LnMub3V0IC5jLm91dCAuby5vdXQ6CiR7Q0N9ICR7Q0ZMQUdTfSAke0xERkxBR1N9ICR7LklNUFNS Q30gJHtMRExJQlN9IC1vICR7LlRBUkdFVH0KLQlAWyAteiAiJHtDVEZDT05WRVJUfSIgLW8gLW4g IiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VDSE99ICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30g JHsuVEFSR0VUfSAmJiBcCi0JICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSkK Ky5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJH RVR9CisuZW5kaWYKCi5mLm91dCAuRi5vdXQgLnIub3V0IC5lLm91dDoKJHtGQ30gJHtFRkxBR1N9 ICR7UkZMQUdTfSAke0ZGTEFHU30gJHtMREZMQUdTfSAkey5JTVBTUkN9IFwKwqDCoMKgICR7TERM SUJTfSAtbyAkey5UQVJHRVR9CnJtIC1mICR7LlBSRUZJWH0ubwotCUBbIC16ICIke0NURkNPTlZF UlR9IiAtbyAtbiAiJHtOT19DVEZ9IiBdIHx8IFwKLQkgKCR7RUNIT30gJHtDVEZDT05WRVJUfSAk e0NURkZMQUdTfSAkey5UQVJHRVR9ICYmIFwKLQkgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAk ey5UQVJHRVR9KQorLmlmICFkZWZpbmVkKE5PX0NURikKKwkke0NURkNPTlZFUlR9ICR7Q1RGRkxB R1N9ICR7LlRBUkdFVH0KKy5lbmRpZgoKIyBYWFggbm90IC1qIHNhZmUKLnkub3V0Ogoke1lBQ0N9 ICR7WUZMQUdTfSAkey5JTVBTUkN9CiR7Q0N9ICR7Q0ZMQUdTfSAke0xERkxBR1N9IHkudGFiLmMg JHtMRExJQlN9IC1seSAtbyAkey5UQVJHRVR9CnJtIC1mIHkudGFiLmMKLQlAWyAteiAiJHtDVEZD T05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCBcCi0JICgke0VDSE99ICR7Q1RGQ09OVkVS VH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfSAmJiBcCi0JICR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFH U30gJHsuVEFSR0VUfSkKKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZDT05WRVJUfSAke0NU RkZMQUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCi5sLm91dDoKJHtMRVh9IC10ICR7TEZMQUdTfSAk ey5JTVBTUkN9ID4gJHsuUFJFRklYfS50bXAuYwoke0NDfSAke0NGTEFHU30gJHtMREZMQUdTfSAk ey5QUkVGSVh9LnRtcC5jICR7TERMSUJTfSAtbGwgLW8gJHsuVEFSR0VUfQpybSAtZiAkey5QUkVG SVh9LnRtcC5jCi0JQFsgLXogIiR7Q1RGQ09OVkVSVH0iIC1vIC1uICIke05PX0NURn0iIF0gfHwg XAotCSAoJHtFQ0hPfSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0gJiYgXAot CSAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9ICR7LlRBUkdFVH0pCisuaWYgIWRlZmluZWQoTk9f Q1RGKQorCSR7Q1RGQ09OVkVSVH0gJHtDVEZGTEFHU30gJHsuVEFSR0VUfQorLmVuZGlmCgojIEZy ZWVCU0QgYnVpbGQgcG9sbHV0aW9uLsKgIEhpZGUgaXQgaW4gdGhlIG5vbi1QT1NJWCBwYXJ0IG9m IHRoZSBpZmRlZi4KX19NQUtFX0NPTkY/PS9ldGMvbWFrZS5jb25mCgpNb2RpZmllZDogaGVhZC9z eXMvY29uZi9rZXJuLnBvc3QubWsKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBoZWFkL3N5cy9j b25mL2tlcm4ucG9zdC5tawlUdWUgTm92IDI5IDA4OjMzOjQwIDIwMTEJKHIyMjgxMjMpCisrKyBo ZWFkL3N5cy9jb25mL2tlcm4ucG9zdC5tawlUdWUgTm92IDI5IDA4OjM4OjQ3IDIwMTEJKHIyMjgx MjQpCkBAIC05NCw3ICs5NCw5IEBAICR7RlVMTEtFUk5FTH06ICR7U1lTVEVNX0RFUH0gdmVycy5v CkBybSAtZiAkey5UQVJHRVR9CkBlY2hvIGxpbmtpbmcgJHsuVEFSR0VUfQoke1NZU1RFTV9MRH0K LQlAJHtTWVNURU1fQ1RGTUVSR0V9CisuaWYgIWRlZmluZWQoTk9fQ1RGKQorCSR7Q1RGTUVSR0V9 ICR7Q1RGRkxBR1N9IC1vICR7LlRBUkdFVH0gJHtTWVNURU1fT0JKU30gdmVycy5vCisuZW5kaWYK LmlmICFkZWZpbmVkKERFQlVHKQoke09CSkNPUFl9IC0tc3RyaXAtZGVidWcgJHsuVEFSR0VUfQou ZW5kaWYKQEAgLTI0Nyw3ICsyNDksOSBAQCBrZXJuZWwtcmVpbnN0YWxsOgoKY29uZmlnLm8gZW52 Lm8gaGludHMubyB2ZXJzLm8gdm5vZGVfaWYubzoKJHtOT1JNQUxfQ30KLQlAWyAteiAiJHtDVEZD T05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCAke0NURkNPTlZFUlR9ICR7Q1RGRkxBR1N9 ICR7LlRBUkdFVH0KKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZDT05WRVJUfSAke0NURkZM QUdTfSAkey5UQVJHRVR9CisuZW5kaWYKCmNvbmZpZy5sbiBlbnYubG4gaGludHMubG4gdmVycy5s biB2bm9kZV9pZi5sbjoKJHtOT1JNQUxfTElOVH0KCk1vZGlmaWVkOiBoZWFkL3N5cy9jb25mL2tl cm4ucHJlLm1rCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gaGVhZC9zeXMvY29uZi9rZXJuLnBy ZS5tawlUdWUgTm92IDI5IDA4OjMzOjQwIDIwMTEJKHIyMjgxMjMpCisrKyBoZWFkL3N5cy9jb25m L2tlcm4ucHJlLm1rCVR1ZSBOb3YgMjkgMDg6Mzg6NDcgMjAxMQkocjIyODEyNCkKQEAgLTEyMyw4 ICsxMjMsMTEgQEAgTk9STUFMX0NfTk9XRVJST1I9ICR7Q0N9IC1jICR7Q0ZMQUdTfSAkewpOT1JN QUxfTT0gJHtBV0t9IC1mICRTL3Rvb2xzL21ha2VvYmpvcHMuYXdrICR7LklNUFNSQ30gLWMgOyBc CsKgICR7Q0N9IC1jICR7Q0ZMQUdTfSAke1dFUlJPUn0gJHtQUk9GfSAkey5QUkVGSVh9LmMKCi1O T1JNQUxfQ1RGQ09OVkVSVD0gWyAteiAiJHtDVEZDT05WRVJUfSIgLW8gLW4gIiR7Tk9fQ1RGfSIg XSB8fCBcCi0JIMKgwqAgJHtDVEZDT05WRVJUfSAke0NURkZMQUdTfSAkey5UQVJHRVR9CisuaWYg IWRlZmluZWQoTk9fQ1RGKQorTk9STUFMX0NURkNPTlZFUlQ9CSR7Q1RGQ09OVkVSVH0gJHtDVEZG TEFHU30gJHsuVEFSR0VUfQorLmVsc2UKK05PUk1BTF9DVEZDT05WRVJUPQk6CisuZW5kaWYKCk5P Uk1BTF9MSU5UPQkke0xJTlR9ICR7TElOVEZMQUdTfSAke0NGTEFHUzpNLVtESVVdKn0gJHsuSU1Q U1JDfQoKQEAgLTE0Miw3ICsxNDUsNiBAQCBTWVNURU1fREVQPSBNYWtlZmlsZSAke1NZU1RFTV9P QkpTfQpTWVNURU1fT0JKUz0gbG9jb3JlLm8gJHtNRE9CSlN9ICR7T0JKU30KU1lTVEVNX09CSlMr PSAke1NZU1RFTV9DRklMRVM6LmM9Lm99ClNZU1RFTV9PQkpTKz0gaGFjay5TbwotU1lTVEVNX0NU Rk1FUkdFPSBbIC16ICIke0NURk1FUkdFfSIgLW8gLW4gIiR7Tk9fQ1RGfSIgXSB8fCAke0NURk1F UkdFfSAke0NURkZMQUdTfSAtbyAkey5UQVJHRVR9ICR7U1lTVEVNX09CSlN9IHZlcnMubwpTWVNU RU1fTEQ9IEAke0xEfSAtQmR5bmFtaWMgLVQgJHtMRFNDUklQVH0gXAotd2Fybi1jb21tb24gLWV4 cG9ydC1keW5hbWljIC1keW5hbWljLWxpbmtlciAvcmVkL2hlcnJpbmcgXAotbyAkey5UQVJHRVR9 IC1YICR7U1lTVEVNX09CSlN9IHZlcnMubwoKTW9kaWZpZWQ6IGhlYWQvc3lzL2NvbmYva21vZC5t awo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhlYWQvc3lzL2NvbmYva21vZC5tawlUdWUgTm92 IDI5IDA4OjMzOjQwIDIwMTEJKHIyMjgxMjMpCisrKyBoZWFkL3N5cy9jb25mL2ttb2QubWsJVHVl IE5vdiAyOSAwODozODo0NyAyMDExCShyMjI4MTI0KQpAQCAtMjA2LDcgKzIwNiw5IEBAICR7S01P RH0ua2xkOiAke09CSlN9CiR7RlVMTFBST0d9OiAke09CSlN9Ci5lbmRpZgoke0xEfSAke0xERkxB R1N9IC1yIC1kIC1vICR7LlRBUkdFVH0gJHtPQkpTfQotCUBbIC16ICIke0NURk1FUkdFfSIgLW8g LW4gIiR7Tk9fQ1RGfSIgXSB8fCAke0NURk1FUkdFfSAke0NURkZMQUdTfSAtbyAkey5UQVJHRVR9 ICR7T0JKU30KKy5pZiAhZGVmaW5lZChOT19DVEYpCisJJHtDVEZNRVJHRX0gJHtDVEZGTEFHU30g LW8gJHsuVEFSR0VUfSAke09CSlN9CisuZW5kaWYKLmlmIGRlZmluZWQoRVhQT1JUX1NZTVMpCi5p ZiAke0VYUE9SVF9TWU1TfSAhPSBZRVMKLmlmICR7RVhQT1JUX1NZTVN9ID09IE5PCgo= From owner-svn-src-all@FreeBSD.ORG Tue Nov 29 21:28:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44883106566B; Tue, 29 Nov 2011 21:28:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 346F58FC15; Tue, 29 Nov 2011 21:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pATLSn9P067461; Tue, 29 Nov 2011 21:28:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pATLSnKr067459; Tue, 29 Nov 2011 21:28:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111292128.pATLSnKr067459@svn.freebsd.org> From: John Baldwin Date: Tue, 29 Nov 2011 21:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228148 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 21:28:49 -0000 Author: jhb Date: Tue Nov 29 21:28:48 2011 New Revision: 228148 URL: http://svn.freebsd.org/changeset/base/228148 Log: Remove a bit of debugging that accidentally crept in earlier. Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Tue Nov 29 20:06:27 2011 (r228147) +++ head/sys/conf/newvers.sh Tue Nov 29 21:28:48 2011 (r228148) @@ -99,7 +99,6 @@ for dir in /bin /usr/bin /usr/local/bin; done if [ -n "$svnversion" ] ; then - echo "$svnversion" svn=`cd ${SYSDIR} && $svnversion` case "$svn" in [0-9]*) svn=" r${svn}" ;; From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 05:49:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0232106566B; Wed, 30 Nov 2011 05:49:17 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE3378FC0A; Wed, 30 Nov 2011 05:49:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAU5nHcl083806; Wed, 30 Nov 2011 05:49:17 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAU5nH9R083791; Wed, 30 Nov 2011 05:49:17 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111300549.pAU5nH9R083791@svn.freebsd.org> From: Max Khon Date: Wed, 30 Nov 2011 05:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228149 - in head/tools/regression/usr.bin/make/execution: . ellipsis empty plus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 05:49:18 -0000 Author: fjoe Date: Wed Nov 30 05:49:17 2011 New Revision: 228149 URL: http://svn.freebsd.org/changeset/base/228149 Log: Add three execution tests for make(1): - plus: execute "+command" when run with -jX -n - ellipsis: ellipsis ("...") from variable - empty: empty command (from variable) Currently make(1) fails all three tests: - plus: segmentation fault due to incorrect command list handling - ellipsis: works in compat mode but fails in job (-jX) mode - empty: - compat mode: prints error message - job mode: works but prints empty string Added: head/tools/regression/usr.bin/make/execution/ head/tools/regression/usr.bin/make/execution/ellipsis/ head/tools/regression/usr.bin/make/execution/ellipsis/Makefile (contents, props changed) head/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/ellipsis/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/ellipsis/test.t (contents, props changed) head/tools/regression/usr.bin/make/execution/empty/ head/tools/regression/usr.bin/make/execution/empty/Makefile (contents, props changed) head/tools/regression/usr.bin/make/execution/empty/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/empty/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/empty/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/empty/test.t (contents, props changed) head/tools/regression/usr.bin/make/execution/plus/ head/tools/regression/usr.bin/make/execution/plus/Makefile (contents, props changed) head/tools/regression/usr.bin/make/execution/plus/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/plus/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/plus/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/execution/plus/test.t (contents, props changed) Added: head/tools/regression/usr.bin/make/execution/ellipsis/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/ellipsis/Makefile Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +ELLIPSIS= ... + +check-ellipsis: + @${MAKE} -f ${MAKEFILE} do-$@ + @${MAKE} -f ${MAKEFILE} -j2 do-$@ + @${MAKE} -f ${MAKEFILE} -j2 -B do-$@ + +do-check-ellipsis: do-check-ellipsis-1 do-check-ellipsis-2 +.ORDER: do-check-ellipsis-1 do-check-ellipsis-2 + +do-check-ellipsis-1: + @echo before $@ + ${ELLIPSIS} + @echo after $@ + +do-check-ellipsis-2: + @echo before $@ + ${ELLIPSIS} + @echo after $@ Added: head/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/ellipsis/expected.status.1 Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/execution/ellipsis/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/ellipsis/expected.stdout.1 Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,12 @@ +before do-check-ellipsis-1 +before do-check-ellipsis-2 +after do-check-ellipsis-1 +after do-check-ellipsis-2 +before do-check-ellipsis-1 +before do-check-ellipsis-2 +after do-check-ellipsis-1 +after do-check-ellipsis-2 +before do-check-ellipsis-1 +before do-check-ellipsis-2 +after do-check-ellipsis-1 +after do-check-ellipsis-2 Added: head/tools/regression/usr.bin/make/execution/ellipsis/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/ellipsis/test.t Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Ellipsis command from variable" + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* Added: head/tools/regression/usr.bin/make/execution/empty/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/empty/Makefile Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +EMPTY= + +check-empty: + @${MAKE} -f ${MAKEFILE} do-$@ + @${MAKE} -f ${MAKEFILE} -j2 do-$@ + @${MAKE} -f ${MAKEFILE} -j2 -B do-$@ + +do-check-empty: + ${EMPTY} + @${EMPTY} + @-${EMPTY} Added: head/tools/regression/usr.bin/make/execution/empty/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/empty/expected.status.1 Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/execution/empty/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/execution/empty/expected.stdout.1 ============================================================================== Added: head/tools/regression/usr.bin/make/execution/empty/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/empty/test.t Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Empty command (from variable)" + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* Added: head/tools/regression/usr.bin/make/execution/plus/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/plus/Makefile Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +check-+: + @${MAKE} -f ${MAKEFILE} -j2 -n do-$@ + +do-check-+: + @+echo $@ Added: head/tools/regression/usr.bin/make/execution/plus/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/plus/expected.status.1 Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/execution/plus/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/execution/plus/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/plus/expected.stdout.1 Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1 @@ +do-check-+ Added: head/tools/regression/usr.bin/make/execution/plus/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/execution/plus/test.t Wed Nov 30 05:49:17 2011 (r228149) @@ -0,0 +1,15 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Test '+command' execution with -n -jX" + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 08:47:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB981106566C; Wed, 30 Nov 2011 08:47:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB13B8FC08; Wed, 30 Nov 2011 08:47:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAU8lHbW089329; Wed, 30 Nov 2011 08:47:17 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAU8lHvK089327; Wed, 30 Nov 2011 08:47:17 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201111300847.pAU8lHvK089327@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 30 Nov 2011 08:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228150 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 08:47:17 -0000 Author: glebius Date: Wed Nov 30 08:47:17 2011 New Revision: 228150 URL: http://svn.freebsd.org/changeset/base/228150 Log: Return value should be conditional on return value of pfsync_defer_ptr() PR: kern/162947 Submitted by: Matthieu Kraus Modified: head/sys/contrib/pf/net/pf.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Wed Nov 30 05:49:17 2011 (r228149) +++ head/sys/contrib/pf/net/pf.c Wed Nov 30 08:47:17 2011 (r228150) @@ -3770,8 +3770,8 @@ pf_test_rule(struct pf_rule **rm, struct * replies through it. */ #ifdef __FreeBSD__ - if (pfsync_defer_ptr != NULL) - pfsync_defer_ptr(*sm, m); + if (pfsync_defer_ptr != NULL && + pfsync_defer_ptr(*sm, m)) #else if (pfsync_defer(*sm, m)) #endif From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 12:47:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F77C106566B; Wed, 30 Nov 2011 12:47:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C8BC8FC14; Wed, 30 Nov 2011 12:47:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUClber098103; Wed, 30 Nov 2011 12:47:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUClaiX098083; Wed, 30 Nov 2011 12:47:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111301247.pAUClaiX098083@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 30 Nov 2011 12:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228152 - stable/8/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 12:47:37 -0000 Author: bz Date: Wed Nov 30 12:47:36 2011 New Revision: 228152 URL: http://svn.freebsd.org/changeset/base/228152 Log: MFC r224638,224640,224642 (by brooks): Add support for dynamically adjusted buffers to allow the full use of the bandwidth of long fat pipes (i.e. 100Mbps+ trans-oceanic or trans-continental links). Bandwidth-delay products up to 64MB are supported. Also add support (not compiled by default) for the None cypher. The None cypher can only be enabled on non-interactive sessions (those without a pty where -T was not used) and must be enabled in both the client and server configuration files and on the client command line. Additionally, the None cypher will only be activated after authentication is complete. To enable the None cypher you must add -DNONE_CIPHER_ENABLED to CFLAGS via the make command line or in /etc/make.conf. This code is a style(9) compliant version of these features extracted from the patches published at: http://www.psc.edu/networking/projects/hpn-ssh/ Enable keyword expansion for $FreeBSD$ on files. MFC r225852 (by des): Regenerate (ssh_namespace.h) after application of the HPN patch. Discussed with: brooks Added: stable/8/crypto/openssh/README.hpn - copied unchanged from r224638, head/crypto/openssh/README.hpn Modified: stable/8/crypto/openssh/buffer.c (contents, props changed) stable/8/crypto/openssh/buffer.h (contents, props changed) stable/8/crypto/openssh/channels.c (contents, props changed) stable/8/crypto/openssh/channels.h (contents, props changed) stable/8/crypto/openssh/cipher.c (contents, props changed) stable/8/crypto/openssh/clientloop.c (contents, props changed) stable/8/crypto/openssh/compat.c (contents, props changed) stable/8/crypto/openssh/compat.h (contents, props changed) stable/8/crypto/openssh/kex.c (contents, props changed) stable/8/crypto/openssh/kex.h (contents, props changed) stable/8/crypto/openssh/misc.c (contents, props changed) stable/8/crypto/openssh/misc.h (contents, props changed) stable/8/crypto/openssh/myproposal.h (contents, props changed) stable/8/crypto/openssh/packet.c (contents, props changed) stable/8/crypto/openssh/packet.h (contents, props changed) stable/8/crypto/openssh/readconf.c stable/8/crypto/openssh/readconf.h (contents, props changed) stable/8/crypto/openssh/servconf.c stable/8/crypto/openssh/servconf.h (contents, props changed) stable/8/crypto/openssh/serverloop.c (contents, props changed) stable/8/crypto/openssh/session.c stable/8/crypto/openssh/sftp.1 stable/8/crypto/openssh/sftp.c (contents, props changed) stable/8/crypto/openssh/ssh.c stable/8/crypto/openssh/ssh_namespace.h stable/8/crypto/openssh/sshconnect.c stable/8/crypto/openssh/sshconnect2.c (contents, props changed) stable/8/crypto/openssh/sshd.c stable/8/crypto/openssh/sshd_config stable/8/crypto/openssh/version.c stable/8/crypto/openssh/version.h Directory Properties: stable/8/crypto/openssh/ (props changed) Copied: stable/8/crypto/openssh/README.hpn (from r224638, head/crypto/openssh/README.hpn) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/crypto/openssh/README.hpn Wed Nov 30 12:47:36 2011 (r228152, copy of r224638, head/crypto/openssh/README.hpn) @@ -0,0 +1,120 @@ +Notes: + +NONE CIPHER: + To use the NONE option you must have the NoneEnabled switch set on the server + and you MUST have *both* NoneEnabled and NoneSwitch set to yes on the client. + The NONE feature works with ALL ssh subsystems (as far as we can tell) + as long as there is no tty allocated. + If a user uses the -T switch to prevent a tty being created the NONE cipher + will be disabled. + + +PERFORMANCE: + The performance increase will only be as good as the network and TCP stack + tuning on the reciever side of the connection allows. As a rule of thumb a + user will need at least 10Mb/s connection with a 100ms RTT to see a doubling + of performance. + The HPN-SSH home page http://www.psc.edu/networking/projects/hpn-ssh + describes this in greater detail. + + +BUFFER SIZES: +- if HPN is disabled the receive buffer size will be set to the OpenSSH default + of 64K. + +- if a HPN system connects to a non-HPN system the receive buffer will + be set to the HPNBufferSize value. The default is 2MB but user adjustable. + +- If a HPN to HPN connection is established a number of different things might + happen based on the user options and conditions. + + Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll enabled, TCPRcvBuf NOT Set + Result: HPN Buffer Size = up to 64MB + This is the default state. The HPN buffer size will grow to a maximum of + 64MB as the TCP receive buffer grows. The maximum HPN Buffer size of 64MB + is geared towards 10GigE transcontinental connections. + + Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll disabled, TCPRcvBuf NOT Set + Result: HPN Buffer Size = TCP receive buffer value. + Users on non-autotuning systesm should disable TCPRcvBufPoll in the + ssh_cofig and sshd_config + + Conditions: HPNBufferSize SET, TCPRcvBufPoll disabled, TCPRcvBuf NOT Set + Result: HPN Buffer Size = minmum of TCP receive buffer and HPNBufferSize. + This would be the system defined TCP receive buffer (RWIN). + + Conditions: HPNBufferSize SET, TCPRcvBufPoll disabled, TCPRcvBuf SET + Result: HPN Buffer Size = minmum of TCPRcvBuf and HPNBufferSize. + Generally there is no need to set both. + + Conditions: HPNBufferSize SET, TCPRcvBufPoll enabled, TCPRcvBuf NOT Set + Result: HPN Buffer Size = grows to HPNBufferSize + The buffer will grow up to the maximum size specified here. + + Conditions: HPNBufferSize SET, TCPRcvBufPoll enabled, TCPRcvBuf SET + Result: HPN Buffer Size = minmum of TCPRcvBuf and HPNBufferSize. + Generally there is no need to set both of these, especially on autotuning + systems. However, if the users wishes to override the autotuning this would + be one way to do it. + + Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll enabled, TCPRcvBuf SET + Result: HPN Buffer Size = TCPRcvBuf. + This will override autotuning and set the TCP recieve buffer to the user + defined value. + + +HPN SPECIFIC CONFIGURATION OPTIONS: + +- HPNDisabled=[yes/no] client/server + In some situations, such as transfers on a local area network, the impact + of the HPN code produces a net decrease in performance. In these cases it is + helpful to disable the HPN functionality. By default HPNDisabled is set to no. + +- HPNBufferSize=[int]KB client/server + This is the default buffer size the HPN functionality uses when interacting + with non-HPN SSH installations. Conceptually this is similar to the TcpRcvBuf + option as applied to the internal SSH flow control. This value can range from + 1KB to 64MB (1-65536). Use of oversized or undersized buffers can cause + performance problems depending on the roud trip time of the network path. + The default size of this buffer is 2MB. + +- TcpRcvBufPoll=[yes/no] client/server + Enable or disable the polling of the TCP receive buffer through the life + of the connection. You would want to make sure that this option is enabled + for systems making use of autotuning kernels (linux 2.4.24+, 2.6, MS Vista, + FreeBSD 7.x and later). Default is yes. + +- TcpRcvBuf=[int]KB client + Set the TCP socket receive buffer to n Kilobytes. It can be set up to the + maximum socket size allowed by the system. This is useful in situations where + the TCP receive window is set low but the maximum buffer size is set higher + (as is typical). This works on a per TCP connection basis. You can also use + this to artifically limit the transfer rate of the connection. In these cases + the throughput will be no more than n/RTT. The minimum buffer size is 1KB. + Default is the current system wide TCP receive buffer size. + +- NoneEnabled=[yes/no] client/server + Enable or disable the use of the None cipher. Care must always be used when + enabling this as it will allow users to send data in the clear. However, it + is important to note that authentication information remains encrypted even + if this option is enabled. Set to no by default. + +- NoneSwitch=[yes/no] client + Switch the encryption cipher being used to the None cipher after + authentication takes place. NoneEnabled must be enabled on both the client + and server side of the connection. When the connection switches to the NONE + cipher a warning is sent to STDERR. The connection attempt will fail with an + error if a client requests a NoneSwitch from the server that does not + explicitly have NoneEnabled set to yes. + Note: The NONE cipher cannot be used in interactive (shell) sessions and it + will fail silently. Set to no by default. + + +CREDITS: + + This patch was conceived, designed, and led by Chris Rapier (rapier@psc.edu) + The majority of the actual coding for versions up to HPN12v1 was performed + by Michael Stevens (mstevens@andrew.cmu.edu). + The MT-AES-CTR cipher was implemented by Ben Bennet (ben@psc.edu). + This work was financed, in part, by Cisco System, Inc., the National Library + of Medicine, and the National Science Foundation. Modified: stable/8/crypto/openssh/buffer.c ============================================================================== --- stable/8/crypto/openssh/buffer.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/buffer.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: buffer.c,v 1.32 2010/02/09 03:56:28 djm Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,7 +26,7 @@ #include "log.h" #define BUFFER_MAX_CHUNK 0x100000 -#define BUFFER_MAX_LEN 0xa00000 +#define BUFFER_MAX_LEN 0x4000000 /* 64MB */ #define BUFFER_ALLOCSZ 0x008000 /* Initializes the buffer structure. */ @@ -165,6 +166,13 @@ buffer_len(const Buffer *buffer) return buffer->end - buffer->offset; } +/* Returns the maximum number of bytes of data that may be in the buffer. */ +u_int +buffer_get_max_len(void) +{ + return (BUFFER_MAX_LEN); +} + /* Gets data from the beginning of the buffer. */ int Modified: stable/8/crypto/openssh/buffer.h ============================================================================== --- stable/8/crypto/openssh/buffer.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/buffer.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: buffer.h,v 1.19 2010/02/09 03:56:28 djm Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -46,6 +47,8 @@ int buffer_get_ret(Buffer *, void *, u_ int buffer_consume_ret(Buffer *, u_int); int buffer_consume_end_ret(Buffer *, u_int); +u_int buffer_get_max_len(void); + #include void buffer_put_bignum(Buffer *, const BIGNUM *); Modified: stable/8/crypto/openssh/channels.c ============================================================================== --- stable/8/crypto/openssh/channels.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/channels.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: channels.c,v 1.303 2010/01/30 21:12:08 djm Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -170,6 +171,11 @@ static void port_open_helper(Channel *c, static int connect_next(struct channel_connect *); static void channel_connect_ctx_free(struct channel_connect *); +/* -- HPN */ + +static int hpn_disabled = 0; +static u_int buffer_size = CHAN_HPN_MIN_WINDOW_DEFAULT; + /* -- channel core */ Channel * @@ -309,6 +315,7 @@ channel_new(char *ctype, int type, int r c->self = found; c->type = type; c->ctype = ctype; + c->dynamic_window = 0; c->local_window = window; c->local_window_max = window; c->local_consumed = 0; @@ -810,11 +817,46 @@ channel_pre_open_13(Channel *c, fd_set * FD_SET(c->sock, writeset); } +static u_int +channel_tcpwinsz(void) +{ + u_int32_t tcpwinsz; + socklen_t optsz; + int ret, sd; + u_int maxlen; + + /* If we are not on a socket return 128KB. */ + if (!packet_connection_is_on_socket()) + return (128 * 1024); + + tcpwinsz = 0; + optsz = sizeof(tcpwinsz); + sd = packet_get_connection_in(); + ret = getsockopt(sd, SOL_SOCKET, SO_RCVBUF, &tcpwinsz, &optsz); + + /* Return no more than the maximum buffer size. */ + maxlen = buffer_get_max_len(); + if ((ret == 0) && tcpwinsz > maxlen) + tcpwinsz = maxlen; + /* In case getsockopt() failed return a minimum. */ + if (tcpwinsz == 0) + tcpwinsz = CHAN_TCP_WINDOW_DEFAULT; + debug2("tcpwinsz: %d for connection: %d", tcpwinsz, sd); + return (tcpwinsz); +} + static void channel_pre_open(Channel *c, fd_set *readset, fd_set *writeset) { - u_int limit = compat20 ? c->remote_window : packet_get_maxsize(); + u_int limit; + /* Check buffer limits. */ + if (!c->tcpwinsz || c->dynamic_window > 0) + c->tcpwinsz = channel_tcpwinsz(); + + limit = MIN(compat20 ? c->remote_window : packet_get_maxsize(), + 2 * c->tcpwinsz); + if (c->istate == CHAN_INPUT_OPEN && limit > 0 && buffer_len(&c->input) < limit && @@ -1784,14 +1826,25 @@ channel_check_window(Channel *c) c->local_maxpacket*3) || c->local_window < c->local_window_max/2) && c->local_consumed > 0) { + u_int addition = 0; + + /* Adjust max window size if we are in a dynamic environment. */ + if (c->dynamic_window && c->tcpwinsz > c->local_window_max) { + /* + * Grow the window somewhat aggressively to maintain + * pressure. + */ + addition = 1.5 * (c->tcpwinsz - c->local_window_max); + c->local_window_max += addition; + } packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST); packet_put_int(c->remote_id); - packet_put_int(c->local_consumed); + packet_put_int(c->local_consumed + addition); packet_send(); debug2("channel %d: window %d sent adjust %d", c->self, c->local_window, c->local_consumed); - c->local_window += c->local_consumed; + c->local_window += c->local_consumed + addition; c->local_consumed = 0; } return 1; @@ -2613,6 +2666,15 @@ channel_set_af(int af) IPv4or6 = af; } +void +channel_set_hpn(int disabled, u_int buf_size) +{ + hpn_disabled = disabled; + buffer_size = buf_size; + debug("HPN Disabled: %d, HPN Buffer Size: %d", + hpn_disabled, buffer_size); +} + static int channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_port, int *allocated_listen_port, @@ -2765,10 +2827,18 @@ channel_setup_fwd_listener(int type, con *allocated_listen_port); } - /* Allocate a channel number for the socket. */ - c = channel_new("port listener", type, sock, sock, -1, - CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, - 0, "port listener", 1); + /* + * Allocate a channel number for the socket. Explicitly test + * for hpn disabled option. If true use smaller window size. + */ + if (hpn_disabled) + c = channel_new("port listener", type, sock, sock, -1, + CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, + 0, "port listener", 1); + else + c = channel_new("port listener", type, sock, sock, -1, + buffer_size, CHAN_TCP_PACKET_DEFAULT, + 0, "port listener", 1); c->path = xstrdup(host); c->host_port = port_to_connect; c->listening_port = listen_port; @@ -3302,10 +3372,16 @@ x11_create_display_inet(int x11_display_ *chanids = xcalloc(num_socks + 1, sizeof(**chanids)); for (n = 0; n < num_socks; n++) { sock = socks[n]; - nc = channel_new("x11 listener", - SSH_CHANNEL_X11_LISTENER, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, - 0, "X11 inet listener", 1); + if (hpn_disabled) + nc = channel_new("x11 listener", + SSH_CHANNEL_X11_LISTENER, sock, sock, -1, + CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, + 0, "X11 inet listener", 1); + else + nc = channel_new("x11 listener", + SSH_CHANNEL_X11_LISTENER, sock, sock, -1, + buffer_size, CHAN_X11_PACKET_DEFAULT, + 0, "X11 inet listener", 1); nc->single_connection = single_connection; (*chanids)[n] = nc->self; } Modified: stable/8/crypto/openssh/channels.h ============================================================================== --- stable/8/crypto/openssh/channels.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/channels.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: channels.h,v 1.103 2010/01/26 01:28:35 djm Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -124,6 +125,8 @@ struct Channel { u_int local_window_max; u_int local_consumed; u_int local_maxpacket; + u_int tcpwinsz; + int dynamic_window; int extended_usage; int single_connection; @@ -160,11 +163,15 @@ struct Channel { /* default window/packet sizes for tcp/x11-fwd-channel */ #define CHAN_SES_PACKET_DEFAULT (32*1024) #define CHAN_SES_WINDOW_DEFAULT (64*CHAN_SES_PACKET_DEFAULT) + #define CHAN_TCP_PACKET_DEFAULT (32*1024) #define CHAN_TCP_WINDOW_DEFAULT (64*CHAN_TCP_PACKET_DEFAULT) + #define CHAN_X11_PACKET_DEFAULT (16*1024) #define CHAN_X11_WINDOW_DEFAULT (4*CHAN_X11_PACKET_DEFAULT) +#define CHAN_HPN_MIN_WINDOW_DEFAULT (2*1024*1024) + /* possible input states */ #define CHAN_INPUT_OPEN 0 #define CHAN_INPUT_WAIT_DRAIN 1 @@ -292,4 +299,7 @@ void chan_rcvd_ieof(Channel *); void chan_write_failed(Channel *); void chan_obuf_empty(Channel *); +/* hpn handler */ +void channel_set_hpn(int, u_int); + #endif Modified: stable/8/crypto/openssh/cipher.c ============================================================================== --- stable/8/crypto/openssh/cipher.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/cipher.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: cipher.c,v 1.82 2009/01/26 09:58:15 markus Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -163,7 +164,12 @@ ciphers_valid(const char *names) for ((p = strsep(&cp, CIPHER_SEP)); p && *p != '\0'; (p = strsep(&cp, CIPHER_SEP))) { c = cipher_by_name(p); - if (c == NULL || c->number != SSH_CIPHER_SSH2) { +#ifdef NONE_CIPHER_ENABLED + if (c == NULL || (c->number != SSH_CIPHER_SSH2 && + c->number != SSH_CIPHER_NONE)) { +#else + if (c == NULL || (c->number != SSH_CIPHER_SSH2)) { +#endif debug("bad cipher %s [%s]", p, names); xfree(cipher_list); return 0; @@ -337,6 +343,9 @@ cipher_get_keyiv(CipherContext *cc, u_ch int evplen; switch (c->number) { +#ifdef NONE_CIPHER_ENABLED + case SSH_CIPHER_NONE: +#endif case SSH_CIPHER_SSH2: case SSH_CIPHER_DES: case SSH_CIPHER_BLOWFISH: @@ -371,6 +380,9 @@ cipher_set_keyiv(CipherContext *cc, u_ch int evplen = 0; switch (c->number) { +#ifdef NONE_CIPHER_ENABLED + case SSH_CIPHER_NONE: +#endif case SSH_CIPHER_SSH2: case SSH_CIPHER_DES: case SSH_CIPHER_BLOWFISH: Modified: stable/8/crypto/openssh/clientloop.c ============================================================================== --- stable/8/crypto/openssh/clientloop.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/clientloop.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: clientloop.c,v 1.218 2010/01/28 00:21:18 djm Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1700,9 +1701,14 @@ client_request_x11(const char *request_t sock = x11_connect_display(); if (sock < 0) return NULL; - c = channel_new("x11", - SSH_CHANNEL_X11_OPEN, sock, sock, -1, - CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, "x11", 1); + if (options.hpn_disabled) + c = channel_new("x11", SSH_CHANNEL_X11_OPEN, sock, sock, -1, + CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, + 0, "x11", 1); + else + c = channel_new("x11", SSH_CHANNEL_X11_OPEN, sock, sock, -1, + options.hpn_buffer_size, CHAN_X11_PACKET_DEFAULT, + 0, "x11", 1); c->force_drain = 1; return c; } @@ -1722,10 +1728,16 @@ client_request_agent(const char *request sock = ssh_get_authentication_socket(); if (sock < 0) return NULL; - c = channel_new("authentication agent connection", - SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, - "authentication agent connection", 1); + if (options.hpn_disabled) + c = channel_new("authentication agent connection", + SSH_CHANNEL_OPEN, sock, sock, -1, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + "authentication agent connection", 1); + else + c = channel_new("authentication agent connection", + SSH_CHANNEL_OPEN, sock, sock, -1, + options.hpn_buffer_size, options.hpn_buffer_size, 0, + "authentication agent connection", 1); c->force_drain = 1; return c; } @@ -1752,8 +1764,14 @@ client_request_tun_fwd(int tun_mode, int return -1; } - c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1, - CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1); + if (options.hpn_disabled) + c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1, + CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, + 0, "tun", 1); + else + c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1, + options.hpn_buffer_size, CHAN_TCP_PACKET_DEFAULT, + 0, "tun", 1); c->datagram = 1; #if defined(SSH_TUN_FILTER) Modified: stable/8/crypto/openssh/compat.c ============================================================================== --- stable/8/crypto/openssh/compat.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/compat.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: compat.c,v 1.78 2008/09/11 14:22:37 markus Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -170,6 +171,16 @@ compat_datafellows(const char *version) strlen(check[i].pat), 0) == 1) { debug("match: %s pat %s", version, check[i].pat); datafellows = check[i].bugs; + /* + * Check to see if the remote side is OpenSSH and not + * HPN. It is utterly strange to check it from the + * version string and expose the option that way. + */ + if (strstr(version,"OpenSSH") != NULL && + strstr(version,"hpn") == NULL) { + datafellows |= SSH_BUG_LARGEWINDOW; + debug("Remote is not HPN-aware"); + } return; } } Modified: stable/8/crypto/openssh/compat.h ============================================================================== --- stable/8/crypto/openssh/compat.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/compat.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: compat.h,v 1.42 2008/09/11 14:22:37 markus Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. @@ -58,6 +59,7 @@ #define SSH_OLD_FORWARD_ADDR 0x01000000 #define SSH_BUG_RFWD_ADDR 0x02000000 #define SSH_NEW_OPENSSH 0x04000000 +#define SSH_BUG_LARGEWINDOW 0x08000000 void enable_compat13(void); void enable_compat20(void); Modified: stable/8/crypto/openssh/kex.c ============================================================================== --- stable/8/crypto/openssh/kex.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/kex.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: kex.c,v 1.82 2009/10/24 11:13:54 andreas Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -62,8 +63,13 @@ extern const EVP_MD *evp_ssh_sha256(void static void kex_kexinit_finish(Kex *); static void kex_choose_conf(Kex *); -/* put algorithm proposal into buffer */ +/* Put algorithm proposal into buffer. */ +#ifndef NONE_CIPHER_ENABLED static void +#else +/* Also used in sshconnect2.c. */ +void +#endif kex_prop2buf(Buffer *b, char *proposal[PROPOSAL_MAX]) { u_int i; @@ -375,6 +381,9 @@ kex_choose_conf(Kex *kex) int nenc, nmac, ncomp; u_int mode, ctos, need; int first_kex_follows, type; +#ifdef NONE_CIPHER_ENABLED + int auth_flag; +#endif my = kex_buf2prop(&kex->my, NULL); peer = kex_buf2prop(&kex->peer, &first_kex_follows); @@ -398,6 +407,10 @@ kex_choose_conf(Kex *kex) } /* Algorithm Negotiation */ +#ifdef NONE_CIPHER_ENABLED + auth_flag = packet_get_authentication_state(); + debug ("AUTH STATE is %d", auth_flag); +#endif for (mode = 0; mode < MODE_MAX; mode++) { newkeys = xcalloc(1, sizeof(*newkeys)); kex->newkeys[mode] = newkeys; @@ -409,6 +422,17 @@ kex_choose_conf(Kex *kex) choose_enc (&newkeys->enc, cprop[nenc], sprop[nenc]); choose_mac (&newkeys->mac, cprop[nmac], sprop[nmac]); choose_comp(&newkeys->comp, cprop[ncomp], sprop[ncomp]); +#ifdef NONE_CIPHER_ENABLED + debug("REQUESTED ENC.NAME is '%s'", newkeys->enc.name); + if (strcmp(newkeys->enc.name, "none") == 0) { + debug("Requesting NONE. Authflag is %d", auth_flag); + if (auth_flag == 1) + debug("None requested post authentication."); + else + fatal("Pre-authentication none cipher requests " + "are not allowed."); + } +#endif debug("kex: %s %s %s %s", ctos ? "client->server" : "server->client", newkeys->enc.name, Modified: stable/8/crypto/openssh/kex.h ============================================================================== --- stable/8/crypto/openssh/kex.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/kex.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: kex.h,v 1.49 2010/02/26 20:29:54 djm Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -132,6 +133,10 @@ struct Kex { void (*kex[KEX_MAX])(Kex *); }; +#ifdef NONE_CIPHER_ENABLED +void kex_prop2buf(Buffer *, char *[PROPOSAL_MAX]); +#endif + Kex *kex_setup(char *[PROPOSAL_MAX]); void kex_finish(Kex *); Modified: stable/8/crypto/openssh/misc.c ============================================================================== --- stable/8/crypto/openssh/misc.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/misc.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: misc.c,v 1.75 2010/01/09 23:04:13 dtucker Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -860,3 +861,34 @@ sock_set_v6only(int s) error("setsockopt IPV6_V6ONLY: %s", strerror(errno)); #endif } + +void +sock_get_rcvbuf(int *size, int rcvbuf) +{ + int sock, socksize; + socklen_t socksizelen = sizeof(socksize); + + /* + * Create a socket but do not connect it. We use it + * only to get the rcv socket size. + */ + sock = socket(AF_INET6, SOCK_STREAM, 0); + if (sock < 0) + sock = socket(AF_INET, SOCK_STREAM, 0); + if (sock < 0) + return; + + /* + * If the tcp_rcv_buf option is set and passed in, attempt to set the + * buffer size to its value. + */ + if (rcvbuf) + setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf, + sizeof(rcvbuf)); + + if (getsockopt(sock, SOL_SOCKET, SO_RCVBUF, + &socksize, &socksizelen) == 0) + if (size != NULL) + *size = socksize; + close(sock); +} Modified: stable/8/crypto/openssh/misc.h ============================================================================== --- stable/8/crypto/openssh/misc.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/misc.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: misc.h,v 1.41 2010/01/09 23:04:13 dtucker Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -36,6 +37,7 @@ void sanitise_stdfd(void); void ms_subtract_diff(struct timeval *, int *); void ms_to_timeval(struct timeval *, int); void sock_set_v6only(int); +void sock_get_rcvbuf(int *, int); struct passwd *pwcopy(struct passwd *); const char *ssh_gai_strerror(int); Modified: stable/8/crypto/openssh/myproposal.h ============================================================================== --- stable/8/crypto/openssh/myproposal.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/myproposal.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: myproposal.h,v 1.24 2010/02/26 20:29:54 djm Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -49,6 +50,10 @@ "arcfour256,arcfour128," \ "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \ "aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se" +#ifdef NONE_CIPHER_ENABLED +#define KEX_ENCRYPT_INCLUDE_NONE KEX_DEFAULT_ENCRYPT \ + ",none" +#endif #define KEX_DEFAULT_MAC \ "hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160," \ "hmac-ripemd160@openssh.com," \ Modified: stable/8/crypto/openssh/packet.c ============================================================================== --- stable/8/crypto/openssh/packet.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/packet.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: packet.c,v 1.166 2009/06/27 09:29:06 andreas Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -195,6 +196,9 @@ struct session_state { }; static struct session_state *active_state, *backup_state; +#ifdef NONE_CIPHER_ENABLED +static int rekey_requested = 0; +#endif static struct session_state * alloc_session_state(void) @@ -1840,12 +1844,26 @@ packet_send_ignore(int nbytes) } } +#ifdef NONE_CIPHER_ENABLED +void +packet_request_rekeying(void) +{ + rekey_requested = 1; +} +#endif + #define MAX_PACKETS (1U<<31) int packet_need_rekeying(void) { if (datafellows & SSH_BUG_NOREKEY) return 0; +#ifdef NONE_CIPHER_ENABLED + if (rekey_requested == 1) { + rekey_requested = 0; + return 1; + } +#endif return (active_state->p_send.packets > MAX_PACKETS) || (active_state->p_read.packets > MAX_PACKETS) || @@ -1937,3 +1955,11 @@ packet_restore_state(void) add_recv_bytes(len); } } + +#ifdef NONE_CIPHER_ENABLED +int +packet_get_authentication_state(void) +{ + return (active_state->after_authentication); +} +#endif Modified: stable/8/crypto/openssh/packet.h ============================================================================== --- stable/8/crypto/openssh/packet.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/packet.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: packet.h,v 1.52 2009/06/27 09:29:06 andreas Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -35,6 +36,9 @@ void packet_set_interactive(int); int packet_is_interactive(void); void packet_set_server(void); void packet_set_authenticated(void); +#ifdef NONE_CIPHER_ENABLED +int packet_get_authentication_state(void); +#endif void packet_start(u_char); void packet_put_char(int ch); @@ -107,6 +111,9 @@ do { \ } while (0) int packet_need_rekeying(void); +#ifdef NONE_CIPHER_ENABLED +void packet_request_rekeying(void); +#endif void packet_set_rekey_limit(u_int32_t); void packet_backup_state(void); Modified: stable/8/crypto/openssh/readconf.c ============================================================================== --- stable/8/crypto/openssh/readconf.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/readconf.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: readconf.c,v 1.183 2010/02/08 10:50:20 markus Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -134,6 +135,10 @@ typedef enum { oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, + oHPNDisabled, oHPNBufferSize, oTcpRcvBufPoll, oTcpRcvBuf, +#ifdef NONE_CIPHER_ENABLED + oNoneEnabled, oNoneSwitch, +#endif oVersionAddendum, oDeprecated, oUnsupported } OpCodes; @@ -241,6 +246,14 @@ static struct { #else { "zeroknowledgepasswordauthentication", oUnsupported }, #endif + { "hpndisabled", oHPNDisabled }, + { "hpnbuffersize", oHPNBufferSize }, + { "tcprcvbufpoll", oTcpRcvBufPoll }, + { "tcprcvbuf", oTcpRcvBuf }, +#ifdef NONE_CIPHER_ENABLED + { "noneenabled", oNoneEnabled }, + { "noneswitch", oNoneSwitch }, +#endif { "versionaddendum", oVersionAddendum }, { NULL, oBadOption } @@ -945,6 +958,47 @@ parse_int: } while (arg != NULL && *arg != '\0'); break; + case oHPNDisabled: + intptr = &options->hpn_disabled; + goto parse_flag; + + case oHPNBufferSize: + intptr = &options->hpn_buffer_size; + goto parse_int; + + case oTcpRcvBufPoll: + intptr = &options->tcp_rcv_buf_poll; + goto parse_flag; + + case oTcpRcvBuf: + intptr = &options->tcp_rcv_buf; + goto parse_int; + +#ifdef NONE_CIPHER_ENABLED + case oNoneEnabled: + intptr = &options->none_enabled; + goto parse_flag; + + /* + * We check to see if the command comes from the command line or not. + * If it does then enable it otherwise fail. NONE must never be a + * default configuration. + */ + case oNoneSwitch: + if (strcmp(filename,"command-line") == 0) { + intptr = &options->none_switch; + goto parse_flag; + } else { + debug("NoneSwitch directive found in %.200s.", + filename); + error("NoneSwitch is found in %.200s.\n" + "You may only use this configuration option " + "from the command line", filename); + error("Continuing..."); + return 0; + } +#endif + case oDeprecated: debug("%s line %d: Deprecated option \"%s\"", filename, linenum, keyword); @@ -1097,6 +1151,14 @@ initialize_options(Options * options) options->use_roaming = -1; options->visual_host_key = -1; options->zero_knowledge_password_authentication = -1; + options->hpn_disabled = -1; + options->hpn_buffer_size = -1; + options->tcp_rcv_buf_poll = -1; + options->tcp_rcv_buf = -1; +#ifdef NONE_CIPHER_ENABLED + options->none_enabled = -1; + options->none_switch = -1; +#endif } /* @@ -1243,6 +1305,36 @@ fill_default_options(Options * options) /* options->hostname will be set in the main program if appropriate */ /* options->host_key_alias should not be set by default */ /* options->preferred_authentications will be set in ssh */ + if (options->hpn_disabled == -1) + options->hpn_disabled = 0; + if (options->hpn_buffer_size > -1) + { + u_int maxlen; + + /* If a user tries to set the size to 0 set it to 1KB. */ + if (options->hpn_buffer_size == 0) + options->hpn_buffer_size = 1024; + /* Limit the buffer to BUFFER_MAX_LEN. */ + maxlen = buffer_get_max_len(); + if (options->hpn_buffer_size > (maxlen / 1024)) { + debug("User requested buffer larger than %ub: %ub. " + "Request reverted to %ub", maxlen, + options->hpn_buffer_size * 1024, maxlen); + options->hpn_buffer_size = maxlen; + } + debug("hpn_buffer_size set to %d", options->hpn_buffer_size); + } + if (options->tcp_rcv_buf == 0) + options->tcp_rcv_buf = 1; + if (options->tcp_rcv_buf > -1) + options->tcp_rcv_buf *= 1024; + if (options->tcp_rcv_buf_poll == -1) + options->tcp_rcv_buf_poll = 1; +#ifdef NONE_CIPHER_ENABLED + /* options->none_enabled must not be set by default */ + if (options->none_switch == -1) + options->none_switch = 0; +#endif } /* Modified: stable/8/crypto/openssh/readconf.h ============================================================================== --- stable/8/crypto/openssh/readconf.h Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/readconf.h Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: readconf.h,v 1.82 2010/02/08 10:50:20 markus Exp $ */ +/* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -125,6 +126,17 @@ typedef struct { int use_roaming; + int hpn_disabled; /* Switch to disable HPN buffer management. */ + int hpn_buffer_size; /* User definable size for HPN buffer + * window. */ + int tcp_rcv_buf_poll; /* Option to poll recv buf every window + * transfer. */ + int tcp_rcv_buf; /* User switch to set tcp recv buffer. */ + +#ifdef NONE_CIPHER_ENABLED + int none_enabled; /* Allow none to be used */ + int none_switch; /* Use none cipher */ +#endif } Options; #define SSHCTL_MASTER_NO 0 Modified: stable/8/crypto/openssh/servconf.c ============================================================================== --- stable/8/crypto/openssh/servconf.c Wed Nov 30 10:23:05 2011 (r228151) +++ stable/8/crypto/openssh/servconf.c Wed Nov 30 12:47:36 2011 (r228152) @@ -1,4 +1,5 @@ /* $OpenBSD: servconf.c,v 1.204 2010/03/04 10:36:03 djm Exp $ */ +/* $FreeBSD$ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -133,6 +134,12 @@ initialize_server_options(ServerOptions options->zero_knowledge_password_authentication = -1; options->revoked_keys_file = NULL; options->trusted_user_ca_keys = NULL; + options->hpn_disabled = -1; + options->hpn_buffer_size = -1; + options->tcp_rcv_buf_poll = -1; +#ifdef NONE_CIPHER_ENABLED + options->none_enabled = -1; +#endif } void @@ -267,6 +274,37 @@ fill_default_server_options(ServerOption options->permit_tun = SSH_TUNMODE_NO; if (options->zero_knowledge_password_authentication == -1) options->zero_knowledge_password_authentication = 0; + if (options->hpn_disabled == -1) + options->hpn_disabled = 0; + if (options->hpn_buffer_size == -1) { + /* + * HPN buffer size option not explicitly set. Try to figure + * out what value to use or resort to default. + */ + options->hpn_buffer_size = CHAN_SES_WINDOW_DEFAULT; + if (!options->hpn_disabled) { + sock_get_rcvbuf(&options->hpn_buffer_size, 0); + debug ("HPN Buffer Size: %d", options->hpn_buffer_size); + } + } else { + /* + * In the case that the user sets both values in a + * contradictory manner hpn_disabled overrrides hpn_buffer_size. + */ + if (options->hpn_disabled <= 0) { + u_int maxlen; + + maxlen = buffer_get_max_len(); + if (options->hpn_buffer_size == 0) + options->hpn_buffer_size = 1; + /* Limit the maximum buffer to BUFFER_MAX_LEN. */ + if (options->hpn_buffer_size > maxlen / 1024) + options->hpn_buffer_size = maxlen; + else + options->hpn_buffer_size *= 1024; + } else + options->hpn_buffer_size = CHAN_TCP_WINDOW_DEFAULT; + } /* Turn privilege separation on by default */ if (use_privsep == -1) @@ -313,6 +351,10 @@ typedef enum { sUsePrivilegeSeparation, sAllowAgentForwarding, sZeroKnowledgePasswordAuthentication, sHostCertificate, sRevokedKeys, sTrustedUserCAKeys, + sHPNDisabled, sHPNBufferSize, sTcpRcvBufPoll, +#ifdef NONE_CIPHER_ENABLED + sNoneEnabled, +#endif sVersionAddendum, sDeprecated, sUnsupported } ServerOpCodes; @@ -435,6 +477,12 @@ static struct { { "hostcertificate", sHostCertificate, SSHCFG_GLOBAL }, { "revokedkeys", sRevokedKeys, SSHCFG_ALL }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 13:25:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 761391065670; Wed, 30 Nov 2011 13:25:58 +0000 (UTC) (envelope-from r.c.ladan@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 546FC8FC08; Wed, 30 Nov 2011 13:25:56 +0000 (UTC) Received: by eaai12 with SMTP id i12so976446eaa.13 for ; Wed, 30 Nov 2011 05:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=e6dUkEiNBCZJp5kpVM7/+crUWrLoM3+ausOpURWtzQ0=; b=xVVTotCjRH5n2FBNqXF2U6gtMZ/XTgTmuV5ao2eUXoKJDiHS/jQ3gZsY3vgs5v1zEj 6HernctmhB3RzmySklxah6vKXcyPe6pz5u3Tc09pYWXTU97FBgk0imTb1Z5gO09ckl9v b2ywDMD1P8VwyL//M95ofyITbyYd5Ck3varLU= MIME-Version: 1.0 Received: by 10.216.175.21 with SMTP id y21mr281791wel.66.1322657827251; Wed, 30 Nov 2011 04:57:07 -0800 (PST) Sender: r.c.ladan@gmail.com Received: by 10.180.109.168 with HTTP; Wed, 30 Nov 2011 04:57:07 -0800 (PST) In-Reply-To: <201111222150.pAMLocBJ011385@svn.freebsd.org> References: <201111222150.pAMLocBJ011385@svn.freebsd.org> Date: Wed, 30 Nov 2011 13:57:07 +0100 X-Google-Sender-Auth: kcY0bRTfm_mQoUFSlST1KdwwxqE Message-ID: From: =?ISO-8859-1?Q?Ren=E9_Ladan?= To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227845 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 13:25:58 -0000 2011/11/22 Luigi Rizzo : > Author: luigi > Date: Tue Nov 22 21:50:38 2011 > New Revision: 227845 > URL: http://svn.freebsd.org/changeset/base/227845 > > Log: > =A0forgot to merge NETMAP entries in sys/conf ! > > Modified: > =A0head/sys/conf/NOTES > =A0head/sys/conf/files > =A0head/sys/conf/options > > Modified: head/sys/conf/NOTES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/NOTES Tue Nov 22 21:49:29 2011 =A0 =A0 =A0 =A0(r227844) > +++ head/sys/conf/NOTES Tue Nov 22 21:50:38 2011 =A0 =A0 =A0 =A0(r227845) > @@ -799,6 +799,12 @@ device =A0 =A0 =A0 =A0 =A0 =A0 sppp > =A0# =A0option. =A0DHCP requires bpf. > =A0device =A0 =A0 =A0 =A0 bpf > > +# =A0The `netmap' device implements memory-mapped access to network > +# =A0devices from userspace, enabling wire-speed packet capture and > +# =A0generation even at 10Gbit/s. Requires support in the device > +# =A0driver. Supported drivers are ixgbe, e1000, re. > +device =A0 =A0 =A0 =A0 netmap > + > =A0# =A0The `disc' device implements a minimal network interface, > =A0# =A0which throws away all packets sent and never receives any. =A0It = is > =A0# =A0included for testing and benchmarking purposes. > > Modified: head/sys/conf/files > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files Tue Nov 22 21:49:29 2011 =A0 =A0 =A0 =A0(r227844) > +++ head/sys/conf/files Tue Nov 22 21:50:38 2011 =A0 =A0 =A0 =A0(r227845) > @@ -1507,6 +1507,7 @@ dev/mxge/mxge_rss_ethp_z8e.c =A0 =A0 =A0optional mx > =A0dev/my/if_my.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 optional my > =A0dev/ncv/ncr53c500.c =A0 =A0 =A0 =A0 =A0 =A0optional ncv > =A0dev/ncv/ncr53c500_pccard.c =A0 =A0 optional ncv pccard > +dev/netmap/netmap.c =A0 =A0 =A0 =A0 =A0 =A0optional netmap > =A0dev/nge/if_nge.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 optional nge > =A0dev/nxge/if_nxge.c =A0 =A0 =A0 =A0 =A0 =A0 optional nxge > =A0dev/nxge/xgehal/xgehal-device.c =A0 =A0 =A0 =A0optional nxge > > Modified: head/sys/conf/options > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/options =A0 =A0 =A0 Tue Nov 22 21:49:29 2011 =A0 =A0 = =A0 =A0(r227844) > +++ head/sys/conf/options =A0 =A0 =A0 Tue Nov 22 21:50:38 2011 =A0 =A0 = =A0 =A0(r227845) > @@ -690,6 +690,7 @@ ISAPNP =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0opt= _isa.h > > =A0# various 'device presence' options. > =A0DEV_BPF =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0opt_bpf.h > +DEV_NETMAP =A0 =A0 =A0 =A0 =A0 =A0 opt_global.h > =A0DEV_MCA =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0opt_mca.h > =A0DEV_CARP =A0 =A0 =A0 =A0 =A0 =A0 =A0 opt_carp.h > =A0DEV_SPLASH =A0 =A0 =A0 =A0 =A0 =A0 opt_splash.h I just noticed that head/sys/dev/netmap/head.diff still contains these patches, so now it won't apply cleanly any longer. Speaking of which, is there an ETA for the rest of this patch? Regards, Ren=E9 From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 13:33:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D208106564A; Wed, 30 Nov 2011 13:33:10 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F13B68FC08; Wed, 30 Nov 2011 13:33:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUDX9Sa099564; Wed, 30 Nov 2011 13:33:09 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUDX92u099562; Wed, 30 Nov 2011 13:33:09 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111301333.pAUDX92u099562@svn.freebsd.org> From: Max Khon Date: Wed, 30 Nov 2011 13:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228153 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 13:33:10 -0000 Author: fjoe Date: Wed Nov 30 13:33:09 2011 New Revision: 228153 URL: http://svn.freebsd.org/changeset/base/228153 Log: Generate ${NORMAL_CTFCONVERT} invocation without '@' modifier: - ${NORMAL_CC} is also invoked without '@' - Userland CTF support was changed previously to echo ctfconvert invocations too Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Wed Nov 30 12:47:36 2011 (r228152) +++ head/usr.sbin/config/mkmakefile.c Wed Nov 30 13:33:09 2011 (r228153) @@ -774,7 +774,7 @@ do_rules(FILE *f) fprintf(f, "\t%s\n", compilewith); if (!(ftp->f_flags & NO_OBJ)) - fprintf(f, "\t@${NORMAL_CTFCONVERT}\n\n"); + fprintf(f, "\t${NORMAL_CTFCONVERT}\n\n"); else fprintf(f, "\n"); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 14:17:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A46A1065670; Wed, 30 Nov 2011 14:17:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 690F18FC08; Wed, 30 Nov 2011 14:17:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUEHMo7001056; Wed, 30 Nov 2011 14:17:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUEHML3001053; Wed, 30 Nov 2011 14:17:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201111301417.pAUEHML3001053@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 30 Nov 2011 14:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228154 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 14:17:22 -0000 Author: nwhitehorn Date: Wed Nov 30 14:17:20 2011 New Revision: 228154 URL: http://svn.freebsd.org/changeset/base/228154 Log: Welcome Justin Hibbits (jhibbits) as a new src committer! I'll be mentoring him and his initial work will be related to better support of Apple PowerPC hardware. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed Nov 30 13:33:09 2011 (r228153) +++ svnadmin/conf/access Wed Nov 30 14:17:20 2011 (r228154) @@ -115,6 +115,7 @@ jfv jh jhay jhb +jhibbits jilles jinmei jkim Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Wed Nov 30 13:33:09 2011 (r228153) +++ svnadmin/conf/mentors Wed Nov 30 14:17:20 2011 (r228154) @@ -18,6 +18,7 @@ eri mlaier Co-mentor: thompsa gber cognet gleb mdf jceel wkoszek Co-mentor: cognet +jhibbits nwhitehorn jinmei gnn jonathan rwatson jpaetzel kib From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 14:35:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE1C3106566C; Wed, 30 Nov 2011 14:35:03 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E84D8FC0A; Wed, 30 Nov 2011 14:35:03 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so656737vcb.13 for ; Wed, 30 Nov 2011 06:35:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.16.101 with SMTP id f5mr467736obd.33.1322663701596; Wed, 30 Nov 2011 06:35:01 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Wed, 30 Nov 2011 06:35:01 -0800 (PST) X-Originating-IP: [80.89.199.122] In-Reply-To: <201111291536.33736.jhb@freebsd.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <201111291536.33736.jhb@freebsd.org> Date: Wed, 30 Nov 2011 20:35:01 +0600 X-Google-Sender-Auth: T7VZbauV22W24Y-zD35h46RlJRY Message-ID: From: Max Khon To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 14:35:04 -0000 John, On Wed, Nov 30, 2011 at 3:36 AM, John Baldwin wrote: > Author: fjoe > > Date: Tue Nov 29 19:46:17 2011 > > New Revision: 228143 > > URL: http://svn.freebsd.org/changeset/base/228143 > > > > Log: > > Turn off profiled libs build by default. > > Can be enabled back using WITH_PROFILE=yes in /etc/src.conf > > Hmm, was discussed anywhere? (I haven't seen it if so, but am a bit > behind on > a few lists from last week still.) It was discussed in -current. Probably should have been discussed somewhere else. > Also, it seems you are hacking on several > build-related things currently, is there a larger project you are working > on > to reduce build world times or some such? > Yes, I want to reduce build world times. Max From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 15:10:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1811106566C; Wed, 30 Nov 2011 15:10:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A33598FC1D; Wed, 30 Nov 2011 15:10:47 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 595FB46B09; Wed, 30 Nov 2011 10:10:47 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BA475B94F; Wed, 30 Nov 2011 10:10:46 -0500 (EST) From: John Baldwin To: Max Khon Date: Wed, 30 Nov 2011 10:10:44 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111291946.pATJkHMs064094@svn.freebsd.org> <201111291536.33736.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111301010.44970.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 30 Nov 2011 10:10:46 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 15:10:48 -0000 On Wednesday, November 30, 2011 9:35:01 am Max Khon wrote: > John, > > On Wed, Nov 30, 2011 at 3:36 AM, John Baldwin wrote: > > > Author: fjoe > > > Date: Tue Nov 29 19:46:17 2011 > > > New Revision: 228143 > > > URL: http://svn.freebsd.org/changeset/base/228143 > > > > > > Log: > > > Turn off profiled libs build by default. > > > Can be enabled back using WITH_PROFILE=yes in /etc/src.conf > > > > Hmm, was discussed anywhere? (I haven't seen it if so, but am a bit > > behind on > > a few lists from last week still.) > > > It was discussed in -current. Probably should have been discussed somewhere > else. Nah, you were fine. I was just behind on -current. > > Also, it seems you are hacking on several > > build-related things currently, is there a larger project you are working > > on > > to reduce build world times or some such? > > > > Yes, I want to reduce build world times. Ok, can you maybe send a more high-level e-mail of the other things you have pending to current@ perhaps? (If you have more stuff beyond this.) The thread I saw on current@ only covered WITHOUT_PROFILE but didn't cover the CTF changes or anything else, etc. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 17:11:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EFE2106566B; Wed, 30 Nov 2011 17:11:00 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 283C38FC15; Wed, 30 Nov 2011 17:10:59 +0000 (UTC) Received: by eaai12 with SMTP id i12so1363471eaa.13 for ; Wed, 30 Nov 2011 09:10:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.14.203 with SMTP id h11mr533967eba.139.1322671705249; Wed, 30 Nov 2011 08:48:25 -0800 (PST) Received: by 10.14.37.136 with HTTP; Wed, 30 Nov 2011 08:48:25 -0800 (PST) X-Originating-IP: [209.66.78.50] In-Reply-To: <20111117183642.GY1455@elvis.mu.org> References: <20111117040109.GU1455@elvis.mu.org> <462306074.1954190.1321506994004.JavaMail.root@erie.cs.uoguelph.ca> <20111117183642.GY1455@elvis.mu.org> Date: Wed, 30 Nov 2011 11:48:25 -0500 Message-ID: From: Mark Saad To: Alfred Perlstein Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable-7@freebsd.org, src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Rick Macklem , Rick Macklem Subject: Re: svn commit: r227549 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 17:11:00 -0000 On Thu, Nov 17, 2011 at 1:36 PM, Alfred Perlstein wrote: > * Rick Macklem [111116 21:16] wrote: >> Alfred Perlstein wrote: >> > Rick, I have a question, what will happen if the nfs_freesillyrename() >> > call happens when the mount is down? Will it block the >> > taskqueue_thread? >> > >> > If so, it might make more sense to make a taskqueue per mount point. >> > >> > If not, excuse me. :-) >> > >> Well, all nfs_freesillyrename() does is a vrele() on the parent >> directory when the file node's use count has gone to 0. >> I can't think why that would do any RPC, so I don't see a problem? >> If you do see a problem with vrele() on the directory, please let me >> know. >> >> The problem this fixes is a LOR that would occur when the vrele() on >> the directory was done by the thread doing VOP_INACTIVE(), since it >> already has the file vnode lock and the vrele() was locking the parent >> directory. This could cause a fairly rare deadlock. > > Yes, I understand the VFS deadlock. > > I see, I didn't realize the call was against the directory, > thank you for explaining. > > -Alfred Rick Any chance this will make it back into 7.3-RELEASE and 7.4-RELEASE ? -- mark saad | nonesuch@longcount.org From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 17:39:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F0B9106564A; Wed, 30 Nov 2011 17:39:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D07D8FC0A; Wed, 30 Nov 2011 17:39:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUHd12t007398; Wed, 30 Nov 2011 17:39:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUHd1o4007388; Wed, 30 Nov 2011 17:39:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111301739.pAUHd1o4007388@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 Nov 2011 17:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228156 - in head/sys: fs/nfsclient fs/nwfs fs/smbfs kern nfsclient vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 17:39:01 -0000 Author: kib Date: Wed Nov 30 17:39:00 2011 New Revision: 228156 URL: http://svn.freebsd.org/changeset/base/228156 Log: Rename vm_page_set_valid() to vm_page_set_valid_range(). The vm_page_set_valid() is the most reasonable name for the m->valid accessor. Reviewed by: attilio, alc Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nwfs/nwfs_io.c head/sys/fs/smbfs/smbfs_io.c head/sys/kern/uipc_shm.c head/sys/kern/vfs_bio.c head/sys/nfsclient/nfs_bio.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vnode_pager.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Nov 30 17:39:00 2011 (r228156) @@ -211,7 +211,7 @@ ncl_getpages(struct vop_getpages_args *a * Read operation filled a partial page. */ m->valid = 0; - vm_page_set_valid(m, 0, size - toff); + vm_page_set_valid_range(m, 0, size - toff); KASSERT(m->dirty == 0, ("nfs_getpages: page %p is dirty", m)); } else { Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/fs/nwfs/nwfs_io.c Wed Nov 30 17:39:00 2011 (r228156) @@ -452,7 +452,7 @@ nwfs_getpages(ap) ("nwfs_getpages: page %p is dirty", m)); } else { int nvalid = ((size + DEV_BSIZE - 1) - toff) & ~(DEV_BSIZE - 1); - vm_page_set_valid(m, 0, nvalid); + vm_page_set_valid_range(m, 0, nvalid); KASSERT((m->dirty & vm_page_bits(0, nvalid)) == 0, ("nwfs_getpages: page %p is dirty", m)); } Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/fs/smbfs/smbfs_io.c Wed Nov 30 17:39:00 2011 (r228156) @@ -509,7 +509,7 @@ smbfs_getpages(ap) * Read operation filled a partial page. */ m->valid = 0; - vm_page_set_valid(m, 0, size - toff); + vm_page_set_valid_range(m, 0, size - toff); KASSERT(m->dirty == 0, ("smbfs_getpages: page %p is dirty", m)); } else { Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/kern/uipc_shm.c Wed Nov 30 17:39:00 2011 (r228156) @@ -301,7 +301,7 @@ shm_dotruncate(struct shmfd *shmfd, off_ * have been zeroed. Some of these valid bits may * have already been set. */ - vm_page_set_valid(m, base, size); + vm_page_set_valid_range(m, base, size); /* * Round "base" to the next block boundary so that the Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/kern/vfs_bio.c Wed Nov 30 17:39:00 2011 (r228156) @@ -3499,7 +3499,7 @@ vfs_page_set_valid(struct buf *bp, vm_oo * entire page. */ if (eoff > off) - vm_page_set_valid(m, off & PAGE_MASK, eoff - off); + vm_page_set_valid_range(m, off & PAGE_MASK, eoff - off); } /* @@ -3662,7 +3662,7 @@ vfs_bio_set_valid(struct buf *bp, int ba m = bp->b_pages[i]; if (n > size) n = size; - vm_page_set_valid(m, base & PAGE_MASK, n); + vm_page_set_valid_range(m, base & PAGE_MASK, n); base += n; size -= n; n = PAGE_SIZE; Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/nfsclient/nfs_bio.c Wed Nov 30 17:39:00 2011 (r228156) @@ -206,7 +206,7 @@ nfs_getpages(struct vop_getpages_args *a * Read operation filled a partial page. */ m->valid = 0; - vm_page_set_valid(m, 0, size - toff); + vm_page_set_valid_range(m, 0, size - toff); KASSERT(m->dirty == 0, ("nfs_getpages: page %p is dirty", m)); } else { Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/vm/vm_page.c Wed Nov 30 17:39:00 2011 (r228156) @@ -2538,7 +2538,7 @@ vm_page_bits(int base, int size) } /* - * vm_page_set_valid: + * vm_page_set_valid_range: * * Sets portions of a page valid. The arguments are expected * to be DEV_BSIZE aligned but if they aren't the bitmap is inclusive @@ -2548,7 +2548,7 @@ vm_page_bits(int base, int size) * (base + size) must be less then or equal to PAGE_SIZE. */ void -vm_page_set_valid(vm_page_t m, int base, int size) +vm_page_set_valid_range(vm_page_t m, int base, int size) { int endoff, frag; @@ -2581,7 +2581,7 @@ vm_page_set_valid(vm_page_t m, int base, * is already dirty. */ KASSERT((~m->valid & vm_page_bits(base, size) & m->dirty) == 0, - ("vm_page_set_valid: page %p is dirty", m)); + ("vm_page_set_valid_range: page %p is dirty", m)); /* * Set valid bits inclusive of any overlap. Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/vm/vm_page.h Wed Nov 30 17:39:00 2011 (r228156) @@ -396,7 +396,7 @@ void vm_page_reference(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_requeue(vm_page_t m); -void vm_page_set_valid(vm_page_t m, int base, int size); +void vm_page_set_valid_range(vm_page_t m, int base, int size); void vm_page_sleep(vm_page_t m, const char *msg); vm_page_t vm_page_splay(vm_pindex_t, vm_page_t); vm_offset_t vm_page_startup(vm_offset_t vaddr); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Wed Nov 30 17:36:01 2011 (r228155) +++ head/sys/vm/vnode_pager.c Wed Nov 30 17:39:00 2011 (r228156) @@ -413,7 +413,7 @@ vnode_pager_setsize(vp, nsize) * have been zeroed. Some of these valid bits may * have already been set. */ - vm_page_set_valid(m, base, size); + vm_page_set_valid_range(m, base, size); /* * Round "base" to the next block boundary so that the @@ -964,7 +964,7 @@ vnode_pager_generic_getpages(vp, m, byte * we just try to clear the piece that we couldn't * read. */ - vm_page_set_valid(mt, 0, + vm_page_set_valid_range(mt, 0, object->un_pager.vnp.vnp_size - tfoff); KASSERT((mt->dirty & vm_page_bits(0, object->un_pager.vnp.vnp_size - tfoff)) == 0, From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 18:07:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D796F106566C; Wed, 30 Nov 2011 18:07:38 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62BC8FC12; Wed, 30 Nov 2011 18:07:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUI7caI008374; Wed, 30 Nov 2011 18:07:38 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUI7cXI008371; Wed, 30 Nov 2011 18:07:38 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111301807.pAUI7cXI008371@svn.freebsd.org> From: Max Khon Date: Wed, 30 Nov 2011 18:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228157 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 18:07:38 -0000 Author: fjoe Date: Wed Nov 30 18:07:38 2011 New Revision: 228157 URL: http://svn.freebsd.org/changeset/base/228157 Log: - Fix segmentation fault when running "+command" when run with -jX -n due to Compat_RunCommand() being called with `cmd' that is not on the node->commands list - Make ellipsis ("..." command) handling consistent: check for "..." command in job make after variables expansion to match compat make behavior - Fix empty command handling (after variables expansion and @+- modifiers are processed): now empty commands are ignored in compat make and are not printed in job make case - Bump MAKE_VERSION to 5-2011-11-30-0 Modified: head/usr.bin/make/Makefile head/usr.bin/make/job.c Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Wed Nov 30 17:39:00 2011 (r228156) +++ head/usr.bin/make/Makefile Wed Nov 30 18:07:38 2011 (r228157) @@ -10,7 +10,9 @@ SRCS= arch.c buf.c cond.c dir.c for.c ha NO_SHARED?= YES -CFLAGS+=-DMAKE_VERSION=\"5200408120\" +# Version has the RYYYYMMDDX format, where R is from RELENG_ +CFLAGS+=-DMAKE_VERSION=\"5201111300\" + # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Wed Nov 30 17:39:00 2011 (r228156) +++ head/usr.bin/make/job.c Wed Nov 30 18:07:38 2011 (r228157) @@ -381,7 +381,7 @@ static int JobStart(GNode *, int, Job *) static void JobDoOutput(Job *, Boolean); static void JobInterrupt(int, int); static void JobRestartJobs(void); -static int Compat_RunCommand(char *, struct GNode *); +static int Compat_RunCommand(LstNode *, struct GNode *); static GNode *curTarg = NULL; static GNode *ENDNode; @@ -647,7 +647,7 @@ JobPassSig(int signo) * numCommands is incremented if the command is actually printed. */ static int -JobPrintCommand(char *cmd, Job *job) +JobPrintCommand(LstNode *cmdNode, Job *job) { Boolean noSpecials; /* true if we shouldn't worry about * inserting special commands into @@ -658,40 +658,30 @@ JobPrintCommand(char *cmd, Job *job) * off before printing the command * and need to turn it back on */ const char *cmdTemplate;/* Template to use when printing the command */ - char *cmdStart; /* Start of expanded command */ - LstNode *cmdNode; /* Node for replacing the command */ + char *cmd; /* Expanded command */ noSpecials = (noExecute && !(job->node->type & OP_MAKE)); - if (strcmp(cmd, "...") == 0) { - job->node->type |= OP_SAVE_CMDS; - if ((job->flags & JOB_IGNDOTS) == 0) { - job->tailCmds = - Lst_Succ(Lst_Member(&job->node->commands, cmd)); - return (1); - } - return (0); - } - #define DBPRINTF(fmt, arg) \ DEBUGF(JOB, (fmt, arg)); \ fprintf(job->cmdFILE, fmt, arg); \ fflush(job->cmdFILE); - numCommands += 1; - /* * For debugging, we replace each command with the result of expanding * the variables in the command. */ - cmdNode = Lst_Member(&job->node->commands, cmd); - - cmd = Buf_Peel(Var_Subst(cmd, job->node, FALSE)); - cmdStart = cmd; - - Lst_Replace(cmdNode, cmdStart); - - cmdTemplate = "%s\n"; + cmd = Buf_Peel(Var_Subst(Lst_Datum(cmdNode), job->node, FALSE)); + if (strcmp(cmd, "...") == 0) { + free(cmd); + job->node->type |= OP_SAVE_CMDS; + if ((job->flags & JOB_IGNDOTS) == 0) { + job->tailCmds = Lst_Succ(cmdNode); + return (1); + } + return (0); + } + Lst_Replace(cmdNode, cmd); /* * Check for leading @', -' or +'s to control echoing, error checking, @@ -715,7 +705,7 @@ JobPrintCommand(char *cmd, Job *job) * but this one needs to be - use compat mode * just for it. */ - Compat_RunCommand(cmd, job->node); + Compat_RunCommand(cmdNode, job->node); return (0); } break; @@ -726,6 +716,16 @@ JobPrintCommand(char *cmd, Job *job) while (isspace((unsigned char)*cmd)) cmd++; + /* + * Ignore empty commands + */ + if (*cmd == '\0') { + return (0); + } + + cmdTemplate = "%s\n"; + numCommands += 1; + if (shutUp) { if (!(job->flags & JOB_SILENT) && !noSpecials && commandShell->hasEchoCtl) { @@ -1665,7 +1665,7 @@ JobStart(GNode *gn, int flags, Job *prev Lst_Succ(gn->compat_command); if (gn->compat_command == NULL || - JobPrintCommand(Lst_Datum(gn->compat_command), job)) + JobPrintCommand(gn->compat_command, job)) noExec = TRUE; if (noExec && !(job->flags & JOB_FIRST)) { @@ -1689,7 +1689,7 @@ JobStart(GNode *gn, int flags, Job *prev */ numCommands = 0; LST_FOREACH(ln, &gn->commands) { - if (JobPrintCommand(Lst_Datum(ln), job)) + if (JobPrintCommand(ln, job)) break; } @@ -1723,7 +1723,7 @@ JobStart(GNode *gn, int flags, Job *prev */ if (cmdsOK) { LST_FOREACH(ln, &gn->commands) { - if (JobPrintCommand(Lst_Datum(ln), job)) + if (JobPrintCommand(ln, job)) break; } } @@ -2809,7 +2809,7 @@ CompatInterrupt(int signo) gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); if (gn != NULL) { LST_FOREACH(ln, &gn->commands) { - if (Compat_RunCommand(Lst_Datum(ln), gn)) + if (Compat_RunCommand(ln, gn)) break; } } @@ -2884,16 +2884,15 @@ shellneed(ArgArray *aa, char *cmd) * The node's 'made' field may be set to ERROR. */ static int -Compat_RunCommand(char *cmd, GNode *gn) +Compat_RunCommand(LstNode *cmdNode, GNode *gn) { ArgArray aa; - char *cmdStart; /* Start of expanded command */ + char *cmd; /* Expanded command */ Boolean silent; /* Don't print command */ Boolean doit; /* Execute even in -n */ Boolean errCheck; /* Check errors */ int reason; /* Reason for child's death */ int status; /* Description of child's death */ - LstNode *cmdNode; /* Node where current cmd is located */ char **av; /* Argument vector for thing to exec */ ProcStuff ps; @@ -2901,31 +2900,16 @@ Compat_RunCommand(char *cmd, GNode *gn) errCheck = !(gn->type & OP_IGNORE); doit = FALSE; - cmdNode = Lst_Member(&gn->commands, cmd); - cmdStart = Buf_Peel(Var_Subst(cmd, gn, FALSE)); - - /* - * brk_string will return an argv with a NULL in av[0], thus causing - * execvp() to choke and die horribly. Besides, how can we execute a - * null command? In any case, we warn the user that the command - * expanded to nothing (is this the right thing to do?). - */ - if (*cmdStart == '\0') { - free(cmdStart); - Error("%s expands to empty string", cmd); - return (0); - } else { - cmd = cmdStart; - } - Lst_Replace(cmdNode, cmdStart); - + cmd = Buf_Peel(Var_Subst(Lst_Datum(cmdNode), gn, FALSE)); if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { - Lst_AtEnd(&ENDNode->commands, cmdStart); + Lst_AtEnd(&ENDNode->commands, cmd); return (0); - } else if (strcmp(cmdStart, "...") == 0) { + } else if (strcmp(cmd, "...") == 0) { + free(cmd); gn->type |= OP_SAVE_CMDS; return (0); } + Lst_Replace(cmdNode, cmd); while (*cmd == '@' || *cmd == '-' || *cmd == '+') { switch (*cmd) { @@ -2949,6 +2933,13 @@ Compat_RunCommand(char *cmd, GNode *gn) cmd++; /* + * Ignore empty commands + */ + if (*cmd == '\0') { + return (0); + } + + /* * Print the command before echoing if we're not supposed to be quiet * for this one. We also print the command if -n given, but not if '+'. */ @@ -3022,7 +3013,8 @@ Compat_RunCommand(char *cmd, GNode *gn) * therefore do not free it when debugging. */ if (!DEBUG(GRAPH2)) { - free(cmdStart); + free(Lst_Datum(cmdNode)); + Lst_Replace(cmdNode, NULL); } /* @@ -3166,8 +3158,7 @@ Compat_Make(GNode *gn, GNode *pgn) if (!touchFlag) { curTarg = gn; LST_FOREACH(ln, &gn->commands) { - if (Compat_RunCommand(Lst_Datum(ln), - gn)) + if (Compat_RunCommand(ln, gn)) break; } curTarg = NULL; @@ -3345,7 +3336,7 @@ Compat_Run(Lst *targs) gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); if (gn != NULL) { LST_FOREACH(ln, &gn->commands) { - if (Compat_RunCommand(Lst_Datum(ln), gn)) + if (Compat_RunCommand(ln, gn)) break; } if (gn->made == ERROR) { @@ -3386,7 +3377,7 @@ Compat_Run(Lst *targs) */ if (makeErrors == 0) { LST_FOREACH(ln, &ENDNode->commands) { - if (Compat_RunCommand(Lst_Datum(ln), ENDNode)) + if (Compat_RunCommand(ln, ENDNode)) break; } } From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 18:11:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1B9F106566B; Wed, 30 Nov 2011 18:11:49 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C08018FC17; Wed, 30 Nov 2011 18:11:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUIBn01008547; Wed, 30 Nov 2011 18:11:49 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUIBnr6008539; Wed, 30 Nov 2011 18:11:49 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111301811.pAUIBnr6008539@svn.freebsd.org> From: Max Khon Date: Wed, 30 Nov 2011 18:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228158 - in head: . share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 18:11:49 -0000 Author: fjoe Date: Wed Nov 30 18:11:49 2011 New Revision: 228158 URL: http://svn.freebsd.org/changeset/base/228158 Log: - CTF knob is now implemented using common scheme: MK_CTF=yes/no is defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF, NO_CTF overrides WITH_CTF (used by Makefile.inc1) - CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string if make(1) can handle empty commands Modified: head/Makefile.inc1 head/share/mk/bsd.lib.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 30 18:07:38 2011 (r228157) +++ head/Makefile.inc1 Wed Nov 30 18:11:49 2011 (r228158) @@ -59,8 +59,6 @@ SUBDIR+=games .endif .if ${MK_CDDL} != "no" SUBDIR+=cddl -.else -NO_CTF=1 .endif SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Wed Nov 30 18:07:38 2011 (r228157) +++ head/share/mk/bsd.lib.mk Wed Nov 30 18:11:49 2011 (r228158) @@ -36,7 +36,7 @@ NO_WERROR= .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} -.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "") +.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" CTFFLAGS+= -g .endif .endif @@ -186,7 +186,7 @@ ${SHLIB_NAME}: ${SOBJS} -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif -.if defined(WITH_CTF) +.if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} .endif .endif Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Nov 30 18:07:38 2011 (r228157) +++ head/share/mk/bsd.own.mk Wed Nov 30 18:11:49 2011 (r228158) @@ -189,12 +189,6 @@ STRIP?= -s COMPRESS_CMD?= gzip -cn COMPRESS_EXT?= .gz -.if defined(WITH_CTF) -CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.else -CTFCONVERT_CMD= @: -.endif - .if !defined(_WITHOUT_SRCCONF) # # Define MK_* variables (which are either "yes" or "no") for users @@ -209,6 +203,7 @@ CTFCONVERT_CMD= @: # regardless of user's setting). # .for var in \ + CTF \ INSTALLLIB \ MAN \ PROFILE @@ -418,6 +413,7 @@ __DEFAULT_NO_OPTIONS = \ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ + CTF \ HESIOD \ ICONV \ IDEA \ @@ -516,6 +512,7 @@ MK_BIND_ETC:= no .if ${MK_CDDL} == "no" MK_ZFS:= no +MK_CTF:= no .endif .if ${MK_CRYPT} == "no" @@ -616,6 +613,14 @@ MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor +.if ${MK_CTF} != "no" +CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.elif ${MAKE_VERSION} >= 5201111300 +CTFCONVERT_CMD= +.else +CTFCONVERT_CMD= @: +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target(____) Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Wed Nov 30 18:07:38 2011 (r228157) +++ head/share/mk/bsd.prog.mk Wed Nov 30 18:11:49 2011 (r228158) @@ -19,7 +19,7 @@ NO_WERROR= CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} -.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "") +.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" CTFFLAGS+= -g .endif .endif @@ -55,7 +55,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if defined(WITH_CTF) +.if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif @@ -85,7 +85,7 @@ ${PROG}: ${OBJS} .else ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.if defined(WITH_CTF) +.if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .endif Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Wed Nov 30 18:07:38 2011 (r228157) +++ head/sys/conf/kern.post.mk Wed Nov 30 18:11:49 2011 (r228158) @@ -94,7 +94,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o @rm -f ${.TARGET} @echo linking ${.TARGET} ${SYSTEM_LD} -.if defined(WITH_CTF) +.if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o .endif .if !defined(DEBUG) @@ -249,7 +249,7 @@ kernel-reinstall: config.o env.o hints.o vers.o vnode_if.o: ${NORMAL_C} - @${NORMAL_CTFCONVERT} + ${NORMAL_CTFCONVERT} config.ln env.ln hints.ln vers.ln vnode_if.ln: ${NORMAL_LINT} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Wed Nov 30 18:07:38 2011 (r228157) +++ head/sys/conf/kern.pre.mk Wed Nov 30 18:11:49 2011 (r228158) @@ -123,10 +123,12 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -.if defined(WITH_CTF) +.if ${MK_CTF} != "no" NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +.elif ${MAKE_VERSION} >= 5201111300 +NORMAL_CTFCONVERT= .else -NORMAL_CTFCONVERT= : +NORMAL_CTFCONVERT= @: .endif NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Wed Nov 30 18:07:38 2011 (r228157) +++ head/sys/conf/kmod.mk Wed Nov 30 18:11:49 2011 (r228158) @@ -201,7 +201,7 @@ ${KMOD}.kld: ${OBJS} ${FULLPROG}: ${OBJS} .endif ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} -.if defined(WITH_CTF) +.if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} .endif .if defined(EXPORT_SYMS) From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 18:22:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAA2B1065670; Wed, 30 Nov 2011 18:22:44 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9D3C8FC13; Wed, 30 Nov 2011 18:22:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUIMiIi008912; Wed, 30 Nov 2011 18:22:44 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUIMi8a008911; Wed, 30 Nov 2011 18:22:44 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111301822.pAUIMi8a008911@svn.freebsd.org> From: Max Khon Date: Wed, 30 Nov 2011 18:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228159 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 18:22:45 -0000 Author: fjoe Date: Wed Nov 30 18:22:44 2011 New Revision: 228159 URL: http://svn.freebsd.org/changeset/base/228159 Log: Add WITH_CTF description. Added: head/tools/build/options/WITH_CTF (contents, props changed) Added: head/tools/build/options/WITH_CTF ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_CTF Wed Nov 30 18:22:44 2011 (r228159) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to compile with CTF (Compact C Type Format) data. +CTF data encapsulates a reduced form of debugging information +similar to DWARF and the venerable stabs and is required for DTrace. From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 18:24:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3102D106564A; Wed, 30 Nov 2011 18:24:44 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 202848FC18; Wed, 30 Nov 2011 18:24:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUIOiY5009008; Wed, 30 Nov 2011 18:24:44 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUIOiEk009006; Wed, 30 Nov 2011 18:24:44 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201111301824.pAUIOiEk009006@svn.freebsd.org> From: Max Khon Date: Wed, 30 Nov 2011 18:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228160 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 18:24:44 -0000 Author: fjoe Date: Wed Nov 30 18:24:43 2011 New Revision: 228160 URL: http://svn.freebsd.org/changeset/base/228160 Log: Regen. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Nov 30 18:22:44 2011 (r228159) +++ head/share/man/man5/src.conf.5 Wed Nov 30 18:24:43 2011 (r228160) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd November 28, 2011 +.Dd December 1, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -258,6 +258,8 @@ When set, it also enforces the following .Pp .Bl -item -compact .It +.Va WITHOUT_CTF +.It .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG @@ -300,6 +302,11 @@ When set, the following options are also .Va WITH_GSSAPI is set explicitly) .El +.It Va WITH_CTF +.\" $FreeBSD$ +Set to compile with CTF (Compact C Type Format) data. +CTF data encapsulates a reduced form of debugging information +similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM .\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build @@ -813,9 +820,9 @@ and related files. Set to not build .Xr ppp 8 and related programs. -.It Va WITHOUT_PROFILE -.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 156932 2006-03-21 07:50:50Z ru -Set to avoid compiling profiled libraries. +.It Va WITH_PROFILE +.\" from FreeBSD: head/tools/build/options/WITH_PROFILE 228143 2011-11-29 19:46:17Z fjoe +Set to build profiled libraries. .It Va WITHOUT_QUOTAS .\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam Set to not build From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 18:33:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 853CE106567A; Wed, 30 Nov 2011 18:33:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7474D8FC20; Wed, 30 Nov 2011 18:33:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUIXNpZ009308; Wed, 30 Nov 2011 18:33:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUIXNDb009306; Wed, 30 Nov 2011 18:33:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111301833.pAUIXNDb009306@svn.freebsd.org> From: John Baldwin Date: Wed, 30 Nov 2011 18:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228161 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 18:33:23 -0000 Author: jhb Date: Wed Nov 30 18:33:23 2011 New Revision: 228161 URL: http://svn.freebsd.org/changeset/base/228161 Log: Add a constant for the Advisory Non-Fatal Error bit in AER corrected error status and mask. Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Wed Nov 30 18:24:43 2011 (r228160) +++ head/sys/dev/pci/pcireg.h Wed Nov 30 18:33:23 2011 (r228161) @@ -715,6 +715,7 @@ #define PCIM_AER_COR_BAD_DLLP 0x00000080 #define PCIM_AER_COR_REPLAY_ROLLOVER 0x00000100 #define PCIM_AER_COR_REPLAY_TIMEOUT 0x00001000 +#define PCIM_AER_COR_ADVISORY_NF_ERROR 0x00002000 #define PCIR_AER_COR_MASK 0x14 /* Shares bits with COR_STATUS */ #define PCIR_AER_CAP_CONTROL 0x18 #define PCIM_AER_FIRST_ERROR_PTR 0x0000001f From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 18:52:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09E611065670; Wed, 30 Nov 2011 18:52:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED2A98FC0A; Wed, 30 Nov 2011 18:52:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUIqUaQ009895; Wed, 30 Nov 2011 18:52:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUIqUwT009893; Wed, 30 Nov 2011 18:52:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111301852.pAUIqUwT009893@svn.freebsd.org> From: John Baldwin Date: Wed, 30 Nov 2011 18:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228162 - head/sys/xen/evtchn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 18:52:31 -0000 Author: jhb Date: Wed Nov 30 18:52:30 2011 New Revision: 228162 URL: http://svn.freebsd.org/changeset/base/228162 Log: Use C99 initializers for members of evtchn_devsw. Submitted by: arundel Modified: head/sys/xen/evtchn/evtchn_dev.c Modified: head/sys/xen/evtchn/evtchn_dev.c ============================================================================== --- head/sys/xen/evtchn/evtchn_dev.c Wed Nov 30 18:33:23 2011 (r228161) +++ head/sys/xen/evtchn/evtchn_dev.c Wed Nov 30 18:52:30 2011 (r228162) @@ -318,15 +318,14 @@ evtchn_close(struct cdev *dev, int flag, } static struct cdevsw evtchn_devsw = { - d_version: D_VERSION, - d_open: evtchn_open, - d_close: evtchn_close, - d_read: evtchn_read, - d_write: evtchn_write, - d_ioctl: evtchn_ioctl, - d_poll: evtchn_poll, - d_name: "evtchn", - d_flags: 0, + .d_version = D_VERSION, + .d_open = evtchn_open, + .d_close = evtchn_close, + .d_read = evtchn_read, + .d_write = evtchn_write, + .d_ioctl = evtchn_ioctl, + .d_poll = evtchn_poll, + .d_name = "evtchn", }; From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 20:08:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BECF106566C; Wed, 30 Nov 2011 20:08:31 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B5788FC0A; Wed, 30 Nov 2011 20:08:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAUK8Vvu012234; Wed, 30 Nov 2011 20:08:31 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAUK8VM2012232; Wed, 30 Nov 2011 20:08:31 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201111302008.pAUK8VM2012232@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 30 Nov 2011 20:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228163 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 20:08:31 -0000 Author: jh Date: Wed Nov 30 20:08:30 2011 New Revision: 228163 URL: http://svn.freebsd.org/changeset/base/228163 Log: Add an entry for r227823. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Nov 30 18:52:30 2011 (r228162) +++ head/UPDATING Wed Nov 30 20:08:30 2011 (r228163) @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20111122: + The acpi_wmi(4) status device /dev/wmistat has been renamed to + /dev/wmistat0. + 20111108: The option VFS_ALLOW_NONMPSAFE option has been added in order to explicitely support non-MPSAFE filesystems. From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 21:32:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F7441065673; Wed, 30 Nov 2011 21:32:29 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qw0-f47.google.com (mail-qw0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 122648FC0C; Wed, 30 Nov 2011 21:32:28 +0000 (UTC) Received: by qaea17 with SMTP id a17so4043824qae.13 for ; Wed, 30 Nov 2011 13:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0JNHAVmCM1gQv6tYePdn88W0YgyODKK1EasOL7f7L+U=; b=JqDgp0YfQnWm6pxaGOVt9uQ97kR4pPXfIM8vAfRzInQWIqizf7Cs+i24eC7wGTF5zD BvO+VF7v2Hh5G5UBtwPmpIoIdP7jURACLvkX9m89bTz3UTBDO9E7OQFgUevXR0ixXjoF KD6PSMpo88mvl2xHZ52CB5JiFgf9lfw8LMM98= MIME-Version: 1.0 Received: by 10.229.66.152 with SMTP id n24mr646294qci.218.1322686872222; Wed, 30 Nov 2011 13:01:12 -0800 (PST) Sender: giovanni.trematerra@gmail.com Received: by 10.229.13.6 with HTTP; Wed, 30 Nov 2011 13:01:12 -0800 (PST) In-Reply-To: <201110051656.p95Gu6Cw020744@svn.freebsd.org> References: <201110051656.p95Gu6Cw020744@svn.freebsd.org> Date: Wed, 30 Nov 2011 22:01:12 +0100 X-Google-Sender-Auth: 5LumlJGl0nsEtYfZSCTc7od8SyY Message-ID: From: Giovanni Trematerra To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, peterjeremy@acm.org, John Baldwin , svn-src-all@freebsd.org, Attilio Rao , svn-src-head@freebsd.org, Jeff Roberson Subject: Re: svn commit: r226042 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 21:32:29 -0000 On Wed, Oct 5, 2011 at 6:56 PM, Konstantin Belousov wrote= : > Author: kib > Date: Wed Oct =A05 16:56:06 2011 > New Revision: 226042 > URL: http://svn.freebsd.org/changeset/base/226042 > > Log: > =A0Supply unique (st_dev, st_ino) value pair for the fstat(2) done on the= pipes. > > =A0Reviewed by: =A0jhb, Peter Jeremy > =A0MFC after: =A0 =A02 weeks > > Modified: > =A0head/sys/kern/sys_pipe.c > =A0head/sys/sys/pipe.h > Hi Konstantin, unfortunately your commit introduces a performance penalty of about 3% documented below in a real workload. I guess that fstat(2) on the pipes is seldom used so we could just be lazy and alloc a new unr number inside pipe_stat instead of during pipe creation= . In that case if an application doesn't need fstat(2) on the pipes it won't be charged the cost of alloc_unr/free_unr for the fake inode number. The patch I propose, furthermore, fix a panic in the case alloc_unr failed to allocate a new unr number and return -1. This is because ino_t is unsigned and the t= est pipe_ino > 0 into pipeclose would be true, calling then free_unr when it hasn't to. The proposed patch was tested with a regression test code that you can find= here http://www.trematerra.net/patches/pipe-fstat.c Feel free to add it under tools/regression/pipe/ Here the proposed patch: http://www.trematerra.net/patches/lazy_inoalloc.diff Here the report of the benchmark: Configuration 10.0-CURRENT updated to r22807. kern.smp.disabled=3D1 in /boot/loader.conf kernel config GENERIC without debugging options. The first result of any test was discarded and not reported here. here the result of three executions of # make -s buildkernel note that I managed to compile the same identical source files for all the tests. r22807 with r226042 reverted (time in seconds) 527, 527, 527 r22807 (time in seconds) 544, 544, 544 r22807M with the proposed patch (time in seconds) 527, 528, 528 ministat output: x r22807 with r226042 reverted + r22807 * r22807M with the proposed patch +--------------------------------------------------------------------------= ----+ |+ * = x| |* * = x| ||__A_M| = A| +--------------------------------------------------------------------------= ----+ N Min Max Median Avg Stddev x 3 544 544 544 544 0 + 3 527 527 527 527 0 Difference at 95.0% confidence -17 +/- 0 -3.125% +/- 0% (Student's t, pooled s =3D 0) * 3 527 528 528 527.66667 0.57735027 Difference at 95.0% confidence -16.3333 +/- 0.925333 -3.00245% +/- 0.170098% (Student's t, pooled s =3D 0.408248) -- Gianni From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 22:53:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FDCE106564A; Wed, 30 Nov 2011 22:53:48 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id CF0218FC15; Wed, 30 Nov 2011 22:53:46 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAPmy1k6DaFvO/2dsb2JhbABEhQOnFIFyAQEFI1YbDgoCAg0ZAlkGE68BkU+BMII9hh2BFgSIKIwvki4 X-IronPort-AV: E=Sophos;i="4.71,273,1320642000"; d="scan'208";a="147739852" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 30 Nov 2011 17:52:21 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id C7C15B3F10; Wed, 30 Nov 2011 17:52:21 -0500 (EST) Date: Wed, 30 Nov 2011 17:52:21 -0500 (EST) From: Rick Macklem To: Mark Saad Message-ID: <1769030615.700252.1322693541806.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-stable-7@freebsd.org, Rick Macklem Subject: Re: svn commit: r227549 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 22:53:48 -0000 Mark Saad wrote: > On Thu, Nov 17, 2011 at 1:36 PM, Alfred Perlstein > wrote: > > * Rick Macklem [111116 21:16] wrote: > >> Alfred Perlstein wrote: > >> > Rick, I have a question, what will happen if the > >> > nfs_freesillyrename() > >> > call happens when the mount is down? Will it block the > >> > taskqueue_thread? > >> > > >> > If so, it might make more sense to make a taskqueue per mount > >> > point. > >> > > >> > If not, excuse me. :-) > >> > > >> Well, all nfs_freesillyrename() does is a vrele() on the parent > >> directory when the file node's use count has gone to 0. > >> I can't think why that would do any RPC, so I don't see a problem? > >> If you do see a problem with vrele() on the directory, please let > >> me > >> know. > >> > >> The problem this fixes is a LOR that would occur when the vrele() > >> on > >> the directory was done by the thread doing VOP_INACTIVE(), since it > >> already has the file vnode lock and the vrele() was locking the > >> parent > >> directory. This could cause a fairly rare deadlock. > > > > Yes, I understand the VFS deadlock. > > > > I see, I didn't realize the call was against the directory, > > thank you for explaining. > > > > -Alfred > Rick > Any chance this will make it back into 7.3-RELEASE and 7.4-RELEASE ? > I'm relatively new to FreeBSD, but I've never heard of an MFC to a Release branch. (As far as I know, if it ever happens, it's for a serious errata or security issue.) Unless I'm incorrect (someone please correct me if I'm wrong), the answer would be no, rick. > > -- > mark saad | nonesuch@longcount.org From owner-svn-src-all@FreeBSD.ORG Wed Nov 30 23:10:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 4A7531065676; Wed, 30 Nov 2011 23:10:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 90D2314E6AB; Wed, 30 Nov 2011 23:10:02 +0000 (UTC) Message-ID: <4ED6B7CA.7050108@FreeBSD.org> Date: Wed, 30 Nov 2011 15:10:02 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Rick Macklem References: <1769030615.700252.1322693541806.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <1769030615.700252.1322693541806.JavaMail.root@erie.cs.uoguelph.ca> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, Mark Saad , Alfred Perlstein , svn-src-stable-7@freebsd.org, Rick Macklem , svn-src-all@freebsd.org Subject: Re: svn commit: r227549 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 23:10:03 -0000 On 11/30/2011 14:52, Rick Macklem wrote: > I'm relatively new to FreeBSD, but I've never heard of an MFC to a > Release branch. (As far as I know, if it ever happens, it's for a > serious errata or security issue.) You are correct sir. :) -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 00:16:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 99CD11065676; Thu, 1 Dec 2011 00:16:46 +0000 (UTC) Date: Thu, 1 Dec 2011 00:16:46 +0000 From: Alexander Best To: Max Khon Message-ID: <20111201001646.GA49249@freebsd.org> References: <201111301807.pAUI7cXI008371@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111301807.pAUI7cXI008371@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228157 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 00:16:46 -0000 On Wed Nov 30 11, Max Khon wrote: > Author: fjoe > Date: Wed Nov 30 18:07:38 2011 > New Revision: 228157 > URL: http://svn.freebsd.org/changeset/base/228157 > > Log: > - Fix segmentation fault when running "+command" when run with -jX -n due > to Compat_RunCommand() being called with `cmd' that is not on the node->commands > list > - Make ellipsis ("..." command) handling consistent: check for "..." command > in job make after variables expansion to match compat make behavior > - Fix empty command handling (after variables expansion and @+- modifiers > are processed): now empty commands are ignored in compat make and are not > printed in job make case > - Bump MAKE_VERSION to 5-2011-11-30-0 it would also be nice, if at some point, somebody could dive into the code to see why 'make buildkernel' will let clang produce coloured output, but 'make -j(N>1) buildkernel' doesn't (and why adding a -B switch to that command fixes it). cheers. alex > > Modified: > head/usr.bin/make/Makefile > head/usr.bin/make/job.c > > Modified: head/usr.bin/make/Makefile > ============================================================================== > --- head/usr.bin/make/Makefile Wed Nov 30 17:39:00 2011 (r228156) > +++ head/usr.bin/make/Makefile Wed Nov 30 18:07:38 2011 (r228157) > @@ -10,7 +10,9 @@ SRCS= arch.c buf.c cond.c dir.c for.c ha > > NO_SHARED?= YES > > -CFLAGS+=-DMAKE_VERSION=\"5200408120\" > +# Version has the RYYYYMMDDX format, where R is from RELENG_ > +CFLAGS+=-DMAKE_VERSION=\"5201111300\" > + > # There is no obvious performance improvement currently. > # CFLAGS+=-DUSE_KQUEUE > > > Modified: head/usr.bin/make/job.c > ============================================================================== > --- head/usr.bin/make/job.c Wed Nov 30 17:39:00 2011 (r228156) > +++ head/usr.bin/make/job.c Wed Nov 30 18:07:38 2011 (r228157) > @@ -381,7 +381,7 @@ static int JobStart(GNode *, int, Job *) > static void JobDoOutput(Job *, Boolean); > static void JobInterrupt(int, int); > static void JobRestartJobs(void); > -static int Compat_RunCommand(char *, struct GNode *); > +static int Compat_RunCommand(LstNode *, struct GNode *); > > static GNode *curTarg = NULL; > static GNode *ENDNode; > @@ -647,7 +647,7 @@ JobPassSig(int signo) > * numCommands is incremented if the command is actually printed. > */ > static int > -JobPrintCommand(char *cmd, Job *job) > +JobPrintCommand(LstNode *cmdNode, Job *job) > { > Boolean noSpecials; /* true if we shouldn't worry about > * inserting special commands into > @@ -658,40 +658,30 @@ JobPrintCommand(char *cmd, Job *job) > * off before printing the command > * and need to turn it back on */ > const char *cmdTemplate;/* Template to use when printing the command */ > - char *cmdStart; /* Start of expanded command */ > - LstNode *cmdNode; /* Node for replacing the command */ > + char *cmd; /* Expanded command */ > > noSpecials = (noExecute && !(job->node->type & OP_MAKE)); > > - if (strcmp(cmd, "...") == 0) { > - job->node->type |= OP_SAVE_CMDS; > - if ((job->flags & JOB_IGNDOTS) == 0) { > - job->tailCmds = > - Lst_Succ(Lst_Member(&job->node->commands, cmd)); > - return (1); > - } > - return (0); > - } > - > #define DBPRINTF(fmt, arg) \ > DEBUGF(JOB, (fmt, arg)); \ > fprintf(job->cmdFILE, fmt, arg); \ > fflush(job->cmdFILE); > > - numCommands += 1; > - > /* > * For debugging, we replace each command with the result of expanding > * the variables in the command. > */ > - cmdNode = Lst_Member(&job->node->commands, cmd); > - > - cmd = Buf_Peel(Var_Subst(cmd, job->node, FALSE)); > - cmdStart = cmd; > - > - Lst_Replace(cmdNode, cmdStart); > - > - cmdTemplate = "%s\n"; > + cmd = Buf_Peel(Var_Subst(Lst_Datum(cmdNode), job->node, FALSE)); > + if (strcmp(cmd, "...") == 0) { > + free(cmd); > + job->node->type |= OP_SAVE_CMDS; > + if ((job->flags & JOB_IGNDOTS) == 0) { > + job->tailCmds = Lst_Succ(cmdNode); > + return (1); > + } > + return (0); > + } > + Lst_Replace(cmdNode, cmd); > > /* > * Check for leading @', -' or +'s to control echoing, error checking, > @@ -715,7 +705,7 @@ JobPrintCommand(char *cmd, Job *job) > * but this one needs to be - use compat mode > * just for it. > */ > - Compat_RunCommand(cmd, job->node); > + Compat_RunCommand(cmdNode, job->node); > return (0); > } > break; > @@ -726,6 +716,16 @@ JobPrintCommand(char *cmd, Job *job) > while (isspace((unsigned char)*cmd)) > cmd++; > > + /* > + * Ignore empty commands > + */ > + if (*cmd == '\0') { > + return (0); > + } > + > + cmdTemplate = "%s\n"; > + numCommands += 1; > + > if (shutUp) { > if (!(job->flags & JOB_SILENT) && !noSpecials && > commandShell->hasEchoCtl) { > @@ -1665,7 +1665,7 @@ JobStart(GNode *gn, int flags, Job *prev > Lst_Succ(gn->compat_command); > > if (gn->compat_command == NULL || > - JobPrintCommand(Lst_Datum(gn->compat_command), job)) > + JobPrintCommand(gn->compat_command, job)) > noExec = TRUE; > > if (noExec && !(job->flags & JOB_FIRST)) { > @@ -1689,7 +1689,7 @@ JobStart(GNode *gn, int flags, Job *prev > */ > numCommands = 0; > LST_FOREACH(ln, &gn->commands) { > - if (JobPrintCommand(Lst_Datum(ln), job)) > + if (JobPrintCommand(ln, job)) > break; > } > > @@ -1723,7 +1723,7 @@ JobStart(GNode *gn, int flags, Job *prev > */ > if (cmdsOK) { > LST_FOREACH(ln, &gn->commands) { > - if (JobPrintCommand(Lst_Datum(ln), job)) > + if (JobPrintCommand(ln, job)) > break; > } > } > @@ -2809,7 +2809,7 @@ CompatInterrupt(int signo) > gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); > if (gn != NULL) { > LST_FOREACH(ln, &gn->commands) { > - if (Compat_RunCommand(Lst_Datum(ln), gn)) > + if (Compat_RunCommand(ln, gn)) > break; > } > } > @@ -2884,16 +2884,15 @@ shellneed(ArgArray *aa, char *cmd) > * The node's 'made' field may be set to ERROR. > */ > static int > -Compat_RunCommand(char *cmd, GNode *gn) > +Compat_RunCommand(LstNode *cmdNode, GNode *gn) > { > ArgArray aa; > - char *cmdStart; /* Start of expanded command */ > + char *cmd; /* Expanded command */ > Boolean silent; /* Don't print command */ > Boolean doit; /* Execute even in -n */ > Boolean errCheck; /* Check errors */ > int reason; /* Reason for child's death */ > int status; /* Description of child's death */ > - LstNode *cmdNode; /* Node where current cmd is located */ > char **av; /* Argument vector for thing to exec */ > ProcStuff ps; > > @@ -2901,31 +2900,16 @@ Compat_RunCommand(char *cmd, GNode *gn) > errCheck = !(gn->type & OP_IGNORE); > doit = FALSE; > > - cmdNode = Lst_Member(&gn->commands, cmd); > - cmdStart = Buf_Peel(Var_Subst(cmd, gn, FALSE)); > - > - /* > - * brk_string will return an argv with a NULL in av[0], thus causing > - * execvp() to choke and die horribly. Besides, how can we execute a > - * null command? In any case, we warn the user that the command > - * expanded to nothing (is this the right thing to do?). > - */ > - if (*cmdStart == '\0') { > - free(cmdStart); > - Error("%s expands to empty string", cmd); > - return (0); > - } else { > - cmd = cmdStart; > - } > - Lst_Replace(cmdNode, cmdStart); > - > + cmd = Buf_Peel(Var_Subst(Lst_Datum(cmdNode), gn, FALSE)); > if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { > - Lst_AtEnd(&ENDNode->commands, cmdStart); > + Lst_AtEnd(&ENDNode->commands, cmd); > return (0); > - } else if (strcmp(cmdStart, "...") == 0) { > + } else if (strcmp(cmd, "...") == 0) { > + free(cmd); > gn->type |= OP_SAVE_CMDS; > return (0); > } > + Lst_Replace(cmdNode, cmd); > > while (*cmd == '@' || *cmd == '-' || *cmd == '+') { > switch (*cmd) { > @@ -2949,6 +2933,13 @@ Compat_RunCommand(char *cmd, GNode *gn) > cmd++; > > /* > + * Ignore empty commands > + */ > + if (*cmd == '\0') { > + return (0); > + } > + > + /* > * Print the command before echoing if we're not supposed to be quiet > * for this one. We also print the command if -n given, but not if '+'. > */ > @@ -3022,7 +3013,8 @@ Compat_RunCommand(char *cmd, GNode *gn) > * therefore do not free it when debugging. > */ > if (!DEBUG(GRAPH2)) { > - free(cmdStart); > + free(Lst_Datum(cmdNode)); > + Lst_Replace(cmdNode, NULL); > } > > /* > @@ -3166,8 +3158,7 @@ Compat_Make(GNode *gn, GNode *pgn) > if (!touchFlag) { > curTarg = gn; > LST_FOREACH(ln, &gn->commands) { > - if (Compat_RunCommand(Lst_Datum(ln), > - gn)) > + if (Compat_RunCommand(ln, gn)) > break; > } > curTarg = NULL; > @@ -3345,7 +3336,7 @@ Compat_Run(Lst *targs) > gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); > if (gn != NULL) { > LST_FOREACH(ln, &gn->commands) { > - if (Compat_RunCommand(Lst_Datum(ln), gn)) > + if (Compat_RunCommand(ln, gn)) > break; > } > if (gn->made == ERROR) { > @@ -3386,7 +3377,7 @@ Compat_Run(Lst *targs) > */ > if (makeErrors == 0) { > LST_FOREACH(ln, &ENDNode->commands) { > - if (Compat_RunCommand(Lst_Datum(ln), ENDNode)) > + if (Compat_RunCommand(ln, ENDNode)) > break; > } > } From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 00:59:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 29A621065672; Thu, 1 Dec 2011 00:59:32 +0000 (UTC) Date: Thu, 1 Dec 2011 00:59:32 +0000 From: Alexander Best To: John Baldwin Message-ID: <20111201005932.GA54417@freebsd.org> References: <201111292128.pATLSnKr067459@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111292128.pATLSnKr067459@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228148 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 00:59:32 -0000 On Tue Nov 29 11, John Baldwin wrote: > Author: jhb > Date: Tue Nov 29 21:28:48 2011 > New Revision: 228148 > URL: http://svn.freebsd.org/changeset/base/228148 > > Log: > Remove a bit of debugging that accidentally crept in earlier. > > Modified: > head/sys/conf/newvers.sh > > Modified: head/sys/conf/newvers.sh > ============================================================================== > --- head/sys/conf/newvers.sh Tue Nov 29 20:06:27 2011 (r228147) > +++ head/sys/conf/newvers.sh Tue Nov 29 21:28:48 2011 (r228148) > @@ -99,7 +99,6 @@ for dir in /bin /usr/bin /usr/local/bin; > done > > if [ -n "$svnversion" ] ; then > - echo "$svnversion" > svn=`cd ${SYSDIR} && $svnversion` any chance we could replace $svnversion with something like the following: 'svn info|grep ^Revision|sed 's/^Revision: //'' ? this is much faster and the only downside seems to be the missing {MSP} at the end. running a standard hdd, svnversion takes almost half a minute, while the command above finishes in < 0.1 seconds. cheers. alex > case "$svn" in > [0-9]*) svn=" r${svn}" ;; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 01:18:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751D2106566C; Thu, 1 Dec 2011 01:18:21 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id E03978FC15; Thu, 1 Dec 2011 01:18:20 +0000 (UTC) Received: by ywp17 with SMTP id 17so2011628ywp.13 for ; Wed, 30 Nov 2011 17:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=q6zvgi0ZOpZfIeEjkJ7VfXaivGNrajCBK5YZcC44Ebo=; b=j7jo6cF9dTXsGjGZB9//fGgh7mBZCybf7uzXBiEVi552egQcHFnGDqT3LF0FZoEzzE xdPZgGTQT8ozX4cSkYKRWJhHiWuPDTv0NB3wHyUsl2kI1GQRmyNkBINen59Ggcp//S7f wo45xmwSzAn2GzGT81r+uGYrF3SePtjw799RA= MIME-Version: 1.0 Received: by 10.182.218.100 with SMTP id pf4mr1024544obc.12.1322702300351; Wed, 30 Nov 2011 17:18:20 -0800 (PST) Received: by 10.182.62.227 with HTTP; Wed, 30 Nov 2011 17:18:20 -0800 (PST) In-Reply-To: <20111201005932.GA54417@freebsd.org> References: <201111292128.pATLSnKr067459@svn.freebsd.org> <20111201005932.GA54417@freebsd.org> Date: Wed, 30 Nov 2011 17:18:20 -0800 Message-ID: From: Garrett Cooper To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r228148 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 01:18:21 -0000 On Wed, Nov 30, 2011 at 4:59 PM, Alexander Best wrote= : > On Tue Nov 29 11, John Baldwin wrote: >> Author: jhb >> Date: Tue Nov 29 21:28:48 2011 >> New Revision: 228148 >> URL: http://svn.freebsd.org/changeset/base/228148 >> >> Log: >> =A0 Remove a bit of debugging that accidentally crept in earlier. >> >> Modified: >> =A0 head/sys/conf/newvers.sh >> >> Modified: head/sys/conf/newvers.sh >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/conf/newvers.sh =A0Tue Nov 29 20:06:27 2011 =A0 =A0 =A0 =A0= (r228147) >> +++ head/sys/conf/newvers.sh =A0Tue Nov 29 21:28:48 2011 =A0 =A0 =A0 =A0= (r228148) >> @@ -99,7 +99,6 @@ for dir in /bin /usr/bin /usr/local/bin; >> =A0done >> >> =A0if [ -n "$svnversion" ] ; then >> - =A0 =A0 echo "$svnversion" >> =A0 =A0 =A0 svn=3D`cd ${SYSDIR} && $svnversion` > > any chance we could replace $svnversion with something like the following= : > > 'svn info|grep ^Revision|sed 's/^Revision: //'' ? > > this is much faster and the only downside seems to be the missing {MSP} a= t the > end. > > running a standard hdd, svnversion takes almost half a minute, while the > command above finishes in < 0.1 seconds. We already hashed over that in the last discussion. svnversion was picked because it iterates over the entire tree and you know for an absolute fact that it's running versions X-Y-Z, instead of the version of the Makefile being X. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 04:05:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E34571065670; Thu, 1 Dec 2011 04:05:56 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 806DE8FC12; Thu, 1 Dec 2011 04:05:56 +0000 (UTC) Received: by ywp17 with SMTP id 17so2197627ywp.13 for ; Wed, 30 Nov 2011 20:05:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.45.6 with SMTP id i6mr1114080obm.3.1322712355718; Wed, 30 Nov 2011 20:05:55 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Wed, 30 Nov 2011 20:05:55 -0800 (PST) X-Originating-IP: [93.92.220.178] In-Reply-To: <20111201001646.GA49249@freebsd.org> References: <201111301807.pAUI7cXI008371@svn.freebsd.org> <20111201001646.GA49249@freebsd.org> Date: Thu, 1 Dec 2011 11:05:55 +0700 X-Google-Sender-Auth: RNh7HDs5haDxkTCIzCceOgj-pV8 Message-ID: From: Max Khon To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228157 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 04:05:57 -0000 Alexander, On Thu, Dec 1, 2011 at 7:16 AM, Alexander Best wrote: > Author: fjoe > > Date: Wed Nov 30 18:07:38 2011 > > New Revision: 228157 > > URL: http://svn.freebsd.org/changeset/base/228157 > > > > Log: > > - Fix segmentation fault when running "+command" when run with -jX -n > due > > to Compat_RunCommand() being called with `cmd' that is not on the > node->commands > > list > > - Make ellipsis ("..." command) handling consistent: check for "..." > command > > in job make after variables expansion to match compat make behavior > > - Fix empty command handling (after variables expansion and @+- > modifiers > > are processed): now empty commands are ignored in compat make and are > not > > printed in job make case > > - Bump MAKE_VERSION to 5-2011-11-30-0 > > it would also be nice, if at some point, somebody could dive into the code > to > see why 'make buildkernel' will let clang produce coloured output, but > 'make -j(N>1) buildkernel' doesn't (and why adding a -B switch to that > command > fixes it). > This one is simple: job make (-jX) runs commands with stdin/stdout/stderr redirected to pipes. -B turns on compat mode for job make. This can be demonstrated by running make with -jX or -jX -B with the following Makefile: --- cut here --- all: @if [ -t 1 ]; then echo "stdout is a tty"; else echo "stdout is not a tty"; fi --- cut here --- If you really want to see colored output in -jX case you should teach clang to output ANSI color sequences not only in isatty(1) case, but also when MAKE_JOBS_FIFO environment variable is present (it is set when make runs in job mode). Max From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:03:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ADA31067726; Thu, 1 Dec 2011 05:03:19 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id BD8F08FC12; Thu, 1 Dec 2011 05:03:18 +0000 (UTC) Received: by ghbg20 with SMTP id g20so2244552ghb.13 for ; Wed, 30 Nov 2011 21:03:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.16.101 with SMTP id f5mr1124520obd.33.1322715797986; Wed, 30 Nov 2011 21:03:17 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Wed, 30 Nov 2011 21:03:17 -0800 (PST) X-Originating-IP: [93.92.220.178] In-Reply-To: References: <201111301807.pAUI7cXI008371@svn.freebsd.org> <20111201001646.GA49249@freebsd.org> Date: Thu, 1 Dec 2011 12:03:17 +0700 X-Google-Sender-Auth: xox-i-QLNFDT1wKc_fE0bRlO5GA Message-ID: From: Max Khon To: Alexander Best Content-Type: multipart/mixed; boundary=f46d0447f0d8471cbd04b300c5b1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228157 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:03:19 -0000 --f46d0447f0d8471cbd04b300c5b1 Content-Type: text/plain; charset=ISO-8859-1 Alexander, On Thu, Dec 1, 2011 at 11:05 AM, Max Khon wrote: it would also be nice, if at some point, somebody could dive into the code >> to >> see why 'make buildkernel' will let clang produce coloured output, but >> 'make -j(N>1) buildkernel' doesn't (and why adding a -B switch to that >> command >> fixes it). >> > > This one is simple: job make (-jX) runs commands with stdin/stdout/stderr > redirected to pipes. > -B turns on compat mode for job make. > > This can be demonstrated by running make with -jX or -jX -B with the > following Makefile: > --- cut here --- > all: > @if [ -t 1 ]; then echo "stdout is a tty"; else echo "stdout is > not a tty"; fi > --- cut here --- > > If you really want to see colored output in -jX case you should teach > clang to output ANSI color sequences not only in isatty(1) case, but also > when MAKE_JOBS_FIFO environment variable is present (it is set when make > runs in job mode). > This will not work for the cases when make(1) is itself redirected. Something like attached patch should work, but it blocks sometimes in "ttyout" state for some reason (needs more work). Max --f46d0447f0d8471cbd04b300c5b1 Content-Type: text/x-patch; charset=US-ASCII; name="openpty.diff" Content-Disposition: attachment; filename="openpty.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gvnanp4y0 SW5kZXg6IHVzci5iaW4vbWFrZS9NYWtlZmlsZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmluL21ha2Uv TWFrZWZpbGUJKHJldmlzaW9uIDIyODE1NykKKysrIHVzci5iaW4vbWFrZS9NYWtlZmlsZQkod29y a2luZyBjb3B5KQpAQCAtNyw2ICs3LDggQEAKIFNSQ1M9CWFyY2guYyBidWYuYyBjb25kLmMgZGly LmMgZm9yLmMgaGFzaC5jIGhhc2hfdGFibGVzLmMgam9iLmMJXAogCWxzdC5jIG1haW4uYyBtYWtl LmMgcGFyc2UuYyBwcm9jLmMgc2hlbGwuYyBzdHIuYyBzdWZmLmMgdGFyZy5jCVwKIAl1dGlsLmMg dmFyLmMKK0RQQUREPQkke0xJQlVUSUx9CitMREFERD0JLWx1dGlsCiAKIE5PX1NIQVJFRD89CVlF UwogCkluZGV4OiB1c3IuYmluL21ha2Uvam9iLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLmJpbi9tYWtl L2pvYi5jCShyZXZpc2lvbiAyMjgxNTcpCisrKyB1c3IuYmluL21ha2Uvam9iLmMJKHdvcmtpbmcg Y29weSkKQEAgLTExNSw2ICsxMTUsNyBAQAogI2luY2x1ZGUgPGZjbnRsLmg+CiAjaW5jbHVkZSA8 aW50dHlwZXMuaD4KICNpbmNsdWRlIDxsaW1pdHMuaD4KKyNpbmNsdWRlIDxsaWJ1dGlsLmg+CiAj aW5jbHVkZSA8cGF0aHMuaD4KICNpbmNsdWRlIDxzdHJpbmcuaD4KICNpbmNsdWRlIDxzaWduYWwu aD4KQEAgLTE3OTgsOCArMTc5OSwxMyBAQAogCQlpZiAodXNlUGlwZXMpIHsKIAkJCWludCBmZFsy XTsKIAotCQkJaWYgKHBpcGUoZmQpID09IC0xKQotCQkJCVB1bnQoIkNhbm5vdCBjcmVhdGUgcGlw ZTogJXMiLCBzdHJlcnJvcihlcnJubykpOworCQkJaWYgKGlzYXR0eSgxKSkgeworCQkJCWlmIChv cGVucHR5KGZkLCBmZCArIDEsIE5VTEwsIE5VTEwsIE5VTEwpID09IC0xKQorCQkJCQlQdW50KCJD YW5ub3Qgb3BlbiBwdHk6ICVzIiwgc3RyZXJyb3IoZXJybm8pKTsKKwkJCX0gZWxzZSB7CisJCQkJ aWYgKHBpcGUoZmQpID09IC0xKQorCQkJCQlQdW50KCJDYW5ub3QgY3JlYXRlIHBpcGU6ICVzIiwg c3RyZXJyb3IoZXJybm8pKTsKKwkJCX0KIAkJCWpvYi0+aW5QaXBlID0gZmRbMF07CiAJCQlqb2It Pm91dFBpcGUgPSBmZFsxXTsKIAkJCWZjbnRsKGpvYi0+aW5QaXBlLCBGX1NFVEZELCAxKTsK --f46d0447f0d8471cbd04b300c5b1-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:46:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A506106564A; Thu, 1 Dec 2011 05:46:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7498FC0A; Thu, 1 Dec 2011 05:46:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15kQ3n030190; Thu, 1 Dec 2011 05:46:26 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15kQub030188; Thu, 1 Dec 2011 05:46:26 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010546.pB15kQub030188@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228165 - stable/9/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:46:26 -0000 Author: dougb Date: Thu Dec 1 05:46:25 2011 New Revision: 228165 URL: http://svn.freebsd.org/changeset/base/228165 Log: MFC r227482: The default setting, daily_accounting_compress="NO", was causing only 1 old file to be saved, so fix this. While I'm here, fix a very old off-by-one error causing 1 more file than specified in daily_accounting_save to be saved because acct.0 was not taken into account (pun intended). Change that, and use a more thorough method of finding old files to delete. Partly just because this is the right thing to do, but also to silently fix the extra log that would have been left behind forever with the previous method. Approved by: re (kensmith) Modified: stable/9/etc/periodic/daily/310.accounting Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/daily/310.accounting ============================================================================== --- stable/9/etc/periodic/daily/310.accounting Wed Nov 30 20:43:39 2011 (r228164) +++ stable/9/etc/periodic/daily/310.accounting Thu Dec 1 05:46:25 2011 (r228165) @@ -30,8 +30,13 @@ case "$daily_accounting_enable" in cd /var/account rc=0 - n=$daily_accounting_save - rm -f acct.$n.gz acct.$n || rc=3 + n=$(( $daily_accounting_save - 1 )) + for f in acct.*; do + case "$f" in acct.\*) continue ;; esac # No files match + m=${f%.gz} ; m=${m#acct.} + [ $m -ge $n ] && { rm $f || rc=3; } + done + m=$n n=$(($n - 1)) while [ $n -ge 0 ] @@ -44,13 +49,14 @@ case "$daily_accounting_enable" in /etc/rc.d/accounting rotate_log || rc=3 + rm -f acct.merge && cp acct.0 acct.merge || rc=3 + sa -s $daily_accounting_flags /var/account/acct.merge || rc=3 + rm acct.merge + case "$daily_accounting_compress" in [Yy][Ee][Ss]) - gzip --keep -f acct.0 || rc=3;; + gzip -f acct.0 || rc=3;; esac - - sa -s $daily_accounting_flags /var/account/acct.0 && - unlink acct.0 || rc=3 fi;; *) rc=0;; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:47:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5666E106566C; Thu, 1 Dec 2011 05:47:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2208FC14; Thu, 1 Dec 2011 05:47:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15lq3p030279; Thu, 1 Dec 2011 05:47:52 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15lq2n030276; Thu, 1 Dec 2011 05:47:52 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010547.pB15lq2n030276@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228166 - releng/9.0/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:47:52 -0000 Author: dougb Date: Thu Dec 1 05:47:51 2011 New Revision: 228166 URL: http://svn.freebsd.org/changeset/base/228166 Log: MFC r227482: The default setting, daily_accounting_compress="NO", was causing only 1 old file to be saved, so fix this. While I'm here, fix a very old off-by-one error causing 1 more file than specified in daily_accounting_save to be saved because acct.0 was not taken into account (pun intended). Change that, and use a more thorough method of finding old files to delete. Partly just because this is the right thing to do, but also to silently fix the extra log that would have been left behind forever with the previous method. Approved by: re (kensmith) Modified: releng/9.0/etc/periodic/daily/310.accounting Directory Properties: releng/9.0/etc/ (props changed) Modified: releng/9.0/etc/periodic/daily/310.accounting ============================================================================== --- releng/9.0/etc/periodic/daily/310.accounting Thu Dec 1 05:46:25 2011 (r228165) +++ releng/9.0/etc/periodic/daily/310.accounting Thu Dec 1 05:47:51 2011 (r228166) @@ -30,8 +30,13 @@ case "$daily_accounting_enable" in cd /var/account rc=0 - n=$daily_accounting_save - rm -f acct.$n.gz acct.$n || rc=3 + n=$(( $daily_accounting_save - 1 )) + for f in acct.*; do + case "$f" in acct.\*) continue ;; esac # No files match + m=${f%.gz} ; m=${m#acct.} + [ $m -ge $n ] && { rm $f || rc=3; } + done + m=$n n=$(($n - 1)) while [ $n -ge 0 ] @@ -44,13 +49,14 @@ case "$daily_accounting_enable" in /etc/rc.d/accounting rotate_log || rc=3 + rm -f acct.merge && cp acct.0 acct.merge || rc=3 + sa -s $daily_accounting_flags /var/account/acct.merge || rc=3 + rm acct.merge + case "$daily_accounting_compress" in [Yy][Ee][Ss]) - gzip --keep -f acct.0 || rc=3;; + gzip -f acct.0 || rc=3;; esac - - sa -s $daily_accounting_flags /var/account/acct.0 && - unlink acct.0 || rc=3 fi;; *) rc=0;; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:48:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BA8B106566C; Thu, 1 Dec 2011 05:48:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70CCB8FC13; Thu, 1 Dec 2011 05:48:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15moix030360; Thu, 1 Dec 2011 05:48:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15moZj030358; Thu, 1 Dec 2011 05:48:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010548.pB15moZj030358@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228167 - stable/8/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:48:50 -0000 Author: dougb Date: Thu Dec 1 05:48:50 2011 New Revision: 228167 URL: http://svn.freebsd.org/changeset/base/228167 Log: MFC r227482: The default setting, daily_accounting_compress="NO", was causing only 1 old file to be saved, so fix this. While I'm here, fix a very old off-by-one error causing 1 more file than specified in daily_accounting_save to be saved because acct.0 was not taken into account (pun intended). Change that, and use a more thorough method of finding old files to delete. Partly just because this is the right thing to do, but also to silently fix the extra log that would have been left behind forever with the previous method. Modified: stable/8/etc/periodic/daily/310.accounting Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/periodic/daily/310.accounting ============================================================================== --- stable/8/etc/periodic/daily/310.accounting Thu Dec 1 05:47:51 2011 (r228166) +++ stable/8/etc/periodic/daily/310.accounting Thu Dec 1 05:48:50 2011 (r228167) @@ -30,8 +30,13 @@ case "$daily_accounting_enable" in cd /var/account rc=0 - n=$daily_accounting_save - rm -f acct.$n.gz acct.$n || rc=3 + n=$(( $daily_accounting_save - 1 )) + for f in acct.*; do + case "$f" in acct.\*) continue ;; esac # No files match + m=${f%.gz} ; m=${m#acct.} + [ $m -ge $n ] && { rm $f || rc=3; } + done + m=$n n=$(($n - 1)) while [ $n -ge 0 ] @@ -44,13 +49,14 @@ case "$daily_accounting_enable" in /etc/rc.d/accounting rotate_log || rc=3 + rm -f acct.merge && cp acct.0 acct.merge || rc=3 + sa -s $daily_accounting_flags /var/account/acct.merge || rc=3 + rm acct.merge + case "$daily_accounting_compress" in [Yy][Ee][Ss]) - gzip --keep -f acct.0 || rc=3;; + gzip -f acct.0 || rc=3;; esac - - sa -s $daily_accounting_flags /var/account/acct.0 && - unlink acct.0 || rc=3 fi;; *) rc=0;; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:49:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 026901065679; Thu, 1 Dec 2011 05:49:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBE5B8FC13; Thu, 1 Dec 2011 05:49:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15nbN4030431; Thu, 1 Dec 2011 05:49:37 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15nbMA030429; Thu, 1 Dec 2011 05:49:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010549.pB15nbMA030429@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228168 - stable/7/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:49:38 -0000 Author: dougb Date: Thu Dec 1 05:49:37 2011 New Revision: 228168 URL: http://svn.freebsd.org/changeset/base/228168 Log: MFC r227482: The default setting, daily_accounting_compress="NO", was causing only 1 old file to be saved, so fix this. While I'm here, fix a very old off-by-one error causing 1 more file than specified in daily_accounting_save to be saved because acct.0 was not taken into account (pun intended). Change that, and use a more thorough method of finding old files to delete. Partly just because this is the right thing to do, but also to silently fix the extra log that would have been left behind forever with the previous method. Modified: stable/7/etc/periodic/daily/310.accounting Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/periodic/daily/310.accounting ============================================================================== --- stable/7/etc/periodic/daily/310.accounting Thu Dec 1 05:48:50 2011 (r228167) +++ stable/7/etc/periodic/daily/310.accounting Thu Dec 1 05:49:37 2011 (r228168) @@ -30,8 +30,13 @@ case "$daily_accounting_enable" in cd /var/account rc=0 - n=$daily_accounting_save - rm -f acct.$n.gz acct.$n || rc=3 + n=$(( $daily_accounting_save - 1 )) + for f in acct.*; do + case "$f" in acct.\*) continue ;; esac # No files match + m=${f%.gz} ; m=${m#acct.} + [ $m -ge $n ] && { rm $f || rc=3; } + done + m=$n n=$(($n - 1)) while [ $n -ge 0 ] @@ -44,13 +49,14 @@ case "$daily_accounting_enable" in /etc/rc.d/accounting rotate_log || rc=3 + rm -f acct.merge && cp acct.0 acct.merge || rc=3 + sa -s $daily_accounting_flags /var/account/acct.merge || rc=3 + rm acct.merge + case "$daily_accounting_compress" in [Yy][Ee][Ss]) - gzip --keep -f acct.0 || rc=3;; + gzip -f acct.0 || rc=3;; esac - - sa -s $daily_accounting_flags /var/account/acct.0 && - unlink acct.0 || rc=3 fi;; *) rc=0;; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:51:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB13D1065673; Thu, 1 Dec 2011 05:51:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9F0E8FC12; Thu, 1 Dec 2011 05:51:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15pH7W030540; Thu, 1 Dec 2011 05:51:17 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15pHhJ030538; Thu, 1 Dec 2011 05:51:17 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010551.pB15pHhJ030538@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228169 - stable/9/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:51:17 -0000 Author: dougb Date: Thu Dec 1 05:51:17 2011 New Revision: 228169 URL: http://svn.freebsd.org/changeset/base/228169 Log: MFC r228122: If using DESTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo Approved by: re (kensmith) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/9/usr.sbin/mergemaster/ (props changed) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/9/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:49:37 2011 (r228168) +++ stable/9/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:51:17 2011 (r228169) @@ -1336,14 +1336,14 @@ esac if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC echo '' + [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime" - [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" tzsetup $tzs_args -r else echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime." echo ' You should run tzsetup' - run_it_now tzsetup + run_it_now "tzsetup $tzs_args" fi fi From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:52:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A66661065725; Thu, 1 Dec 2011 05:52:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95DD98FC19; Thu, 1 Dec 2011 05:52:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15qoIV030646; Thu, 1 Dec 2011 05:52:50 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15qoj7030644; Thu, 1 Dec 2011 05:52:50 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010552.pB15qoj7030644@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:52:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228170 - releng/9.0/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:52:50 -0000 Author: dougb Date: Thu Dec 1 05:52:50 2011 New Revision: 228170 URL: http://svn.freebsd.org/changeset/base/228170 Log: MFC r228122: If using DESTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo Approved by: re (kensmith) Modified: releng/9.0/usr.sbin/mergemaster/mergemaster.sh Directory Properties: releng/9.0/usr.sbin/mergemaster/ (props changed) Modified: releng/9.0/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- releng/9.0/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:51:17 2011 (r228169) +++ releng/9.0/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:52:50 2011 (r228170) @@ -1336,14 +1336,14 @@ esac if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC echo '' + [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime" - [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" tzsetup $tzs_args -r else echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime." echo ' You should run tzsetup' - run_it_now tzsetup + run_it_now "tzsetup $tzs_args" fi fi From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:53:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A9241065A32; Thu, 1 Dec 2011 05:53:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6943F8FC0C; Thu, 1 Dec 2011 05:53:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15rU2P030714; Thu, 1 Dec 2011 05:53:30 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15rUdb030712; Thu, 1 Dec 2011 05:53:30 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010553.pB15rUdb030712@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228171 - stable/8/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:53:30 -0000 Author: dougb Date: Thu Dec 1 05:53:30 2011 New Revision: 228171 URL: http://svn.freebsd.org/changeset/base/228171 Log: MFC r228122: If using DESTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:52:50 2011 (r228170) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:53:30 2011 (r228171) @@ -1338,14 +1338,14 @@ esac if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC echo '' + [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime" - [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" tzsetup $tzs_args -r else echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime." echo ' You should run tzsetup' - run_it_now tzsetup + run_it_now "tzsetup $tzs_args" fi fi From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 05:54:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF08710657E3; Thu, 1 Dec 2011 05:54:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DB408FC1C; Thu, 1 Dec 2011 05:54:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB15sMrY030792; Thu, 1 Dec 2011 05:54:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB15sMK2030790; Thu, 1 Dec 2011 05:54:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112010554.pB15sMK2030790@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 05:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228172 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 05:54:22 -0000 Author: dougb Date: Thu Dec 1 05:54:22 2011 New Revision: 228172 URL: http://svn.freebsd.org/changeset/base/228172 Log: MFC r228122: If using DESTDIR we need to be sure to create a ${DESTDIR}/var/db/zoneinfo Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:53:30 2011 (r228171) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 1 05:54:22 2011 (r228172) @@ -1324,14 +1324,14 @@ esac if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC echo '' + [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then echo "*** Reinstalling `cat ${DESTDIR}/var/db/zoneinfo` as ${DESTDIR}/etc/localtime" - [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" tzsetup $tzs_args -r else echo "*** There is no ${DESTDIR}/var/db/zoneinfo file to update ${DESTDIR}/etc/localtime." echo ' You should run tzsetup' - run_it_now tzsetup + run_it_now "tzsetup $tzs_args" fi fi From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 06:11:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64163106566B; Thu, 1 Dec 2011 06:11:29 +0000 (UTC) (envelope-from jbeich@tormail.net) Received: from server2.hudsonvalleyhost.com (server2.hudsonvalleyhost.com [66.7.195.77]) by mx1.freebsd.org (Postfix) with ESMTP id 083678FC12; Thu, 1 Dec 2011 06:11:27 +0000 (UTC) Received: from ec2-46-137-172-133.eu-west-1.compute.amazonaws.com ([46.137.172.133]:41221 helo=internal.tormail.net) by server2.hudsonvalleyhost.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1RVzBN-001BZb-Hu; Thu, 01 Dec 2011 00:27:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.net; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:Date:References:In-Reply-To:Subject:Cc:To:From; bh=Obv5y+H6ndgJe5FCC4aH0cfK9xgpLNSfjc1elH/Vxac=; b=LG4lSZIzAy/K7NozbUD5+uHSSwbs9tiBlYUmaAp8FmnnIo9b111vGpIiY0YOIdFgshTzg/PXU/2M7RJeVWKYDo+aVaWD6R7t2kmjn+K534lwJgZcp1AqMo1HhSmbxzpsYuBLloUBWiGOKy75L8PqnOiXm4KdjjAihcKFuB377Yg=; Received: from jbeich by internal.tormail.net with local (Exim 4.63) (envelope-from ) id 1RVz9v-000LKd-TK; Thu, 01 Dec 2011 05:26:16 +0000 From: Jan Beich To: Max Khon In-Reply-To: (Max Khon's message of "Thu, 1 Dec 2011 11:05:55 +0700") References: <201111301807.pAUI7cXI008371@svn.freebsd.org> <20111201001646.GA49249@freebsd.org> Date: Thu, 01 Dec 2011 13:25:23 +0800 MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1RVz9v-000LKd-TK@internal.tormail.net> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server2.hudsonvalleyhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.net X-Source: X-Source-Args: X-Source-Dir: Cc: svn-src-head@freebsd.org, Alexander Best , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228157 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 06:11:29 -0000 Max Khon writes: > On Thu, Dec 1, 2011 at 7:16 AM, Alexander Best wrote: >> it would also be nice, if at some point, somebody could dive into the code >> to >> see why 'make buildkernel' will let clang produce coloured output, but >> 'make -j(N>1) buildkernel' doesn't (and why adding a -B switch to that >> command >> fixes it). >> > > This one is simple: job make (-jX) runs commands with stdin/stdout/stderr > redirected to pipes. > -B turns on compat mode for job make. > > This can be demonstrated by running make with -jX or -jX -B with the > following Makefile: > --- cut here --- > all: > @if [ -t 1 ]; then echo "stdout is a tty"; else echo "stdout is not > a tty"; fi > --- cut here --- > > If you really want to see colored output in -jX case you should teach clang > to output ANSI color sequences not only in isatty(1) case, but also > when MAKE_JOBS_FIFO environment variable is present (it is set when make > runs in job mode). Any way to distinguish between `make -jX' connected to tty and `make -jX' redirected to a file then? Otherwise, inconsistent coloring is still there, e.g. $ make >&build.log $ make -j8 >&build.log Index: contrib/llvm/tools/clang/lib/Driver/Tools.cpp =================================================================== --- contrib/llvm/tools/clang/lib/Driver/Tools.cpp (revision 228149) +++ contrib/llvm/tools/clang/lib/Driver/Tools.cpp (working copy) @@ -2115,7 +2115,8 @@ void Clang::ConstructJob(Compilation &C, const Job // them. if (Args.hasFlag(options::OPT_fcolor_diagnostics, options::OPT_fno_color_diagnostics, - llvm::sys::Process::StandardErrHasColors())) + llvm::sys::Process::StandardErrHasColors() || + ::getenv("MAKE_JOBS_FIFO"))) CmdArgs.push_back("-fcolor-diagnostics"); if (!Args.hasFlag(options::OPT_fshow_source_location, From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 07:19:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B16106564A; Thu, 1 Dec 2011 07:19:14 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43D528FC18; Thu, 1 Dec 2011 07:19:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB17JEDm033369; Thu, 1 Dec 2011 07:19:14 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB17JEb6033366; Thu, 1 Dec 2011 07:19:14 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201112010719.pB17JEb6033366@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Dec 2011 07:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228173 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 07:19:14 -0000 Author: lstewart Date: Thu Dec 1 07:19:13 2011 New Revision: 228173 URL: http://svn.freebsd.org/changeset/base/228173 Log: Revise the sysctl handling code and restructure the hierarchy of sysctls introduced when feed-forward clock support is enabled in the kernel: - Rename the "choice" variable to "available". - Streamline the implementation of the "active" variable's sysctl handler function. - Create a kern.sysclock sysctl node for general sysclock related configuration options. Place the "available" and "active" variables under this node. - Create a kern.sysclock.ffclock sysctl node for feed-forward clock specific configuration options. Place the "version" and "ffcounter_bypass" variables under this node. - Tweak some of the description strings. Discussed with: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/kern/kern_ffclock.c head/sys/sys/timeffc.h Modified: head/sys/kern/kern_ffclock.c ============================================================================== --- head/sys/kern/kern_ffclock.c Thu Dec 1 05:54:22 2011 (r228172) +++ head/sys/kern/kern_ffclock.c Thu Dec 1 07:19:13 2011 (r228173) @@ -148,31 +148,33 @@ ffclock_difftime(ffcounter ffdelta, stru } /* - * Sysctl for the Feed-Forward Clock. + * Create a new kern.sysclock sysctl node, which will be home to some generic + * sysclock configuration variables. Feed-forward clock specific variables will + * live under the ffclock subnode. */ -static int ffclock_version = 2; -SYSCTL_NODE(_kern, OID_AUTO, ffclock, CTLFLAG_RW, 0, - "Feed-Forward Clock Support"); -SYSCTL_INT(_kern_ffclock, OID_AUTO, version, CTLFLAG_RD, &ffclock_version, 0, - "Version of Feed-Forward Clock Support"); - -/* - * Sysctl to select which clock is read when calling any of the - * [get]{bin,nano,micro}[up]time() functions. - */ -char *sysclocks[] = {"feedback", "feed-forward"}; +SYSCTL_NODE(_kern, OID_AUTO, sysclock, CTLFLAG_RW, 0, + "System clock related configuration"); +SYSCTL_NODE(_kern_sysclock, OID_AUTO, ffclock, CTLFLAG_RW, 0, + "Feed-forward clock configuration"); +static char *sysclocks[] = {"feedback", "feed-forward"}; +#define MAX_SYSCLOCK_NAME_LEN 16 #define NUM_SYSCLOCKS (sizeof(sysclocks) / sizeof(*sysclocks)) -/* Report or change the active timecounter hardware. */ +static int ffclock_version = 2; +SYSCTL_INT(_kern_sysclock_ffclock, OID_AUTO, version, CTLFLAG_RD, + &ffclock_version, 0, "Feed-forward clock kernel version"); + +/* List available sysclocks. */ static int -sysctl_kern_ffclock_choice(SYSCTL_HANDLER_ARGS) +sysctl_kern_sysclock_available(SYSCTL_HANDLER_ARGS) { struct sbuf *s; int clk, error; - s = sbuf_new_for_sysctl(NULL, NULL, 16 * NUM_SYSCLOCKS, req); + s = sbuf_new_for_sysctl(NULL, NULL, + MAX_SYSCLOCK_NAME_LEN * NUM_SYSCLOCKS, req); if (s == NULL) return (ENOMEM); @@ -187,47 +189,51 @@ sysctl_kern_ffclock_choice(SYSCTL_HANDLE return (error); } -SYSCTL_PROC(_kern_ffclock, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD, - 0, 0, sysctl_kern_ffclock_choice, "A", "Clock paradigms available"); +SYSCTL_PROC(_kern_sysclock, OID_AUTO, available, CTLTYPE_STRING | CTLFLAG_RD, + 0, 0, sysctl_kern_sysclock_available, "A", + "List of available system clocks"); +/* + * Return the name of the active system clock if read, or attempt to change + * the active system clock to the user specified one if written to. The active + * system clock is read when calling any of the [get]{bin,nano,micro}[up]time() + * functions. + */ static int -sysctl_kern_ffclock_active(SYSCTL_HANDLER_ARGS) +sysctl_kern_sysclock_active(SYSCTL_HANDLER_ARGS) { - char newclock[32]; - int error; + char newclock[MAX_SYSCLOCK_NAME_LEN]; + int clk, error; - switch (sysclock_active) { - case SYSCLOCK_FBCK: - strlcpy(newclock, sysclocks[SYSCLOCK_FBCK], sizeof(newclock)); - break; - case SYSCLOCK_FFWD: - strlcpy(newclock, sysclocks[SYSCLOCK_FFWD], sizeof(newclock)); - break; + if (req->newptr == NULL) { + /* Return the name of the current active sysclock. */ + strlcpy(newclock, sysclocks[sysclock_active], sizeof(newclock)); + error = sysctl_handle_string(oidp, newclock, + sizeof(newclock), req); + } else { + /* Change the active sysclock to the user specified one. */ + error = EINVAL; + for (clk = 0; clk < NUM_SYSCLOCKS; clk++) { + if (strncmp((char *)req->newptr, sysclocks[clk], + strlen(sysclocks[clk])) == 0) { + sysclock_active = clk; + error = 0; + break; + } + } } - error = sysctl_handle_string(oidp, &newclock[0], sizeof(newclock), req); - if (error != 0 || req->newptr == NULL) - return (error); - if (strncmp(newclock, sysclocks[SYSCLOCK_FBCK], - sizeof(sysclocks[SYSCLOCK_FBCK])) == 0) - sysclock_active = SYSCLOCK_FBCK; - else if (strncmp(newclock, sysclocks[SYSCLOCK_FFWD], - sizeof(sysclocks[SYSCLOCK_FFWD])) == 0) - sysclock_active = SYSCLOCK_FFWD; - else - return (EINVAL); - return (error); } -SYSCTL_PROC(_kern_ffclock, OID_AUTO, active, CTLTYPE_STRING | CTLFLAG_RW, - 0, 0, sysctl_kern_ffclock_active, "A", "Kernel clock selected"); - -int sysctl_kern_ffclock_ffcounter_bypass = 0; +SYSCTL_PROC(_kern_sysclock, OID_AUTO, active, CTLTYPE_STRING | CTLFLAG_RW, + 0, 0, sysctl_kern_sysclock_active, "A", + "Name of the active system clock which is currently serving time"); -SYSCTL_INT(_kern_ffclock, OID_AUTO, ffcounter_bypass, CTLFLAG_RW, +static int sysctl_kern_ffclock_ffcounter_bypass = 0; +SYSCTL_INT(_kern_sysclock_ffclock, OID_AUTO, ffcounter_bypass, CTLFLAG_RW, &sysctl_kern_ffclock_ffcounter_bypass, 0, - "Use reliable hardware timecounter as the Feed-Forward Counter"); + "Use reliable hardware timecounter as the feed-forward counter"); /* * High level functions to access the Feed-Forward Clock. Modified: head/sys/sys/timeffc.h ============================================================================== --- head/sys/sys/timeffc.h Thu Dec 1 05:54:22 2011 (r228172) +++ head/sys/sys/timeffc.h Thu Dec 1 07:19:13 2011 (r228173) @@ -55,6 +55,12 @@ struct ffclock_estimate { #if __BSD_VISIBLE #ifdef _KERNEL +/* Define the kern.sysclock sysctl tree. */ +SYSCTL_DECL(_kern_sysclock); + +/* Define the kern.sysclock.ffclock sysctl tree. */ +SYSCTL_DECL(_kern_sysclock_ffclock); + /* * Index into the sysclocks array for obtaining the ASCII name of a particular * sysclock. From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 07:41:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C1A91065672; Thu, 1 Dec 2011 07:41:31 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A22D8FC0C; Thu, 1 Dec 2011 07:41:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB17fV6p034094; Thu, 1 Dec 2011 07:41:31 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB17fV6O034091; Thu, 1 Dec 2011 07:41:31 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201112010741.pB17fV6O034091@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 1 Dec 2011 07:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228174 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 07:41:31 -0000 Author: lstewart Date: Thu Dec 1 07:41:30 2011 New Revision: 228174 URL: http://svn.freebsd.org/changeset/base/228174 Log: Add a man page describing the feed-forward clock kernel support, including how to enable and configure the functionality. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Added: head/share/man/man4/ffclock.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Dec 1 07:19:13 2011 (r228173) +++ head/share/man/man4/Makefile Thu Dec 1 07:41:30 2011 (r228174) @@ -123,6 +123,7 @@ MAN= aac.4 \ fdc.4 \ fdt.4 \ fdtbus.4 \ + ffclock.4 \ firewire.4 \ fpa.4 \ fwe.4 \ Added: head/share/man/man4/ffclock.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ffclock.4 Thu Dec 1 07:41:30 2011 (r228174) @@ -0,0 +1,128 @@ +.\" Copyright (c) 2011 The University of Melbourne +.\" All rights reserved. +.\" +.\" This documentation was written by Julien Ridoux at the University of +.\" Melbourne under sponsorship from the FreeBSD Foundation. +.\" +.\" 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, 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd December 1, 2011 +.Dt FFCLOCK 4 +.Os +.Sh NAME +.Nm FFCLOCK +.Nd Feed-forward system clock +.Sh SYNOPSIS +.Cd options FFCLOCK +.Sh DESCRIPTION +The +.Xr ntpd 8 +daemon has been the dominant solution for system clock synchronisation for many +years, which has in turn influenced the design of the system clock. +The ntpd daemon implements a feedback control algorithm which has been +demonstrated to perform poorly in common use cases. +.Pp +Feed-forward clock synchronisation algorithms implemented by an appropriate +daemon, in concert with the +.Nm +kernel support, have been shown to provide highly robust and accurate clock +synchronisation. +In addition to time keeping, the +.Nm +kernel mechanism provides new timestamping capabilities and the ability to +use specialised clocks. +Feed-forward synchronisation is also very well suited for virtualised +environments, reducing the overhead of timekeeping in guests and ensuring +continued smooth operation of the system clock during guest live migration. +.Pp +The +.Nm +kernel support provides feed-forward timestamping functions within the kernel +and system calls to support feed-forward synchronisation daemons +.Po see +.Xr ffclock 2 +.Pc . +.Ss Kernel Options +The following kernel configuration options are related to +.Nm : +.Pp +.Bl -tag -width ".Dv FFCLOCK" -compact +.It Dv FFCLOCK +Enable feed-forward clock support. +.El +.Ss Configuration +When feed-forward clock support is compiled into the kernel, multiple system +clocks become available to choose from. +System clock configuration is possible via the +.Va kern.sysclock +.Xr sysctl 8 +tree which provides the following variables: +.Bl -tag -width " " -offset indent +.It Va kern.sysclock.active +Name of the current active system clock which is serving time. +Set to one of the names in +.Va kern.sysclock.available +in order to change the default active system clock. +.It Va kern.sysclock.available +Lists the names of available system clocks +.Po +read only +.Pc . +.El +.Pp +Feed-forward system clock configuration is possible via the +.Va kern.sysclock.ffclock +sysctl tree which provides the following variables: +.Bl -tag -width " " -offset indent +.It Va kern.sysclock.ffclock.version +Feed-forward clock kernel version +.Po +read only +.Pc . +.It Va kern.sysclock.ffclock.ffcounter_bypass +Use reliable hardware timecounter as the feed-forward counter. +Will eventually be useful for virtualised environment like +.Xr xen 4 , +but currently does nothing. +.El +.Sh SEE ALSO +.Xr clock_gettime 2 , +.Xr ffclock 2 , +.Xr bpf 4 , +.Xr sysctl 8 +.Sh HISTORY +Feed-forward clock support first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The feed-forward clock support was written by +.An Julien Ridoux Aq jridoux@unimelb.edu.au +in collaboration with +.An Darryl Veitch Aq dveitch@unimelb.edu.au +at the University of Melbourne under sponsorship from the FreeBSD Foundation. +.Pp +This manual page was written by +.An Julien Ridoux Aq jridoux@unimelb.edu.au +and +.An Lawrence Stewart Aq lstewart@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 07:48:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9800A106564A; Thu, 1 Dec 2011 07:48:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 2FCD6150E4F; Thu, 1 Dec 2011 07:48:26 +0000 (UTC) Message-ID: <4ED73149.5010109@FreeBSD.org> Date: Wed, 30 Nov 2011 23:48:25 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Lawrence Stewart References: <201112010741.pB17fV6O034091@svn.freebsd.org> In-Reply-To: <201112010741.pB17fV6O034091@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228174 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 07:48:26 -0000 On 11/30/2011 23:41, Lawrence Stewart wrote: > +.\" Copyright (c) 2011 The University of Melbourne Out of curiosity, if the foundation paid for the work, how is it that the University of Melbourne gets to own the copyright? -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 07:50:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 621C5106566B; Thu, 1 Dec 2011 07:50:28 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-qw0-f47.google.com (mail-qw0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id CD0618FC13; Thu, 1 Dec 2011 07:50:27 +0000 (UTC) Received: by qaea17 with SMTP id a17so4368468qae.13 for ; Wed, 30 Nov 2011 23:50:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.34.13 with SMTP id j13mr971101qcd.248.1322725826959; Wed, 30 Nov 2011 23:50:26 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.229.47.194 with HTTP; Wed, 30 Nov 2011 23:50:26 -0800 (PST) X-Originating-IP: [93.92.220.178] In-Reply-To: References: <201111301807.pAUI7cXI008371@svn.freebsd.org> <20111201001646.GA49249@freebsd.org> Date: Thu, 1 Dec 2011 14:50:26 +0700 X-Google-Sender-Auth: iCkeiL6wJdfLo7HV7Np28PDN_h0 Message-ID: From: Max Khon To: Alexander Best Content-Type: multipart/mixed; boundary=00163683411e0d1bb904b3031b21 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228157 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 07:50:28 -0000 --00163683411e0d1bb904b3031b21 Content-Type: text/plain; charset=ISO-8859-1 Alexander, On Thu, Dec 1, 2011 at 12:03 PM, Max Khon wrote: it would also be nice, if at some point, somebody could dive into the code >>> to >>> see why 'make buildkernel' will let clang produce coloured output, but >>> 'make -j(N>1) buildkernel' doesn't (and why adding a -B switch to that >>> command >>> fixes it). >>> >> >> This one is simple: job make (-jX) runs commands with stdin/stdout/stderr >> redirected to pipes. >> -B turns on compat mode for job make. >> >> This can be demonstrated by running make with -jX or -jX -B with the >> following Makefile: >> --- cut here --- >> all: >> @if [ -t 1 ]; then echo "stdout is a tty"; else echo "stdout is >> not a tty"; fi >> --- cut here --- >> >> If you really want to see colored output in -jX case you should teach >> clang to output ANSI color sequences not only in isatty(1) case, but also >> when MAKE_JOBS_FIFO environment variable is present (it is set when make >> runs in job mode). >> > > This will not work for the cases when make(1) is itself redirected. > Something like attached patch should work, but it blocks sometimes in > "ttyout" state for some reason (needs more work). > It hangs when tty_drain() is called when make(1) closes slave pty. Looks like a race condition there when tty_wait() is called from tty_drain(). If I exchange pty master and slave hangs disappear. So attached patch works for me. It may add performance penalty but I think that the impact will be negligible. Max --00163683411e0d1bb904b3031b21 Content-Type: text/x-patch; charset=US-ASCII; name="openpty2.diff" Content-Disposition: attachment; filename="openpty2.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gvngppto1 SW5kZXg6IHVzci5iaW4vbWFrZS9NYWtlZmlsZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmluL21ha2Uv TWFrZWZpbGUJKHJldmlzaW9uIDIyODE1NykKKysrIHVzci5iaW4vbWFrZS9NYWtlZmlsZQkod29y a2luZyBjb3B5KQpAQCAtNyw2ICs3LDggQEAKIFNSQ1M9CWFyY2guYyBidWYuYyBjb25kLmMgZGly LmMgZm9yLmMgaGFzaC5jIGhhc2hfdGFibGVzLmMgam9iLmMJXAogCWxzdC5jIG1haW4uYyBtYWtl LmMgcGFyc2UuYyBwcm9jLmMgc2hlbGwuYyBzdHIuYyBzdWZmLmMgdGFyZy5jCVwKIAl1dGlsLmMg dmFyLmMKK0RQQUREPQkke0xJQlVUSUx9CitMREFERD0JLWx1dGlsCiAKIE5PX1NIQVJFRD89CVlF UwogCkluZGV4OiB1c3IuYmluL21ha2Uvam9iLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdXNyLmJpbi9tYWtl L2pvYi5jCShyZXZpc2lvbiAyMjgxNTcpCisrKyB1c3IuYmluL21ha2Uvam9iLmMJKHdvcmtpbmcg Y29weSkKQEAgLTExNSw2ICsxMTUsNyBAQAogI2luY2x1ZGUgPGZjbnRsLmg+CiAjaW5jbHVkZSA8 aW50dHlwZXMuaD4KICNpbmNsdWRlIDxsaW1pdHMuaD4KKyNpbmNsdWRlIDxsaWJ1dGlsLmg+CiAj aW5jbHVkZSA8cGF0aHMuaD4KICNpbmNsdWRlIDxzdHJpbmcuaD4KICNpbmNsdWRlIDxzaWduYWwu aD4KQEAgLTE3OTgsOCArMTc5OSwxMyBAQAogCQlpZiAodXNlUGlwZXMpIHsKIAkJCWludCBmZFsy XTsKIAotCQkJaWYgKHBpcGUoZmQpID09IC0xKQotCQkJCVB1bnQoIkNhbm5vdCBjcmVhdGUgcGlw ZTogJXMiLCBzdHJlcnJvcihlcnJubykpOworCQkJaWYgKGlzYXR0eSgxKSkgeworCQkJCWlmIChv cGVucHR5KGZkICsgMSwgZmQgKyAwLCBOVUxMLCBOVUxMLCBOVUxMKSA9PSAtMSkKKwkJCQkJUHVu dCgiQ2Fubm90IG9wZW4gcHR5OiAlcyIsIHN0cmVycm9yKGVycm5vKSk7CisJCQl9IGVsc2Ugewor CQkJCWlmIChwaXBlKGZkKSA9PSAtMSkKKwkJCQkJUHVudCgiQ2Fubm90IGNyZWF0ZSBwaXBlOiAl cyIsIHN0cmVycm9yKGVycm5vKSk7CisJCQl9CiAJCQlqb2ItPmluUGlwZSA9IGZkWzBdOwogCQkJ am9iLT5vdXRQaXBlID0gZmRbMV07CiAJCQlmY250bChqb2ItPmluUGlwZSwgRl9TRVRGRCwgMSk7 Cg== --00163683411e0d1bb904b3031b21-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 08:07:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85A1106564A; Thu, 1 Dec 2011 08:07:24 +0000 (UTC) (envelope-from jrid@cubinlab.ee.unimelb.edu.au) Received: from mail-gw1.its.unimelb.edu.au (mail-gw1.its.unimelb.edu.au [128.250.5.150]) by mx1.freebsd.org (Postfix) with ESMTP id 9CFFE8FC14; Thu, 1 Dec 2011 08:07:24 +0000 (UTC) Received: from emu.cubinlab.ee.unimelb.edu.au (cubinlab.ee.unimelb.edu.au [128.250.80.33]) by mail-gw1.its.unimelb.edu.au (Postfix) with ESMTPS id 1655ED2F; Thu, 1 Dec 2011 19:07:22 +1100 (EST) Received: from jrid.cubinlab.ee.unimelb.edu.au (jrid.cubinlab.ee.unimelb.edu.au [10.0.1.128]) (authenticated bits=0) by emu.cubinlab.ee.unimelb.edu.au (8.14.4/8.14.4) with ESMTP id pB187LWY055258 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 1 Dec 2011 19:07:22 +1100 (EST) (envelope-from jrid@cubinlab.ee.unimelb.edu.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Julien Ridoux In-Reply-To: <4ED73149.5010109@FreeBSD.org> Date: Thu, 1 Dec 2011 19:07:21 +1100 Content-Transfer-Encoding: quoted-printable Message-Id: <5DB1E528-27FD-4E3F-AB2E-84561058FE1A@cubinlab.ee.unimelb.edu.au> References: <201112010741.pB17fV6O034091@svn.freebsd.org> <4ED73149.5010109@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, Lawrence Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228174 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 08:07:25 -0000 On 01/12/2011, at 6:48 PM, Doug Barton wrote: > On 11/30/2011 23:41, Lawrence Stewart wrote: >> +.\" Copyright (c) 2011 The University of Melbourne >=20 > Out of curiosity, if the foundation paid for the work, how is it that > the University of Melbourne gets to own the copyright? Hi Doug, The University lawyers have been quite vocal and this is the agreement = that has been reached to allow things moving forward. I understand that this may not be a satisfying answer, but just wanted = to confirm this is what has been agreed upon. Cheers, Julien= From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 09:01:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72029106566B; Thu, 1 Dec 2011 09:01:52 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47F848FC0C; Thu, 1 Dec 2011 09:01:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB191qii036574; Thu, 1 Dec 2011 09:01:52 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB191qCW036572; Thu, 1 Dec 2011 09:01:52 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201112010901.pB191qCW036572@svn.freebsd.org> From: Max Khon Date: Thu, 1 Dec 2011 09:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228175 - head/usr.sbin/sade X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 09:01:52 -0000 Author: fjoe Date: Thu Dec 1 09:01:51 2011 New Revision: 228175 URL: http://svn.freebsd.org/changeset/base/228175 Log: Fix dialog autosizing: dlg_count_columns() does not handle NL characters. Modified: head/usr.sbin/sade/misc.c Modified: head/usr.sbin/sade/misc.c ============================================================================== --- head/usr.sbin/sade/misc.c Thu Dec 1 07:41:30 2011 (r228174) +++ head/usr.sbin/sade/misc.c Thu Dec 1 09:01:51 2011 (r228175) @@ -233,6 +233,23 @@ xdialog_count_rows(const char *p) return rows ? rows : 1; } +static int +xdialog_count_columns(const char *p) +{ + int len; + int max_len = 0; + const char *q; + + for (; (q = strchr(p, '\n')) != NULL; p = q + 1) { + len = q - p; + max_len = MAX(max_len, len); + } + + len = strlen(p); + max_len = MAX(max_len, len); + return max_len; +} + int xdialog_menu(const char *title, const char *cprompt, int height, int width, int menu_height, int item_no, dialogMenuItem *ditems) @@ -270,7 +287,7 @@ xdialog_menu(const char *title, const ch tag_x = MAX(tag_x, l + k + 2); } } - width = MAX(dlg_count_columns(cprompt), title != NULL ? dlg_count_columns(title) : 0); + width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0); width = MAX(width, tag_x + 4) + 4; } width = MAX(width, 24); @@ -345,7 +362,7 @@ xdialog_radiolist(const char *title, con check_x = MAX(check_x, l + k + 6); } } - width = MAX(dlg_count_columns(cprompt), title != NULL ? dlg_count_columns(title) : 0); + width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0); width = MAX(width, check_x + 4) + 4; } width = MAX(width, 24); @@ -397,8 +414,8 @@ xdialog_msgbox(const char *title, const /* calculate width */ if (width < 0) { - width = title != NULL ? dlg_count_columns(title) : 0; - width = MAX(width, dlg_count_columns(cprompt)) + 4; + width = title != NULL ? xdialog_count_columns(title) : 0; + width = MAX(width, xdialog_count_columns(cprompt)) + 4; } if (pauseopt) width = MAX(width, 10); From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 09:02:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 609511065678; Thu, 1 Dec 2011 09:02:57 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FE018FC13; Thu, 1 Dec 2011 09:02:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB192vqa036645; Thu, 1 Dec 2011 09:02:57 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB192vNj036643; Thu, 1 Dec 2011 09:02:57 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201112010902.pB192vNj036643@svn.freebsd.org> From: Max Khon Date: Thu, 1 Dec 2011 09:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228176 - head/usr.sbin/tzsetup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 09:02:57 -0000 Author: fjoe Date: Thu Dec 1 09:02:57 2011 New Revision: 228176 URL: http://svn.freebsd.org/changeset/base/228176 Log: Sync xdialog_menu() implementation with sade. Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Thu Dec 1 09:01:51 2011 (r228175) +++ head/usr.sbin/tzsetup/tzsetup.c Thu Dec 1 09:02:57 2011 (r228176) @@ -73,6 +73,38 @@ typedef struct dialogMenuItem { } dialogMenuItem; static int +xdialog_count_rows(const char *p) +{ + int rows = 0; + + while ((p = strchr(p, '\n')) != NULL) { + p++; + if (*p == '\0') + break; + rows++; + } + + return rows ? rows : 1; +} + +static int +xdialog_count_columns(const char *p) +{ + int len; + int max_len = 0; + const char *q; + + for (; (q = strchr(p, '\n')) != NULL; p = q + 1) { + len = q - p; + max_len = MAX(max_len, len); + } + + len = strlen(p); + max_len = MAX(max_len, len); + return max_len; +} + +static int xdialog_menu(const char *title, const char *cprompt, int height, int width, int menu_height, int item_no, dialogMenuItem *ditems) { @@ -90,6 +122,12 @@ xdialog_menu(const char *title, const ch listitems[i].text = ditems[i].title; } + /* calculate height */ + if (height < 0) + height = xdialog_count_rows(cprompt) + menu_height + 4 + 2; + if (height > LINES) + height = LINES; + /* calculate width */ if (width < 0) { int tag_x = 0; @@ -103,7 +141,7 @@ xdialog_menu(const char *title, const ch tag_x = MAX(tag_x, l + k + 2); } } - width = MAX(dlg_count_columns(cprompt), title != NULL ? dlg_count_columns(title) : 0); + width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0); width = MAX(width, tag_x + 4) + 4; } width = MAX(width, 24); From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 11:03:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 4406E106574C; Thu, 1 Dec 2011 11:03:55 +0000 (UTC) Date: Thu, 1 Dec 2011 11:03:55 +0000 From: Alexander Best To: Garrett Cooper Message-ID: <20111201110355.GA60151@freebsd.org> References: <201111292128.pATLSnKr067459@svn.freebsd.org> <20111201005932.GA54417@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r228148 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 11:03:55 -0000 On Wed Nov 30 11, Garrett Cooper wrote: > On Wed, Nov 30, 2011 at 4:59 PM, Alexander Best wrote: > > On Tue Nov 29 11, John Baldwin wrote: > >> Author: jhb > >> Date: Tue Nov 29 21:28:48 2011 > >> New Revision: 228148 > >> URL: http://svn.freebsd.org/changeset/base/228148 > >> > >> Log: > >>   Remove a bit of debugging that accidentally crept in earlier. > >> > >> Modified: > >>   head/sys/conf/newvers.sh > >> > >> Modified: head/sys/conf/newvers.sh > >> ============================================================================== > >> --- head/sys/conf/newvers.sh  Tue Nov 29 20:06:27 2011        (r228147) > >> +++ head/sys/conf/newvers.sh  Tue Nov 29 21:28:48 2011        (r228148) > >> @@ -99,7 +99,6 @@ for dir in /bin /usr/bin /usr/local/bin; > >>  done > >> > >>  if [ -n "$svnversion" ] ; then > >> -     echo "$svnversion" > >>       svn=`cd ${SYSDIR} && $svnversion` > > > > any chance we could replace $svnversion with something like the following: > > > > 'svn info|grep ^Revision|sed 's/^Revision: //'' ? > > > > this is much faster and the only downside seems to be the missing {MSP} at the > > end. > > > > running a standard hdd, svnversion takes almost half a minute, while the > > command above finishes in < 0.1 seconds. > > We already hashed over that in the last discussion. svnversion was > picked because it iterates over the entire tree and you know for an > absolute fact that it's running versions X-Y-Z, instead of the version > of the Makefile being X. sorry. wasn't aware of that. thanks for the info. cheers. alex > Thanks, > -Garrett From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 11:20:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BB12106564A; Thu, 1 Dec 2011 11:20:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E288FC08; Thu, 1 Dec 2011 11:20:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1BKPJB042707; Thu, 1 Dec 2011 11:20:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1BKP4q042706; Thu, 1 Dec 2011 11:20:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112011120.pB1BKP4q042706@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 1 Dec 2011 11:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228177 - head/tools/regression/pipe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 11:20:25 -0000 Author: kib Date: Thu Dec 1 11:20:25 2011 New Revision: 228177 URL: http://svn.freebsd.org/changeset/base/228177 Log: Add a simple test for pipe inode numbers reported by fstat(2). Submitted by: gianni MFC after: 1 week Added: head/tools/regression/pipe/pipe-ino.c (contents, props changed) Added: head/tools/regression/pipe/pipe-ino.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/pipe/pipe-ino.c Thu Dec 1 11:20:25 2011 (r228177) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2011 Giovanni Trematerra + * 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, 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. + */ + +/* + * $FreeBSD$ + * Test conformance to stat(2) SUSv4 description: + * "For all other file types defined in this volume of POSIX.1-2008, the + * structure members st_mode, st_ino, st_dev, st_uid, st_gid, st_atim, + * st_ctim, and st_mtim shall have meaningful values ...". + * Check that st_dev and st_ino are meaningful. + */ + +#include +#include +#include +#include +#include + +int +main(int argc, char **argv) +{ + int pipefd[2]; + struct stat st1, st2; + + if (pipe(pipefd) == -1) + err(1, "FAIL: pipe"); + + if (fstat(pipefd[0], &st1) == -1) + err(1, "FAIL: fstat st1"); + if (fstat(pipefd[1], &st2) == -1) + err(1, "FAIL: fstat st2"); + if (st1.st_dev != st2.st_dev || st1.st_dev == 0 || st2.st_dev == 0) { + errx(1, "FAIL: wrong dev number %d %d", + st1.st_dev, st2.st_dev); + } + if (st1.st_ino == st2.st_ino) + errx(1, "FAIL: inode numbers are equal: %d", st1.st_ino); + close(pipefd[0]); + close(pipefd[1]); + printf("PASS\n"); + + return (0); +} From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 11:36:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8491106564A; Thu, 1 Dec 2011 11:36:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A78568FC13; Thu, 1 Dec 2011 11:36:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1Baf3U043249; Thu, 1 Dec 2011 11:36:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1BafvW043247; Thu, 1 Dec 2011 11:36:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112011136.pB1BafvW043247@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 1 Dec 2011 11:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228178 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 11:36:41 -0000 Author: kib Date: Thu Dec 1 11:36:41 2011 New Revision: 228178 URL: http://svn.freebsd.org/changeset/base/228178 Log: If alloc_unr() call in the pipe_create() failed, then pipe->pipe_ino is -1. But, because ino_t is unsigned, this case was not covered by the test ino > 0 in pipeclose(), leading to the free_unr(-1). Fix it by explicitely comparing with 0 and -1. [1] Do no access freed memory, the inode number was cached to prevent access to cpipe after it possibly was freed, but I failed to commit the right patch. Noted by: gianni [1] Pointy hat to: kib MFC after: 3 days Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Thu Dec 1 11:20:25 2011 (r228177) +++ head/sys/kern/sys_pipe.c Thu Dec 1 11:36:41 2011 (r228178) @@ -1554,8 +1554,8 @@ pipeclose(cpipe) } else PIPE_UNLOCK(cpipe); - if (ino > 0) - free_unr(pipeino_unr, cpipe->pipe_ino); + if (ino != 0 && ino != (ino_t)-1) + free_unr(pipeino_unr, ino); } /*ARGSUSED*/ From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 11:48:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B0A2106567B; Thu, 1 Dec 2011 11:48:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 4AF0A8FC1D; Thu, 1 Dec 2011 11:48:50 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pB1Bmkww083375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Dec 2011 13:48:46 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pB1Bmk3H082751; Thu, 1 Dec 2011 13:48:46 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pB1Bmkl3082750; Thu, 1 Dec 2011 13:48:46 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 1 Dec 2011 13:48:46 +0200 From: Kostik Belousov To: Giovanni Trematerra Message-ID: <20111201114846.GI50300@deviant.kiev.zoral.com.ua> References: <201110051656.p95Gu6Cw020744@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LAfrv7inJS3zgkKF" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: src-committers@freebsd.org, peterjeremy@acm.org, John Baldwin , svn-src-all@freebsd.org, Attilio Rao , svn-src-head@freebsd.org, Jeff Roberson Subject: Re: svn commit: r226042 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 11:48:52 -0000 --LAfrv7inJS3zgkKF Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 30, 2011 at 10:01:12PM +0100, Giovanni Trematerra wrote: > On Wed, Oct 5, 2011 at 6:56 PM, Konstantin Belousov wro= te: > > Author: kib > > Date: Wed Oct =9A5 16:56:06 2011 > > New Revision: 226042 > > URL: http://svn.freebsd.org/changeset/base/226042 > > > > Log: > > =9ASupply unique (st_dev, st_ino) value pair for the fstat(2) done on t= he pipes. > > > > =9AReviewed by: =9Ajhb, Peter Jeremy > > =9AMFC after: =9A =9A2 weeks > > > > Modified: > > =9Ahead/sys/kern/sys_pipe.c > > =9Ahead/sys/sys/pipe.h > > >=20 > Hi Konstantin, > unfortunately your commit introduces a performance penalty of about 3% > documented below in a real workload. > I guess that fstat(2) on the pipes is seldom used so we could just be lazy > and alloc a new unr number inside pipe_stat instead of during pipe creati= on. > In that case if an application doesn't need fstat(2) on the pipes it > won't be charged > the cost of alloc_unr/free_unr for the fake inode number. > The patch I propose, furthermore, fix a panic in the case alloc_unr > failed to allocate > a new unr number and return -1. This is because ino_t is unsigned and the= test > pipe_ino > 0 into pipeclose would be true, calling then free_unr when > it hasn't to. > The proposed patch was tested with a regression test code that you can fi= nd here >=20 > http://www.trematerra.net/patches/pipe-fstat.c >=20 > Feel free to add it under tools/regression/pipe/ >=20 > Here the proposed patch: >=20 > http://www.trematerra.net/patches/lazy_inoalloc.diff >=20 > Here the report of the benchmark: >=20 > Configuration > 10.0-CURRENT updated to r22807. > kern.smp.disabled=3D1 in /boot/loader.conf > kernel config GENERIC without debugging options. >=20 > The first result of any test was discarded and not reported here. >=20 > here the result of three executions of > # make -s buildkernel > note that I managed to compile the same identical source files > for all the tests. >=20 > r22807 with r226042 reverted (time in seconds) > 527, 527, 527 >=20 > r22807 (time in seconds) > 544, 544, 544 >=20 > r22807M with the proposed patch (time in seconds) > 527, 528, 528 >=20 > ministat output: >=20 > x r22807 with r226042 reverted > + r22807 > * r22807M with the proposed patch > +------------------------------------------------------------------------= ------+ > |+ * = x| > |* * = x| > ||__A_M| = A| > +------------------------------------------------------------------------= ------+ > N Min Max Median Avg Stdd= ev > x 3 544 544 544 544 = 0 > + 3 527 527 527 527 = 0 > Difference at 95.0% confidence > -17 +/- 0 > -3.125% +/- 0% > (Student's t, pooled s =3D 0) > * 3 527 528 528 527.66667 0.577350= 27 > Difference at 95.0% confidence > -16.3333 +/- 0.925333 > -3.00245% +/- 0.170098% > (Student's t, pooled s =3D 0.408248) >=20 > -- > Gianni Thank you for looking at this. I committed the test, and the fix for the call to free_unr(-1). Regarding the lazy allocation of the inode number, I agree with the idea, but have some reservations against the implementation. If several threads call fstat(2) on the same pipe which inode is not yet initialized, then I see a race in the patch. The easiest workaround is to cover the inode allocation with the pipe lock. Also, I find the return of ENOMEM from fstat(2) somewhat questionable. The error code is not documented as allowed for the syscall. I prefer to not fail the fstat(2) if lazy allocation failed, but return some fake value for inode instead. Updated patch is below. diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 2b6eb66..19fc98f 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -569,12 +569,7 @@ pipe_create(pipe, backing) /* If we're not backing this pipe, no need to do anything. */ error =3D 0; } - if (error =3D=3D 0) { - pipe->pipe_ino =3D alloc_unr(pipeino_unr); - if (pipe->pipe_ino =3D=3D -1) - /* pipeclose will clear allocated kva */ - error =3D ENOMEM; - } + pipe->pipe_ino =3D -1; return (error); } =20 @@ -1398,16 +1393,40 @@ pipe_stat(fp, ub, active_cred, td) struct ucred *active_cred; struct thread *td; { - struct pipe *pipe =3D fp->f_data; + struct pipe *pipe; + int new_unr; #ifdef MAC int error; +#endif =20 + pipe =3D fp->f_data; PIPE_LOCK(pipe); +#ifdef MAC error =3D mac_pipe_check_stat(active_cred, pipe->pipe_pair); - PIPE_UNLOCK(pipe); - if (error) + if (error) { + PIPE_UNLOCK(pipe); return (error); + } #endif + /* + * Lazily allocate an inode number for the pipe. Most pipe + * users do not call stat(2) on the pipe, which means that + * postponing the inode allocation until it is must be returned to + * userland is useful. If alloc_unr failed, assign st_ino + * zero instead of returning an error. + * Special pipe_ino values: + * -1 - not yet initialized; + * 0 - alloc_unr failed, return 0 as st_ino forever. + */ + if (pipe->pipe_ino =3D=3D (ino_t)-1) { + new_unr =3D alloc_unr(pipeino_unr); + if (new_unr !=3D -1) + pipe->pipe_ino =3D new_unr; + else + pipe->pipe_ino =3D 0; + } + PIPE_UNLOCK(pipe); + bzero(ub, sizeof(*ub)); ub->st_mode =3D S_IFIFO; ub->st_blksize =3D PAGE_SIZE; --LAfrv7inJS3zgkKF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7XaZ4ACgkQC3+MBN1Mb4j0LQCgixhFoA6HSPTmR9Y7kKjZRbsJ 1REAoL60t5QFAcrCNxcENgYb306HMy2m =AIsa -----END PGP SIGNATURE----- --LAfrv7inJS3zgkKF-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 13:36:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF19106564A; Thu, 1 Dec 2011 13:36:31 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 589238FC18; Thu, 1 Dec 2011 13:36:30 +0000 (UTC) Received: by qadc10 with SMTP id c10so1660152qad.13 for ; Thu, 01 Dec 2011 05:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=UvwqCWkzAJvV6S7FRJ9d633iC8cjOTr+wIMCDqkc6Gg=; b=YWBtZy+P1fHbOkmdsnHyJ3gwMk6E6jr9YqEyLrZWeBGrG+fxTkJaLQcOxCqWI3estU wAwGQx7HvEzNtG0nUWFaNVxyqAR+Gu7UygC6TNtPV2+hB8M+bMZadO2s7LdAZDmSEpKd IPJ1MGIWx+nv4NqE3G2NHHU44JfCwC9DdwqPw= MIME-Version: 1.0 Received: by 10.229.68.196 with SMTP id w4mr1279178qci.256.1322746588990; Thu, 01 Dec 2011 05:36:28 -0800 (PST) Sender: giovanni.trematerra@gmail.com Received: by 10.229.13.6 with HTTP; Thu, 1 Dec 2011 05:36:28 -0800 (PST) In-Reply-To: <20111201114846.GI50300@deviant.kiev.zoral.com.ua> References: <201110051656.p95Gu6Cw020744@svn.freebsd.org> <20111201114846.GI50300@deviant.kiev.zoral.com.ua> Date: Thu, 1 Dec 2011 14:36:28 +0100 X-Google-Sender-Auth: 4wxPF7aGWi4QSCVdYPumzgzoWnA Message-ID: From: Giovanni Trematerra To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, peterjeremy@acm.org, John Baldwin , svn-src-all@freebsd.org, Attilio Rao , svn-src-head@freebsd.org, Jeff Roberson Subject: Re: svn commit: r226042 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 13:36:31 -0000 2011/12/1 Kostik Belousov : > On Wed, Nov 30, 2011 at 10:01:12PM +0100, Giovanni Trematerra wrote: >> On Wed, Oct 5, 2011 at 6:56 PM, Konstantin Belousov wr= ote: >> > Author: kib >> > Date: Wed Oct =A05 16:56:06 2011 >> > New Revision: 226042 >> > URL: http://svn.freebsd.org/changeset/base/226042 >> > >> > Log: >> > =A0Supply unique (st_dev, st_ino) value pair for the fstat(2) done on = the pipes. >> > >> > =A0Reviewed by: =A0jhb, Peter Jeremy >> > =A0MFC after: =A0 =A02 weeks >> > >> > Modified: >> > =A0head/sys/kern/sys_pipe.c >> > =A0head/sys/sys/pipe.h >> > >> >> Hi Konstantin, >> unfortunately your commit introduces a performance penalty of about 3% >> documented below in a real workload. >> I guess that fstat(2) on the pipes is seldom used so we could just be la= zy >> and alloc a new unr number inside pipe_stat instead of during pipe creat= ion. >> In that case if an application doesn't need fstat(2) on the pipes it >> won't be charged >> the cost of alloc_unr/free_unr for the fake inode number. >> The patch I propose, furthermore, fix a panic in the case alloc_unr >> failed to allocate >> a new unr number and return -1. This is because ino_t is unsigned and th= e test >> pipe_ino > 0 into pipeclose would be true, calling then free_unr when >> it hasn't to. >> The proposed patch was tested with a regression test code that you can f= ind here >> >> http://www.trematerra.net/patches/pipe-fstat.c >> >> Feel free to add it under tools/regression/pipe/ >> >> Here the proposed patch: >> >> http://www.trematerra.net/patches/lazy_inoalloc.diff >> > Thank you for looking at this. > I committed the test, and the fix for the call to free_unr(-1). Thank you. > Regarding the lazy allocation of the inode number, I agree with the idea, > but have some reservations against the implementation. If several threads > call fstat(2) on the same pipe which inode is not yet initialized, then > I see a race in the patch. The easiest workaround is to cover the inode > allocation with the pipe lock. Ops my bad. you're right. > > Also, I find the return of ENOMEM from fstat(2) somewhat questionable. Th= e > error code is not documented as allowed for the syscall. I prefer to > not fail the fstat(2) if lazy allocation failed, but return some fake > value for inode instead. > It seems to me a good compromise. I agree with you that return ENOMEM from fstat(2) isn't ideal although Linux does. We should document this behavior in man page though IMO. I'll provide a patch to man page as soon as possible if others are no objections at your updated patch and if that is ok for you. Thank you. -- Gianni From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 13:53:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 625381065672; Thu, 1 Dec 2011 13:53:09 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50F318FC0C; Thu, 1 Dec 2011 13:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1Dr9PG047763; Thu, 1 Dec 2011 13:53:09 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1Dr9HN047761; Thu, 1 Dec 2011 13:53:09 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112011353.pB1Dr9HN047761@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 1 Dec 2011 13:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228179 - stable/9/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 13:53:09 -0000 Author: gabor Date: Thu Dec 1 13:53:08 2011 New Revision: 228179 URL: http://svn.freebsd.org/changeset/base/228179 Log: MFC 228093 - Fix behavior of --null to match GNU grep MFC 228097 - Call warnx() instead of errx() if a directory is not readable when using a recursive search. This is the expected behavior instead of aborting. Approved by: re (kib) Modified: stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Thu Dec 1 11:36:41 2011 (r228178) +++ stable/9/usr.bin/grep/util.c Thu Dec 1 13:53:08 2011 (r228179) @@ -130,7 +130,9 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - errx(2, "%s: %s", p->fts_path, strerror(p->fts_errno)); + notfound = true; + if(!sflag) + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; case FTS_D: /* FALLTHROUGH */ @@ -246,9 +248,9 @@ procfile(const char *fn) printf("%u\n", c); } if (lflag && !qflag && c != 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (Lflag && !qflag && c == 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) printf(getstr(8), fn); @@ -440,13 +442,13 @@ printline(struct str *line, int sep, reg int i, n = 0; if (!hflag) { - if (nullflag == 0) + if (!nullflag) { fputs(line->file, stdout); - else { + ++n; + } else { printf("%s", line->file); putchar(0); } - ++n; } if (nflag) { if (n > 0) From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 13:53:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7415C1065675; Thu, 1 Dec 2011 13:53:34 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 635838FC14; Thu, 1 Dec 2011 13:53:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1DrYlm047808; Thu, 1 Dec 2011 13:53:34 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1DrYQL047806; Thu, 1 Dec 2011 13:53:34 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112011353.pB1DrYQL047806@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 1 Dec 2011 13:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228180 - releng/9.0/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 13:53:34 -0000 Author: gabor Date: Thu Dec 1 13:53:33 2011 New Revision: 228180 URL: http://svn.freebsd.org/changeset/base/228180 Log: MFC 228093 - Fix behavior of --null to match GNU grep MFC 228097 - Call warnx() instead of errx() if a directory is not readable when using a recursive search. This is the expected behavior instead of aborting. Approved by: re (kib) Modified: releng/9.0/usr.bin/grep/util.c Directory Properties: releng/9.0/usr.bin/grep/ (props changed) Modified: releng/9.0/usr.bin/grep/util.c ============================================================================== --- releng/9.0/usr.bin/grep/util.c Thu Dec 1 13:53:08 2011 (r228179) +++ releng/9.0/usr.bin/grep/util.c Thu Dec 1 13:53:33 2011 (r228180) @@ -130,7 +130,9 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - errx(2, "%s: %s", p->fts_path, strerror(p->fts_errno)); + notfound = true; + if(!sflag) + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; case FTS_D: /* FALLTHROUGH */ @@ -246,9 +248,9 @@ procfile(const char *fn) printf("%u\n", c); } if (lflag && !qflag && c != 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (Lflag && !qflag && c == 0) - printf("%s\n", fn); + printf("%s%c", fn, nullflag ? 0 : '\n'); if (c && !cflag && !lflag && !Lflag && binbehave == BINFILE_BIN && f->binary && !qflag) printf(getstr(8), fn); @@ -440,13 +442,13 @@ printline(struct str *line, int sep, reg int i, n = 0; if (!hflag) { - if (nullflag == 0) + if (!nullflag) { fputs(line->file, stdout); - else { + ++n; + } else { printf("%s", line->file); putchar(0); } - ++n; } if (nflag) { if (n > 0) From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 15:01:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE4E21065677; Thu, 1 Dec 2011 15:01:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE6248FC1B; Thu, 1 Dec 2011 15:01:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1F1Nrb050263; Thu, 1 Dec 2011 15:01:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1F1NHX050261; Thu, 1 Dec 2011 15:01:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112011501.pB1F1NHX050261@svn.freebsd.org> From: John Baldwin Date: Thu, 1 Dec 2011 15:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228181 - head/sbin/sysctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:01:24 -0000 Author: jhb Date: Thu Dec 1 15:01:23 2011 New Revision: 228181 URL: http://svn.freebsd.org/changeset/base/228181 Log: If the -d flag is specified, ignore any new values specified and only display the descriptions of specified nodes. Reported by: Jason Hellenthal jhell of dataix net MFC after: 2 weeks Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Thu Dec 1 13:53:33 2011 (r228180) +++ head/sbin/sysctl/sysctl.c Thu Dec 1 15:01:23 2011 (r228181) @@ -201,7 +201,7 @@ parse(char *string) if (oidfmt(mib, len, fmt, &kind)) err(1, "couldn't find format of oid '%s'", bufp); - if (newval == NULL) { + if (newval == NULL || dflag) { if ((kind & CTLTYPE) == CTLTYPE_NODE) { if (dflag) { i = show_var(mib, len); From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 15:11:47 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F4A61065672; Thu, 1 Dec 2011 15:11:47 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 178558FC0C; Thu, 1 Dec 2011 15:11:46 +0000 (UTC) Received: from lstewart1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 84DA97E820; Fri, 2 Dec 2011 02:11:44 +1100 (EST) Message-ID: <4ED79930.60307@freebsd.org> Date: Fri, 02 Dec 2011 02:11:44 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111016 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jung-uk Kim References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <4ED4D89D.9000904@freebsd.org> <4ED5049E.60307@freebsd.org> <201111291309.20419.jkim@FreeBSD.org> In-Reply-To: <201111291309.20419.jkim@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, Julien Ridoux , Ben Kaduk , Benjamin Kaduk , svn-src-head@FreeBSD.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:11:47 -0000 On 11/30/11 05:09, Jung-uk Kim wrote: > On Tuesday 29 November 2011 11:13 am, Lawrence Stewart wrote: >> On 11/30/11 00:05, Lawrence Stewart wrote: >>> On 11/28/11 14:59, Benjamin Kaduk wrote: >>>> On Wed, 23 Nov 2011, Lawrence Stewart wrote: >>>>> On 11/23/11 17:42, Julien Ridoux wrote: >> >> [snip] >> >>>>>> What is your favourite option? >>>>> >>>>> FreeBSD parlance is to ask what colour you would like to paint >>>>> the bikeshed ;) >>>>> >>>>> As I've never experienced the pain John refers to, I'll defer >>>>> to the wisdom of others on whether the proposed patch will >>>>> create pain down the road. I think it's ok, but if consensus is >>>>> 8bytes per packet isn't going to break the bank, I guess we >>>>> just go for it - but I guess I am cautious about this route as >>>>> we can push a lot of packets per second through the stack. >>>> >>>> Since other people seem to be keeping quiet, I'll add that I'm >>>> in favor of just always adding the 8 bytes per packet. >>> >>> Julien and I discussed this at length today, and agree that for >>> head, we'll add the new bh_ffcounter member to the BPF header >>> unconditionally. >>> >>> Thanks to you and John for the input. >>> >>> I'm going to revert r227778 in order to start form a clean slate, >>> and add two separate patches. One will reintegrate FFCLOCK >>> support with BPF without breaking the ABI. A follow up patch will >>> bump the ffclock version and add the bh_ffcounter to the bpf >>> header (after the timestamp member). Then a final patch will bump >>> __FreeBSD_version and add a note to UPDATING about recompiling to >>> get kernel/world in sync, which should seal the deal. >> >> Here's the first of the patches: >> >> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_intact >> abi_10.x.r228130.patch > > I only glanced at it but it looks very close to what I wanted to > suggest. Final candidate patch is at: http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_intactabi_10.x.r228180.patch Assuming it passes the "make tinderbox" build I'm currently running and no further input is received from interested parties, I plan to commit it in ~10 hours. Changes since the r228130 patch I sent previously: - The new flags in bpf.h are added unconditionally so that they can always be referenced at compile time and a decision made at runtime as to whether a flag will be set or not. Using one of the new flags when the kernel doesn't have FFCLOCK compiled in results in the flag being ignored. An app should check for the existence of the "ffclock" kernel feature or the "kern.sysclock" sysctl tree before attempting to use the flags. - This patch will hopefully be MFCed at some point, so I added a CTASSERT to bpf.c to ensure that the ABI of structs bpf_hdr32, bpf_hdr and bpf_xhdr remains intact when FFCLOCK is enabled and the union of a ffcounter and struct timeval32/timeval/bpf_ts is switched in. - bpf_gettime() more comprehensively covers all the possible cases of flag combination and does sensible things for each case (even though some cases are rather silly). - The snippet of code at the beginning of catchpacket() that was manipulating the struct bintime derived from bpf_gettime() was gross and has been removed in favour of selecting the right {get}bin{up}time() function call in bpf_gettime(). - bpf.4 man page updated - Proposed commit message at top of patch updated If you'd like to look it over closely but can't do it in the next 10 hours or so, let me know and I'll postpone committing. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 15:15:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B0901065673; Thu, 1 Dec 2011 15:15:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59DEE8FC13; Thu, 1 Dec 2011 15:15:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1FFD82050739; Thu, 1 Dec 2011 15:15:13 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1FFDad050737; Thu, 1 Dec 2011 15:15:13 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112011515.pB1FFDad050737@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 1 Dec 2011 15:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228182 - stable/9/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:15:13 -0000 Author: glebius Date: Thu Dec 1 15:15:12 2011 New Revision: 228182 URL: http://svn.freebsd.org/changeset/base/228182 Log: MFhead r228150: Return value should be conditional on return value of pfsync_defer_ptr() PR: kern/162947 Submitted by: Matthieu Kraus Approved by: re (kib) Modified: stable/9/sys/contrib/pf/net/pf.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/contrib/pf/ (props changed) Modified: stable/9/sys/contrib/pf/net/pf.c ============================================================================== --- stable/9/sys/contrib/pf/net/pf.c Thu Dec 1 15:01:23 2011 (r228181) +++ stable/9/sys/contrib/pf/net/pf.c Thu Dec 1 15:15:12 2011 (r228182) @@ -3770,8 +3770,8 @@ pf_test_rule(struct pf_rule **rm, struct * replies through it. */ #ifdef __FreeBSD__ - if (pfsync_defer_ptr != NULL) - pfsync_defer_ptr(*sm, m); + if (pfsync_defer_ptr != NULL && + pfsync_defer_ptr(*sm, m)) #else if (pfsync_defer(*sm, m)) #endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 15:20:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B5C1065670; Thu, 1 Dec 2011 15:20:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B25D98FC1E; Thu, 1 Dec 2011 15:20:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1FKaoh050968; Thu, 1 Dec 2011 15:20:36 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1FKaTh050966; Thu, 1 Dec 2011 15:20:36 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112011520.pB1FKaTh050966@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 1 Dec 2011 15:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228183 - releng/9.0/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:20:36 -0000 Author: glebius Date: Thu Dec 1 15:20:36 2011 New Revision: 228183 URL: http://svn.freebsd.org/changeset/base/228183 Log: MFhead r228150: Return value should be conditional on return value of pfsync_defer_ptr() PR: kern/162947 Submitted by: Matthieu Kraus Approved by: re (kib) Modified: releng/9.0/sys/contrib/pf/net/pf.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) Modified: releng/9.0/sys/contrib/pf/net/pf.c ============================================================================== --- releng/9.0/sys/contrib/pf/net/pf.c Thu Dec 1 15:15:12 2011 (r228182) +++ releng/9.0/sys/contrib/pf/net/pf.c Thu Dec 1 15:20:36 2011 (r228183) @@ -3770,8 +3770,8 @@ pf_test_rule(struct pf_rule **rm, struct * replies through it. */ #ifdef __FreeBSD__ - if (pfsync_defer_ptr != NULL) - pfsync_defer_ptr(*sm, m); + if (pfsync_defer_ptr != NULL && + pfsync_defer_ptr(*sm, m)) #else if (pfsync_defer(*sm, m)) #endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 15:33:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71174106566B; Thu, 1 Dec 2011 15:33:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 614678FC12; Thu, 1 Dec 2011 15:33:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1FXxTu051493; Thu, 1 Dec 2011 15:33:59 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1FXxol051489; Thu, 1 Dec 2011 15:33:59 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112011533.pB1FXxol051489@svn.freebsd.org> From: John Baldwin Date: Thu, 1 Dec 2011 15:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228184 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:33:59 -0000 Author: jhb Date: Thu Dec 1 15:33:58 2011 New Revision: 228184 URL: http://svn.freebsd.org/changeset/base/228184 Log: Add Pedro Giffuni (pfg) as a new src committer. I will be mentoring him. Pedro will be working on ext2fs changes among other tasks. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Thu Dec 1 15:20:36 2011 (r228183) +++ svnadmin/conf/access Thu Dec 1 15:33:58 2011 (r228184) @@ -181,6 +181,7 @@ olli pb peadar peter peter@wemm.org +pfg phantom philip phk Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Dec 1 15:20:36 2011 (r228183) +++ svnadmin/conf/mentors Thu Dec 1 15:33:58 2011 (r228184) @@ -26,6 +26,7 @@ kargl das melifaro ae Co-mentor: kib miwi rwatson nork imp +pfg jhb randi cperciva ray adrian rdivacky rpaulo From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 15:59:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FCF41065670; Thu, 1 Dec 2011 15:59:57 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id CF5D18FC08; Thu, 1 Dec 2011 15:59:55 +0000 (UTC) Received: by faak28 with SMTP id k28so2021914faa.13 for ; Thu, 01 Dec 2011 07:59:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.128.77 with SMTP id j13mr8118911bks.124.1322755194655; Thu, 01 Dec 2011 07:59:54 -0800 (PST) Received: by 10.223.111.75 with HTTP; Thu, 1 Dec 2011 07:59:54 -0800 (PST) X-Originating-IP: [209.66.78.50] In-Reply-To: <4ED6B7CA.7050108@FreeBSD.org> References: <1769030615.700252.1322693541806.JavaMail.root@erie.cs.uoguelph.ca> <4ED6B7CA.7050108@FreeBSD.org> Date: Thu, 1 Dec 2011 10:59:54 -0500 Message-ID: From: Mark Saad To: Doug Barton Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable-7@freebsd.org, src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Rick Macklem , Rick Macklem Subject: Re: svn commit: r227549 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:59:57 -0000 On Wed, Nov 30, 2011 at 6:10 PM, Doug Barton wrote: > On 11/30/2011 14:52, Rick Macklem wrote: >> I'm relatively new to FreeBSD, but I've never heard of an MFC to a >> Release branch. (As far as I know, if it ever happens, it's for a >> serious errata or security issue.) > > You are correct sir. :) > So how would I ever see this in an official release as an errata fix ? -- mark saad | nonesuch@longcount.org From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 16:43:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id D60CC106566B; Thu, 1 Dec 2011 16:43:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Lawrence Stewart Date: Thu, 1 Dec 2011 11:43:25 -0500 User-Agent: KMail/1.6.2 References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <201111291309.20419.jkim@FreeBSD.org> <4ED79930.60307@freebsd.org> In-Reply-To: <4ED79930.60307@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112011143.27707.jkim@FreeBSD.org> Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , Benjamin Kaduk , svn-src-head@freebsd.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 16:43:35 -0000 On Thursday 01 December 2011 10:11 am, Lawrence Stewart wrote: > On 11/30/11 05:09, Jung-uk Kim wrote: > > On Tuesday 29 November 2011 11:13 am, Lawrence Stewart wrote: > >> On 11/30/11 00:05, Lawrence Stewart wrote: > >>> On 11/28/11 14:59, Benjamin Kaduk wrote: > >>>> On Wed, 23 Nov 2011, Lawrence Stewart wrote: > >>>>> On 11/23/11 17:42, Julien Ridoux wrote: > >> > >> [snip] > >> > >>>>>> What is your favourite option? > >>>>> > >>>>> FreeBSD parlance is to ask what colour you would like to > >>>>> paint the bikeshed ;) > >>>>> > >>>>> As I've never experienced the pain John refers to, I'll defer > >>>>> to the wisdom of others on whether the proposed patch will > >>>>> create pain down the road. I think it's ok, but if consensus > >>>>> is 8bytes per packet isn't going to break the bank, I guess > >>>>> we just go for it - but I guess I am cautious about this > >>>>> route as we can push a lot of packets per second through the > >>>>> stack. > >>>> > >>>> Since other people seem to be keeping quiet, I'll add that I'm > >>>> in favor of just always adding the 8 bytes per packet. > >>> > >>> Julien and I discussed this at length today, and agree that for > >>> head, we'll add the new bh_ffcounter member to the BPF header > >>> unconditionally. > >>> > >>> Thanks to you and John for the input. > >>> > >>> I'm going to revert r227778 in order to start form a clean > >>> slate, and add two separate patches. One will reintegrate > >>> FFCLOCK support with BPF without breaking the ABI. A follow up > >>> patch will bump the ffclock version and add the bh_ffcounter to > >>> the bpf header (after the timestamp member). Then a final patch > >>> will bump __FreeBSD_version and add a note to UPDATING about > >>> recompiling to get kernel/world in sync, which should seal the > >>> deal. > >> > >> Here's the first of the patches: > >> > >> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_int > >>act abi_10.x.r228130.patch > > > > I only glanced at it but it looks very close to what I wanted to > > suggest. > > Final candidate patch is at: > > http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_intact >abi_10.x.r228180.patch > > Assuming it passes the "make tinderbox" build I'm currently running > and no further input is received from interested parties, I plan to > commit it in ~10 hours. > > Changes since the r228130 patch I sent previously: > > - The new flags in bpf.h are added unconditionally so that they can > always be referenced at compile time and a decision made at runtime > as to whether a flag will be set or not. Using one of the new flags > when the kernel doesn't have FFCLOCK compiled in results in the > flag being ignored. An app should check for the existence of the > "ffclock" kernel feature or the "kern.sysclock" sysctl tree before > attempting to use the flags. > > - This patch will hopefully be MFCed at some point, so I added a > CTASSERT to bpf.c to ensure that the ABI of structs bpf_hdr32, > bpf_hdr and bpf_xhdr remains intact when FFCLOCK is enabled and the > union of a ffcounter and struct timeval32/timeval/bpf_ts is > switched in. > > - bpf_gettime() more comprehensively covers all the possible cases > of flag combination and does sensible things for each case (even > though some cases are rather silly). > > - The snippet of code at the beginning of catchpacket() that was > manipulating the struct bintime derived from bpf_gettime() was > gross and has been removed in favour of selecting the right > {get}bin{up}time() function call in bpf_gettime(). I did that to reduce branching. Since you are introducing more branches, it warrants a function pointer now. Jung-uk Kim > - bpf.4 man page updated > > - Proposed commit message at top of patch updated > > > If you'd like to look it over closely but can't do it in the next > 10 hours or so, let me know and I'll postpone committing. > > Cheers, > Lawrence From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 18:46:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41748106566C; Thu, 1 Dec 2011 18:46:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3058A8FC13; Thu, 1 Dec 2011 18:46:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1IkT83057398; Thu, 1 Dec 2011 18:46:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1IkTEc057395; Thu, 1 Dec 2011 18:46:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112011846.pB1IkTEc057395@svn.freebsd.org> From: John Baldwin Date: Thu, 1 Dec 2011 18:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228185 - in head/sys: fs/nfsserver nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 18:46:29 -0000 Author: jhb Date: Thu Dec 1 18:46:28 2011 New Revision: 228185 URL: http://svn.freebsd.org/changeset/base/228185 Log: Enhance the sequential access heuristic used to perform readahead in the NFS server and reuse it for writes as well to allow writes to the backing store to be clustered. - Use a prime number for the size of the heuristic table (1017 is not prime). - Move the logic to locate a heuristic entry from the table and compute the sequential count out of VOP_READ() and into a separate routine. - Use the logic from sequential_heuristic() in vfs_vnops.c to update the seqcount when a sequential access is performed rather than just increasing seqcount by 1. This lets the clustering count ramp up faster. - Allow for some reordering of RPCs and if it is detected leave the current seqcount as-is rather than dropping back to a seqcount of 1. Also, when out of order access is encountered, cut seqcount in half rather than dropping it all the way back to 1 to further aid with reordering. - Fix the new NFS server to properly update the next offset after a successful VOP_READ() so that the readahead actually works. Some of these changes came from an earlier patch by Bjorn Gronwall that was forwarded to me by bde@. Discussed with: bde, rmacklem, fs@ Submitted by: Bjorn Gronwall (1, 4) MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/nfsserver/nfs_serv.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Thu Dec 1 15:33:58 2011 (r228184) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Thu Dec 1 18:46:28 2011 (r228185) @@ -90,20 +90,78 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, issue_de SYSCTL_INT(_vfs_nfsd, OID_AUTO, enable_locallocks, CTLFLAG_RW, &nfsrv_dolocallocks, 0, "Enable nfsd to acquire local locks on files"); -#define NUM_HEURISTIC 1017 +#define MAX_REORDERED_RPC 16 +#define NUM_HEURISTIC 1031 #define NHUSE_INIT 64 #define NHUSE_INC 16 #define NHUSE_MAX 2048 static struct nfsheur { struct vnode *nh_vp; /* vp to match (unreferenced pointer) */ - off_t nh_nextr; /* next offset for sequential detection */ + off_t nh_nextoff; /* next offset for sequential detection */ int nh_use; /* use count for selection */ int nh_seqcount; /* heuristic */ } nfsheur[NUM_HEURISTIC]; /* + * Heuristic to detect sequential operation. + */ +static struct nfsheur * +nfsrv_sequential_heuristic(struct uio *uio, struct vnode *vp) +{ + struct nfsheur *nh; + int hi, try; + + /* Locate best candidate. */ + try = 32; + hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; + nh = &nfsheur[hi]; + while (try--) { + if (nfsheur[hi].nh_vp == vp) { + nh = &nfsheur[hi]; + break; + } + if (nfsheur[hi].nh_use > 0) + --nfsheur[hi].nh_use; + hi = (hi + 1) % NUM_HEURISTIC; + if (nfsheur[hi].nh_use < nh->nh_use) + nh = &nfsheur[hi]; + } + + /* Initialize hint if this is a new file. */ + if (nh->nh_vp != vp) { + nh->nh_vp = vp; + nh->nh_nextoff = uio->uio_offset; + nh->nh_use = NHUSE_INIT; + if (uio->uio_offset == 0) + nh->nh_seqcount = 4; + else + nh->nh_seqcount = 1; + } + + /* Calculate heuristic. */ + if ((uio->uio_offset == 0 && nh->nh_seqcount > 0) || + uio->uio_offset == nh->nh_nextoff) { + /* See comments in vfs_vnops.c:sequential_heuristic(). */ + nh->nh_seqcount += howmany(uio->uio_resid, 16384); + if (nh->nh_seqcount > IO_SEQMAX) + nh->nh_seqcount = IO_SEQMAX; + } else if (qabs(uio->uio_offset - nh->nh_nextoff) <= MAX_REORDERED_RPC * + imax(vp->v_mount->mnt_stat.f_iosize, uio->uio_resid)) { + /* Probably a reordered RPC, leave seqcount alone. */ + } else if (nh->nh_seqcount > 1) { + nh->nh_seqcount /= 2; + } else { + nh->nh_seqcount = 0; + } + nh->nh_use += NHUSE_INC; + if (nh->nh_use > NHUSE_MAX) + nh->nh_use = NHUSE_MAX; + return (nh); +} + +/* * Get attributes into nfsvattr structure. */ int @@ -567,60 +625,11 @@ nfsvno_read(struct vnode *vp, off_t off, int i; struct iovec *iv; struct iovec *iv2; - int error = 0, len, left, siz, tlen, ioflag = 0, hi, try = 32; + int error = 0, len, left, siz, tlen, ioflag = 0; struct mbuf *m2 = NULL, *m3; struct uio io, *uiop = &io; struct nfsheur *nh; - /* - * Calculate seqcount for heuristic - */ - /* - * Locate best candidate - */ - - hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; - nh = &nfsheur[hi]; - - while (try--) { - if (nfsheur[hi].nh_vp == vp) { - nh = &nfsheur[hi]; - break; - } - if (nfsheur[hi].nh_use > 0) - --nfsheur[hi].nh_use; - hi = (hi + 1) % NUM_HEURISTIC; - if (nfsheur[hi].nh_use < nh->nh_use) - nh = &nfsheur[hi]; - } - - if (nh->nh_vp != vp) { - nh->nh_vp = vp; - nh->nh_nextr = off; - nh->nh_use = NHUSE_INIT; - if (off == 0) - nh->nh_seqcount = 4; - else - nh->nh_seqcount = 1; - } - - /* - * Calculate heuristic - */ - - if ((off == 0 && nh->nh_seqcount > 0) || off == nh->nh_nextr) { - if (++nh->nh_seqcount > IO_SEQMAX) - nh->nh_seqcount = IO_SEQMAX; - } else if (nh->nh_seqcount > 1) { - nh->nh_seqcount = 1; - } else { - nh->nh_seqcount = 0; - } - nh->nh_use += NHUSE_INC; - if (nh->nh_use > NHUSE_MAX) - nh->nh_use = NHUSE_MAX; - ioflag |= nh->nh_seqcount << IO_SEQSHIFT; - len = left = NFSM_RNDUP(cnt); m3 = NULL; /* @@ -665,6 +674,8 @@ nfsvno_read(struct vnode *vp, off_t off, uiop->uio_resid = len; uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; + nh = nfsrv_sequential_heuristic(uiop, vp); + ioflag |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); FREE((caddr_t)iv2, M_TEMP); if (error) { @@ -672,6 +683,7 @@ nfsvno_read(struct vnode *vp, off_t off, *mpp = NULL; goto out; } + nh->nh_nextoff = uiop->uio_offset; tlen = len - uiop->uio_resid; cnt = cnt < tlen ? cnt : tlen; tlen = NFSM_RNDUP(cnt); @@ -700,6 +712,7 @@ nfsvno_write(struct vnode *vp, off_t off struct iovec *iv; int ioflags, error; struct uio io, *uiop = &io; + struct nfsheur *nh; MALLOC(ivp, struct iovec *, cnt * sizeof (struct iovec), M_TEMP, M_WAITOK); @@ -733,7 +746,11 @@ nfsvno_write(struct vnode *vp, off_t off uiop->uio_segflg = UIO_SYSSPACE; NFSUIOPROC(uiop, p); uiop->uio_offset = off; + nh = nfsrv_sequential_heuristic(uiop, vp); + ioflags |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_WRITE(vp, uiop, ioflags, cred); + if (error == 0) + nh->nh_nextoff = uiop->uio_offset; FREE((caddr_t)iv, M_TEMP); NFSEXITCODE(error); Modified: head/sys/nfsserver/nfs_serv.c ============================================================================== --- head/sys/nfsserver/nfs_serv.c Thu Dec 1 15:33:58 2011 (r228184) +++ head/sys/nfsserver/nfs_serv.c Thu Dec 1 18:46:28 2011 (r228185) @@ -107,14 +107,15 @@ FEATURE(nfsserver, "NFS server"); #define MAX_COMMIT_COUNT (1024 * 1024) -#define NUM_HEURISTIC 1017 +#define MAX_REORDERED_RPC 16 +#define NUM_HEURISTIC 1031 #define NHUSE_INIT 64 #define NHUSE_INC 16 #define NHUSE_MAX 2048 static struct nfsheur { struct vnode *nh_vp; /* vp to match (unreferenced pointer) */ - off_t nh_nextr; /* next offset for sequential detection */ + off_t nh_nextoff; /* next offset for sequential detection */ int nh_use; /* use count for selection */ int nh_seqcount; /* heuristic */ } nfsheur[NUM_HEURISTIC]; @@ -187,6 +188,63 @@ nfsrv_lockedpair_nd(int vfs1, struct nam } /* + * Heuristic to detect sequential operation. + */ +static struct nfsheur * +nfsrv_sequential_heuristic(struct uio *uio, struct vnode *vp) +{ + struct nfsheur *nh; + int hi, try; + + /* Locate best candidate. */ + try = 32; + hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; + nh = &nfsheur[hi]; + while (try--) { + if (nfsheur[hi].nh_vp == vp) { + nh = &nfsheur[hi]; + break; + } + if (nfsheur[hi].nh_use > 0) + --nfsheur[hi].nh_use; + hi = (hi + 1) % NUM_HEURISTIC; + if (nfsheur[hi].nh_use < nh->nh_use) + nh = &nfsheur[hi]; + } + + /* Initialize hint if this is a new file. */ + if (nh->nh_vp != vp) { + nh->nh_vp = vp; + nh->nh_nextoff = uio->uio_offset; + nh->nh_use = NHUSE_INIT; + if (uio->uio_offset == 0) + nh->nh_seqcount = 4; + else + nh->nh_seqcount = 1; + } + + /* Calculate heuristic. */ + if ((uio->uio_offset == 0 && nh->nh_seqcount > 0) || + uio->uio_offset == nh->nh_nextoff) { + /* See comments in vfs_vnops.c:sequential_heuristic(). */ + nh->nh_seqcount += howmany(uio->uio_resid, 16384); + if (nh->nh_seqcount > IO_SEQMAX) + nh->nh_seqcount = IO_SEQMAX; + } else if (qabs(uio->uio_offset - nh->nh_nextoff) <= MAX_REORDERED_RPC * + imax(vp->v_mount->mnt_stat.f_iosize, uio->uio_resid)) { + /* Probably a reordered RPC, leave seqcount alone. */ + } else if (nh->nh_seqcount > 1) { + nh->nh_seqcount /= 2; + } else { + nh->nh_seqcount = 0; + } + nh->nh_use += NHUSE_INC; + if (nh->nh_use > NHUSE_MAX) + nh->nh_use = NHUSE_MAX; + return (nh); +} + +/* * nfs v3 access service */ int @@ -843,7 +901,6 @@ nfsrv_read(struct nfsrv_descript *nfsd, /* * Calculate byte count to read */ - if (off >= vap->va_size) cnt = 0; else if ((off + reqlen) > vap->va_size) @@ -851,61 +908,6 @@ nfsrv_read(struct nfsrv_descript *nfsd, else cnt = reqlen; - /* - * Calculate seqcount for heuristic - */ - - { - int hi; - int try = 32; - - /* - * Locate best candidate - */ - - hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; - nh = &nfsheur[hi]; - - while (try--) { - if (nfsheur[hi].nh_vp == vp) { - nh = &nfsheur[hi]; - break; - } - if (nfsheur[hi].nh_use > 0) - --nfsheur[hi].nh_use; - hi = (hi + 1) % NUM_HEURISTIC; - if (nfsheur[hi].nh_use < nh->nh_use) - nh = &nfsheur[hi]; - } - - if (nh->nh_vp != vp) { - nh->nh_vp = vp; - nh->nh_nextr = off; - nh->nh_use = NHUSE_INIT; - if (off == 0) - nh->nh_seqcount = 4; - else - nh->nh_seqcount = 1; - } - - /* - * Calculate heuristic - */ - - if ((off == 0 && nh->nh_seqcount > 0) || off == nh->nh_nextr) { - if (++nh->nh_seqcount > IO_SEQMAX) - nh->nh_seqcount = IO_SEQMAX; - } else if (nh->nh_seqcount > 1) { - nh->nh_seqcount = 1; - } else { - nh->nh_seqcount = 0; - } - nh->nh_use += NHUSE_INC; - if (nh->nh_use > NHUSE_MAX) - nh->nh_use = NHUSE_MAX; - ioflag |= nh->nh_seqcount << IO_SEQSHIFT; - } - nfsm_reply(NFSX_POSTOPORFATTR(v3) + 3 * NFSX_UNSIGNED+nfsm_rndup(cnt)); if (v3) { tl = nfsm_build(u_int32_t *, NFSX_V3FATTR + 4 * NFSX_UNSIGNED); @@ -963,9 +965,11 @@ nfsrv_read(struct nfsrv_descript *nfsd, uiop->uio_resid = len; uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; + nh = nfsrv_sequential_heuristic(uiop, vp); + ioflag |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_READ(vp, uiop, IO_NODELOCKED | ioflag, cred); - off = uiop->uio_offset; - nh->nh_nextr = off; + if (error == 0) + nh->nh_nextoff = uiop->uio_offset; free((caddr_t)iv2, M_TEMP); if (error || (getret = VOP_GETATTR(vp, vap, cred))) { if (!error) @@ -1030,6 +1034,7 @@ nfsrv_write(struct nfsrv_descript *nfsd, int v3 = (nfsd->nd_flag & ND_NFSV3); struct mbuf *mb, *mreq; struct vnode *vp = NULL; + struct nfsheur *nh; nfsfh_t nfh; fhandle_t *fhp; struct uio io, *uiop = &io; @@ -1170,7 +1175,11 @@ nfsrv_write(struct nfsrv_descript *nfsd, uiop->uio_segflg = UIO_SYSSPACE; uiop->uio_td = NULL; uiop->uio_offset = off; + nh = nfsrv_sequential_heuristic(uiop, vp); + ioflags |= nh->nh_seqcount << IO_SEQSHIFT; error = VOP_WRITE(vp, uiop, ioflags, cred); + if (error == 0) + nh->nh_nextoff = uiop->uio_offset; /* Unlocked write. */ nfsrvstats.srvvop_writes++; free((caddr_t)iv, M_TEMP); From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 20:38:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA81E106564A; Thu, 1 Dec 2011 20:38:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF9A28FC17; Thu, 1 Dec 2011 20:38:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1Kcqnr061042; Thu, 1 Dec 2011 20:38:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1Kcqk4061040; Thu, 1 Dec 2011 20:38:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112012038.pB1Kcqk4061040@svn.freebsd.org> From: John Baldwin Date: Thu, 1 Dec 2011 20:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228187 - stable/9/sys/boot/i386/libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 20:38:53 -0000 Author: jhb Date: Thu Dec 1 20:38:52 2011 New Revision: 228187 URL: http://svn.freebsd.org/changeset/base/228187 Log: MFC 227389: Remove some debugging printfs. Approved by: re (bz) Modified: stable/9/sys/boot/i386/libi386/bioscd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/boot/i386/libi386/bioscd.c ============================================================================== --- stable/9/sys/boot/i386/libi386/bioscd.c Thu Dec 1 19:57:13 2011 (r228186) +++ stable/9/sys/boot/i386/libi386/bioscd.c Thu Dec 1 20:38:52 2011 (r228187) @@ -118,7 +118,6 @@ bc_bios2unit(int biosdev) int i; DEBUG("looking for bios device 0x%x", biosdev); - printf("looking for bios device 0x%x, nbcinfo=%d\n", biosdev, nbcinfo); for (i = 0; i < nbcinfo; i++) { DEBUG("bc unit %d is BIOS device 0x%x", i, bcinfo[i].bc_unit); if (bcinfo[i].bc_unit == biosdev) @@ -150,7 +149,6 @@ bc_init(void) int bc_add(int biosdev) { - printf("bc_add(%d)\n", biosdev); if (nbcinfo >= MAXBCDEV) return (-1); @@ -162,10 +160,8 @@ bc_add(int biosdev) v86.ds = VTOPSEG(&bcinfo[nbcinfo].bc_sp); v86.esi = VTOPOFF(&bcinfo[nbcinfo].bc_sp); v86int(); - if ((v86.eax & 0xff00) != 0) { - printf("CD probe failed, eax=0x%08x\n", v86.eax); + if ((v86.eax & 0xff00) != 0) return (-1); - } printf("BIOS CD is cd%d\n", nbcinfo); nbcinfo++; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 20:39:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8387D1065670; Thu, 1 Dec 2011 20:39:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5941B8FC1E; Thu, 1 Dec 2011 20:39:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1KdIxc061087; Thu, 1 Dec 2011 20:39:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1KdIQp061085; Thu, 1 Dec 2011 20:39:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112012039.pB1KdIQp061085@svn.freebsd.org> From: John Baldwin Date: Thu, 1 Dec 2011 20:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228188 - releng/9.0/sys/boot/i386/libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 20:39:18 -0000 Author: jhb Date: Thu Dec 1 20:39:18 2011 New Revision: 228188 URL: http://svn.freebsd.org/changeset/base/228188 Log: MFC 227389: Remove some debugging printfs. Approved by: re (bz) Modified: releng/9.0/sys/boot/i386/libi386/bioscd.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/amd64/include/xen/ (props changed) releng/9.0/sys/boot/ (props changed) releng/9.0/sys/boot/i386/efi/ (props changed) releng/9.0/sys/boot/ia64/efi/ (props changed) releng/9.0/sys/boot/ia64/ski/ (props changed) releng/9.0/sys/boot/powerpc/boot1.chrp/ (props changed) releng/9.0/sys/boot/powerpc/ofw/ (props changed) releng/9.0/sys/cddl/contrib/opensolaris/ (props changed) releng/9.0/sys/conf/ (props changed) releng/9.0/sys/contrib/dev/acpica/ (props changed) releng/9.0/sys/contrib/octeon-sdk/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) releng/9.0/sys/contrib/x86emu/ (props changed) Modified: releng/9.0/sys/boot/i386/libi386/bioscd.c ============================================================================== --- releng/9.0/sys/boot/i386/libi386/bioscd.c Thu Dec 1 20:38:52 2011 (r228187) +++ releng/9.0/sys/boot/i386/libi386/bioscd.c Thu Dec 1 20:39:18 2011 (r228188) @@ -118,7 +118,6 @@ bc_bios2unit(int biosdev) int i; DEBUG("looking for bios device 0x%x", biosdev); - printf("looking for bios device 0x%x, nbcinfo=%d\n", biosdev, nbcinfo); for (i = 0; i < nbcinfo; i++) { DEBUG("bc unit %d is BIOS device 0x%x", i, bcinfo[i].bc_unit); if (bcinfo[i].bc_unit == biosdev) @@ -150,7 +149,6 @@ bc_init(void) int bc_add(int biosdev) { - printf("bc_add(%d)\n", biosdev); if (nbcinfo >= MAXBCDEV) return (-1); @@ -162,10 +160,8 @@ bc_add(int biosdev) v86.ds = VTOPSEG(&bcinfo[nbcinfo].bc_sp); v86.esi = VTOPOFF(&bcinfo[nbcinfo].bc_sp); v86int(); - if ((v86.eax & 0xff00) != 0) { - printf("CD probe failed, eax=0x%08x\n", v86.eax); + if ((v86.eax & 0xff00) != 0) return (-1); - } printf("BIOS CD is cd%d\n", nbcinfo); nbcinfo++; From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 21:13:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1750106566C; Thu, 1 Dec 2011 21:13:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF0848FC17; Thu, 1 Dec 2011 21:13:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1LDfVk062187; Thu, 1 Dec 2011 21:13:41 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1LDfVm062182; Thu, 1 Dec 2011 21:13:41 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112012113.pB1LDfVm062182@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 21:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228189 - in stable/9/contrib/bind9: . bin/named lib/dns X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 21:13:42 -0000 Author: dougb Date: Thu Dec 1 21:13:41 2011 New Revision: 228189 URL: http://svn.freebsd.org/changeset/base/228189 Log: Upgrade to BIND 9.8.1-P1 to address the following DDOS bug: Recursive name servers are failing with an assertion: INSIST(! dns_rdataset_isassociated(sigrdataset)) At this time it is not thought that authoritative-only servers are affected, but information about this bug is evolving rapidly. Because it may be possible to trigger this bug even on networks that do not allow untrusted users to access the recursive name servers (perhaps via specially crafted e-mail messages, and/or malicious web sites) it is recommended that ALL operators of recursive name servers upgrade immediately. For more information see: https://www.isc.org/software/bind/advisories/cve-2011-4313 which will be updated as more information becomes available. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313 Approved by: re (kib) Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/lib/dns/rbtdb.c stable/9/contrib/bind9/version Directory Properties: stable/9/contrib/bind9/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Thu Dec 1 20:39:18 2011 (r228188) +++ stable/9/contrib/bind9/CHANGES Thu Dec 1 21:13:41 2011 (r228189) @@ -1,3 +1,9 @@ + --- 9.8.1-P1 released --- + +3218. [security] Cache lookup could return RRSIG data associated with + nonexistent records, leading to an assertion + failure. [RT #26590] + --- 9.8.1 released --- --- 9.8.1rc1 released --- Modified: stable/9/contrib/bind9/bin/named/query.c ============================================================================== --- stable/9/contrib/bind9/bin/named/query.c Thu Dec 1 20:39:18 2011 (r228188) +++ stable/9/contrib/bind9/bin/named/query.c Thu Dec 1 21:13:41 2011 (r228189) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.353.8.11 2011-06-09 03:14:03 marka Exp $ */ +/* $Id: query.c,v 1.353.8.11.4.1 2011-11-16 09:32:08 marka Exp $ */ /*! \file */ @@ -1393,11 +1393,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1438,8 +1436,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1889,10 +1888,8 @@ query_addadditional2(void *arg, dns_name goto setcache; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(! dns_rdataset_isassociated(sigrdataset)); + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { /* Remember the result as a cache */ Modified: stable/9/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- stable/9/contrib/bind9/lib/dns/rbtdb.c Thu Dec 1 20:39:18 2011 (r228188) +++ stable/9/contrib/bind9/lib/dns/rbtdb.c Thu Dec 1 21:13:41 2011 (r228189) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.310.8.5 2011-06-08 23:02:42 each Exp $ */ +/* $Id: rbtdb.c,v 1.310.8.5.4.1 2011-11-16 09:32:08 marka Exp $ */ /*! \file */ @@ -5053,7 +5053,7 @@ cache_find(dns_db_t *db, dns_name_t *nam rdataset); if (need_headerupdate(found, search.now)) update = found; - if (foundsig != NULL) { + if (!NEGATIVE(found) && foundsig != NULL) { bind_rdataset(search.rbtdb, node, foundsig, search.now, sigrdataset); if (need_headerupdate(foundsig, search.now)) @@ -5685,7 +5685,7 @@ cache_findrdataset(dns_db_t *db, dns_dbn } if (found != NULL) { bind_rdataset(rbtdb, rbtnode, found, now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(rbtdb, rbtnode, foundsig, now, sigrdataset); } Modified: stable/9/contrib/bind9/version ============================================================================== --- stable/9/contrib/bind9/version Thu Dec 1 20:39:18 2011 (r228188) +++ stable/9/contrib/bind9/version Thu Dec 1 21:13:41 2011 (r228189) @@ -1,4 +1,4 @@ -# $Id: version,v 1.53.8.9 2011-08-24 02:08:26 marka Exp $ +# $Id: version,v 1.53.8.9.6.1 2011-11-16 09:32:07 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=8 PATCHVER=1 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 21:18:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2301F1065673; Thu, 1 Dec 2011 21:18:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 113D68FC1B; Thu, 1 Dec 2011 21:18:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1LHxln062393; Thu, 1 Dec 2011 21:17:59 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1LHxg1062388; Thu, 1 Dec 2011 21:17:59 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112012117.pB1LHxg1062388@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Dec 2011 21:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228190 - in releng/9.0/contrib/bind9: . bin/named lib/dns X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 21:18:00 -0000 Author: dougb Date: Thu Dec 1 21:17:59 2011 New Revision: 228190 URL: http://svn.freebsd.org/changeset/base/228190 Log: Upgrade to BIND 9.8.1-P1 to address the following DDOS bug: Recursive name servers are failing with an assertion: INSIST(! dns_rdataset_isassociated(sigrdataset)) At this time it is not thought that authoritative-only servers are affected, but information about this bug is evolving rapidly. Because it may be possible to trigger this bug even on networks that do not allow untrusted users to access the recursive name servers (perhaps via specially crafted e-mail messages, and/or malicious web sites) it is recommended that ALL operators of recursive name servers upgrade immediately. For more information see: https://www.isc.org/software/bind/advisories/cve-2011-4313 which will be updated as more information becomes available. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4313 Approved by: re (kib) Modified: releng/9.0/contrib/bind9/CHANGES releng/9.0/contrib/bind9/bin/named/query.c releng/9.0/contrib/bind9/lib/dns/rbtdb.c releng/9.0/contrib/bind9/version Directory Properties: releng/9.0/contrib/bind9/ (props changed) Modified: releng/9.0/contrib/bind9/CHANGES ============================================================================== --- releng/9.0/contrib/bind9/CHANGES Thu Dec 1 21:13:41 2011 (r228189) +++ releng/9.0/contrib/bind9/CHANGES Thu Dec 1 21:17:59 2011 (r228190) @@ -1,3 +1,9 @@ + --- 9.8.1-P1 released --- + +3218. [security] Cache lookup could return RRSIG data associated with + nonexistent records, leading to an assertion + failure. [RT #26590] + --- 9.8.1 released --- --- 9.8.1rc1 released --- Modified: releng/9.0/contrib/bind9/bin/named/query.c ============================================================================== --- releng/9.0/contrib/bind9/bin/named/query.c Thu Dec 1 21:13:41 2011 (r228189) +++ releng/9.0/contrib/bind9/bin/named/query.c Thu Dec 1 21:17:59 2011 (r228190) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.353.8.11 2011-06-09 03:14:03 marka Exp $ */ +/* $Id: query.c,v 1.353.8.11.4.1 2011-11-16 09:32:08 marka Exp $ */ /*! \file */ @@ -1393,11 +1393,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1438,8 +1436,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1889,10 +1888,8 @@ query_addadditional2(void *arg, dns_name goto setcache; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(! dns_rdataset_isassociated(sigrdataset)); + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { /* Remember the result as a cache */ Modified: releng/9.0/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- releng/9.0/contrib/bind9/lib/dns/rbtdb.c Thu Dec 1 21:13:41 2011 (r228189) +++ releng/9.0/contrib/bind9/lib/dns/rbtdb.c Thu Dec 1 21:17:59 2011 (r228190) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rbtdb.c,v 1.310.8.5 2011-06-08 23:02:42 each Exp $ */ +/* $Id: rbtdb.c,v 1.310.8.5.4.1 2011-11-16 09:32:08 marka Exp $ */ /*! \file */ @@ -5053,7 +5053,7 @@ cache_find(dns_db_t *db, dns_name_t *nam rdataset); if (need_headerupdate(found, search.now)) update = found; - if (foundsig != NULL) { + if (!NEGATIVE(found) && foundsig != NULL) { bind_rdataset(search.rbtdb, node, foundsig, search.now, sigrdataset); if (need_headerupdate(foundsig, search.now)) @@ -5685,7 +5685,7 @@ cache_findrdataset(dns_db_t *db, dns_dbn } if (found != NULL) { bind_rdataset(rbtdb, rbtnode, found, now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(rbtdb, rbtnode, foundsig, now, sigrdataset); } Modified: releng/9.0/contrib/bind9/version ============================================================================== --- releng/9.0/contrib/bind9/version Thu Dec 1 21:13:41 2011 (r228189) +++ releng/9.0/contrib/bind9/version Thu Dec 1 21:17:59 2011 (r228190) @@ -1,4 +1,4 @@ -# $Id: version,v 1.53.8.9 2011-08-24 02:08:26 marka Exp $ +# $Id: version,v 1.53.8.9.6.1 2011-11-16 09:32:07 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=8 PATCHVER=1 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 21:42:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E49F106567E; Thu, 1 Dec 2011 21:42:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 401E18FC0A; Thu, 1 Dec 2011 21:42:55 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id E6C6546B0D; Thu, 1 Dec 2011 16:42:54 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7A00DB941; Thu, 1 Dec 2011 16:42:54 -0500 (EST) From: John Baldwin To: Mark Saad Date: Thu, 1 Dec 2011 16:42:53 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <1769030615.700252.1322693541806.JavaMail.root@erie.cs.uoguelph.ca> <4ED6B7CA.7050108@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112011642.53968.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 01 Dec 2011 16:42:54 -0500 (EST) Cc: svn-src-stable-7@freebsd.org, src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Doug Barton , Rick Macklem , Rick Macklem Subject: Re: svn commit: r227549 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 21:42:55 -0000 On Thursday, December 01, 2011 10:59:54 am Mark Saad wrote: > On Wed, Nov 30, 2011 at 6:10 PM, Doug Barton wrote: > > On 11/30/2011 14:52, Rick Macklem wrote: > >> I'm relatively new to FreeBSD, but I've never heard of an MFC to a > >> Release branch. (As far as I know, if it ever happens, it's for a > >> serious errata or security issue.) > > > > You are correct sir. :) > > > So how would I ever see this in an official release as an errata fix ? At this point you likely won't. The vast majority of patches to releases are only for security advisories. Very few errata are merged back to releases currently. It may be that we are too hesitant to do so, but the manpower overhead of actually getting the changes merged back and getting appropriate folks to sign off on everything is extremely high (and the exact process for getting an EN approved is not very clear or really even documented to my knowledge). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 22:50:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32ABC106564A; Thu, 1 Dec 2011 22:50:11 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 220E48FC0C; Thu, 1 Dec 2011 22:50:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB1MoB9f065245; Thu, 1 Dec 2011 22:50:11 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB1MoBJP065243; Thu, 1 Dec 2011 22:50:11 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112012250.pB1MoBJP065243@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 1 Dec 2011 22:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228191 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 22:50:11 -0000 Author: obrien Date: Thu Dec 1 22:50:10 2011 New Revision: 228191 URL: http://svn.freebsd.org/changeset/base/228191 Log: Ensure kldxref is run first. Currently both 'kldxref' and 'kld' depend on "FILESYSTEMS" and 'kld' is being run 8 scripts ahead of 'kldxref'. Reported by: dhw Modified: head/etc/rc.d/kld Modified: head/etc/rc.d/kld ============================================================================== --- head/etc/rc.d/kld Thu Dec 1 21:17:59 2011 (r228190) +++ head/etc/rc.d/kld Thu Dec 1 22:50:10 2011 (r228191) @@ -27,7 +27,7 @@ # $FreeBSD$ # # PROVIDE: kld -# REQUIRE: FILESYSTEMS +# REQUIRE: kldxref # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Thu Dec 1 22:23:49 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4DCC1065673; Thu, 1 Dec 2011 22:23:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 487198FC1C; Thu, 1 Dec 2011 22:23:36 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA19456; Fri, 02 Dec 2011 00:23:33 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RWF2T-0007nd-E7; Fri, 02 Dec 2011 00:23:33 +0200 Message-ID: <4ED7FE64.9010909@FreeBSD.org> Date: Fri, 02 Dec 2011 00:23:32 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111108 Thunderbird/8.0 MIME-Version: 1.0 To: Mark Saad References: <1769030615.700252.1322693541806.JavaMail.root@erie.cs.uoguelph.ca> <4ED6B7CA.7050108@FreeBSD.org> <201112011642.53968.jhb@freebsd.org> In-Reply-To: <201112011642.53968.jhb@freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 01 Dec 2011 23:17:09 +0000 Cc: Rick Macklem , John Baldwin , svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, Alfred Perlstein , Doug Barton , src-committers@FreeBSD.org, Rick Macklem , svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r227549 - stable/7/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 22:23:50 -0000 on 01/12/2011 23:42 John Baldwin said the following: > On Thursday, December 01, 2011 10:59:54 am Mark Saad wrote: >> On Wed, Nov 30, 2011 at 6:10 PM, Doug Barton wrote: >>> On 11/30/2011 14:52, Rick Macklem wrote: >>>> I'm relatively new to FreeBSD, but I've never heard of an MFC to a >>>> Release branch. (As far as I know, if it ever happens, it's for a >>>> serious errata or security issue.) >>> >>> You are correct sir. :) >>> >> So how would I ever see this in an official release as an errata fix ? > > At this point you likely won't. The vast majority of patches to releases are > only for security advisories. Very few errata are merged back to releases > currently. It may be that we are too hesitant to do so, but the manpower > overhead of actually getting the changes merged back and getting appropriate > folks to sign off on everything is extremely high (and the exact process for > getting an EN approved is not very clear or really even documented to my > knowledge). > Just to clarify - the fix will be in the future (official) releases from 8, 9 and so on branches. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 00:38:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32613106566C; Fri, 2 Dec 2011 00:38:48 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2194D8FC0A; Fri, 2 Dec 2011 00:38:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB20cmRu068630; Fri, 2 Dec 2011 00:38:48 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB20cmt6068628; Fri, 2 Dec 2011 00:38:48 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201112020038.pB20cmt6068628@svn.freebsd.org> From: Ken Smith Date: Fri, 2 Dec 2011 00:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 00:38:48 -0000 Author: kensmith Date: Fri Dec 2 00:38:47 2011 New Revision: 228192 URL: http://svn.freebsd.org/changeset/base/228192 Log: Add a screen that asks if the user would like to enable crash dumps, giving them a very brief description of the trade-offs. Whether the user opts in or out add an entry to what will become /etc/rc.conf explaining what dumpdev is and how to turn on/off crash dumps. The folks who handle interacting with users submitting PRs have asked for this. Reviewed by: nwhitehorn MFC after: 1 day Modified: head/usr.sbin/bsdinstall/scripts/services Modified: head/usr.sbin/bsdinstall/scripts/services ============================================================================== --- head/usr.sbin/bsdinstall/scripts/services Thu Dec 1 22:50:10 2011 (r228191) +++ head/usr.sbin/bsdinstall/scripts/services Fri Dec 2 00:38:47 2011 (r228192) @@ -26,6 +26,8 @@ # # $FreeBSD$ +: ${DIALOG_OK=0} + if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then eval `sed -e s/YES/on/I -e s/NO/off/I $BSDINSTALL_TMPETC/rc.conf.services` else @@ -51,3 +53,15 @@ for daemon in $DAEMONS; do echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services done +echo \# Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable >> \ + $BSDINSTALL_TMPETC/rc.conf.services + +dialog --backtitle "FreeBSD Installer" --title "Dumpdev Configuration" \ + --nocancel --yesno \ + "Would you like to enable crash dumps? If you start having problems with the system it can help the FreeBSD developers debug the problem. But the crash dumps can take up a lot of disk space in /var." 0 0 + +if [ $? -eq $DIALOG_OK ]; then + echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services +else + echo dumpdev=\"NO\" >> $BSDINSTALL_TMPETC/rc.conf.services +fi From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 01:06:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE1E8106566B; Fri, 2 Dec 2011 01:06:33 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDB2A8FC16; Fri, 2 Dec 2011 01:06:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB216XPX069544; Fri, 2 Dec 2011 01:06:33 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB216XCU069542; Fri, 2 Dec 2011 01:06:33 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112020106.pB216XCU069542@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 2 Dec 2011 01:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228193 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 01:06:34 -0000 Author: obrien Date: Fri Dec 2 01:06:33 2011 New Revision: 228193 URL: http://svn.freebsd.org/changeset/base/228193 Log: Tweak the r137233 fix to r136283 -- Code was making two send() attempts vs. the comment documented "If we are working with a privileged socket, then take only one attempt". Make the code match. Furthermore, critical privileged applications that [over] log a vast amount can look like a DoS to this code. Given it's unlikely the single reattempted send() will succeeded, avoid usurping the scheduler in a library API for a single non-critical facility in critical applications. Obtained from: Juniper Networks Discussed with: glebius Modified: head/lib/libc/gen/syslog.c Modified: head/lib/libc/gen/syslog.c ============================================================================== --- head/lib/libc/gen/syslog.c Fri Dec 2 00:38:47 2011 (r228192) +++ head/lib/libc/gen/syslog.c Fri Dec 2 01:06:33 2011 (r228193) @@ -265,7 +265,7 @@ vsyslog(int pri, const char *fmt, va_lis * 1) syslogd was restarted * 2) /var/run/log is out of socket buffer space, which * in most cases means local DoS. - * We attempt to reconnect to /var/run/log to take care of + * We attempt to reconnect to /var/run/log[priv] to take care of * case #1 and keep send()ing data to cover case #2 * to give syslogd a chance to empty its socket buffer. * @@ -281,13 +281,13 @@ vsyslog(int pri, const char *fmt, va_lis connectlog(); } do { + if (status == CONNPRIV) + break; _usleep(1); if (send(LogFile, tbuf, cnt, 0) >= 0) { THREAD_UNLOCK(); return; } - if (status == CONNPRIV) - break; } while (errno == ENOBUFS); } else { THREAD_UNLOCK(); From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 02:05:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6BD5106566C; Fri, 2 Dec 2011 02:05:26 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACA1F8FC0C; Fri, 2 Dec 2011 02:05:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB225Qwv071359; Fri, 2 Dec 2011 02:05:26 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB225Qu2071357; Fri, 2 Dec 2011 02:05:26 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112020205.pB225Qu2071357@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 2 Dec 2011 02:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228194 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 02:05:26 -0000 Author: nwhitehorn Date: Fri Dec 2 02:05:26 2011 New Revision: 228194 URL: http://svn.freebsd.org/changeset/base/228194 Log: Prevent user astonishment by providing the shell option at the end, after any installer-provided configuration files have been copied. This allows users to edit their fstab, if desired, and to see what the installer has placed in rc.conf. Requested by: phk MFC after: 1 day Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Fri Dec 2 01:06:33 2011 (r228193) +++ head/usr.sbin/bsdinstall/scripts/auto Fri Dec 2 02:05:26 2011 (r228194) @@ -157,7 +157,7 @@ finalconfig() { exec 3>&1 REVISIT=$(dialog --backtitle "FreeBSD Installer" \ --title "Final Configuration" --no-cancel --menu \ - "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \ + "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ "Exit" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ @@ -165,8 +165,7 @@ finalconfig() { "Network" "Networking configuration" \ "Services" "Set daemons to run on startup" \ "Time Zone" "Set system timezone" \ - "Handbook" "Install FreeBSD Handbook (requires network)" \ - "Shell" "Open a shell in the new system" 2>&1 1>&3) + "Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3) exec 3>&- case "$REVISIT" in @@ -198,15 +197,6 @@ finalconfig() { bsdinstall docsinstall finalconfig ;; - "Shell") - clear - echo This shell is operating in a chroot in the new system. \ - When finished making configuration changes, type \"exit\". - chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 - # Don't hose local rc.conf changes - cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual - finalconfig - ;; esac } @@ -222,5 +212,14 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; the rm -rf "$BSDINSTALL_FETCHDEST" fi +dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \ + --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 +if [ $? -eq 0 ]; then + clear + echo This shell is operating in a chroot in the new system. \ + When finished making configuration changes, type \"exit\". + chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 +fi + echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 02:19:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 633001065741; Fri, 2 Dec 2011 02:19:04 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 536218FC14; Fri, 2 Dec 2011 02:19:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB22J4Vj071887; Fri, 2 Dec 2011 02:19:04 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB22J48u071885; Fri, 2 Dec 2011 02:19:04 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201112020219.pB22J48u071885@svn.freebsd.org> From: Kevin Lo Date: Fri, 2 Dec 2011 02:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228195 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 02:19:04 -0000 Author: kevlo Date: Fri Dec 2 02:19:03 2011 New Revision: 228195 URL: http://svn.freebsd.org/changeset/base/228195 Log: Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list(). Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Fri Dec 2 02:05:26 2011 (r228194) +++ head/sys/dev/usb/wlan/if_urtw.c Fri Dec 2 02:19:03 2011 (r228195) @@ -1053,10 +1053,10 @@ urtw_init_locked(void *arg) if (!(sc->sc_flags & URTW_INIT_ONCE)) { ret = urtw_alloc_rx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; ret = urtw_alloc_tx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; sc->sc_flags |= URTW_INIT_ONCE; } From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 04:43:12 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56864106566C; Fri, 2 Dec 2011 04:43:12 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id BCB608FC19; Fri, 2 Dec 2011 04:43:11 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 3E49E7E820; Fri, 2 Dec 2011 15:43:10 +1100 (EST) Message-ID: <4ED8575D.2010405@freebsd.org> Date: Fri, 02 Dec 2011 15:43:09 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111127 Thunderbird/8.0 MIME-Version: 1.0 To: Jung-uk Kim References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <201111291309.20419.jkim@FreeBSD.org> <4ED79930.60307@freebsd.org> <201112011143.27707.jkim@FreeBSD.org> In-Reply-To: <201112011143.27707.jkim@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, Julien Ridoux , Ben Kaduk , Benjamin Kaduk , svn-src-head@FreeBSD.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 04:43:12 -0000 On 12/02/11 03:43, Jung-uk Kim wrote: > On Thursday 01 December 2011 10:11 am, Lawrence Stewart wrote: >> On 11/30/11 05:09, Jung-uk Kim wrote: >>> On Tuesday 29 November 2011 11:13 am, Lawrence Stewart wrote: >>>> On 11/30/11 00:05, Lawrence Stewart wrote: >>>>> On 11/28/11 14:59, Benjamin Kaduk wrote: >>>>>> On Wed, 23 Nov 2011, Lawrence Stewart wrote: >>>>>>> On 11/23/11 17:42, Julien Ridoux wrote: >>>> >>>> [snip] >>>> >>>>>>>> What is your favourite option? >>>>>>> >>>>>>> FreeBSD parlance is to ask what colour you would like to >>>>>>> paint the bikeshed ;) >>>>>>> >>>>>>> As I've never experienced the pain John refers to, I'll defer >>>>>>> to the wisdom of others on whether the proposed patch will >>>>>>> create pain down the road. I think it's ok, but if consensus >>>>>>> is 8bytes per packet isn't going to break the bank, I guess >>>>>>> we just go for it - but I guess I am cautious about this >>>>>>> route as we can push a lot of packets per second through the >>>>>>> stack. >>>>>> >>>>>> Since other people seem to be keeping quiet, I'll add that I'm >>>>>> in favor of just always adding the 8 bytes per packet. >>>>> >>>>> Julien and I discussed this at length today, and agree that for >>>>> head, we'll add the new bh_ffcounter member to the BPF header >>>>> unconditionally. >>>>> >>>>> Thanks to you and John for the input. >>>>> >>>>> I'm going to revert r227778 in order to start form a clean >>>>> slate, and add two separate patches. One will reintegrate >>>>> FFCLOCK support with BPF without breaking the ABI. A follow up >>>>> patch will bump the ffclock version and add the bh_ffcounter to >>>>> the bpf header (after the timestamp member). Then a final patch >>>>> will bump __FreeBSD_version and add a note to UPDATING about >>>>> recompiling to get kernel/world in sync, which should seal the >>>>> deal. >>>> >>>> Here's the first of the patches: >>>> >>>> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_int >>>> act abi_10.x.r228130.patch >>> >>> I only glanced at it but it looks very close to what I wanted to >>> suggest. >> >> Final candidate patch is at: >> >> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_intact >> abi_10.x.r228180.patch >> >> Assuming it passes the "make tinderbox" build I'm currently running >> and no further input is received from interested parties, I plan to >> commit it in ~10 hours. >> >> Changes since the r228130 patch I sent previously: >> >> - The new flags in bpf.h are added unconditionally so that they can >> always be referenced at compile time and a decision made at runtime >> as to whether a flag will be set or not. Using one of the new flags >> when the kernel doesn't have FFCLOCK compiled in results in the >> flag being ignored. An app should check for the existence of the >> "ffclock" kernel feature or the "kern.sysclock" sysctl tree before >> attempting to use the flags. >> >> - This patch will hopefully be MFCed at some point, so I added a >> CTASSERT to bpf.c to ensure that the ABI of structs bpf_hdr32, >> bpf_hdr and bpf_xhdr remains intact when FFCLOCK is enabled and the >> union of a ffcounter and struct timeval32/timeval/bpf_ts is >> switched in. >> >> - bpf_gettime() more comprehensively covers all the possible cases >> of flag combination and does sensible things for each case (even >> though some cases are rather silly). >> >> - The snippet of code at the beginning of catchpacket() that was >> manipulating the struct bintime derived from bpf_gettime() was >> gross and has been removed in favour of selecting the right >> {get}bin{up}time() function call in bpf_gettime(). > > I did that to reduce branching. Since you are introducing more > branches, it warrants a function pointer now. I see, thanks for the explanation. Could you elaborate a bit more about how you would implement the function pointer idea? I'm also curious in the !FFCLOCK case just how much overhead having the 2-layer nested if/else adds. I'm not an very optimisation savvy person, but I'm wondering if it's actually worth micro-optimising this code. My initial thoughts about your function pointer idea lead to adding a function pointer in the bpf_d and setting it to the appropriate function to get the timestamp from at bpf_d creation or ioctl time. Whilst I like this idea, I can't see how it would work given that the various functions involved in time/ffcounter stamp generation all have different signatures. We could have multiple variants of bpf_gettime() which each call the appropriate underlying functions to generate the appropriate stamp. Would add quite a lot of code but would reduce the overhead of calling bpf_gettime() to an indirect function call + the underlying stamp generation function call. This also solves the problem of multiple function signatures. We would also need to add the function pointer to the bpf_d struct which I guess breaks the ABI, something we're trying to avoid with this patch as we want to MFC it. Other ideas would be very welcome. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 09:09:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C87F2106564A; Fri, 2 Dec 2011 09:09:54 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B81BB8FC18; Fri, 2 Dec 2011 09:09:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB299sso084592; Fri, 2 Dec 2011 09:09:54 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB299sFk084589; Fri, 2 Dec 2011 09:09:54 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201112020909.pB299sFk084589@svn.freebsd.org> From: Max Khon Date: Fri, 2 Dec 2011 09:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228196 - in head: share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 09:09:54 -0000 Author: fjoe Date: Fri Dec 2 09:09:54 2011 New Revision: 228196 URL: http://svn.freebsd.org/changeset/base/228196 Log: Revert to conservative defaults. WITH_PROFILE is a default now. NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact so that the reversal to the WITHOUT_PROFILE will be easier in future. Added: head/tools/build/options/WITHOUT_PROFILE - copied, changed from r228148, head/tools/build/options/WITH_PROFILE Deleted: head/tools/build/options/WITH_PROFILE Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Dec 2 02:19:03 2011 (r228195) +++ head/share/mk/bsd.own.mk Fri Dec 2 09:09:54 2011 (r228196) @@ -383,6 +383,7 @@ __DEFAULT_YES_OPTIONS = \ PMC \ PORTSNAP \ PPP \ + PROFILE \ QUOTAS \ RCMDS \ RCS \ @@ -418,8 +419,7 @@ __DEFAULT_NO_OPTIONS = \ ICONV \ IDEA \ LIBCPLUSPLUS \ - OFED \ - PROFILE + OFED # # Default behaviour of some options depends on the architecture. Unfortunately Copied and modified: head/tools/build/options/WITHOUT_PROFILE (from r228148, head/tools/build/options/WITH_PROFILE) ============================================================================== --- head/tools/build/options/WITH_PROFILE Tue Nov 29 21:28:48 2011 (r228148, copy source) +++ head/tools/build/options/WITHOUT_PROFILE Fri Dec 2 09:09:54 2011 (r228196) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to build profiled libraries. +Set to avoid compiling profiled libraries. From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 09:28:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E2421065677; Fri, 2 Dec 2011 09:28:20 +0000 (UTC) (envelope-from fjoe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E2B78FC08; Fri, 2 Dec 2011 09:28:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB29SKMn085205; Fri, 2 Dec 2011 09:28:20 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB29SK1H085203; Fri, 2 Dec 2011 09:28:20 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201112020928.pB29SK1H085203@svn.freebsd.org> From: Max Khon Date: Fri, 2 Dec 2011 09:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228197 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 09:28:20 -0000 Author: fjoe Date: Fri Dec 2 09:28:19 2011 New Revision: 228197 URL: http://svn.freebsd.org/changeset/base/228197 Log: Regen. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Dec 2 09:09:54 2011 (r228196) +++ head/share/man/man5/src.conf.5 Fri Dec 2 09:28:19 2011 (r228197) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd December 1, 2011 +.Dd December 2, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -303,7 +303,7 @@ When set, the following options are also is set explicitly) .El .It Va WITH_CTF -.\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. @@ -820,9 +820,9 @@ and related files. Set to not build .Xr ppp 8 and related programs. -.It Va WITH_PROFILE +.It Va WITHOUT_PROFILE .\" from FreeBSD: head/tools/build/options/WITH_PROFILE 228143 2011-11-29 19:46:17Z fjoe -Set to build profiled libraries. +Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS .\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam Set to not build From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 09:58:22 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B4C106566C; Fri, 2 Dec 2011 09:58:22 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id A2D9E8FC0A; Fri, 2 Dec 2011 09:58:22 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id pB29ZnwI009312; Fri, 2 Dec 2011 01:35:50 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.4/Submit) id pB29Zn7d009311; Fri, 2 Dec 2011 01:35:49 -0800 (PST) (envelope-from obrien) Date: Fri, 2 Dec 2011 01:35:49 -0800 From: "David O'Brien" To: Max Khon Message-ID: <20111202093549.GA9075@dragon.NUXI.org> References: <201112020909.pB299sFk084589@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112020909.pB299sFk084589@svn.freebsd.org> X-Operating-System: FreeBSD 9.99-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228196 - in head: share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 09:58:22 -0000 On Fri, Dec 02, 2011 at 09:09:54AM +0000, Max Khon wrote: > Log: > Revert to conservative defaults. WITH_PROFILE is a default now. Thank you. > NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact > so that the reversal to the WITHOUT_PROFILE will be easier in future. As I mentioned, it may make sense to not build profiled libs by default in -stable. But if you do that, please add logic to 'make release' to build profiled libs -- putting them in either base.txz or proflibs.txz (or however you find tasteful). -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 09:58:22 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEFA91065676; Fri, 2 Dec 2011 09:58:22 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id CF6608FC0C; Fri, 2 Dec 2011 09:58:22 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id pB29eKol009360; Fri, 2 Dec 2011 01:40:20 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.4/Submit) id pB29eKjZ009359; Fri, 2 Dec 2011 01:40:20 -0800 (PST) (envelope-from obrien) Date: Fri, 2 Dec 2011 01:40:20 -0800 From: "David O'Brien" To: Max Khon Message-ID: <20111202094020.GB9075@dragon.NUXI.org> References: <201111301333.pAUDX92u099562@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111301333.pAUDX92u099562@svn.freebsd.org> X-Operating-System: FreeBSD 9.99-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228153 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 09:58:23 -0000 On Wed, Nov 30, 2011 at 01:33:09PM +0000, Max Khon wrote: > Log: > Generate ${NORMAL_CTFCONVERT} invocation without '@' modifier: > - ${NORMAL_CC} is also invoked without '@' > - Userland CTF support was changed previously to echo ctfconvert > invocations too Thank you for your work on cleaning up the CTF part of the build. Enabling WITH_CTF has been too different (and conflicting) from our other knobs. I also had local patches to not hide ctfconvert so one could easily see when they didn't have WITH_CTF enabled in the right magical incantations. Will you be MFC'ing the CTF build work? Please. :-) -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 09:59:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 984521065673; Fri, 2 Dec 2011 09:59:20 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id F35D78FC1A; Fri, 2 Dec 2011 09:59:19 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 7D22EE3F07A; Fri, 2 Dec 2011 10:44:17 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t2fHZYanPHhF; Fri, 2 Dec 2011 10:44:14 +0100 (CET) Received: from goofy01.vnodelab.local (unknown [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id 52AA6E3F079; Fri, 2 Dec 2011 10:44:13 +0100 (CET) Date: Fri, 2 Dec 2011 10:44:11 +0100 From: Joel Dahl To: Ken Smith Message-ID: <20111202094411.GJ23987@goofy01.vnodelab.local> References: <201112020038.pB20cmt6068628@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112020038.pB20cmt6068628@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 09:59:20 -0000 On 02-12-2011 0:38, Ken Smith wrote: > Author: kensmith > Date: Fri Dec 2 00:38:47 2011 > New Revision: 228192 > URL: http://svn.freebsd.org/changeset/base/228192 > > Log: > Add a screen that asks if the user would like to enable crash dumps, > giving them a very brief description of the trade-offs. Whether the > user opts in or out add an entry to what will become /etc/rc.conf > explaining what dumpdev is and how to turn on/off crash dumps. The folks > who handle interacting with users submitting PRs have asked for this. Hmm. Two things I'd like to bring up: * Not specifically aimed at this commit, but my recommendation would be that we keep bsdinstall as simple as possible: installing FreeBSD should require a minimum amount of keystrokes. I realise this is just one more screen, but I hope we don't turn bsdinstall into a configuration utility where you can disable/enable just about anything in rc.conf. * Mentioning future system crashes during installation feels awkward. Is that really what we want? I understand the problem and how this helps us with debugging, but this is like saying to users that what they are installing is unstable and that it'll eventuelly crash and die. I know we discussed ways of making crash dumps smarter in order to not fill up /var, which in turn would allow us to always have it on. Maybe that is the right path? -- Joel From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 10:02:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80F83106564A; Fri, 2 Dec 2011 10:02:49 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 709B68FC0A; Fri, 2 Dec 2011 10:02:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2A2nmK086397; Fri, 2 Dec 2011 10:02:49 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2A2nsE086395; Fri, 2 Dec 2011 10:02:49 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201112021002.pB2A2nsE086395@svn.freebsd.org> From: Fabien Thomas Date: Fri, 2 Dec 2011 10:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228198 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 10:02:49 -0000 Author: fabient Date: Fri Dec 2 10:02:49 2011 New Revision: 228198 URL: http://svn.freebsd.org/changeset/base/228198 Log: Update Westmere uncore event exception list. Submitted by: Davide Italiano MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Fri Dec 2 09:28:19 2011 (r228197) +++ head/sys/dev/hwpmc/hwpmc_core.c Fri Dec 2 10:02:49 2011 (r228198) @@ -1479,6 +1479,10 @@ iap_event_westmere_ok_on_counter(enum pm /* * Events valid only on counter 0. */ + case PMC_EV_IAP_EVENT_60H_01H: + case PMC_EV_IAP_EVENT_60H_02H: + case PMC_EV_IAP_EVENT_60H_04H: + case PMC_EV_IAP_EVENT_60H_08H: case PMC_EV_IAP_EVENT_B3H_01H: case PMC_EV_IAP_EVENT_B3H_02H: case PMC_EV_IAP_EVENT_B3H_04H: @@ -1488,6 +1492,10 @@ iap_event_westmere_ok_on_counter(enum pm /* * Events valid only on counter 0, 1. */ + case PMC_EV_IAP_EVENT_4CH_01H: + case PMC_EV_IAP_EVENT_4EH_01H: + case PMC_EV_IAP_EVENT_4EH_02H: + case PMC_EV_IAP_EVENT_4EH_04H: case PMC_EV_IAP_EVENT_51H_01H: case PMC_EV_IAP_EVENT_51H_02H: case PMC_EV_IAP_EVENT_51H_04H: From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 11:55:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0E6E10656E4; Fri, 2 Dec 2011 11:55:16 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 378A18FC1A; Fri, 2 Dec 2011 11:55:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2BtA2F091380; Fri, 2 Dec 2011 11:55:10 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2BtA2W091372; Fri, 2 Dec 2011 11:55:10 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112021155.pB2BtA2W091372@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 2 Dec 2011 11:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228199 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 11:55:16 -0000 Author: obrien Date: Fri Dec 2 11:55:09 2011 New Revision: 228199 URL: http://svn.freebsd.org/changeset/base/228199 Log: Split sentences at period boundaries. Modified: head/lib/libc/locale/duplocale.3 head/lib/libc/locale/freelocale.3 head/lib/libc/locale/localeconv.3 head/lib/libc/locale/newlocale.3 head/lib/libc/locale/querylocale.3 head/lib/libc/locale/uselocale.3 head/lib/libc/locale/xlocale.3 Modified: head/lib/libc/locale/duplocale.3 ============================================================================== --- head/lib/libc/locale/duplocale.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/duplocale.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -36,25 +36,26 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h -.Ft locale_t +.In xlocale.h +.Ft locale_t .Fn duplocale "locale_t locale" .Sh DESCRIPTION Duplicates an existing .Fa locale_t -returning a new +returning a new .Fa locale_t that refers to the same locale values but has independent internal state. Various functions, such as .Xr mblen 3 -require presistent state. These functions formerly used static variables and -calls to them from multiple threads had undefined behavior. They now use -fields in the +require presistent state. +These functions formerly used static variables and calls to them from multiple +threads had undefined behavior. +They now use fields in the .Fa locale_t associated with the current thread by .Xr uselocale 3 . These calls are therefore only thread safe on threads with a unique per-thread -locale. +locale. .Pt The locale returned by this call must be freed with .Xr freelocale 3 . @@ -63,8 +64,9 @@ Ideally, .Xr uselocale 3 should make a copy of the .Fa locale_t -implicitly to ensure thread safety, and a copy of the global locale should be -installed lazily on each thread. The FreeBSD implementation does not do this, +implicitly to ensure thread safety, +and a copy of the global locale should be installed lazily on each thread. +The FreeBSD implementation does not do this, for compatibility with Darwin. .Sh SEE ALSO .Xr freelocale 3 , Modified: head/lib/libc/locale/freelocale.3 ============================================================================== --- head/lib/libc/locale/freelocale.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/freelocale.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -33,22 +33,22 @@ .Nm freelocale .Nd Frees a locale created with .Xr duplocale 3 -or +or .Xr newlocale 3 . .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft int .Fn freelocale "locale_t locale" .Sh DESCRIPTION Frees a .Fa locale_t . -This relinquishes any resources held exclusively by this locale. Note that -locales share reference-counted components, so a call to this function is not -guaranteed to free all of the components. +This relinquishes any resources held exclusively by this locale. +Note that locales share reference-counted components, +so a call to this function is not guaranteed to free all of the components. .Sh RETURN VALUES -Returns 0 on success or -1 on error. +Returns 0 on success or -1 on error. .Sh SEE ALSO .Xr duplocale 3 , .Xr localeconv 3 , Modified: head/lib/libc/locale/localeconv.3 ============================================================================== --- head/lib/libc/locale/localeconv.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/localeconv.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -203,7 +203,7 @@ result similarly denotes an unavailable The .Fn localeconv_l function takes an explicit locale parameter. For more information, see -.Xr xlocale 3 . +.Xr xlocale 3 . .Sh RETURN VALUES The .Fn localeconv @@ -212,9 +212,10 @@ which may be altered by later calls to .Xr setlocale 3 or .Fn localeconv . -The return value for +The return value for .Fn localeconv_l -is stored with the locale. It will remain valid until a subsequent call to +is stored with the locale. +It will remain valid until a subsequent call to .Xr freelocale 3 . If a thread-local locale is in effect then the return value from .Fn localeconv Modified: head/lib/libc/locale/newlocale.3 ============================================================================== --- head/lib/libc/locale/newlocale.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/newlocale.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -31,40 +31,44 @@ .Os .Sh NAME .Nm newlocale -.Nd Creates a new locale +.Nd Creates a new locale .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In xlocale -.Ft +.Ft .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION -Creates a new locale, inheriting some properties from an existing locale. The -.Fa mask +Creates a new locale, inheriting some properties from an existing locale. +The +.Fa mask defines the components that the new locale will have set to the locale with the -name specified in the +name specified in the .Fa locale -parameter. Any other components will be inherited from +parameter. +Any other components will be inherited from .Fa base . .Pt The .Fa mask is either .Fa LC_ALL_MASK, -indicating all possible locale components, or the logical OR of some -combination of the following: +indicating all possible locale components, +or the logical OR of some combination of the following: .Bl -tag -width "LC_MESSAGES_MASK" -offset indent .It LC_COLLATE_MASK -The locale for string collation routines. This controls alphabetic ordering in +The locale for string collation routines. +This controls alphabetic ordering in .Xr strcoll 3 - and + and .Xr strxfrm 3 . .It LC_CTYPE_MASK The locale for the .Xr ctype 3 and .Xr multibyte 3 -functions. This controls recognition of upper and lower case, alpha- betic or +functions. +This controls recognition of upper and lower case, alphabetic or non-alphabetic characters, and so on. .It LC_MESSAGES_MASK Set a locale for message catalogs, see @@ -76,8 +80,8 @@ the .Xr localeconv 3 function. .It LC_NUMERIC_MASK -Set a locale for formatting numbers. This controls the for- -matting of decimal points in input and output of floating +Set a locale for formatting numbers. +This controls the formatting of decimal points in input and output of floating point numbers in functions such as .Xr printf 3 and @@ -95,7 +99,8 @@ This function uses the same rules for lo .Sh RETURN VALUES Returns a new, valid, .Fa locale_t -or NULL if an error occurs. You must free the returned locale with +or NULL if an error occurs. +You must free the returned locale with .Xr freelocale 3 . .Sh SEE ALSO .Xr duplocale 3 , Modified: head/lib/libc/locale/querylocale.3 ============================================================================== --- head/lib/libc/locale/querylocale.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/querylocale.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -36,15 +36,15 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft const char * .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Returns the name of the locale for the category specified by .Fa mask. This possible values for the mask are the same as those in -.Xr newlocale 3 . If more than one bit in the mask is set, the returned value -is undefined. +.Xr newlocale 3 . +If more than one bit in the mask is set, the returned value is undefined. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , Modified: head/lib/libc/locale/uselocale.3 ============================================================================== --- head/lib/libc/locale/uselocale.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/uselocale.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -36,17 +36,18 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In xlocale.h .Ft locale_t .Fn uselocale "locale_t locale" .Sh DESCRIPTION -Specifies the locale for this thread to use. Specifying +Specifies the locale for this thread to use. +Specifying .Fa LC_GLOBAL_LOCALE -disables the per-thread locale, while NULL returns the current locale without -setting a new one. +disables the per-thread locale, +while NULL returns the current locale without setting a new one. .Sh RETURN VALUES -Returns the previous locale, or LC_GLOBAL_LOCALE if this thread has no locale -associated with it. +Returns the previous locale, +or LC_GLOBAL_LOCALE if this thread has no locale associated with it. .Sh SEE ALSO .Xr duplocale 3 , .Xr freelocale 3 , @@ -55,5 +56,5 @@ associated with it. .Xr querylocale 3 , .Xr xlocale 3 .Sh STANDARDS -This function, conforms to +This function conforms to .St -p1003.1-2008 Modified: head/lib/libc/locale/xlocale.3 ============================================================================== --- head/lib/libc/locale/xlocale.3 Fri Dec 2 10:02:49 2011 (r228198) +++ head/lib/libc/locale/xlocale.3 Fri Dec 2 11:55:09 2011 (r228199) @@ -39,39 +39,45 @@ .In xlocale.h .Sh DESCRIPTION The extended locale support includes a set of functions for setting -thread-local locales, as well convenience functions for performing locale-aware +thread-local locales, +as well convenience functions for performing locale-aware calls with a specified locale. .Pp The core of the xlocale API is the .Fa locale_t -type. This is an opaque type encapsulating a locale. Instances of this can be -either set as the locale for a specific thread or passed directly to the +type. +This is an opaque type encapsulating a locale. +Instances of this can be either set as the locale for a specific thread or +passed directly to the .Fa _l -suffixed variants of various standard C functions. Two special +suffixed variants of various standard C functions. +Two special .Fa locale_t values are available: -.Bl -bullet -offset indent +.Bl -bullet -offset indent .It -NULL refers to the current locale for the thread, or to the global locale if no -locale has been set for this thread. +NULL refers to the current locale for the thread, +or to the global locale if no locale has been set for this thread. .It LC_GLOBAL_LOCALE refers to the global locale. .El .Pp -The global locale is the locale set with the +The global locale is the locale set with the .Xr setlocale 3 function. .Sh CAVEATS -The +The .Xr setlocale 3 -function, and others in the family, refer to the global locale. Other -functions that depend on the locale, however, will take the thread-local locale -if one has been set. This means that the idiom of setting the locale using +function, and others in the family, refer to the global locale. +Other functions that depend on the locale, however, +will take the thread-local locale if one has been set. +This means that the idiom of setting the locale using .Xr setlocale 3 , -calling a locale-dependent function, and then restoring the locale will not +calling a locale-dependent function, +and then restoring the locale will not have the expected behavior if the current thread has had a locale set using .Xr uselocale 3 . -You should avoid this idiom and prefer to use the +You should avoid this idiom and prefer to use the .Fa _l suffixed versions instead. .Sh SEE ALSO @@ -84,29 +90,34 @@ suffixed versions instead. .Sh CONVENIENCE FUNCTIONS The xlocale API includes a number of .Fa _l -suffixed convenience functions. These are variants of standard C functions -that have been modified to take an explicit +suffixed convenience functions. +These are variants of standard C functions +that have been modified to take an explicit .Fa locale_t -parameter as the final argument or, in the case of variadic functions, as an -additional argument directly before the format string. Each of these functions -accepts either NULL or LC_GLOBAL_LOCALE. In these functions, NULL refers to -the C locale, rather than the thread's current locale. If you wish to use the -thread's current locale, then use the unsuffixed version of the function. +parameter as the final argument or, in the case of variadic functions, +as an additional argument directly before the format string. +Each of these functions accepts either NULL or LC_GLOBAL_LOCALE. +In these functions, NULL refers to the C locale, +rather than the thread's current locale. +If you wish to use the thread's current locale, +then use the unsuffixed version of the function. .Pp -These functions are exposed by including +These functions are exposed by including .In xlocale.h .Em after -including the relevant headers for the standard variant. For example, the +including the relevant headers for the standard variant. +For example, the .Xr strtol_l 3 -function is exposed by including +function is exposed by including .In xlocale.h -after +after .In stdlib.h , which defines .Xr strtol 3 . .Pp -For reference, a complete list of the locale-aware functions that are available -in this form, along with the headers that expose them, is provided here: +For reference, +a complete list of the locale-aware functions that are available in this form, +along with the headers that expose them, is provided here: .Pp .Bl -tag -width " " .It In wctype.h @@ -117,7 +128,7 @@ in this form, along with the headers tha .Xr iswdigit_l 3 , .Xr iswgraph_l 3 , .Xr iswlower_l 3 , -.Xr iswprint_l 3 , +.Xr iswprint_l 3 , .Xr iswpunct_l 3 , .Xr iswspace_l 3 , .Xr iswupper_l 3 , @@ -264,7 +275,7 @@ The functions conform to .St -p1003.1-2008 . .Sh HISTORY -The xlocale APIs first appeared in Darwin 8.0. This implementation was -written by David Chisnall, under sponsorship from the FreeBSD Foundation and -first appeared in +The xlocale APIs first appeared in Darwin 8.0. +This implementation was written by David Chisnall, +under sponsorship from the FreeBSD Foundation and first appeared in .Fx 9.1 . From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 12:52:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 994CC106564A; Fri, 2 Dec 2011 12:52:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 881158FC17; Fri, 2 Dec 2011 12:52:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2CqX29093245; Fri, 2 Dec 2011 12:52:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2CqX61093240; Fri, 2 Dec 2011 12:52:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112021252.pB2CqX61093240@svn.freebsd.org> From: Alexander Motin Date: Fri, 2 Dec 2011 12:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228200 - in head: share/man/man4 sys/dev/ahci sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 12:52:33 -0000 Author: mav Date: Fri Dec 2 12:52:33 2011 New Revision: 228200 URL: http://svn.freebsd.org/changeset/base/228200 Log: Add hw.ahci.force tunable to control whether AHCI drivers should attach to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation. Enabled by default to get additional performance and functionality of AHCI when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if needed for some reason. MFC after: 1 month Modified: head/share/man/man4/ahci.4 head/sys/dev/ahci/ahci.c head/sys/dev/ata/chipsets/ata-ati.c head/sys/dev/ata/chipsets/ata-nvidia.c Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Fri Dec 2 11:55:09 2011 (r228199) +++ head/share/man/man4/ahci.4 Fri Dec 2 12:52:33 2011 (r228200) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2011 +.Dd December 2, 2011 .Dt AHCI 4 .Os .Sh NAME @@ -96,6 +96,9 @@ A manual bus reset is needed on device h .It Va hint.ahcich. Ns Ar X Ns Va .sata_rev setting to nonzero value limits maximum SATA revision (speed). Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. +.It Va hw.ahci.force +setting to nonzero value forces driver attach to some known AHCI-capable +chips even if they are configured for legacy IDE emulation. Default is 1. .El .Sh DESCRIPTION This driver provides the Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Fri Dec 2 11:55:09 2011 (r228199) +++ head/sys/dev/ahci/ahci.c Fri Dec 2 12:52:33 2011 (r228200) @@ -291,6 +291,9 @@ static struct { #define RECOVERY_REQUEST_SENSE 2 #define recovery_slot spriv_field1 +static int force_ahci = 1; +TUNABLE_INT("hw.ahci.force", &force_ahci); + static int ahci_probe(device_t dev) { @@ -308,7 +311,8 @@ ahci_probe(device_t dev) for (i = 0; ahci_ids[i].id != 0; i++) { if (ahci_ids[i].id == devid && ahci_ids[i].rev <= revid && - (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) { + (valid || (force_ahci == 1 && + !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) { /* Do not attach JMicrons with single PCI function. */ if (pci_get_vendor(dev) == 0x197b && (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) Modified: head/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ati.c Fri Dec 2 11:55:09 2011 (r228199) +++ head/sys/dev/ata/chipsets/ata-ati.c Fri Dec 2 12:52:33 2011 (r228200) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); /* local prototypes */ static int ata_ati_chipinit(device_t dev); +static int ata_ati_dumb_ch_attach(device_t dev); static int ata_ati_ixp700_ch_attach(device_t dev); static int ata_ati_setmode(device_t dev, int target, int mode); @@ -63,6 +64,8 @@ static int ata_ati_setmode(device_t dev, #define SII_MEMIO 1 #define SII_BUG 0x04 +static int force_ahci = 1; +TUNABLE_INT("hw.ahci.force", &force_ahci); /* * ATI chipset support functions @@ -111,7 +114,10 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_sii_chipinit; break; case ATI_AHCI: - ctlr->chipinit = ata_ahci_chipinit; + if (force_ahci == 1 || pci_get_subclass(dev) != PCIS_STORAGE_IDE) + ctlr->chipinit = ata_ahci_chipinit; + else + ctlr->chipinit = ata_ati_chipinit; break; } return (BUS_PROBE_DEFAULT); @@ -127,6 +133,11 @@ ata_ati_chipinit(device_t dev) if (ata_setup_interrupt(dev, ata_generic_intr)) return ENXIO; + if (ctlr->chip->cfg1 == ATI_AHCI) { + ctlr->ch_attach = ata_ati_dumb_ch_attach; + ctlr->setmode = ata_sata_setmode; + return (0); + } switch (ctlr->chip->chipid) { case ATA_ATI_IXP600: /* IXP600 only has 1 PATA channel */ @@ -165,6 +176,17 @@ ata_ati_chipinit(device_t dev) } static int +ata_ati_dumb_ch_attach(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ata_pci_ch_attach(dev)) + return ENXIO; + ch->flags |= ATA_SATA; + return (0); +} + +static int ata_ati_ixp700_ch_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); Modified: head/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-nvidia.c Fri Dec 2 11:55:09 2011 (r228199) +++ head/sys/dev/ata/chipsets/ata-nvidia.c Fri Dec 2 12:52:33 2011 (r228200) @@ -65,6 +65,8 @@ static int ata_nvidia_setmode(device_t d #define NVAHCI 0x04 #define NVNOFORCE 0x08 +static int force_ahci = 1; +TUNABLE_INT("hw.ahci.force", &force_ahci); /* * nVidia chipset support functions @@ -181,7 +183,7 @@ ata_nvidia_probe(device_t dev) ata_set_desc(dev); if ((ctlr->chip->cfg1 & NVAHCI) && - ((ctlr->chip->cfg1 & NVNOFORCE) == 0 || + ((force_ahci == 1 && (ctlr->chip->cfg1 & NVNOFORCE) == 0) || pci_get_subclass(dev) != PCIS_STORAGE_IDE)) ctlr->chipinit = ata_ahci_chipinit; else From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 13:18:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C37C7106566C; Fri, 2 Dec 2011 13:18:40 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id 7A5498FC1B; Fri, 2 Dec 2011 13:18:40 +0000 (UTC) Received: from [10.0.0.82] (unknown [217.157.7.210]) by csmtp3.one.com (Postfix) with ESMTPA id B954124062EF; Fri, 2 Dec 2011 13:18:38 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Erik Cederstrand In-Reply-To: <20111202094411.GJ23987@goofy01.vnodelab.local> Date: Fri, 2 Dec 2011 14:18:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <08BC9075-C4E8-4156-BAAF-C097B118B7B4@cederstrand.dk> References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> To: Joel Dahl , Robert Watson X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 13:18:40 -0000 Den 02/12/2011 kl. 10.44 skrev Joel Dahl: > On 02-12-2011 0:38, Ken Smith wrote: >> Author: kensmith >> Date: Fri Dec 2 00:38:47 2011 >> New Revision: 228192 >> URL: http://svn.freebsd.org/changeset/base/228192 >>=20 >> Log: >> Add a screen that asks if the user would like to enable crash dumps, >> giving them a very brief description of the trade-offs. Whether the >> user opts in or out add an entry to what will become /etc/rc.conf >> explaining what dumpdev is and how to turn on/off crash dumps. The = folks >> who handle interacting with users submitting PRs have asked for = this. >=20 > Hmm. Two things I'd like to bring up: >=20 > * Not specifically aimed at this commit, but my recommendation > would be that we keep bsdinstall as simple as possible: installing = FreeBSD > should require a minimum amount of keystrokes. I realise this is just = one > more screen, but I hope we don't turn bsdinstall into a configuration > utility where you can disable/enable just about anything in rc.conf. >=20 > * Mentioning future system crashes during installation feels awkward. = Is that > really what we want? I understand the problem and how this helps us = with > debugging, but this is like saying to users that what they are = installing > is unstable and that it'll eventuelly crash and die. I know we = discussed > ways of making crash dumps smarter in order to not fill up /var, = which in > turn would allow us to always have it on. Maybe that is the right = path? Maybe do away with the dialog, and then unconditionally enable textdump = in rc.conf, adding the magic so textdump_enable=3D"YES" sets up textdump = with sane defaults. Thanks, Erik= From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 13:45:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD911065670; Fri, 2 Dec 2011 13:45:57 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from localmailD.acsu.buffalo.edu (localmaild.acsu.buffalo.edu [128.205.5.208]) by mx1.freebsd.org (Postfix) with ESMTP id 3BB558FC15; Fri, 2 Dec 2011 13:45:57 +0000 (UTC) Received: from localmailD.acsu.buffalo.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 4C39C61942; Fri, 2 Dec 2011 08:30:30 -0500 (EST) Received: from localmailD.acsu.buffalo.edu (localhost [127.0.0.1]) by localmailD.acsu.buffalo.edu (Postfix) with ESMTP id 7128261946; Fri, 2 Dec 2011 08:30:28 -0500 (EST) Received: from smtp3.acsu.buffalo.edu (smtp3.acsu.buffalo.edu [128.205.5.226]) by localmailD.acsu.buffalo.edu (Prefixe) with ESMTP id 5AF7D61942; Fri, 2 Dec 2011 08:30:28 -0500 (EST) Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76]) (Authenticated sender: kensmith@buffalo.edu) by smtp3.acsu.buffalo.edu (Postfix) with ESMTPSA id 32F0649C86; Fri, 2 Dec 2011 08:30:28 -0500 (EST) From: Ken Smith To: Erik Cederstrand In-Reply-To: <08BC9075-C4E8-4156-BAAF-C097B118B7B4@cederstrand.dk> References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> <08BC9075-C4E8-4156-BAAF-C097B118B7B4@cederstrand.dk> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-JYpl3mggHpnXr7S1H54e" Date: Fri, 02 Dec 2011 08:30:18 -0500 Message-ID: <1322832618.99806.8.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-PM-EL-Spam-Prob: : 8% Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , Joel Dahl Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 13:45:57 -0000 --=-JYpl3mggHpnXr7S1H54e Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Fri, 2011-12-02 at 14:18 +0100, Erik Cederstrand wrote: > Den 02/12/2011 kl. 10.44 skrev Joel Dahl: >=20 > > On 02-12-2011 0:38, Ken Smith wrote: > >> Author: kensmith > >> Date: Fri Dec 2 00:38:47 2011 > >> New Revision: 228192 > >> URL: http://svn.freebsd.org/changeset/base/228192 > >>=20 > >> Log: > >> Add a screen that asks if the user would like to enable crash dumps, > >> giving them a very brief description of the trade-offs. Whether the > >> user opts in or out add an entry to what will become /etc/rc.conf > >> explaining what dumpdev is and how to turn on/off crash dumps. The f= olks > >> who handle interacting with users submitting PRs have asked for this. > >=20 > > Hmm. Two things I'd like to bring up: > >=20 > > * Not specifically aimed at this commit, but my recommendation > > would be that we keep bsdinstall as simple as possible: installing Fre= eBSD > > should require a minimum amount of keystrokes. I realise this is just = one > > more screen, but I hope we don't turn bsdinstall into a configuration > > utility where you can disable/enable just about anything in rc.conf. > >=20 > > * Mentioning future system crashes during installation feels awkward. I= s that > > really what we want? I understand the problem and how this helps us wi= th > > debugging, but this is like saying to users that what they are install= ing > > is unstable and that it'll eventuelly crash and die. I know we discuss= ed > > ways of making crash dumps smarter in order to not fill up /var, which= in > > turn would allow us to always have it on. Maybe that is the right path= ? >=20 > Maybe do away with the dialog, and then unconditionally enable textdump i= n rc.conf, adding the magic so textdump_enable=3D"YES" sets up textdump wit= h sane defaults. >=20 > Thanks, > Erik >=20 This just implements what we seemed to settle on during the latest round of several discussions we've had about this issue. It comes up each I've turned off dumpdev as part of converting head into a stable branch, which is a step that got started way before I started being the one to do it. I'll be happy to see what I just added go away but the pre-condition for that is infrastructure that prevents crash dumps (of any form, including textdumps) from filling up /var if the user turns out to be clueless about them and doesn't realize they should pay attention to them. At least as of the last time we discussed it this knob I just added is a compromise between people who worry about crash dumps going unattended and filling /var versus the people who want us to be able to collect debugging information from the users who submit PRs *and* provide an *extremely* easy way for said users to turn it on/off. I normally hate dragging what others do into the discussions but I know of several Linux's that offer to enable kdump in their installer so we're not alone in that regard. --=20 Ken Smith - From there to here, from here to | kensmith@freebsd.org there, funny things are everywhere. | - Theodor Geisel | --=-JYpl3mggHpnXr7S1H54e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk7Y0t4ACgkQ/G14VSmup/a+IQCaAiK/zglIs/hNew1qyyvcr03E Nz4An2LpCKD4cIb2JSUVqJF3ZioyovdX =OOzY -----END PGP SIGNATURE----- --=-JYpl3mggHpnXr7S1H54e-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 14:41:19 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13DDB106566B; Fri, 2 Dec 2011 14:41:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3D88FC15; Fri, 2 Dec 2011 14:41:18 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pB2EfF6i032060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 3 Dec 2011 01:41:16 +1100 Date: Sat, 3 Dec 2011 01:41:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Max Khon In-Reply-To: <201112020909.pB299sFk084589@svn.freebsd.org> Message-ID: <20111203012843.S2543@besplex.bde.org> References: <201112020909.pB299sFk084589@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228196 - in head: share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 14:41:19 -0000 On Fri, 2 Dec 2011, Max Khon wrote: > Log: > Revert to conservative defaults. WITH_PROFILE is a default now. > > NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact > so that the reversal to the WITHOUT_PROFILE will be easier in future. Thanks. Not building profiled libraries might have been best in 1993 when makeworld took hours (4-10?). When I optimized makeworld in 1998, it still took more than 1 hour but I removing profiling from it was intentionally left out (except for bootstrapping). It would have saved only a few minutes. Now, a whole makeworld should take a few minutes and the few extra seconds for profiling libraries doesn't matter. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 15:11:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7359106566B; Fri, 2 Dec 2011 15:11:34 +0000 (UTC) (envelope-from andre@albsmeier.net) Received: from pripjat.albsmeier.net (pripjat.albsmeier.net [88.198.4.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDAC8FC1B; Fri, 2 Dec 2011 15:11:33 +0000 (UTC) Received: from schlappy.albsmeier.net (57.44.166.190.f.p.codetel.net.do [190.166.44.57] (may be forged)) (authenticated bits=128) by pripjat.albsmeier.net (8.14.5/8.14.5) with ESMTP id pB2F0Skd066788; Fri, 2 Dec 2011 16:00:30 +0100 (CET) (envelope-from andre@albsmeier.net) Received: from schlappy.albsmeier.net (schlappy.albsmeier.net [127.0.0.1]) by schlappy.albsmeier.net (8.14.5/8.14.5) with ESMTP id pB2F0MRE015553; Fri, 2 Dec 2011 16:00:23 +0100 (CET) (envelope-from andre@schlappy.albsmeier.net) Received: (from andre@localhost) by schlappy.albsmeier.net (8.14.5/8.14.4/Submit) id pB2F0M9X015552; Fri, 2 Dec 2011 16:00:22 +0100 (CET) (envelope-from andre@schlappy.albsmeier.net) Date: Fri, 2 Dec 2011 16:00:22 +0100 From: Andre Albsmeier To: Ed Maste Message-ID: <20111202150022.GA14953@schlappy.albsmeier.net> References: <201111250403.pAP43bZG026036@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111250403.pAP43bZG026036@svn.freebsd.org> X-Echelon: Area51, Area51, Encryption, RSA, 727 X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r227961 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:11:34 -0000 On Fri, 25-Nov-2011 at 05:03:37 +0100, Ed Maste wrote: > Author: emaste > Date: Fri Nov 25 04:03:37 2011 > New Revision: 227961 > URL: http://svn.freebsd.org/changeset/base/227961 > > Log: > Add firmware update support for SCSI devices. > > ... > > Added: head/sbin/camcontrol/fwdownload.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sbin/camcontrol/fwdownload.c Fri Nov 25 04:03:37 2011 (r227961) > @@ -0,0 +1,380 @@ > +/*- > + * Copyright (c) 2011 Sandvine Incorporated. All rights reserved. > + * Copyright (c) 2002-2011 Andre Albsmeier > + * All rights reserved. > + * We should not forget Marc Frajola who sent me his ddys.c for updating IBM DDYS drives ages ago. He allowed me to use his code but wanted to be credited -- I think we should continue to honour his wish. His file contained the following note: * TeraSolutions IBM drive firmware update utility * * (C) Copyright 2000, TeraSolutions, Inc. All Rights Reserved. * This software contains proprietary trade secrets of * TeraSolutions, Inc. Redistribution without prior written * consent is prohibited. * * By Marc Frajola, 08/15/2000 and in fwprog.c I had him mentioned this way: * ... * Many thanks goes to Marc Frajola from * TeraSolutions for the initial idea and his programme for upgrading * the firmware of I*M DDYS drives ... * ... I think you guys find something that is appropriate... Thanks, -Andre From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 15:17:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BFFE106566B; Fri, 2 Dec 2011 15:17:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 210898FC0A; Fri, 2 Dec 2011 15:17:41 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id CBE2346B3B; Fri, 2 Dec 2011 10:17:40 -0500 (EST) Received: from John-Baldwins-MacBook-Air.local (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3721BB91E; Fri, 2 Dec 2011 10:17:40 -0500 (EST) Message-ID: <4ED8EC14.6000000@FreeBSD.org> Date: Fri, 02 Dec 2011 10:17:40 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Joel Dahl References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> In-Reply-To: <20111202094411.GJ23987@goofy01.vnodelab.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 02 Dec 2011 10:17:40 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:17:41 -0000 On 12/2/11 4:44 AM, Joel Dahl wrote: > On 02-12-2011 0:38, Ken Smith wrote: >> Author: kensmith >> Date: Fri Dec 2 00:38:47 2011 >> New Revision: 228192 >> URL: http://svn.freebsd.org/changeset/base/228192 >> >> Log: >> Add a screen that asks if the user would like to enable crash dumps, >> giving them a very brief description of the trade-offs. Whether the >> user opts in or out add an entry to what will become /etc/rc.conf >> explaining what dumpdev is and how to turn on/off crash dumps. The folks >> who handle interacting with users submitting PRs have asked for this. > > Hmm. Two things I'd like to bring up: > > * Not specifically aimed at this commit, but my recommendation > would be that we keep bsdinstall as simple as possible: installing FreeBSD > should require a minimum amount of keystrokes. I realise this is just one > more screen, but I hope we don't turn bsdinstall into a configuration > utility where you can disable/enable just about anything in rc.conf. > > * Mentioning future system crashes during installation feels awkward. Is that > really what we want? I understand the problem and how this helps us with > debugging, but this is like saying to users that what they are installing > is unstable and that it'll eventuelly crash and die. I know we discussed > ways of making crash dumps smarter in order to not fill up /var, which in > turn would allow us to always have it on. Maybe that is the right path? All non-trivial software has bugs and eventually crashes. I don't expect this to be a surprise to someone installing a UNIX-like operating system. Note that this isn't the PC-BSD installer, but the FreeBSD installer. Also, there have been long discussions about this and ample time for other patches to be developed but they haven't. If you want this changed, implement the alternate solution. Until then this is better than not having it at all. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 15:24:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13E521065686; Fri, 2 Dec 2011 15:24:40 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 015968FC22; Fri, 2 Dec 2011 15:24:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2FOdnw097937; Fri, 2 Dec 2011 15:24:39 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2FOd95097924; Fri, 2 Dec 2011 15:24:39 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201112021524.pB2FOd95097924@svn.freebsd.org> From: "Jayachandran C." Date: Fri, 2 Dec 2011 15:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228201 - in head/sys: arm/mv dev/fdt dev/ofw dev/uart powerpc/booke powerpc/powermac sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:24:40 -0000 Author: jchandra Date: Fri Dec 2 15:24:39 2011 New Revision: 228201 URL: http://svn.freebsd.org/changeset/base/228201 Log: Fix OF_finddevice error return value in case of FDT. According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error. This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well. Reported by: nwhitehorn Reviewed by: raj Approved by: raj, nwhitehorn Modified: head/sys/arm/mv/common.c head/sys/arm/mv/mv_machdep.c head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_powerpc.c head/sys/dev/fdt/fdtbus.c head/sys/dev/ofw/ofw_fdt.c head/sys/dev/ofw/openfirm.c head/sys/dev/uart/uart_bus_fdt.c head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/powermac/platform_powermac.c head/sys/sparc64/sparc64/ofw_machdep.c head/sys/sparc64/sparc64/vm_machdep.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/arm/mv/common.c Fri Dec 2 15:24:39 2011 (r228201) @@ -1693,7 +1693,7 @@ fdt_get_ranges(const char *nodename, voi int len, tuple_size, tuples_count; node = OF_finddevice(nodename); - if (node <= 0) + if (node == -1) return (EINVAL); if ((fdt_addrsize_cells(node, &addr_cells, &size_cells)) != 0) @@ -1762,11 +1762,11 @@ win_cpu_from_dt(void) /* * Retrieve CESA SRAM data. */ - if ((node = OF_finddevice("sram")) != 0) + if ((node = OF_finddevice("sram")) != -1) if (fdt_is_compatible(node, "mrvl,cesa-sram")) goto moveon; - if ((node = OF_finddevice("/")) == 0) + if ((node = OF_finddevice("/")) != -1) return (ENXIO); if ((node = fdt_find_compatible(node, "mrvl,cesa-sram", 0)) == 0) @@ -1796,7 +1796,7 @@ fdt_win_setup(void) int err, i; node = OF_finddevice("/"); - if (node == 0) + if (node == -1) panic("fdt_win_setup: no root node"); node = fdt_find_compatible(node, "simple-bus", 1); Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/arm/mv/mv_machdep.c Fri Dec 2 15:24:39 2011 (r228201) @@ -617,13 +617,13 @@ platform_mpp_init(void) /* * Try to access the MPP node directly i.e. through /aliases/mpp. */ - if ((node = OF_finddevice("mpp")) != 0) + if ((node = OF_finddevice("mpp")) != -1) if (fdt_is_compatible(node, "mrvl,mpp")) goto moveon; /* * Find the node the long way. */ - if ((node = OF_finddevice("/")) == 0) + if ((node = OF_finddevice("/")) == -1) return (ENXIO); if ((node = fdt_find_compatible(node, "simple-bus", 0)) == 0) @@ -752,7 +752,7 @@ platform_devmap_init(void) /* * PCI range(s). */ - if ((root = OF_finddevice("/")) == 0) + if ((root = OF_finddevice("/")) == -1) return (ENXIO); for (child = OF_child(root); child != 0; child = OF_peer(child)) @@ -779,7 +779,7 @@ platform_devmap_init(void) /* * CESA SRAM range. */ - if ((child = OF_finddevice("sram")) != 0) + if ((child = OF_finddevice("sram")) != -1) if (fdt_is_compatible(child, "mrvl,cesa-sram")) goto moveon; Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/dev/fdt/fdt_common.c Fri Dec 2 15:24:39 2011 (r228201) @@ -74,13 +74,13 @@ fdt_immr_addr(vm_offset_t immr_va) /* * Try to access the SOC node directly i.e. through /aliases/. */ - if ((node = OF_finddevice("soc")) != 0) + if ((node = OF_finddevice("soc")) != -1) if (fdt_is_compatible_strict(node, "simple-bus")) goto moveon; /* * Find the node the long way. */ - if ((node = OF_finddevice("/")) == 0) + if ((node = OF_finddevice("/")) == -1) return (ENXIO); if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) @@ -576,7 +576,7 @@ fdt_get_mem_regions(struct mem_region *m max_size = sizeof(reg); memory = OF_finddevice("/memory"); - if (memory <= 0) { + if (memory == -1) { rv = ENXIO; goto out; } Modified: head/sys/dev/fdt/fdt_powerpc.c ============================================================================== --- head/sys/dev/fdt/fdt_powerpc.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/dev/fdt/fdt_powerpc.c Fri Dec 2 15:24:39 2011 (r228201) @@ -62,7 +62,7 @@ fdt_fixup_busfreq(phandle_t root) * This fixup uses /cpus/ bus-frequency prop value to set simple-bus * bus-frequency property. */ - if ((cpus = OF_finddevice("/cpus")) == 0) + if ((cpus = OF_finddevice("/cpus")) == -1) return; if ((child = OF_child(cpus)) == 0) Modified: head/sys/dev/fdt/fdtbus.c ============================================================================== --- head/sys/dev/fdt/fdtbus.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/dev/fdt/fdtbus.c Fri Dec 2 15:24:39 2011 (r228201) @@ -177,7 +177,7 @@ fdtbus_attach(device_t dev) u_long start, end; int error; - if ((root = OF_peer(0)) == 0) + if ((root = OF_finddevice("/")) == -1) panic("fdtbus_attach: no root node."); sc = device_get_softc(dev); Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/dev/ofw/ofw_fdt.c Fri Dec 2 15:24:39 2011 (r228201) @@ -392,6 +392,8 @@ ofw_fdt_finddevice(ofw_t ofw, const char int offset; offset = fdt_path_offset(fdtp, device); + if (offset < 0) + return (-1); return (fdt_offset_phandle(offset)); } @@ -420,7 +422,7 @@ ofw_fdt_fixup(ofw_t ofw) ssize_t len; int i; - if ((root = ofw_fdt_finddevice(ofw, "/")) == 0) + if ((root = ofw_fdt_finddevice(ofw, "/")) == -1) return (ENODEV); if ((len = ofw_fdt_getproplen(ofw, root, "model")) <= 0) Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/dev/ofw/openfirm.c Fri Dec 2 15:24:39 2011 (r228201) @@ -131,7 +131,7 @@ OF_init(void *cookie) rv = OFW_INIT(ofw_obj, cookie); - if ((chosen = OF_finddevice("/chosen")) > 0) + if ((chosen = OF_finddevice("/chosen")) != -1) if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == -1) stdout = -1; Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/dev/uart/uart_bus_fdt.c Fri Dec 2 15:24:39 2011 (r228201) @@ -155,11 +155,11 @@ uart_cpu_getdev(int devtype, struct uart /* * Retrieve /chosen/std{in,out}. */ - if ((chosen = OF_finddevice("/chosen")) == 0) + if ((chosen = OF_finddevice("/chosen")) == -1) return (ENXIO); if (OF_getprop(chosen, "stdin", buf, sizeof(buf)) <= 0) return (ENXIO); - if ((node = OF_finddevice(buf)) == 0) + if ((node = OF_finddevice(buf)) == -1) return (ENXIO); if (OF_getprop(chosen, "stdout", buf, sizeof(buf)) <= 0) return (ENXIO); Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/powerpc/booke/platform_bare.c Fri Dec 2 15:24:39 2011 (r228201) @@ -189,7 +189,7 @@ bare_timebase_freq(platform_t plat, stru } else ticks = 0; - if ((cpus = OF_finddevice("/cpus")) == 0) + if ((cpus = OF_finddevice("/cpus")) == -1) goto out; if ((child = OF_child(cpus)) == 0) Modified: head/sys/powerpc/powermac/platform_powermac.c ============================================================================== --- head/sys/powerpc/powermac/platform_powermac.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/powerpc/powermac/platform_powermac.c Fri Dec 2 15:24:39 2011 (r228201) @@ -163,7 +163,7 @@ powermac_smp_first_cpu(platform_t plat, * but it can be found directly */ dev = OF_finddevice("/cpus"); - if (dev == 0) + if (dev == -1) return (ENOENT); } @@ -209,7 +209,7 @@ powermac_smp_get_bsp(platform_t plat, st int res; chosen = OF_finddevice("/chosen"); - if (chosen == 0) + if (chosen == -1) return (ENXIO); res = OF_getprop(chosen, "cpu", &inst, sizeof(inst)); Modified: head/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/ofw_machdep.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/sparc64/sparc64/ofw_machdep.c Fri Dec 2 15:24:39 2011 (r228201) @@ -52,7 +52,7 @@ OF_getetheraddr(device_t dev, u_char *ad phandle_t node; struct idprom idp; - if ((node = OF_finddevice("/options")) > 0 && + if ((node = OF_finddevice("/options")) != -1 && OF_getprop(node, "local-mac-address?", buf, sizeof(buf)) > 0) { buf[sizeof(buf) - 1] = '\0'; if (strcmp(buf, "true") == 0 && Modified: head/sys/sparc64/sparc64/vm_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/vm_machdep.c Fri Dec 2 12:52:33 2011 (r228200) +++ head/sys/sparc64/sparc64/vm_machdep.c Fri Dec 2 15:24:39 2011 (r228201) @@ -368,7 +368,7 @@ cpu_reset(void) (cell_t)bspec }; - if ((chosen = OF_finddevice("/chosen")) != 0) { + if ((chosen = OF_finddevice("/chosen")) != -1) { if (OF_getprop(chosen, "bootpath", bspec, sizeof(bspec)) == -1) bspec[0] = '\0'; bspec[sizeof(bspec) - 1] = '\0'; From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 15:32:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E21B106566B; Fri, 2 Dec 2011 15:32:59 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id CFDED8FC13; Fri, 2 Dec 2011 15:32:58 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LVL00I061UYBV00@smtpauth1.wiscmail.wisc.edu>; Fri, 02 Dec 2011 09:32:58 -0600 (CST) Received: from comporellon.tachypleus.net ([unknown] [76.210.61.201]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LVL00FSV1UQNV00@smtpauth1.wiscmail.wisc.edu>; Fri, 02 Dec 2011 09:32:51 -0600 (CST) Date: Fri, 02 Dec 2011 09:32:49 -0600 From: Nathan Whitehorn In-reply-to: <4ED8EC14.6000000@FreeBSD.org> To: John Baldwin Message-id: <4ED8EFA1.80104@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.61.201 X-Spam-PmxInfo: Server=avs-11, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.12.2.152118, SenderIP=76.210.61.201 References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> <4ED8EC14.6000000@FreeBSD.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111113 Thunderbird/8.0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith , Joel Dahl Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:32:59 -0000 On 12/02/11 09:17, John Baldwin wrote: > On 12/2/11 4:44 AM, Joel Dahl wrote: >> On 02-12-2011 0:38, Ken Smith wrote: >>> Author: kensmith >>> Date: Fri Dec 2 00:38:47 2011 >>> New Revision: 228192 >>> URL: http://svn.freebsd.org/changeset/base/228192 >>> >>> Log: >>> Add a screen that asks if the user would like to enable crash dumps, >>> giving them a very brief description of the trade-offs. Whether the >>> user opts in or out add an entry to what will become /etc/rc.conf >>> explaining what dumpdev is and how to turn on/off crash dumps. >>> The folks >>> who handle interacting with users submitting PRs have asked for >>> this. >> >> Hmm. Two things I'd like to bring up: >> >> * Not specifically aimed at this commit, but my recommendation >> would be that we keep bsdinstall as simple as possible: installing >> FreeBSD >> should require a minimum amount of keystrokes. I realise this is >> just one >> more screen, but I hope we don't turn bsdinstall into a configuration >> utility where you can disable/enable just about anything in rc.conf. >> >> * Mentioning future system crashes during installation feels awkward. >> Is that >> really what we want? I understand the problem and how this helps >> us with >> debugging, but this is like saying to users that what they are >> installing >> is unstable and that it'll eventuelly crash and die. I know we >> discussed >> ways of making crash dumps smarter in order to not fill up /var, >> which in >> turn would allow us to always have it on. Maybe that is the right >> path? > > All non-trivial software has bugs and eventually crashes. I don't > expect this to be a surprise to someone installing a UNIX-like > operating system. Note that this isn't the PC-BSD installer, but the > FreeBSD installer. Also, there have been long discussions about this > and ample time for other patches to be developed but they haven't. If > you want this changed, implement the alternate solution. Until then > this is better than not having it at all. > This was also my conclusion when Ken asked me to review this patch. I also don't want the installer to become bloated and made the same original objection, but (a) this patch existed and (b) the long discussion meant that Ken felt it was a particular important decision that deserved its own screen. In particular, the explanation of why you might or might not want it was larger than could fit in a line in the regular services screen and the matter may require some thought. -Nathan From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 15:41:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B90A106566B; Fri, 2 Dec 2011 15:41:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210358FC08; Fri, 2 Dec 2011 15:41:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2Ff9kx098503; Fri, 2 Dec 2011 15:41:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2Ff9xm098498; Fri, 2 Dec 2011 15:41:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112021541.pB2Ff9xm098498@svn.freebsd.org> From: Eitan Adler Date: Fri, 2 Dec 2011 15:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228202 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:41:10 -0000 Author: eadler (ports committer) Date: Fri Dec 2 15:41:09 2011 New Revision: 228202 URL: http://svn.freebsd.org/changeset/base/228202 Log: Revert r227812 and r227808 per discussion Reviewed by: many Approved by: des Modified: head/lib/libc/string/strcasecmp.c head/lib/libc/string/strcmp.c head/lib/libc/string/strcoll.c head/lib/libc/string/strncmp.c Modified: head/lib/libc/string/strcasecmp.c ============================================================================== --- head/lib/libc/string/strcasecmp.c Fri Dec 2 15:24:39 2011 (r228201) +++ head/lib/libc/string/strcasecmp.c Fri Dec 2 15:41:09 2011 (r228202) @@ -48,9 +48,6 @@ strcasecmp_l(const char *s1, const char const u_char *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; - if (s1 == s2) - return (0); - FIX_LOCALE(locale); while (tolower_l(*us1, locale) == tolower_l(*us2++, locale)) @@ -68,22 +65,18 @@ int strncasecmp_l(const char *s1, const char *s2, size_t n, locale_t locale) { FIX_LOCALE(locale); - - const u_char - *us1 = (const u_char *)s1, - *us2 = (const u_char *)s2; - - /* use a bitwise or to avoid an additional branch instruction */ - if ((s1 == s2) | (n == 0)) - return (0); - - - do { - if (tolower_l(*us1, locale) != tolower_l(*us2++, locale)) - return (tolower_l(*us1, locale) - tolower_l(*--us2, locale)); - if (*us1++ == '\0') - break; - } while (--n != 0); + if (n != 0) { + const u_char + *us1 = (const u_char *)s1, + *us2 = (const u_char *)s2; + + do { + if (tolower_l(*us1, locale) != tolower_l(*us2++, locale)) + return (tolower_l(*us1, locale) - tolower_l(*--us2, locale)); + if (*us1++ == '\0') + break; + } while (--n != 0); + } return (0); } Modified: head/lib/libc/string/strcmp.c ============================================================================== --- head/lib/libc/string/strcmp.c Fri Dec 2 15:24:39 2011 (r228201) +++ head/lib/libc/string/strcmp.c Fri Dec 2 15:41:09 2011 (r228202) @@ -44,9 +44,6 @@ __FBSDID("$FreeBSD$"); int strcmp(const char *s1, const char *s2) { - if (s1 == s2) - return (0); - while (*s1 == *s2++) if (*s1++ == '\0') return (0); Modified: head/lib/libc/string/strcoll.c ============================================================================== --- head/lib/libc/string/strcoll.c Fri Dec 2 15:24:39 2011 (r228201) +++ head/lib/libc/string/strcoll.c Fri Dec 2 15:41:09 2011 (r228202) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include int -strcoll_l(const char *s1, const char *s2, locale_t locale) +strcoll_l(const char *s, const char *s2, locale_t locale) { int len, len2, prim, prim2, sec, sec2, ret, ret2; const char *t, *t2; @@ -50,16 +50,16 @@ strcoll_l(const char *s1, const char *s2 (struct xlocale_collate*)locale->components[XLC_COLLATE]; if (table->__collate_load_error) - return strcmp(s1, s2); + return strcmp(s, s2); len = len2 = 1; ret = ret2 = 0; if (table->__collate_substitute_nontrivial) { - t = tt = __collate_substitute(table, s1); + t = tt = __collate_substitute(table, s); t2 = tt2 = __collate_substitute(table, s2); } else { tt = tt2 = NULL; - t = s1; + t = s; t2 = s2; } while(*t && *t2) { @@ -95,8 +95,8 @@ strcoll_l(const char *s1, const char *s2 } int -strcoll(const char *s1, const char *s2) +strcoll(const char *s, const char *s2) { - return strcoll_l(s1, s2, __get_locale()); + return strcoll_l(s, s2, __get_locale()); } Modified: head/lib/libc/string/strncmp.c ============================================================================== --- head/lib/libc/string/strncmp.c Fri Dec 2 15:24:39 2011 (r228201) +++ head/lib/libc/string/strncmp.c Fri Dec 2 15:41:09 2011 (r228202) @@ -39,10 +39,8 @@ int strncmp(const char *s1, const char *s2, size_t n) { - /* use a bitwise or to avoid an additional branch instruction */ - if ((n == 0) | (s1 == s2)) + if (n == 0) return (0); - do { if (*s1 != *s2++) return (*(const unsigned char *)s1 - From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 15:47:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1879D1065670; Fri, 2 Dec 2011 15:47:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0882D8FC08; Fri, 2 Dec 2011 15:47:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2Fl5eb098719; Fri, 2 Dec 2011 15:47:05 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2Fl5pq098717; Fri, 2 Dec 2011 15:47:05 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201112021547.pB2Fl5pq098717@svn.freebsd.org> From: Ed Maste Date: Fri, 2 Dec 2011 15:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228203 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:47:06 -0000 Author: emaste Date: Fri Dec 2 15:47:05 2011 New Revision: 228203 URL: http://svn.freebsd.org/changeset/base/228203 Log: Restore comment with credit to Marc Frajola. fwdownload.c is derived from Andre Albsmeier's fwdownload.c, which was written from scratch but was inspired by Marc's original idea and code. Modified: head/sbin/camcontrol/fwdownload.c Modified: head/sbin/camcontrol/fwdownload.c ============================================================================== --- head/sbin/camcontrol/fwdownload.c Fri Dec 2 15:41:09 2011 (r228202) +++ head/sbin/camcontrol/fwdownload.c Fri Dec 2 15:47:05 2011 (r228203) @@ -26,6 +26,15 @@ */ /* + * This software is derived from Andre Albsmeier's fwprog.c which contained + * the following note: + * + * Many thanks goes to Marc Frajola from + * TeraSolutions for the initial idea and his programme for upgrading + * the firmware of I*M DDYS drives. + */ + +/* * BEWARE: * * The fact that you see your favorite vendor listed below does not From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 17:09:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4313E1065672; Fri, 2 Dec 2011 17:09:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3350B8FC18; Fri, 2 Dec 2011 17:09:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2H9nKD001417; Fri, 2 Dec 2011 17:09:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2H9nOx001415; Fri, 2 Dec 2011 17:09:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112021709.pB2H9nOx001415@svn.freebsd.org> From: Alexander Motin Date: Fri, 2 Dec 2011 17:09:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228204 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 17:09:49 -0000 Author: mav Date: Fri Dec 2 17:09:48 2011 New Revision: 228204 URL: http://svn.freebsd.org/changeset/base/228204 Log: Close race between geom destruction on g_vfs_close() when softc destroyed and g_vfs_orphan() call that tries to access softc, intruced at r227015. PR: kern/162997 Modified: head/sys/geom/geom_vfs.c Modified: head/sys/geom/geom_vfs.c ============================================================================== --- head/sys/geom/geom_vfs.c Fri Dec 2 15:47:05 2011 (r228203) +++ head/sys/geom/geom_vfs.c Fri Dec 2 17:09:48 2011 (r228204) @@ -169,8 +169,10 @@ g_vfs_orphan(struct g_consumer *cp) g_topology_assert(); gp = cp->geom; - sc = gp->softc; g_trace(G_T_TOPOLOGY, "g_vfs_orphan(%p(%s))", cp, gp->name); + sc = gp->softc; + if (sc == NULL) + return; mtx_lock(&sc->sc_mtx); sc->sc_orphaned = 1; destroy = (sc->sc_active == 0); From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 18:47:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEEE91065670; Fri, 2 Dec 2011 18:47:01 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 6106B8FC18; Fri, 2 Dec 2011 18:47:01 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 8274FE662B; Fri, 2 Dec 2011 18:46:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=mail; bh=KSMVOCkjq6zh mCmhCFipmTmLyxw=; b=stLcOGtlzd3vTDLkbbawpoYjVMRVNi1TJtxhEh/W5q5s EcpT/+A9QPDvhwGm3+Mz06S+6spF85Hn474E85Cag/Xpe/PG4H02VTxXxomO8Te4 T8dridENIn6rx3CNfs90Kw6hbrYqam4og1Oqru6FpYBA/RxPug/1ty9WU+iYCQM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=mail; b=bNmj0I KLHK82EO2FMklW0hTgcpp4Aj3uNp/NfMvSHcHmBzCtH3znhduD5tpuVidNhtrqga S9dp1mXl3IYU9idxUH5nZVTKovnyRNJIHGhaWfKyAWxf30GU7I6gfL910lRz0F70 jWW8LaBc9d5K8Qi+VewnIt8+F6nLDxv9tUAl4= Received: from [192.168.1.120] (188-220-36-32.zone11.bethere.co.uk [188.220.36.32]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 11B15E65E3; Fri, 2 Dec 2011 18:46:59 +0000 (GMT) Message-ID: <4ED91D22.6000803@cran.org.uk> Date: Fri, 02 Dec 2011 18:46:58 +0000 From: Bruce Cran User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Joel Dahl References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> In-Reply-To: <20111202094411.GJ23987@goofy01.vnodelab.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 18:47:01 -0000 On 02/12/2011 09:44, Joel Dahl wrote: > * Not specifically aimed at this commit, but my recommendation > would be that we keep bsdinstall as simple as possible: installing FreeBSD > should require a minimum amount of keystrokes. I realise this is just one > more screen, but I hope we don't turn bsdinstall into a configuration > utility where you can disable/enable just about anything in rc.conf. This is an argument I see again and again. FreeBSD is a technical OS, where I would expect users would appreciate the chance to configure their systems without having to look up man pages for every detail (e.g. console settings). For people who want their OS to be as simple as possible there's PC-BSD. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 19:01:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DCEF106566C; Fri, 2 Dec 2011 19:01:27 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8858FC13; Fri, 2 Dec 2011 19:01:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2J1R6A004889; Fri, 2 Dec 2011 19:01:27 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2J1Raj004887; Fri, 2 Dec 2011 19:01:27 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112021901.pB2J1Raj004887@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 2 Dec 2011 19:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228205 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 19:01:27 -0000 Author: yongari Date: Fri Dec 2 19:01:26 2011 New Revision: 228205 URL: http://svn.freebsd.org/changeset/base/228205 Log: Add more controllers that support jumbo frame. Modified: head/share/man/man4/bge.4 Modified: head/share/man/man4/bge.4 ============================================================================== --- head/share/man/man4/bge.4 Fri Dec 2 17:09:48 2011 (r228204) +++ head/share/man/man4/bge.4 Fri Dec 2 19:01:26 2011 (r228205) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 23, 2010 +.Dd December 2, 2011 .Dt BGE 4 .Os .Sh NAME @@ -82,9 +82,9 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704 and BCM5717 also support -jumbo frames, which can be configured -via the interface MTU setting. +The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704, BCM5714, BCM5717, BCM5719, +BCM5720, BCM5780 and BCM57765 also support jumbo frames, which can be +configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit jumbo frames. From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 19:56:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307281065712; Fri, 2 Dec 2011 19:56:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7938FC14; Fri, 2 Dec 2011 19:56:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2Juli7006624; Fri, 2 Dec 2011 19:56:47 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2JukPo006621; Fri, 2 Dec 2011 19:56:46 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112021956.pB2JukPo006621@svn.freebsd.org> From: Martin Matuska Date: Fri, 2 Dec 2011 19:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228206 - in head/cddl/contrib/opensolaris/cmd: zfs zpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 19:56:47 -0000 Author: mm Date: Fri Dec 2 19:56:46 2011 New Revision: 228206 URL: http://svn.freebsd.org/changeset/base/228206 Log: Remove unnecesary "Ns" macros and add missing command example to zpool(8). Reported by: Nobuyuki Koganemaru MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Dec 2 19:01:26 2011 (r228205) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Dec 2 19:56:46 2011 (r228206) @@ -2198,7 +2198,7 @@ Generate a stream package that sends all .Ar snapshot . For example, .Ic -I @a fs@d is similar to -.Ic -i @a fs@b; -i @b fs@c; -i @c fs@d Ns . +.Ic -i @a fs@b; -i @b fs@c; -i @c fs@d . The incremental source snapshot may be specified as with the .Fl i option. @@ -2414,7 +2414,7 @@ may be specified as a comma-separated li .Tn ZFS subcommand and property names. See the property list below. Property set names, which begin with an at sign -.Pq Sy @ Ns , +.Pq Sy @ , may be specified. See the .Fl s form below for details. @@ -2536,7 +2536,7 @@ commands for the specified file system a dynamically, so changes to a set are immediately reflected. Permission sets follow the same naming restrictions as ZFS file systems, but the name must begin with an "at sign" -.Pq Sy @ Ns , +.Pq Sy @ , and can be no more than 64 characters long. .It Xo .Nm Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Dec 2 19:01:26 2011 (r228205) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Fri Dec 2 19:56:46 2011 (r228206) @@ -195,7 +195,7 @@ are supported: .Bl -tag .It Sy disk A block device, typically located under -.Pa /dev Ns . +.Pa /dev . .Tn ZFS can use individual slices or partitions, though the recommended mode of operation is to use whole disks. A disk can be specified by a full path to the @@ -221,13 +221,14 @@ bytes and can withstand .Pq Em N-1 devices failing before data integrity is compromised. .It Sy raidz -.No ( or Sy raidz1 raidz2 raidz3 Ns ). +(or +.Sy raidz1 raidz2 raidz3 ) . A variation on .Sy RAID-5 that allows for better distribution of parity and eliminates the -.Qq Sy RAID-5 No write hole -(in which data and parity become inconsistent after a power loss). Data and -parity is striped across all disks within a +.Qq Sy RAID-5 +write hole (in which data and parity become inconsistent after a power loss). +Data and parity is striped across all disks within a .No raidz group. .Pp @@ -251,7 +252,7 @@ type specifies a triple-parity group. The .Sy raidz No vdev type is an alias for -.Sy raidz1 Ns . +.Sy raidz1 . .Pp A .No raidz @@ -322,6 +323,9 @@ are used to distinguish where a group en following creates two root .No vdev Ns s, each a mirror of two disks: +.Bd -literal -offset 2n +.Li # Ic zpool create mypool mirror da0 da1 mirror da2 da3 +.Ed .Ss Device Failure and Recovery .Tn ZFS supports a rich set of mechanisms for handling device failure and data @@ -421,7 +425,7 @@ hardware-dependent and might not be supp .Ss Hot Spares .Tn ZFS allows devices to be associated with pools as -.Qq hot spares Ns . +.Qq hot spares . These devices are not actively used in the pool, but when an active device fails, it is automatically replaced by a hot spare. To create a pool with hot spares, specify a @@ -537,12 +541,13 @@ Number of blocks within the pool that ar A unique identifier for the pool. .It Sy health The current health of the pool. Health can be -.Qq Sy ONLINE Ns , -.Qq Sy DEGRADED Ns , -.Qq Sy FAULTED Ns , -.Qq Sy OFFLINE Ns , -.Qq Sy REMOVED Ns , or -.Qq Sy UNAVAIL Ns . +.Qq Sy ONLINE , +.Qq Sy DEGRADED , +.Qq Sy FAULTED , +.Qq Sy OFFLINE , +.Qq Sy REMOVED , +or +.Qq Sy UNAVAIL . .It Sy size Total size of the storage pool. .It Sy used @@ -577,7 +582,7 @@ is not a persistent property. It is vali Setting .Sy altroot defaults to using -.Cm cachefile=none Ns , +.Cm cachefile=none , though this may be overridden using an explicit setting. .El .Pp @@ -585,7 +590,7 @@ The following property can only be set a .Bl -tag -width 2n .It Sy readonly Ns = Ns Cm on No | Cm off If set to -.Cm on Ns , +.Cm on , pool will be imported in read-only mode with the following restrictions: .Bl -bullet -offset 2n .It @@ -606,7 +611,7 @@ command: .Bl -tag -width 2n .It Sy autoexpand Ns = Ns Cm on No | Cm off Controls automatic pool expansion when the underlying LUN is grown. If set to -.Qq Cm on Ns , +.Qq Cm on , the pool will be resized according to the size of the expanded device. If the device is part of a mirror or .No raidz @@ -614,20 +619,20 @@ then all devices within that .No mirror/ Ns No raidz group must be expanded before the new space is made available to the pool. The default behavior is -.Qq off Ns . +.Qq off . This property can also be referred to by its shortened column name, -.Sy expand Ns . +.Sy expand . .It Sy autoreplace Ns = Ns Cm on No | Cm off Controls automatic device replacement. If set to -.Qq Cm off Ns , +.Qq Cm off , device replacement must be initiated by the administrator by using the .Qq Nm Cm replace command. If set to -.Qq Cm on Ns , +.Qq Cm on , any new device, found in the same physical location as a device that previously belonged to the pool, is automatically formatted and replaced. The default behavior is -.Qq Cm off Ns . +.Qq Cm off . This property can also be referred to by its shortened column name, "replace". .It Sy bootfs Ns = Ns Ar pool Ns / Ns Ar dataset Identifies the default bootable dataset for the root pool. This property is @@ -650,7 +655,7 @@ creates a temporary pool that is never c Threshold for the number of block ditto copies. If the reference count for a deduplicated block increases above this number, a new ditto copy of this block is automatically stored. Deafult setting is -.Cm 0 Ns . +.Cm 0 . .It Sy delegation Ns = Ns Cm on No | Cm off Controls whether a non-privileged user is granted access based on the dataset permissions defined on the dataset. See @@ -694,7 +699,7 @@ decreased. The preferred method of updat command, though this property can be used when a specific version is needed for backwards compatibility. This property can be any number between 1 and the current version reported by -.Qo Ic zpool upgrade -v Qc Ns . +.Qo Ic zpool upgrade -v Qc . .El .Sh SUBCOMMANDS All subcommands that modify state are logged persistently to the pool in their @@ -731,7 +736,7 @@ subcommand. .Bl -tag -width indent .It Fl f Forces use of -.Ar vdev Ns , +.Ar vdev , even if they appear in use or specify a conflicting replication level. Not all devices can be overridden in this manner. .It Fl n @@ -762,7 +767,8 @@ configuration. If is not currently part of a mirrored configuration, .Ar device automatically transforms into a two-way mirror of -.Ar device No and Ar new_device Ns . If +.Ar device No and Ar new_device . +If .Ar device is part of a two-way mirror, attaching .Ar new_device @@ -772,7 +778,7 @@ begins to resilver immediately. .Bl -tag -width indent .It Fl f Forces use of -.Ar new_device Ns , +.Ar new_device , even if its appears to be in use. Not all devices can be overridden in this manner. .El @@ -846,7 +852,7 @@ is specified. Unless the .Fl R option is specified, the default mount point is -.Qq Pa /pool Ns . +.Qq Pa /pool . The mount point must not exist or must be empty, or else the root dataset cannot be mounted. This can be overridden with the .Fl m @@ -890,9 +896,11 @@ or if .Sy altroot is specified. The mount point must be an absolute path, -.Qq Cm legacy Ns , or Qq Cm none Ns . +.Qq Cm legacy , +or +.Qq Cm none . For more information on dataset mount points, see -.Xr zfs 8 Ns \&. +.Xr zfs 8 . .El .It Xo .Nm @@ -1000,7 +1008,7 @@ performed. Lists pools available to import. If the .Fl d option is not specified, this command searches for devices in -.Qq Pa /dev Ns . +.Qq Pa /dev . The .Fl d option can be specified multiple times, and all directories are searched. If @@ -1028,7 +1036,7 @@ pool property. This is used instead of searching for devices. .It Fl d Ar dir Searches for devices or files in -.Ar dir Ns . +.Ar dir . The .Fl d option can be specified multiple times. @@ -1078,7 +1086,7 @@ pool property. This is used instead of searching for devices. .It Fl d Ar dir Searches for devices or files in -.Ar dir Ns . +.Ar dir . The .Fl d option can be specified multiple times. This option is incompatible with the @@ -1141,7 +1149,7 @@ Imports a specific pool. A pool can be i identifier. If .Ar newpool is specified, the pool is imported using the name -.Ar newpool Ns . +.Ar newpool . Otherwise, it is imported with the same name as its exported name. .Pp If a device is removed from a system without running @@ -1171,7 +1179,7 @@ pool property. This is used instead of searching for devices. .It Fl d Ar dir Searches for devices or files in -.Ar dir Ns . +.Ar dir . The .Fl d option can be specified multiple times. This option is incompatible with the @@ -1236,11 +1244,11 @@ Print a timestamp. Use modifier .Cm d for standard date format. See -.Xr date 1 Ns . +.Xr date 1 . Use modifier .Cm u for unixtime -.Pq equals Qq Ic date +%s Ns . +.Pq equals Qq Ic date +%s . .It Fl v Verbose statistics. Reports usage statistics for individual .No vdev Ns s @@ -1256,7 +1264,7 @@ within the pool, in addition to the pool Removes .Tn ZFS label information from the specified -.Ar device Ns . +.Ar device . The .Ar device must not be part of an active pool configuration. @@ -1295,24 +1303,24 @@ instead of arbitrary space. Comma-separated list of properties to display. See the .Qq Sx Properties section for a list of valid properties. The default list is -.Sy name Ns , -.Sy size Ns , -.Sy used Ns , -.Sy available Ns , -.Sy capacity Ns , -.Sy health Ns , -.Sy altroot Ns . +.Sy name , +.Sy size , +.Sy used , +.Sy available , +.Sy capacity , +.Sy health , +.Sy altroot . .It Fl T Cm d Ns | Ns Cm u Print a timestamp. .Pp Use modifier .Cm d for standard date format. See -.Xr date 1 Ns . +.Xr date 1 . Use modifier .Cm u for unixtime -.Pq equals Qq Ic date +%s Ns . +.Pq equals Qq Ic date +%s . .El .It Xo .Nm @@ -1380,11 +1388,11 @@ devices cannot be removed from a pool. Replaces .Ar old_device with -.Ar new_device Ns . +.Ar new_device . This is equivalent to attaching -.Ar new_device Ns , +.Ar new_device , waiting for it to resilver, and then detaching -.Ar old_device Ns . +.Ar old_device . .Pp The size of .Ar new_device @@ -1397,7 +1405,7 @@ configuration. is required if the pool is not redundant. If .Ar new_device is not specified, it defaults to -.Ar old_device Ns . +.Ar old_device . This form of replacement is useful after an existing disk has failed and has been physically replaced. In this case, the new disk may have the same .Pa /dev @@ -1407,7 +1415,7 @@ recognizes this. .Bl -tag -width indent .It Fl f Forces use of -.Ar new_device Ns , +.Ar new_device , even if its appears to be in use. Not all devices can be overridden in this manner. .El @@ -1420,7 +1428,7 @@ manner. .Pp Begins a scrub. The scrub examines all data in the specified pools to verify that it checksums correctly. For replicated (mirror or -.No raidz Ns ) +.No raidz ) devices, .Tn ZFS automatically repairs any damage discovered during the scrub. The @@ -1565,11 +1573,11 @@ Print a timestamp. Use modifier .Cm d for standard date format. See -.Xr date 1 Ns . +.Xr date 1 . Use modifier .Cm u for unixtime -.Pq equals Qq Ic date +%s Ns . +.Pq equals Qq Ic date +%s . .El .It Xo .Nm @@ -1649,7 +1657,7 @@ recommended, a pool based on files can b .It Sy Example 5 No Adding a Mirror to a Tn ZFS No Storage Pool .Pp The following command adds two mirrored disks to the pool -.Em tank Ns , +.Em tank , assuming the pool is already made up of two-way mirrors. The additional space is immediately available to any datasets within the pool. .Bd -literal -offset 2n @@ -1793,7 +1801,7 @@ subcommand as follows: .It Sy Example 15 No Removing a Mirrored Log Device .Pp The following command removes the mirrored log device -.Em mirror-2 Ns . +.Em mirror-2 . .Pp Given this configuration: .Bd -literal -offset 2n From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 19:59:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 638D11065670; Fri, 2 Dec 2011 19:59:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53C828FC15; Fri, 2 Dec 2011 19:59:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2JxkVL006741; Fri, 2 Dec 2011 19:59:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2Jxka6006739; Fri, 2 Dec 2011 19:59:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112021959.pB2Jxka6006739@svn.freebsd.org> From: John Baldwin Date: Fri, 2 Dec 2011 19:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228207 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 19:59:46 -0000 Author: jhb Date: Fri Dec 2 19:59:46 2011 New Revision: 228207 URL: http://svn.freebsd.org/changeset/base/228207 Log: When changing the user priority of a thread, change the real priority in addition to the user priority for threads whose current real priority is equal to the previous user priority or if the new priority is a real-time priority. This allows priority changes of other threads to have an immediate effect. MFC after: 2 weeks Modified: head/sys/kern/kern_resource.c Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Fri Dec 2 19:56:46 2011 (r228206) +++ head/sys/kern/kern_resource.c Fri Dec 2 19:59:46 2011 (r228207) @@ -488,8 +488,9 @@ rtp_to_pri(struct rtprio *rtp, struct th sched_class(td, rtp->type); /* XXX fix */ oldpri = td->td_user_pri; sched_user_prio(td, newpri); - if (curthread == td) - sched_prio(curthread, td->td_user_pri); /* XXX dubious */ + if (td->td_user_pri != oldpri && (td == curthread || + td->td_priority == oldpri || td->td_user_pri >= PRI_MAX_REALTIME)) + sched_prio(td, td->td_user_pri); if (TD_ON_UPILOCK(td) && oldpri != newpri) { critical_enter(); thread_unlock(td); From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 20:08:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD643106566C; Fri, 2 Dec 2011 20:08:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 853A68FC0A; Fri, 2 Dec 2011 20:08:17 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 1ECA546B06; Fri, 2 Dec 2011 15:08:17 -0500 (EST) Received: from John-Baldwins-MacBook-Air.local (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7E77CB915; Fri, 2 Dec 2011 15:08:16 -0500 (EST) Message-ID: <4ED93030.6000203@FreeBSD.org> Date: Fri, 02 Dec 2011 15:08:16 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201112021959.pB2Jxka6006739@svn.freebsd.org> In-Reply-To: <201112021959.pB2Jxka6006739@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 02 Dec 2011 15:08:16 -0500 (EST) Cc: Subject: Re: svn commit: r228207 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 20:08:17 -0000 On 12/2/11 2:59 PM, John Baldwin wrote: > Author: jhb > Date: Fri Dec 2 19:59:46 2011 > New Revision: 228207 > URL: http://svn.freebsd.org/changeset/base/228207 > > Log: > When changing the user priority of a thread, change the real priority > in addition to the user priority for threads whose current real priority > is equal to the previous user priority or if the new priority is a > real-time priority. This allows priority changes of other threads to > have an immediate effect. An example that this fixes is suppose you have a CPU bound thread running on an dedicated CPU with rtprio and now want to run another quick thread on that CPU. The quick thread doesn't have rtprio and won't get a chance to run (by design). You want to fix this though so you lower the CPU bound thread to a lower rtprio and set the quick thread to rtprio 0. Without this fix the quick thread still won't get to run as the rtprio 0 will never take effect until the thread returns from userland. With this change it will now take effect immediately so the quick thread will preempt the CPU bound one. You can test this by scheduling two CPU bound rtprio threads on a single CPU (I used jot ${BIGNUM} >/dev/null) and frob the two processes relative realtime priorities. Before whatever jot started running first would never be preempted by the second jot, even if the second jot was assigned a higher RT priority. Now the the jot process with the highest RT priority always runs. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 21:19:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 806E21065670; Fri, 2 Dec 2011 21:19:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 702F78FC0C; Fri, 2 Dec 2011 21:19:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2LJENb009296; Fri, 2 Dec 2011 21:19:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2LJEqJ009294; Fri, 2 Dec 2011 21:19:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112022119.pB2LJEqJ009294@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Dec 2011 21:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 21:19:14 -0000 Author: marius Date: Fri Dec 2 21:19:14 2011 New Revision: 228209 URL: http://svn.freebsd.org/changeset/base/228209 Log: - In device_probe_child(9) check the return value of device_set_driver(9) when actually setting a driver as especially ENOMEM is fatal in these cases. - Annotate other calls to device_set_devclass(9) and device_set_driver(9) without the return value being checked and that are okay to fail. Reviewed by: yongari (slightly earlier version) Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Fri Dec 2 20:28:45 2011 (r228208) +++ head/sys/kern/subr_bus.c Fri Dec 2 21:19:14 2011 (r228209) @@ -1129,7 +1129,7 @@ devclass_driver_deleted(devclass_t buscl dev->parent->devclass == busclass) { if ((error = device_detach(dev)) != 0) return (error); - device_set_driver(dev, NULL); + (void)device_set_driver(dev, NULL); BUS_PROBE_NOMATCH(dev->parent, dev); devnomatch(dev); dev->flags |= DF_DONENOMATCH; @@ -2007,19 +2007,22 @@ device_probe_child(device_t dev, device_ for (dl = first_matching_driver(dc, child); dl; dl = next_matching_driver(dc, child, dl)) { - /* If this driver's pass is too high, then ignore it. */ if (dl->pass > bus_current_pass) continue; PDEBUG(("Trying %s", DRIVERNAME(dl->driver))); - device_set_driver(child, dl->driver); + result = device_set_driver(child, dl->driver); + if (result == ENOMEM) + return (result); + else if (result != 0) + continue; if (!hasclass) { if (device_set_devclass(child, dl->driver->name)) { printf("driver bug: Unable to set devclass (devname: %s)\n", (child ? device_get_name(child) : "no device")); - device_set_driver(child, NULL); + (void)device_set_driver(child, NULL); continue; } } @@ -2033,7 +2036,7 @@ device_probe_child(device_t dev, device_ /* Reset flags and devclass before the next probe. */ child->devflags = 0; if (!hasclass) - device_set_devclass(child, NULL); + (void)device_set_devclass(child, NULL); /* * If the driver returns SUCCESS, there can be @@ -2050,7 +2053,7 @@ device_probe_child(device_t dev, device_ * certainly doesn't match. */ if (result > 0) { - device_set_driver(child, NULL); + (void)device_set_driver(child, NULL); continue; } @@ -2113,7 +2116,9 @@ device_probe_child(device_t dev, device_ if (result != 0) return (result); } - device_set_driver(child, best->driver); + result = device_set_driver(child, best->driver); + if (result != 0) + return (result); resource_int_value(best->driver->name, child->unit, "flags", &child->devflags); @@ -2722,8 +2727,8 @@ device_attach(device_t dev) dev->driver->name, dev->unit, error); /* Unset the class; set in device_probe_child */ if (dev->devclass == NULL) - device_set_devclass(dev, NULL); - device_set_driver(dev, NULL); + (void)device_set_devclass(dev, NULL); + (void)device_set_driver(dev, NULL); device_sysctl_fini(dev); dev->state = DS_NOTPRESENT; return (error); @@ -2776,7 +2781,7 @@ device_detach(device_t dev) devclass_delete_device(dev->devclass, dev); dev->state = DS_NOTPRESENT; - device_set_driver(dev, NULL); + (void)device_set_driver(dev, NULL); device_set_desc(dev, NULL); device_sysctl_fini(dev); @@ -4613,7 +4618,6 @@ print_driver(driver_t *driver, int inden print_driver_short(driver, indent); } - static void print_driver_list(driver_list_t drivers, int indent) { From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 21:24:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF193106564A; Fri, 2 Dec 2011 21:24:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 866468FC13; Fri, 2 Dec 2011 21:24:38 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 3C02D46B06; Fri, 2 Dec 2011 16:24:38 -0500 (EST) Received: from John-Baldwins-MacBook-Air.local (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id ACF8DB91E; Fri, 2 Dec 2011 16:24:37 -0500 (EST) Message-ID: <4ED94215.7030109@FreeBSD.org> Date: Fri, 02 Dec 2011 16:24:37 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Marius Strobl References: <201112022119.pB2LJEqJ009294@svn.freebsd.org> In-Reply-To: <201112022119.pB2LJEqJ009294@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 02 Dec 2011 16:24:37 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 21:24:38 -0000 On 12/2/11 4:19 PM, Marius Strobl wrote: > Author: marius > Date: Fri Dec 2 21:19:14 2011 > New Revision: 228209 > URL: http://svn.freebsd.org/changeset/base/228209 > > Log: > - In device_probe_child(9) check the return value of device_set_driver(9) > when actually setting a driver as especially ENOMEM is fatal in these > cases. > - Annotate other calls to device_set_devclass(9) and device_set_driver(9) > without the return value being checked and that are okay to fail. > > Reviewed by: yongari (slightly earlier version) Hmm, I've always thought that new-bus overused M_NOWAIT. There are a few places where M_NOWAIT might be appropriate (e.g. from pccbb's interrupt routine when a cardbus card is inserted), but the boot time probe can certainly use M_WAITOK instead. Even the pccbb case could use M_WAITOK if it were simply deferred to a taskqueue (which it probably should be anyway, probing and attaching a driver to a new card is far too expensive to do directly from an interrupt handler). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 21:42:00 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C01AD1065670; Fri, 2 Dec 2011 21:42:00 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 20FB38FC0C; Fri, 2 Dec 2011 21:41:59 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pB2Lfw1Y076181; Fri, 2 Dec 2011 22:41:58 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pB2LfwTj076180; Fri, 2 Dec 2011 22:41:58 +0100 (CET) (envelope-from marius) Date: Fri, 2 Dec 2011 22:41:58 +0100 From: Marius Strobl To: John Baldwin Message-ID: <20111202214158.GE60194@alchemy.franken.de> References: <201112022119.pB2LJEqJ009294@svn.freebsd.org> <4ED94215.7030109@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ED94215.7030109@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 21:42:00 -0000 On Fri, Dec 02, 2011 at 04:24:37PM -0500, John Baldwin wrote: > On 12/2/11 4:19 PM, Marius Strobl wrote: > >Author: marius > >Date: Fri Dec 2 21:19:14 2011 > >New Revision: 228209 > >URL: http://svn.freebsd.org/changeset/base/228209 > > > >Log: > > - In device_probe_child(9) check the return value of > > device_set_driver(9) > > when actually setting a driver as especially ENOMEM is fatal in these > > cases. > > - Annotate other calls to device_set_devclass(9) and > > device_set_driver(9) > > without the return value being checked and that are okay to fail. > > > > Reviewed by: yongari (slightly earlier version) > > Hmm, I've always thought that new-bus overused M_NOWAIT. There are a > few places where M_NOWAIT might be appropriate (e.g. from pccbb's > interrupt routine when a cardbus card is inserted), but the boot time > probe can certainly use M_WAITOK instead. Even the pccbb case could use > M_WAITOK if it were simply deferred to a taskqueue (which it probably > should be anyway, probing and attaching a driver to a new card is far > too expensive to do directly from an interrupt handler). > In general the use of M_NOWAIT vs. M_WAITOK in bus methods is also very inconsistent across device drivers. We should decide how to handle the standard case, document it and fix things up accordingly ... I agree that M_WAITOK should be used in most of these cases. Marius From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 22:03:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD900106566B; Fri, 2 Dec 2011 22:03:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDA578FC08; Fri, 2 Dec 2011 22:03:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2M3RUX010756; Fri, 2 Dec 2011 22:03:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2M3RZI010754; Fri, 2 Dec 2011 22:03:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112022203.pB2M3RZI010754@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Dec 2011 22:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228211 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 22:03:28 -0000 Author: marius Date: Fri Dec 2 22:03:27 2011 New Revision: 228211 URL: http://svn.freebsd.org/changeset/base/228211 Log: It doesn't make much sense to check whether child is NULL after already having dereferenced it. We either should generally check the device_t's supplied to bus functions before using them (which we seem to virtually never do) or just assume that they are not NULL. While at it make this code fit 78 columns. Found with: Coverity Prevent(tm) CID: 4230 Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Fri Dec 2 21:45:46 2011 (r228210) +++ head/sys/kern/subr_bus.c Fri Dec 2 22:03:27 2011 (r228211) @@ -2018,10 +2018,11 @@ device_probe_child(device_t dev, device_ else if (result != 0) continue; if (!hasclass) { - if (device_set_devclass(child, dl->driver->name)) { - printf("driver bug: Unable to set devclass (devname: %s)\n", - (child ? device_get_name(child) : - "no device")); + if (device_set_devclass(child, + dl->driver->name) != 0) { + printf("driver bug: Unable to set " + "devclass (devname: %s)\n", + device_get_name(child)); (void)device_set_driver(child, NULL); continue; } From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 22:37:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889CF1065673; Fri, 2 Dec 2011 22:37:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 761788FC12; Fri, 2 Dec 2011 22:37:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2Mb2rX011846; Fri, 2 Dec 2011 22:37:02 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2Mb2Lx011842; Fri, 2 Dec 2011 22:37:02 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112022237.pB2Mb2Lx011842@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 2 Dec 2011 22:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228212 - in vendor/gperf/dist: . contrib doc lib src tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 22:37:02 -0000 Author: bapt (ports committer) Date: Fri Dec 2 22:37:02 2011 New Revision: 228212 URL: http://svn.freebsd.org/changeset/base/228212 Log: Flatten gperf Reviewed by: cognet Approved by: cognet Added: vendor/gperf/dist/AUTHORS - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/AUTHORS vendor/gperf/dist/COPYING - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/COPYING vendor/gperf/dist/ChangeLog - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/ChangeLog vendor/gperf/dist/INSTALL - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/INSTALL vendor/gperf/dist/Makefile - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/Makefile vendor/gperf/dist/Makefile.devel - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/Makefile.devel vendor/gperf/dist/Makefile.in - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/Makefile.in vendor/gperf/dist/NEWS - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/NEWS vendor/gperf/dist/README - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/README vendor/gperf/dist/README-FIRST - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/README-FIRST vendor/gperf/dist/acconfig.h - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/acconfig.h vendor/gperf/dist/aclocal.m4 - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/aclocal.m4 vendor/gperf/dist/configure - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/configure vendor/gperf/dist/configure.in - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/configure.in vendor/gperf/dist/doc/ - copied from r228211, vendor/gperf/dist/contrib/gperf/doc/ vendor/gperf/dist/gperf.1 - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/gperf.1 vendor/gperf/dist/gperf.texinfo - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/gperf.texinfo vendor/gperf/dist/lib/ - copied from r228211, vendor/gperf/dist/contrib/gperf/lib/ vendor/gperf/dist/mkinstalldirs - copied unchanged from r228211, vendor/gperf/dist/contrib/gperf/mkinstalldirs vendor/gperf/dist/src/ - copied from r228211, vendor/gperf/dist/contrib/gperf/src/ vendor/gperf/dist/tests/ - copied from r228211, vendor/gperf/dist/contrib/gperf/tests/ Deleted: vendor/gperf/dist/contrib/ Copied: vendor/gperf/dist/AUTHORS (from r228211, vendor/gperf/dist/contrib/gperf/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gperf/dist/AUTHORS Fri Dec 2 22:37:02 2011 (r228212, copy of r228211, vendor/gperf/dist/contrib/gperf/AUTHORS) @@ -0,0 +1,2 @@ +Douglas C. Schmidt +Bruno Haible Copied: vendor/gperf/dist/COPYING (from r228211, vendor/gperf/dist/contrib/gperf/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gperf/dist/COPYING Fri Dec 2 22:37:02 2011 (r228212, copy of r228211, vendor/gperf/dist/contrib/gperf/COPYING) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, + USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Copied: vendor/gperf/dist/ChangeLog (from r228211, vendor/gperf/dist/contrib/gperf/ChangeLog) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gperf/dist/ChangeLog Fri Dec 2 22:37:02 2011 (r228212, copy of r228211, vendor/gperf/dist/contrib/gperf/ChangeLog) @@ -0,0 +1,1718 @@ +2000-09-26 Bruno Haible + + * gperf-2.7.2 released. + + * doc/gperf.texi: Add a second bug report address + . + * README: Updated. + +2000-08-28 Bruno Haible + + * lib/getopt.h (struct option): Use "const" also when compiling in + C++ mode. Avoids warnings from Sun CC and HP-UX aCC. + + * doc/Makefile.in (docdir): Change from $(datadir)/doc/@PACKAGE@ to + $(prefix)/doc/@PACKAGE@, following the newest GNU standards. + +2000-08-20 Bruno Haible + + * src/version.cc: Bump version number to 2.7.2. + * doc/gperf.texi: Likewise. + + * doc/texinfo.tex: Update to post-texinfo-4.0 version. @code in the + title page now chooses a larger font. The overall layout of the + text is denser. + + * AUTHORS: New file. + + * tests/Makefile.in (all): Add check-lang-utf8 and check-lang-ucs2. + (check-lang-utf8, check-lang-ucs2): New targets. + (clean): Remove lu8out and lu2out. + * tests/lang-utf8.gperf, tests/lang-utf8.exp: New files. + * tests/lang-ucs2.gperf, tests/test2.c, tests/lang-ucs2.in, + tests/lang-ucs2.exp: New files. + + Allow the use of embedded NULs in keys. + * lib/hash.h (hashpjw): Add a length argument. + * lib/hash.cc (hashpjw): Likewise. Don't stop when encountering a NUL + character. + * src/hash-table.h (Hash_Table constructor): Add ignore_len argument. + (Hash_Table::ignore_length): New field. + (Hash_Table::insert): Renamed from Hash_Table::operator(). Remove + ignore_length argument. + * src/hash-table.cc (NIL): Remove macro. + (Hash_Table constructor): Add ignore_len argument. Use it to + initialize ignore_length. + (Hash_Table destructor): Specify explicit length of char_set and + key. + (Hash_Table::insert): Renamed from Hash_Table::operator(). Remove + ignore_length argument. Pass explicit length to hashpjw. Compare + char_set using memcmp, not strcmp. + * src/list-node.h (List_Node): Rename field length to key_length. + New field char_set_length. + (List_Node constructor): Accept key and rest, not the entire line. + * src/list-node.cc (List_Node constructor): Accept key and rest, not + the entire line. Don't NUL terminate key and char_set. Specify + explicit length of key. Initialize char_set_length field. + * src/key-list.cc: Include . + (parse_line): New function. + (Key_List::read_keys): Call parse_line instead of new List_Node. + Pass option[NOLENGTH] to Hash_Table constructor, not + Hash_Table::insert. Specify explicit length of key and char_set. + (Key_List::get_occurrence): Use explicit length of char_set. + (Key_List::set_determined): Likewise. + (Key_List::already_determined): Likewise. + (output_string): Add length argument. Output unprintable characters + using octal escape sequence. + (output_keyword_entry): Use explicit length of key. + (Key_List::output_lookup_array): Specify explicit length of key. + (output_switch_case): Likewise. + (Key_List::dump): Likewise. + * src/gen-perf.h (Gen_Perf::compute_disjoint_union): Add two length + arguments. + * src/gen-perf.cc (Gen_Perf::compute_disjoint_union): Likewise. Don't + stop when encountering NUL characters. Don't NUL terminate the + result. + (Gen_Perf::hash): Use explicit length of char_set. + (Gen_Perf::change): Specify explicit length of key. + * doc/gperf.texi: Document it. + + * doc/help2man: New file, help2man version 1.022. + * Makefile.devel (all): Add doc/gperf.1. + (doc/gperf.1): New target. + * doc/gperf.1: Automatically generated. + + * mkinstalldirs: New file, from automake-1.4, grep-2.4.1, guile-1.4, + libtool-1.3.3, make-3.79.1, tar-1.13. + * src/Makefile.in (MKINSTALLDIRS): New variable. + (install, installdirs): Use it instead of mkdir. + * doc/Makefile.in (MKINSTALLDIRS): New variable. + (install, installdirs): Use it instead of mkdir. + + * INSTALL: Update. + +2000-08-19 Bruno Haible + + * src/key-list.cc (Output_Compare_Memcmp): New class. + (Key_List::output_lookup_function): When option -l is given, use + memcmp instead of strcmp or strncmp. + + * doc/gperf.texi: The bug report address is . + The download address is ftp.gnu.org. Remove mention of -a and -g + options (now nops). Explain effect of -c option. + + * doc/configure.in (PACKAGE): New variable. + * doc/Makefile.in (datadir, docdir): New variables. + (dvidir, htmldir): Change values. + (install, installdirs): Update. + + * src/configure.in: Rename cache variable gp_cxx_throw_decl to + gp_cv_cxx_throw_decl. + + * src/key-list.cc (Key_List::output_hash_function): When outputting + __inline, take advantage of C++ compilers which have inline. + + * src/key-list.cc (Output_Compare_Strncmp::output_comparison): + After the call to strncmp, verify that expr2 is not longer than + `len'. + Reported by Carlo Wood . + + * src/key-list.cc (Key_List::output_lookup_function_body): Avoid + emitting the loop for dealing with duplicates if + total_duplicates == 0. + + * src/key-list.cc (Key_List::read_keys): Don't accept an empty key. + + * src/Makefile.in (install, installdirs, uninstall): Respect + $(DESTDIR). + * doc/Makefile.in (install, installdirs, uninstall): Likewise. + + * src/options.cc (Options::print_options): Escape the arguments which + contain special characters. + + * tests/c-parse.gperf: Updated from gcc-2.95.2/gcc/c-parse.gperf. + * tests/objc.gperf: New file, from gcc-2.95.2/gcc/objc/objc.gperf. + * tests/chill.gperf: New file, from gcc-2.95.2/gcc/ch/gperf. + * tests/cplusplus.gperf: New file, from gcc-2.95.2/gcc/cp/gxx.gperf. + * tests/gplus.gperf: Remove file. + * tests/java.gperf: New file, from gcc-2.95.2/gcc/java/keyword.gperf. + * tests/Makefile: Check them all. + * tests/c-parse.exp: Renamed from tests/test-1.exp. + * tests/modula2.exp: Renamed from tests/test-2.exp. + * tests/cplusplus.exp: Renamed from tests/test-3.exp. + * tests/gpc.exp: Renamed from tests/test-5.exp. + + * src/key-list.cc (output_switch_case): Add trailing semicolon to + lengthptr assignment line. Fixes bug with -D and -S. + From Reini Urban . Also reported by + David Hunter. + * tests/Makefile.in (check-lang-syntax): Perform each test with -D + once without and once with duplicates. + + * src/key-list.cc (output_keyword_entry): Avoid outputting a struct + initializer of the form {"key",}. + + * src/iterator.cc: Don't include . + From Michael Deutschmann . + + * tests/Makefile.in (VALIDATE, check-lang-syntax): Use $(srcdir) where + appropriate. + Reported by Andreas Schwab . + + * tests/validate: Don't run -traditional tests by default. + + * src/main.cc (main): Check for write error on stdout before returning. + + * src/Makefile.in (LDFLAGS): New definition, to catch the value given + at configure time. + + Make the structure initializers customizable. Based on a patch by + Kaveh R. Ghazi . + * src/options.h (Options::get_initializer_suffix, + Options::initializer_suffix): New declarations. + * src/options.icc (Options::get_initializer_suffix): New function. + * src/options.cc (DEFAULT_INITIALIZER_SUFFIX): New constant. + (Options::initializer_suffix): New variable. + (Options::short_usage): Document option "-F". + (Options::long_usage): Document option "-F". + (Options constructor): Initialize initializer_suffix. + (Options destructor): Dump initializer_suffix. + (long_options): Add option "-F". + (Options::operator()): Accept option "-F". Sets initializer_suffix. + * src/key-list.cc (output_keyword_blank_entries): Output + initializer_suffix. + * doc/gperf.texi: Document option "-F". + + * COPYING: Replace with GPL version 2 (with new FSF address and Y2K + safe year format). + + * doc/gpl.texinfo: New file. + * doc/gperf.texi: Document it. + * doc/Makefile.in (gperf.info, gperf.dvi, gperf.html, gperf_toc.html): + Update dependencies. + + * doc/Makefile.in (MAKEINFO): Unset LANG while running makeinfo. + +1998-05-20 Bruno Haible + + * doc/Makefile.in (gperf.dvi, clean): Remove gperf.cps. + (install, installdirs, uninstall): Don't install gperf.dvi. The + info and HTML documentations are sufficient for on-line use, and + users who wish to print the documentation (in PS or DVI format) + can do this directly off the source distribution. + (DVIPS): Use "-D600" instead of "-Pljfour", for portability. + +1998-05-20 Akim Demaille + + * doc/gperf.texi: Many modifications: + (Output Format): Declare `hash' and `in_word_set' as functions. + (Concept Index): New section. + (Title page): Use standard presentation. + (Top): Use @top instead of @unnumbered so that automatic master + update works. + (Motivation): Avoid spaces in @var. + (Options): Use the standard name ``Invoking ...''. + (Options): Declare also the long form of the options. + (Options): Remove redundant @itemize when @table is used. + +1998-05-08 Andreas Schwab + + * aclocal.m4 (CL_PROG_INSTALL): Set cl_cv_path_install, not + ac_cv_path_install. + +Sat May 2 13:20:54 1998 Bruno Haible + + * gperf-2.7 released. + +Sat May 2 12:31:51 1998 Bruno Haible + + * src/version.cc (version_string): Remove the "(C++ version)" suffix. + It's redundant: the early C versions of gperf are called cperf. + Reported by Karl Berry. + * src/option.cc (Options::operator()): Trim the output of "gperf -v". + +Thu Apr 16 13:22:16 1998 Bruno Haible + + * lib/Makefile.in, src/Makefile.in: Don't use $(TARGET_ARCH). + Solaris "make" sets it to a value not understood by "cc". + +Wed Apr 15 23:52:14 1998 Bruno Haible + + * lib/Makefile.in, src/Makefile.in: Don't use implicit rules. Don't + use $<. AIX "make" and OSF/1 "make" have problems with both. + * src/gen-perf.cc, src/key-list.cc: Cast free() argument to char*, + otherwise it doesn't compile on SunOS 4. + * src/key-list.h: Declare structs outside of other declarations, + needed for OSF/1 cxx 5.5. + * lib/getopt.h: Use prototypes if __STDC__ || __cplusplus. + Don't give a prototype for getopt(), to avoid error on SunOS 4. + * lib/getopt.c: Declare strncmp, to avoid warnings. + +Tue Apr 14 23:24:07 1998 Bruno Haible + + * lib/GetOpt.{h,cc}: Remove files. + * lib/getopt.{h,c}, lib/getopt1.c: New files, from GNU libc. + * lib/configure.in (AC_INIT): Search for hash.cc, not GetOpt.cc. + * lib/Makefile.in (OBJECTS): Remove GetOpt.o, add getopt.o, getopt1.o. + (getopt.o, getopt1.o, hash.o): Use explicit building rules. Some + "make"s don't support to have both implicit rules for "%.o : %.c" + and "%.o : %.cc" in the same Makefile. + * lib/hash.{h,cc}: Remove #pragma; there are no templates here. + * src/option.h (Options::usage): Remove. + (Options::short_usage, Options::long_usage): Declare. + * src/option.cc (Options::usage): Remove. + (Options::short_usage, Options::long_usage): New functions. + (long_options): New array. + (Options::operator()): Use getopt_long instead of GetOpt::operator(), + change all references to GetOpt members. + + * src/std-err.{h,cc}: Remove files. + * src/gen-perf.cc, src/key-list.cc, list-node.cc, new.cc, options.cc: + Call fprintf(stderr) instead of Std_Err::report_error(). + * src/key-list.h, src/list-node.h, src/options.h: Don't use class + Std_Err any more. + * src/option.cc (program_name): New variable. + * src/Makefile.in: Remove STD_ERR_H. + (OBJECTS): Remove std-err.o. + +Mon Mar 23 01:03:35 1998 Bruno Haible + + * aclocal.m4, {lib,src,tests}/configure.in: Remove CL_CC_WORKS and + CL_CXX_WORKS, already contained in autoconf 2.12. + + * src/gen-perf.cc, src/key-list.cc: Move some code from + Gen_Perf::Gen_Perf() to Key_List::output(). + * src/Makefile.in: Update dependencies. + + * src/options.{h,cc}: Remove option "-p". + * src/key-list.cc (Key_List::set_output_types): Rewrite. + (default_array_type, default_return_type): Remove. + * src/key-list.cc: Adjust "const" handling. + + With option "-t" [TYPE], don't emit wrong code if there is no + space before the struct's opening brace. + +Sun Mar 22 16:59:15 1998 Bruno Haible + + * src/key-list.{h,cc}: Completely reorganized the output routines. + Rewrote from scratch the output_switch() function. Use classes + (Output_Constants, Output_Expr, Output_Compare) for abstraction. + In particular: + + Don't emit trailing whitespace and spurious blank lines. + + Adjust indentation of the arrays. + + Don't emit commas at the end of array initializers and + struct initializers. + + With option "-l" [LENTABLE], compare the length before + fetching the word from memory. + + With option "-S" [SWITCH], emit the comparison code just once, + not once in every switch statement. + + With option "-S" [SWITCH], choose the right switch statement + through a binary search, not a linear search. + + With option "-S" [SWITCH], emit straightforward comparisons + instead of switch statements with just one "case" label. + + With options "-S -p -t" [SWITCH, POINTER, TYPE], don't emit + spurious empty elements at the beginning of the wordlist array. + + With option "-D" [DUP] and not option "-S" [SWITCH], if there + is no more room for duplicate entries in the lookup array, + don't call `assert (i != 0)'. Instead, make the array larger :-) + + With option "-D" [DUP], if there are no duplicates, don't + automatically fall back to the non-"-D" algorithm. If the user + wants the non-"-D" algorithm, he can just not specify "-D". + + With option "-D" [DUP] and either options "-p -t" [POINTER, TYPE] + or not option "-S" [SWITCH], don't emit spurious empty elements + at the beginning of the wordlist array. + + With option "-D" [DUP], simplify the detection and processing + of duplicate entries in the lookup array. + + With options "-D -l" [DUP, LENTABLE] and not option "-S" [SWITCH], + don't forget to emit the lengthtable array. + + With options "-D -l -S" [DUP, LENTABLE, SWITCH], don't forget to + compare the lengths before comparing the strings. + + * src/gen-perf.cc: No need to include . + * src/options.cc: Likewise. + + * src/options.cc: Don't use `errno' after freopen failed. + * src/std-err.cc: `report_error' doesn't call strerror(errno) any + more. No need to include and . + + * tests/Makefile.in (check-*): Any difference between .exp and .out + is a failure. Don't ignore whitespace differences. + + * tests/Makefile.in (check-lang-syntax): Add some more checks. + +Fri Mar 20 00:54:54 1998 Bruno Haible + + * tests/jscript.gperf: Renamed from tests/javascript.gperf, because + of Minix and SVR2 14-character filename limit. + * src/key-list.cc (output_string): New function. + (Key_List::output_switch, Key_List::output_keyword_table): Call it. + + * src/options.{h,icc,cc} (get_wordlist_name): New function. Add + option -W. + * src/key-list.cc (Key_List::output_switch, + Key_List::output_keyword_table, Key_List::output_lookup_function): + Use it. + Patch from William Bader . + + * src/version.cc: Bump version number directly from 2.5 to 2.7, + because Schmidt's last release from 1991 carries version number 2.6. + +Tue Jul 30 00:02:39 1991 Douglas C. Schmidt (schmidt at net4.ics.uci.edu) + + * Fixed a small bug in the Key_List::output_keyword_table routine + that caused an extra newline to be printed if there where no + leading blank entries... (who cares, right?!) + +Mon Jul 29 22:05:40 1991 Douglas C. Schmidt (schmidt at net4.ics.uci.edu) + + * Modified the handling of the -E (emit enums rather than + #defines) option in conjunction with the -G option. Now, if -G + and -E are given the enums are generated outside the lookup + function, rather than within it! + +Mon Apr 8 18:17:04 1991 Doug Schmidt (schmidt at net4.ics.uci.edu) + + * Yucko, there was a bug in the handling of -c (and of course the + new -I command in key-list.cc). Apparently when I added the + super-duper hack that provided support for duplicate keys I + forgot to update the strcmp output... + +Mon Mar 9 02:19:04 1998 Bruno Haible + + * Moved the documentation to doc/, put the stuff borrowed from + libg++ into lib/. + * Rewrote all Makefile.in's for better compliance with GNU standards. + * Autoconf based configuration. Rewrote all configure.in's. Added + aclocal.m4, with macros from CLISP and CLN. Added Makefile.devel. + * src/depend: Removed. Dependencies are now in src/Makefile.in. + + * src/bool-array.icc: New file, contains inline functions, from both + src/bool-array.h and src/bool-array.cc. + * src/options.icc: New file, contains inline functions, from both + src/options.h and src/options.cc. + * src/read-line.icc: New file, contains inline functions, from both + src/read-line.h and src/read-line.cc. + + * src/bool-array.h: Don't include . + * src/bool-array.cc: Include . + * src/gen-perf.cc: No need to include . Don't include + <_G_config.h>. + * src/hash-table.cc: Don't include and . Include + and lib/hash.h instead. + * src/iterator.cc: Don't include . + * src/key-list.cc: Don't include . Include and + instead. + * src/list-node.cc: Don't include . Include instead. + Remove `index' hack. + * src/main.cc: Don't include <_G_config.h>. + * src/new.cc: Don't include . Include instead. + * src/options.cc: Don't include . Include and + instead. + * src/read-line.cc: Don't include . Include + instead. + * src/std-err.cc: Don't include . Include (for Irix). + * src/vectors.h: No need to include . + * src/version.cc: No need to include . + + * src/bool-array.h: Change `STORAGE_TYPE' from int to unsigned int. + * src/bool-array.{h,cc}: Change type of `Bool_Array::size' from int + to unsigned int. + * src/bool-array.{h,cc}: Change type of `Bool_Array::init' argument + from STORAGE_TYPE to unsigned int. + * src/gen-perf.{h,cc}: Change two `Gen_Perf::compute_disjoint_union' + argument types from `char *' to `const char *'. + * src/iterator.h: Change type of `Iterator::str' and argument of + `Iterator::Iterator' from `char *' to `const char *'. + * src/iterator.cc: Cast to `unsigned char' before calling `isdigit'. + * src/key-list.{h,cc}: Change type of `Key_List::array_type', + `Key_List::return_type', `Key_List::struct_tag', + `Key_List::include_src', `default_array_type', `default_return_type' + and return type of `Key_List::get_array_type', + `Key_List::get_special_input', `Key_List::save_include_src' from + `char *' to `const char *'. + * src/key-list.cc: Change "pretty gross" assignment. + * src/key-list.cc: Don't use `alloca', HP-UX CC lacks it. + * lib/GetOpt.cc: Likewise. + * src/key-list.cc (merge): Use iteration instead of recursion. + * src/list-node.{h,cc}: Change type of `List_Node::key', + `List_Node::rest', `List_Node::char_set' from `char *' to + `const char *'. + * src/new.cc: Don't use BUFSIZ. Conditionalize the throw() declaration. + * src/read-line.h: Don't use BUFSIZ. + * src/read-line.cc: Make CHUNK_SIZE a constant, and use allocate the + buffers on the stack by default. Use memcpy for copying buffers. + Include . + * src/read-line.icc (get_line): Use iteration instead of tail recursion. + Don't call ungetc(EOF,stdin). + * src/std-err.{h,cc}: Change type of `Std_Err::program_name' and of + argument `Std_Err::report_error' from `char *' to `const char *'. + * src/std-err.cc: `report_error' doesn't call `exit' any more. All + callers changed to do that themselves. + * src/trace.h: Make constructor/destructor calls non-inline. + + * src/key-list.cc (output_hash_function): If option[CPLUSPLUS], + always make the hash function inline. + (output): Declare the hash function inline, with the right name. + * src/options.{h,cc}, src/gen-perf.cc, src/key-list.cc: Remove + options -g, making it on by default. Remove option -a. Instead, + introduce "-L KR-C", "-L C", "-L ANSI-C", "-L C++". + * src/options.{h,cc}, src/key-list.cc: Add option -I. + * src/key-list.cc: Don't emit "const" if compiling in mode "-L KR-C". + * src/key-list.cc: Don't emit a comma at the end of an enum list. + * src/main.cc: Remove COUNT_TIME code. + * src/vectors.h, src/key-list.cc, src/options.cc, src/list-node.cc: + ALPHA_SIZE defaults to 256 now. Add option -7. + + * tests/javascript.gperf: New file. + * tests/jstest*.gperf, tests/validate: New tests. + +Sat Jan 31 01:38:11 1998 Alexandre Oliva + + * src/Makefile.in ($(TARGETPROG)): Add $(CFLAGS). + +Wed Jan 28 01:56:00 1998 Manfred Hollstein + + * configure.in (package_makefile_rules_frag): New and + redirect stderr from ${srcdir}/config.shared to + ${package_makefile_rules_frag}. + * src/configure.in: Ditto. + * tests/configure.in: Ditto. + +Fri Jan 23 08:00:41 1998 H.J. Lu (hjl@gnu.org) + + * gperf.texi (@ichapter): Changed to @chapter. + +Wed Jan 14 09:16:48 1998 H.J. Lu (hjl@gnu.org) + + * src/key-list.cc, src/key-list.h (Key_List::strcspn): Don't + define if strcspn is defined. + +Fri Jan 24 13:23:47 1997 Mike Stump + + * src/new.cc (operator delete): Add the exception specification. + +Mon Feb 5 19:29:16 1996 Per Bothner + + * src/read-line.cc (Read_Line::readln_aux): Handle EOF if last line + has a length which is an exact multiple of CHUNK_SIZE. (Used to throw + away the line's contents.) From Bruno Haible . + * src/Makefile.in ($(TARGETPROG)): Add -lm to link line. + +Tue Jun 11 13:43:50 1996 Brendan Kehoe + + * src/list-node.cc (List_Node): Reorder init of nodes to + match declaration order. + * src/hash-table.cc (Hash_Table): Likewise. + +Tue Oct 10 16:37:28 1995 Mike Stump + + * src/new.cc: Since malloc/delete are not paired, we cannot call + free. + +Wed Jan 4 12:40:14 1995 Per Bothner + + * src/Makefile.in ($(TARGETPROG)): Link with $(LDFLAGS). + Patch from John Interrante . + +Sat Nov 5 19:12:48 1994 Jason Merrill (jason@phydeaux.cygnus.com) + + * src/Makefile.in (LIBS): Remove. + +Tue Oct 18 17:51:14 1994 Per Bothner + + * src/std-err.cc: Use stderror, instead of the non-standard + sys_nerr and sys_errlist. + +Sat Sep 17 22:02:13 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * src/key-list.cc (output_hash_function): + Patch from William Bader . + +Fri Jul 15 09:38:11 1994 Per Bothner (bothner@cygnus.com) + + * src/std-err.cc: #include , and only declare + extern int errno if errno is not a macro. + +Mon May 30 17:29:34 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * Makefile.in (src_all, install): Make sure to add '/' after + `pwd` in $rootme, as expected by FLAGS_TO_PASS. + +Wed May 11 00:47:22 1994 Jason Merrill (jason@deneb.cygnus.com) + + Make libg++ build with gcc -ansi -pedantic-errors + * src/options.h: Lose commas at end of enumerator lists. + +Sun Dec 5 19:16:40 1993 Brendan Kehoe (brendan@lisa.cygnus.com) + + * src/hash-table.cc (Hash_Table::~Hash_Table): Don't pass an + argument to fprintf, since it's not expecting one. + +Fri Nov 26 19:03:18 1993 Per Bothner (bothner@kalessin.cygnus.com) + + * src/list-node.cc: #undef index, for the sake of broken NeXT, + +Thu Nov 4 11:16:03 1993 Per Bothner (bothner@kalessin.cygnus.com) + + * Makefile.in (install): Use INSTALL_DATA for gperf.1. + +Mon Oct 25 18:40:51 1993 Per Bothner (bothner@kalessin.cygnus.com) + + * src/key-list.cc (Key_List::read_keys): Use POW macro + to increase hash table size to power of 2. + + * options.h (LARGE_STACK_ARRAYS): New flag. Defaults to zero. + * gen-perf.cc, key-list.cc, read-line.cc: + Only stack-allocate large arrays if LARGE_STACK_ARRAYS is set. + * main.cc (main): Only call setrlimit (RLIMIT_STACK, ...) + if LARGE_STACK_ARRAYS. + +Mon Oct 4 17:45:08 1993 Per Bothner (bothner@kalessin.cygnus.com) + + * src/gen-perf.cc: Always use ANSI rand/srand instead of BSDisms. + +Wed Aug 18 12:19:53 1993 Per Bothner (bothner@kalessin.cygnus.com) + + * Makefile.in (src_all): Make less verbose output. + +Fri May 28 14:01:18 1993 Per Bothner (bothner@rtl.cygnus.com) + + * src/gen-perf.cc (Gen_Perf::change): Don't use gcc-specific + 2-operand conditional expression. + * src/key-list.cc (Key_List::output_lookup_array): + Don't use variable-size stack arrays, unless compiled by g++. + +Tue May 4 14:08:44 1993 Per Bothner (bothner@cygnus.com) + + Changes (mostly from Peter Schauer) to permit compilation + using cfront 3.0 and otherwise be ARM-conforming. + * src/key-list.h: class Key_List must use public derivation + of base class Std_Err (because Gen_Perf::operator() in gen-perf.cc + calls Std_Err::report_error). + * src/gen-perf.cc (Gen_Perf::affects_prev), src/hash-table.cc + (Hash_Table::operator()): Don't use gcc-specific 2-operand + conditional expression. + * src/iterator.cc (Iterator::operator()): Don't use gcc-specific + range construct in case label. + * key-list.cc (Key_List::output_lookup_array, Key_List::read_keys), + src/gen-perf.cc (Gen_Perf::operator(), src/read-line.cc + (Read_Line::readln_aux): If not gcc, don't allocate + variable-sized arrays on stack. + * src/new.cc (operator new): Argument type should be size_t. + * key-list.cc (Key_List::output_lookup_array, Key_List::read_keys), + new/cc (::operator new): Don't use non-standard >?= operator. + +Tue Apr 27 20:11:30 1993 Per Bothner (bothner@cygnus.com) + + * src/Makefile.in: Define TARGETPROG, and use it. + +Mon Apr 19 00:29:18 1993 Per Bothner (bothner@cygnus.com) + + * Makefile.in, configure.in: Re-vamped configure scheme. + * gperf.texinfo: Renamed to gperf.texi. + * src/bool-array.{h,cc}: ANSIfy bzero->memset. + +Sat Jan 30 20:21:28 1993 Brendan Kehoe (brendan@lisa.cygnus.com) + + * tests/Makefile.in (mostlyclean): Also delete aout, cout, m3out, + pout, and preout. + +Tue Dec 29 08:58:17 1992 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in: pass $(FLAGS_TO_PASS) to all calls to make. + (FLAGS_TO_PASS): added INSTALL, INSTALL_DATA, INSTALL_PROGRAM. + +Mon Dec 21 18:46:46 1992 Per Bothner (bothner@rtl.cygnus.com) + + * tests/expected.* renamed to *.exp to fit in 14 chars. + * tests/Makefile.in: Update accordingly. + Also rename output.* to *.out. + * src/Makefile.in (clean): Remove gperf program. + +Wed Dec 9 14:33:34 1992 Per Bothner (bothner@cygnus.com) + + * src/hash-table.cc, src/bool-array.h: ANSIfy bzero->memset. + +Thu Dec 3 19:34:12 1992 Per Bothner (bothner@cygnus.com) + + * Makefile.in (distclean, realclean): Don't delete + Makefile before recursing. + +Fri Nov 6 13:41:49 1992 Per Bothner (bothner@rtl.cygnus.com) + + * key-list.{h,cc}: Remove MAX_INT (and similar) constant + fields from Key_List class, and use INT_MAX (etc) from limits.h. + * key-list.{h,cc}, options.{h,cc}, vectors.h: Removed all + uses of initialized const fields, as they are non-standard + - and their use was easy to do away with. Mostly, just + made the constants static non-fields in the .cc file. + +Mon Nov 2 13:10:11 1992 Per Bothner (bothner@cygnus.com) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 22:39:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9220A106566B; Fri, 2 Dec 2011 22:39:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 808538FC0C; Fri, 2 Dec 2011 22:39:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2MdVXI011947; Fri, 2 Dec 2011 22:39:31 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2MdVoW011946; Fri, 2 Dec 2011 22:39:31 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112022239.pB2MdVoW011946@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 2 Dec 2011 22:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228213 - in vendor/gperf/dist: . doc lib src tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 22:39:31 -0000 Author: bapt (ports committer) Date: Fri Dec 2 22:39:31 2011 New Revision: 228213 URL: http://svn.freebsd.org/changeset/base/228213 Log: Perform the post flatten cleanup Approved by: cognet Modified: Directory Properties: vendor/gperf/dist/AUTHORS (props changed) vendor/gperf/dist/COPYING (props changed) vendor/gperf/dist/ChangeLog (props changed) vendor/gperf/dist/INSTALL (props changed) vendor/gperf/dist/Makefile (props changed) vendor/gperf/dist/Makefile.devel (props changed) vendor/gperf/dist/Makefile.in (props changed) vendor/gperf/dist/NEWS (props changed) vendor/gperf/dist/README (props changed) vendor/gperf/dist/README-FIRST (props changed) vendor/gperf/dist/acconfig.h (props changed) vendor/gperf/dist/aclocal.m4 (props changed) vendor/gperf/dist/configure (props changed) vendor/gperf/dist/configure.in (props changed) vendor/gperf/dist/doc/Makefile.in (props changed) vendor/gperf/dist/doc/configure (props changed) vendor/gperf/dist/doc/configure.in (props changed) vendor/gperf/dist/doc/gperf.1 (props changed) vendor/gperf/dist/doc/gperf.texi (props changed) vendor/gperf/dist/doc/gpl.texinfo (props changed) vendor/gperf/dist/doc/help2man (props changed) vendor/gperf/dist/doc/texinfo.tex (props changed) vendor/gperf/dist/gperf.1 (props changed) vendor/gperf/dist/gperf.texinfo (props changed) vendor/gperf/dist/lib/Makefile.in (props changed) vendor/gperf/dist/lib/configure (props changed) vendor/gperf/dist/lib/configure.in (props changed) vendor/gperf/dist/lib/getopt.c (props changed) vendor/gperf/dist/lib/getopt.c.patch (props changed) vendor/gperf/dist/lib/getopt.h (props changed) vendor/gperf/dist/lib/getopt.h.patch (props changed) vendor/gperf/dist/lib/getopt1.c (props changed) vendor/gperf/dist/lib/hash.cc (props changed) vendor/gperf/dist/lib/hash.h (props changed) vendor/gperf/dist/mkinstalldirs (props changed) vendor/gperf/dist/src/Makefile (props changed) vendor/gperf/dist/src/Makefile.in (props changed) vendor/gperf/dist/src/bool-array.cc (props changed) vendor/gperf/dist/src/bool-array.h (props changed) vendor/gperf/dist/src/bool-array.icc (props changed) vendor/gperf/dist/src/boolarray.c (props changed) vendor/gperf/dist/src/boolarray.h (props changed) vendor/gperf/dist/src/config.h.in (props changed) vendor/gperf/dist/src/configure (props changed) vendor/gperf/dist/src/configure.in (props changed) vendor/gperf/dist/src/gen-perf.cc (props changed) vendor/gperf/dist/src/gen-perf.h (props changed) vendor/gperf/dist/src/getopt.c (props changed) vendor/gperf/dist/src/gperf-to-do (props changed) vendor/gperf/dist/src/hash-table.cc (props changed) vendor/gperf/dist/src/hash-table.h (props changed) vendor/gperf/dist/src/hashtable.c (props changed) vendor/gperf/dist/src/hashtable.h (props changed) vendor/gperf/dist/src/iterator.c (props changed) vendor/gperf/dist/src/iterator.cc (props changed) vendor/gperf/dist/src/iterator.h (props changed) vendor/gperf/dist/src/key-list.cc (props changed) vendor/gperf/dist/src/key-list.h (props changed) vendor/gperf/dist/src/keylist.c (props changed) vendor/gperf/dist/src/keylist.h (props changed) vendor/gperf/dist/src/list-node.cc (props changed) vendor/gperf/dist/src/list-node.h (props changed) vendor/gperf/dist/src/listnode.c (props changed) vendor/gperf/dist/src/listnode.h (props changed) vendor/gperf/dist/src/main.c (props changed) vendor/gperf/dist/src/main.cc (props changed) vendor/gperf/dist/src/new.cc (props changed) vendor/gperf/dist/src/options.c (props changed) vendor/gperf/dist/src/options.cc (props changed) vendor/gperf/dist/src/options.h (props changed) vendor/gperf/dist/src/options.icc (props changed) vendor/gperf/dist/src/perfect.c (props changed) vendor/gperf/dist/src/perfect.h (props changed) vendor/gperf/dist/src/prototype.h (props changed) vendor/gperf/dist/src/read-line.cc (props changed) vendor/gperf/dist/src/read-line.h (props changed) vendor/gperf/dist/src/read-line.icc (props changed) vendor/gperf/dist/src/readline.c (props changed) vendor/gperf/dist/src/readline.h (props changed) vendor/gperf/dist/src/stderr.c (props changed) vendor/gperf/dist/src/stderr.h (props changed) vendor/gperf/dist/src/trace.cc (props changed) vendor/gperf/dist/src/trace.h (props changed) vendor/gperf/dist/src/vectors.cc (props changed) vendor/gperf/dist/src/vectors.h (props changed) vendor/gperf/dist/src/version.c (props changed) vendor/gperf/dist/src/version.cc (props changed) vendor/gperf/dist/src/version.h (props changed) vendor/gperf/dist/src/xmalloc.c (props changed) vendor/gperf/dist/tests/Makefile (props changed) vendor/gperf/dist/tests/Makefile.in (props changed) vendor/gperf/dist/tests/ada-pred.exp (props changed) vendor/gperf/dist/tests/ada-res.exp (props changed) vendor/gperf/dist/tests/ada.gperf (props changed) vendor/gperf/dist/tests/adadefs.gperf (props changed) vendor/gperf/dist/tests/adapredefined.gperf (props changed) vendor/gperf/dist/tests/c++.gperf (props changed) vendor/gperf/dist/tests/c-parse.gperf (props changed) vendor/gperf/dist/tests/c.exp (props changed) vendor/gperf/dist/tests/c.gperf (props changed) vendor/gperf/dist/tests/configure (props changed) vendor/gperf/dist/tests/configure.in (props changed) vendor/gperf/dist/tests/gpc.gperf (props changed) vendor/gperf/dist/tests/gplus.gperf (props changed) vendor/gperf/dist/tests/irc.gperf (props changed) vendor/gperf/dist/tests/jscript.gperf (props changed) vendor/gperf/dist/tests/jstest1.gperf (props changed) vendor/gperf/dist/tests/jstest2.gperf (props changed) vendor/gperf/dist/tests/jstest3.gperf (props changed) vendor/gperf/dist/tests/makeinfo.gperf (props changed) vendor/gperf/dist/tests/modula.exp (props changed) vendor/gperf/dist/tests/modula2.gperf (props changed) vendor/gperf/dist/tests/modula3.gperf (props changed) vendor/gperf/dist/tests/pascal.exp (props changed) vendor/gperf/dist/tests/pascal.gperf (props changed) vendor/gperf/dist/tests/test-1.exp (props changed) vendor/gperf/dist/tests/test-2.exp (props changed) vendor/gperf/dist/tests/test-3.exp (props changed) vendor/gperf/dist/tests/test-4.exp (props changed) vendor/gperf/dist/tests/test-5.exp (props changed) vendor/gperf/dist/tests/test-6.exp (props changed) vendor/gperf/dist/tests/test-7.exp (props changed) vendor/gperf/dist/tests/test.c (props changed) vendor/gperf/dist/tests/validate (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 22:46:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11D8A1065675; Fri, 2 Dec 2011 22:46:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F38BC8FC17; Fri, 2 Dec 2011 22:46:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2MkrPr012233; Fri, 2 Dec 2011 22:46:53 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2MkrSJ012228; Fri, 2 Dec 2011 22:46:53 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112022246.pB2MkrSJ012228@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 2 Dec 2011 22:46:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228214 - in vendor/gperf/dist: . doc lib src tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 22:46:54 -0000 Author: bapt (ports committer) Date: Fri Dec 2 22:46:53 2011 New Revision: 228214 URL: http://svn.freebsd.org/changeset/base/228214 Log: import gperf 3.0.3 latest GPLv2 Approved by: cognet Added: vendor/gperf/dist/configure.ac vendor/gperf/dist/doc/configure.ac vendor/gperf/dist/lib/configure.ac vendor/gperf/dist/lib/getline.cc (contents, props changed) vendor/gperf/dist/lib/getline.h (contents, props changed) vendor/gperf/dist/src/config.h_vms vendor/gperf/dist/src/configure.ac vendor/gperf/dist/src/input.cc (contents, props changed) vendor/gperf/dist/src/input.h (contents, props changed) vendor/gperf/dist/src/keyword-list.cc (contents, props changed) vendor/gperf/dist/src/keyword-list.h (contents, props changed) vendor/gperf/dist/src/keyword-list.icc vendor/gperf/dist/src/keyword.cc (contents, props changed) vendor/gperf/dist/src/keyword.h (contents, props changed) vendor/gperf/dist/src/keyword.icc vendor/gperf/dist/src/output.cc (contents, props changed) vendor/gperf/dist/src/output.h (contents, props changed) vendor/gperf/dist/src/positions.cc (contents, props changed) vendor/gperf/dist/src/positions.h (contents, props changed) vendor/gperf/dist/src/positions.icc vendor/gperf/dist/src/search.cc (contents, props changed) vendor/gperf/dist/src/search.h (contents, props changed) Deleted: vendor/gperf/dist/Makefile vendor/gperf/dist/README-FIRST vendor/gperf/dist/acconfig.h vendor/gperf/dist/configure.in vendor/gperf/dist/doc/configure.in vendor/gperf/dist/doc/texinfo.tex vendor/gperf/dist/gperf.1 vendor/gperf/dist/gperf.texinfo vendor/gperf/dist/lib/configure.in vendor/gperf/dist/lib/getopt.c vendor/gperf/dist/lib/getopt.c.patch vendor/gperf/dist/lib/getopt.h vendor/gperf/dist/lib/getopt.h.patch vendor/gperf/dist/lib/getopt1.c vendor/gperf/dist/src/Makefile vendor/gperf/dist/src/boolarray.c vendor/gperf/dist/src/boolarray.h vendor/gperf/dist/src/configure.in vendor/gperf/dist/src/gen-perf.cc vendor/gperf/dist/src/gen-perf.h vendor/gperf/dist/src/getopt.c vendor/gperf/dist/src/gperf-to-do vendor/gperf/dist/src/hashtable.c vendor/gperf/dist/src/hashtable.h vendor/gperf/dist/src/iterator.c vendor/gperf/dist/src/iterator.cc vendor/gperf/dist/src/iterator.h vendor/gperf/dist/src/key-list.cc vendor/gperf/dist/src/key-list.h vendor/gperf/dist/src/keylist.c vendor/gperf/dist/src/keylist.h vendor/gperf/dist/src/list-node.cc vendor/gperf/dist/src/list-node.h vendor/gperf/dist/src/listnode.c vendor/gperf/dist/src/listnode.h vendor/gperf/dist/src/main.c vendor/gperf/dist/src/new.cc vendor/gperf/dist/src/options.c vendor/gperf/dist/src/perfect.c vendor/gperf/dist/src/perfect.h vendor/gperf/dist/src/prototype.h vendor/gperf/dist/src/read-line.cc vendor/gperf/dist/src/read-line.h vendor/gperf/dist/src/read-line.icc vendor/gperf/dist/src/readline.c vendor/gperf/dist/src/readline.h vendor/gperf/dist/src/stderr.c vendor/gperf/dist/src/stderr.h vendor/gperf/dist/src/trace.cc vendor/gperf/dist/src/trace.h vendor/gperf/dist/src/vectors.cc vendor/gperf/dist/src/vectors.h vendor/gperf/dist/src/version.c vendor/gperf/dist/src/xmalloc.c vendor/gperf/dist/tests/ Modified: vendor/gperf/dist/AUTHORS vendor/gperf/dist/COPYING vendor/gperf/dist/ChangeLog vendor/gperf/dist/INSTALL vendor/gperf/dist/Makefile.devel vendor/gperf/dist/Makefile.in vendor/gperf/dist/NEWS vendor/gperf/dist/README vendor/gperf/dist/aclocal.m4 vendor/gperf/dist/configure vendor/gperf/dist/doc/Makefile.in vendor/gperf/dist/doc/configure vendor/gperf/dist/doc/gperf.1 vendor/gperf/dist/doc/gperf.texi vendor/gperf/dist/doc/help2man vendor/gperf/dist/lib/Makefile.in vendor/gperf/dist/lib/configure vendor/gperf/dist/lib/hash.cc vendor/gperf/dist/lib/hash.h vendor/gperf/dist/src/Makefile.in vendor/gperf/dist/src/bool-array.cc vendor/gperf/dist/src/bool-array.h vendor/gperf/dist/src/bool-array.icc vendor/gperf/dist/src/config.h.in vendor/gperf/dist/src/configure vendor/gperf/dist/src/hash-table.cc vendor/gperf/dist/src/hash-table.h vendor/gperf/dist/src/main.cc vendor/gperf/dist/src/options.cc vendor/gperf/dist/src/options.h vendor/gperf/dist/src/options.icc vendor/gperf/dist/src/version.cc vendor/gperf/dist/src/version.h Modified: vendor/gperf/dist/AUTHORS ============================================================================== --- vendor/gperf/dist/AUTHORS Fri Dec 2 22:39:31 2011 (r228213) +++ vendor/gperf/dist/AUTHORS Fri Dec 2 22:46:53 2011 (r228214) @@ -1,2 +1,2 @@ Douglas C. Schmidt -Bruno Haible +Bruno Haible Modified: vendor/gperf/dist/COPYING ============================================================================== --- vendor/gperf/dist/COPYING Fri Dec 2 22:39:31 2011 (r228213) +++ vendor/gperf/dist/COPYING Fri Dec 2 22:46:53 2011 (r228214) @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Modified: vendor/gperf/dist/ChangeLog ============================================================================== --- vendor/gperf/dist/ChangeLog Fri Dec 2 22:39:31 2011 (r228213) +++ vendor/gperf/dist/ChangeLog Fri Dec 2 22:46:53 2011 (r228214) @@ -1,3 +1,1646 @@ +2007-04-30 Brendan Kehoe + + * gperf-3.0.3 released. + * src/version.cc: Bump to 3.0.3. + * tests/*.exp: Bump to 3.0.3 in header. + * doc/gperf.1: Regenerate with gperf 3.0.3. + +2007-04-06 Bruno Haible + + Improve support for mingw. + * tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal, + check-lang-utf8, check-lang-ucs2): Remove '\r' from output before diff. + (POSTPROCESS_FOR_MINGW): New variable. + (check-test): Use it to postprocess output before diff. + +2007-04-04 Bruno Haible + + Support for newer GNU standards. + * doc/configure.ac (mandir): Remove assignment. + * doc/Makefile.in (datarootdir): New variable. + (docdir, dvidir, psdir, pdfdir, htmldir): Use value determined by + autoconf. + * configure.ac: Require autoconf >= 2.60. + * doc/configure.ac: Likewise. + * lib/configure.ac: Likewise. + * src/configure.ac: Likewise. + * tests/configure.ac: Likewise. + * configure: Regenerated with autoconf-2.61. + * doc/configure: Likewise. + * lib/configure: Likewise. + * src/configure: Likewise. + * tests/configure: Likewise. + * src/config.h.in: Likewise. + * src/config.h.msvc: Likewise. + * src/config.h_vms: Likewise. + +2007-04-04 Bruno Haible + + * doc/Makefile.in (MAKEINFO): Disable also the LC_MESSAGES and LC_ALL + environment variables. + +2007-04-04 Bruno Haible + + * configure.ac: Renamed from configure.in. + * doc/configure.ac: Renamed from doc/configure.in. + * lib/configure.ac: Renamed from lib/configure.in. + * src/configure.ac: Renamed from src/configure.in. + * tests/configure.ac: Renamed from tests/configure.in. + * Makefile.devel: Update. + * INSTALL: Update. + +2007-03-31 Bruno Haible + + * tests/test.c (in_word_set): New declaration. + * tests/test2.c (in_word_set): Likewise. + +2007-03-31 Bruno Haible + + * src/options.cc (Options::parse_options): Bump copyright year. + +2007-03-31 Bruno Haible + + * doc/gperf.texi: Fix typo. + +2007-03-31 Bruno Haible + + Change generated code after the meaning of __inline is changed in + GCC 4.3. + * src/output.cc (Output::output_lookup_function): Emit an inline + marker that also works with gcc-4.3 in c99 or gnu99 mode. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + Reported by Bruce Korb . + +2006-06-29 Brendan Kehoe + + * gperf-3.0.2 released. + + * doc/Makefile.in (all): No longer depend on dvi. + +2006-01-22 Brendan Kehoe + + * doc/gperf.texi: Update copyright to be 1989-2006. + (UPDATED): Change to 22 January 2006. + * doc/gperf.1 (TH): Fix date. + * configure.in: Update copyright years. + * configure: Regenerate. + * src/Makefile.in: Update copyright years. + + * doc/gperf.{dvi,ps,pdf}: Regenerated by manually invoking tex + instead of trying to use texi2dvi, whose run of etex ends up + actually always running pdfetex, thus always recreating gperf.pdf. + +2006-01-13 Brendan Kehoe + + * NEWS: Add note about #line directive fix. + * doc/gperf.1: Regenerate with Makefile.devel. + + * doc/gperf.texi (UPDATED): Correct to be today. + * doc: Regenerated by doing make in a configured tree. + Requires makeinfo, texi2dvi, texi2pdf, and texi2html. + + * configure.in: Add AC_OBJEXT and AC_EXEEXT. + * lib/Makefile.in (OBJEXT): Define for subst. + (OBJECTS): Use $(OBJEXT) instead of '.o'. + * src/Makefile.in: Make dependencies use $(OBJEXT). + (OBJEXT, EXEEXT): Define for subst. + (TARGETPROG): Add $(EXEEXT). + (OBJECTS): Use $(OBJEXT) instead of '.o'. + (clean): Remove *.$(OBJEXT) instead of *.o. + +2006-01-13 Bruno Haible + + Fix #line directives for filenames containing backslashes. + * src/output.cc (output_line_directive): New function. + (output_keyword_entry, Output::output): Use it. + Reported by Alexander . + + * src/options.cc (Options::parse_options): Update years in --version + output. + +2005-08-29 Brendan Kehoe + + * src/keyword.cc: Tweak comment to avoid nesting. + +2005-08-27 Bruno Haible + + Fix missing ranlib detection when cross-compiling. + * aclocal.m4 (CL_PROG_RANLIB): Remove macro. + * lib/configure.in: Use AC_PROG_RANLIB instead of CL_PROG_RANLIB. + +2005-07-30 Bruno Haible + + * src/version.cc: Bump version number to 3.0.2. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + +2005-07-30 Bruno Haible + + * src/positions.h: Add forward declarations of friend classes. + Needed for compilation with g++ 4.0. + +2004-08-22 Bruno Haible + + * tests/Makefile.in (check-lang-syntax): Add test for the + --length-table-name option. + * tests/test-6.exp: Update. + +2004-08-21 Bruce Lilly + + * src/input.cc (Input::read_input): Accept length-table-name + declaration. + * src/options.h (Options::get_lengthtable_name, + Options::set_lengthtable_name): New declarations. + (Options): Add field _lengthtable_name. + * src/options.icc (Options::get_lengthtable_name): New inline method. + * src/options.cc (DEFAULT_LENGTHTABLE_NAME): New constant. + (Options::long_usage): Document --length-table-name option. + (Options::Options): Initialize _lengthtable_name field. + (Options::~Options): Update. + (Options::set_lengthtable_name): New method. + (long_options): Add option --length-table-name. + (Options::parse_options): Implement --length-table-name option. + * src/output.cc (Output::output_keylength_table, output_switch_case, + Output::output_lookup_function_body): Use option.get_lengthtable_name. + * doc/gperf.texi (Gperf Declarations): Document %define + length-table-name. + (Output Details): Document --length-table-name option. + +2003-06-12 Bruno Haible + + * gperf-3.0.1 released. + + * src/version.cc: Bump version number to 3.0.1. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + +2003-05-31 Bruno Haible + + * doc/gperf.texi (User-supplied Struct): Mention the possibility of an + abbreviated struct declaration. + * src/input.cc (Input::read_input): Support struct declarations of the + form "struct foo;". + * tests/incomplete.gperf: New file. + * tests/incomplete.exp: New file. + * tests/Makefile.in (check-test): Check incomplete.gperf too. + Reported by Rob Leslie . + +2003-05-20 Bruno Haible + + * doc/Makefile.in (gperf.ps): Don't use $< in a target rule. + +2003-05-27 Bruno Haible + + * Makefile.vms (CC): Correct value. + (getopt.obj, getopt1.obj, getline.obj, hash.obj): Don't set + HAVE_CONFIG_H. + +2003-05-17 Bruno Haible + + * Makefile.msvc (DEBUGFLAGS): New variable. + (gperf.exe): Use it, and MFLAGS too. + +2003-05-08 Bruno Haible + + * gperf-3.0 released. + +2003-05-07 Bruno Haible + + * src/version.cc: Bump version number to 3.0. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + + * src/configure.in: Fix AC_INIT argument. + + * Makefile.devel (configure, lib/configure, src/configure, + tests/configure, doc/configure): Use the newest autoconf. + (src/config.h.in): Use the newest autoheader. + +2003-05-03 Bruno Haible + + * doc/gperf.texi: Use two spaces as sentence separator, as recommended + by the texinfo manual. + +2003-04-12 Bruno Haible + + * doc/configure.in (mandir): Change default value. + * doc/Makefile.in (docdir): Use datadir instead of prefix. + * Makefile.msvc (datadir): New variable. + (mandir, docdir): Use it instead of prefix. + (install, installdirs): Update. + * Makefile.vms (datadir): New variable. + (mandir, docdir): Use it instead of prefix. + (install, installdirs): Update. + +2003-04-12 Bruno Haible + + * README.vms: New file. + * Makefile.vms: New file. + * Makefile.devel (src/config.h_vms): New rule. + (all): Depend on it. + +2003-03-19 Bruno Haible + + * src/input.cc (Input::read_input): Ignore comments at the beginning + of the declarations section. + * doc/gperf.texi (Controls for GNU indent): New section. + Reported by Bruce Lilly . + +2003-03-19 Bruno Haible + + * src/output.cc (Output::output_hash_function): Avoid lint warning if + not all arguments of the hash function are used. Avoid lint warning + for fallthrough in switch. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/java.exp, tests/languages.exp, + tests/modula2.exp, tests/objc.exp: All /*FALLTHROUGH*/ to expected + output. + Reported by Bruce Lilly . + +2003-03-01 Bruno Haible + + * src/options.h (Options::set_initializer_suffix): New declaration. + * src/options.cc (Options::set_initializer_suffix): New method. + * src/input.cc (Input::read_input): Recognize %define + initializer-suffix. + * doc/gperf.texi (Gperf Declarations): Document %define + initializer-suffix. + * NEWS: Update. + +2003-02-26 Bruno Haible + + * Makefile.msvc: New file. + * README.woe32: New file. + * Makefile.devel (all): Depend on src/config.h.msvc. + (src/config.h.msvc): New rule. + +2003-01-07 Bruno Haible + + * src/input.h (Input::_charset_dependent): New field. + * src/input.cc (Input::read_input): Also set _charset_dependent. + * src/main.cc (main): Pass _charset_dependent from Input to Output. + * src/output.h (Output::Output): Add charset_dependent argument. + (Output::_charset_dependent): New field. + * src/output.cc (Output::Output): Add charset_dependent argument. + (Output::output): Provoke a compilation error if the execution + character set doesn't match the expectations. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + + * src/options.cc (Options::long_usage): Change bug report address to + . + * tests/test-6.exp: Update. + + * src/output.cc (USE_DOWNCASE_TABLE): New macro. + (output_upperlower_table): New function. + (output_upperlower_strcmp, output_upperlower_strncmp, + output_upperlower_memcmp): Emit gperf_downcase array accesses. + (Output::output): Call output_upperlower_table. + * tests/permutc2.exp: Update. + + * src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast. + (Only in GCC a cast of an lvalue is an lvalue.) + +2003-01-01 Bruno Haible + + * src/options.cc (Options::parse_options): Update copyright year. + + * doc/gperf.texi (@author): Add me. + + * src/options.h (NULLSTRINGS): New enum value. + (Options::get_stringpool_name, Options::set_stringpool_name): New + method declarations. + (Options::_stringpool_name): New field. + * src/options.icc (Options::get_stringpool_name): New method. + * src/options.cc (DEFAULT_STRINGPOOL_NAME): New variable. + (Options::long_usage): Document -Q and --null-strings. + (Options::Options): Initialize _stringpool_name. + (Options::~Options): Output _stringpool_name, NULLSTRINGS values too. + (Options::set_stringpool_name): New method. + (long_options): Add options --string-pool-name, --null-strings. + (Options::parse_options): Implement options -P, -Q and --null-strings. + * src/input.cc (Input::read_input): Recognize declarations %pic, + %define string-pool-name, %null-strings. + * src/output.h (Output::output_string_pool, + Output::output_lookup_pools): New method declarations. + (Output::_wordlist_eltype): New field. + * src/output.cc (Output::output_keylength_table): Trivial + simplification. + (Output::output_string_pool): New method. + (output_keyword_entry): Add stringpool_index argument. For SHAREDLIB, + use struct offsets. + (output_keyword_blank_entries): For SHAREDLIB, use -1 instead of "". + (Output::output_keyword_table): Use _wordlist_eltype instead of + _struct_tag. Compute stringpool_index for output_keyword_entry. + (Output::output_lookup_pools): New method. + (Output::output_lookup_function_body): Use _wordlist_eltype instead of + _struct_tag. For SHAREDLIB, use "+ stringpool" to convert offsets to + strings. Use "o >= 0" to test for nonempty table entry. + (Output::output_lookup_function): Call output_lookup_pools. + (Output::output): Initialize _wordlist_eltype. Call + output_lookup_pools. + * tests/jstest4.gperf: New file. + * tests/test-6.exp: Update. + * tests/Makefile.in (check-lang-syntax): Drop test of -p. Add tests of + -P and -Q. + * doc/gperf.texi (User-supplied Struct): Mention that first field has + to be of type 'int' if -P is given. + (Gperf Declarations): Document %pic, %define string-pool-name, + %null-strings. + (Output Details): Update description of option -P. Document options -Q + and --null-strings. + + * tests/Makefile.in (check-link-c, check-ada, check-pascal, + check-test): Omit option -p. + * tests/c-parse.exp: Regenerated. + * tests/chill.exp: Regenerated. + * tests/cplusplus.exp: Regenerated. + * tests/gpc.exp: Regenerated. + * tests/java.exp: Regenerated. + * tests/objc.exp: Regenerated. + * tests/test-4.exp: Regenerated. + + * src/output.cc (Output::output_lookup_function_body): Omit the + multicompare code section and its variables when it is not used. + * tests/chill.exp: Regenerated. + + * src/output.c (Output_Compare::output_firstchar_comparison): New + method. + (Output_Compare_Strcmp::output_comparison, + Output_Compare_Strncmp::output_comparison, + Output_Compare_Memcmp::output_comparison): Use it. + * tests/permutc2.exp: Update. + + * tests/smtp.gperf: New file, based on a contribution by Bruce Lilly. + * tests/Makefile.in (check-smtp): New rule. + (check): Depend on it. + (clean): Update. + +2002-12-12 Bruno Haible + + * src/search.h (Search::init_selchars_tuple, + Search::count_duplicates_tuple): Add alpha_unify argument. + (Search::count_duplicates_tuple): New method declaration. + * src/search.cc (Search::init_selchars_tuple, + Search::count_duplicates_tuple): Add alpha_unify argument. + (Search::find_positions): Update. + (Search::count_duplicates_tuple): New method. + (Search::count_duplicates_multiset): Free temp alpha_unify vector. + (Search::find_alpha_inc): Call count_duplicates_tuple. + + * src/configure.in: Add test for stack-allocated variable-size arrays. + * src/config.h.in: Regenerated. + * src/search.cc: Include config.h. + (DYNAMIC_ARRAY, FREE_DYNAMIC_ARRAY): New macros. + (Search::find_alpha_inc, Search::count_possible_collisions, + Search::find_asso_values): Use them. + * src/Makefile.in (search.o): Depend on config.h. + + * src/search.h (Search::keyword_list_length, Search::max_key_length, + Search::get_max_keysig_size, Search::prepare): Remove declarations. + (Search::prepare): Renamed from Search::preprepare. + (Search::_max_selchars_length): New field. + * src/search.cc (Search::prepare): Renamed from Search::preprepare. + (Search::prepare_asso_values): Merged with old Search::prepare. + Initialize _max_selchars_length. + (Search::keyword_list_length): Remove function. Use _list_len instead. + (Search::max_key_length): Remove function. Use _max_key_len instead. + (Search::get_max_keysig_size): Remove function. Use + _max_selchars_length instead. + (Search::count_possible_collisions, Search::find_asso_values): Update. + (Search::find_good_asso_values): Call just prepare_asso_values. + (Search::~Search): Update. + + * src/output.h (Output::output_asso_values_ref): New declaration. + * src/output.cc (char_to_index): Remove variable. + (Output::output_asso_values_ref): New function. + (Output::output_hash_function): Use it. + (Output::output): Update. + + * src/positions.h (Positions::is_useall, Positions::set_useall, + Positions::iterator, Positions::reviterator): New method declarations. + (Positions::_useall): New field. + (PositionIterator): Make constructor private. Add a constructor and a + copy constructor. + (PositionIterator::remaining): New declaration. + (PositionReverseIterator): Make constructor private. Add a constructor + and a copy constructor. + (PositionReverseIterator::remaining): New declaration. + (PositionReverseIterator::_minindex): New field. + * src/positions.icc (Positions::Positions): Initialize _useall. + (Positions::operator=): Likewise. + (Positions::is_useall, Positions::set_useall): New methods. + (Positions::sort): Do nothing if _useall is set. + (Positions::iterator, Positions::reviterator): New methods. + (PositionIterator::PositionIterator): New constructor. + (PositionIterator::remaining): New method. + (PositionReverseIterator::PositionReverseIterator): New constructor. + (PositionReverseIterator::next): Use _minindex as bound. + (PositionReverseIterator::remaining): New method. + * src/positions.cc (Positions::add, Positions::remove): Reset the + useall flag. + (Positions::print): Handle the useall case. + * src/options.h (ALLCHARS): Remove. + * src/options.cc (Options::~Options): Update. + (Options::parse_options): Use Positions::set_useall(). + * src/keyword.h (KeywordExt::init_selchars_tuple, + KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low): + Remove use_all_chars argument. + * src/keyword.cc (KeywordExt::init_selchars_low): Remove use_all_chars + argument. Tell the position iterator to stop at _allchars_length. + Remove special case code for -k'*'. + (KeywordExt::init_selchars_tuple, KeywordExt::init_selchars_multiset): + Remove use_all_chars argument. + * src/search.h (Search::init_selchars_tuple): Remove use_all_chars + argument. + (Search::init_selchars_multiset): Likewise. + * src/search.cc (Search::init_selchars_tuple): Remove use_all_chars + argument. + (Search::count_duplicates_tuple, Search::find_positions): Update. + (Search::compute_alpha_unify): Remove special case code for -k'*'. + (Search::init_selchars_multiset): Remove use_all_chars argument. + (Search::count_duplicates_multiset): Update. + (Search::find_alpha_inc): Remove special case code for -k'*'. + (Search::prepare): Update. + (Search::get_max_keysig_size): Update. + * src/output.cc (Output::output_hash_function): Remove special case + code for -k'*'. + * tests/chill.exp: Regenerated. + +2002-12-11 Bruno Haible + + Change the positions to be 0-based, instead of 1-based. + * src/positions.h (Positions::LASTCHAR): Set to -1. + (Positions::MAX_SIZE): New constant. + (Positions::pointer): Change return type. + (Positions::_positions): Change element type. + (PositionIterator::EOS, PositionReverseIterator::EOS): Set to -2. + * src/positions.icc (Positions::pointer): Change return type. + (Positions::sort): Update. + * src/positions.cc (Positions::contains, Positions::add, + Positions::remove): Update. + (Positions::print): Update. Fix off-by-one bug. + * src/options.cc (Options::~Options): Update. + (Options::parse_options): Set BAD_VALUE to -3. Update. + * src/keyword.cc (KeywordExt::init_selchars_low): Update. + * src/search.cc (Search::find_positions, Search::compute_alpha_unify, + Search::find_alpha_inc): Update. + * src/output.cc (Output::output_hash_function): Update. Don't emit + a 'case' statement right after 'default:'. + * tests/c-parse.exp: Regenerated. + * tests/charsets.exp: Regenerated. + * tests/cplusplus.exp: Regenerated. + * tests/java.exp: Regenerated. + * tests/languages.exp: Regenerated. + * tests/modula2.exp: Regenerated. + * tests/objc.exp: Regenerated. + +2002-12-10 Bruno Haible + + * src/options.h: Reorder enum values. + (Options::short_usage, Options::long_usage): Make static. + * src/options.cc (Options::short_usage); No longer print a monster + usage line. + (Options::print_options): Improve output of options like + --key-positions=1,2,$. + (Options::~Options): Update. + + * src/options.h (UPPERLOWER): New enum value. + * src/options.cc (Options::long_usage): Document option --ignore-case. + (Options::~Options): Update. + (long_options): Add option --ignore-case. + (Options::parse_options): Handle option --ignore-case. + * src/input.cc (Input::read_input): Recognize option %ignore-case. + * src/keyword.h (KeywordExt::init_selchars_tuple, + KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low): + Add alpha_unify argument. + * src/keyword.cc (KeywordExt::init_selchars_low): Add alpha_unify + argument. + (KeywordExt::init_selchars_tuple): Add alpha_unify argument. + (KeywordExt::init_selchars_multiset): Add alpha_unify argument. + * src/search.h (Search::compute_alpha_size, + Search::compute_alpha_unify): New declarations. + (Search::init_selchars_multiset): Add alpha_unify argument. + (Search::_alpha_unify): New field. + * src/search.cc (Search::compute_alpha_size, + Search::compute_alpha_unify): New functions. + (Search::init_selchars_tuple): Update. + (Search::find_positions): Temporarily set _alpha_unify. Perform a + case insensitive comparison if needed. + (Search::init_selchars_multiset): Add alpha_unify argument. + (Search::count_duplicates_multiset): Call compute_alpha_unify. + (Search::find_alpha_inc): Temporarily set _alpha_unify. At the end, + set _alpha_size and _alpha_unify. + (Search::prepare): Update. Don't compute _alpga_size here. + (Search::optimize): Propagate unified asso_values. + (Search::~Search) Delete _alpha_unify. + * src/output.cc (output_upperlower_strcmp, output_upperlower_strncmp, + output_upperlower_memcmp): New functions. + (Output_Compare_Strcmp::output_comparison, + Output_Compare_Strncmp::output_comparison, + Output_Compare_Memcmp::output_comparison): Use the case-insensitive + comparison function if --ignore-case was given. + (Output::output): Emit the auxiliary case-insensitive comparison + function if needed. + * tests/permutc2.gperf, tests/permutc2.exp: New files. + * tests/Makefile.in (check-test): Also check permutc2.gperf. + * tests/test-6.exp: Update. + * doc/gperf.texi (Gperf Declarations): Document %ignore-case. + (Input Details): Document option --ignore-case. + * NEWS: Update. + + * src/search.cc (Search::optimize): Fill unused asso_values[] entries + with a large value. + * src/output.h (Output::Output): Remove occurrences argument. + (Output::_occurrences): Remove field. + * src/output.cc (Output::Output): Remove occurrences argument. + (Output::output_hash_function): Ignore _occurrences. + * src/main.cc (main): Don't pass the _occurrences to Output. + + * src/search.cc (Search::preprepare): Exit if keywords contain + out-of-range characters. + + * src/search.cc (for): Define so as to avoid errors with old compilers. + + * src/options.h (SHAREDLIB): New enum value. + * src/options.cc (Options::short_usage): Mention option -P. + (Options::long_usage): Document option -P. + (long_options): Add option --pic. + (Options::parse_options): Handle option -P/--pic. + * src/output.cc (output_keyword_blank_entries): When SHAREDLIB is + specified, emit NULL pointers instead of "". + (Output::output_lookup_function_body): When SHAREDLIB is specified + and SWITCH and DUP and not specified, test the table entry against + NULL before the string comparison. + * tests/test-6.exp: Update. + * doc/gperf.texi (Output Details): Document option -P. + * NEWS: Update. + Suggested by Ulrich Drepper. + +2002-12-08 Bruno Haible + + * tests/permut2.gperf, tests/permut2.exp: New files. + * tests/permut3.gperf, tests/permut3.exp: New files. + * tests/charsets.gperf: New file, from Bruce Lilly. + * tests/charsets.exp: New file. + * tests/languages.gperf: New file, from Bruce Lilly. + * tests/languages.exp: New file. + * Makefile.in (check-test): Test them all. + + Completely new asso_values search algorithm. + * src/search.h (Search::compute_occurrence, Search::clear_determined, + Search::set_determined, Search::already_determined, Search::reorder): + Remove functions. + (Search::init_asso_values, Search::sort_by_occurrence, + Search::compute_occurrence, Search::sort_by_occurrence, + Search::has_collisions, Search::collision_prior_to): Remove functions. + (Search::compute_partition, Search::count_possible_collisions, + Search::unchanged_partition): New method declarations. + (Search::_determined): Remove field. + * src/search.cc (Search::prepare): Don't initialize _determined. + (Search::compute_occurrence, greater_by_occurrence, + Search::clear_determined, Search::set_determined, + Search::already_determined, Search::reorder): Remove functions. + (Search::init_asso_values, compute_disjoint_union, + Search::sort_by_occurrence, Search::compute_occurrence, + Search::sort_by_occurrence, Search::has_collisions, + Search::collision_prior_to): Remove functions. + (StackEntry): Remove class. + (EquivalenceClass, Step): New classes. + (equals, Search::compute_partition, delete_partition, + Search::count_possible_collisions, Search::unchanged_partition): New + functions. + (Search::find_asso_values): Completely rewritten. + (Search::find_good_asso_values): Don't call reorder(). + (Search::~Search): Don't free _determined. + * src/keyword.h (KeywordExt::_occurrence): Remove field. + * src/options.h (ORDER, FAST, OPT_CHOICE): Remove enum values. + (Options::_iterations): Remove field. + * src/options.icc (Options::get_iterations): Remove method. + * src/options.cc (Options::long_usage): Remove mention of -f and -o. + (Options::Options): Don't initialize _iterations. + (Options::~Options): Update. + (Options::parse_options): Do nothing for options -f, -o, -O. + * doc/gperf.texi: (Contributors): Update. + (Algorithmic Details): Remove options -f and -o. Update description + of option -s. + * tests/c-parse.exp, tests/chill.exp, tests/cplusplus.exp, + tests/gpc.exp, tests/java.exp, tests/modula2.exp, tests/objc.exp, + tests/test-4.exp): Regenerated, smaller than before. + * tests/test-6.exp: Update. + * NEWS: Update. + +2002-12-08 Bruno Haible + + * src/search.h (Search::_alpha_size): Change type to 'unsigned int'. + (Search::_asso_value_max): Likewise. + * src/search.cc (Search::prepare_asso_values): Update. + (Search::init_asso_values): Update. + (Search::~Search): Update. + * src/output.h (Output::Output): Change alpha_size type to + 'unsigned int'. + (Output::_alpha_size): Change type to 'unsigned int'. + * src/output.cc (Output::Output): Change alpha_size type to + 'unsigned int'. + (Output::output_hash_function): Update. + +2002-12-07 Bruno Haible + + * src/options.h (OPT_CHOICE): New enum value. + * src/options.cc (Options::~Options): Update. + (long_options): New option --optimized-collision-resolution. + (Options::parse_options): Accept option -O. + * src/search.h (Search::sort_by_occurrence): Change argument to + 'unsigned int'. + (Search::compute_occurrence, Search::sort_by_occurrence): New method + declarations. + * src/search.cc (Search::sort_by_occurrence): Change argument to + 'unsigned int'. + (Search::compute_occurrence, Search::sort_by_occurrence): New methods. + (Search::find_asso_values): Implement OPT_CHOICE. More debugging + output. + + * src/search.cc (Search::prepare_asso_values) [DEBUG]: Also print + the keyword list in order. + (Search::find_asso_values) [DEBUG]: Upon failure, print the union_set. + + * src/options.h (Options::get_size_multiple): Change return type to + float. + (Options::_size_multiple): Change type to float. + * src/options.icc (Options::get_size_multiple): Change return type to + float. + * src/options.cc (Options::long_usage): Update description of option + -s. + (Options::~Options): Update. + (Options::parse_options): For option -s, accept a fraction. + * src/search.cc (Search::prepare_asso_values): Use get_size_multiple + as it is. + * tests/test-6.exp: Update. + * doc/gperf.texi (Algorithmic Details): Update description of option + -s. + +2002-12-04 Bruno Haible + + Improve debugging output. + * src/hash-table.h (Hash_Table::dump): New method. + * src/hash-table.cc (Hash_Table::dump): New method, extracted from + destructor. + (Hash_Table::~Hash_Table): No longer print the contents. + * src/positions.h (PositionReverseIterator): New class. + * src/positions.icc (PositionReverseIterator::PositionReverseIterator, + PositionReverseIterator::next): New methods. + * src/search.cc (Search::find_positions): If debugging, print the + result. + (Search::find_alpha_inc): If debugging, print the result. + (Search::prepare): Explicitly dump the hash table's contents here. + + Portability fixes. + * src/positions.h (Positions::LASTCHAR, Positions::MAX_KEY_POS, + PositionIterator::EOS): Define as compile-time constants using enum. + * src/bool-array.cc (Bool_Array::~Bool_Array): Remove const qualifier + of pointer to be deleted. + * src/input.cc (Input::~Input): Likewise. + * src/keyword.cc (KeywordExt::delete_selchars): Likewise. + * src/main.cc (main): Likewise. + * src/hash-table.cc (Hash_Table::~Hash_Table): Limit scope of 'for' + variables. + * src/search.cc (Search::prepare_asso_values): Use a static_cast to + convert from time_t to long. This is possible because ISO C 99 says + time_t is a numeric type. + +2002-11-20 Bruno Haible + + * src/search.cc (Search::find_asso_values): Avoid gcc warnings about + uninitialized variables. + + Implement backtracking. + * src/search.h (Search::has_collisions): Renamed from + Search::less_collisions. Return a boolean. + * src/search.cc (Search::has_collisions): Renamed from + Search::less_collisions. Return a boolean. + (StackEntry): Remove field _collisions_so_far. + (Search::find_asso_values): Backtrack when encountering an unresolved + collision. Assume collisions_so_far is always zero. + (Search::optimize): Exit if there are accidental duplicates at the end. + * src/output.cc (Output::num_hash_values): Simply return the list + length. + (Output::output_keylength_table): Remove handling of accidental + duplicates. + (Output::output_keyword_table, Output::output_lookup_array): Likewise. + (output_switch_case, output_switches): Likewise. + * doc/gperf.texi (Algorithmic Details): Adjust description of options + -D, -f, -o, -r. + (Bugs): Remove note about missing backtracking. + (Projects): Likewise. + +2002-11-19 Bruno Haible + + Prepare for backtracking. + * src/search.h (Search::try_asso_value, Search::change_some_asso_value): + Remove declarations. + (Search::less_collisions, Search::collision_prior_to): New declarations. + (Search::_fewest_collisions, Search::_union_set, Search::_num_done): + Remove fields. + * src/search.cc (Search::prepare_asso_values): Don't initialize + _union_set. + (Search::try_asso_value, Search::change_some_asso_value): Remove + methods. + (Search::less_collisions, Search::collision_prior_to): New methods. + (StackEntry): New class. + (Search::find_asso_values): Reorganized to use pseudo-recursion. + (Search::~Search): Don't free _union_set. + + * src/search.h (Search::find_good_asso_values): New declaration. + * src/search.cc: Add comments about the basic structure of the + algorithm. + (Search::find_positions): Move the option[POSITIONS] test to here. + (Search::find_good_asso_values): New method, extracted from + Search::optimize. + (Search::optimize): Remove option[POSITIONS] test. Call + find_good_asso_values. + +2002-11-17 Bruno Haible + + * src/options.cc (Options::parse_options): Include copyright notice + and authors in --version output. + + Avoid artificial duplicates. + * src/keyword.h (KeywordExt::init_selchars_tuple): New declaration. + (KeywordExt::init_selchars_multiset): Renamed from + KeywordExt::init_selchars. + (KeywordExt::init_selchars_low): New declaration. + * src/keyword.cc (KeywordExt::init_selchars_low): Renamed from + KeywordExt::init_selchars. Add alpha_inc argument. Remove sorting. + (KeywordExt::init_selchars_tuple): New method. + (KeywordExt::init_selchars_multiset): New method, replaces + KeywordExt::init_selchars. + * src/search.h (Search::init_selchars_tuple): Renamed from + Search::init_selchars. + (Search::count_duplicates_tuple): Renamed from Search::count_duplicates. + (Search::init_selchars_multiset, Search::count_duplicates_multiset, + Search::find_alpha_inc): New declarations. + (Search::_alpha_inc): New field. + (Search::_alpha_size, Search::_occurrences, Search::_asso_values, + Search::_determined): Make non-const. + * src/search.cc (Search::Search): Don't initialize _key_positions, + _alpha_size, _occurrences, _asso_values, _determined here. + (Search::init_selchars_tuple): Renamed from Search::init_selchars. + (Search::count_duplicates_tuple): Renamed from Search::count_duplicates. + (Search::find_positions): Update. + (Search::init_selchars_multiset, Search::count_duplicates_multiset, + Search::find_alpha_inc): New methods. + (Search::prepare): Move preprepare, find_positions calls away. + Initialize _alpha_size, _occurrences, _asso_values, _determined here. + (Search::optimize): Call preprepare, find_positions here. Initialize + _key_positions here. + (Search::~Search): Deallocate _alpha_inc. + * src/output.cc (Output::Output): Add alpha_inc argument. + (Output::output_hash_function): Use _alpha_inc. + * src/output.h (Output::Output): Add alpha_inc argument. + (Output::_alpha_inc): New field. + * src/main.cc (main): Pass _alpha_inc from Search to Output. + * tests/chill.exp: Update. + * doc/gperf.texi (Algorithmic Details): Remove description of + artificial duplicates. + + * src/keyword.h (KeywordExt::_selchars): Change type to + 'const unsigned int *'. + * src/keyword.cc (sort_char_set): Change argument type to + 'unsigned int *'. + (KeywordExt::init_selchars): Update. + * src/search.h (Search::sort_by_occurrence): Change argument type to + 'unsigned int *'. + (Search::try_asso_value): Change argument type to 'unsigned int'. + (Search::_union_set): Change type to 'unsigned int *'. + * src/search.cc (Search::prepare, Search::compute_occurrence, + Search::set_determined, Search::already_determined, + Search::prepare_asso_values, Search::compute_hash): Update. + (compute_disjoint_union): Change argument types to 'unsigned int *'. + (Search::sort_by_occurrence): Likewise. + (Search::try_asso_value): Change argument type to 'unsigned int'. + (Search::change_some_asso_value, Search::~Search): Update. + * src/hash-table.cc (Hash_Table::~Hash_Table, Hash_Table::equal, + Hash_Table::insert): Update. + + * src/positions.h: New file, extracted from options.h. + * src/positions.icc: New file, extracted from options.icc. + * src/positions.cc: New file, extracted from options.cc. + * src/options.h: Include positions.h. Move classes Positions and + PositionsIterator away. + * src/options.icc: Move classes Positions and PositionsIterator away. + * src/options.cc: Move class Positions away. + * src/keyword.cc: Include positions.h instead of options.h. + * src/output.h: Include positions.h instead of options.h. + * src/search.h: Include positions.h instead of options.h. + * src/Makefile.in (OBJECTS): Add positions.o. + (POSITIONS_H): New variable. + (OPTIONS_H, SEARCH_H, OUTPUT_H, keyword.o): Use it. + (positions.o): New rule. + + * src/options.h (POSITIONS): New enum value. + (Positions::Positions): New copy constructor. + (Positions::operator=, Positions::contains, Position::add, + Positions::remove, Positions::print): New method declaration. + (Options::get_max_keysig_size): Remove method. + * src/options.icc (Positions::Positions): New copy constructor. + (Positions::operator=): New method. + (Options::get_max_keysig_size): Remove method. + * src/options.cc (Options::Options): Initialize _key_positions + trivially. + (Options::parse_options): Option -k sets POSITIONS. + (Positions::contains, Positions::add, Positions::remove, + Positions::print): New methods. + * src/hash-table.cc (Hash_Table::~Hash_Table): Compute the field + width explicitly, instead of using Options::get_max_keysig_size. + * src/keyword.h (KeywordExt::init_selchars): Add arguments + use_all_chars, positions. + (KeywordExt::delete_selchars): New declaration. + * src/keyword.cc (KeywordExt::init_selchars): Add arguments + use_all_chars, positions. Remove error message if there are no key + positions. + (KeywordExt::delete_selchars): New method. + * src/search.h: Include options.h. + (Search::preprepare, Search::init_selchars, Search::delete_selchars, + Search::count_duplicates, Search::find_positions): New declarations. + (Search::_key_positions): New field. + * src/search.cc (Search::Search): Initialize _key_positions. + (Search::preprepare, Search::init_selchars, Search::delete_selchars, + Search::count_duplicates, Search::find_positions): New functions. + (Search::prepare): Call preprepare and find_positions. Tweak error + message. + (Search::get_max_keysig_size): Use _key_positions instead of + option.get_key_positions(). + (Search::optimize): Tweak error message. + * src/output.h: Include options.h. + (Output::Output): Add Positions argument. + (Output::_key_positions): New field. + * src/output.cc (Output::Output): Add Positions argument. + (Output::output_hash_function): Omit the table if there are no + positions at all. Use _key_positions instead of + option.get_key_positions(). + (Output::output): Output the computed positions as a comment. + * src/main.cc (main): Pass the Positions from Searcher to Output. + * src/Makefile.in (SEARCH_H, OUTPUT_H): Include OPTIONS_H. + * tests/Makefile.in (check-test): Pass key positions explicitly. + * tests/gpc.exp: Update. + * tests/test-4.exp: Update. + * doc/gperf.texi (Algorithmic Details): Mention that -k is not needed + usually. + +2002-11-16 Bruno Haible + + * src/options.h (Options::get_slot_name): Renamed from + Options::get_key_name. + (Options::set, Options::set_language, Options::set_total_switches, + Options::set_function_name, Options::set_slot_name, + Options::set_class_name, Options::set_hash_name, + Options::set_wordlist_name, Options::set_delimiters): New method + declarations. + (Options::_language): New field. + (Options::_slot_name): Renamed from Options::_key_name. + * src/options.icc (Options::set): New method. + (Options::get_slot_name): Renamed from Options::get_key_name. + * src/options.cc (DEFAULT_FUNCTION_NAME): Renamed from DEFAULT_NAME. + (DEFAULT_SLOT_NAME): Renamed from DEFAULT_NAME. + (Options::Options): Initialize _language. Update. + (Options::~Options): Update. + (Options::set_language, Options::set_total_switches, + Options::set_function_name, Options::set_slot_name, + Options::set_class_name, Options::set_hash_name, + Options::set_wordlist_name, Options::set_delimiters): New methods. + (Options::parse_options): Call set_language. Update. + * src/input.cc (is_declaration, is_declaration_with_arg, + is_define_declaration): New functions. + (Input::read_input): Accept %DECL declarations. + * src/output.cc (Output::output_lookup_function_body): Update. + * doc/gperf.texi (Declarations): Add new subnodes. + (User-supplied Struct, Gperf Declarations, C Code Inclusion): New + nodes. + (Keywords, Output Format, Binary Strings, Options): Mention % + declarations as being equivalent to the command line options. + + * src/options.cc (Options::long_usage): Rename options -H, -N, -l, -G. + (long_options): Add --hash-function-name, --lookup-function-name, + --compare-lengths. + * doc/gperf.texi (Output Details): Rename options -H, -N, -l, -G. + * tests/test-6.exp: Update. + + * src/options.cc (DEFAULT_DELIMITERS): Remove newline. + * src/options.cc (Options::long_usage): Change default --delimiters. + * doc/gperf.texi (Input Details): Likewise. + * tests/test-6.exp: Update. + + * doc/gperf.texi: Move description of option -l from section + Algorithmic Details to section Output Details. + * src/options.cc (Options::long_usage): Likewise. + * tests/test-6.exp: Update. + +2002-11-12 Bruno Haible + + * src/options.h (Output::get_output_file_name): New method. + (Output::_output_file_name): New field. + * src/options.icc (Options::get_output_file_name): New method. + * src/options.cc (Options::long_usage): Document option --output-file. + (Options::Options): Initialize _output_file_name. + (long_options): Add --output-file. + (Options::parse_options): Handle it. + * src/main.cc (main): Open the output file if given by name. + * doc/gperf.texi (Output File): New section. + * tests/test-6.exp: Update. + +2002-11-10 Bruno Haible + + * src/input.cc (pretty_input_file_name): New function. + (read_input): Use it in all error and warning messages. + + * src/keyword.h (Keyword::_lineno): New field. + * src/input.h (Input::_struct_decl_lineno): New field. + * src/input.cc (Input::read_input): Set _struct_decl_lineno. Fill + each keyword's _lineno field. + * src/main.cc (main): Pass _struct_decl_lineno from Input to Output. + * src/output.h (Output::Output) Add struct_decl_lineno argument. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 2 22:48:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEEB2106564A; Fri, 2 Dec 2011 22:48:15 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBDE38FC19; Fri, 2 Dec 2011 22:48:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB2MmFTI012315; Fri, 2 Dec 2011 22:48:15 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB2MmFQE012310; Fri, 2 Dec 2011 22:48:15 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112022248.pB2MmFQE012310@svn.freebsd.org> From: Baptiste Daroussin Date: Fri, 2 Dec 2011 22:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228215 - in vendor/gperf/3.0.3: . doc lib src tests X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 22:48:16 -0000 Author: bapt (ports committer) Date: Fri Dec 2 22:48:15 2011 New Revision: 228215 URL: http://svn.freebsd.org/changeset/base/228215 Log: tag gperf 3.0.3 import Approved by: cognet Added: vendor/gperf/3.0.3/ - copied from r228213, vendor/gperf/dist/ vendor/gperf/3.0.3/configure.ac - copied unchanged from r228214, vendor/gperf/dist/configure.ac vendor/gperf/3.0.3/doc/configure.ac - copied unchanged from r228214, vendor/gperf/dist/doc/configure.ac vendor/gperf/3.0.3/lib/configure.ac - copied unchanged from r228214, vendor/gperf/dist/lib/configure.ac vendor/gperf/3.0.3/lib/getline.cc - copied unchanged from r228214, vendor/gperf/dist/lib/getline.cc vendor/gperf/3.0.3/lib/getline.h - copied unchanged from r228214, vendor/gperf/dist/lib/getline.h vendor/gperf/3.0.3/src/config.h_vms - copied unchanged from r228214, vendor/gperf/dist/src/config.h_vms vendor/gperf/3.0.3/src/configure.ac - copied unchanged from r228214, vendor/gperf/dist/src/configure.ac vendor/gperf/3.0.3/src/input.cc - copied unchanged from r228214, vendor/gperf/dist/src/input.cc vendor/gperf/3.0.3/src/input.h - copied unchanged from r228214, vendor/gperf/dist/src/input.h vendor/gperf/3.0.3/src/keyword-list.cc - copied unchanged from r228214, vendor/gperf/dist/src/keyword-list.cc vendor/gperf/3.0.3/src/keyword-list.h - copied unchanged from r228214, vendor/gperf/dist/src/keyword-list.h vendor/gperf/3.0.3/src/keyword-list.icc - copied unchanged from r228214, vendor/gperf/dist/src/keyword-list.icc vendor/gperf/3.0.3/src/keyword.cc - copied unchanged from r228214, vendor/gperf/dist/src/keyword.cc vendor/gperf/3.0.3/src/keyword.h - copied unchanged from r228214, vendor/gperf/dist/src/keyword.h vendor/gperf/3.0.3/src/keyword.icc - copied unchanged from r228214, vendor/gperf/dist/src/keyword.icc vendor/gperf/3.0.3/src/output.cc - copied unchanged from r228214, vendor/gperf/dist/src/output.cc vendor/gperf/3.0.3/src/output.h - copied unchanged from r228214, vendor/gperf/dist/src/output.h vendor/gperf/3.0.3/src/positions.cc - copied unchanged from r228214, vendor/gperf/dist/src/positions.cc vendor/gperf/3.0.3/src/positions.h - copied unchanged from r228214, vendor/gperf/dist/src/positions.h vendor/gperf/3.0.3/src/positions.icc - copied unchanged from r228214, vendor/gperf/dist/src/positions.icc vendor/gperf/3.0.3/src/search.cc - copied unchanged from r228214, vendor/gperf/dist/src/search.cc vendor/gperf/3.0.3/src/search.h - copied unchanged from r228214, vendor/gperf/dist/src/search.h Replaced: vendor/gperf/3.0.3/AUTHORS - copied unchanged from r228214, vendor/gperf/dist/AUTHORS vendor/gperf/3.0.3/COPYING - copied unchanged from r228214, vendor/gperf/dist/COPYING vendor/gperf/3.0.3/ChangeLog - copied unchanged from r228214, vendor/gperf/dist/ChangeLog vendor/gperf/3.0.3/INSTALL - copied unchanged from r228214, vendor/gperf/dist/INSTALL vendor/gperf/3.0.3/Makefile.devel - copied unchanged from r228214, vendor/gperf/dist/Makefile.devel vendor/gperf/3.0.3/Makefile.in - copied unchanged from r228214, vendor/gperf/dist/Makefile.in vendor/gperf/3.0.3/NEWS - copied unchanged from r228214, vendor/gperf/dist/NEWS vendor/gperf/3.0.3/README - copied unchanged from r228214, vendor/gperf/dist/README vendor/gperf/3.0.3/aclocal.m4 - copied unchanged from r228214, vendor/gperf/dist/aclocal.m4 vendor/gperf/3.0.3/configure - copied unchanged from r228214, vendor/gperf/dist/configure vendor/gperf/3.0.3/doc/Makefile.in - copied unchanged from r228214, vendor/gperf/dist/doc/Makefile.in vendor/gperf/3.0.3/doc/configure - copied unchanged from r228214, vendor/gperf/dist/doc/configure vendor/gperf/3.0.3/doc/gperf.1 - copied unchanged from r228214, vendor/gperf/dist/doc/gperf.1 vendor/gperf/3.0.3/doc/gperf.texi - copied unchanged from r228214, vendor/gperf/dist/doc/gperf.texi vendor/gperf/3.0.3/doc/help2man - copied unchanged from r228214, vendor/gperf/dist/doc/help2man vendor/gperf/3.0.3/lib/Makefile.in - copied unchanged from r228214, vendor/gperf/dist/lib/Makefile.in vendor/gperf/3.0.3/lib/configure - copied unchanged from r228214, vendor/gperf/dist/lib/configure vendor/gperf/3.0.3/lib/hash.cc - copied unchanged from r228214, vendor/gperf/dist/lib/hash.cc vendor/gperf/3.0.3/lib/hash.h - copied unchanged from r228214, vendor/gperf/dist/lib/hash.h vendor/gperf/3.0.3/src/Makefile.in - copied unchanged from r228214, vendor/gperf/dist/src/Makefile.in vendor/gperf/3.0.3/src/bool-array.cc - copied unchanged from r228214, vendor/gperf/dist/src/bool-array.cc vendor/gperf/3.0.3/src/bool-array.h - copied unchanged from r228214, vendor/gperf/dist/src/bool-array.h vendor/gperf/3.0.3/src/bool-array.icc - copied unchanged from r228214, vendor/gperf/dist/src/bool-array.icc vendor/gperf/3.0.3/src/config.h.in - copied unchanged from r228214, vendor/gperf/dist/src/config.h.in vendor/gperf/3.0.3/src/configure - copied unchanged from r228214, vendor/gperf/dist/src/configure vendor/gperf/3.0.3/src/hash-table.cc - copied unchanged from r228214, vendor/gperf/dist/src/hash-table.cc vendor/gperf/3.0.3/src/hash-table.h - copied unchanged from r228214, vendor/gperf/dist/src/hash-table.h vendor/gperf/3.0.3/src/main.cc - copied unchanged from r228214, vendor/gperf/dist/src/main.cc vendor/gperf/3.0.3/src/options.cc - copied unchanged from r228214, vendor/gperf/dist/src/options.cc vendor/gperf/3.0.3/src/options.h - copied unchanged from r228214, vendor/gperf/dist/src/options.h vendor/gperf/3.0.3/src/options.icc - copied unchanged from r228214, vendor/gperf/dist/src/options.icc vendor/gperf/3.0.3/src/version.cc - copied unchanged from r228214, vendor/gperf/dist/src/version.cc vendor/gperf/3.0.3/src/version.h - copied unchanged from r228214, vendor/gperf/dist/src/version.h Deleted: vendor/gperf/3.0.3/Makefile vendor/gperf/3.0.3/README-FIRST vendor/gperf/3.0.3/acconfig.h vendor/gperf/3.0.3/configure.in vendor/gperf/3.0.3/doc/configure.in vendor/gperf/3.0.3/doc/texinfo.tex vendor/gperf/3.0.3/gperf.1 vendor/gperf/3.0.3/gperf.texinfo vendor/gperf/3.0.3/lib/configure.in vendor/gperf/3.0.3/lib/getopt.c vendor/gperf/3.0.3/lib/getopt.c.patch vendor/gperf/3.0.3/lib/getopt.h vendor/gperf/3.0.3/lib/getopt.h.patch vendor/gperf/3.0.3/lib/getopt1.c vendor/gperf/3.0.3/src/Makefile vendor/gperf/3.0.3/src/boolarray.c vendor/gperf/3.0.3/src/boolarray.h vendor/gperf/3.0.3/src/configure.in vendor/gperf/3.0.3/src/gen-perf.cc vendor/gperf/3.0.3/src/gen-perf.h vendor/gperf/3.0.3/src/getopt.c vendor/gperf/3.0.3/src/gperf-to-do vendor/gperf/3.0.3/src/hashtable.c vendor/gperf/3.0.3/src/hashtable.h vendor/gperf/3.0.3/src/iterator.c vendor/gperf/3.0.3/src/iterator.cc vendor/gperf/3.0.3/src/iterator.h vendor/gperf/3.0.3/src/key-list.cc vendor/gperf/3.0.3/src/key-list.h vendor/gperf/3.0.3/src/keylist.c vendor/gperf/3.0.3/src/keylist.h vendor/gperf/3.0.3/src/list-node.cc vendor/gperf/3.0.3/src/list-node.h vendor/gperf/3.0.3/src/listnode.c vendor/gperf/3.0.3/src/listnode.h vendor/gperf/3.0.3/src/main.c vendor/gperf/3.0.3/src/new.cc vendor/gperf/3.0.3/src/options.c vendor/gperf/3.0.3/src/perfect.c vendor/gperf/3.0.3/src/perfect.h vendor/gperf/3.0.3/src/prototype.h vendor/gperf/3.0.3/src/read-line.cc vendor/gperf/3.0.3/src/read-line.h vendor/gperf/3.0.3/src/read-line.icc vendor/gperf/3.0.3/src/readline.c vendor/gperf/3.0.3/src/readline.h vendor/gperf/3.0.3/src/stderr.c vendor/gperf/3.0.3/src/stderr.h vendor/gperf/3.0.3/src/trace.cc vendor/gperf/3.0.3/src/trace.h vendor/gperf/3.0.3/src/vectors.cc vendor/gperf/3.0.3/src/vectors.h vendor/gperf/3.0.3/src/version.c vendor/gperf/3.0.3/src/xmalloc.c vendor/gperf/3.0.3/tests/ Copied: vendor/gperf/3.0.3/AUTHORS (from r228214, vendor/gperf/dist/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gperf/3.0.3/AUTHORS Fri Dec 2 22:48:15 2011 (r228215, copy of r228214, vendor/gperf/dist/AUTHORS) @@ -0,0 +1,2 @@ +Douglas C. Schmidt +Bruno Haible Copied: vendor/gperf/3.0.3/COPYING (from r228214, vendor/gperf/dist/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gperf/3.0.3/COPYING Fri Dec 2 22:48:15 2011 (r228215, copy of r228214, vendor/gperf/dist/COPYING) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Copied: vendor/gperf/3.0.3/ChangeLog (from r228214, vendor/gperf/dist/ChangeLog) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/gperf/3.0.3/ChangeLog Fri Dec 2 22:48:15 2011 (r228215, copy of r228214, vendor/gperf/dist/ChangeLog) @@ -0,0 +1,3361 @@ +2007-04-30 Brendan Kehoe + + * gperf-3.0.3 released. + * src/version.cc: Bump to 3.0.3. + * tests/*.exp: Bump to 3.0.3 in header. + * doc/gperf.1: Regenerate with gperf 3.0.3. + +2007-04-06 Bruno Haible + + Improve support for mingw. + * tests/Makefile.in (check-c, check-ada, check-modula3, check-pascal, + check-lang-utf8, check-lang-ucs2): Remove '\r' from output before diff. + (POSTPROCESS_FOR_MINGW): New variable. + (check-test): Use it to postprocess output before diff. + +2007-04-04 Bruno Haible + + Support for newer GNU standards. + * doc/configure.ac (mandir): Remove assignment. + * doc/Makefile.in (datarootdir): New variable. + (docdir, dvidir, psdir, pdfdir, htmldir): Use value determined by + autoconf. + * configure.ac: Require autoconf >= 2.60. + * doc/configure.ac: Likewise. + * lib/configure.ac: Likewise. + * src/configure.ac: Likewise. + * tests/configure.ac: Likewise. + * configure: Regenerated with autoconf-2.61. + * doc/configure: Likewise. + * lib/configure: Likewise. + * src/configure: Likewise. + * tests/configure: Likewise. + * src/config.h.in: Likewise. + * src/config.h.msvc: Likewise. + * src/config.h_vms: Likewise. + +2007-04-04 Bruno Haible + + * doc/Makefile.in (MAKEINFO): Disable also the LC_MESSAGES and LC_ALL + environment variables. + +2007-04-04 Bruno Haible + + * configure.ac: Renamed from configure.in. + * doc/configure.ac: Renamed from doc/configure.in. + * lib/configure.ac: Renamed from lib/configure.in. + * src/configure.ac: Renamed from src/configure.in. + * tests/configure.ac: Renamed from tests/configure.in. + * Makefile.devel: Update. + * INSTALL: Update. + +2007-03-31 Bruno Haible + + * tests/test.c (in_word_set): New declaration. + * tests/test2.c (in_word_set): Likewise. + +2007-03-31 Bruno Haible + + * src/options.cc (Options::parse_options): Bump copyright year. + +2007-03-31 Bruno Haible + + * doc/gperf.texi: Fix typo. + +2007-03-31 Bruno Haible + + Change generated code after the meaning of __inline is changed in + GCC 4.3. + * src/output.cc (Output::output_lookup_function): Emit an inline + marker that also works with gcc-4.3 in c99 or gnu99 mode. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + Reported by Bruce Korb . + +2006-06-29 Brendan Kehoe + + * gperf-3.0.2 released. + + * doc/Makefile.in (all): No longer depend on dvi. + +2006-01-22 Brendan Kehoe + + * doc/gperf.texi: Update copyright to be 1989-2006. + (UPDATED): Change to 22 January 2006. + * doc/gperf.1 (TH): Fix date. + * configure.in: Update copyright years. + * configure: Regenerate. + * src/Makefile.in: Update copyright years. + + * doc/gperf.{dvi,ps,pdf}: Regenerated by manually invoking tex + instead of trying to use texi2dvi, whose run of etex ends up + actually always running pdfetex, thus always recreating gperf.pdf. + +2006-01-13 Brendan Kehoe + + * NEWS: Add note about #line directive fix. + * doc/gperf.1: Regenerate with Makefile.devel. + + * doc/gperf.texi (UPDATED): Correct to be today. + * doc: Regenerated by doing make in a configured tree. + Requires makeinfo, texi2dvi, texi2pdf, and texi2html. + + * configure.in: Add AC_OBJEXT and AC_EXEEXT. + * lib/Makefile.in (OBJEXT): Define for subst. + (OBJECTS): Use $(OBJEXT) instead of '.o'. + * src/Makefile.in: Make dependencies use $(OBJEXT). + (OBJEXT, EXEEXT): Define for subst. + (TARGETPROG): Add $(EXEEXT). + (OBJECTS): Use $(OBJEXT) instead of '.o'. + (clean): Remove *.$(OBJEXT) instead of *.o. + +2006-01-13 Bruno Haible + + Fix #line directives for filenames containing backslashes. + * src/output.cc (output_line_directive): New function. + (output_keyword_entry, Output::output): Use it. + Reported by Alexander . + + * src/options.cc (Options::parse_options): Update years in --version + output. + +2005-08-29 Brendan Kehoe + + * src/keyword.cc: Tweak comment to avoid nesting. + +2005-08-27 Bruno Haible + + Fix missing ranlib detection when cross-compiling. + * aclocal.m4 (CL_PROG_RANLIB): Remove macro. + * lib/configure.in: Use AC_PROG_RANLIB instead of CL_PROG_RANLIB. + +2005-07-30 Bruno Haible + + * src/version.cc: Bump version number to 3.0.2. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + +2005-07-30 Bruno Haible + + * src/positions.h: Add forward declarations of friend classes. + Needed for compilation with g++ 4.0. + +2004-08-22 Bruno Haible + + * tests/Makefile.in (check-lang-syntax): Add test for the + --length-table-name option. + * tests/test-6.exp: Update. + +2004-08-21 Bruce Lilly + + * src/input.cc (Input::read_input): Accept length-table-name + declaration. + * src/options.h (Options::get_lengthtable_name, + Options::set_lengthtable_name): New declarations. + (Options): Add field _lengthtable_name. + * src/options.icc (Options::get_lengthtable_name): New inline method. + * src/options.cc (DEFAULT_LENGTHTABLE_NAME): New constant. + (Options::long_usage): Document --length-table-name option. + (Options::Options): Initialize _lengthtable_name field. + (Options::~Options): Update. + (Options::set_lengthtable_name): New method. + (long_options): Add option --length-table-name. + (Options::parse_options): Implement --length-table-name option. + * src/output.cc (Output::output_keylength_table, output_switch_case, + Output::output_lookup_function_body): Use option.get_lengthtable_name. + * doc/gperf.texi (Gperf Declarations): Document %define + length-table-name. + (Output Details): Document --length-table-name option. + +2003-06-12 Bruno Haible + + * gperf-3.0.1 released. + + * src/version.cc: Bump version number to 3.0.1. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/incomplete.exp, + tests/java.exp, tests/languages.exp, tests/modula2.exp, + tests/objc.exp, tests/permut2.exp, tests/permut3.exp, + tests/permutc2.exp, tests/test-4.exp: Update. + +2003-05-31 Bruno Haible + + * doc/gperf.texi (User-supplied Struct): Mention the possibility of an + abbreviated struct declaration. + * src/input.cc (Input::read_input): Support struct declarations of the + form "struct foo;". + * tests/incomplete.gperf: New file. + * tests/incomplete.exp: New file. + * tests/Makefile.in (check-test): Check incomplete.gperf too. + Reported by Rob Leslie . + +2003-05-20 Bruno Haible + + * doc/Makefile.in (gperf.ps): Don't use $< in a target rule. + +2003-05-27 Bruno Haible + + * Makefile.vms (CC): Correct value. + (getopt.obj, getopt1.obj, getline.obj, hash.obj): Don't set + HAVE_CONFIG_H. + +2003-05-17 Bruno Haible + + * Makefile.msvc (DEBUGFLAGS): New variable. + (gperf.exe): Use it, and MFLAGS too. + +2003-05-08 Bruno Haible + + * gperf-3.0 released. + +2003-05-07 Bruno Haible + + * src/version.cc: Bump version number to 3.0. + * doc/gperf.texi: Likewise. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + + * src/configure.in: Fix AC_INIT argument. + + * Makefile.devel (configure, lib/configure, src/configure, + tests/configure, doc/configure): Use the newest autoconf. + (src/config.h.in): Use the newest autoheader. + +2003-05-03 Bruno Haible + + * doc/gperf.texi: Use two spaces as sentence separator, as recommended + by the texinfo manual. + +2003-04-12 Bruno Haible + + * doc/configure.in (mandir): Change default value. + * doc/Makefile.in (docdir): Use datadir instead of prefix. + * Makefile.msvc (datadir): New variable. + (mandir, docdir): Use it instead of prefix. + (install, installdirs): Update. + * Makefile.vms (datadir): New variable. + (mandir, docdir): Use it instead of prefix. + (install, installdirs): Update. + +2003-04-12 Bruno Haible + + * README.vms: New file. + * Makefile.vms: New file. + * Makefile.devel (src/config.h_vms): New rule. + (all): Depend on it. + +2003-03-19 Bruno Haible + + * src/input.cc (Input::read_input): Ignore comments at the beginning + of the declarations section. + * doc/gperf.texi (Controls for GNU indent): New section. + Reported by Bruce Lilly . + +2003-03-19 Bruno Haible + + * src/output.cc (Output::output_hash_function): Avoid lint warning if + not all arguments of the hash function are used. Avoid lint warning + for fallthrough in switch. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/java.exp, tests/languages.exp, + tests/modula2.exp, tests/objc.exp: All /*FALLTHROUGH*/ to expected + output. + Reported by Bruce Lilly . + +2003-03-01 Bruno Haible + + * src/options.h (Options::set_initializer_suffix): New declaration. + * src/options.cc (Options::set_initializer_suffix): New method. + * src/input.cc (Input::read_input): Recognize %define + initializer-suffix. + * doc/gperf.texi (Gperf Declarations): Document %define + initializer-suffix. + * NEWS: Update. + +2003-02-26 Bruno Haible + + * Makefile.msvc: New file. + * README.woe32: New file. + * Makefile.devel (all): Depend on src/config.h.msvc. + (src/config.h.msvc): New rule. + +2003-01-07 Bruno Haible + + * src/input.h (Input::_charset_dependent): New field. + * src/input.cc (Input::read_input): Also set _charset_dependent. + * src/main.cc (main): Pass _charset_dependent from Input to Output. + * src/output.h (Output::Output): Add charset_dependent argument. + (Output::_charset_dependent): New field. + * src/output.cc (Output::Output): Add charset_dependent argument. + (Output::output): Provoke a compilation error if the execution + character set doesn't match the expectations. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + + * src/options.cc (Options::long_usage): Change bug report address to + . + * tests/test-6.exp: Update. + + * src/output.cc (USE_DOWNCASE_TABLE): New macro. + (output_upperlower_table): New function. + (output_upperlower_strcmp, output_upperlower_strncmp, + output_upperlower_memcmp): Emit gperf_downcase array accesses. + (Output::output): Call output_upperlower_table. + * tests/permutc2.exp: Update. + + * src/keyword-list.icc (KeywordExt_List::rest): Use a portable cast. + (Only in GCC a cast of an lvalue is an lvalue.) + +2003-01-01 Bruno Haible + + * src/options.cc (Options::parse_options): Update copyright year. + + * doc/gperf.texi (@author): Add me. + + * src/options.h (NULLSTRINGS): New enum value. + (Options::get_stringpool_name, Options::set_stringpool_name): New + method declarations. + (Options::_stringpool_name): New field. + * src/options.icc (Options::get_stringpool_name): New method. + * src/options.cc (DEFAULT_STRINGPOOL_NAME): New variable. + (Options::long_usage): Document -Q and --null-strings. + (Options::Options): Initialize _stringpool_name. + (Options::~Options): Output _stringpool_name, NULLSTRINGS values too. + (Options::set_stringpool_name): New method. + (long_options): Add options --string-pool-name, --null-strings. + (Options::parse_options): Implement options -P, -Q and --null-strings. + * src/input.cc (Input::read_input): Recognize declarations %pic, + %define string-pool-name, %null-strings. + * src/output.h (Output::output_string_pool, + Output::output_lookup_pools): New method declarations. + (Output::_wordlist_eltype): New field. + * src/output.cc (Output::output_keylength_table): Trivial + simplification. + (Output::output_string_pool): New method. + (output_keyword_entry): Add stringpool_index argument. For SHAREDLIB, + use struct offsets. + (output_keyword_blank_entries): For SHAREDLIB, use -1 instead of "". + (Output::output_keyword_table): Use _wordlist_eltype instead of + _struct_tag. Compute stringpool_index for output_keyword_entry. + (Output::output_lookup_pools): New method. + (Output::output_lookup_function_body): Use _wordlist_eltype instead of + _struct_tag. For SHAREDLIB, use "+ stringpool" to convert offsets to + strings. Use "o >= 0" to test for nonempty table entry. + (Output::output_lookup_function): Call output_lookup_pools. + (Output::output): Initialize _wordlist_eltype. Call + output_lookup_pools. + * tests/jstest4.gperf: New file. + * tests/test-6.exp: Update. + * tests/Makefile.in (check-lang-syntax): Drop test of -p. Add tests of + -P and -Q. + * doc/gperf.texi (User-supplied Struct): Mention that first field has + to be of type 'int' if -P is given. + (Gperf Declarations): Document %pic, %define string-pool-name, + %null-strings. + (Output Details): Update description of option -P. Document options -Q + and --null-strings. + + * tests/Makefile.in (check-link-c, check-ada, check-pascal, + check-test): Omit option -p. + * tests/c-parse.exp: Regenerated. + * tests/chill.exp: Regenerated. + * tests/cplusplus.exp: Regenerated. + * tests/gpc.exp: Regenerated. + * tests/java.exp: Regenerated. + * tests/objc.exp: Regenerated. + * tests/test-4.exp: Regenerated. + + * src/output.cc (Output::output_lookup_function_body): Omit the + multicompare code section and its variables when it is not used. + * tests/chill.exp: Regenerated. + + * src/output.c (Output_Compare::output_firstchar_comparison): New + method. + (Output_Compare_Strcmp::output_comparison, + Output_Compare_Strncmp::output_comparison, + Output_Compare_Memcmp::output_comparison): Use it. + * tests/permutc2.exp: Update. + + * tests/smtp.gperf: New file, based on a contribution by Bruce Lilly. + * tests/Makefile.in (check-smtp): New rule. + (check): Depend on it. + (clean): Update. + +2002-12-12 Bruno Haible + + * src/search.h (Search::init_selchars_tuple, + Search::count_duplicates_tuple): Add alpha_unify argument. + (Search::count_duplicates_tuple): New method declaration. + * src/search.cc (Search::init_selchars_tuple, + Search::count_duplicates_tuple): Add alpha_unify argument. + (Search::find_positions): Update. + (Search::count_duplicates_tuple): New method. + (Search::count_duplicates_multiset): Free temp alpha_unify vector. + (Search::find_alpha_inc): Call count_duplicates_tuple. + + * src/configure.in: Add test for stack-allocated variable-size arrays. + * src/config.h.in: Regenerated. + * src/search.cc: Include config.h. + (DYNAMIC_ARRAY, FREE_DYNAMIC_ARRAY): New macros. + (Search::find_alpha_inc, Search::count_possible_collisions, + Search::find_asso_values): Use them. + * src/Makefile.in (search.o): Depend on config.h. + + * src/search.h (Search::keyword_list_length, Search::max_key_length, + Search::get_max_keysig_size, Search::prepare): Remove declarations. + (Search::prepare): Renamed from Search::preprepare. + (Search::_max_selchars_length): New field. + * src/search.cc (Search::prepare): Renamed from Search::preprepare. + (Search::prepare_asso_values): Merged with old Search::prepare. + Initialize _max_selchars_length. + (Search::keyword_list_length): Remove function. Use _list_len instead. + (Search::max_key_length): Remove function. Use _max_key_len instead. + (Search::get_max_keysig_size): Remove function. Use + _max_selchars_length instead. + (Search::count_possible_collisions, Search::find_asso_values): Update. + (Search::find_good_asso_values): Call just prepare_asso_values. + (Search::~Search): Update. + + * src/output.h (Output::output_asso_values_ref): New declaration. + * src/output.cc (char_to_index): Remove variable. + (Output::output_asso_values_ref): New function. + (Output::output_hash_function): Use it. + (Output::output): Update. + + * src/positions.h (Positions::is_useall, Positions::set_useall, + Positions::iterator, Positions::reviterator): New method declarations. + (Positions::_useall): New field. + (PositionIterator): Make constructor private. Add a constructor and a + copy constructor. + (PositionIterator::remaining): New declaration. + (PositionReverseIterator): Make constructor private. Add a constructor + and a copy constructor. + (PositionReverseIterator::remaining): New declaration. + (PositionReverseIterator::_minindex): New field. + * src/positions.icc (Positions::Positions): Initialize _useall. + (Positions::operator=): Likewise. + (Positions::is_useall, Positions::set_useall): New methods. + (Positions::sort): Do nothing if _useall is set. + (Positions::iterator, Positions::reviterator): New methods. + (PositionIterator::PositionIterator): New constructor. + (PositionIterator::remaining): New method. + (PositionReverseIterator::PositionReverseIterator): New constructor. + (PositionReverseIterator::next): Use _minindex as bound. + (PositionReverseIterator::remaining): New method. + * src/positions.cc (Positions::add, Positions::remove): Reset the + useall flag. + (Positions::print): Handle the useall case. + * src/options.h (ALLCHARS): Remove. + * src/options.cc (Options::~Options): Update. + (Options::parse_options): Use Positions::set_useall(). + * src/keyword.h (KeywordExt::init_selchars_tuple, + KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low): + Remove use_all_chars argument. + * src/keyword.cc (KeywordExt::init_selchars_low): Remove use_all_chars + argument. Tell the position iterator to stop at _allchars_length. + Remove special case code for -k'*'. + (KeywordExt::init_selchars_tuple, KeywordExt::init_selchars_multiset): + Remove use_all_chars argument. + * src/search.h (Search::init_selchars_tuple): Remove use_all_chars + argument. + (Search::init_selchars_multiset): Likewise. + * src/search.cc (Search::init_selchars_tuple): Remove use_all_chars + argument. + (Search::count_duplicates_tuple, Search::find_positions): Update. + (Search::compute_alpha_unify): Remove special case code for -k'*'. + (Search::init_selchars_multiset): Remove use_all_chars argument. + (Search::count_duplicates_multiset): Update. + (Search::find_alpha_inc): Remove special case code for -k'*'. + (Search::prepare): Update. + (Search::get_max_keysig_size): Update. + * src/output.cc (Output::output_hash_function): Remove special case + code for -k'*'. + * tests/chill.exp: Regenerated. + +2002-12-11 Bruno Haible + + Change the positions to be 0-based, instead of 1-based. + * src/positions.h (Positions::LASTCHAR): Set to -1. + (Positions::MAX_SIZE): New constant. + (Positions::pointer): Change return type. + (Positions::_positions): Change element type. + (PositionIterator::EOS, PositionReverseIterator::EOS): Set to -2. + * src/positions.icc (Positions::pointer): Change return type. + (Positions::sort): Update. + * src/positions.cc (Positions::contains, Positions::add, + Positions::remove): Update. + (Positions::print): Update. Fix off-by-one bug. + * src/options.cc (Options::~Options): Update. + (Options::parse_options): Set BAD_VALUE to -3. Update. + * src/keyword.cc (KeywordExt::init_selchars_low): Update. + * src/search.cc (Search::find_positions, Search::compute_alpha_unify, + Search::find_alpha_inc): Update. + * src/output.cc (Output::output_hash_function): Update. Don't emit + a 'case' statement right after 'default:'. + * tests/c-parse.exp: Regenerated. + * tests/charsets.exp: Regenerated. + * tests/cplusplus.exp: Regenerated. + * tests/java.exp: Regenerated. + * tests/languages.exp: Regenerated. + * tests/modula2.exp: Regenerated. + * tests/objc.exp: Regenerated. + +2002-12-10 Bruno Haible + + * src/options.h: Reorder enum values. + (Options::short_usage, Options::long_usage): Make static. + * src/options.cc (Options::short_usage); No longer print a monster + usage line. + (Options::print_options): Improve output of options like + --key-positions=1,2,$. + (Options::~Options): Update. + + * src/options.h (UPPERLOWER): New enum value. + * src/options.cc (Options::long_usage): Document option --ignore-case. + (Options::~Options): Update. + (long_options): Add option --ignore-case. + (Options::parse_options): Handle option --ignore-case. + * src/input.cc (Input::read_input): Recognize option %ignore-case. + * src/keyword.h (KeywordExt::init_selchars_tuple, + KeywordExt::init_selchars_multiset, KeywordExt::init_selchars_low): + Add alpha_unify argument. + * src/keyword.cc (KeywordExt::init_selchars_low): Add alpha_unify + argument. + (KeywordExt::init_selchars_tuple): Add alpha_unify argument. + (KeywordExt::init_selchars_multiset): Add alpha_unify argument. + * src/search.h (Search::compute_alpha_size, + Search::compute_alpha_unify): New declarations. + (Search::init_selchars_multiset): Add alpha_unify argument. + (Search::_alpha_unify): New field. + * src/search.cc (Search::compute_alpha_size, + Search::compute_alpha_unify): New functions. + (Search::init_selchars_tuple): Update. + (Search::find_positions): Temporarily set _alpha_unify. Perform a + case insensitive comparison if needed. + (Search::init_selchars_multiset): Add alpha_unify argument. + (Search::count_duplicates_multiset): Call compute_alpha_unify. + (Search::find_alpha_inc): Temporarily set _alpha_unify. At the end, + set _alpha_size and _alpha_unify. + (Search::prepare): Update. Don't compute _alpga_size here. + (Search::optimize): Propagate unified asso_values. + (Search::~Search) Delete _alpha_unify. + * src/output.cc (output_upperlower_strcmp, output_upperlower_strncmp, + output_upperlower_memcmp): New functions. + (Output_Compare_Strcmp::output_comparison, + Output_Compare_Strncmp::output_comparison, + Output_Compare_Memcmp::output_comparison): Use the case-insensitive + comparison function if --ignore-case was given. + (Output::output): Emit the auxiliary case-insensitive comparison + function if needed. + * tests/permutc2.gperf, tests/permutc2.exp: New files. + * tests/Makefile.in (check-test): Also check permutc2.gperf. + * tests/test-6.exp: Update. + * doc/gperf.texi (Gperf Declarations): Document %ignore-case. + (Input Details): Document option --ignore-case. + * NEWS: Update. + + * src/search.cc (Search::optimize): Fill unused asso_values[] entries + with a large value. + * src/output.h (Output::Output): Remove occurrences argument. + (Output::_occurrences): Remove field. + * src/output.cc (Output::Output): Remove occurrences argument. + (Output::output_hash_function): Ignore _occurrences. + * src/main.cc (main): Don't pass the _occurrences to Output. + + * src/search.cc (Search::preprepare): Exit if keywords contain + out-of-range characters. + + * src/search.cc (for): Define so as to avoid errors with old compilers. + + * src/options.h (SHAREDLIB): New enum value. + * src/options.cc (Options::short_usage): Mention option -P. + (Options::long_usage): Document option -P. + (long_options): Add option --pic. + (Options::parse_options): Handle option -P/--pic. + * src/output.cc (output_keyword_blank_entries): When SHAREDLIB is + specified, emit NULL pointers instead of "". + (Output::output_lookup_function_body): When SHAREDLIB is specified + and SWITCH and DUP and not specified, test the table entry against + NULL before the string comparison. + * tests/test-6.exp: Update. + * doc/gperf.texi (Output Details): Document option -P. + * NEWS: Update. + Suggested by Ulrich Drepper. + +2002-12-08 Bruno Haible + + * tests/permut2.gperf, tests/permut2.exp: New files. + * tests/permut3.gperf, tests/permut3.exp: New files. + * tests/charsets.gperf: New file, from Bruce Lilly. + * tests/charsets.exp: New file. + * tests/languages.gperf: New file, from Bruce Lilly. + * tests/languages.exp: New file. + * Makefile.in (check-test): Test them all. + + Completely new asso_values search algorithm. + * src/search.h (Search::compute_occurrence, Search::clear_determined, + Search::set_determined, Search::already_determined, Search::reorder): + Remove functions. + (Search::init_asso_values, Search::sort_by_occurrence, + Search::compute_occurrence, Search::sort_by_occurrence, + Search::has_collisions, Search::collision_prior_to): Remove functions. + (Search::compute_partition, Search::count_possible_collisions, + Search::unchanged_partition): New method declarations. + (Search::_determined): Remove field. + * src/search.cc (Search::prepare): Don't initialize _determined. + (Search::compute_occurrence, greater_by_occurrence, + Search::clear_determined, Search::set_determined, + Search::already_determined, Search::reorder): Remove functions. + (Search::init_asso_values, compute_disjoint_union, + Search::sort_by_occurrence, Search::compute_occurrence, + Search::sort_by_occurrence, Search::has_collisions, + Search::collision_prior_to): Remove functions. + (StackEntry): Remove class. + (EquivalenceClass, Step): New classes. + (equals, Search::compute_partition, delete_partition, + Search::count_possible_collisions, Search::unchanged_partition): New + functions. + (Search::find_asso_values): Completely rewritten. + (Search::find_good_asso_values): Don't call reorder(). + (Search::~Search): Don't free _determined. + * src/keyword.h (KeywordExt::_occurrence): Remove field. + * src/options.h (ORDER, FAST, OPT_CHOICE): Remove enum values. + (Options::_iterations): Remove field. + * src/options.icc (Options::get_iterations): Remove method. + * src/options.cc (Options::long_usage): Remove mention of -f and -o. + (Options::Options): Don't initialize _iterations. + (Options::~Options): Update. + (Options::parse_options): Do nothing for options -f, -o, -O. + * doc/gperf.texi: (Contributors): Update. + (Algorithmic Details): Remove options -f and -o. Update description + of option -s. + * tests/c-parse.exp, tests/chill.exp, tests/cplusplus.exp, + tests/gpc.exp, tests/java.exp, tests/modula2.exp, tests/objc.exp, + tests/test-4.exp): Regenerated, smaller than before. + * tests/test-6.exp: Update. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 00:27:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id E68C81065670; Sat, 3 Dec 2011 00:27:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Lawrence Stewart Date: Fri, 2 Dec 2011 19:27:04 -0500 User-Agent: KMail/1.6.2 References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <201112011143.27707.jkim@FreeBSD.org> <4ED8575D.2010405@freebsd.org> In-Reply-To: <4ED8575D.2010405@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112021927.25234.jkim@FreeBSD.org> Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , Benjamin Kaduk , svn-src-head@freebsd.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 00:27:33 -0000 On Thursday 01 December 2011 11:43 pm, Lawrence Stewart wrote: > On 12/02/11 03:43, Jung-uk Kim wrote: > > On Thursday 01 December 2011 10:11 am, Lawrence Stewart wrote: > >> On 11/30/11 05:09, Jung-uk Kim wrote: > >>> On Tuesday 29 November 2011 11:13 am, Lawrence Stewart wrote: > >>>> On 11/30/11 00:05, Lawrence Stewart wrote: > >>>>> On 11/28/11 14:59, Benjamin Kaduk wrote: > >>>>>> On Wed, 23 Nov 2011, Lawrence Stewart wrote: > >>>>>>> On 11/23/11 17:42, Julien Ridoux wrote: > >>>> > >>>> [snip] > >>>> > >>>>>>>> What is your favourite option? > >>>>>>> > >>>>>>> FreeBSD parlance is to ask what colour you would like to > >>>>>>> paint the bikeshed ;) > >>>>>>> > >>>>>>> As I've never experienced the pain John refers to, I'll > >>>>>>> defer to the wisdom of others on whether the proposed patch > >>>>>>> will create pain down the road. I think it's ok, but if > >>>>>>> consensus is 8bytes per packet isn't going to break the > >>>>>>> bank, I guess we just go for it - but I guess I am cautious > >>>>>>> about this route as we can push a lot of packets per second > >>>>>>> through the stack. > >>>>>> > >>>>>> Since other people seem to be keeping quiet, I'll add that > >>>>>> I'm in favor of just always adding the 8 bytes per packet. > >>>>> > >>>>> Julien and I discussed this at length today, and agree that > >>>>> for head, we'll add the new bh_ffcounter member to the BPF > >>>>> header unconditionally. > >>>>> > >>>>> Thanks to you and John for the input. > >>>>> > >>>>> I'm going to revert r227778 in order to start form a clean > >>>>> slate, and add two separate patches. One will reintegrate > >>>>> FFCLOCK support with BPF without breaking the ABI. A follow > >>>>> up patch will bump the ffclock version and add the > >>>>> bh_ffcounter to the bpf header (after the timestamp member). > >>>>> Then a final patch will bump __FreeBSD_version and add a note > >>>>> to UPDATING about recompiling to get kernel/world in sync, > >>>>> which should seal the deal. > >>>> > >>>> Here's the first of the patches: > >>>> > >>>> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_i > >>>>nt act abi_10.x.r228130.patch > >>> > >>> I only glanced at it but it looks very close to what I wanted > >>> to suggest. > >> > >> Final candidate patch is at: > >> > >> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_int > >>act abi_10.x.r228180.patch > >> > >> Assuming it passes the "make tinderbox" build I'm currently > >> running and no further input is received from interested > >> parties, I plan to commit it in ~10 hours. > >> > >> Changes since the r228130 patch I sent previously: > >> > >> - The new flags in bpf.h are added unconditionally so that they > >> can always be referenced at compile time and a decision made at > >> runtime as to whether a flag will be set or not. Using one of > >> the new flags when the kernel doesn't have FFCLOCK compiled in > >> results in the flag being ignored. An app should check for the > >> existence of the "ffclock" kernel feature or the "kern.sysclock" > >> sysctl tree before attempting to use the flags. > >> > >> - This patch will hopefully be MFCed at some point, so I added a > >> CTASSERT to bpf.c to ensure that the ABI of structs bpf_hdr32, > >> bpf_hdr and bpf_xhdr remains intact when FFCLOCK is enabled and > >> the union of a ffcounter and struct timeval32/timeval/bpf_ts is > >> switched in. > >> > >> - bpf_gettime() more comprehensively covers all the possible > >> cases of flag combination and does sensible things for each case > >> (even though some cases are rather silly). > >> > >> - The snippet of code at the beginning of catchpacket() that was > >> manipulating the struct bintime derived from bpf_gettime() was > >> gross and has been removed in favour of selecting the right > >> {get}bin{up}time() function call in bpf_gettime(). > > > > I did that to reduce branching. Since you are introducing more > > branches, it warrants a function pointer now. There's another reason, BTW. If mbufs are tagged with timestamps (where only monotonic timestamps are allowed), they must be converted within the bpf.c. I forgot all the details. :-( > I see, thanks for the explanation. Could you elaborate a bit more > about how you would implement the function pointer idea? I'm also > curious in the !FFCLOCK case just how much overhead having the > 2-layer nested if/else adds. I'm not an very optimisation savvy > person, but I'm wondering if it's actually worth micro-optimising > this code. > > My initial thoughts about your function pointer idea lead to adding > a function pointer in the bpf_d and setting it to the appropriate > function to get the timestamp from at bpf_d creation or ioctl time. > Whilst I like this idea, I can't see how it would work given that > the various functions involved in time/ffcounter stamp generation > all have different signatures. > > We could have multiple variants of bpf_gettime() which each call > the appropriate underlying functions to generate the appropriate > stamp. Would add quite a lot of code but would reduce the overhead > of calling bpf_gettime() to an indirect function call + the > underlying stamp generation function call. This also solves the > problem of multiple function signatures. Please see my patch: http://people.freebsd.org/~jkim/bpf_ffclock.diff This is what I originally intended to propose (just compile-tested). I did not use union *intentionally* to make the patch simpler. Instead, I added BPF_FFCOUNT() macro. It's kinda ugly but I don't see any compelling reason to introduce the union (yet). > We would also need to add the function pointer to the bpf_d struct > which I guess breaks the ABI, something we're trying to avoid with > this patch as we want to MFC it. It does not affect user applications as bpfdesc.h is only meant for kernel uses. Also, it is very hard for me to imagine any third-party drivers that use struct bpf_d directly. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 01:03:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 67E4D106566B; Sat, 3 Dec 2011 01:03:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Lawrence Stewart Date: Fri, 2 Dec 2011 20:02:46 -0500 User-Agent: KMail/1.6.2 References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <4ED8575D.2010405@freebsd.org> <201112021927.25234.jkim@FreeBSD.org> In-Reply-To: <201112021927.25234.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112022002.49618.jkim@FreeBSD.org> Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , Benjamin Kaduk , svn-src-head@freebsd.org Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 01:03:03 -0000 On Friday 02 December 2011 07:27 pm, Jung-uk Kim wrote: > On Thursday 01 December 2011 11:43 pm, Lawrence Stewart wrote: > > On 12/02/11 03:43, Jung-uk Kim wrote: > > > On Thursday 01 December 2011 10:11 am, Lawrence Stewart wrote: > > >> On 11/30/11 05:09, Jung-uk Kim wrote: > > >>> On Tuesday 29 November 2011 11:13 am, Lawrence Stewart wrote: > > >>>> On 11/30/11 00:05, Lawrence Stewart wrote: > > >>>>> On 11/28/11 14:59, Benjamin Kaduk wrote: > > >>>>>> On Wed, 23 Nov 2011, Lawrence Stewart wrote: > > >>>>>>> On 11/23/11 17:42, Julien Ridoux wrote: > > >>>> > > >>>> [snip] > > >>>> > > >>>>>>>> What is your favourite option? > > >>>>>>> > > >>>>>>> FreeBSD parlance is to ask what colour you would like to > > >>>>>>> paint the bikeshed ;) > > >>>>>>> > > >>>>>>> As I've never experienced the pain John refers to, I'll > > >>>>>>> defer to the wisdom of others on whether the proposed > > >>>>>>> patch will create pain down the road. I think it's ok, > > >>>>>>> but if consensus is 8bytes per packet isn't going to > > >>>>>>> break the bank, I guess we just go for it - but I guess I > > >>>>>>> am cautious about this route as we can push a lot of > > >>>>>>> packets per second through the stack. > > >>>>>> > > >>>>>> Since other people seem to be keeping quiet, I'll add that > > >>>>>> I'm in favor of just always adding the 8 bytes per packet. > > >>>>> > > >>>>> Julien and I discussed this at length today, and agree that > > >>>>> for head, we'll add the new bh_ffcounter member to the BPF > > >>>>> header unconditionally. > > >>>>> > > >>>>> Thanks to you and John for the input. > > >>>>> > > >>>>> I'm going to revert r227778 in order to start form a clean > > >>>>> slate, and add two separate patches. One will reintegrate > > >>>>> FFCLOCK support with BPF without breaking the ABI. A follow > > >>>>> up patch will bump the ffclock version and add the > > >>>>> bh_ffcounter to the bpf header (after the timestamp > > >>>>> member). Then a final patch will bump __FreeBSD_version and > > >>>>> add a note to UPDATING about recompiling to get > > >>>>> kernel/world in sync, which should seal the deal. > > >>>> > > >>>> Here's the first of the patches: > > >>>> > > >>>> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf > > >>>>_i nt act abi_10.x.r228130.patch > > >>> > > >>> I only glanced at it but it looks very close to what I wanted > > >>> to suggest. > > >> > > >> Final candidate patch is at: > > >> > > >> http://people.freebsd.org/~lstewart/patches/misc/ffclock_bpf_i > > >>nt act abi_10.x.r228180.patch > > >> > > >> Assuming it passes the "make tinderbox" build I'm currently > > >> running and no further input is received from interested > > >> parties, I plan to commit it in ~10 hours. > > >> > > >> Changes since the r228130 patch I sent previously: > > >> > > >> - The new flags in bpf.h are added unconditionally so that > > >> they can always be referenced at compile time and a decision > > >> made at runtime as to whether a flag will be set or not. Using > > >> one of the new flags when the kernel doesn't have FFCLOCK > > >> compiled in results in the flag being ignored. An app should > > >> check for the existence of the "ffclock" kernel feature or the > > >> "kern.sysclock" sysctl tree before attempting to use the > > >> flags. > > >> > > >> - This patch will hopefully be MFCed at some point, so I added > > >> a CTASSERT to bpf.c to ensure that the ABI of structs > > >> bpf_hdr32, bpf_hdr and bpf_xhdr remains intact when FFCLOCK is > > >> enabled and the union of a ffcounter and struct > > >> timeval32/timeval/bpf_ts is switched in. > > >> > > >> - bpf_gettime() more comprehensively covers all the possible > > >> cases of flag combination and does sensible things for each > > >> case (even though some cases are rather silly). > > >> > > >> - The snippet of code at the beginning of catchpacket() that > > >> was manipulating the struct bintime derived from bpf_gettime() > > >> was gross and has been removed in favour of selecting the > > >> right {get}bin{up}time() function call in bpf_gettime(). > > > > > > I did that to reduce branching. Since you are introducing more > > > branches, it warrants a function pointer now. > > There's another reason, BTW. If mbufs are tagged with timestamps > (where only monotonic timestamps are allowed), they must be > converted within the bpf.c. I forgot all the details. :-( > > > I see, thanks for the explanation. Could you elaborate a bit more > > about how you would implement the function pointer idea? I'm also > > curious in the !FFCLOCK case just how much overhead having the > > 2-layer nested if/else adds. I'm not an very optimisation savvy > > person, but I'm wondering if it's actually worth micro-optimising > > this code. > > > > My initial thoughts about your function pointer idea lead to > > adding a function pointer in the bpf_d and setting it to the > > appropriate function to get the timestamp from at bpf_d creation > > or ioctl time. Whilst I like this idea, I can't see how it would > > work given that the various functions involved in time/ffcounter > > stamp generation all have different signatures. > > > > We could have multiple variants of bpf_gettime() which each call > > the appropriate underlying functions to generate the appropriate > > stamp. Would add quite a lot of code but would reduce the > > overhead of calling bpf_gettime() to an indirect function call + > > the underlying stamp generation function call. This also solves > > the problem of multiple function signatures. > > Please see my patch: > > http://people.freebsd.org/~jkim/bpf_ffclock.diff I booted up the kernel and found it just crashes because of stupid typos. Now a new patch is uploaded in place. Sorry. Anyway, I see no regression nor ABI breakage. :-) Jung-uk Kim > This is what I originally intended to propose (just > compile-tested). I did not use union *intentionally* to make the > patch simpler. Instead, I added BPF_FFCOUNT() macro. It's kinda > ugly but I don't see any compelling reason to introduce the union > (yet). > > > We would also need to add the function pointer to the bpf_d > > struct which I guess breaks the ABI, something we're trying to > > avoid with this patch as we want to MFC it. > > It does not affect user applications as bpfdesc.h is only meant for > kernel uses. Also, it is very hard for me to imagine any > third-party drivers that use struct bpf_d directly. > > Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 01:23:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EF65106567C; Sat, 3 Dec 2011 01:23:16 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU [18.9.25.13]) by mx1.freebsd.org (Postfix) with ESMTP id 904A28FC17; Sat, 3 Dec 2011 01:23:15 +0000 (UTC) X-AuditID: 1209190d-b7f726d0000008d1-82-4ed97a026904 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id 64.0C.02257.20A79DE4; Fri, 2 Dec 2011 20:23:14 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pB31NDsK028701; Fri, 2 Dec 2011 20:23:13 -0500 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pB31NAJY023076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 2 Dec 2011 20:23:12 -0500 (EST) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id pB31N93b018330; Fri, 2 Dec 2011 20:23:09 -0500 (EST) Date: Fri, 2 Dec 2011 20:23:09 -0500 (EST) From: Benjamin Kaduk To: Jung-uk Kim In-Reply-To: <201112022002.49618.jkim@FreeBSD.org> Message-ID: References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <4ED8575D.2010405@freebsd.org> <201112021927.25234.jkim@FreeBSD.org> <201112022002.49618.jkim@FreeBSD.org> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnleLIzCtJLcpLzFFi42IRYrdT12WquulncO+lpsXeI9eZLVZ+vspk MW39LkaLzbe6mC3etPxgsfjTPgVIbFrIatH0ZQGTA4dHw3kfjxmf5rN47Jx1lz2AOYrLJiU1 J7MstUjfLoErY+qJqUwFx5grLpzsZGpgfMTUxcjJISFgIvFt120WCFtM4sK99WwgtpDAPkaJ 311qXYxcQPZ6Rokfd6ewQTj7mSQmnJjKDFFVL3G69z5rFyMHB4uAlsSmvUkgYTYBFYmZbzaC DRIRUJK4sG8aM0gvs8BEJomnB1+C9QoL6Et8XT0RbDOngJHEuemTwWxeAXuJjsPPWSGWLWGU mH7gJdipogI6Eqv3T4EqEpQ4OfMJmM0sYClx7s91tgmMgrOQpGYhSS1gZFrFKJuSW6Wbm5iZ U5yarFucnJiXl1qka6SXm1mil5pSuokRFO6ckrw7GN8dVDrEKMDBqMTDa6Bw00+INbGsuDL3 EKMkB5OSKO/VcqAQX1J+SmVGYnFGfFFpTmrxIUYJDmYlEd6bZUA53pTEyqrUonyYlDQHi5I4 b+EOBz8hgfTEktTs1NSC1CKYrAwHh5IEr3clUKNgUWp6akVaZk4JQpqJgxNkOA/QcHOQGt7i gsTc4sx0iPwpRkUpcd4gkIQASCKjNA+uF5aOXjGKA70izMsEUsUDTGVw3a+ABjMBDVZsvAEy uCQRISXVwCi9YNXMwL7tx3f8MDUovanw913Wv45J375f/DxJl7Xwt2KH9fF/TrFXJvglXT+g ra3rd2bbfFdx7a+2LxQ9Eh7c6yxzEY89Xuh7VOHm3I+hBzMSYj2f7GKWundMZd12HZ+6Tdmr fr56YLLN7yNj54qUpWkWiQU9X3fyTD765cHxhSzOa1/5LnuhxFKckWioxVxUnAgAYnMmeSID AAA= Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Julien Ridoux , Ben Kaduk , svn-src-head@freebsd.org, Lawrence Stewart Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 01:23:16 -0000 On Fri, 2 Dec 2011, Jung-uk Kim wrote: > On Friday 02 December 2011 07:27 pm, Jung-uk Kim wrote: >> >> Please see my patch: >> >> http://people.freebsd.org/~jkim/bpf_ffclock.diff > > I booted up the kernel and found it just crashes because of stupid > typos. Now a new patch is uploaded in place. Sorry. > > Anyway, I see no regression nor ABI breakage. :-) I don't have any objections to it; what do Lawrence and Julien think? -Ben From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 02:27:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAFF106566B; Sat, 3 Dec 2011 02:27:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C2BB8FC08; Sat, 3 Dec 2011 02:27:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB32RRhV018936; Sat, 3 Dec 2011 02:27:27 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB32RQNF018933; Sat, 3 Dec 2011 02:27:26 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201112030227.pB32RQNF018933@svn.freebsd.org> From: Rick Macklem Date: Sat, 3 Dec 2011 02:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228217 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 02:27:27 -0000 Author: rmacklem Date: Sat Dec 3 02:27:26 2011 New Revision: 228217 URL: http://svn.freebsd.org/changeset/base/228217 Log: Post r223774, the NFSv4 client no longer has multiple instances of the same lock_owner4 string. As such, the handling of cleanup of lock_owners could be simplified. This simplification permitted the client to do a ReleaseLockOwner operation when the process that the lock_owner4 string represents, has exited. This permits the server to release any storage related to the lock_owner4 string before the associated open is closed. Without this change, it is possible to exhaust a server's storage when a long running process opens a file and then many child processes do locking on the file, because the open doesn't get closed. A similar patch was applied to the Linux NFSv4 client recently so that it wouldn't exhaust a server's storage. Reviewed by: zack MFC after: 2 weeks Modified: head/sys/fs/nfs/nfsclstate.h head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfsclstate.h ============================================================================== --- head/sys/fs/nfs/nfsclstate.h Fri Dec 2 23:21:59 2011 (r228216) +++ head/sys/fs/nfs/nfsclstate.h Sat Dec 3 02:27:26 2011 (r228217) @@ -34,6 +34,7 @@ */ LIST_HEAD(nfsclopenhead, nfsclopen); LIST_HEAD(nfscllockownerhead, nfscllockowner); +SLIST_HEAD(nfscllockownerfhhead, nfscllockownerfh); LIST_HEAD(nfscllockhead, nfscllock); LIST_HEAD(nfsclhead, nfsclclient); LIST_HEAD(nfsclownerhead, nfsclowner); @@ -149,8 +150,8 @@ struct nfscllockowner { struct nfsclopen *nfsl_open; NFSPROC_T *nfsl_inprog; nfsv4stateid_t nfsl_stateid; + int nfsl_lockflags; u_int32_t nfsl_seqid; - u_int32_t nfsl_defunct; struct nfsv4lock nfsl_rwlock; u_int8_t nfsl_owner[NFSV4CL_LOCKNAMELEN]; u_int8_t nfsl_openowner[NFSV4CL_LOCKNAMELEN]; @@ -166,6 +167,14 @@ struct nfscllock { short nfslo_type; }; +/* This structure is used to collect a list of lockowners to free up. */ +struct nfscllockownerfh { + SLIST_ENTRY(nfscllockownerfh) nfslfh_list; + struct nfscllockownerhead nfslfh_lock; + int nfslfh_len; + uint8_t nfslfh_fh[NFSX_V4FHMAX]; +}; + /* * Macro for incrementing the seqid#. */ Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Fri Dec 2 23:21:59 2011 (r228216) +++ head/sys/fs/nfsclient/nfs_clstate.c Sat Dec 3 02:27:26 2011 (r228217) @@ -143,6 +143,8 @@ static void nfscl_freeopenowner(struct n static void nfscl_cleandeleg(struct nfscldeleg *); static int nfscl_trydelegreturn(struct nfscldeleg *, struct ucred *, struct nfsmount *, NFSPROC_T *); +static void nfscl_emptylockowner(struct nfscllockowner *, + struct nfscllockownerfhhead *); static short nfscberr_null[] = { 0, @@ -1030,7 +1032,7 @@ nfscl_getbytelock(vnode_t vp, u_int64_t NFSBCOPY(op->nfso_own->nfsow_owner, nlp->nfsl_openowner, NFSV4CL_LOCKNAMELEN); nlp->nfsl_seqid = 0; - nlp->nfsl_defunct = 0; + nlp->nfsl_lockflags = flags; nlp->nfsl_inprog = NULL; nfscl_lockinit(&nlp->nfsl_rwlock); LIST_INIT(&nlp->nfsl_lock); @@ -1638,7 +1640,6 @@ static void nfscl_cleanup_common(struct nfsclclient *clp, u_int8_t *own) { struct nfsclowner *owp, *nowp; - struct nfsclopen *op; struct nfscllockowner *lp, *nlp; struct nfscldeleg *dp; @@ -1667,15 +1668,6 @@ nfscl_cleanup_common(struct nfsclclient nfscl_freeopenowner(owp, 0); else owp->nfsow_defunct = 1; - } else { - /* look for lockowners on other opens */ - LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { - LIST_FOREACH(lp, &op->nfso_lock, nfsl_list) { - if (!NFSBCMP(lp->nfsl_owner, own, - NFSV4CL_LOCKNAMELEN)) - lp->nfsl_defunct = 1; - } - } } owp = nowp; } @@ -1685,13 +1677,21 @@ nfscl_cleanup_common(struct nfsclclient * Find open/lock owners for processes that have exited. */ static void -nfscl_cleanupkext(struct nfsclclient *clp) +nfscl_cleanupkext(struct nfsclclient *clp, struct nfscllockownerfhhead *lhp) { struct nfsclowner *owp, *nowp; + struct nfsclopen *op; + struct nfscllockowner *lp, *nlp; NFSPROCLISTLOCK(); NFSLOCKCLSTATE(); LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) { + LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { + LIST_FOREACH_SAFE(lp, &op->nfso_lock, nfsl_list, nlp) { + if (LIST_EMPTY(&lp->nfsl_lock)) + nfscl_emptylockowner(lp, lhp); + } + } if (nfscl_procdoesntexist(owp->nfsow_owner)) nfscl_cleanup_common(clp, owp->nfsow_owner); } @@ -1699,6 +1699,58 @@ nfscl_cleanupkext(struct nfsclclient *cl NFSPROCLISTUNLOCK(); } +/* + * Take the empty lock owner and move it to the local lhp list if the + * associated process no longer exists. + */ +static void +nfscl_emptylockowner(struct nfscllockowner *lp, + struct nfscllockownerfhhead *lhp) +{ + struct nfscllockownerfh *lfhp, *mylfhp; + struct nfscllockowner *nlp; + int fnd_it; + + /* If not a Posix lock owner, just return. */ + if ((lp->nfsl_lockflags & F_POSIX) == 0) + return; + + fnd_it = 0; + mylfhp = NULL; + /* + * First, search to see if this lock owner is already in the list. + * If it is, then the associated process no longer exists. + */ + SLIST_FOREACH(lfhp, lhp, nfslfh_list) { + if (lfhp->nfslfh_len == lp->nfsl_open->nfso_fhlen && + !NFSBCMP(lfhp->nfslfh_fh, lp->nfsl_open->nfso_fh, + lfhp->nfslfh_len)) + mylfhp = lfhp; + LIST_FOREACH(nlp, &lfhp->nfslfh_lock, nfsl_list) + if (!NFSBCMP(nlp->nfsl_owner, lp->nfsl_owner, + NFSV4CL_LOCKNAMELEN)) + fnd_it = 1; + } + /* If not found, check if process still exists. */ + if (fnd_it == 0 && nfscl_procdoesntexist(lp->nfsl_owner) == 0) + return; + + /* Move the lock owner over to the local list. */ + if (mylfhp == NULL) { + mylfhp = malloc(sizeof(struct nfscllockownerfh), M_TEMP, + M_NOWAIT); + if (mylfhp == NULL) + return; + mylfhp->nfslfh_len = lp->nfsl_open->nfso_fhlen; + NFSBCOPY(lp->nfsl_open->nfso_fh, mylfhp->nfslfh_fh, + mylfhp->nfslfh_len); + LIST_INIT(&mylfhp->nfslfh_lock); + SLIST_INSERT_HEAD(lhp, mylfhp, nfslfh_list); + } + LIST_REMOVE(lp, nfsl_list); + LIST_INSERT_HEAD(&mylfhp->nfslfh_lock, lp, nfsl_list); +} + static int fake_global; /* Used to force visibility of MNTK_UNMOUNTF */ /* * Called from nfs umount to free up the clientid. @@ -2331,9 +2383,8 @@ nfscl_renewthread(struct nfsclclient *cl { struct nfsclowner *owp, *nowp; struct nfsclopen *op; - struct nfscllockowner *lp, *nlp, *olp; + struct nfscllockowner *lp, *nlp; struct nfscldeleghead dh; - struct nfscllockownerhead lh; struct nfscldeleg *dp, *ndp; struct ucred *cred; u_int32_t clidrev; @@ -2341,6 +2392,8 @@ nfscl_renewthread(struct nfsclclient *cl uint32_t recover_done_time = 0; struct timespec mytime; static time_t prevsec = 0; + struct nfscllockownerfh *lfhp, *nlfhp; + struct nfscllockownerfhhead lfh; cred = newnfs_getcred(); NFSLOCKCLSTATE(); @@ -2379,7 +2432,6 @@ nfscl_renewthread(struct nfsclclient *cl (void) nfscl_hasexpired(clp, clidrev, p); } - LIST_INIT(&lh); TAILQ_INIT(&dh); NFSLOCKCLSTATE(); if (cbpathdown) @@ -2389,41 +2441,11 @@ nfscl_renewthread(struct nfsclclient *cl /* * Now, handle defunct owners. */ - owp = LIST_FIRST(&clp->nfsc_owner); - while (owp != NULL) { - nowp = LIST_NEXT(owp, nfsow_list); - if (LIST_EMPTY(&owp->nfsow_open)) { - if (owp->nfsow_defunct) - nfscl_freeopenowner(owp, 0); - } else { - LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { - lp = LIST_FIRST(&op->nfso_lock); - while (lp != NULL) { - nlp = LIST_NEXT(lp, nfsl_list); - if (lp->nfsl_defunct && - LIST_EMPTY(&lp->nfsl_lock)) { - LIST_FOREACH(olp, &lh, nfsl_list) { - if (!NFSBCMP(olp->nfsl_owner, - lp->nfsl_owner,NFSV4CL_LOCKNAMELEN)) - break; - } - if (olp == NULL) { - LIST_REMOVE(lp, nfsl_list); - LIST_INSERT_HEAD(&lh, lp, nfsl_list); - } else { - nfscl_freelockowner(lp, 0); - } - } - lp = nlp; - } + LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) { + if (LIST_EMPTY(&owp->nfsow_open)) { + if (owp->nfsow_defunct != 0) + nfscl_freeopenowner(owp, 0); } - } - owp = nowp; - } - - /* and release defunct lock owners */ - LIST_FOREACH_SAFE(lp, &lh, nfsl_list, nlp) { - nfscl_freelockowner(lp, 0); } /* @@ -2528,6 +2550,7 @@ tryagain: FREE((caddr_t)dp, M_NFSCLDELEG); } + SLIST_INIT(&lfh); /* * Call nfscl_cleanupkext() once per second to check for * open/lock owners where the process has exited. @@ -2535,8 +2558,26 @@ tryagain: NFSGETNANOTIME(&mytime); if (prevsec != mytime.tv_sec) { prevsec = mytime.tv_sec; - nfscl_cleanupkext(clp); + nfscl_cleanupkext(clp, &lfh); + } + + /* + * Do a ReleaseLockOwner for all lock owners where the + * associated process no longer exists, as found by + * nfscl_cleanupkext(). + */ + newnfs_setroot(cred); + SLIST_FOREACH_SAFE(lfhp, &lfh, nfslfh_list, nlfhp) { + LIST_FOREACH_SAFE(lp, &lfhp->nfslfh_lock, nfsl_list, + nlp) { + (void)nfsrpc_rellockown(clp->nfsc_nmp, lp, + lfhp->nfslfh_fh, lfhp->nfslfh_len, cred, + p); + nfscl_freelockowner(lp, 0); + } + free(lfhp, M_TEMP); } + SLIST_INIT(&lfh); NFSLOCKCLSTATE(); if ((clp->nfsc_flags & NFSCLFLAGS_RECOVER) == 0) @@ -3539,8 +3580,8 @@ nfscl_relock(vnode_t vp, struct nfsclcli off = lop->nfslo_first; len = lop->nfslo_end - lop->nfslo_first; error = nfscl_getbytelock(vp, off, len, lop->nfslo_type, cred, p, - clp, 1, NULL, 0, lp->nfsl_owner, lp->nfsl_openowner, &nlp, &newone, - &donelocally); + clp, 1, NULL, lp->nfsl_lockflags, lp->nfsl_owner, + lp->nfsl_openowner, &nlp, &newone, &donelocally); if (error || donelocally) return (error); if (nmp->nm_clp != NULL) From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 04:30:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E601F106566B; Sat, 3 Dec 2011 04:30:58 +0000 (UTC) (envelope-from jrid@cubinlab.ee.unimelb.edu.au) Received: from outbound.icp-qv1-irony-out1.iinet.net.au (outbound.icp-qv1-irony-out1.iinet.net.au [203.59.1.106]) by mx1.freebsd.org (Postfix) with ESMTP id 5A8188FC08; Sat, 3 Dec 2011 04:30:56 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApIBADCe2U58lVQR/2dsb2JhbAAMOBatDgEBAQEDOj8QCw05VwaIIq03iQWDbYZRYwSaP4xE X-IronPort-AV: E=Sophos;i="4.71,287,1320595200"; d="scan'208";a="822330695" Received: from unknown (HELO [192.168.0.16]) ([124.149.84.17]) by outbound.icp-qv1-irony-out1.iinet.net.au with ESMTP; 03 Dec 2011 12:02:48 +0800 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Julien Ridoux In-Reply-To: <201112022002.49618.jkim@FreeBSD.org> Date: Sat, 3 Dec 2011 15:02:47 +1100 Content-Transfer-Encoding: quoted-printable Message-Id: <4D87C75E-5C49-4D6D-BFD7-4A1E1C2B1C13@cubinlab.ee.unimelb.edu.au> References: <201111210417.pAL4HOdi023556@svn.freebsd.org> <4ED8575D.2010405@freebsd.org> <201112021927.25234.jkim@FreeBSD.org> <201112022002.49618.jkim@FreeBSD.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.1084) Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, Ben Kaduk , Benjamin Kaduk , svn-src-head@FreeBSD.org, Lawrence Stewart Subject: Re: svn commit: r227778 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 04:30:59 -0000 On 03/12/2011, at 12:02 PM, Jung-uk Kim wrote: [snip] >>>>>=20 >>>>> - The snippet of code at the beginning of catchpacket() that >>>>> was manipulating the struct bintime derived from bpf_gettime() >>>>> was gross and has been removed in favour of selecting the >>>>> right {get}bin{up}time() function call in bpf_gettime(). >>>>=20 >>>> I did that to reduce branching. Since you are introducing more >>>> branches, it warrants a function pointer now. >>=20 >> There's another reason, BTW. If mbufs are tagged with timestamps >> (where only monotonic timestamps are allowed), they must be >> converted within the bpf.c. I forgot all the details. :-( >>=20 >>> I see, thanks for the explanation. Could you elaborate a bit more >>> about how you would implement the function pointer idea? I'm also >>> curious in the !FFCLOCK case just how much overhead having the >>> 2-layer nested if/else adds. I'm not an very optimisation savvy >>> person, but I'm wondering if it's actually worth micro-optimising >>> this code. >>>=20 >>> My initial thoughts about your function pointer idea lead to >>> adding a function pointer in the bpf_d and setting it to the >>> appropriate function to get the timestamp from at bpf_d creation >>> or ioctl time. Whilst I like this idea, I can't see how it would >>> work given that the various functions involved in time/ffcounter >>> stamp generation all have different signatures. >>>=20 >>> We could have multiple variants of bpf_gettime() which each call >>> the appropriate underlying functions to generate the appropriate >>> stamp. Would add quite a lot of code but would reduce the >>> overhead of calling bpf_gettime() to an indirect function call + >>> the underlying stamp generation function call. This also solves >>> the problem of multiple function signatures. >>=20 >> Please see my patch: >>=20 >> http://people.freebsd.org/~jkim/bpf_ffclock.diff >=20 > I booted up the kernel and found it just crashes because of stupid=20 > typos. Now a new patch is uploaded in place. Sorry. >=20 > Anyway, I see no regression nor ABI breakage. :-) >=20 > Jung-uk Kim >=20 >> This is what I originally intended to propose (just >> compile-tested). I did not use union *intentionally* to make the >> patch simpler. Instead, I added BPF_FFCOUNT() macro. It's kinda >> ugly but I don't see any compelling reason to introduce the union >> (yet). >>=20 >>> We would also need to add the function pointer to the bpf_d >>> struct which I guess breaks the ABI, something we're trying to >>> avoid with this patch as we want to MFC it. >>=20 >> It does not affect user applications as bpfdesc.h is only meant for >> kernel uses. Also, it is very hard for me to imagine any >> third-party drivers that use struct bpf_d directly. >>=20 >> Jung-uk Kim Jung-uk, thanks for the patch, I understand much better. Overall I am definitely not against this patch. I see two minor issues = that require some attention though. Using the higher level ffclock_[get]binuptime() instead of = ffclock_abstime() adds an extra function call. My performance metric of = interest is timestamping latency, because all things being equal, the = variablity of the timestamping delay gives a less accurate picture of = the network and affects the synchronisation daemon and the final quality = of the clock. Although I agree that the patch we proposed with Lawrence can be = improved on this front, adding one more level of abstraction to the = timestamping function goes the opposite direction. The earlier the = timestamp is created, the better the results. I am definitely not very savvy on the code optimisation front, and I = need to be educated there. I am wondering if removing the branching in = the code is worth this extra variability in latency.=20 Looking ahead to the next patch we want to propose, the BPF header will = contain a timestamp in seconds from one of the two clocks and a = feed-forward counter. Here is a very simplistic proof of concept based = on Lawrence's patch. I just put it there to support the discussion: = http://www.cubinlab.ee.unimelb.edu.au/~jrid/patches/r228191/bpfffcounter_c= oncept_v2.patch Since it is essential to read the hardware counter only once to produce = the timestamp in second and the ffcounter, the prototype of the = timestamping function stored in the bpf_d would have to be changed (if = the kernel is compiled with the FFCLOCK option, at least). For example, if BPF_T_FFCLOCK is set, this change will make use of = ffclock_abstime() and solves the performance issue I raised above. If the clock flag is not set, then the [get]binuptime() will need a = wrapper function, and they will bear the timestamping latency cost. Is this acceptable? If yes, then I don't have any objections to the = patch. Julien From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 10:31:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1A08106564A; Sat, 3 Dec 2011 10:31:21 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 406C28FC0A; Sat, 3 Dec 2011 10:31:21 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 590F0E3F07A; Sat, 3 Dec 2011 11:31:19 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t1FSdxkNEOPt; Sat, 3 Dec 2011 11:31:16 +0100 (CET) Received: from goofy01.vnodelab.local (unknown [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id 9984BE3F079; Sat, 3 Dec 2011 11:31:15 +0100 (CET) Date: Sat, 3 Dec 2011 11:31:13 +0100 From: Joel Dahl To: Ken Smith Message-ID: <20111203103113.GK23987@goofy01.vnodelab.local> References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> <08BC9075-C4E8-4156-BAAF-C097B118B7B4@cederstrand.dk> <1322832618.99806.8.camel@bauer.cse.buffalo.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1322832618.99806.8.camel@bauer.cse.buffalo.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, Erik Cederstrand , svn-src-all@freebsd.org, Robert Watson , Joel Dahl , svn-src-head@freebsd.org Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 10:31:22 -0000 On 02-12-2011 8:30, Ken Smith wrote: > On Fri, 2011-12-02 at 14:18 +0100, Erik Cederstrand wrote: > > Den 02/12/2011 kl. 10.44 skrev Joel Dahl: > > > > > On 02-12-2011 0:38, Ken Smith wrote: > > >> Author: kensmith > > >> Date: Fri Dec 2 00:38:47 2011 > > >> New Revision: 228192 > > >> URL: http://svn.freebsd.org/changeset/base/228192 > > >> > > >> Log: > > >> Add a screen that asks if the user would like to enable crash dumps, > > >> giving them a very brief description of the trade-offs. Whether the > > >> user opts in or out add an entry to what will become /etc/rc.conf > > >> explaining what dumpdev is and how to turn on/off crash dumps. The folks > > >> who handle interacting with users submitting PRs have asked for this. > > > > > > Hmm. Two things I'd like to bring up: > > > > > > * Not specifically aimed at this commit, but my recommendation > > > would be that we keep bsdinstall as simple as possible: installing FreeBSD > > > should require a minimum amount of keystrokes. I realise this is just one > > > more screen, but I hope we don't turn bsdinstall into a configuration > > > utility where you can disable/enable just about anything in rc.conf. > > > > > > * Mentioning future system crashes during installation feels awkward. Is that > > > really what we want? I understand the problem and how this helps us with > > > debugging, but this is like saying to users that what they are installing > > > is unstable and that it'll eventuelly crash and die. I know we discussed > > > ways of making crash dumps smarter in order to not fill up /var, which in > > > turn would allow us to always have it on. Maybe that is the right path? > > > > Maybe do away with the dialog, and then unconditionally enable textdump in > > rc.conf, adding the magic so textdump_enable="YES" sets up textdump with > > sane defaults. > > > > Thanks, > > Erik > > > > This just implements what we seemed to settle on during the latest round > of several discussions we've had about this issue. It comes up each > I've turned off dumpdev as part of converting head into a stable branch, > which is a step that got started way before I started being the one to > do it. I'll be happy to see what I just added go away but the > pre-condition for that is infrastructure that prevents crash dumps > (of any form, including textdumps) from filling up /var if the user > turns out to be clueless about them and doesn't realize they should > pay attention to them. Thanks for the explanation Ken. I'm fine with this being in the release but I was curious about the discussion resulting in this change (because I obviously didn't see it). It sounds like we've got another project to hack on before 10.0. :-) -- Joel From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 10:51:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF479106564A; Sat, 3 Dec 2011 10:51:49 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 821B88FC0A; Sat, 3 Dec 2011 10:51:49 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id A7882E3F07A; Sat, 3 Dec 2011 11:51:48 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lgL96ZeURGOi; Sat, 3 Dec 2011 11:51:46 +0100 (CET) Received: from goofy01.vnodelab.local (unknown [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id EE3D7E3F079; Sat, 3 Dec 2011 11:51:45 +0100 (CET) Date: Sat, 3 Dec 2011 11:51:44 +0100 From: Joel Dahl To: Bruce Cran Message-ID: <20111203105144.GL23987@goofy01.vnodelab.local> References: <201112020038.pB20cmt6068628@svn.freebsd.org> <20111202094411.GJ23987@goofy01.vnodelab.local> <4ED91D22.6000803@cran.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ED91D22.6000803@cran.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r228192 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 10:51:49 -0000 On 02-12-2011 18:46, Bruce Cran wrote: > On 02/12/2011 09:44, Joel Dahl wrote: > > * Not specifically aimed at this commit, but my recommendation > > would be that we keep bsdinstall as simple as possible: installing FreeBSD > > should require a minimum amount of keystrokes. I realise this is just one > > more screen, but I hope we don't turn bsdinstall into a configuration > > utility where you can disable/enable just about anything in rc.conf. > > This is an argument I see again and again. Yes, and now we've got bsdinstall instead of sysinstall. Much better. Some (most?) people want the installer to just install the OS and then get out of the way, as quickly as possible. -- Joel From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 11:15:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C59A6106564A; Sat, 3 Dec 2011 11:15:50 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm2.ukr.net (fsm2.ukr.net [195.214.192.121]) by mx1.freebsd.org (Postfix) with ESMTP id 747938FC14; Sat, 3 Dec 2011 11:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=iFWqz/oyukeyB9mvt+Qkxf/Yeh8/xmpX6av92Bn7MG0=; b=YoOfN/PL/crwENmhXSbRYgz+ErdURnCh/lLn4+BHwB8Bz3my5Uw55GtOVnZZEXvn/iNIkGZiRtyLFLWge5GfFdzg8IbEvmkgD/D7MXgbwOva5JpSwvCY92ghbZBEth4p5h/8vjUsfoaGLQSokpvE9UTNv5Wuw764MKpwpOXa51s=; Received: from [178.137.138.140] (helo=nonamehost.) by fsm2.ukr.net with esmtpsa ID 1RWnC3-0001yx-0a ; Sat, 03 Dec 2011 12:51:43 +0200 Date: Sat, 3 Dec 2011 12:51:42 +0200 From: Ivan Klymenko To: John Baldwin Message-ID: <20111203125142.442e4bf6@nonamehost.> In-Reply-To: <201112021959.pB2Jxka6006739@svn.freebsd.org> References: <201112021959.pB2Jxka6006739@svn.freebsd.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228207 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 11:15:50 -0000 =D0=92 Fri, 2 Dec 2011 19:59:46 +0000 (UTC) John Baldwin =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: jhb > Date: Fri Dec 2 19:59:46 2011 > New Revision: 228207 > URL: http://svn.freebsd.org/changeset/base/228207 >=20 > Log: > When changing the user priority of a thread, change the real > priority in addition to the user priority for threads whose current > real priority is equal to the previous user priority or if the new > priority is a real-time priority. This allows priority changes of > other threads to have an immediate effect. > =20 > MFC after: 2 weeks >=20 > Modified: > head/sys/kern/kern_resource.c >=20 > Modified: head/sys/kern/kern_resource.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_resource.c Fri Dec 2 19:56:46 > 2011 (r228206) +++ head/sys/kern/kern_resource.c Fri > Dec 2 19:59:46 2011 (r228207) @@ -488,8 +488,9 @@ > rtp_to_pri(struct rtprio *rtp, struct th sched_class(td, > rtp->type); /* XXX fix */ oldpri =3D td->td_user_pri; > sched_user_prio(td, newpri); > - if (curthread =3D=3D td) > - sched_prio(curthread, td->td_user_pri); /* XXX > dubious */ > + if (td->td_user_pri !=3D oldpri && (td =3D=3D curthread || > + td->td_priority =3D=3D oldpri || td->td_user_pri >=3D > PRI_MAX_REALTIME)) > + sched_prio(td, td->td_user_pri); > if (TD_ON_UPILOCK(td) && oldpri !=3D newpri) { > critical_enter(); > thread_unlock(td); > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >=20 >=20 Thank you! It's a little corrected the situation with interactivity with using ULE scheduler... But quite a bit... :) From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 11:16:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 735211065670 for ; Sat, 3 Dec 2011 11:16:55 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.120]) by mx1.freebsd.org (Postfix) with ESMTP id E7BAF8FC17 for ; Sat, 3 Dec 2011 11:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:To:From:Date; bh=SJDgsPuF999nU8EoA5rYS7omUBHnc2oeUKyGngLYYSw=; b=slb2Mm2vdZef1qaLpXpTxAE+R7VZO5HhJ4lOAtMFnz37G2nUzcCdpPk82F4ObCEhQeBBwhtrh3pDHnojOK61GqzsznHonGzktpIOuLMugLtIDFuSjpJOUvLdhpKs92ysjW0Eyi4zog7kdfH5TWXDpsSWZ7GpdgPDpDtgfKTDllE=; Received: from [178.137.138.140] (helo=nonamehost.) by fsm1.ukr.net with esmtpsa ID 1RWnG4-000KiN-4s for svn-src-all@freebsd.org; Sat, 03 Dec 2011 12:55:52 +0200 Date: Sat, 3 Dec 2011 12:55:51 +0200 From: Ivan Klymenko To: svn-src-all@freebsd.org Message-ID: <20111203125551.156724e1@nonamehost.> In-Reply-To: <201112022119.pB2LJEqJ009294@svn.freebsd.org> References: <201112022119.pB2LJEqJ009294@svn.freebsd.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 11:16:55 -0000 =D0=92 Fri, 2 Dec 2011 21:19:14 +0000 (UTC) Marius Strobl =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: marius > Date: Fri Dec 2 21:19:14 2011 > New Revision: 228209 > URL: http://svn.freebsd.org/changeset/base/228209 >=20 > Log: > - In device_probe_child(9) check the return value of > device_set_driver(9) when actually setting a driver as especially > ENOMEM is fatal in these cases. > - Annotate other calls to device_set_devclass(9) and > device_set_driver(9) without the return value being checked and that > are okay to fail.=20 > Reviewed by: yongari (slightly earlier version) >=20 > Modified: > head/sys/kern/subr_bus.c >=20 > Modified: head/sys/kern/subr_bus.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/subr_bus.c Fri Dec 2 20:28:45 2011 > (r228208) +++ head/sys/kern/subr_bus.c Fri Dec 2 21:19:14 > 2011 (r228209) @@ -1129,7 +1129,7 @@ > devclass_driver_deleted(devclass_t buscl dev->parent->devclass =3D=3D > busclass) { if ((error =3D device_detach(dev)) !=3D 0) > return (error); > - device_set_driver(dev, NULL); > + (void)device_set_driver(dev, NULL); > BUS_PROBE_NOMATCH(dev->parent, dev); > devnomatch(dev); > dev->flags |=3D DF_DONENOMATCH; > @@ -2007,19 +2007,22 @@ device_probe_child(device_t dev, device_ > for (dl =3D first_matching_driver(dc, child); > dl; > dl =3D next_matching_driver(dc, child, dl)) { > - > /* If this driver's pass is too high, then > ignore it. */ if (dl->pass > bus_current_pass) > continue; > =20 > PDEBUG(("Trying %s", > DRIVERNAME(dl->driver))); > - device_set_driver(child, dl->driver); > + result =3D device_set_driver(child, > dl->driver); > + if (result =3D=3D ENOMEM) > + return (result); > + else if (result !=3D 0) > + continue; > if (!hasclass) { > if (device_set_devclass(child, > dl->driver->name)) { printf("driver bug: Unable to set devclass > (devname: %s)\n", (child ? device_get_name(child) : > "no device")); > - device_set_driver(child, > NULL); > + > (void)device_set_driver(child, NULL); continue; > } > } > @@ -2033,7 +2036,7 @@ device_probe_child(device_t dev, device_ > /* Reset flags and devclass before the next > probe. */ child->devflags =3D 0; > if (!hasclass) > - device_set_devclass(child, NULL); > + (void)device_set_devclass(child, > NULL);=20 > /* > * If the driver returns SUCCESS, there can > be @@ -2050,7 +2053,7 @@ device_probe_child(device_t dev, device_ > * certainly doesn't match. > */ > if (result > 0) { > - device_set_driver(child, NULL); > + (void)device_set_driver(child, NULL); > continue; > } > =20 > @@ -2113,7 +2116,9 @@ device_probe_child(device_t dev, device_ > if (result !=3D 0) > return (result); > } > - device_set_driver(child, best->driver); > + result =3D device_set_driver(child, best->driver); > + if (result !=3D 0) > + return (result); > resource_int_value(best->driver->name, child->unit, > "flags", &child->devflags); > =20 > @@ -2722,8 +2727,8 @@ device_attach(device_t dev) > dev->driver->name, dev->unit, error); > /* Unset the class; set in device_probe_child */ > if (dev->devclass =3D=3D NULL) > - device_set_devclass(dev, NULL); > - device_set_driver(dev, NULL); > + (void)device_set_devclass(dev, NULL); > + (void)device_set_driver(dev, NULL); > device_sysctl_fini(dev); > dev->state =3D DS_NOTPRESENT; > return (error); > @@ -2776,7 +2781,7 @@ device_detach(device_t dev) > devclass_delete_device(dev->devclass, dev); > =20 > dev->state =3D DS_NOTPRESENT; > - device_set_driver(dev, NULL); > + (void)device_set_driver(dev, NULL); > device_set_desc(dev, NULL); > device_sysctl_fini(dev); > =20 > @@ -4613,7 +4618,6 @@ print_driver(driver_t *driver, int inden > print_driver_short(driver, indent); > } > =20 > - > static void > print_driver_list(driver_list_t drivers, int indent) > { Thank you! Now I can again connect a USB external drive... But, nevertheless, remains a problem when you connect an external drive via FireWire... From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 12:28:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 410BD106566B; Sat, 3 Dec 2011 12:28:34 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30ACA8FC25; Sat, 3 Dec 2011 12:28:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3CSYRR039190; Sat, 3 Dec 2011 12:28:34 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3CSYkr039188; Sat, 3 Dec 2011 12:28:34 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201112031228.pB3CSYkr039188@svn.freebsd.org> From: Peter Holm Date: Sat, 3 Dec 2011 12:28:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228218 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 12:28:34 -0000 Author: pho Date: Sat Dec 3 12:28:33 2011 New Revision: 228218 URL: http://svn.freebsd.org/changeset/base/228218 Log: Rename copyin_timeout32 to umtx_copyin_timeout32 and move parameter check here. Include check for negative seconds value. In collaboration with: kib MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Dec 3 02:27:26 2011 (r228217) +++ head/sys/kern/kern_umtx.c Sat Dec 3 12:28:33 2011 (r228218) @@ -3267,15 +3267,21 @@ struct timespec32 { }; static inline int -copyin_timeout32(void *addr, struct timespec *tsp) +umtx_copyin_timeout32(void *addr, struct timespec *tsp) { struct timespec32 ts32; int error; error = copyin(addr, &ts32, sizeof(struct timespec32)); if (error == 0) { - tsp->tv_sec = ts32.tv_sec; - tsp->tv_nsec = ts32.tv_nsec; + if (ts32.tv_sec < 0 || + ts32.tv_nsec >= 1000000000 || + ts32.tv_nsec < 0) + error = EINVAL; + else { + tsp->tv_sec = ts32.tv_sec; + tsp->tv_nsec = ts32.tv_nsec; + } } return (error); } @@ -3290,13 +3296,9 @@ __umtx_op_lock_umtx_compat32(struct thre if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } ts = &timeout; } return (do_lock_umtx32(td, uap->obj, uap->val, ts)); @@ -3317,12 +3319,9 @@ __umtx_op_wait_compat32(struct thread *t if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_wait(td, uap->obj, uap->val, ts, 1, 0); @@ -3338,12 +3337,9 @@ __umtx_op_lock_umutex_compat32(struct th if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_lock_umutex(td, uap->obj, ts, 0); @@ -3359,12 +3355,9 @@ __umtx_op_wait_umutex_compat32(struct th if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_lock_umutex(td, uap->obj, ts, _UMUTEX_WAIT); @@ -3380,12 +3373,9 @@ __umtx_op_cv_wait_compat32(struct thread if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return (do_cv_wait(td, uap->obj, uap->uaddr1, ts, uap->val)); @@ -3401,13 +3391,9 @@ __umtx_op_rw_rdlock_compat32(struct thre if (uap->uaddr2 == NULL) { error = do_rw_rdlock(td, uap->obj, uap->val, 0); } else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } error = do_rw_rdlock2(td, uap->obj, uap->val, &timeout); } return (error); @@ -3423,13 +3409,9 @@ __umtx_op_rw_wrlock_compat32(struct thre if (uap->uaddr2 == NULL) { error = do_rw_wrlock(td, uap->obj, 0); } else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } error = do_rw_wrlock2(td, uap->obj, &timeout); } @@ -3445,12 +3427,9 @@ __umtx_op_wait_uint_private_compat32(str if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_wait(td, uap->obj, uap->val, ts, 1, 1); @@ -3466,12 +3445,9 @@ __umtx_op_sem_wait_compat32(struct threa if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin_timeout32(uap->uaddr2, &timeout); + error = umtx_copyin_timeout32(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return (do_sem_wait(td, uap->obj, ts)); From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 12:30:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28849106564A; Sat, 3 Dec 2011 12:30:59 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 181578FC17; Sat, 3 Dec 2011 12:30:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3CUwT5039304; Sat, 3 Dec 2011 12:30:58 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3CUwCr039302; Sat, 3 Dec 2011 12:30:58 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201112031230.pB3CUwCr039302@svn.freebsd.org> From: Peter Holm Date: Sat, 3 Dec 2011 12:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228219 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 12:30:59 -0000 Author: pho Date: Sat Dec 3 12:30:58 2011 New Revision: 228219 URL: http://svn.freebsd.org/changeset/base/228219 Log: Add umtx_copyin_timeout() and move parameter checks here. In collaboration with: kib MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Dec 3 12:28:33 2011 (r228218) +++ head/sys/kern/kern_umtx.c Sat Dec 3 12:30:58 2011 (r228219) @@ -2898,6 +2898,21 @@ sys__umtx_unlock(struct thread *td, stru return do_unlock_umtx(td, uap->umtx, td->td_tid); } +inline int +umtx_copyin_timeout(const void *addr, struct timespec *tsp) +{ + int error; + + error = copyin(addr, tsp, sizeof(struct timespec)); + if (error == 0) { + if (tsp->tv_sec < 0 || + tsp->tv_nsec >= 1000000000 || + tsp->tv_nsec < 0) + error = EINVAL; + } + return (error); +} + static int __umtx_op_lock_umtx(struct thread *td, struct _umtx_op_args *uap) { @@ -2908,13 +2923,9 @@ __umtx_op_lock_umtx(struct thread *td, s if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } ts = &timeout; } return (do_lock_umtx(td, uap->obj, uap->val, ts)); @@ -2935,12 +2946,9 @@ __umtx_op_wait(struct thread *td, struct if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_wait(td, uap->obj, uap->val, ts, 0, 0); @@ -2955,12 +2963,9 @@ __umtx_op_wait_uint(struct thread *td, s if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_wait(td, uap->obj, uap->val, ts, 1, 0); @@ -2975,12 +2980,9 @@ __umtx_op_wait_uint_private(struct threa if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) - return (EINVAL); ts = &timeout; } return do_wait(td, uap->obj, uap->val, ts, 1, 1); @@ -3034,14 +3036,9 @@ __umtx_op_lock_umutex(struct thread *td, if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, - sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } ts = &timeout; } return do_lock_umutex(td, uap->obj, ts, 0); @@ -3063,14 +3060,9 @@ __umtx_op_wait_umutex(struct thread *td, if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, - sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } ts = &timeout; } return do_lock_umutex(td, uap->obj, ts, _UMUTEX_WAIT); @@ -3104,14 +3096,9 @@ __umtx_op_cv_wait(struct thread *td, str if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, - sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } ts = &timeout; } return (do_cv_wait(td, uap->obj, uap->uaddr1, ts, uap->val)); @@ -3139,14 +3126,9 @@ __umtx_op_rw_rdlock(struct thread *td, s if (uap->uaddr2 == NULL) { error = do_rw_rdlock(td, uap->obj, uap->val, 0); } else { - error = copyin(uap->uaddr2, &timeout, - sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } error = do_rw_rdlock2(td, uap->obj, uap->val, &timeout); } return (error); @@ -3162,14 +3144,9 @@ __umtx_op_rw_wrlock(struct thread *td, s if (uap->uaddr2 == NULL) { error = do_rw_wrlock(td, uap->obj, 0); } else { - error = copyin(uap->uaddr2, &timeout, - sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } error = do_rw_wrlock2(td, uap->obj, &timeout); } @@ -3192,14 +3169,9 @@ __umtx_op_sem_wait(struct thread *td, st if (uap->uaddr2 == NULL) ts = NULL; else { - error = copyin(uap->uaddr2, &timeout, - sizeof(timeout)); + error = umtx_copyin_timeout(uap->uaddr2, &timeout); if (error != 0) return (error); - if (timeout.tv_nsec >= 1000000000 || - timeout.tv_nsec < 0) { - return (EINVAL); - } ts = &timeout; } return (do_sem_wait(td, uap->obj, ts)); From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 12:33:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5F50106566C; Sat, 3 Dec 2011 12:33:17 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C647C8FC15; Sat, 3 Dec 2011 12:33:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3CXHho039416; Sat, 3 Dec 2011 12:33:17 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3CXHMN039414; Sat, 3 Dec 2011 12:33:17 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201112031233.pB3CXHMN039414@svn.freebsd.org> From: Peter Holm Date: Sat, 3 Dec 2011 12:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228220 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 12:33:17 -0000 Author: pho Date: Sat Dec 3 12:33:17 2011 New Revision: 228220 URL: http://svn.freebsd.org/changeset/base/228220 Log: Add declaration of umtx_copyin_timeout() In collaboration with: kib MFC after: 1 week Modified: head/sys/sys/umtx.h Modified: head/sys/sys/umtx.h ============================================================================== --- head/sys/sys/umtx.h Sat Dec 3 12:30:58 2011 (r228219) +++ head/sys/sys/umtx.h Sat Dec 3 12:33:17 2011 (r228220) @@ -223,6 +223,7 @@ umtx_key_match(const struct umtx_key *k1 k1->info.both.b == k2->info.both.b); } +int umtx_copyin_timeout(const void *, struct timespec *); int umtx_key_get(void *, int, int, struct umtx_key *); void umtx_key_release(struct umtx_key *); struct umtx_q *umtxq_alloc(void); From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 12:35:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F79B106564A; Sat, 3 Dec 2011 12:35:13 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6EC8FC16; Sat, 3 Dec 2011 12:35:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3CZDvG039508; Sat, 3 Dec 2011 12:35:13 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3CZDGv039506; Sat, 3 Dec 2011 12:35:13 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201112031235.pB3CZDGv039506@svn.freebsd.org> From: Peter Holm Date: Sat, 3 Dec 2011 12:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228221 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 12:35:13 -0000 Author: pho Date: Sat Dec 3 12:35:13 2011 New Revision: 228221 URL: http://svn.freebsd.org/changeset/base/228221 Log: Use umtx_copyin_timeout() to copy and check timeout parameter. In collaboration with: kib MFC after: 1 week Modified: head/sys/kern/kern_thr.c Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Sat Dec 3 12:33:17 2011 (r228220) +++ head/sys/kern/kern_thr.c Sat Dec 3 12:35:13 2011 (r228221) @@ -450,8 +450,7 @@ sys_thr_suspend(struct thread *td, struc tsp = NULL; if (uap->timeout != NULL) { - error = copyin((const void *)uap->timeout, (void *)&ts, - sizeof(struct timespec)); + error = umtx_copyin_timeout(uap->timeout, &ts); if (error != 0) return (error); tsp = &ts; @@ -474,9 +473,6 @@ kern_thr_suspend(struct thread *td, stru } if (tsp != NULL) { - if (tsp->tv_sec < 0 || tsp->tv_nsec < 0 || - tsp->tv_nsec > 1000000000) - return (EINVAL); if (tsp->tv_sec == 0 && tsp->tv_nsec == 0) error = EWOULDBLOCK; else { From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 13:25:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5BBC106566C for ; Sat, 3 Dec 2011 13:25:25 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 1265C8FC12 for ; Sat, 3 Dec 2011 13:25:24 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pB3DPN4J080129; Sat, 3 Dec 2011 14:25:23 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pB3DPNBi080128; Sat, 3 Dec 2011 14:25:23 +0100 (CET) (envelope-from marius) Date: Sat, 3 Dec 2011 14:25:23 +0100 From: Marius Strobl To: Ivan Klymenko Message-ID: <20111203132522.GA54475@alchemy.franken.de> References: <201112022119.pB2LJEqJ009294@svn.freebsd.org> <20111203125551.156724e1@nonamehost.> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111203125551.156724e1@nonamehost.> User-Agent: Mutt/1.4.2.3i Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 13:25:25 -0000 On Sat, Dec 03, 2011 at 12:55:51PM +0200, Ivan Klymenko wrote: > ?? Fri, 2 Dec 2011 21:19:14 +0000 (UTC) > Marius Strobl ??????????: > > > Author: marius > > Date: Fri Dec 2 21:19:14 2011 > > New Revision: 228209 > > URL: http://svn.freebsd.org/changeset/base/228209 > > > > Log: > > - In device_probe_child(9) check the return value of > > device_set_driver(9) when actually setting a driver as especially > > ENOMEM is fatal in these cases. > > - Annotate other calls to device_set_devclass(9) and > > device_set_driver(9) without the return value being checked and that > > are okay to fail. > > Reviewed by: yongari (slightly earlier version) > > > > Modified: > > head/sys/kern/subr_bus.c > > > > Modified: head/sys/kern/subr_bus.c > > ============================================================================== > > --- head/sys/kern/subr_bus.c Fri Dec 2 20:28:45 2011 > > (r228208) +++ head/sys/kern/subr_bus.c Fri Dec 2 21:19:14 > > 2011 (r228209) @@ -1129,7 +1129,7 @@ > > devclass_driver_deleted(devclass_t buscl dev->parent->devclass == > > busclass) { if ((error = device_detach(dev)) != 0) > > return (error); > > - device_set_driver(dev, NULL); > > + (void)device_set_driver(dev, NULL); > > BUS_PROBE_NOMATCH(dev->parent, dev); > > devnomatch(dev); > > dev->flags |= DF_DONENOMATCH; > > @@ -2007,19 +2007,22 @@ device_probe_child(device_t dev, device_ > > for (dl = first_matching_driver(dc, child); > > dl; > > dl = next_matching_driver(dc, child, dl)) { > > - > > /* If this driver's pass is too high, then > > ignore it. */ if (dl->pass > bus_current_pass) > > continue; > > > > PDEBUG(("Trying %s", > > DRIVERNAME(dl->driver))); > > - device_set_driver(child, dl->driver); > > + result = device_set_driver(child, > > dl->driver); > > + if (result == ENOMEM) > > + return (result); > > + else if (result != 0) > > + continue; > > if (!hasclass) { > > if (device_set_devclass(child, > > dl->driver->name)) { printf("driver bug: Unable to set devclass > > (devname: %s)\n", (child ? device_get_name(child) : > > "no device")); > > - device_set_driver(child, > > NULL); > > + > > (void)device_set_driver(child, NULL); continue; > > } > > } > > @@ -2033,7 +2036,7 @@ device_probe_child(device_t dev, device_ > > /* Reset flags and devclass before the next > > probe. */ child->devflags = 0; > > if (!hasclass) > > - device_set_devclass(child, NULL); > > + (void)device_set_devclass(child, > > NULL); > > /* > > * If the driver returns SUCCESS, there can > > be @@ -2050,7 +2053,7 @@ device_probe_child(device_t dev, device_ > > * certainly doesn't match. > > */ > > if (result > 0) { > > - device_set_driver(child, NULL); > > + (void)device_set_driver(child, NULL); > > continue; > > } > > > > @@ -2113,7 +2116,9 @@ device_probe_child(device_t dev, device_ > > if (result != 0) > > return (result); > > } > > - device_set_driver(child, best->driver); > > + result = device_set_driver(child, best->driver); > > + if (result != 0) > > + return (result); > > resource_int_value(best->driver->name, child->unit, > > "flags", &child->devflags); > > > > @@ -2722,8 +2727,8 @@ device_attach(device_t dev) > > dev->driver->name, dev->unit, error); > > /* Unset the class; set in device_probe_child */ > > if (dev->devclass == NULL) > > - device_set_devclass(dev, NULL); > > - device_set_driver(dev, NULL); > > + (void)device_set_devclass(dev, NULL); > > + (void)device_set_driver(dev, NULL); > > device_sysctl_fini(dev); > > dev->state = DS_NOTPRESENT; > > return (error); > > @@ -2776,7 +2781,7 @@ device_detach(device_t dev) > > devclass_delete_device(dev->devclass, dev); > > > > dev->state = DS_NOTPRESENT; > > - device_set_driver(dev, NULL); > > + (void)device_set_driver(dev, NULL); > > device_set_desc(dev, NULL); > > device_sysctl_fini(dev); > > > > @@ -4613,7 +4618,6 @@ print_driver(driver_t *driver, int inden > > print_driver_short(driver, indent); > > } > > > > - > > static void > > print_driver_list(driver_list_t drivers, int indent) > > { > > Thank you! > Now I can again connect a USB external drive... In what way did it fail before? This change actually doesn't fix any issue encountered in practice that I'm aware of. I just spotted this possibility for a problem while trying to debug what appears to be a race in newbus and I can't think of anything besides a panic due to trying to use unallocated memory this change would fix. But even then if device_set_driver(9) fails with ENOMEM the panic would be just avoided but you'd still end up with no driver being attached ... > But, nevertheless, remains a problem when you connect an external drive > via FireWire... Marius From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 13:51:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF841106566C; Sat, 3 Dec 2011 13:51:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF4918FC0C; Sat, 3 Dec 2011 13:51:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3Dpv9l041817; Sat, 3 Dec 2011 13:51:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3DpvpU041815; Sat, 3 Dec 2011 13:51:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112031351.pB3DpvpU041815@svn.freebsd.org> From: Marius Strobl Date: Sat, 3 Dec 2011 13:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228222 - head/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 13:51:58 -0000 Author: marius Date: Sat Dec 3 13:51:57 2011 New Revision: 228222 URL: http://svn.freebsd.org/changeset/base/228222 Log: Revert r225889 a bit. While it's correct that in total store order there's no need to additionally add CPU memory barriers to the acquire variants of atomic(9), these are documented to also include compiler memory barriers. So add the latter, which were previously included by using membar(), back. Modified: head/sys/sparc64/include/atomic.h Modified: head/sys/sparc64/include/atomic.h ============================================================================== --- head/sys/sparc64/include/atomic.h Sat Dec 3 12:35:13 2011 (r228221) +++ head/sys/sparc64/include/atomic.h Sat Dec 3 13:51:57 2011 (r228222) @@ -78,7 +78,7 @@ * order which we use for running the kernel and all of the userland atomic * loads and stores behave as if the were followed by a membar with a mask * of #LoadLoad | #LoadStore | #StoreStore. In order to be also sufficient - * for use of relaxed memory ordering, the atomic_cas() in the acq variants + * for use of relaxed memory ordering, the atomic_cas() in the acq variants * additionally would have to be followed by a membar #LoadLoad | #LoadStore. * Due to the suggested assembly syntax of the membar operands containing a * # character, they cannot be used in macros. The cmask and mmask bits thus @@ -97,6 +97,7 @@ #define atomic_cas_acq(p, e, s, sz) ({ \ itype(sz) v; \ v = atomic_cas((p), (e), (s), sz); \ + __asm __volatile("" : : : "memory"); \ v; \ }) @@ -121,6 +122,7 @@ #define atomic_op_acq(p, op, v, sz) ({ \ itype(sz) t; \ t = atomic_op((p), op, (v), sz); \ + __asm __volatile("" : : : "memory"); \ t; \ }) @@ -137,6 +139,7 @@ #define atomic_load_acq(p, sz) ({ \ itype(sz) v; \ v = atomic_load((p), sz); \ + __asm __volatile("" : : : "memory"); \ v; \ }) From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 13:54:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A7B8106564A; Sat, 3 Dec 2011 13:54:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28D428FC08; Sat, 3 Dec 2011 13:54:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3Dst6d041954; Sat, 3 Dec 2011 13:54:55 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3Dssua041947; Sat, 3 Dec 2011 13:54:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031354.pB3Dssua041947@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 13:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228223 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 13:54:55 -0000 Author: hselasky Date: Sat Dec 3 13:54:54 2011 New Revision: 228223 URL: http://svn.freebsd.org/changeset/base/228223 Log: MFC r227404: Add USB 3.0 descriptor support. Modified: stable/8/lib/libusb/Makefile stable/8/lib/libusb/libusb.3 stable/8/lib/libusb/libusb.h stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb20_desc.c stable/8/lib/libusb/libusb20_desc.h Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/Makefile ============================================================================== --- stable/8/lib/libusb/Makefile Sat Dec 3 13:51:57 2011 (r228222) +++ stable/8/lib/libusb/Makefile Sat Dec 3 13:54:54 2011 (r228223) @@ -72,6 +72,10 @@ MLINKS += libusb.3 libusb_get_config_des MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 +MLINKS += libusb.3 libusb_parse_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_free_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_parse_bos_descriptor.3 +MLINKS += libusb.3 libusb_free_bos_descriptor.3 MLINKS += libusb.3 libusb_alloc_transfer.3 MLINKS += libusb.3 libusb_free_transfer.3 MLINKS += libusb.3 libusb_submit_transfer.3 Modified: stable/8/lib/libusb/libusb.3 ============================================================================== --- stable/8/lib/libusb/libusb.3 Sat Dec 3 13:51:57 2011 (r228222) +++ stable/8/lib/libusb/libusb.3 Sat Dec 3 13:54:54 2011 (r228223) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2011 +.Dd November 9, 2011 .Dt LIBUSB 3 .Os .Sh NAME @@ -316,6 +316,40 @@ Retrieve a string descriptor in C style Returns the positive number of bytes in the resulting ASCII string on success and a LIBUSB_ERROR code on failure. .Pp +.Ft int +.Fn libusb_parse_ss_endpoint_comp "const void *buf" "int len" "libusb_ss_endpoint_companion_descriptor **ep_comp" +This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +Typically these arguments are the extra and extra_length fields of the +endpoint descriptor. +On success the pointer to resulting descriptor is stored at the location given by +.Fa ep_comp. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed USB 3.0 endpoint companion descriptor must be +freed using the libusb_free_ss_endpoint_comp function. +.Pp +.Ft void +.Fn libusb_free_ss_endpoint_comp "libusb_ss_endpoint_companion_descriptor *ep_comp" +This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor. +.Pp +.Ft int +.Fn libusb_parse_bos_descriptor "const void *buf" "int len" "libusb_bos_descriptor **bos" +This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +On success the pointer to resulting descriptor is stored at the location given by +.Fa bos. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed BOS descriptor must be freed using the +libusb_free_bos_descriptor function. +.Pp +.Ft void +.Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" +This function is NULL safe and frees a parsed BOS descriptor. +.Pp .Sh USB ASYNCHRONOUS I/O .Pp .Ft struct libusb_transfer * Modified: stable/8/lib/libusb/libusb.h ============================================================================== --- stable/8/lib/libusb/libusb.h Sat Dec 3 13:51:57 2011 (r228222) +++ stable/8/lib/libusb/libusb.h Sat Dec 3 13:54:54 2011 (r228223) @@ -63,6 +63,16 @@ enum libusb_descriptor_type { LIBUSB_DT_REPORT = 0x22, LIBUSB_DT_PHYSICAL = 0x23, LIBUSB_DT_HUB = 0x29, + LIBUSB_DT_BOS = 0x0f, + LIBUSB_DT_DEVICE_CAPABILITY = 0x10, + LIBUSB_DT_SS_ENDPOINT_COMPANION = 0x30, +}; + +enum libusb_device_capability_type { + LIBUSB_WIRELESS_USB_DEVICE_CAPABILITY = 0x1, + LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY = 0x2, + LIBUSB_SS_USB_DEVICE_CAPABILITY = 0x3, + LIBUSB_CONTAINER_ID_DEVICE_CAPABILITY = 0x4, }; #define LIBUSB_DT_DEVICE_SIZE 18 @@ -71,6 +81,10 @@ enum libusb_descriptor_type { #define LIBUSB_DT_ENDPOINT_SIZE 7 #define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 #define LIBUSB_DT_HUB_NONVAR_SIZE 7 +#define LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE 6 +#define LIBUSB_DT_BOS_SIZE 5 +#define LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 +#define LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f #define LIBUSB_ENDPOINT_DIR_MASK 0x80 @@ -230,6 +244,14 @@ typedef struct libusb_endpoint_descripto int extra_length; } libusb_endpoint_descriptor __aligned(sizeof(void *)); +typedef struct libusb_ss_endpoint_companion_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bMaxBurst; + uint8_t bmAttributes; + uint16_t wBytesPerInterval; +} libusb_ss_endpoint_companion_descriptor __aligned(sizeof(void *)); + typedef struct libusb_interface_descriptor { uint8_t bLength; uint8_t bDescriptorType; @@ -264,6 +286,39 @@ typedef struct libusb_config_descriptor int extra_length; } libusb_config_descriptor __aligned(sizeof(void *)); +typedef struct libusb_usb_2_0_device_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint32_t bmAttributes; +#define LIBUSB_USB_2_0_CAPABILITY_LPM_SUPPORT (1 << 1) +} libusb_usb_2_0_device_capability_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_ss_usb_device_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint8_t bmAttributes; +#define LIBUSB_SS_USB_CAPABILITY_LPM_SUPPORT (1 << 1) + uint16_t wSpeedSupported; +#define LIBUSB_CAPABILITY_LOW_SPEED_OPERATION (1) +#define LIBUSB_CAPABILITY_FULL_SPEED_OPERATION (1 << 1) +#define LIBUSB_CAPABILITY_HIGH_SPEED_OPERATION (1 << 2) +#define LIBUSB_CAPABILITY_5GBPS_OPERATION (1 << 3) + uint8_t bFunctionalitySupport; + uint8_t bU1DevExitLat; + uint16_t wU2DevExitLat; +} libusb_ss_usb_device_capability_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_bos_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint16_t wTotalLength; + uint8_t bNumDeviceCapabilities; + struct libusb_usb_2_0_device_capability_descriptor *usb_2_0_ext_cap; + struct libusb_ss_usb_device_capability_descriptor *ss_usb_cap; +} libusb_bos_descriptor __aligned(sizeof(void *)); + typedef struct libusb_control_setup { uint8_t bmRequestType; uint8_t bRequest; @@ -345,6 +400,10 @@ int libusb_get_config_descriptor_by_valu void libusb_free_config_descriptor(struct libusb_config_descriptor *config); int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); +int libusb_parse_ss_endpoint_comp(const void *buf, int len, struct libusb_ss_endpoint_companion_descriptor **ep_comp); +void libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp); +int libusb_parse_bos_descriptor(const void *buf, int len, struct libusb_bos_descriptor **bos); +void libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos); /* Asynchronous device I/O */ Modified: stable/8/lib/libusb/libusb10_desc.c ============================================================================== --- stable/8/lib/libusb/libusb10_desc.c Sat Dec 3 13:51:57 2011 (r228222) +++ stable/8/lib/libusb/libusb10_desc.c Sat Dec 3 13:54:54 2011 (r228223) @@ -298,7 +298,7 @@ libusb_get_string_descriptor_ascii(libus uint8_t desc_index, unsigned char *data, int length) { if (pdev == NULL || data == NULL || length < 1) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); if (length > 65535) length = 65535; @@ -318,7 +318,7 @@ libusb_get_descriptor(libusb_device_hand uint8_t desc_index, uint8_t *data, int length) { if (devh == NULL || data == NULL || length < 1) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); if (length > 65535) length = 65535; @@ -327,3 +327,172 @@ libusb_get_descriptor(libusb_device_hand LIBUSB_REQUEST_GET_DESCRIPTOR, (desc_type << 8) | desc_index, 0, data, length, 1000)); } + +int +libusb_parse_ss_endpoint_comp(const void *buf, int len, + struct libusb_ss_endpoint_companion_descriptor **ep_comp) +{ + if (buf == NULL || ep_comp == NULL || len < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (len > 65535) + len = 65535; + + *ep_comp = NULL; + + while (len != 0) { + uint8_t dlen; + uint8_t dtype; + + dlen = ((const uint8_t *)buf)[0]; + dtype = ((const uint8_t *)buf)[1]; + + if (dlen < 2 || dlen > len) + break; + + if (dlen >= LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE && + dtype == LIBUSB_DT_SS_ENDPOINT_COMPANION) { + struct libusb_ss_endpoint_companion_descriptor *ptr; + + ptr = malloc(sizeof(*ptr)); + if (ptr == NULL) + return (LIBUSB_ERROR_NO_MEM); + + ptr->bLength = LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE; + ptr->bDescriptorType = dtype; + ptr->bMaxBurst = ((const uint8_t *)buf)[2]; + ptr->bmAttributes = ((const uint8_t *)buf)[3]; + ptr->wBytesPerInterval = ((const uint8_t *)buf)[4] | + (((const uint8_t *)buf)[5] << 8); + + *ep_comp = ptr; + + return (0); /* success */ + } + + buf = ((const uint8_t *)buf) + dlen; + len -= dlen; + } + return (LIBUSB_ERROR_IO); +} + +void +libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp) +{ + if (ep_comp == NULL) + return; + + free(ep_comp); +} + +int +libusb_parse_bos_descriptor(const void *buf, int len, + struct libusb_bos_descriptor **bos) +{ + struct libusb_bos_descriptor *ptr; + struct libusb_usb_2_0_device_capability_descriptor *dcap_20; + struct libusb_ss_usb_device_capability_descriptor *ss_cap; + + if (buf == NULL || bos == NULL || len < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (len > 65535) + len = 65535; + + *bos = ptr = NULL; + + while (len != 0) { + uint8_t dlen; + uint8_t dtype; + + dlen = ((const uint8_t *)buf)[0]; + dtype = ((const uint8_t *)buf)[1]; + + if (dlen < 2 || dlen > len) + break; + + if (dlen >= LIBUSB_DT_BOS_SIZE && + dtype == LIBUSB_DT_BOS) { + + ptr = malloc(sizeof(*ptr) + sizeof(*dcap_20) + + sizeof(*ss_cap)); + + if (ptr == NULL) + return (LIBUSB_ERROR_NO_MEM); + + *bos = ptr; + + ptr->bLength = LIBUSB_DT_BOS_SIZE; + ptr->bDescriptorType = dtype; + ptr->wTotalLength = ((const uint8_t *)buf)[2] | + (((const uint8_t *)buf)[3] << 8); + ptr->bNumDeviceCapabilities = ((const uint8_t *)buf)[4]; + ptr->usb_2_0_ext_cap = NULL; + ptr->ss_usb_cap = NULL; + + dcap_20 = (void *)(ptr + 1); + ss_cap = (void *)(dcap_20 + 1); + } + if (dlen >= 3 && + ptr != NULL && + dtype == LIBUSB_DT_DEVICE_CAPABILITY) { + switch (((const uint8_t *)buf)[2]) { + case LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY: + if (ptr->usb_2_0_ext_cap != NULL) + break; + if (dlen < LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE) + break; + + ptr->usb_2_0_ext_cap = dcap_20; + + dcap_20->bLength = LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE; + dcap_20->bDescriptorType = dtype; + dcap_20->bDevCapabilityType = ((const uint8_t *)buf)[2]; + dcap_20->bmAttributes = ((const uint8_t *)buf)[3] | + (((const uint8_t *)buf)[4] << 8) | + (((const uint8_t *)buf)[5] << 16) | + (((const uint8_t *)buf)[6] << 24); + break; + + case LIBUSB_SS_USB_DEVICE_CAPABILITY: + if (ptr->ss_usb_cap != NULL) + break; + if (dlen < LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE) + break; + + ptr->ss_usb_cap = ss_cap; + + ss_cap->bLength = LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE; + ss_cap->bDescriptorType = dtype; + ss_cap->bDevCapabilityType = ((const uint8_t *)buf)[2]; + ss_cap->bmAttributes = ((const uint8_t *)buf)[3]; + ss_cap->wSpeedSupported = ((const uint8_t *)buf)[4] | + (((const uint8_t *)buf)[5] << 8); + ss_cap->bFunctionalitySupport = ((const uint8_t *)buf)[6]; + ss_cap->bU1DevExitLat = ((const uint8_t *)buf)[7]; + ss_cap->wU2DevExitLat = ((const uint8_t *)buf)[8] | + (((const uint8_t *)buf)[9] << 8); + break; + + default: + break; + } + } + + buf = ((const uint8_t *)buf) + dlen; + len -= dlen; + } + if (ptr != NULL) + return (0); /* success */ + + return (LIBUSB_ERROR_IO); +} + +void +libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos) +{ + if (bos == NULL) + return; + + free(bos); +} Modified: stable/8/lib/libusb/libusb20_desc.c ============================================================================== --- stable/8/lib/libusb/libusb20_desc.c Sat Dec 3 13:51:57 2011 (r228222) +++ stable/8/lib/libusb/libusb20_desc.c Sat Dec 3 13:54:54 2011 (r228223) @@ -41,6 +41,10 @@ LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_END LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_INTERFACE_DESC); LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_CONFIG_DESC); LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_CONTROL_SETUP); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_SS_ENDPT_COMP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_USB_20_DEVCAP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_SS_USB_DEVCAP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_BOS_DESCRIPTOR); /*------------------------------------------------------------------------* * libusb20_parse_config_desc Modified: stable/8/lib/libusb/libusb20_desc.h ============================================================================== --- stable/8/lib/libusb/libusb20_desc.h Sat Dec 3 13:51:57 2011 (r228222) +++ stable/8/lib/libusb/libusb20_desc.h Sat Dec 3 13:54:54 2011 (r228223) @@ -264,6 +264,43 @@ LIBUSB20_MAKE_STRUCT(LIBUSB20_CONFIG_DES LIBUSB20_MAKE_STRUCT(LIBUSB20_CONTROL_SETUP); +#define LIBUSB20_SS_ENDPT_COMP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bMaxBurst, ) \ + m(n, UINT8_T, bmAttributes, ) \ + m(n, UINT16_T, wBytesPerInterval, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_SS_ENDPT_COMP_DESC); + +#define LIBUSB20_USB_20_DEVCAP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bDevCapabilityType, ) \ + m(n, UINT32_T, bmAttributes, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_USB_20_DEVCAP_DESC); + +#define LIBUSB20_SS_USB_DEVCAP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bDevCapabilityType, ) \ + m(n, UINT8_T, bmAttributes, ) \ + m(n, UINT16_T, wSpeedSupported, ) \ + m(n, UINT8_T, bFunctionalitySupport, ) \ + m(n, UINT8_T, bU1DevExitLat, ) \ + m(n, UINT16_T, wU2DevExitLat, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_SS_USB_DEVCAP_DESC); + +#define LIBUSB20_BOS_DESCRIPTOR(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT16_T, wTotalLength, ) \ + m(n, UINT8_T, bNumDeviceCapabilities, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_BOS_DESCRIPTOR); + /* standard USB stuff */ /** \ingroup desc @@ -333,6 +370,24 @@ enum libusb20_descriptor_type { /** Hub descriptor */ LIBUSB20_DT_HUB = 0x29, + + /** Binary Object Store, BOS */ + LIBUSB20_DT_BOS = 0x0f, + + /** Device Capability */ + LIBUSB20_DT_DEVICE_CAPABILITY = 0x10, + + /** SuperSpeed endpoint companion */ + LIBUSB20_DT_SS_ENDPOINT_COMPANION = 0x30, +}; + +/** \ingroup desc + * Device capability types as defined by the USB specification. */ +enum libusb20_device_capability_type { + LIBUSB20_WIRELESS_USB_DEVICE_CAPABILITY = 0x1, + LIBUSB20_USB_2_0_EXTENSION_DEVICE_CAPABILITY = 0x2, + LIBUSB20_SS_USB_DEVICE_CAPABILITY = 0x3, + LIBUSB20_CONTAINER_ID_DEVICE_CAPABILITY = 0x4, }; /* Descriptor sizes per descriptor type */ @@ -342,6 +397,10 @@ enum libusb20_descriptor_type { #define LIBUSB20_DT_ENDPOINT_SIZE 7 #define LIBUSB20_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ #define LIBUSB20_DT_HUB_NONVAR_SIZE 7 +#define LIBUSB20_DT_SS_ENDPOINT_COMPANION_SIZE 6 +#define LIBUSB20_DT_BOS_SIZE 5 +#define LIBUSB20_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 +#define LIBUSB20_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB20_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ #define LIBUSB20_ENDPOINT_DIR_MASK 0x80 From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:02:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF6391065672; Sat, 3 Dec 2011 14:02:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4C578FC13; Sat, 3 Dec 2011 14:02:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3E2PVT042256; Sat, 3 Dec 2011 14:02:25 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3E2POa042251; Sat, 3 Dec 2011 14:02:25 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031402.pB3E2POa042251@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228224 - in stable/8/sys/dev/usb: . quirk wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:02:26 -0000 Author: hselasky Date: Sat Dec 3 14:02:25 2011 New Revision: 228224 URL: http://svn.freebsd.org/changeset/base/228224 Log: MFC r227610 and r227781: Add new USB IDs. PR: usb/162712 Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Sat Dec 3 13:54:54 2011 (r228223) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Sat Dec 3 14:02:25 2011 (r228224) @@ -148,10 +148,6 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(AIPTEK, POCKETCAM3M, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), - USB_QUIRK(ALCOR, SDCR_6335, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(ALCOR, SDCR_6362, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ALCOR, UMCR_9361, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, @@ -462,6 +458,7 @@ static struct usb_quirk_entry usb_quirks * Quirks for manufacturers which USB devices does not respond * after issuing non-supported commands: */ + USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sat Dec 3 13:54:54 2011 (r228223) +++ stable/8/sys/dev/usb/usbdevs Sat Dec 3 14:02:25 2011 (r228224) @@ -913,8 +913,10 @@ product ALCATEL OT535 0x02df One Touch /* Alcor Micro, Inc. products */ product ALCOR2 KBD_HUB 0x2802 Kbd Hub +product ALCOR DUMMY 0x0000 Dummy product product ALCOR SDCR_6335 0x6335 SD/MMC Card Reader product ALCOR SDCR_6362 0x6362 SD/MMC Card Reader +product ALCOR SDCR_6366 0x6366 SD/MMC Card Reader product ALCOR TRANSCEND 0x6387 Transcend JetFlash Drive product ALCOR MA_KBD_HUB 0x9213 MacAlly Kbd Hub product ALCOR AU9814 0x9215 AU9814 Hub @@ -2082,6 +2084,7 @@ product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ +product LOGITECH LANW300NU2 0x0166 LAN-W300N/U2 product LOGITECH M2452 0x0203 M2452 keyboard product LOGITECH M4848 0x0301 M4848 mouse product LOGITECH PAGESCAN 0x040f PageScan @@ -2177,6 +2180,7 @@ product MELCO RT2870_1 0x0148 RT2870 product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N +product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Sat Dec 3 13:54:54 2011 (r228223) +++ stable/8/sys/dev/usb/wlan/if_run.c Sat Dec 3 14:02:25 2011 (r228224) @@ -208,12 +208,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, RT2870_1), RUN_DEV(LOGITEC, RT2870_2), RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(LOGITECH, LANW300NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MELCO, WLIUCGNM), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), RUN_DEV(MSI, RT3070_1), From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:03:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E1891065670; Sat, 3 Dec 2011 14:03:54 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DD388FC13; Sat, 3 Dec 2011 14:03:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3E3sqs042329; Sat, 3 Dec 2011 14:03:54 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3E3smd042327; Sat, 3 Dec 2011 14:03:54 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201112031403.pB3E3smd042327@svn.freebsd.org> From: Justin Hibbits Date: Sat, 3 Dec 2011 14:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228225 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:03:54 -0000 Author: jhibbits Date: Sat Dec 3 14:03:53 2011 New Revision: 228225 URL: http://svn.freebsd.org/changeset/base/228225 Log: Add myself to the relevant doc files. Approved by: nwhitehorn (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Dec 3 14:02:25 2011 (r228224) +++ head/share/misc/committers-src.dot Sat Dec 3 14:03:53 2011 (r228225) @@ -159,6 +159,7 @@ jchandra [label="Jayachandran C.\njchand jeff [label="Jeff Roberson\njeff@FreeBSD.org\n2002/02/21"] jh [label="Jaakko Heinonen\njh@FreeBSD.org\n2009/10/02"] jhb [label="John Baldwin\njhb@FreeBSD.org\n1999/08/23"] +jhibbits [label="Justin Hibbits\njhibbits@FreeBSD.org\n2011/11/30"] jilles [label="Jilles Tjoelker\njilles@FreeBSD.org\n2009/05/22"] jinmei [label="JINMEI Tatuya\njinmei@FreeBSD.org\n2007/03/17"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2005/07/06"] @@ -497,6 +498,7 @@ njl -> rpaulo njl -> sepotvin nwhitehorn -> andreast +nwhitehorn -> jhibbits obrien -> benno obrien -> groudier From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:11:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C158F1065670; Sat, 3 Dec 2011 14:11:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A46DD8FC0A; Sat, 3 Dec 2011 14:11:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3EBl8s042616; Sat, 3 Dec 2011 14:11:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3EBlRp042613; Sat, 3 Dec 2011 14:11:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031411.pB3EBlRp042613@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228226 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:11:48 -0000 Author: hselasky Date: Sat Dec 3 14:11:47 2011 New Revision: 228226 URL: http://svn.freebsd.org/changeset/base/228226 Log: MFC r227108, r227383 and r227463: Add support for modem control lines and GPIO pins to USLCOM driver. PR: usb/162307 Modified: stable/8/sys/dev/usb/serial/uslcom.c stable/8/sys/dev/usb/usb_ioctl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/serial/uslcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uslcom.c Sat Dec 3 14:03:53 2011 (r228225) +++ stable/8/sys/dev/usb/serial/uslcom.c Sat Dec 3 14:11:47 2011 (r228226) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "usbdevs.h" #define USB_DEBUG_VAR uslcom_debug @@ -63,49 +64,72 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb #define USLCOM_SET_DATA_BITS(x) ((x) << 8) +/* Request types */ #define USLCOM_WRITE 0x41 #define USLCOM_READ 0xc1 +/* Request codes */ #define USLCOM_UART 0x00 #define USLCOM_BAUD_RATE 0x01 #define USLCOM_DATA 0x03 #define USLCOM_BREAK 0x05 #define USLCOM_CTRL 0x07 +#define USLCOM_RCTRL 0x08 +#define USLCOM_SET_FLOWCTRL 0x13 +#define USLCOM_VENDOR_SPECIFIC 0xff +/* USLCOM_UART values */ #define USLCOM_UART_DISABLE 0x00 #define USLCOM_UART_ENABLE 0x01 +/* USLCOM_CTRL/USLCOM_RCTRL values */ #define USLCOM_CTRL_DTR_ON 0x0001 #define USLCOM_CTRL_DTR_SET 0x0100 #define USLCOM_CTRL_RTS_ON 0x0002 #define USLCOM_CTRL_RTS_SET 0x0200 #define USLCOM_CTRL_CTS 0x0010 #define USLCOM_CTRL_DSR 0x0020 +#define USLCOM_CTRL_RI 0x0040 #define USLCOM_CTRL_DCD 0x0080 +/* USLCOM_BAUD_RATE values */ #define USLCOM_BAUD_REF 0x384000 +/* USLCOM_DATA values */ #define USLCOM_STOP_BITS_1 0x00 #define USLCOM_STOP_BITS_2 0x02 - #define USLCOM_PARITY_NONE 0x00 #define USLCOM_PARITY_ODD 0x10 #define USLCOM_PARITY_EVEN 0x20 -#define USLCOM_PORT_NO 0xFFFF /* XXX think this should be 0 --hps */ +#define USLCOM_PORT_NO 0x0000 +/* USLCOM_BREAK values */ #define USLCOM_BREAK_OFF 0x00 #define USLCOM_BREAK_ON 0x01 +/* USLCOM_SET_FLOWCTRL values - 1st word */ +#define USLCOM_FLOW_DTR_ON 0x00000001 /* DTR static active */ +#define USLCOM_FLOW_CTS_HS 0x00000008 /* CTS handshake */ +/* USLCOM_SET_FLOWCTRL values - 2nd word */ +#define USLCOM_FLOW_RTS_ON 0x00000040 /* RTS static active */ +#define USLCOM_FLOW_RTS_HS 0x00000080 /* RTS handshake */ + +/* USLCOM_VENDOR_SPECIFIC values */ +#define USLCOM_WRITE_LATCH 0x37E1 +#define USLCOM_READ_LATCH 0x00C2 + enum { USLCOM_BULK_DT_WR, USLCOM_BULK_DT_RD, + USLCOM_CTRL_DT_RD, USLCOM_N_TRANSFER, }; struct uslcom_softc { struct ucom_super_softc sc_super_ucom; struct ucom_softc sc_ucom; + struct usb_callout sc_watchdog; struct usb_xfer *sc_xfer[USLCOM_N_TRANSFER]; struct usb_device *sc_udev; @@ -121,12 +145,15 @@ static device_detach_t uslcom_detach; static usb_callback_t uslcom_write_callback; static usb_callback_t uslcom_read_callback; +static usb_callback_t uslcom_control_callback; static void uslcom_open(struct ucom_softc *); static void uslcom_close(struct ucom_softc *); static void uslcom_set_dtr(struct ucom_softc *, uint8_t); static void uslcom_set_rts(struct ucom_softc *, uint8_t); static void uslcom_set_break(struct ucom_softc *, uint8_t); +static int uslcom_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); static int uslcom_pre_param(struct ucom_softc *, struct termios *); static void uslcom_param(struct ucom_softc *, struct termios *); static void uslcom_get_status(struct ucom_softc *, uint8_t *, uint8_t *); @@ -143,7 +170,7 @@ static const struct usb_config uslcom_co .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = USLCOM_BULK_BUF_SIZE, - .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .flags = {.pipe_bof = 1,}, .callback = &uslcom_write_callback, }, @@ -155,6 +182,15 @@ static const struct usb_config uslcom_co .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uslcom_read_callback, }, + [USLCOM_CTRL_DT_RD] = { + .type = UE_CONTROL, + .endpoint = 0x00, + .direction = UE_DIR_ANY, + .bufsize = sizeof(struct usb_device_request) + 8, + .flags = {.pipe_bof = 1,}, + .callback = &uslcom_control_callback, + .timeout = 1000, /* 1 second timeout */ + }, }; static struct ucom_callback uslcom_callback = { @@ -164,6 +200,7 @@ static struct ucom_callback uslcom_callb .ucom_cfg_set_dtr = &uslcom_set_dtr, .ucom_cfg_set_rts = &uslcom_set_rts, .ucom_cfg_set_break = &uslcom_set_break, + .ucom_ioctl = &uslcom_ioctl, .ucom_cfg_param = &uslcom_param, .ucom_pre_param = &uslcom_pre_param, .ucom_start_read = &uslcom_start_read, @@ -280,6 +317,19 @@ MODULE_DEPEND(uslcom, ucom, 1, 1, 1); MODULE_DEPEND(uslcom, usb, 1, 1, 1); MODULE_VERSION(uslcom, 1); +static void +uslcom_watchdog(void *arg) +{ + struct uslcom_softc *sc = arg; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + usbd_transfer_start(sc->sc_xfer[USLCOM_CTRL_DT_RD]); + + usb_callout_reset(&sc->sc_watchdog, + hz / 4, &uslcom_watchdog, sc); +} + static int uslcom_probe(device_t dev) { @@ -310,6 +360,7 @@ uslcom_attach(device_t dev) device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uslcom", NULL, MTX_DEF); + usb_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); sc->sc_udev = uaa->device; @@ -350,6 +401,8 @@ uslcom_detach(device_t dev) ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, USLCOM_N_TRANSFER); + + usb_callout_drain(&sc->sc_watchdog); mtx_destroy(&sc->sc_mtx); return (0); @@ -371,6 +424,9 @@ uslcom_open(struct ucom_softc *ucom) &req, NULL, 0, 1000)) { DPRINTF("UART enable failed (ignored)\n"); } + + /* start polling status */ + uslcom_watchdog(sc); } static void @@ -379,13 +435,16 @@ uslcom_close(struct ucom_softc *ucom) struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; + /* stop polling status */ + usb_callout_stop(&sc->sc_watchdog); + req.bmRequestType = USLCOM_WRITE; req.bRequest = USLCOM_UART; USETW(req.wValue, USLCOM_UART_DISABLE); USETW(req.wIndex, USLCOM_PORT_NO); USETW(req.wLength, 0); - if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000)) { DPRINTF("UART disable failed (ignored)\n"); } @@ -452,6 +511,7 @@ uslcom_param(struct ucom_softc *ucom, st { struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; + uint32_t flowctrl[4]; uint16_t data; DPRINTF("\n"); @@ -503,7 +563,28 @@ uslcom_param(struct ucom_softc *ucom, st &req, NULL, 0, 1000)) { DPRINTF("Set format failed (ignored)\n"); } - return; + + if (t->c_cflag & CRTSCTS) { + flowctrl[0] = htole32(USLCOM_FLOW_DTR_ON | USLCOM_FLOW_CTS_HS); + flowctrl[1] = htole32(USLCOM_FLOW_RTS_HS); + flowctrl[2] = 0; + flowctrl[3] = 0; + } else { + flowctrl[0] = htole32(USLCOM_FLOW_DTR_ON); + flowctrl[1] = htole32(USLCOM_FLOW_RTS_ON); + flowctrl[2] = 0; + flowctrl[3] = 0; + } + req.bmRequestType = USLCOM_WRITE; + req.bRequest = USLCOM_SET_FLOWCTRL; + USETW(req.wValue, 0); + USETW(req.wIndex, USLCOM_PORT_NO); + USETW(req.wLength, sizeof(flowctrl)); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, flowctrl, 0, 1000)) { + DPRINTF("Set flowcontrol failed (ignored)\n"); + } } static void @@ -536,6 +617,55 @@ uslcom_set_break(struct ucom_softc *ucom } } +static int +uslcom_ioctl(struct ucom_softc *ucom, uint32_t cmd, caddr_t data, + int flag, struct thread *td) +{ + struct uslcom_softc *sc = ucom->sc_parent; + struct usb_device_request req; + int error = 0; + uint8_t latch; + + DPRINTF("cmd=0x%08x\n", cmd); + + switch (cmd) { + case USB_GET_GPIO: + req.bmRequestType = USLCOM_READ; + req.bRequest = USLCOM_VENDOR_SPECIFIC; + USETW(req.wValue, USLCOM_READ_LATCH); + USETW(req.wIndex, 0); + USETW(req.wLength, sizeof(latch)); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, &latch, 0, 1000)) { + DPRINTF("Get LATCH failed\n"); + error = EIO; + } + *(int *)data = latch; + break; + + case USB_SET_GPIO: + req.bmRequestType = USLCOM_WRITE; + req.bRequest = USLCOM_VENDOR_SPECIFIC; + USETW(req.wValue, USLCOM_WRITE_LATCH); + USETW(req.wIndex, (*(int *)data)); + USETW(req.wLength, 0); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, NULL, 0, 1000)) { + DPRINTF("Set LATCH failed\n"); + error = EIO; + } + break; + + default: + DPRINTF("Unknown IOCTL\n"); + error = ENOIOCTL; + break; + } + return (error); +} + static void uslcom_write_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -599,6 +729,59 @@ tr_setup: } static void +uslcom_control_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uslcom_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + struct usb_device_request req; + uint8_t msr = 0; + uint8_t buf; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + pc = usbd_xfer_get_frame(xfer, 1); + usbd_copy_out(pc, 0, &buf, sizeof(buf)); + if (buf & USLCOM_CTRL_CTS) + msr |= SER_CTS; + if (buf & USLCOM_CTRL_DSR) + msr |= SER_DSR; + if (buf & USLCOM_CTRL_RI) + msr |= SER_RI; + if (buf & USLCOM_CTRL_DCD) + msr |= SER_DCD; + + if (msr != sc->sc_msr) { + DPRINTF("status change msr=0x%02x " + "(was 0x%02x)\n", msr, sc->sc_msr); + sc->sc_msr = msr; + ucom_status_change(&sc->sc_ucom); + } + break; + + case USB_ST_SETUP: + req.bmRequestType = USLCOM_READ; + req.bRequest = USLCOM_RCTRL; + USETW(req.wValue, 0); + USETW(req.wIndex, USLCOM_PORT_NO); + USETW(req.wLength, sizeof(buf)); + + usbd_xfer_set_frames(xfer, 2); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 1, sizeof(buf)); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_transfer_submit(xfer); + break; + + default: /* error */ + if (error != USB_ERR_CANCELLED) + DPRINTF("error=%s\n", usbd_errstr(error)); + break; + } +} + +static void uslcom_start_read(struct ucom_softc *ucom) { struct uslcom_softc *sc = ucom->sc_parent; Modified: stable/8/sys/dev/usb/usb_ioctl.h ============================================================================== --- stable/8/sys/dev/usb/usb_ioctl.h Sat Dec 3 14:03:53 2011 (r228225) +++ stable/8/sys/dev/usb/usb_ioctl.h Sat Dec 3 14:11:47 2011 (r228226) @@ -289,6 +289,10 @@ struct usb_gen_quirk { #define USB_GET_CM_OVER_DATA _IOR ('U', 180, int) #define USB_SET_CM_OVER_DATA _IOW ('U', 181, int) +/* GPIO control */ +#define USB_GET_GPIO _IOR ('U', 182, int) +#define USB_SET_GPIO _IOW ('U', 183, int) + /* USB file system interface */ #define USB_FS_START _IOW ('U', 192, struct usb_fs_start) #define USB_FS_STOP _IOW ('U', 193, struct usb_fs_stop) From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:29:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97EAC106564A; Sat, 3 Dec 2011 14:29:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B078FC08; Sat, 3 Dec 2011 14:29:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3ETFXc043188; Sat, 3 Dec 2011 14:29:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3ETFae043183; Sat, 3 Dec 2011 14:29:15 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031429.pB3ETFae043183@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228227 - in stable/8/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:29:15 -0000 Author: hselasky Date: Sat Dec 3 14:29:14 2011 New Revision: 228227 URL: http://svn.freebsd.org/changeset/base/228227 Log: MFC r227541, r227654, r226803, r227396 and r227401: Fix for XHCI attach failure and some USB 3.0 descriptor corrections. Modified: stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/controller/xhcireg.h stable/8/sys/dev/usb/usb.h stable/8/sys/dev/usb/usb_hub.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Sat Dec 3 14:11:47 2011 (r228226) +++ stable/8/sys/dev/usb/controller/xhci.c Sat Dec 3 14:29:14 2011 (r228227) @@ -292,7 +292,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBCMD) & (XHCI_CMD_HCRST | XHCI_STS_CNR); if (!temp) @@ -453,7 +453,7 @@ xhci_start_controller(struct xhci_softc XHCI_CMD_INTE | XHCI_CMD_HSEE); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; if (!temp) break; @@ -487,7 +487,7 @@ xhci_halt_controller(struct xhci_softc * XWRITE4(sc, oper, XHCI_USBCMD, 0); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; if (temp) break; @@ -1110,7 +1110,7 @@ xhci_cmd_nop(struct xhci_softc *sc) trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } #endif @@ -1127,7 +1127,7 @@ xhci_cmd_enable_slot(struct xhci_softc * trb.dwTrb2 = 0; trb.dwTrb3 = htole32(XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_ENABLE_SLOT)); - err = xhci_do_command(sc, &trb, 50 /* ms */); + err = xhci_do_command(sc, &trb, 100 /* ms */); if (err) goto done; @@ -1154,7 +1154,7 @@ xhci_cmd_disable_slot(struct xhci_softc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1310,7 +1310,7 @@ xhci_cmd_configure_ep(struct xhci_softc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1328,7 +1328,7 @@ xhci_cmd_evaluate_ctx(struct xhci_softc XHCI_TRB_3_SLOT_SET(slot_id); trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1351,7 +1351,7 @@ xhci_cmd_reset_ep(struct xhci_softc *sc, trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1373,7 +1373,7 @@ xhci_cmd_set_tr_dequeue_ptr(struct xhci_ XHCI_TRB_3_EP_SET(ep_id); trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1396,7 +1396,7 @@ xhci_cmd_stop_ep(struct xhci_softc *sc, trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1414,7 +1414,7 @@ xhci_cmd_reset_dev(struct xhci_softc *sc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } /*------------------------------------------------------------------------* @@ -2831,7 +2831,7 @@ struct xhci_bos_desc xhci_bosd = { .bLength = sizeof(xhci_bosd.usb2extd), .bDescriptorType = 1, .bDevCapabilityType = 2, - .bmAttributes = 2, + .bmAttributes[0] = 2, }, .usbdcd = { .bLength = sizeof(xhci_bosd.usbdcd), @@ -2841,7 +2841,8 @@ struct xhci_bos_desc xhci_bosd = { HSETW(.wSpeedsSupported, 0x000C), .bFunctionalitySupport = 8, .bU1DevExitLat = 255, /* dummy - not used */ - .bU2DevExitLat = 255, /* dummy - not used */ + .wU2DevExitLat[0] = 0x00, + .wU2DevExitLat[1] = 0x08, }, .cidd = { .bLength = sizeof(xhci_bosd.cidd), @@ -3048,7 +3049,9 @@ xhci_roothub_exec(struct usb_device *ude } port = XHCI_PORTSC(index); - v = XREAD4(sc, oper, port) & ~XHCI_PS_CLEAR; + v = XREAD4(sc, oper, port); + i = XHCI_PS_PLS_GET(v); + v &= ~XHCI_PS_CLEAR; switch (value) { case UHF_C_BH_PORT_RESET: @@ -3082,6 +3085,17 @@ xhci_roothub_exec(struct usb_device *ude XWRITE4(sc, oper, port, v & ~XHCI_PS_PIC_SET(3)); break; case UHF_PORT_SUSPEND: + + /* U3 -> U15 */ + if (i == 3) { + XWRITE4(sc, oper, port, v | + XHCI_PS_PLS_SET(0xF) | XHCI_PS_LWS); + } + + /* wait 20ms for resume sequence to complete */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 50); + + /* U0 */ XWRITE4(sc, oper, port, v | XHCI_PS_PLS_SET(0) | XHCI_PS_LWS); break; Modified: stable/8/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhcireg.h Sat Dec 3 14:11:47 2011 (r228226) +++ stable/8/sys/dev/usb/controller/xhcireg.h Sat Dec 3 14:29:14 2011 (r228227) @@ -133,7 +133,7 @@ #define XHCI_PS_WOE 0x08000000 /* RW - wake on over-current enable */ #define XHCI_PS_DR 0x40000000 /* RO - device removable */ #define XHCI_PS_WPR 0x80000000U /* RW - warm port reset */ -#define XHCI_PS_CLEAR 0x80FF00F7U /* command bits */ +#define XHCI_PS_CLEAR 0x80FF01FFU /* command bits */ #define XHCI_PORTPMSC(n) (0x3F4 + (0x10 * (n))) /* XHCI status and control */ #define XHCI_PM3_U1TO_GET(x) (((x) >> 0) & 0xFF) /* RW - U1 timeout */ Modified: stable/8/sys/dev/usb/usb.h ============================================================================== --- stable/8/sys/dev/usb/usb.h Sat Dec 3 14:11:47 2011 (r228226) +++ stable/8/sys/dev/usb/usb.h Sat Dec 3 14:29:14 2011 (r228227) @@ -323,7 +323,7 @@ struct usb_devcap_usb2ext_descriptor { uByte bLength; uByte bDescriptorType; uByte bDevCapabilityType; - uByte bmAttributes; + uDWord bmAttributes; #define USB_V2EXT_LPM 0x02 } __packed; typedef struct usb_devcap_usb2ext_descriptor usb_devcap_usb2ext_descriptor_t; @@ -336,7 +336,7 @@ struct usb_devcap_ss_descriptor { uWord wSpeedsSupported; uByte bFunctionalitySupport; uByte bU1DevExitLat; - uByte bU2DevExitLat; + uWord wU2DevExitLat; } __packed; typedef struct usb_devcap_ss_descriptor usb_devcap_ss_descriptor_t; @@ -686,6 +686,7 @@ struct usb_port_status { #define UPS_PORT_LS_HOT_RST 0x09 #define UPS_PORT_LS_COMP_MODE 0x0A #define UPS_PORT_LS_LOOPBACK 0x0B +#define UPS_PORT_LS_RESUME 0x0F #define UPS_PORT_POWER 0x0100 #define UPS_LOW_SPEED 0x0200 #define UPS_HIGH_SPEED 0x0400 Modified: stable/8/sys/dev/usb/usb_hub.c ============================================================================== --- stable/8/sys/dev/usb/usb_hub.c Sat Dec 3 14:11:47 2011 (r228226) +++ stable/8/sys/dev/usb/usb_hub.c Sat Dec 3 14:29:14 2011 (r228227) @@ -611,6 +611,7 @@ uhub_suspend_resume_port(struct uhub_sof switch (UPS_PORT_LINK_STATE_GET(sc->sc_st.port_status)) { case UPS_PORT_LS_U0: case UPS_PORT_LS_U1: + case UPS_PORT_LS_RESUME: is_suspend = 0; break; default: From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:32:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 247C8106564A; Sat, 3 Dec 2011 14:32:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 135F78FC13; Sat, 3 Dec 2011 14:32:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3EWASi043327; Sat, 3 Dec 2011 14:32:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3EWAfR043325; Sat, 3 Dec 2011 14:32:10 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031432.pB3EWAfR043325@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228228 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:32:11 -0000 Author: hselasky Date: Sat Dec 3 14:32:10 2011 New Revision: 228228 URL: http://svn.freebsd.org/changeset/base/228228 Log: MFC r228195: Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list(). Modified: stable/8/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Sat Dec 3 14:29:14 2011 (r228227) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Sat Dec 3 14:32:10 2011 (r228228) @@ -1053,10 +1053,10 @@ urtw_init_locked(void *arg) if (!(sc->sc_flags & URTW_INIT_ONCE)) { ret = urtw_alloc_rx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; ret = urtw_alloc_tx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; sc->sc_flags |= URTW_INIT_ONCE; } From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:38:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1324B1065670; Sat, 3 Dec 2011 14:38:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3D758FC08; Sat, 3 Dec 2011 14:38:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3Ecsfj043595; Sat, 3 Dec 2011 14:38:54 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3Ecsm6043567; Sat, 3 Dec 2011 14:38:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031438.pB3Ecsm6043567@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228229 - in stable/8/sys/dev/usb: . controller net serial storage template wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:38:55 -0000 Author: hselasky Date: Sat Dec 3 14:38:54 2011 New Revision: 228229 URL: http://svn.freebsd.org/changeset/base/228229 Log: MFC r227461: Style change. - Make it easier to port the USB code to other platforms by only using one set of memory functions for clearing and copying memory. None of the memory copies are overlapping. This means using bcopy() is not required. - Fix a compile warning when USB_HAVE_BUSDMA=0 - Add missing semicolon in avr32dci. - Update some comments. Modified: stable/8/sys/dev/usb/controller/at91dci.c stable/8/sys/dev/usb/controller/avr32dci.c stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ohci.c stable/8/sys/dev/usb/controller/uhci.c stable/8/sys/dev/usb/net/if_kue.c stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/serial/ufoma.c stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/serial/umodem.c stable/8/sys/dev/usb/serial/uplcom.c stable/8/sys/dev/usb/serial/uvisor.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/storage/urio.c stable/8/sys/dev/usb/storage/ustorage_fs.c stable/8/sys/dev/usb/template/usb_template.c stable/8/sys/dev/usb/usb_busdma.c stable/8/sys/dev/usb/usb_compat_linux.c stable/8/sys/dev/usb/usb_dev.c stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_msctest.c stable/8/sys/dev/usb/usb_request.c stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/dev/usb/wlan/if_uath.c stable/8/sys/dev/usb/wlan/if_upgt.c stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/controller/at91dci.c ============================================================================== --- stable/8/sys/dev/usb/controller/at91dci.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/controller/at91dci.c Sat Dec 3 14:38:54 2011 (r228229) @@ -2123,7 +2123,7 @@ tr_handle_get_port_status: if (sc->sc_flags.status_vbus && sc->sc_flags.status_bus_reset) { /* reset endpoint flags */ - bzero(sc->sc_ep_flags, sizeof(sc->sc_ep_flags)); + memset(sc->sc_ep_flags, 0, sizeof(sc->sc_ep_flags)); } } if (sc->sc_flags.change_suspend) { Modified: stable/8/sys/dev/usb/controller/avr32dci.c ============================================================================== --- stable/8/sys/dev/usb/controller/avr32dci.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/controller/avr32dci.c Sat Dec 3 14:38:54 2011 (r228229) @@ -415,12 +415,11 @@ repeat: buf_res.length = count; } /* receive data */ - bcopy(sc->physdata + + memcpy(buf_res.buffer, sc->physdata + (AVR32_EPTSTA_CURRENT_BANK(temp) << td->bank_shift) + - (td->ep_no << 16) + (td->offset % td->max_packet_size), - buf_res.buffer, buf_res.length) + (td->ep_no << 16) + (td->offset % td->max_packet_size), buf_res.length); /* update counters */ - count -= buf_res.length; + count -= buf_res.length; td->offset += buf_res.length; td->remainder -= buf_res.length; } @@ -491,12 +490,12 @@ repeat: buf_res.length = count; } /* transmit data */ - bcopy(buf_res.buffer, sc->physdata + + memcpy(sc->physdata + (AVR32_EPTSTA_CURRENT_BANK(temp) << td->bank_shift) + (td->ep_no << 16) + (td->offset % td->max_packet_size), - buf_res.length) + buf_res.buffer, buf_res.length); /* update counters */ - count -= buf_res.length; + count -= buf_res.length; td->offset += buf_res.length; td->remainder -= buf_res.length; } Modified: stable/8/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/controller/ehci.c Sat Dec 3 14:38:54 2011 (r228229) @@ -3369,7 +3369,7 @@ ehci_roothub_exec(struct usb_device *ude break; case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): DPRINTFN(9, "get port status i=%d\n", Modified: stable/8/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/controller/ohci.c Sat Dec 3 14:38:54 2011 (r228229) @@ -2347,7 +2347,7 @@ ohci_roothub_exec(struct usb_device *ude case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): DPRINTFN(9, "get port status i=%d\n", Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/controller/uhci.c Sat Dec 3 14:38:54 2011 (r228229) @@ -2702,7 +2702,7 @@ uhci_roothub_exec(struct usb_device *ude break; case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): if (index == 1) Modified: stable/8/sys/dev/usb/net/if_kue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_kue.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/net/if_kue.c Sat Dec 3 14:38:54 2011 (r228229) @@ -380,8 +380,9 @@ kue_setmulti(struct usb_ether *ue) */ if (i == KUE_MCFILTCNT(sc)) break; - bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - KUE_MCFILT(sc, i), ETHER_ADDR_LEN); + memcpy(KUE_MCFILT(sc, i), + LLADDR((struct sockaddr_dl *)ifma->ifma_addr), + ETHER_ADDR_LEN); i++; } if_maddr_runlock(ifp); Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/net/uhso.c Sat Dec 3 14:38:54 2011 (r228229) @@ -1153,7 +1153,7 @@ uhso_mux_read_callback(struct usb_xfer * /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - bzero(&req, sizeof(struct usb_device_request)); + memset(&req, 0, sizeof(struct usb_device_request)); req.bmRequestType = UT_READ_CLASS_INTERFACE; req.bRequest = UCDC_GET_ENCAPSULATED_RESPONSE; USETW(req.wValue, 0); @@ -1206,7 +1206,7 @@ uhso_mux_write_callback(struct usb_xfer usbd_get_page(pc, 0, &res); - bzero(&req, sizeof(struct usb_device_request)); + memset(&req, 0, sizeof(struct usb_device_request)); req.bmRequestType = UT_WRITE_CLASS_INTERFACE; req.bRequest = UCDC_SEND_ENCAPSULATED_COMMAND; USETW(req.wValue, 0); @@ -1731,7 +1731,7 @@ uhso_if_rxflush(void *arg) * copy the IP-packet into it. */ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - bcopy(mtod(m0, uint8_t *), mtod(m, uint8_t *), iplen); + memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen); m->m_pkthdr.len = m->m_len = iplen; /* Adjust the size of the original mbuf */ Modified: stable/8/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/8/sys/dev/usb/serial/ufoma.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/serial/ufoma.c Sat Dec 3 14:38:54 2011 (r228229) @@ -438,7 +438,7 @@ ufoma_attach(device_t dev) goto detach; } sc->sc_modetable[0] = (elements + 1); - bcopy(mad->bMode, &sc->sc_modetable[1], elements); + memcpy(&sc->sc_modetable[1], mad->bMode, elements); sc->sc_currentmode = UMCPC_ACM_MODE_UNLINKED; sc->sc_modetoactivate = mad->bMode[0]; @@ -968,7 +968,7 @@ ufoma_cfg_param(struct ucom_softc *ucom, } DPRINTF("\n"); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/serial/uftdi.c Sat Dec 3 14:38:54 2011 (r228229) @@ -560,7 +560,7 @@ static int uftdi_set_parm_soft(struct termios *t, struct uftdi_param_config *cfg, uint8_t type) { - bzero(cfg, sizeof(*cfg)); + memset(cfg, 0, sizeof(*cfg)); switch (type) { case UFTDI_TYPE_SIO: Modified: stable/8/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/8/sys/dev/usb/serial/umodem.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/serial/umodem.c Sat Dec 3 14:38:54 2011 (r228229) @@ -536,7 +536,7 @@ umodem_cfg_param(struct ucom_softc *ucom DPRINTF("sc=%p\n", sc); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/8/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uplcom.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/serial/uplcom.c Sat Dec 3 14:38:54 2011 (r228229) @@ -659,7 +659,7 @@ uplcom_cfg_param(struct ucom_softc *ucom DPRINTF("sc = %p\n", sc); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/8/sys/dev/usb/serial/uvisor.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvisor.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/serial/uvisor.c Sat Dec 3 14:38:54 2011 (r228229) @@ -311,8 +311,9 @@ uvisor_attach(device_t dev) int error; DPRINTF("sc=%p\n", sc); - bcopy(uvisor_config, uvisor_config_copy, + memcpy(uvisor_config_copy, uvisor_config, sizeof(uvisor_config_copy)); + device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uvisor", NULL, MTX_DEF); Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/storage/umass.c Sat Dec 3 14:38:54 2011 (r228229) @@ -891,7 +891,7 @@ umass_attach(device_t dev) int32_t err; /* - * NOTE: the softc struct is bzero-ed in device_set_driver. + * NOTE: the softc struct is cleared in device_set_driver. * We can safely call umass_detach without specifically * initializing the struct. */ @@ -1305,11 +1305,13 @@ umass_t_bbb_command_callback(struct usb_ } sc->cbw.bCDBLength = sc->sc_transfer.cmd_len; - bcopy(sc->sc_transfer.cmd_data, sc->cbw.CBWCDB, + memcpy(sc->cbw.CBWCDB, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len); - bzero(sc->sc_transfer.cmd_data + sc->sc_transfer.cmd_len, - sizeof(sc->cbw.CBWCDB) - sc->sc_transfer.cmd_len); + memset(sc->sc_transfer.cmd_data + + sc->sc_transfer.cmd_len, 0, + sizeof(sc->cbw.CBWCDB) - + sc->sc_transfer.cmd_len); DIF(UDMASS_BBB, umass_bbb_dump_cbw(sc, &sc->cbw)); @@ -1480,9 +1482,9 @@ umass_t_bbb_status_callback(struct usb_x /* Zero missing parts of the CSW: */ - if (actlen < sizeof(sc->csw)) { - bzero(&sc->csw, sizeof(sc->csw)); - } + if (actlen < sizeof(sc->csw)) + memset(&sc->csw, 0, sizeof(sc->csw)); + pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &sc->csw, actlen); @@ -2752,7 +2754,7 @@ umass_scsi_transform(struct umass_softc if (sc->sc_quirks & NO_TEST_UNIT_READY) { DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); - bzero(sc->sc_transfer.cmd_data, cmd_len); + memset(sc->sc_transfer.cmd_data, 0, cmd_len); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; return (1); @@ -2765,14 +2767,14 @@ umass_scsi_transform(struct umass_softc * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; return (1); } break; } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); } @@ -2807,10 +2809,11 @@ umass_rbc_transform(struct umass_softc * case REQUEST_SENSE: case PREVENT_ALLOW: - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); if ((sc->sc_quirks & RBC_PAD_TO_12) && (cmd_len < 12)) { - bzero(sc->sc_transfer.cmd_data + cmd_len, 12 - cmd_len); + memset(sc->sc_transfer.cmd_data + cmd_len, + 0, 12 - cmd_len); cmd_len = 12; } sc->sc_transfer.cmd_len = cmd_len; @@ -2838,7 +2841,7 @@ umass_ufi_transform(struct umass_softc * sc->sc_transfer.cmd_len = UFI_COMMAND_LENGTH; /* Zero the command data */ - bzero(sc->sc_transfer.cmd_data, UFI_COMMAND_LENGTH); + memset(sc->sc_transfer.cmd_data, 0, UFI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* @@ -2895,7 +2898,7 @@ umass_ufi_transform(struct umass_softc * return (0); /* failure */ } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); /* success */ } @@ -2916,7 +2919,7 @@ umass_atapi_transform(struct umass_softc sc->sc_transfer.cmd_len = ATAPI_COMMAND_LENGTH; /* Zero the command data */ - bzero(sc->sc_transfer.cmd_data, ATAPI_COMMAND_LENGTH); + memset(sc->sc_transfer.cmd_data, 0, ATAPI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* @@ -2930,7 +2933,7 @@ umass_atapi_transform(struct umass_softc * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; return (1); @@ -2991,7 +2994,7 @@ umass_atapi_transform(struct umass_softc break; } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); /* success */ } Modified: stable/8/sys/dev/usb/storage/urio.c ============================================================================== --- stable/8/sys/dev/usb/storage/urio.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/storage/urio.c Sat Dec 3 14:38:54 2011 (r228229) @@ -440,7 +440,7 @@ urio_ioctl(struct usb_fifo *fifo, u_long error = EPERM; goto done; } - bzero(&ur, sizeof(ur)); + memset(&ur, 0, sizeof(ur)); rio_cmd = addr; ur.ucr_request.bmRequestType = rio_cmd->requesttype | UT_READ_VENDOR_DEVICE; @@ -451,7 +451,7 @@ urio_ioctl(struct usb_fifo *fifo, u_long error = EPERM; goto done; } - bzero(&ur, sizeof(ur)); + memset(&ur, 0, sizeof(ur)); rio_cmd = addr; ur.ucr_request.bmRequestType = rio_cmd->requesttype | UT_WRITE_VENDOR_DEVICE; Modified: stable/8/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- stable/8/sys/dev/usb/storage/ustorage_fs.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/storage/ustorage_fs.c Sat Dec 3 14:38:54 2011 (r228229) @@ -355,7 +355,7 @@ ustorage_fs_attach(device_t dev) int unit; /* - * NOTE: the softc struct is bzero-ed in device_set_driver. + * NOTE: the softc struct is cleared in device_set_driver. * We can safely call ustorage_fs_detach without specifically * initializing the struct. */ @@ -371,7 +371,9 @@ ustorage_fs_attach(device_t dev) * further */ ustorage_fs_ramdisk = - malloc(USTORAGE_FS_RAM_SECT << 9, M_USB, M_ZERO | M_WAITOK); + malloc(USTORAGE_FS_RAM_SECT << 9, M_USB, + M_ZERO | M_WAITOK); + if (ustorage_fs_ramdisk == NULL) { return (ENOMEM); } Modified: stable/8/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/8/sys/dev/usb/template/usb_template.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/template/usb_template.c Sat Dec 3 14:38:54 2011 (r228229) @@ -913,7 +913,7 @@ usb_hw_ep_resolve(struct usb_device *ude } ues = udev->bus->scratch[0].hw_ep_scratch; - bzero(ues, sizeof(*ues)); + memset(ues, 0, sizeof(*ues)); ues->ep_max = ues->ep; ues->cd = (void *)desc; @@ -1240,7 +1240,7 @@ usb_temp_setup(struct usb_device *udev, } uts = udev->bus->scratch[0].temp_setup; - bzero(uts, sizeof(*uts)); + memset(uts, 0, sizeof(*uts)); uts->usb_speed = udev->speed; uts->self_powered = udev->flags.self_powered; Modified: stable/8/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/8/sys/dev/usb/usb_busdma.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_busdma.c Sat Dec 3 14:38:54 2011 (r228229) @@ -80,9 +80,9 @@ void usbd_get_page(struct usb_page_cache *pc, usb_frlength_t offset, struct usb_page_search *res) { +#if USB_HAVE_BUSDMA struct usb_page *page; -#if USB_HAVE_BUSDMA if (pc->page_start) { /* Case 1 - something has been loaded into DMA */ @@ -145,7 +145,7 @@ usbd_copy_in(struct usb_page_cache *cach if (buf_res.length > len) { buf_res.length = len; } - bcopy(ptr, buf_res.buffer, buf_res.length); + memcpy(buf_res.buffer, ptr, buf_res.length); offset += buf_res.length; len -= buf_res.length; @@ -267,7 +267,7 @@ usbd_copy_out(struct usb_page_cache *cac if (res.length > len) { res.length = len; } - bcopy(res.buffer, ptr, res.length); + memcpy(ptr, res.buffer, res.length); offset += res.length; len -= res.length; @@ -325,7 +325,7 @@ usbd_frame_zero(struct usb_page_cache *c if (res.length > len) { res.length = len; } - bzero(res.buffer, res.length); + memset(res.buffer, 0, res.length); offset += res.length; len -= res.length; @@ -560,7 +560,7 @@ usb_pc_alloc_mem(struct usb_page_cache * bus_dmamem_free(utag->tag, ptr, map); goto error; } - bzero(ptr, size); + memset(ptr, 0, size); usb_pc_cpu_flush(pc); @@ -797,7 +797,7 @@ usb_dma_tag_setup(struct usb_dma_parent_ struct mtx *mtx, usb_dma_callback_t *func, uint8_t ndmabits, uint8_t nudt) { - bzero(udpt, sizeof(*udpt)); + memset(udpt, 0, sizeof(*udpt)); /* sanity checking */ if ((nudt == 0) || @@ -818,7 +818,7 @@ usb_dma_tag_setup(struct usb_dma_parent_ udpt->dma_bits = ndmabits; while (nudt--) { - bzero(udt, sizeof(*udt)); + memset(udt, 0, sizeof(*udt)); udt->tag_parent = udpt; udt++; } Modified: stable/8/sys/dev/usb/usb_compat_linux.c ============================================================================== --- stable/8/sys/dev/usb/usb_compat_linux.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_compat_linux.c Sat Dec 3 14:38:54 2011 (r228229) @@ -564,7 +564,7 @@ usb_clear_halt(struct usb_device *dev, s type = uhe->desc.bmAttributes & UE_XFERTYPE; addr = uhe->desc.bEndpointAddress; - bzero(cfg, sizeof(cfg)); + memset(cfg, 0, sizeof(cfg)); cfg[0].type = type; cfg[0].endpoint = addr & UE_ADDR; @@ -709,12 +709,12 @@ usb_control_msg(struct usb_device *dev, urb->dev = dev; urb->endpoint = uhe; - bcopy(&req, urb->setup_packet, sizeof(req)); + memcpy(urb->setup_packet, &req, sizeof(req)); if (size && (!(req.bmRequestType & UT_READ))) { /* move the data to a real buffer */ - bcopy(data, USB_ADD_BYTES(urb->setup_packet, - sizeof(req)), size); + memcpy(USB_ADD_BYTES(urb->setup_packet, sizeof(req)), + data, size); } err = usb_start_wait_urb(urb, timeout, &actlen); @@ -789,7 +789,7 @@ usb_setup_endpoint(struct usb_device *de if (bufsize == 0) { return (0); } - bzero(cfg, sizeof(cfg)); + memset(cfg, 0, sizeof(cfg)); if (type == UE_ISOCHRONOUS) { @@ -1251,7 +1251,7 @@ usb_init_urb(struct urb *urb) if (urb == NULL) { return; } - bzero(urb, sizeof(*urb)); + memset(urb, 0, sizeof(*urb)); } /*------------------------------------------------------------------------* Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_dev.c Sat Dec 3 14:38:54 2011 (r228229) @@ -1809,8 +1809,8 @@ usb_fifo_free_buffer(struct usb_fifo *f) } /* reset queues */ - bzero(&f->free_q, sizeof(f->free_q)); - bzero(&f->used_q, sizeof(f->used_q)); + memset(&f->free_q, 0, sizeof(f->free_q)); + memset(&f->used_q, 0, sizeof(f->used_q)); } void @@ -1909,7 +1909,7 @@ usb_fifo_put_data_linear(struct usb_fifo io_len = MIN(len, m->cur_data_len); - bcopy(ptr, m->cur_data_ptr, io_len); + memcpy(m->cur_data_ptr, ptr, io_len); m->cur_data_len = io_len; ptr = USB_ADD_BYTES(ptr, io_len); @@ -2052,7 +2052,7 @@ usb_fifo_get_data_linear(struct usb_fifo io_len = MIN(len, m->cur_data_len); - bcopy(m->cur_data_ptr, ptr, io_len); + memcpy(ptr, m->cur_data_ptr, io_len); len -= io_len; ptr = USB_ADD_BYTES(ptr, io_len); Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_generic.c Sat Dec 3 14:38:54 2011 (r228229) @@ -240,7 +240,7 @@ ugen_open_pipe_write(struct usb_fifo *f) /* transfers are already opened */ return (0); } - bzero(usb_config, sizeof(usb_config)); + memset(usb_config, 0, sizeof(usb_config)); usb_config[1].type = UE_CONTROL; usb_config[1].endpoint = 0; @@ -308,7 +308,7 @@ ugen_open_pipe_read(struct usb_fifo *f) /* transfers are already opened */ return (0); } - bzero(usb_config, sizeof(usb_config)); + memset(usb_config, 0, sizeof(usb_config)); usb_config[1].type = UE_CONTROL; usb_config[1].endpoint = 0; Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_msctest.c Sat Dec 3 14:38:54 2011 (r228229) @@ -476,8 +476,8 @@ bbb_command_start(struct bbb_transfer *s sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; sc->cmd_len = cmd_len; - bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); - bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); + memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); + memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); Modified: stable/8/sys/dev/usb/usb_request.c ============================================================================== --- stable/8/sys/dev/usb/usb_request.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_request.c Sat Dec 3 14:38:54 2011 (r228229) @@ -517,7 +517,7 @@ usbd_do_request_flags(struct usb_device } } else #endif - bcopy(desc, data, length); + memcpy(data, desc, length); } goto done; /* success */ } Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/usb_transfer.c Sat Dec 3 14:38:54 2011 (r228229) @@ -858,7 +858,7 @@ usbd_transfer_setup(struct usb_device *u if (parm.err) { goto done; } - bzero(&parm, sizeof(parm)); + memset(&parm, 0, sizeof(parm)); parm.udev = udev; parm.speed = usbd_get_speed(udev); @@ -982,7 +982,7 @@ usbd_transfer_setup(struct usb_device *u * memory: */ xfer = &dummy; - bzero(&dummy, sizeof(dummy)); + memset(&dummy, 0, sizeof(dummy)); refcount++; } Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/wlan/if_uath.c Sat Dec 3 14:38:54 2011 (r228229) @@ -710,12 +710,12 @@ uath_cmdsend(struct uath_softc *sc, uint cmd->buflen = roundup2(sizeof(struct uath_cmd_hdr) + ilen, 4); hdr = (struct uath_cmd_hdr *)cmd->buf; - bzero(hdr, sizeof (struct uath_cmd_hdr)); /* XXX not needed */ + memset(hdr, 0, sizeof(struct uath_cmd_hdr)); hdr->len = htobe32(cmd->buflen); hdr->code = htobe32(code); hdr->msgid = cmd->msgid; /* don't care about endianness */ hdr->magic = htobe32((cmd->flags & UATH_CMD_FLAG_MAGIC) ? 1 << 24 : 0); - bcopy(idata, (uint8_t *)(hdr + 1), ilen); + memcpy((uint8_t *)(hdr + 1), idata, ilen); #ifdef UATH_DEBUG if (sc->sc_debug & UATH_DEBUG_CMDS) { @@ -1403,7 +1403,7 @@ uath_dataflush(struct uath_softc *sc) chunk->flags = UATH_CFLAGS_FINAL; chunk->length = htobe16(sizeof (struct uath_tx_desc)); - bzero(desc, sizeof(struct uath_tx_desc)); + memset(desc, 0, sizeof(struct uath_tx_desc)); desc->msglen = htobe32(sizeof(struct uath_tx_desc)); desc->msgid = (sc->sc_msgid++) + 1; /* don't care about endianness */ desc->type = htobe32(WDCMSG_FLUSH); @@ -1482,7 +1482,7 @@ uath_set_chan(struct uath_softc *sc, str #endif struct uath_cmd_reset reset; - bzero(&reset, sizeof reset); + memset(&reset, 0, sizeof(reset)); if (IEEE80211_IS_CHAN_2GHZ(c)) reset.flags |= htobe32(UATH_CHAN_2GHZ); if (IEEE80211_IS_CHAN_5GHZ(c)) @@ -1971,7 +1971,7 @@ uath_create_connection(struct uath_softc struct uath_cmd_create_connection create; ni = ieee80211_ref_node(vap->iv_bss); - bzero(&create, sizeof create); + memset(&create, 0, sizeof(create)); create.connid = htobe32(connid); create.bssid = htobe32(0); /* XXX packed or not? */ @@ -2000,7 +2000,7 @@ uath_set_rates(struct uath_softc *sc, co { struct uath_cmd_rates rates; - bzero(&rates, sizeof rates); + memset(&rates, 0, sizeof(rates)); rates.connid = htobe32(UATH_ID_BSS); /* XXX */ rates.size = htobe32(sizeof(struct uath_cmd_rateset)); /* XXX bounds check rs->rs_nrates */ @@ -2022,7 +2022,7 @@ uath_write_associd(struct uath_softc *sc struct uath_cmd_set_associd associd; ni = ieee80211_ref_node(vap->iv_bss); - bzero(&associd, sizeof associd); + memset(&associd, 0, sizeof(associd)); associd.defaultrateix = htobe32(1); /* XXX */ associd.associd = htobe32(ni->ni_associd); associd.timoffset = htobe32(0x3b); /* XXX */ @@ -2168,7 +2168,7 @@ uath_set_key(struct uath_softc *sc, cons struct uath_cmd_crypto crypto; int i; - bzero(&crypto, sizeof crypto); + memset(&crypto, 0, sizeof(crypto)); crypto.keyidx = htobe32(index); crypto.magic1 = htobe32(1); crypto.size = htobe32(368); @@ -2176,7 +2176,7 @@ uath_set_key(struct uath_softc *sc, cons crypto.flags = htobe32(0x80000068); if (index != UATH_DEFAULT_KEY) crypto.flags |= htobe32(index << 16); - memset(crypto.magic2, 0xff, sizeof crypto.magic2); + memset(crypto.magic2, 0xff, sizeof(crypto.magic2)); /* * Each byte of the key must be XOR'ed with 10101010 before being Modified: stable/8/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_upgt.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/wlan/if_upgt.c Sat Dec 3 14:38:54 2011 (r228229) @@ -432,7 +432,7 @@ upgt_get_stats(struct upgt_softc *sc) /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -540,7 +540,7 @@ upgt_set_led(struct upgt_softc *sc, int /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -670,7 +670,7 @@ upgt_set_macfilter(struct upgt_softc *sc /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -785,11 +785,11 @@ upgt_setup_rates(struct ieee80211vap *va * will pickup a rate. */ if (ic->ic_curmode == IEEE80211_MODE_11B) - bcopy(rateset_auto_11b, sc->sc_cur_rateset, + memcpy(sc->sc_cur_rateset, rateset_auto_11b, sizeof(sc->sc_cur_rateset)); if (ic->ic_curmode == IEEE80211_MODE_11G || ic->ic_curmode == IEEE80211_MODE_AUTO) - bcopy(rateset_auto_11g, sc->sc_cur_rateset, + memcpy(sc->sc_cur_rateset, rateset_auto_11g, sizeof(sc->sc_cur_rateset)); } else { /* set a fixed rate */ @@ -975,7 +975,7 @@ upgt_set_chan(struct upgt_softc *sc, str /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -998,11 +998,11 @@ upgt_set_chan(struct upgt_softc *sc, str chan->settings = sc->sc_eeprom_freq6_settings; chan->unknown3 = UPGT_CHANNEL_UNKNOWN3; - bcopy(&sc->sc_eeprom_freq3[channel].data, chan->freq3_1, + memcpy(chan->freq3_1, &sc->sc_eeprom_freq3[channel].data, sizeof(chan->freq3_1)); - bcopy(&sc->sc_eeprom_freq4[channel], chan->freq4, + memcpy(chan->freq4, &sc->sc_eeprom_freq4[channel], sizeof(sc->sc_eeprom_freq4[channel])); - bcopy(&sc->sc_eeprom_freq3[channel].data, chan->freq3_2, + memcpy(chan->freq3_2, &sc->sc_eeprom_freq3[channel].data, sizeof(chan->freq3_2)); data_cmd->buflen = sizeof(*mem) + sizeof(*chan); @@ -1331,7 +1331,7 @@ upgt_eeprom_read(struct upgt_softc *sc) /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -1423,8 +1423,9 @@ upgt_rxeof(struct usb_xfer *xfer, struct "received EEPROM block (offset=%d, len=%d)\n", eeprom_offset, eeprom_len); - bcopy(data->buf + sizeof(struct upgt_lmac_eeprom) + 4, - sc->sc_eeprom + eeprom_offset, eeprom_len); + memcpy(sc->sc_eeprom + eeprom_offset, + data->buf + sizeof(struct upgt_lmac_eeprom) + 4, + eeprom_len); /* EEPROM data has arrived in time, wakeup. */ wakeup(sc); @@ -1498,7 +1499,7 @@ upgt_rx(struct upgt_softc *sc, uint8_t * return (NULL); } m_adj(m, ETHER_ALIGN); - bcopy(rxdesc->data, mtod(m, char *), pkglen); + memcpy(mtod(m, char *), rxdesc->data, pkglen); /* trim FCS */ m->m_len = m->m_pkthdr.len = pkglen - IEEE80211_CRC_LEN; m->m_pkthdr.rcvif = ifp; @@ -1620,7 +1621,7 @@ upgt_fw_load(struct upgt_softc *sc) goto fail; } data_cmd->buflen = sizeof(start_fwload_cmd); - bcopy(start_fwload_cmd, data_cmd->buf, data_cmd->buflen); + memcpy(data_cmd->buf, start_fwload_cmd, data_cmd->buflen); upgt_bulk_tx(sc, data_cmd); /* send X2 header */ @@ -1631,7 +1632,7 @@ upgt_fw_load(struct upgt_softc *sc) } data_cmd->buflen = sizeof(struct upgt_fw_x2_header); x2 = (struct upgt_fw_x2_header *)data_cmd->buf; - bcopy(UPGT_X2_SIGNATURE, x2->signature, UPGT_X2_SIGNATURE_SIZE); + memcpy(x2->signature, UPGT_X2_SIGNATURE, UPGT_X2_SIGNATURE_SIZE); x2->startaddr = htole32(UPGT_MEMADDR_FIRMWARE_START); x2->len = htole32(fw->datasize); x2->crc = upgt_crc32_le((uint8_t *)data_cmd->buf + @@ -1925,7 +1926,7 @@ upgt_device_reset(struct upgt_softc *sc) UPGT_UNLOCK(sc); return (ENOBUFS); } - bcopy(init_cmd, data->buf, sizeof(init_cmd)); + memcpy(data->buf, init_cmd, sizeof(init_cmd)); data->buflen = sizeof(init_cmd); upgt_bulk_tx(sc, data); usb_pause_mtx(&sc->sc_mtx, 100); @@ -2178,7 +2179,7 @@ upgt_tx_start(struct upgt_softc *sc, str } /* Transmit the URB containing the TX data. */ - bzero(data->buf, MCLBYTES); + memset(data->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data->buf; mem->addr = htole32(data->addr); txdesc = (struct upgt_lmac_tx_desc *)(mem + 1); @@ -2192,7 +2193,7 @@ upgt_tx_start(struct upgt_softc *sc, str } else { /* data frames */ txdesc->header1.flags = UPGT_H1_FLAGS_TX_DATA; - bcopy(sc->sc_cur_rateset, txdesc->rates, sizeof(txdesc->rates)); + memcpy(txdesc->rates, sc->sc_cur_rateset, sizeof(txdesc->rates)); } txdesc->header1.type = UPGT_H1_TYPE_TX_DATA; txdesc->header1.len = htole16(m->m_pkthdr.len); Modified: stable/8/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Sat Dec 3 14:38:54 2011 (r228229) @@ -1745,7 +1745,7 @@ urtw_tx_start(struct urtw_softc *sc, str if ((0 == xferlen % 64) || (0 == xferlen % 512)) xferlen += 1; - bzero(data->buf, URTW_TX_MAXSIZE); + memset(data->buf, 0, URTW_TX_MAXSIZE); flags = m0->m_pkthdr.len & 0xfff; flags |= URTW_TX_FLAG_NO_ENC; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Sat Dec 3 14:32:10 2011 (r228228) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Sat Dec 3 14:38:54 2011 (r228229) @@ -683,7 +683,7 @@ zyd_intr_read_callback(struct usb_xfer * if (i != cnt) continue; /* copy answer into caller-supplied buffer */ - bcopy(cmd->data, rqp->odata, rqp->olen); + memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", rqp, rqp->olen, rqp->odata, ":"); @@ -783,7 +783,7 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c return (EINVAL); cmd.code = htole16(code); - bcopy(idata, cmd.data, ilen); + memcpy(cmd.data, idata, ilen); DPRINTF(sc, ZYD_DEBUG_CMD, "sending cmd %p = %*D\n", &rq, ilen, idata, ":"); From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:40:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBB72106564A; Sat, 3 Dec 2011 14:40:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DABE48FC0C; Sat, 3 Dec 2011 14:40:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3Eeu07043707; Sat, 3 Dec 2011 14:40:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3EeuhD043705; Sat, 3 Dec 2011 14:40:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031440.pB3EeuhD043705@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:40:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228230 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:40:57 -0000 Author: hselasky Date: Sat Dec 3 14:40:56 2011 New Revision: 228230 URL: http://svn.freebsd.org/changeset/base/228230 Log: MFC r215254: Fix compiler warnings. Modified: stable/8/sys/dev/usb/input/uhid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/input/uhid.c ============================================================================== --- stable/8/sys/dev/usb/input/uhid.c Sat Dec 3 14:38:54 2011 (r228229) +++ stable/8/sys/dev/usb/input/uhid.c Sat Dec 3 14:40:56 2011 (r228230) @@ -683,7 +683,7 @@ uhid_attach(device_t dev) if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE) { sc->sc_repdesc_size = sizeof(uhid_graphire_report_descr); - sc->sc_repdesc_ptr = &uhid_graphire_report_descr; + sc->sc_repdesc_ptr = (void *)&uhid_graphire_report_descr; sc->sc_flags |= UHID_FLAG_STATIC_DESC; } else if (uaa->info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE3_4X5) { @@ -704,7 +704,7 @@ uhid_attach(device_t dev) usbd_errstr(error)); } sc->sc_repdesc_size = sizeof(uhid_graphire3_4x5_report_descr); - sc->sc_repdesc_ptr = &uhid_graphire3_4x5_report_descr; + sc->sc_repdesc_ptr = (void *)&uhid_graphire3_4x5_report_descr; sc->sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) && @@ -713,7 +713,7 @@ uhid_attach(device_t dev) /* the Xbox 360 gamepad has no report descriptor */ sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); - sc->sc_repdesc_ptr = &uhid_xb360gp_report_descr; + sc->sc_repdesc_ptr = (void *)&uhid_xb360gp_report_descr; sc->sc_flags |= UHID_FLAG_STATIC_DESC; } if (sc->sc_repdesc_ptr == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:44:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A88911065673; Sat, 3 Dec 2011 14:44:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1028FC14; Sat, 3 Dec 2011 14:44:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3EiZYn043926; Sat, 3 Dec 2011 14:44:35 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3EiZAl043921; Sat, 3 Dec 2011 14:44:35 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031444.pB3EiZAl043921@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228231 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:44:35 -0000 Author: hselasky Date: Sat Dec 3 14:44:34 2011 New Revision: 228231 URL: http://svn.freebsd.org/changeset/base/228231 Log: MFC 226479: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Modified: stable/8/sys/dev/usb/net/if_aue.c stable/8/sys/dev/usb/net/if_axe.c stable/8/sys/dev/usb/net/if_rue.c stable/8/sys/dev/usb/net/if_udav.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_aue.c Sat Dec 3 14:40:56 2011 (r228230) +++ stable/8/sys/dev/usb/net/if_aue.c Sat Dec 3 14:44:34 2011 (r228231) @@ -1032,9 +1032,9 @@ aue_ifmedia_sts(struct ifnet *ifp, struc AUE_LOCK(sc); mii_pollstat(mii); - AUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AUE_UNLOCK(sc); } /* Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Sat Dec 3 14:40:56 2011 (r228230) +++ stable/8/sys/dev/usb/net/if_axe.c Sat Dec 3 14:44:34 2011 (r228231) @@ -452,9 +452,9 @@ axe_ifmedia_sts(struct ifnet *ifp, struc AXE_LOCK(sc); mii_pollstat(mii); - AXE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AXE_UNLOCK(sc); } static void Modified: stable/8/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/8/sys/dev/usb/net/if_rue.c Sat Dec 3 14:40:56 2011 (r228230) +++ stable/8/sys/dev/usb/net/if_rue.c Sat Dec 3 14:44:34 2011 (r228231) @@ -889,9 +889,9 @@ rue_ifmedia_sts(struct ifnet *ifp, struc RUE_LOCK(sc); mii_pollstat(mii); - RUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RUE_UNLOCK(sc); } static void Modified: stable/8/sys/dev/usb/net/if_udav.c ============================================================================== --- stable/8/sys/dev/usb/net/if_udav.c Sat Dec 3 14:40:56 2011 (r228230) +++ stable/8/sys/dev/usb/net/if_udav.c Sat Dec 3 14:44:34 2011 (r228231) @@ -751,9 +751,9 @@ udav_ifmedia_status(struct ifnet *ifp, s UDAV_LOCK(sc); mii_pollstat(mii); - UDAV_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + UDAV_UNLOCK(sc); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 14:54:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A93B1065670; Sat, 3 Dec 2011 14:54:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3D88FC0C; Sat, 3 Dec 2011 14:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3Esjlu044247; Sat, 3 Dec 2011 14:54:45 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3Esjvg044245; Sat, 3 Dec 2011 14:54:45 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031454.pB3Esjvg044245@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 14:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228232 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 14:54:45 -0000 Author: hselasky Date: Sat Dec 3 14:54:44 2011 New Revision: 228232 URL: http://svn.freebsd.org/changeset/base/228232 Log: Fix a compile warning with clang. Reported by: arundel @ MFC after: 3 days Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Sat Dec 3 14:44:34 2011 (r228231) +++ head/sys/dev/usb/usb_msctest.c Sat Dec 3 14:54:44 2011 (r228232) @@ -477,7 +477,7 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 15:41:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E321065670; Sat, 3 Dec 2011 15:41:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 704688FC12; Sat, 3 Dec 2011 15:41:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3FfciE045767; Sat, 3 Dec 2011 15:41:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3FfcXG045765; Sat, 3 Dec 2011 15:41:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112031541.pB3FfcXG045765@svn.freebsd.org> From: Eitan Adler Date: Sat, 3 Dec 2011 15:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228233 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 15:41:38 -0000 Author: eadler (ports committer) Date: Sat Dec 3 15:41:37 2011 New Revision: 228233 URL: http://svn.freebsd.org/changeset/base/228233 Log: - Fix typos s/(more|less) then|\1 than/ Submitted by: Davide Italiano Approved by: brucec MFC after: 3 days Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Sat Dec 3 14:54:44 2011 (r228232) +++ head/sys/kern/subr_blist.c Sat Dec 3 15:41:37 2011 (r228233) @@ -29,7 +29,7 @@ * * This module implements a general bitmap allocator/deallocator. The * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other then to return + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are @@ -57,7 +57,7 @@ * the memory subsystem. In contrast, the rlist code may allocate memory * on an rlist_free() call. The non-blocking features of the blist code * are used to great advantage in the swap code (vm/nswap_pager.c). The - * rlist code uses a little less overall memory then the blist code (but + * rlist code uses a little less overall memory than the blist code (but * due to swap interleaving not all that much less), but the blist code * scales much, much better. * @@ -72,7 +72,7 @@ * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more then + * NOTE: the allocator cannot currently allocate more than * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too * large' if you try. This is an area that could use improvement. The * radix is large enough that this restriction does not effect the swap @@ -152,7 +152,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Sw * blist_create() - create a blist capable of handling up to the specified * number of blocks * - * blocks - must be greater then 0 + * blocks - must be greater than 0 * flags - malloc flags * * The smallest blist consists of a single leaf node capable of @@ -841,7 +841,7 @@ blst_meta_fill( * * Initialize our meta structures and bitmaps and calculate the exact * amount of space required to manage 'count' blocks - this space may - * be considerably less then the calculated radix due to the large + * be considerably less than the calculated radix due to the large * RADIX values we use. */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 15:51:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6028106564A; Sat, 3 Dec 2011 15:51:12 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 77FF68FC08; Sat, 3 Dec 2011 15:51:12 +0000 (UTC) Received: by ggnp1 with SMTP id p1so1488082ggn.13 for ; Sat, 03 Dec 2011 07:51:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.88.99 with SMTP id bf3mr486753obb.73.1322927471956; Sat, 03 Dec 2011 07:51:11 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Sat, 3 Dec 2011 07:51:11 -0800 (PST) X-Originating-IP: [80.89.199.122] In-Reply-To: <20111203012843.S2543@besplex.bde.org> References: <201112020909.pB299sFk084589@svn.freebsd.org> <20111203012843.S2543@besplex.bde.org> Date: Sat, 3 Dec 2011 21:51:11 +0600 X-Google-Sender-Auth: AsQSkKzNW1kmGsBy7pIUdHyzvHk Message-ID: From: Max Khon To: Bruce Evans Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228196 - in head: share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 15:51:12 -0000 Bruce, On Fri, Dec 2, 2011 at 9:41 PM, Bruce Evans wrote: >> Log: >> =C2=A0Revert to conservative defaults. WITH_PROFILE is a default now. >> >> =C2=A0NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intac= t >> =C2=A0so that the reversal to the WITHOUT_PROFILE will be easier in futu= re. > > > Thanks. =C2=A0Not building profiled libraries might have been best in 199= 3 > when makeworld took hours (4-10?). =C2=A0When I optimized makeworld in 19= 98, > it still took more than 1 hour but I removing profiling from it was > intentionally left out (except for bootstrapping). =C2=A0It would have sa= ved > only a few minutes. =C2=A0Now, a whole makeworld should take a few minute= s > and the few extra seconds for profiling libraries doesn't matter. The real goal was to have reasonable defaults. The definition of reasonable differs. The definition for some of us is: if I use it it should be the default. My definition is: the system needs minimum tweaks for the majority of users. Max From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 15:51:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1376106566B; Sat, 3 Dec 2011 15:51:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0C978FC0A; Sat, 3 Dec 2011 15:51:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3FpF6A046115; Sat, 3 Dec 2011 15:51:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3FpF3d046113; Sat, 3 Dec 2011 15:51:15 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031551.pB3FpF3d046113@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 15:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228234 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 15:51:15 -0000 Author: hselasky Date: Sat Dec 3 15:51:15 2011 New Revision: 228234 URL: http://svn.freebsd.org/changeset/base/228234 Log: Make sure the description of pause() is equivalent to its implementation. No code change. Suggested by: Bruce Evans MFC after: 3 days Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Sat Dec 3 15:41:37 2011 (r228233) +++ head/sys/kern/kern_synch.c Sat Dec 3 15:51:15 2011 (r228234) @@ -328,7 +328,8 @@ msleep_spin(void *ident, struct mtx *mtx * pause() delays the calling thread by the given number of system ticks. * During cold bootup, pause() uses the DELAY() function instead of * the tsleep() function to do the waiting. The "timo" argument must be - * greater than zero. + * greater than or equal to zero. A "timo" value of zero is equivalent + * to a "timo" value of one. */ int pause(const char *wmesg, int timo) From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 16:19:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AFD51065670; Sat, 3 Dec 2011 16:19:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AB088FC13; Sat, 3 Dec 2011 16:19:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3GJ8Rk047103; Sat, 3 Dec 2011 16:19:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3GJ82B047101; Sat, 3 Dec 2011 16:19:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031619.pB3GJ82B047101@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 16:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228235 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 16:19:08 -0000 Author: hselasky Date: Sat Dec 3 16:19:07 2011 New Revision: 228235 URL: http://svn.freebsd.org/changeset/base/228235 Log: libusb_open() sets the given device handle to NULL if it fails, so there is no need to do it again after returning. Submitted by: Christoph Mallon MFC after: 3 days Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Sat Dec 3 15:51:15 2011 (r228234) +++ head/lib/libusb/libusb10.c Sat Dec 3 16:19:07 2011 (r228235) @@ -427,8 +427,7 @@ libusb_open_device_with_vid_pid(libusb_c */ if (pdesc->idVendor == vendor_id && pdesc->idProduct == product_id) { - if (libusb_open(devs[j], &pdev) < 0) - pdev = NULL; + libusb_open(devs[j], &pdev); break; } } From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 16:30:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A2B8106566B; Sat, 3 Dec 2011 16:30:48 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49F088FC0A; Sat, 3 Dec 2011 16:30:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3GUm7p047483; Sat, 3 Dec 2011 16:30:48 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3GUmu1047481; Sat, 3 Dec 2011 16:30:48 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112031630.pB3GUmu1047481@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 3 Dec 2011 16:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228236 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 16:30:48 -0000 Author: hselasky Date: Sat Dec 3 16:30:47 2011 New Revision: 228236 URL: http://svn.freebsd.org/changeset/base/228236 Log: Simplify libusb_open_device_with_vid_pid(): Only set pdev to non-NULL on success instead of unconditonally setting it and maybe resetting it later. Submitted by: Christoph Mallon MFC after: 3 days Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Sat Dec 3 16:19:07 2011 (r228235) +++ head/lib/libusb/libusb10.c Sat Dec 3 16:30:47 2011 (r228236) @@ -417,9 +417,12 @@ libusb_open_device_with_vid_pid(libusb_c if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); + pdev = NULL; for (j = 0; j < i; j++) { - pdev = devs[j]->os_priv; - pdesc = libusb20_dev_get_device_desc(pdev); + struct libusb20_device *tdev; + + tdev = devs[j]->os_priv; + pdesc = libusb20_dev_get_device_desc(tdev); /* * NOTE: The USB library will automatically swap the * fields in the device descriptor to be of host @@ -431,8 +434,6 @@ libusb_open_device_with_vid_pid(libusb_c break; } } - if (j == i) - pdev = NULL; libusb_free_device_list(devs, 1); DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 16:32:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A11911065673; Sat, 3 Dec 2011 16:32:15 +0000 (UTC) (envelope-from fjoe@samodelkin.net) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 30B1D8FC18; Sat, 3 Dec 2011 16:32:14 +0000 (UTC) Received: by ggnp1 with SMTP id p1so1512603ggn.13 for ; Sat, 03 Dec 2011 08:32:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.7.100 with SMTP id i4mr519275oba.43.1322929934354; Sat, 03 Dec 2011 08:32:14 -0800 (PST) Sender: fjoe@samodelkin.net Received: by 10.182.76.225 with HTTP; Sat, 3 Dec 2011 08:32:14 -0800 (PST) X-Originating-IP: [80.89.199.122] In-Reply-To: <20111202094020.GB9075@dragon.NUXI.org> References: <201111301333.pAUDX92u099562@svn.freebsd.org> <20111202094020.GB9075@dragon.NUXI.org> Date: Sat, 3 Dec 2011 22:32:14 +0600 X-Google-Sender-Auth: Tj0FH-joJBCCgTk-TN5kNpu1BfA Message-ID: From: Max Khon To: obrien@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228153 - head/usr.sbin/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 16:32:15 -0000 David, On Fri, Dec 2, 2011 at 4:40 PM, David O'Brien wrote: >> =C2=A0 Generate ${NORMAL_CTFCONVERT} invocation without '@' modifier: >> =C2=A0 - ${NORMAL_CC} is also invoked without '@' >> =C2=A0 - Userland CTF support was changed previously to echo ctfconvert >> =C2=A0 invocations too > > Thank you for your work on cleaning up the CTF part of the build. > Enabling WITH_CTF has been too different (and conflicting) from our > other knobs. > I also had local patches to not hide ctfconvert so one could easily see > when they didn't have WITH_CTF enabled in the right magical incantations. You're welcome. > Will you be MFC'ing the CTF build work? =C2=A0Please. :-) Frankly, I do see reasons for the MFC (and I do not want to respond to people who will be unhappy with this MFC because they do not see reasons for the MFC too). Max From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 16:58:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 559E21065670; Sat, 3 Dec 2011 16:58:56 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443988FC1B; Sat, 3 Dec 2011 16:58:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3GwuVQ048411; Sat, 3 Dec 2011 16:58:56 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3Gwud9048409; Sat, 3 Dec 2011 16:58:56 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201112031658.pB3Gwud9048409@svn.freebsd.org> From: Ken Smith Date: Sat, 3 Dec 2011 16:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228237 - stable/9/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 16:58:56 -0000 Author: kensmith Date: Sat Dec 3 16:58:55 2011 New Revision: 228237 URL: http://svn.freebsd.org/changeset/base/228237 Log: MFC r228192: > Add a screen that asks if the user would like to enable crash dumps, > giving them a very brief description of the trade-offs. Whether the > user opts in or out add an entry to what will become /etc/rc.conf > explaining what dumpdev is and how to turn on/off crash dumps. The folks > who handle interacting with users submitting PRs have asked for this. > > Reviewed by: nwhitehorn Approved by: re (kib) Modified: stable/9/usr.sbin/bsdinstall/scripts/services Directory Properties: stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/services ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/services Sat Dec 3 16:30:47 2011 (r228236) +++ stable/9/usr.sbin/bsdinstall/scripts/services Sat Dec 3 16:58:55 2011 (r228237) @@ -26,6 +26,8 @@ # # $FreeBSD$ +: ${DIALOG_OK=0} + if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then eval `sed -e s/YES/on/I -e s/NO/off/I $BSDINSTALL_TMPETC/rc.conf.services` else @@ -51,3 +53,15 @@ for daemon in $DAEMONS; do echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services done +echo \# Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable >> \ + $BSDINSTALL_TMPETC/rc.conf.services + +dialog --backtitle "FreeBSD Installer" --title "Dumpdev Configuration" \ + --nocancel --yesno \ + "Would you like to enable crash dumps? If you start having problems with the system it can help the FreeBSD developers debug the problem. But the crash dumps can take up a lot of disk space in /var." 0 0 + +if [ $? -eq $DIALOG_OK ]; then + echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services +else + echo dumpdev=\"NO\" >> $BSDINSTALL_TMPETC/rc.conf.services +fi From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 17:02:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24301106566C; Sat, 3 Dec 2011 17:02:52 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 136548FC08; Sat, 3 Dec 2011 17:02:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3H2piC048597; Sat, 3 Dec 2011 17:02:51 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3H2pIe048595; Sat, 3 Dec 2011 17:02:51 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201112031702.pB3H2pIe048595@svn.freebsd.org> From: Ken Smith Date: Sat, 3 Dec 2011 17:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228238 - releng/9.0/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 17:02:52 -0000 Author: kensmith Date: Sat Dec 3 17:02:51 2011 New Revision: 228238 URL: http://svn.freebsd.org/changeset/base/228238 Log: MFC r228237: > Add a screen that asks if the user would like to enable crash dumps, > giving them a very brief description of the trade-offs. Whether the > user opts in or out add an entry to what will become /etc/rc.conf > explaining what dumpdev is and how to turn on/off crash dumps. The folks > who handle interacting with users submitting PRs have asked for this. > > Reviewed by: nwhitehorn Approved by: re (kib) Modified: releng/9.0/usr.sbin/bsdinstall/scripts/services Directory Properties: releng/9.0/usr.sbin/bsdinstall/scripts/ (props changed) Modified: releng/9.0/usr.sbin/bsdinstall/scripts/services ============================================================================== --- releng/9.0/usr.sbin/bsdinstall/scripts/services Sat Dec 3 16:58:55 2011 (r228237) +++ releng/9.0/usr.sbin/bsdinstall/scripts/services Sat Dec 3 17:02:51 2011 (r228238) @@ -26,6 +26,8 @@ # # $FreeBSD$ +: ${DIALOG_OK=0} + if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then eval `sed -e s/YES/on/I -e s/NO/off/I $BSDINSTALL_TMPETC/rc.conf.services` else @@ -51,3 +53,15 @@ for daemon in $DAEMONS; do echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services done +echo \# Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable >> \ + $BSDINSTALL_TMPETC/rc.conf.services + +dialog --backtitle "FreeBSD Installer" --title "Dumpdev Configuration" \ + --nocancel --yesno \ + "Would you like to enable crash dumps? If you start having problems with the system it can help the FreeBSD developers debug the problem. But the crash dumps can take up a lot of disk space in /var." 0 0 + +if [ $? -eq $DIALOG_OK ]; then + echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services +else + echo dumpdev=\"NO\" >> $BSDINSTALL_TMPETC/rc.conf.services +fi From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 17:03:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEABB1065675; Sat, 3 Dec 2011 17:03:48 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE6DA8FC08; Sat, 3 Dec 2011 17:03:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3H3mlG048660; Sat, 3 Dec 2011 17:03:48 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3H3mI9048658; Sat, 3 Dec 2011 17:03:48 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201112031703.pB3H3mI9048658@svn.freebsd.org> From: Ken Smith Date: Sat, 3 Dec 2011 17:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228239 - releng/9.0/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 17:03:49 -0000 Author: kensmith Date: Sat Dec 3 17:03:48 2011 New Revision: 228239 URL: http://svn.freebsd.org/changeset/base/228239 Log: Ready for 9.0-RC3. Approved by: re (implicit) Modified: releng/9.0/sys/conf/newvers.sh Modified: releng/9.0/sys/conf/newvers.sh ============================================================================== --- releng/9.0/sys/conf/newvers.sh Sat Dec 3 17:02:51 2011 (r228238) +++ releng/9.0/sys/conf/newvers.sh Sat Dec 3 17:03:48 2011 (r228239) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.0" -BRANCH="RC2" +BRANCH="RC3" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 17:15:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21CC8106566C; Sat, 3 Dec 2011 17:15:17 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06EB98FC0C; Sat, 3 Dec 2011 17:15:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3HFG4i049072; Sat, 3 Dec 2011 17:15:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3HFGMS049070; Sat, 3 Dec 2011 17:15:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112031715.pB3HFGMS049070@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 3 Dec 2011 17:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228240 - stable/9/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 17:15:17 -0000 Author: nwhitehorn Date: Sat Dec 3 17:15:16 2011 New Revision: 228240 URL: http://svn.freebsd.org/changeset/base/228240 Log: MFC r228194: Prevent user astonishment by providing the shell option at the end, after any installer-provided configuration files have been copied. This allows users to edit their fstab, if desired, and to see what the installer has placed in rc.conf. Requested by: phk Approved by: re (kensmith) Modified: stable/9/usr.sbin/bsdinstall/scripts/auto Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/auto Sat Dec 3 17:03:48 2011 (r228239) +++ stable/9/usr.sbin/bsdinstall/scripts/auto Sat Dec 3 17:15:16 2011 (r228240) @@ -157,7 +157,7 @@ finalconfig() { exec 3>&1 REVISIT=$(dialog --backtitle "FreeBSD Installer" \ --title "Final Configuration" --no-cancel --menu \ - "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \ + "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ "Exit" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ @@ -165,8 +165,7 @@ finalconfig() { "Network" "Networking configuration" \ "Services" "Set daemons to run on startup" \ "Time Zone" "Set system timezone" \ - "Handbook" "Install FreeBSD Handbook (requires network)" \ - "Shell" "Open a shell in the new system" 2>&1 1>&3) + "Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3) exec 3>&- case "$REVISIT" in @@ -198,15 +197,6 @@ finalconfig() { bsdinstall docsinstall finalconfig ;; - "Shell") - clear - echo This shell is operating in a chroot in the new system. \ - When finished making configuration changes, type \"exit\". - chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 - # Don't hose local rc.conf changes - cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual - finalconfig - ;; esac } @@ -222,5 +212,14 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; the rm -rf "$BSDINSTALL_FETCHDEST" fi +dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \ + --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 +if [ $? -eq 0 ]; then + clear + echo This shell is operating in a chroot in the new system. \ + When finished making configuration changes, type \"exit\". + chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 +fi + echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 17:17:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D61431065670; Sat, 3 Dec 2011 17:17:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB7B58FC17; Sat, 3 Dec 2011 17:17:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3HHWA5049196; Sat, 3 Dec 2011 17:17:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3HHWlv049194; Sat, 3 Dec 2011 17:17:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112031717.pB3HHWlv049194@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 3 Dec 2011 17:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228241 - releng/9.0/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 17:17:32 -0000 Author: nwhitehorn Date: Sat Dec 3 17:17:32 2011 New Revision: 228241 URL: http://svn.freebsd.org/changeset/base/228241 Log: MFC r228194, MF9 r228240: Prevent user astonishment by providing the shell option at the end, after any installer-provided configuration files have been copied. This allows users to edit their fstab, if desired, and to see what the installer has placed in rc.conf. Requested by: phk Approved by: re (kensmith) Modified: releng/9.0/usr.sbin/bsdinstall/scripts/auto Directory Properties: releng/9.0/usr.sbin/bsdinstall/ (props changed) releng/9.0/usr.sbin/bsdinstall/scripts/ (props changed) Modified: releng/9.0/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- releng/9.0/usr.sbin/bsdinstall/scripts/auto Sat Dec 3 17:15:16 2011 (r228240) +++ releng/9.0/usr.sbin/bsdinstall/scripts/auto Sat Dec 3 17:17:32 2011 (r228241) @@ -157,7 +157,7 @@ finalconfig() { exec 3>&1 REVISIT=$(dialog --backtitle "FreeBSD Installer" \ --title "Final Configuration" --no-cancel --menu \ - "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \ + "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \ "Exit" "Apply configuration and exit installer" \ "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ @@ -165,8 +165,7 @@ finalconfig() { "Network" "Networking configuration" \ "Services" "Set daemons to run on startup" \ "Time Zone" "Set system timezone" \ - "Handbook" "Install FreeBSD Handbook (requires network)" \ - "Shell" "Open a shell in the new system" 2>&1 1>&3) + "Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3) exec 3>&- case "$REVISIT" in @@ -198,15 +197,6 @@ finalconfig() { bsdinstall docsinstall finalconfig ;; - "Shell") - clear - echo This shell is operating in a chroot in the new system. \ - When finished making configuration changes, type \"exit\". - chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 - # Don't hose local rc.conf changes - cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual - finalconfig - ;; esac } @@ -222,5 +212,14 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; the rm -rf "$BSDINSTALL_FETCHDEST" fi +dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \ + --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 +if [ $? -eq 0 ]; then + clear + echo This shell is operating in a chroot in the new system. \ + When finished making configuration changes, type \"exit\". + chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 +fi + echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 17:29:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55A37106564A; Sat, 3 Dec 2011 17:29:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7E38FC15; Sat, 3 Dec 2011 17:29:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3HTdGZ049592; Sat, 3 Dec 2011 17:29:39 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3HTdiN049590; Sat, 3 Dec 2011 17:29:39 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112031729.pB3HTdiN049590@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Dec 2011 17:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228242 - stable/7/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 17:29:39 -0000 Author: alc Date: Sat Dec 3 17:29:38 2011 New Revision: 228242 URL: http://svn.freebsd.org/changeset/base/228242 Log: MFC r226740 Speed up vm_page_cache() and vm_page_remove() by checking for a few common cases that can be handled in constant time. Modified: stable/7/sys/vm/vm_page.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/vm/vm_page.c ============================================================================== --- stable/7/sys/vm/vm_page.c Sat Dec 3 17:17:32 2011 (r228241) +++ stable/7/sys/vm/vm_page.c Sat Dec 3 17:29:38 2011 (r228242) @@ -708,7 +708,7 @@ void vm_page_remove(vm_page_t m) { vm_object_t object; - vm_page_t root; + vm_page_t next, prev, root; if ((object = m->object) == NULL) return; @@ -722,15 +722,42 @@ vm_page_remove(vm_page_t m) /* * Now remove from the object's list of backed pages. */ - if (m != object->root) - vm_page_splay(m->pindex, object->root); - if (m->left == NULL) - root = m->right; - else { - root = vm_page_splay(m->pindex, m->left); - root->right = m->right; + if ((next = TAILQ_NEXT(m, listq)) != NULL && next->left == m) { + /* + * Since the page's successor in the list is also its parent + * in the tree, its right subtree must be empty. + */ + next->left = m->left; + KASSERT(m->right == NULL, + ("vm_page_remove: page %p has right child", m)); + } else if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->right == m) { + /* + * Since the page's predecessor in the list is also its parent + * in the tree, its left subtree must be empty. + */ + KASSERT(m->left == NULL, + ("vm_page_remove: page %p has left child", m)); + prev->right = m->right; + } else { + if (m != object->root) + vm_page_splay(m->pindex, object->root); + if (m->left == NULL) + root = m->right; + else if (m->right == NULL) + root = m->left; + else { + /* + * Move the page's successor to the root, because + * pages are usually removed in ascending order. + */ + if (m->right != next) + vm_page_splay(m->pindex, m->right); + next->left = m->left; + root = next; + } + object->root = root; } - object->root = root; TAILQ_REMOVE(&object->memq, m, listq); /* @@ -1664,7 +1691,7 @@ void vm_page_cache(vm_page_t m) { vm_object_t object; - vm_page_t root; + vm_page_t next, prev, root; mtx_assert(&vm_page_queue_mtx, MA_OWNED); object = m->object; @@ -1700,15 +1727,42 @@ vm_page_cache(vm_page_t m) * Remove the page from the object's collection of resident * pages. */ - if (m != object->root) - vm_page_splay(m->pindex, object->root); - if (m->left == NULL) - root = m->right; - else { - root = vm_page_splay(m->pindex, m->left); - root->right = m->right; + if ((next = TAILQ_NEXT(m, listq)) != NULL && next->left == m) { + /* + * Since the page's successor in the list is also its parent + * in the tree, its right subtree must be empty. + */ + next->left = m->left; + KASSERT(m->right == NULL, + ("vm_page_cache: page %p has right child", m)); + } else if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->right == m) { + /* + * Since the page's predecessor in the list is also its parent + * in the tree, its left subtree must be empty. + */ + KASSERT(m->left == NULL, + ("vm_page_cache: page %p has left child", m)); + prev->right = m->right; + } else { + if (m != object->root) + vm_page_splay(m->pindex, object->root); + if (m->left == NULL) + root = m->right; + else if (m->right == NULL) + root = m->left; + else { + /* + * Move the page's successor to the root, because + * pages are usually removed in ascending order. + */ + if (m->right != next) + vm_page_splay(m->pindex, m->right); + next->left = m->left; + root = next; + } + object->root = root; } - object->root = root; TAILQ_REMOVE(&object->memq, m, listq); object->resident_page_count--; object->generation++; From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 17:54:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C62DE106566B for ; Sat, 3 Dec 2011 17:54:36 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.120]) by mx1.freebsd.org (Postfix) with ESMTP id 4516D8FC0A for ; Sat, 3 Dec 2011 17:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=iRSZFKrbBBZkvbtx+N9SnU6l1tTWmt3CjlqrNizdQZo=; b=KFj2mmB+POUOfDvWiCk+JRKvTCa1el+z4DRHaLAeRPF7BfE9oAZo0hBcOobe6jlbW4wFthcINLOa7yajOLboPijUaJIA6y/ZR8F5+G9q3roXkJzpeXTH1DCugGAZAEu5ZeJBvr1fiJxejTXeIOhat3RtZ2lo5gIaOpbkkUvDhvA=; Received: from [178.137.138.140] (helo=nonamehost.) by fsm1.ukr.net with esmtpsa ID 1RWtnG-000HVg-9i ; Sat, 03 Dec 2011 19:54:34 +0200 Date: Sat, 3 Dec 2011 19:54:33 +0200 From: Ivan Klymenko To: Marius Strobl Message-ID: <20111203195433.273fc872@nonamehost.> In-Reply-To: <20111203132522.GA54475@alchemy.franken.de> References: <201112022119.pB2LJEqJ009294@svn.freebsd.org> <20111203125551.156724e1@nonamehost.> <20111203132522.GA54475@alchemy.franken.de> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r228209 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 17:54:37 -0000 > > > Author: marius > > > Date: Fri Dec 2 21:19:14 2011 > > > New Revision: 228209 > > > URL: http://svn.freebsd.org/changeset/base/228209 > > > > > > Log: > > > - In device_probe_child(9) check the return value of > > > device_set_driver(9) when actually setting a driver as especially > > > ENOMEM is fatal in these cases. > > > - Annotate other calls to device_set_devclass(9) and > > > device_set_driver(9) without the return value being checked and > > > that are okay to fail. > > > Reviewed by: yongari (slightly earlier version) > > > > > > Modified: > > > head/sys/kern/subr_bus.c > > > > > > Modified: head/sys/kern/subr_bus.c > > > ============================================================================== > > > --- head/sys/kern/subr_bus.c Fri Dec 2 20:28:45 2011 > > > (r228208) +++ head/sys/kern/subr_bus.c Fri Dec 2 21:19:14 > > > 2011 (r228209) @@ -1129,7 +1129,7 @@ > > > devclass_driver_deleted(devclass_t buscl dev->parent->devclass == > > > busclass) { if ((error = device_detach(dev)) != 0) > > > return (error); > > > - device_set_driver(dev, NULL); > > > + (void)device_set_driver(dev, > > > NULL); BUS_PROBE_NOMATCH(dev->parent, dev); > > > devnomatch(dev); > > > dev->flags |= DF_DONENOMATCH; > > > @@ -2007,19 +2007,22 @@ device_probe_child(device_t dev, device_ > > > for (dl = first_matching_driver(dc, child); > > > dl; > > > dl = next_matching_driver(dc, child, dl)) { > > > - > > > /* If this driver's pass is too high, > > > then ignore it. */ if (dl->pass > bus_current_pass) > > > continue; > > > > > > PDEBUG(("Trying %s", > > > DRIVERNAME(dl->driver))); > > > - device_set_driver(child, dl->driver); > > > + result = device_set_driver(child, > > > dl->driver); > > > + if (result == ENOMEM) > > > + return (result); > > > + else if (result != 0) > > > + continue; > > > if (!hasclass) { > > > if (device_set_devclass(child, > > > dl->driver->name)) { printf("driver bug: Unable to set devclass > > > (devname: %s)\n", (child ? device_get_name(child) : > > > "no device")); > > > - device_set_driver(child, > > > NULL); > > > + > > > (void)device_set_driver(child, NULL); continue; > > > } > > > } > > > @@ -2033,7 +2036,7 @@ device_probe_child(device_t dev, device_ > > > /* Reset flags and devclass before the > > > next probe. */ child->devflags = 0; > > > if (!hasclass) > > > - device_set_devclass(child, NULL); > > > + (void)device_set_devclass(child, > > > NULL); > > > /* > > > * If the driver returns SUCCESS, there > > > can be @@ -2050,7 +2053,7 @@ device_probe_child(device_t dev, > > > device_ > > > * certainly doesn't match. > > > */ > > > if (result > 0) { > > > - device_set_driver(child, NULL); > > > + (void)device_set_driver(child, > > > NULL); continue; > > > } > > > > > > @@ -2113,7 +2116,9 @@ device_probe_child(device_t dev, device_ > > > if (result != 0) > > > return (result); > > > } > > > - device_set_driver(child, best->driver); > > > + result = device_set_driver(child, best->driver); > > > + if (result != 0) > > > + return (result); > > > resource_int_value(best->driver->name, > > > child->unit, "flags", &child->devflags); > > > > > > @@ -2722,8 +2727,8 @@ device_attach(device_t dev) > > > dev->driver->name, dev->unit, error); > > > /* Unset the class; set in device_probe_child */ > > > if (dev->devclass == NULL) > > > - device_set_devclass(dev, NULL); > > > - device_set_driver(dev, NULL); > > > + (void)device_set_devclass(dev, NULL); > > > + (void)device_set_driver(dev, NULL); > > > device_sysctl_fini(dev); > > > dev->state = DS_NOTPRESENT; > > > return (error); > > > @@ -2776,7 +2781,7 @@ device_detach(device_t dev) > > > devclass_delete_device(dev->devclass, dev); > > > > > > dev->state = DS_NOTPRESENT; > > > - device_set_driver(dev, NULL); > > > + (void)device_set_driver(dev, NULL); > > > device_set_desc(dev, NULL); > > > device_sysctl_fini(dev); > > > > > > @@ -4613,7 +4618,6 @@ print_driver(driver_t *driver, int inden > > > print_driver_short(driver, indent); > > > } > > > > > > - > > > static void > > > print_driver_list(driver_list_t drivers, int indent) > > > { > > > > Thank you! > > Now I can again connect a USB external drive... > > In what way did it fail before? This change actually doesn't fix any > issue encountered in practice that I'm aware of. I just spotted this > possibility for a problem while trying to debug what appears to be > a race in newbus and I can't think of anything besides a panic due > to trying to use unallocated memory this change would fix. But even > then if device_set_driver(9) fails with ENOMEM the panic would be > just avoided but you'd still end up with no driver being attached ... > > > But, nevertheless, remains a problem when you connect an external > > drive via FireWire... > > Marius Honestly - is accurate and will not say, but when i plug it to appear in /dev/ and neither can `t connect hald or amd, and by running mount command - and the system console slipped some mistakes... (DBus error) Restart the processes and systems do not lead to the desired result ... Update to this revision has corrected the situation (Unlike with FireWire - now they are after the connection is not visible even in the /dev/)... From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 19:56:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 711F21065672; Sat, 3 Dec 2011 19:56:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 478E58FC0A; Sat, 3 Dec 2011 19:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3JurNX054258; Sat, 3 Dec 2011 19:56:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3JurIi054255; Sat, 3 Dec 2011 19:56:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201112031956.pB3JurIi054255@svn.freebsd.org> From: Ed Maste Date: Sat, 3 Dec 2011 19:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228243 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 19:56:53 -0000 Author: emaste Date: Sat Dec 3 19:56:52 2011 New Revision: 228243 URL: http://svn.freebsd.org/changeset/base/228243 Log: Add quirk for Micron RealSSD eUSB failing on unsupported SCSI command It appears this device fails if sent a SYNCHRONIZE_CACHE command, so add quirk to avoid sending it. I will follow up with Micron on this issue, and will adjust the quirk if necessary based on their feedback. Reviewed by: hselasky@ Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Sat Dec 3 17:29:38 2011 (r228242) +++ head/sys/dev/usb/quirk/usb_quirk.c Sat Dec 3 19:56:52 2011 (r228243) @@ -248,6 +248,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROTECH, DPCM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP), + USB_QUIRK(MICRON, REALSSD, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(MICROTECH, SCSIDB25, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(MICROTECH, SCSIHD50, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Dec 3 17:29:38 2011 (r228242) +++ head/sys/dev/usb/usbdevs Sat Dec 3 19:56:52 2011 (r228243) @@ -317,6 +317,7 @@ vendor ACTLABS 0x061c Act Labs vendor ALARIS 0x0620 Alaris vendor APEX 0x0624 Apex vendor CREATIVE3 0x062a Creative Labs +vendor MICRON 0x0634 Micron Technology vendor VIVITAR 0x0636 Vivitar vendor GUNZE 0x0637 Gunze Electronics USA vendor AVISION 0x0638 Avision @@ -2226,6 +2227,9 @@ product MSI RT3070_7 0x899a RT3070 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 +/* Micron products */ +product MICRON REALSSD 0x0655 Real SSD eUSB + /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 20:59:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AE71065673; Sat, 3 Dec 2011 20:59:01 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 45EC38FC0A; Sat, 3 Dec 2011 20:58:59 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so4117065wgb.31 for ; Sat, 03 Dec 2011 12:58:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=hASe4vgSm42+aELKmt5wi+AtNpdgLOeBSxGkfaRGzPo=; b=qWChuRqD0YCtHXzNOKgd3Czi9htO6RFZJrg2ljix+H7qsYsR8bvklccW2Jf05xRanC lR8BNnze1KMjf92KqrJn3sN/BngtGwB5Pir/uV1h22thOT2uux9lRlZVYqCf/WHw69jN khwu/fBD6hJZMU7tSVXwtKVwEzTfQYDygoP/k= Received: by 10.227.208.13 with SMTP id ga13mr13204513wbb.4.1322945938830; Sat, 03 Dec 2011 12:58:58 -0800 (PST) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id ep16sm18129125wbb.21.2011.12.03.12.58.54 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Dec 2011 12:58:56 -0800 (PST) From: Mikolaj Golub To: John Baldwin References: <201111242054.pAOKs6vj012296@svn.freebsd.org> <201111281330.11720.jhb@freebsd.org> X-Comment-To: John Baldwin Sender: Mikolaj Golub Date: Sat, 03 Dec 2011 22:58:52 +0200 In-Reply-To: <201111281330.11720.jhb@freebsd.org> (John Baldwin's message of "Mon, 28 Nov 2011 13:30:11 -0500") Message-ID: <86liqt1ier.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, Robert Watson , svn-src-all@freebsd.org, src-committers@freebsd.org, Kostik Belousov Subject: Re: svn commit: r227956 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 20:59:01 -0000 On Mon, 28 Nov 2011 13:30:11 -0500 John Baldwin wrote: JB> On Thursday, November 24, 2011 3:54:06 pm Mikolaj Golub wrote: >> Author: trociny >> Date: Thu Nov 24 20:54:06 2011 >> New Revision: 227956 >> URL: http://svn.freebsd.org/changeset/base/227956 >> >> Log: >> usr.bin/procstat >> >> Add -l flag to display resource limits. >> >> PR: bin/161257 >> Reviewed by: kib >> MFC after: 2 weeks JB> Thanks for doing this! Did you consider making the procstat -l output use JB> "pretty" output similar to the output of /usr/bin/limits? For example, JB> using "infinity" instead of -1 and using humanize_number() for finite limits JB> that are in units of bytes? I tried several variants, from one where for rlimit names rlimit_ident constants from sys/resource.h are used and units are printed as suffixes: PID COMM RLIMIT SOFT HARD 46150 zsh cpu 100000S infinity 46150 zsh fsize infinity infinity 46150 zsh data 524288kB 524288kB 46150 zsh stack 65536kB 65536kB 46150 zsh core 9765625kB 9765625kB 46150 zsh rss infinity infinity 46150 zsh memlock infinity infinity 46150 zsh nproc 5547 5547 46150 zsh nofile 11095 11095 46150 zsh sbsize infinity infinity 46150 zsh vmem infinity infinity 46150 zsh npts infinity infinity 46150 zsh swap infinity infinity to one where rlimit names are the same as in limits(1) and units are printed in separate column: PID COMM RLIMIT SOFT HARD UNIT 48885 zsh cputime 100000 infinity secs 48885 zsh filesize infinity infinity bytes 48885 zsh datasize 524288k 524288k bytes 48885 zsh stacksize 65536k 65536k bytes 48885 zsh coredumpsize 95367M 95367M bytes 48885 zsh memoryuse infinity infinity bytes 48885 zsh memorylocked infinity infinity bytes 48885 zsh maxprocesses 5547 5547 48885 zsh openfiles 11095 11095 48885 zsh sbsize infinity infinity bytes 48885 zsh vmemoryuse infinity infinity bytes 48885 zsh pseudo-terminals infinity infinity 48885 zsh swapuse infinity infinity bytes Personally I like the first variant as the most compact and the easiest to maintain but would be glad to learn what other think about this or may be have other suggestions. A couple other variations: PID COMM RLIMIT SOFT HARD UNIT 47062 zsh cpu 100000 infinity secs 47062 zsh fsize infinity infinity bytes 47062 zsh data 524288k 524288k bytes 47062 zsh stack 67108864 67108864 bytes 47062 zsh core 9765625k 9765625k bytes 47062 zsh rss infinity infinity bytes 47062 zsh memlock infinity infinity bytes 47062 zsh nproc 5547 5547 47062 zsh nofile 11095 11095 47062 zsh sbsize infinity infinity bytes 47062 zsh vmem infinity infinity bytes 47062 zsh npts infinity infinity 47062 zsh swap infinity infinity bytes PID COMM RLIMIT SOFT HARD UNIT 48798 zsh cputime 100000 infinity secs 48798 zsh filesize infinity infinity bytes 48798 zsh datasize 524288k 524288k bytes 48798 zsh stacksize 65536k 65536k bytes 48798 zsh coredumpsize 95367M 95367M bytes 48798 zsh memoryuse infinity infinity bytes 48798 zsh memorylocked infinity infinity bytes 48798 zsh maxprocesses 5547 5547 48798 zsh openfiles 11095 11095 48798 zsh sbsize infinity infinity bytes 48798 zsh vmemoryuse infinity infinity bytes 48798 zsh pseudo-terminals infinity infinity 48798 zsh swapuse infinity infinity bytes -- Mikolaj Golub From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 22:12:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42B79106564A; Sat, 3 Dec 2011 22:12:58 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31FB28FC08; Sat, 3 Dec 2011 22:12:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3MCwra058507; Sat, 3 Dec 2011 22:12:58 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3MCwGF058505; Sat, 3 Dec 2011 22:12:58 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201112032212.pB3MCwGF058505@svn.freebsd.org> From: Hiroki Sato Date: Sat, 3 Dec 2011 22:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228244 - stable/9/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 22:12:58 -0000 Author: hrs Date: Sat Dec 3 22:12:57 2011 New Revision: 228244 URL: http://svn.freebsd.org/changeset/base/228244 Log: MFC r226446: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address. Approved by: re (bz) Modified: stable/9/sys/netinet6/nd6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Sat Dec 3 19:56:52 2011 (r228243) +++ stable/9/sys/netinet6/nd6.c Sat Dec 3 22:12:57 2011 (r228244) @@ -1364,7 +1364,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru " duplicate.\n"); } else { ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED; - in6_if_up(ifp); + if (ifp->if_flags & IFF_UP) + in6_if_up(ifp); } } else if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && (ND.flags & ND6_IFF_IFDISABLED)) { @@ -1382,35 +1383,37 @@ nd6_ioctl(u_long cmd, caddr_t data, stru IF_ADDR_UNLOCK(ifp); } - if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - (ND.flags & ND6_IFF_AUTO_LINKLOCAL)) { - /* auto_linklocal 0->1 transision */ - - /* If no link-local address on ifp, configure */ - ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; - in6_ifattach(ifp, NULL); - } else if ((ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - !(ND.flags & ND6_IFF_IFDISABLED)) { - /* - * When the IF already has - * ND6_IFF_AUTO_LINKLOCAL and no link-local - * address is assigned, try to assign one. - */ - int haslinklocal = 0; + if (ND.flags & ND6_IFF_AUTO_LINKLOCAL) { + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL)) { + /* auto_linklocal 0->1 transision */ + + /* If no link-local address on ifp, configure */ + ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; + in6_ifattach(ifp, NULL); + } else if (!(ND.flags & ND6_IFF_IFDISABLED) && + ifp->if_flags & IFF_UP) { + /* + * When the IF already has + * ND6_IFF_AUTO_LINKLOCAL, no link-local + * address is assigned, and IFF_UP, try to + * assign one. + */ + int haslinklocal = 0; - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET6) - continue; - ia = (struct in6_ifaddr *)ifa; - if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { - haslinklocal = 1; - break; + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + ia = (struct in6_ifaddr *)ifa; + if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { + haslinklocal = 1; + break; + } } + IF_ADDR_UNLOCK(ifp); + if (!haslinklocal) + in6_ifattach(ifp, NULL); } - IF_ADDR_UNLOCK(ifp); - if (!haslinklocal) - in6_ifattach(ifp, NULL); } } ND_IFINFO(ifp)->flags = ND.flags; From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 22:14:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602C91065673; Sat, 3 Dec 2011 22:14:16 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F93D8FC13; Sat, 3 Dec 2011 22:14:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3MEGJZ058577; Sat, 3 Dec 2011 22:14:16 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3MEG1H058574; Sat, 3 Dec 2011 22:14:16 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201112032214.pB3MEG1H058574@svn.freebsd.org> From: Hiroki Sato Date: Sat, 3 Dec 2011 22:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228245 - in stable/9: etc share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 22:14:16 -0000 Author: hrs Date: Sat Dec 3 22:14:15 2011 New Revision: 228245 URL: http://svn.freebsd.org/changeset/base/228245 Log: MFC r226649, 226651, 226652, 226653: - Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty. - Add description that IPv6 configuration will be ignored if $ifconfig_IF_ipv6 is empty. - Move a configuration example "inet6 accept_rtadv" to just after the manual GUA configuration. - Add an example of $ipv6_prefix_IF. - Add support for removing addresses added by ipv6_prefix_hostid_addr_up() upon rc.d/netif stop. Approved by: re (bz) Modified: stable/9/etc/network.subr stable/9/share/man/man5/rc.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man5/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Sat Dec 3 22:12:57 2011 (r228244) +++ stable/9/etc/network.subr Sat Dec 3 22:14:15 2011 (r228245) @@ -532,7 +532,7 @@ ipv4_up() # Add 127.0.0.1/8 to lo0 unless otherwise specified. if [ "${_if}" = "lo0" ]; then - ifconfig_args=`ifconfig_getargs ${_if}` + ifconfig_args=`get_if_var ${_if} ifconfig_IF` if [ -z "${ifconfig_args}" ]; then ifconfig ${_if} inet 127.0.0.1/8 alias fi @@ -556,7 +556,7 @@ ipv6_up() fi ifalias_up ${_if} inet6 && _ret=0 - ipv6_prefix_hostid_addr_up ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 ipv6_accept_rtadv_up ${_if} && _ret=0 # wait for DAD @@ -612,6 +612,7 @@ ipv6_down() fi ipv6_accept_rtadv_down ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias_down ${_if} inet6 && _ret=0 inetList="`ifconfig ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" @@ -859,12 +860,14 @@ ifalias_ipv6_down() return $_ret } -# ipv6_prefix_hostid_addr_up if -# add IPv6 prefix + hostid addr to the interface $if -ipv6_prefix_hostid_addr_up() +# ipv6_prefix_hostid_addr_common if action +# Add or remove IPv6 prefix + hostid addr on the interface $if +# +ipv6_prefix_hostid_addr_common() { - local _if prefix laddr hostid j address + local _if _action prefix laddr hostid j address _if=$1 + _action=$2 prefix=`get_if_var ${_if} ipv6_prefix_IF` if [ -n "${prefix}" ]; then @@ -874,13 +877,13 @@ ipv6_prefix_hostid_addr_up() for j in ${prefix}; do address=$j\:${hostid} - ifconfig ${_if} inet6 ${address} prefixlen 64 alias + ifconfig ${_if} inet6 ${address} prefixlen 64 ${_action} # if I am a router, add subnet router # anycast address (RFC 2373). if checkyesno ipv6_gateway_enable; then ifconfig ${_if} inet6 $j:: prefixlen 64 \ - alias anycast + ${_action} anycast fi done fi Modified: stable/9/share/man/man5/rc.conf.5 ============================================================================== --- stable/9/share/man/man5/rc.conf.5 Sat Dec 3 22:12:57 2011 (r228244) +++ stable/9/share/man/man5/rc.conf.5 Sat Dec 3 22:14:15 2011 (r228245) @@ -1423,6 +1423,11 @@ IPv6 functionality on an interface shoul .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , instead of setting ifconfig parameters in .Va ifconfig_ Ns Aq Ar interface . +If this variable is empty, all of IPv6 configurations on the +specified interface by other variables such as +.Va ipv6_prefix_ Ns Ao Ar interface Ac +will be ignored. +.Pp Aliases should be set by .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n with @@ -1433,6 +1438,17 @@ ifconfig_ed0_ipv6="inet6 2001:db8:1::1 p ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" .Ed .Pp +Interfaces that have an +.Dq Li inet6 accept_rtadv +keyword in +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +setting will be automatically configured by SLAAC +.Pq StateLess Address AutoConfiguration +described in +.Rs +.%T "RFC 4862" +.Re +.Pp Note that a link-local address will be automatically configured in addition to the configured global-scope addresses because the IPv6 specifications require it on each link. @@ -1457,19 +1473,32 @@ For example: .Bd -literal ifconfig_ed0_ipv6="inet6 fe80::1 prefixlen 64" .Ed -.Pp -Interfaces that have an -.Dq Li inet6 accept_rtadv -keyword in -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 -setting will be automatically configured by -.Xr rtsol 8 . .It Va ipv6_prefix_ Ns Aq Ar interface .Pq Vt str If one or more prefixes are defined in .Va ipv6_prefix_ Ns Aq Ar interface addresses based on each prefix and the EUI-64 interface index will be configured on that interface. +Note that this variable will be ignored when +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +is empty. +.Pp +For example, the following configuration +.Bd -literal +ipv6_prefix_ed0="2001:db8:1:0 2001:db8:2:0" +.Ed +.Pp +is equivalent to the following: +.Bd -literal +ifconfig_ed0_alias0="inet6 2001:db8:1:: eui64 prefixlen 64" +ifconfig_ed0_alias1="inet6 2001:db8:1:: prefixlen 64 anycast" +ifconfig_ed0_alias2="inet6 2001:db8:2:: eui64 prefixlen 64" +ifconfig_ed0_alias3="inet6 2001:db8:2:: prefixlen 64 anycast" +.Ed +.Pp +These Subnet-Router anycast addresses will be added only when +.Va ipv6_gateway_enable +is YES. .It Va ipv6_default_interface .Pq Vt str If not set to From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 22:15:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B9541065670; Sat, 3 Dec 2011 22:15:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 116198FC13; Sat, 3 Dec 2011 22:15:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3MFgq3058660; Sat, 3 Dec 2011 22:15:42 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3MFgYw058658; Sat, 3 Dec 2011 22:15:42 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201112032215.pB3MFgYw058658@svn.freebsd.org> From: Hiroki Sato Date: Sat, 3 Dec 2011 22:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228246 - releng/9.0/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 22:15:43 -0000 Author: hrs Date: Sat Dec 3 22:15:42 2011 New Revision: 228246 URL: http://svn.freebsd.org/changeset/base/228246 Log: MFC r226446: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address. Approved by: re (bz) Modified: releng/9.0/sys/netinet6/nd6.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/amd64/include/xen/ (props changed) releng/9.0/sys/boot/ (props changed) releng/9.0/sys/boot/i386/efi/ (props changed) releng/9.0/sys/boot/ia64/efi/ (props changed) releng/9.0/sys/boot/ia64/ski/ (props changed) releng/9.0/sys/boot/powerpc/boot1.chrp/ (props changed) releng/9.0/sys/boot/powerpc/ofw/ (props changed) releng/9.0/sys/cddl/contrib/opensolaris/ (props changed) releng/9.0/sys/conf/ (props changed) releng/9.0/sys/contrib/dev/acpica/ (props changed) releng/9.0/sys/contrib/octeon-sdk/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) releng/9.0/sys/contrib/x86emu/ (props changed) Modified: releng/9.0/sys/netinet6/nd6.c ============================================================================== --- releng/9.0/sys/netinet6/nd6.c Sat Dec 3 22:14:15 2011 (r228245) +++ releng/9.0/sys/netinet6/nd6.c Sat Dec 3 22:15:42 2011 (r228246) @@ -1364,7 +1364,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru " duplicate.\n"); } else { ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED; - in6_if_up(ifp); + if (ifp->if_flags & IFF_UP) + in6_if_up(ifp); } } else if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && (ND.flags & ND6_IFF_IFDISABLED)) { @@ -1382,35 +1383,37 @@ nd6_ioctl(u_long cmd, caddr_t data, stru IF_ADDR_UNLOCK(ifp); } - if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - (ND.flags & ND6_IFF_AUTO_LINKLOCAL)) { - /* auto_linklocal 0->1 transision */ - - /* If no link-local address on ifp, configure */ - ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; - in6_ifattach(ifp, NULL); - } else if ((ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - !(ND.flags & ND6_IFF_IFDISABLED)) { - /* - * When the IF already has - * ND6_IFF_AUTO_LINKLOCAL and no link-local - * address is assigned, try to assign one. - */ - int haslinklocal = 0; + if (ND.flags & ND6_IFF_AUTO_LINKLOCAL) { + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL)) { + /* auto_linklocal 0->1 transision */ + + /* If no link-local address on ifp, configure */ + ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; + in6_ifattach(ifp, NULL); + } else if (!(ND.flags & ND6_IFF_IFDISABLED) && + ifp->if_flags & IFF_UP) { + /* + * When the IF already has + * ND6_IFF_AUTO_LINKLOCAL, no link-local + * address is assigned, and IFF_UP, try to + * assign one. + */ + int haslinklocal = 0; - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET6) - continue; - ia = (struct in6_ifaddr *)ifa; - if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { - haslinklocal = 1; - break; + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + ia = (struct in6_ifaddr *)ifa; + if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { + haslinklocal = 1; + break; + } } + IF_ADDR_UNLOCK(ifp); + if (!haslinklocal) + in6_ifattach(ifp, NULL); } - IF_ADDR_UNLOCK(ifp); - if (!haslinklocal) - in6_ifattach(ifp, NULL); } } ND_IFINFO(ifp)->flags = ND.flags; From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 22:16:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB1A11065672; Sat, 3 Dec 2011 22:16:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF468FC25; Sat, 3 Dec 2011 22:16:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3MGaot058731; Sat, 3 Dec 2011 22:16:36 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3MGa7q058728; Sat, 3 Dec 2011 22:16:36 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201112032216.pB3MGa7q058728@svn.freebsd.org> From: Hiroki Sato Date: Sat, 3 Dec 2011 22:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228247 - in releng/9.0: etc share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 22:16:37 -0000 Author: hrs Date: Sat Dec 3 22:16:36 2011 New Revision: 228247 URL: http://svn.freebsd.org/changeset/base/228247 Log: MFC r226649, 226651, 226652, 226653: - Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty. - Add description that IPv6 configuration will be ignored if $ifconfig_IF_ipv6 is empty. - Move a configuration example "inet6 accept_rtadv" to just after the manual GUA configuration. - Add an example of $ipv6_prefix_IF. - Add support for removing addresses added by ipv6_prefix_hostid_addr_up() upon rc.d/netif stop. Approved by: re (bz) Modified: releng/9.0/etc/network.subr releng/9.0/share/man/man5/rc.conf.5 Directory Properties: releng/9.0/etc/ (props changed) releng/9.0/share/man/man5/ (props changed) Modified: releng/9.0/etc/network.subr ============================================================================== --- releng/9.0/etc/network.subr Sat Dec 3 22:15:42 2011 (r228246) +++ releng/9.0/etc/network.subr Sat Dec 3 22:16:36 2011 (r228247) @@ -532,7 +532,7 @@ ipv4_up() # Add 127.0.0.1/8 to lo0 unless otherwise specified. if [ "${_if}" = "lo0" ]; then - ifconfig_args=`ifconfig_getargs ${_if}` + ifconfig_args=`get_if_var ${_if} ifconfig_IF` if [ -z "${ifconfig_args}" ]; then ifconfig ${_if} inet 127.0.0.1/8 alias fi @@ -556,7 +556,7 @@ ipv6_up() fi ifalias_up ${_if} inet6 && _ret=0 - ipv6_prefix_hostid_addr_up ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 ipv6_accept_rtadv_up ${_if} && _ret=0 # wait for DAD @@ -612,6 +612,7 @@ ipv6_down() fi ipv6_accept_rtadv_down ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias_down ${_if} inet6 && _ret=0 inetList="`ifconfig ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" @@ -859,12 +860,14 @@ ifalias_ipv6_down() return $_ret } -# ipv6_prefix_hostid_addr_up if -# add IPv6 prefix + hostid addr to the interface $if -ipv6_prefix_hostid_addr_up() +# ipv6_prefix_hostid_addr_common if action +# Add or remove IPv6 prefix + hostid addr on the interface $if +# +ipv6_prefix_hostid_addr_common() { - local _if prefix laddr hostid j address + local _if _action prefix laddr hostid j address _if=$1 + _action=$2 prefix=`get_if_var ${_if} ipv6_prefix_IF` if [ -n "${prefix}" ]; then @@ -874,13 +877,13 @@ ipv6_prefix_hostid_addr_up() for j in ${prefix}; do address=$j\:${hostid} - ifconfig ${_if} inet6 ${address} prefixlen 64 alias + ifconfig ${_if} inet6 ${address} prefixlen 64 ${_action} # if I am a router, add subnet router # anycast address (RFC 2373). if checkyesno ipv6_gateway_enable; then ifconfig ${_if} inet6 $j:: prefixlen 64 \ - alias anycast + ${_action} anycast fi done fi Modified: releng/9.0/share/man/man5/rc.conf.5 ============================================================================== --- releng/9.0/share/man/man5/rc.conf.5 Sat Dec 3 22:15:42 2011 (r228246) +++ releng/9.0/share/man/man5/rc.conf.5 Sat Dec 3 22:16:36 2011 (r228247) @@ -1423,6 +1423,11 @@ IPv6 functionality on an interface shoul .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , instead of setting ifconfig parameters in .Va ifconfig_ Ns Aq Ar interface . +If this variable is empty, all of IPv6 configurations on the +specified interface by other variables such as +.Va ipv6_prefix_ Ns Ao Ar interface Ac +will be ignored. +.Pp Aliases should be set by .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n with @@ -1433,6 +1438,17 @@ ifconfig_ed0_ipv6="inet6 2001:db8:1::1 p ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" .Ed .Pp +Interfaces that have an +.Dq Li inet6 accept_rtadv +keyword in +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +setting will be automatically configured by SLAAC +.Pq StateLess Address AutoConfiguration +described in +.Rs +.%T "RFC 4862" +.Re +.Pp Note that a link-local address will be automatically configured in addition to the configured global-scope addresses because the IPv6 specifications require it on each link. @@ -1457,19 +1473,32 @@ For example: .Bd -literal ifconfig_ed0_ipv6="inet6 fe80::1 prefixlen 64" .Ed -.Pp -Interfaces that have an -.Dq Li inet6 accept_rtadv -keyword in -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 -setting will be automatically configured by -.Xr rtsol 8 . .It Va ipv6_prefix_ Ns Aq Ar interface .Pq Vt str If one or more prefixes are defined in .Va ipv6_prefix_ Ns Aq Ar interface addresses based on each prefix and the EUI-64 interface index will be configured on that interface. +Note that this variable will be ignored when +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +is empty. +.Pp +For example, the following configuration +.Bd -literal +ipv6_prefix_ed0="2001:db8:1:0 2001:db8:2:0" +.Ed +.Pp +is equivalent to the following: +.Bd -literal +ifconfig_ed0_alias0="inet6 2001:db8:1:: eui64 prefixlen 64" +ifconfig_ed0_alias1="inet6 2001:db8:1:: prefixlen 64 anycast" +ifconfig_ed0_alias2="inet6 2001:db8:2:: eui64 prefixlen 64" +ifconfig_ed0_alias3="inet6 2001:db8:2:: prefixlen 64 anycast" +.Ed +.Pp +These Subnet-Router anycast addresses will be added only when +.Va ipv6_gateway_enable +is YES. .It Va ipv6_default_interface .Pq Vt str If not set to From owner-svn-src-all@FreeBSD.ORG Sat Dec 3 23:36:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C728106566B; Sat, 3 Dec 2011 23:36:36 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6274D8FC12; Sat, 3 Dec 2011 23:36:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB3Naam8061201; Sat, 3 Dec 2011 23:36:36 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB3Naamo061199; Sat, 3 Dec 2011 23:36:36 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112032336.pB3Naamo061199@svn.freebsd.org> From: Alan Cox Date: Sat, 3 Dec 2011 23:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228248 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 23:36:36 -0000 Author: alc Date: Sat Dec 3 23:36:36 2011 New Revision: 228248 URL: http://svn.freebsd.org/changeset/base/228248 Log: MFC r215597 Optimize vm_object_terminate(). Modified: stable/8/sys/vm/vm_object.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Sat Dec 3 22:16:36 2011 (r228247) +++ stable/8/sys/vm/vm_object.c Sat Dec 3 23:36:36 2011 (r228248) @@ -679,7 +679,7 @@ vm_object_destroy(vm_object_t object) void vm_object_terminate(vm_object_t object) { - vm_page_t p; + vm_page_t p, p_next; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); @@ -719,23 +719,41 @@ vm_object_terminate(vm_object_t object) object->ref_count)); /* - * Now free any remaining pages. For internal objects, this also - * removes them from paging queues. Don't free wired pages, just - * remove them from the object. + * Free any remaining pageable pages. This also removes them from the + * paging queues. However, don't free wired pages, just remove them + * from the object. Rather than incrementally removing each page from + * the object, the page and object are reset to any empty state. */ vm_page_lock_queues(); - while ((p = TAILQ_FIRST(&object->memq)) != NULL) { + TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { KASSERT(!p->busy && (p->oflags & VPO_BUSY) == 0, - ("vm_object_terminate: freeing busy page %p " - "p->busy = %d, p->oflags %x\n", p, p->busy, p->oflags)); + ("vm_object_terminate: freeing busy page %p", p)); + /* + * Optimize the page's removal from the object by resetting + * its "object" field. Specifically, if the page is not + * wired, then the effect of this assignment is that + * vm_page_free()'s call to vm_page_remove() will return + * immediately without modifying the page or the object. + */ + p->object = NULL; if (p->wire_count == 0) { vm_page_free(p); cnt.v_pfree++; - } else { - vm_page_remove(p); } } vm_page_unlock_queues(); + /* + * If the object contained any pages, then reset it to an empty state. + * None of the object's fields, including "resident_page_count", were + * modified by the preceding loop. + */ + if (object->resident_page_count != 0) { + object->root = NULL; + TAILQ_INIT(&object->memq); + object->resident_page_count = 0; + if (object->type == OBJT_VNODE) + vdrop(object->handle); + } #if VM_NRESERVLEVEL > 0 if (__predict_false(!LIST_EMPTY(&object->rvq)))