From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 4 13:00:27 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3B2D106566B; Sun, 4 Oct 2009 13:00:27 +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 D19AB8FC13; Sun, 4 Oct 2009 13:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n94D0RA2074542; Sun, 4 Oct 2009 13:00:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94D0Rfj074540; Sun, 4 Oct 2009 13:00:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910041300.n94D0Rfj074540@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Oct 2009 13:00:27 +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: r197745 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 13:00:28 -0000 Author: kib Date: Sun Oct 4 13:00:27 2009 New Revision: 197745 URL: http://svn.freebsd.org/changeset/base/197745 Log: MFC r197660: Fix typo. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_sig.c Modified: stable/7/sys/kern/kern_sig.c ============================================================================== --- stable/7/sys/kern/kern_sig.c Sun Oct 4 12:20:59 2009 (r197744) +++ stable/7/sys/kern/kern_sig.c Sun Oct 4 13:00:27 2009 (r197745) @@ -1953,7 +1953,7 @@ sigtd(struct proc *p, int sig, int prop) /* * Check if current thread can handle the signal without - * switching conetxt to another thread. + * switching context to another thread. */ if (curproc == p && !SIGISMEMBER(curthread->td_sigmask, sig)) return (curthread); From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 4 13:03:07 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC1F106566B; Sun, 4 Oct 2009 13:03:07 +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 C87048FC13; Sun, 4 Oct 2009 13:03:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n94D37BI074649; Sun, 4 Oct 2009 13:03:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94D37MK074647; Sun, 4 Oct 2009 13:03:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910041303.n94D37MK074647@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Oct 2009 13:03:07 +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: r197746 - in stable/7/sys: . contrib/pf vm X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 13:03:08 -0000 Author: kib Date: Sun Oct 4 13:03:07 2009 New Revision: 197746 URL: http://svn.freebsd.org/changeset/base/197746 Log: MFC r197661: Move the annotation for vm_map_startup() immediately before the function. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/vm/vm_map.c Modified: stable/7/sys/vm/vm_map.c ============================================================================== --- stable/7/sys/vm/vm_map.c Sun Oct 4 13:00:27 2009 (r197745) +++ stable/7/sys/vm/vm_map.c Sun Oct 4 13:03:07 2009 (r197746) @@ -115,22 +115,6 @@ __FBSDID("$FreeBSD$"); * another, and then marking both regions as copy-on-write. */ -/* - * vm_map_startup: - * - * Initialize the vm_map module. Must be called before - * any other vm_map routines. - * - * Map and entry structures are allocated from the general - * purpose memory pool with some exceptions: - * - * - The kernel map and kmem submap are allocated statically. - * - Kernel map entries are allocated out of a static pool. - * - * These restrictions are necessary since malloc() uses the - * maps and requires map entries. - */ - static struct mtx map_sleep_mtx; static uma_zone_t mapentzone; static uma_zone_t kmapentzone; @@ -171,6 +155,22 @@ static void vmspace_zdtor(void *mem, int start = end; \ } +/* + * vm_map_startup: + * + * Initialize the vm_map module. Must be called before + * any other vm_map routines. + * + * Map and entry structures are allocated from the general + * purpose memory pool with some exceptions: + * + * - The kernel map and kmem submap are allocated statically. + * - Kernel map entries are allocated out of a static pool. + * + * These restrictions are necessary since malloc() uses the + * maps and requires map entries. + */ + void vm_map_startup(void) { From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 4 17:16:11 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D98B3106568D; Sun, 4 Oct 2009 17:16:11 +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 C891B8FC0A; Sun, 4 Oct 2009 17:16:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n94HGBiB080193; Sun, 4 Oct 2009 17:16:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94HGBGk080191; Sun, 4 Oct 2009 17:16:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910041716.n94HGBGk080191@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 4 Oct 2009 17:16: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: r197748 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 17:16:12 -0000 Author: jilles Date: Sun Oct 4 17:16:11 2009 New Revision: 197748 URL: http://svn.freebsd.org/changeset/base/197748 Log: MFC r197371: Mention that NUL characters are not allowed in sh(1) input. I do not consider this a bug because POSIX permits it and argument strings and environment variables cannot contain '\0' anyway. PR: bin/25542 Modified: stable/7/bin/sh/ (props changed) stable/7/bin/sh/sh.1 Modified: stable/7/bin/sh/sh.1 ============================================================================== --- stable/7/bin/sh/sh.1 Sun Oct 4 16:30:33 2009 (r197747) +++ stable/7/bin/sh/sh.1 Sun Oct 4 17:16:11 2009 (r197748) @@ -375,6 +375,10 @@ introduces a comment if used at the begi The word starting with .Ql # and the rest of the line are ignored. +.Pp +.Tn ASCII +.Dv NUL +characters (character code 0) are not allowed in shell input. .Ss Quoting Quoting is used to remove the special meaning of certain characters or words to the shell, such as operators, whitespace, keywords, From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 4 17:22:52 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F8F71065670; Sun, 4 Oct 2009 17:22:52 +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 F28018FC13; Sun, 4 Oct 2009 17:22:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n94HMpFs080380; Sun, 4 Oct 2009 17:22:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94HMpq7080378; Sun, 4 Oct 2009 17:22:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910041722.n94HMpq7080378@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 4 Oct 2009 17:22:51 +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: r197749 - stable/7/usr.bin/find X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 17:22:52 -0000 Author: jilles Date: Sun Oct 4 17:22:51 2009 New Revision: 197749 URL: http://svn.freebsd.org/changeset/base/197749 Log: MFC r197363: Update find(1) man page for -L/-delete interaction. It is a bit unfortunate that the example to delete broken symlinks now uses rm(1), but allowing this with -delete would require fixing fts(3) to not imply FTS_NOCHDIR if FTS_LOGICAL is given (or hacks in the -delete option). PR: bin/90687 Modified: stable/7/usr.bin/find/ (props changed) stable/7/usr.bin/find/find.1 Modified: stable/7/usr.bin/find/find.1 ============================================================================== --- stable/7/usr.bin/find/find.1 Sun Oct 4 17:16:11 2009 (r197748) +++ stable/7/usr.bin/find/find.1 Sun Oct 4 17:22:51 2009 (r197749) @@ -306,6 +306,7 @@ character in its pathname relative to .Dq Pa \&. for security reasons. Depth-first traversal processing is implied by this option. +Following symlinks is incompatible with this option. .It Ic -depth Always true; same as the @@ -843,7 +844,7 @@ recent than the current time minus one m Use the .Xr echo 1 command to print out a list of all the files. -.It Li "find -L /usr/ports/packages -type l -delete" +.It Li "find -L /usr/ports/packages -type l -exec rm -- {} +" Delete all broken symbolic links in .Pa /usr/ports/packages . .It Li "find /usr/src -name CVS -prune -o -depth +6 -print" From owner-svn-src-stable-7@FreeBSD.ORG Sun Oct 4 21:48:17 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 692BF1065672; Sun, 4 Oct 2009 21:48:17 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 579988FC16; Sun, 4 Oct 2009 21:48:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n94LmHm3086391; Sun, 4 Oct 2009 21:48:17 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n94LmHCD086389; Sun, 4 Oct 2009 21:48:17 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200910042148.n94LmHCD086389@svn.freebsd.org> From: Joe Marcus Clarke Date: Sun, 4 Oct 2009 21:48:17 +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: r197759 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Oct 2009 21:48:17 -0000 Author: marcus (doc,ports committer) Date: Sun Oct 4 21:48:17 2009 New Revision: 197759 URL: http://svn.freebsd.org/changeset/base/197759 Log: MFC: rev. 197681 Correct the pthread stub prototype for pthread_mutexattr_settype to allow for the type argument. This is known to fix some pthread_mutexattr_settype() invocations, especially when it comes to pulseaudio. Approved by: kib Modified: stable/7/lib/libc/gen/_pthread_stubs.c Modified: stable/7/lib/libc/gen/_pthread_stubs.c ============================================================================== --- stable/7/lib/libc/gen/_pthread_stubs.c Sun Oct 4 21:46:43 2009 (r197758) +++ stable/7/lib/libc/gen/_pthread_stubs.c Sun Oct 4 21:48:17 2009 (r197759) @@ -222,7 +222,7 @@ STUB_FUNC1(pthread_mutex_trylock, PJT_MU STUB_FUNC1(pthread_mutex_unlock, PJT_MUTEX_UNLOCK, int, void *) STUB_FUNC1(pthread_mutexattr_destroy, PJT_MUTEXATTR_DESTROY, int, void *) STUB_FUNC1(pthread_mutexattr_init, PJT_MUTEXATTR_INIT, int, void *) -STUB_FUNC1(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *) +STUB_FUNC2(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *, int) STUB_FUNC2(pthread_once, PJT_ONCE, int, void *, void *) STUB_FUNC1(pthread_rwlock_destroy, PJT_RWLOCK_DESTROY, int, void *) STUB_FUNC2(pthread_rwlock_init, PJT_RWLOCK_INIT, int, void *, void *) From owner-svn-src-stable-7@FreeBSD.ORG Tue Oct 6 21:49:14 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA51106566B; Tue, 6 Oct 2009 21:49:14 +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 EF8B38FC0C; Tue, 6 Oct 2009 21:49:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n96LnDxA065034; Tue, 6 Oct 2009 21:49:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96LnDgL065032; Tue, 6 Oct 2009 21:49:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200910062149.n96LnDgL065032@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 6 Oct 2009 21:49:13 +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: r197819 - in stable/7/usr.sbin/lpr: . lp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 21:49:14 -0000 Author: jilles Date: Tue Oct 6 21:49:13 2009 New Revision: 197819 URL: http://svn.freebsd.org/changeset/base/197819 Log: MFC r197625: Fix using lp(1) without the new -t option after r195349. Modified: stable/7/usr.sbin/lpr/ (props changed) stable/7/usr.sbin/lpr/lp/lp.sh Modified: stable/7/usr.sbin/lpr/lp/lp.sh ============================================================================== --- stable/7/usr.sbin/lpr/lp/lp.sh Tue Oct 6 21:46:03 2009 (r197818) +++ stable/7/usr.sbin/lpr/lp/lp.sh Tue Oct 6 21:49:13 2009 (r197819) @@ -70,7 +70,7 @@ do s) # (silent option) : ;; t) # title for banner page - title="-J${OPTARG}";; + title="${OPTARG}";; *) # (error msg printed by getopts) exit 2;; esac @@ -78,4 +78,4 @@ done shift $(($OPTIND - 1)) -exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} "${title}" "$@" +exec /usr/bin/lpr "-P${dest}" ${symlink} ${ncopies} ${mailafter} ${title:+-J"${title}"} "$@" From owner-svn-src-stable-7@FreeBSD.ORG Tue Oct 6 22:19:34 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0981F10656BD; Tue, 6 Oct 2009 22:19:34 +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 EB12F8FC15; Tue, 6 Oct 2009 22:19:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n96MJW5p065811; Tue, 6 Oct 2009 22:19:32 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96MJWow065808; Tue, 6 Oct 2009 22:19:32 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200910062219.n96MJWow065808@svn.freebsd.org> From: Doug Barton Date: Tue, 6 Oct 2009 22:19:32 +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: r197822 - stable/7/usr.bin/whois X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 22:19:34 -0000 Author: dougb Date: Tue Oct 6 22:19:32 2009 New Revision: 197822 URL: http://svn.freebsd.org/changeset/base/197822 Log: MFC r197725: The 6bone was decommissioned on 6/6/06, so remove references to it. Modified: stable/7/usr.bin/whois/ (props changed) stable/7/usr.bin/whois/whois.1 stable/7/usr.bin/whois/whois.c Modified: stable/7/usr.bin/whois/whois.1 ============================================================================== --- stable/7/usr.bin/whois/whois.1 Tue Oct 6 22:15:12 2009 (r197821) +++ stable/7/usr.bin/whois/whois.1 Tue Oct 6 22:19:32 2009 (r197822) @@ -32,7 +32,7 @@ .\" From: @(#)whois.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 23, 2006 +.Dd October 2, 2009 .Dt WHOIS 1 .Os .Sh NAME @@ -40,7 +40,7 @@ .Nd "Internet domain name and network number directory service" .Sh SYNOPSIS .Nm -.Op Fl aAbdfgiIklmQrR6 +.Op Fl aAbdfgiIklmQrR .Op Fl c Ar country-code | Fl h Ar host .Op Fl p Ar port .Ar name ... @@ -212,17 +212,14 @@ This option is deprecated; use the option with an argument of .Qq Li RU instead. -.It Fl 6 -Use the IPv6 Resource Center -.Pq Tn 6bone -database. -It contains network names and addresses for the IPv6 network. -.El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. +.El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Most types of data, such as domain names and .Tn IP @@ -255,15 +252,6 @@ but other .Tn TLDs can be queried by using a similar syntax.) .Pp -The following example demonstrates how to obtain information about an -.Tn IPv6 -address or hostname using the -.Fl 6 -option, which directs the query to -.Tn 6bone . -.Pp -.Dl "whois -6 IPv6-IP-Address" -.Pp The following example demonstrates how to query a whois server using a non-standard port, where .Dq Li query-data Modified: stable/7/usr.bin/whois/whois.c ============================================================================== --- stable/7/usr.bin/whois/whois.c Tue Oct 6 22:15:12 2009 (r197821) +++ stable/7/usr.bin/whois/whois.c Tue Oct 6 22:19:32 2009 (r197822) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #define PNICHOST "whois.apnic.net" #define MNICHOST "whois.ra.net" #define QNICHOST_TAIL ".whois-servers.net" -#define SNICHOST "whois.6bone.net" #define BNICHOST "whois.registro.br" #define NORIDHOST "whois.norid.no" #define IANAHOST "whois.iana.org" @@ -164,8 +163,10 @@ main(int argc, char *argv[]) warnx("-R is deprecated; use '-c ru' instead"); country = "ru"; break; + /* Remove in FreeBSD 10 */ case '6': - host = SNICHOST; + errx(EX_USAGE, + "-6 is deprecated; use -[aAflr] instead"); break; case '?': default: From owner-svn-src-stable-7@FreeBSD.ORG Wed Oct 7 15:41:30 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FE621065672; Wed, 7 Oct 2009 15:41:30 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44E6C8FC17; Wed, 7 Oct 2009 15:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n97FfUrs089114; Wed, 7 Oct 2009 15:41:30 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n97FfU9G089113; Wed, 7 Oct 2009 15:41:30 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200910071541.n97FfU9G089113@svn.freebsd.org> From: Joe Marcus Clarke Date: Wed, 7 Oct 2009 15:41:30 +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: r197839 - stable/7/lib/libc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 15:41:30 -0000 Author: marcus (doc,ports committer) Date: Wed Oct 7 15:41:30 2009 New Revision: 197839 URL: http://svn.freebsd.org/changeset/base/197839 Log: Record mergeinfo data for r197681. Approved by: kib Modified: stable/7/lib/libc/ (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 8 09:03:05 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D8D106566B; Thu, 8 Oct 2009 09:03:05 +0000 (UTC) (envelope-from snb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC7F8FC19; Thu, 8 Oct 2009 09:03:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n989345h017464; Thu, 8 Oct 2009 09:03:04 GMT (envelope-from snb@svn.freebsd.org) Received: (from snb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n98934BO017462; Thu, 8 Oct 2009 09:03:04 GMT (envelope-from snb@svn.freebsd.org) Message-Id: <200910080903.n98934BO017462@svn.freebsd.org> From: Sean Nicholas Barkas Date: Thu, 8 Oct 2009 09:03:04 +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: r197852 - in stable/7/sys: . ufs/ufs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 09:03:05 -0000 Author: snb Date: Thu Oct 8 09:03:04 2009 New Revision: 197852 URL: http://svn.freebsd.org/changeset/base/197852 Log: MFC r193375, r194387, r195003: Add vm_lowmem event handler for dirhash. This will cause dirhashes to be deleted when the system is low on memory. This ought to allow an increase to vfs.ufs.dirhash_maxmem on machines that have lots of memory, without degrading performance by having too much memory reserved for dirhash when other things need it. The default value for dirhash_maxmem is being kept at 2MB for now, though. Approved by: dwmalone (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/ufs/ufs/dirhash.h stable/7/sys/ufs/ufs/ufs_dirhash.c Modified: stable/7/sys/ufs/ufs/dirhash.h ============================================================================== --- stable/7/sys/ufs/ufs/dirhash.h Thu Oct 8 00:22:42 2009 (r197851) +++ stable/7/sys/ufs/ufs/dirhash.h Thu Oct 8 09:03:04 2009 (r197852) @@ -105,6 +105,8 @@ struct dirhash { int dh_onlist; /* true if on the ufsdirhash_list chain */ + time_t dh_lastused; /* time the dirhash was last read or written*/ + /* Protected by ufsdirhash_mtx. */ TAILQ_ENTRY(dirhash) dh_list; /* chain of all dirhashes */ }; Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_dirhash.c Thu Oct 8 00:22:42 2009 (r197851) +++ stable/7/sys/ufs/ufs/ufs_dirhash.c Thu Oct 8 09:03:04 2009 (r197852) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -81,6 +83,13 @@ SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_m static int ufs_dirhashcheck = 0; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_docheck, CTLFLAG_RW, &ufs_dirhashcheck, 0, "enable extra sanity tests"); +static int ufs_dirhashlowmemcount = 0; +SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_lowmemcount, CTLFLAG_RD, + &ufs_dirhashlowmemcount, 0, "number of times low memory hook called"); +static int ufs_dirhashreclaimage = 5; +SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_reclaimage, CTLFLAG_RW, + &ufs_dirhashreclaimage, 0, + "max time in seconds of hash inactivity before deletion in low VM events"); static int ufsdirhash_hash(struct dirhash *dh, char *name, int namelen); @@ -90,6 +99,7 @@ static int ufsdirhash_findslot(struct di doff_t offset); static doff_t ufsdirhash_getprev(struct direct *dp, doff_t offset); static int ufsdirhash_recycle(int wanted); +static void ufsdirhash_lowmem(void); static void ufsdirhash_free_locked(struct inode *ip); static uma_zone_t ufsdirhash_zone; @@ -387,6 +397,7 @@ ufsdirhash_build(struct inode *ip) dh->dh_seqopt = 0; dh->dh_seqoff = 0; dh->dh_score = DH_SCOREINIT; + dh->dh_lastused = time_second; /* * Use non-blocking mallocs so that we will revert to a linear @@ -563,6 +574,9 @@ ufsdirhash_lookup(struct inode *ip, char /* Update the score. */ if (dh->dh_score < DH_SCOREMAX) dh->dh_score++; + + /* Update last used time. */ + dh->dh_lastused = time_second; DIRHASHLIST_UNLOCK(); vp = ip->i_vnode; @@ -805,6 +819,9 @@ ufsdirhash_add(struct inode *ip, struct dh->dh_hused++; DH_ENTRY(dh, slot) = offset; + /* Update last used time. */ + dh->dh_lastused = time_second; + /* Update the per-block summary info. */ ufsdirhash_adjfree(dh, offset, -DIRSIZ(0, dirp)); ufsdirhash_release(dh); @@ -1144,6 +1161,44 @@ ufsdirhash_getprev(struct direct *dirp, } /* + * Delete the given dirhash and reclaim its memory. Assumes that + * ufsdirhash_list is locked, and leaves it locked. Also assumes + * that dh is locked. Returns the amount of memory freed. + */ +static int +ufsdirhash_destroy(struct dirhash *dh) +{ + doff_t **hash; + u_int8_t *blkfree; + int i, mem, narrays; + + KASSERT(dh->dh_hash != NULL, ("dirhash: NULL hash on list")); + + /* Remove it from the list and detach its memory. */ + TAILQ_REMOVE(&ufsdirhash_list, dh, dh_list); + dh->dh_onlist = 0; + hash = dh->dh_hash; + dh->dh_hash = NULL; + blkfree = dh->dh_blkfree; + dh->dh_blkfree = NULL; + narrays = dh->dh_narrays; + mem = dh->dh_memreq; + dh->dh_memreq = 0; + + /* Unlock dirhash and free the detached memory. */ + ufsdirhash_release(dh); + for (i = 0; i < narrays; i++) + DIRHASH_BLKFREE(hash[i]); + free(hash, M_DIRHASH); + free(blkfree, M_DIRHASH); + + /* Account for the returned memory. */ + ufs_dirhashmem -= mem; + + return (mem); +} + +/* * Try to free up `wanted' bytes by stealing memory from existing * dirhashes. Returns zero with list locked if successful. */ @@ -1151,9 +1206,6 @@ static int ufsdirhash_recycle(int wanted) { struct dirhash *dh; - doff_t **hash; - u_int8_t *blkfree; - int i, mem, narrays; DIRHASHLIST_LOCK(); dh = TAILQ_FIRST(&ufsdirhash_list); @@ -1171,36 +1223,61 @@ ufsdirhash_recycle(int wanted) dh = TAILQ_NEXT(dh, dh_list); continue; } - KASSERT(dh->dh_hash != NULL, ("dirhash: NULL hash on list")); - /* Remove it from the list and detach its memory. */ - TAILQ_REMOVE(&ufsdirhash_list, dh, dh_list); - dh->dh_onlist = 0; - hash = dh->dh_hash; - dh->dh_hash = NULL; - blkfree = dh->dh_blkfree; - dh->dh_blkfree = NULL; - narrays = dh->dh_narrays; - mem = dh->dh_memreq; - dh->dh_memreq = 0; + ufsdirhash_destroy(dh); - /* Unlock everything, free the detached memory. */ - ufsdirhash_release(dh); - DIRHASHLIST_UNLOCK(); - for (i = 0; i < narrays; i++) - DIRHASH_BLKFREE(hash[i]); - FREE(hash, M_DIRHASH); - FREE(blkfree, M_DIRHASH); - - /* Account for the returned memory, and repeat if necessary. */ - DIRHASHLIST_LOCK(); - ufs_dirhashmem -= mem; + /* Repeat if necessary. */ dh = TAILQ_FIRST(&ufsdirhash_list); } /* Success; return with list locked. */ return (0); } +/* + * Callback that frees some dirhashes when the system is low on virtual memory. + */ +static void +ufsdirhash_lowmem() +{ + struct dirhash *dh, *dh_temp; + int memfreed = 0; + /* XXX: this 10% may need to be adjusted */ + int memwanted = ufs_dirhashmem / 10; + + ufs_dirhashlowmemcount++; + + DIRHASHLIST_LOCK(); + /* + * Delete dirhashes not used for more than ufs_dirhashreclaimage + * seconds. If we can't get a lock on the dirhash, it will be skipped. + */ + TAILQ_FOREACH_SAFE(dh, &ufsdirhash_list, dh_list, dh_temp) { + if (!sx_try_xlock(&dh->dh_lock)) + continue; + if (time_second - dh->dh_lastused > ufs_dirhashreclaimage) + memfreed += ufsdirhash_destroy(dh); + /* Unlock if we didn't delete the dirhash */ + else + ufsdirhash_release(dh); + } + + /* + * If not enough memory was freed, keep deleting hashes from the head + * of the dirhash list. The ones closest to the head should be the + * oldest. + */ + if (memfreed < memwanted) { + TAILQ_FOREACH_SAFE(dh, &ufsdirhash_list, dh_list, dh_temp) { + if (!sx_try_xlock(&dh->dh_lock)) + continue; + memfreed += ufsdirhash_destroy(dh); + if (memfreed >= memwanted) + break; + } + } + DIRHASHLIST_UNLOCK(); +} + void ufsdirhash_init() @@ -1209,6 +1286,10 @@ ufsdirhash_init() NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); mtx_init(&ufsdirhash_mtx, "dirhash list", NULL, MTX_DEF); TAILQ_INIT(&ufsdirhash_list); + + /* Register a callback function to handle low memory signals */ + EVENTHANDLER_REGISTER(vm_lowmem, ufsdirhash_lowmem, NULL, + EVENTHANDLER_PRI_FIRST); } void From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 8 11:42:24 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7E51065672; Thu, 8 Oct 2009 11:42:24 +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 9BF8B8FC1E; Thu, 8 Oct 2009 11:42:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n98BgOPS021908; Thu, 8 Oct 2009 11:42:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n98BgOGp021906; Thu, 8 Oct 2009 11:42:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200910081142.n98BgOGp021906@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Oct 2009 11:42:24 +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: r197857 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 11:42:24 -0000 Author: kib Date: Thu Oct 8 11:42:24 2009 New Revision: 197857 URL: http://svn.freebsd.org/changeset/base/197857 Log: MFC r197662: Do not dereference vp->v_mount without holding vnode lock and checking that the vnode is not reclaimed. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/uipc_syscalls.c Modified: stable/7/sys/kern/uipc_syscalls.c ============================================================================== --- stable/7/sys/kern/uipc_syscalls.c Thu Oct 8 11:36:06 2009 (r197856) +++ stable/7/sys/kern/uipc_syscalls.c Thu Oct 8 11:42:24 2009 (r197857) @@ -2076,9 +2076,11 @@ retry_space: /* * Get the page from backing store. */ - bsize = vp->v_mount->mnt_stat.f_iosize; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_SHARED | LK_RETRY, td); + error = vn_lock(vp, LK_SHARED, td); + if (error != 0) + goto after_read; + bsize = vp->v_mount->mnt_stat.f_iosize; /* * XXXMAC: Because we don't have fp->f_cred @@ -2091,6 +2093,7 @@ retry_space: IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); VOP_UNLOCK(vp, 0, td); + after_read: VFS_UNLOCK_GIANT(vfslocked); VM_OBJECT_LOCK(obj); vm_page_io_finish(pg); From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 8 17:11:02 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AA7F106566B; Thu, 8 Oct 2009 17:11:02 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68D738FC14; Thu, 8 Oct 2009 17:11:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n98HB2x6028250; Thu, 8 Oct 2009 17:11:02 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n98HB2eV028248; Thu, 8 Oct 2009 17:11:02 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <200910081711.n98HB2eV028248@svn.freebsd.org> From: Stefan Farfeleder Date: Thu, 8 Oct 2009 17:11:02 +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: r197862 - stable/7/bin/sh X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 17:11:02 -0000 Author: stefanf Date: Thu Oct 8 17:11:01 2009 New Revision: 197862 URL: http://svn.freebsd.org/changeset/base/197862 Log: Merge r191009. > Parse 'cmd1 && ! cmd2 | cmd3' correctly, the bang should apply to the entire > pipeline cmd2 | cmd3 and not just cmd2. Modified: stable/7/bin/sh/ (props changed) stable/7/bin/sh/parser.c Modified: stable/7/bin/sh/parser.c ============================================================================== --- stable/7/bin/sh/parser.c Thu Oct 8 16:05:17 2009 (r197861) +++ stable/7/bin/sh/parser.c Thu Oct 8 17:11:01 2009 (r197862) @@ -250,6 +250,7 @@ pipeline(void) int negate; negate = 0; + checkkwd = 2; TRACE(("pipeline: entered\n")); while (readtoken() == TNOT) negate = !negate;