From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 02:43:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63EE01065672; Sun, 3 Jan 2010 02:43:47 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 539638FC13; Sun, 3 Jan 2010 02:43:47 +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 o032hl64028551; Sun, 3 Jan 2010 02:43:47 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o032hlLX028549; Sun, 3 Jan 2010 02:43:47 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201001030243.o032hlLX028549@svn.freebsd.org> From: Matt Jacob Date: Sun, 3 Jan 2010 02:43: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: r201408 - head/sys/dev/isp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 02:43:47 -0000 Author: mjacob Date: Sun Jan 3 02:43:46 2010 New Revision: 201408 URL: http://svn.freebsd.org/changeset/base/201408 Log: Make sure that the WWNN is also created for 2100..2300 cards. MFC after: 1 day Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sun Jan 3 00:27:35 2010 (r201407) +++ head/sys/dev/isp/isp.c Sun Jan 3 02:43:46 2010 (r201408) @@ -8285,6 +8285,8 @@ isp_parse_nvram_2100(ispsoftc_t *isp, ui if ((wwn >> 60) == 0) { wwn |= (((uint64_t) 2)<< 60); } + } else { + wwn = fcp->isp_wwpn_nvram & ~((uint64_t) 0xfff << 48); } } else { wwn &= ~((uint64_t) 0xfff << 48); From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 02:58:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DF42106566B; Sun, 3 Jan 2010 02:58:43 +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 6DC998FC2C; Sun, 3 Jan 2010 02:58:43 +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 o032whDh031915; Sun, 3 Jan 2010 02:58:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o032wh8K031913; Sun, 3 Jan 2010 02:58:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001030258.o032wh8K031913@svn.freebsd.org> From: Marius Strobl Date: Sun, 3 Jan 2010 02:58:43 +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: r201410 - head/sys/sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 02:58:43 -0000 Author: marius Date: Sun Jan 3 02:58:43 2010 New Revision: 201410 URL: http://svn.freebsd.org/changeset/base/201410 Log: Exclude options COMPAT_FREEBSD4 now that the MD freebsd4_sigreturn() is gone since r201396 and which is also in line with the fact that FreeBSD 4 didn't supported sparc64. Modified: head/sys/sparc64/conf/NOTES Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Sun Jan 3 02:58:05 2010 (r201409) +++ head/sys/sparc64/conf/NOTES Sun Jan 3 02:58:43 2010 (r201410) @@ -129,6 +129,7 @@ nodevice ex # Options we don't want to deal with nooption FDC_DEBUG +nooption COMPAT_FREEBSD4 nooption SC_RENDER_DEBUG nooption SC_DEBUG_LEVEL nooption PPC_DEBUG From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 04:38:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA4061065693; Sun, 3 Jan 2010 04:38:38 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9DB58FC17; Sun, 3 Jan 2010 04:38:38 +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 o034ccKY056423; Sun, 3 Jan 2010 04:38:38 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o034cc7w056420; Sun, 3 Jan 2010 04:38:38 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201001030438.o034cc7w056420@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 3 Jan 2010 04:38: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: r201415 - head/sys/pc98/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 04:38:38 -0000 Author: nyan Date: Sun Jan 3 04:38:38 2010 New Revision: 201415 URL: http://svn.freebsd.org/changeset/base/201415 Log: Re-enable more options and devices. Now kernel size problem is gone. MFC after: 2 week Modified: head/sys/pc98/conf/GENERIC Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Jan 3 03:35:23 2010 (r201414) +++ head/sys/pc98/conf/GENERIC Sun Jan 3 04:38:38 2010 (r201415) @@ -38,7 +38,7 @@ options SCHED_4BSD # 4BSD scheduler #options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists @@ -46,13 +46,13 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client -#options NFSSERVER # Network Filesystem Server -#options NFSLOCKD # Network Lock Manager +options NFSSERVER # Network Filesystem Server +options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCLIENT options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -#options PSEUDOFS # Pseudo-filesystem framework +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) @@ -66,9 +66,9 @@ options EPSON_BOUNCEDMA # use bounce b #options LINE30 options KTRACE # ktrace(1) support options STACK # stack(9) support -#options SYSVSHM # SYSV-style shared memory -#options SYSVMSG # SYSV-style message queues -#options SYSVSEM # SYSV-style semaphores +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev @@ -114,9 +114,9 @@ device sym # NCR/Symbios Logic (newer device aic # PC-9801-100 device ct # host adapter using WD33C93[ABC] chip (C bus) -#device ncv # NCR 53C500 -#device nsp # Workbit Ninja SCSI-3 -#device stg # TMC 18C30/18C50 +device ncv # NCR 53C500 +device nsp # Workbit Ninja SCSI-3 +device stg # TMC 18C30/18C50 # SCSI peripherals device scbus # SCSI bus (required for SCSI) @@ -155,9 +155,9 @@ device sc # PCCARD (PCMCIA) support # PCMCIA and cardbus bridge support -#device cbb # cardbus (yenta) bridge -#device pccard # PC Card (16-bit) bus -#device cardbus # CardBus (32-bit) bus +device cbb # cardbus (yenta) bridge +device pccard # PC Card (16-bit) bus +device cardbus # CardBus (32-bit) bus # Serial (COM) ports #options COM_MULTIPORT @@ -169,15 +169,15 @@ device mse #device joy # NEW Parallel port -#device ppc -#device ppbus # Parallel port bus (required) -#device lpt # Printer -#device plip # TCP/IP over parallel -#device ppi # Parallel port interface device +device ppc +device ppbus # Parallel port bus (required) +device lpt # Printer +device plip # TCP/IP over parallel +device ppi # Parallel port interface device #device vpo # Requires scbus and da # OLD Parallel port # Please stay olpt driver after ppc driver -#device olpt +device olpt # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 06:43:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A5E11065679; Sun, 3 Jan 2010 06:43:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 694E18FC15; Sun, 3 Jan 2010 06:43: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 o036hDGu092254; Sun, 3 Jan 2010 06:43:13 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o036hDQ6092252; Sun, 3 Jan 2010 06:43:13 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001030643.o036hDQ6092252@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 3 Jan 2010 06:43: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: r201416 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 06:43:13 -0000 Author: np Date: Sun Jan 3 06:43:13 2010 New Revision: 201416 URL: http://svn.freebsd.org/changeset/base/201416 Log: Avoid NULL dereference in arpresolve. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Jan 3 04:38:38 2010 (r201415) +++ head/sys/netinet/if_ether.c Sun Jan 3 06:43:13 2010 (r201416) @@ -372,8 +372,8 @@ retry: if (la->la_asked < V_arp_maxtries) error = EWOULDBLOCK; /* First request. */ else - error = - (rt0->rt_flags & RTF_GATEWAY) ? EHOSTUNREACH : EHOSTDOWN; + error = rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) ? + EHOSTUNREACH : EHOSTDOWN; if (renew) { LLE_ADDREF(la); From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 08:33:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99692106568B; Sun, 3 Jan 2010 08:33:24 +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 878508FC27; Sun, 3 Jan 2010 08:33: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 o038XOKD024152; Sun, 3 Jan 2010 08:33:24 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o038XOdb024150; Sun, 3 Jan 2010 08:33:24 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001030833.o038XOdb024150@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 3 Jan 2010 08:33: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: r201419 - head/tools/regression/acct X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 08:33:24 -0000 Author: obrien Date: Sun Jan 3 08:33:24 2010 New Revision: 201419 URL: http://svn.freebsd.org/changeset/base/201419 Log: Transform from kernel file to userland source. Modified: head/tools/regression/acct/Makefile Modified: head/tools/regression/acct/Makefile ============================================================================== --- head/tools/regression/acct/Makefile Sun Jan 3 06:50:49 2010 (r201418) +++ head/tools/regression/acct/Makefile Sun Jan 3 08:33:24 2010 (r201419) @@ -6,12 +6,16 @@ PROG= pack NO_MAN= +CFLAGS= -include /usr/include/sys/limits.h \ + -include /usr/include/sys/syslog.h + all: regress pack: pack.c convert.c convert.c: ../../../sys/kern/kern_acct.c - sed -n '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? >$@ + sed -n -e 's/log(/syslog(/g' \ + -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' $? >$@ regress: pack regress.t ./regress.t From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 08:44:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBBC1065672; Sun, 3 Jan 2010 08:44:18 +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 92B518FC15; Sun, 3 Jan 2010 08:44:18 +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 o038iInD027341; Sun, 3 Jan 2010 08:44:18 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o038iIlw027339; Sun, 3 Jan 2010 08:44:18 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001030844.o038iIlw027339@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 3 Jan 2010 08:44:18 +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: r201420 - head/tools/regression/acct X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 08:44:18 -0000 Author: obrien Date: Sun Jan 3 08:44:18 2010 New Revision: 201420 URL: http://svn.freebsd.org/changeset/base/201420 Log: Make sure 'pack' is usable for 'prove -r'. Modified: head/tools/regression/acct/regress.t (contents, props changed) Modified: head/tools/regression/acct/regress.t ============================================================================== --- head/tools/regression/acct/regress.t Sun Jan 3 08:33:24 2010 (r201419) +++ head/tools/regression/acct/regress.t Sun Jan 3 08:44:18 2010 (r201420) @@ -17,6 +17,8 @@ check() fi } +(cd $DIR ; make pack) + echo 1..7 check 1 0 0 From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 09:30:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E07B1065672; Sun, 3 Jan 2010 09:30:51 +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 F01E78FC0A; Sun, 3 Jan 2010 09:30:50 +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 o039Uoxt040993; Sun, 3 Jan 2010 09:30:50 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o039Uors040991; Sun, 3 Jan 2010 09:30:50 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001030930.o039Uors040991@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 3 Jan 2010 09:30:50 +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: r201421 - head/tools/regression/bin/date X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 09:30:51 -0000 Author: obrien Date: Sun Jan 3 09:30:50 2010 New Revision: 201421 URL: http://svn.freebsd.org/changeset/base/201421 Log: Allow to be driven by 'prove -r'. Modified: head/tools/regression/bin/date/regress.sh Modified: head/tools/regression/bin/date/regress.sh ============================================================================== --- head/tools/regression/bin/date/regress.sh Sun Jan 3 08:44:18 2010 (r201420) +++ head/tools/regression/bin/date/regress.sh Sun Jan 3 09:30:50 2010 (r201421) @@ -29,25 +29,29 @@ check() A1=$2 A2=$3 - count=`expr ${count} + 1` - if [ -z "${A2}" ]; then A2=${A1}; fi + count=`expr ${count} + 1` + R=`date -r ${TEST1} +%${S}` if [ "${R}" = "${A1}" ]; then - echo "${count}a. ${S} - ok" + echo "ok ${count} - ${S}(a)" else - echo "${count}a. ${S} - not ok (got ${R}, expected ${A1})" + echo "no ok ${count} - ${S}(a) (got ${R}, expected ${A1})" fi + count=`expr ${count} + 1` + R=`date -r ${TEST2} +%${S}` if [ "${R}" = "${A2}" ]; then - echo "${count}b. ${S} - ok" + echo "ok ${count} - ${S}(b)" else - echo "${count}b. ${S} - not ok (got ${R}, expected ${A2})" + echo "no ok ${count} - ${S}(b) (got ${R}, expected ${A2})" fi } +echo "1..78" + check A Saturday Monday check a Sat Mon check B February November From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 09:31:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F51106568F; Sun, 3 Jan 2010 09:31:34 +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 436888FC0A; Sun, 3 Jan 2010 09:31:34 +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 o039VYrF041246; Sun, 3 Jan 2010 09:31:34 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o039VYnQ041244; Sun, 3 Jan 2010 09:31:34 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001030931.o039VYnQ041244@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 3 Jan 2010 09:31: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: r201422 - head/tools/regression/bin/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 09:31:34 -0000 Author: obrien Date: Sun Jan 3 09:31:33 2010 New Revision: 201422 URL: http://svn.freebsd.org/changeset/base/201422 Log: Hide expected error output so the 'prove -r' results are easy to read. Modified: head/tools/regression/bin/mv/regress.sh Modified: head/tools/regression/bin/mv/regress.sh ============================================================================== --- head/tools/regression/bin/mv/regress.sh Sun Jan 3 09:30:50 2010 (r201421) +++ head/tools/regression/bin/mv/regress.sh Sun Jan 3 09:31:33 2010 (r201422) @@ -184,7 +184,7 @@ do # Should fail per POSIX step 3a: # Destination path is a file of type directory and # source_file is not a file of type directory - mv 1/2/3/fa ${FS}db + mv 1/2/3/fa ${FS}db 2>/dev/null ckfail $? ckf fa 1/2/3/fa end @@ -238,7 +238,7 @@ do mkd da1/da2/da3/da mkdir -p ${FS}db1/db2/db3/da/full # Should fail (per the semantics of rename(2)) - mv da1/da2/da3/da ${FS}db1/db2/db3 + mv da1/da2/da3/da ${FS}db1/db2/db3 2>/dev/null ckfail $? ckd da da1/da2/da3/da end @@ -250,7 +250,7 @@ do # Should fail per POSIX step 3b: # Destination path is a file not of type directory # and source_file is a file of type directory - mv da1/da2/da3/da ${FS}db1/db2/db3/da + mv da1/da2/da3/da ${FS}db1/db2/db3/da 2>/dev/null ckfail $? ckd da da1/da2/da3/da end From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 11:53:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C97D106566C; Sun, 3 Jan 2010 11:53:48 +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 6AFD18FC19; Sun, 3 Jan 2010 11:53:48 +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 o03BrmDm087182; Sun, 3 Jan 2010 11:53:48 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03Brmlu087180; Sun, 3 Jan 2010 11:53:48 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001031153.o03Brmlu087180@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 3 Jan 2010 11:53: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: r201426 - head/tools/regression/usr.bin/jot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 11:53:48 -0000 Author: obrien Date: Sun Jan 3 11:53:48 2010 New Revision: 201426 URL: http://svn.freebsd.org/changeset/base/201426 Log: Provide clean output with 'prove -r'. Modified: head/tools/regression/usr.bin/jot/regress.sh Modified: head/tools/regression/usr.bin/jot/regress.sh ============================================================================== --- head/tools/regression/usr.bin/jot/regress.sh Sun Jan 3 11:04:49 2010 (r201425) +++ head/tools/regression/usr.bin/jot/regress.sh Sun Jan 3 11:53:48 2010 (r201426) @@ -52,8 +52,8 @@ REGRESSION_TEST(`wo', `jot -w "a%ob" 10' REGRESSION_TEST(`wx', `jot -w "a%xb" 10') REGRESSION_TEST(`wX1', `jot -w "a%Xb" 10') REGRESSION_TEST(`wXl', `jot -w "a%Xb" 10 2147483648') -REGRESSION_TEST(`wdl', `jot -w "a%db" 10 2147483648') -REGRESSION_TEST(`wxn', `jot -w "a%xb" 10 -5') +REGRESSION_TEST(`wdl', `jot -w "a%db" 10 2147483648 2>/dev/null') +REGRESSION_TEST(`wxn', `jot -w "a%xb" 10 -5 2>/dev/null') REGRESSION_TEST(`wdn', `jot -w "a%db" 10 -5') REGRESSION_TEST(`wp1', `jot -w "%%%d%%%%" 10') REGRESSION_TEST(`wp2', `jot -w "%d%%d%%" 10') From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 12:17:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A64E1106568F; Sun, 3 Jan 2010 12:17:51 +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 94F7F8FC0A; Sun, 3 Jan 2010 12:17: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 o03CHprI096508; Sun, 3 Jan 2010 12:17:51 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03CHp65096506; Sun, 3 Jan 2010 12:17:51 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001031217.o03CHp65096506@svn.freebsd.org> From: "David E. O'Brien" Date: Sun, 3 Jan 2010 12:17: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: r201427 - head/tools/regression/bin/date X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 12:17:51 -0000 Author: obrien Date: Sun Jan 3 12:17:51 2010 New Revision: 201427 URL: http://svn.freebsd.org/changeset/base/201427 Log: Use t1 & t2 as more symbolic than 'a' and 'b' for the two times. Modified: head/tools/regression/bin/date/regress.sh Modified: head/tools/regression/bin/date/regress.sh ============================================================================== --- head/tools/regression/bin/date/regress.sh Sun Jan 3 11:53:48 2010 (r201426) +++ head/tools/regression/bin/date/regress.sh Sun Jan 3 12:17:51 2010 (r201427) @@ -29,24 +29,22 @@ check() A1=$2 A2=$3 - if [ -z "${A2}" ]; then A2=${A1}; fi - count=`expr ${count} + 1` + if [ -z "${A2}" ]; then A2=${A1}; fi + R=`date -r ${TEST1} +%${S}` if [ "${R}" = "${A1}" ]; then - echo "ok ${count} - ${S}(a)" + echo "ok ${S}{t1}" else - echo "no ok ${count} - ${S}(a) (got ${R}, expected ${A1})" + echo "no ok ${S}{t1} - (got ${R}, expected ${A1})" fi - count=`expr ${count} + 1` - R=`date -r ${TEST2} +%${S}` if [ "${R}" = "${A2}" ]; then - echo "ok ${count} - ${S}(b)" + echo "ok ${S}{t2}" else - echo "no ok ${count} - ${S}(b) (got ${R}, expected ${A2})" + echo "no ok ${S}{t2} - (got ${R}, expected ${A2})" fi } From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 12:50:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A3D21065695; Sun, 3 Jan 2010 12:50:28 +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 E52118FC13; Sun, 3 Jan 2010 12:50: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 o03CoRlm009281; Sun, 3 Jan 2010 12:50:27 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03CoRtc009279; Sun, 3 Jan 2010 12:50:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201001031250.o03CoRtc009279@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 3 Jan 2010 12:50: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: r201428 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 12:50:28 -0000 Author: jilles Date: Sun Jan 3 12:50:27 2010 New Revision: 201428 URL: http://svn.freebsd.org/changeset/base/201428 Log: sh: Add a regression test that tries out all arithmetic ops. MFC after: 1 week Added: head/tools/regression/bin/sh/expansion/arith2.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith2.0 Sun Jan 3 12:50:27 2010 (r201428) @@ -0,0 +1,76 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ $(($1)) != $2 ]; then + failures=$((failures+1)) + echo "For $1, expected $2 actual $(($1))" + fi +} + +# variables +unset v +check "v=2" 2 +check "v" 2 +check "$(($v))" 2 +check "v+=1" 3 +check "v" 3 + +# constants +check "4611686018427387904" 4611686018427387904 +check "0x4000000000000000" 4611686018427387904 +check "0400000000000000000000" 4611686018427387904 +check "0x4Ab0000000000000" 5381801554707742720 + +# try out all operators +v=42 +check "!v" 0 +check "!!v" 1 +check "!0" 1 +check "~0" -1 +check "~(-1)" 0 +check "-0" 0 +check "-v" -42 +check "v*v" 1764 +check "v/2" 21 +check "v%10" 2 +check "v+v" 84 +check "v-4" 38 +check "v<<1" 84 +check "v>>1" 21 +check "v<43" 1 +check "v>42" 0 +check "v<=43" 1 +check "v>=43" 0 +check "v==41" 0 +check "v!=42" 0 +check "v&3" 2 +check "v^3" 41 +check "v|3" 43 +check "v>=40&&v<=44" 1 +check "v<40||v>44" 0 +check "(v=42)&&(v+=1)==43" 1 +check "v" 43 +check "(v=42)&&(v-=1)==41" 1 +check "v" 41 +check "(v=42)&&(v*=2)==84" 1 +check "v" 84 +check "(v=42)&&(v/=10)==4" 1 +check "v" 4 +check "(v=42)&&(v%=10)==2" 1 +check "v" 2 +check "(v=42)&&(v<<=1)==84" 1 +check "v" 84 +check "(v=42)&&(v>>=2)==10" 1 +check "v" 10 +check "(v=42)&&(v&=32)==32" 1 +check "v" 32 +check "(v=42)&&(v^=32)==10" 1 +check "v" 10 +check "(v=42)&&(v|=32)==42" 1 +check "v" 42 + +# missing: ternary, comma + +exit $((failures != 0)) From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 13:48:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 158C3106568F; Sun, 3 Jan 2010 13:48:59 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 050E78FC1E; Sun, 3 Jan 2010 13:48:59 +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 o03Dmw78033825; Sun, 3 Jan 2010 13:48:58 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03DmwLW033823; Sun, 3 Jan 2010 13:48:58 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001031348.o03DmwLW033823@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 3 Jan 2010 13:48: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: r201429 - head/usr.bin/tftp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 13:48:59 -0000 Author: gavin Date: Sun Jan 3 13:48:58 2010 New Revision: 201429 URL: http://svn.freebsd.org/changeset/base/201429 Log: Fix return code in the case of successful file transfer, broken in tftp.c 1.13 PR: bin/117452 Submitted by: Spencer Minear minear securecomputing.com Approved by: ed (mentor) MFC after: 2 weeks Modified: head/usr.bin/tftp/tftp.c Modified: head/usr.bin/tftp/tftp.c ============================================================================== --- head/usr.bin/tftp/tftp.c Sun Jan 3 12:50:27 2010 (r201428) +++ head/usr.bin/tftp/tftp.c Sun Jan 3 13:48:58 2010 (r201429) @@ -140,6 +140,7 @@ send_data: (struct sockaddr *)&peer, peer.ss_len); if (n != size + 4) { warn("sendto"); + txrx_error = 1; goto abort; } read_ahead(file, convert); @@ -153,6 +154,7 @@ send_data: alarm(0); if (n < 0) { warn("recvfrom"); + txrx_error = 1; goto abort; } if (!serv.ss_family) @@ -160,6 +162,7 @@ send_data: else if (!cmpport((struct sockaddr *)&serv, (struct sockaddr *)&from)) { warn("server port mismatch"); + txrx_error = 1; goto abort; } peer = from; @@ -202,7 +205,6 @@ abort: stopclock(); if (amount > 0) printstats("Sent", amount); - txrx_error = 1; } /* @@ -255,6 +257,7 @@ send_ack: peer.ss_len) != size) { alarm(0); warn("sendto"); + txrx_error = 1; goto abort; } write_behind(file, convert); @@ -268,6 +271,7 @@ send_ack: alarm(0); if (n < 0) { warn("recvfrom"); + txrx_error = 1; goto abort; } if (!serv.ss_family) @@ -275,6 +279,7 @@ send_ack: else if (!cmpport((struct sockaddr *)&serv, (struct sockaddr *)&from)) { warn("server port mismatch"); + txrx_error = 1; goto abort; } peer = from; @@ -325,7 +330,6 @@ abort: /* ok to ack, since user */ stopclock(); if (amount > 0) printstats("Received", amount); - txrx_error = 1; } static int From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 13:59:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 930441065692; Sun, 3 Jan 2010 13:59:59 +0000 (UTC) (envelope-from mbr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8254F8FC18; Sun, 3 Jan 2010 13:59:59 +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 o03DxxFm038740; Sun, 3 Jan 2010 13:59:59 GMT (envelope-from mbr@svn.freebsd.org) Received: (from mbr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03DxxBp038737; Sun, 3 Jan 2010 13:59:59 GMT (envelope-from mbr@svn.freebsd.org) Message-Id: <201001031359.o03DxxBp038737@svn.freebsd.org> From: Martin Blapp Date: Sun, 3 Jan 2010 13:59: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: r201430 - head/sys/dev/dc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 13:59:59 -0000 Author: mbr Date: Sun Jan 3 13:59:59 2010 New Revision: 201430 URL: http://svn.freebsd.org/changeset/base/201430 Log: Fix card/device names, no functional change The ADMtek AN985 is the cardbus variant of ADMtek AN983 The Netgear FA511 is just a relabled ADMtek AN985 PR: kern/50574 MFC after: 1 month Modified: head/sys/dev/dc/if_dc.c head/sys/dev/dc/if_dcreg.h Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Sun Jan 3 13:48:58 2010 (r201429) +++ head/sys/dev/dc/if_dc.c Sun Jan 3 13:59:59 2010 (r201430) @@ -43,8 +43,9 @@ __FBSDID("$FreeBSD$"); * ASIX Electronics AX88140A (www.asix.com.tw) * ASIX Electronics AX88141 (www.asix.com.tw) * ADMtek AL981 (www.admtek.com.tw) - * ADMtek AN985 (www.admtek.com.tw) - * Netgear FA511 (www.netgear.com) Appears to be rebadged ADMTek AN985 + * ADMtek AN983 (www.admtek.com.tw) + * ADMtek cardbus AN985 (www.admtek.com.tw) + * Netgear FA511 (www.netgear.com) Appears to be rebadged ADMTek cardbus AN985 * Davicom DM9100, DM9102, DM9102A (www.davicom8.com) * Accton EN1217 (www.accton.com) * Xircom X3201 (www.xircom.com) @@ -161,14 +162,14 @@ static const struct dc_type dc_devs[] = "Davicom DM9102 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AL981), 0, "ADMtek AL981 10/100BaseTX" }, + { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN983), 0, + "ADMtek AN983 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN985), 0, - "ADMtek AN985 10/100BaseTX" }, + "ADMtek AN985 cardBus 10/100BaseTX or clone" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_ADM9511), 0, "ADMtek ADM9511 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_ADM9513), 0, "ADMtek ADM9513 10/100BaseTX" }, - { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_FA511), 0, - "Netgear FA511 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ASIX, DC_DEVICEID_AX88140A), DC_REVISION_88141, "ASIX AX88141 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ASIX, DC_DEVICEID_AX88140A), 0, @@ -778,10 +779,10 @@ dc_miibus_readreg(device_t dev, int phy, bzero(&frame, sizeof(frame)); /* - * Note: both the AL981 and AN985 have internal PHYs, + * Note: both the AL981 and AN983 have internal PHYs, * however the AL981 provides direct access to the PHY - * registers while the AN985 uses a serial MII interface. - * The AN985's MII interface is also buggy in that you + * registers while the AN983 uses a serial MII interface. + * The AN983's MII interface is also buggy in that you * can read from any MII address (0 to 31), but only address 1 * behaves normally. To deal with both cases, we pretend * that the PHY is at MII address 1. @@ -1895,11 +1896,11 @@ dc_attach(device_t dev) sc->dc_pmode = DC_PMODE_MII; dc_read_srom(sc, sc->dc_romwidth); break; + case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN983): case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN985): case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_ADM9511): case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_ADM9513): case DC_DEVID(DC_VENDORID_DLINK, DC_DEVICEID_DRP32TXD): - case DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_FA511): case DC_DEVID(DC_VENDORID_ABOCOM, DC_DEVICEID_FE2500): case DC_DEVID(DC_VENDORID_ABOCOM, DC_DEVICEID_FE2500MX): case DC_DEVID(DC_VENDORID_ACCTON, DC_DEVICEID_EN2242): @@ -1910,7 +1911,7 @@ dc_attach(device_t dev) case DC_DEVID(DC_VENDORID_MICROSOFT, DC_DEVICEID_MSMN130): case DC_DEVID(DC_VENDORID_LINKSYS, DC_DEVICEID_PCMPC200_AB08): case DC_DEVID(DC_VENDORID_LINKSYS, DC_DEVICEID_PCMPC200_AB09): - sc->dc_type = DC_TYPE_AN985; + sc->dc_type = DC_TYPE_AN983; sc->dc_flags |= DC_64BIT_HASH; sc->dc_flags |= DC_TX_USE_TX_INTR; sc->dc_flags |= DC_TX_ADMTEK_WAR; @@ -2057,7 +2058,7 @@ dc_attach(device_t dev) dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, 0); break; case DC_TYPE_AL981: - case DC_TYPE_AN985: + case DC_TYPE_AN983: reg = CSR_READ_4(sc, DC_AL_PAR0); mac = (uint8_t *)&eaddr[0]; mac[0] = (reg >> 0) & 0xff; Modified: head/sys/dev/dc/if_dcreg.h ============================================================================== --- head/sys/dev/dc/if_dcreg.h Sun Jan 3 13:48:58 2010 (r201429) +++ head/sys/dev/dc/if_dcreg.h Sun Jan 3 13:59:59 2010 (r201430) @@ -72,7 +72,7 @@ #define DC_TYPE_21143 0x4 /* Intel 21143 */ #define DC_TYPE_ASIX 0x5 /* ASIX AX88140A/AX88141 */ #define DC_TYPE_AL981 0x6 /* ADMtek AL981 Comet */ -#define DC_TYPE_AN985 0x7 /* ADMtek AN985 Centaur */ +#define DC_TYPE_AN983 0x7 /* ADMtek AN983 Centaur */ #define DC_TYPE_DM9102 0x8 /* Davicom DM9102 */ #define DC_TYPE_PNICII 0x9 /* 82c115 PNIC II */ #define DC_TYPE_PNIC 0xA /* 82c168/82c169 PNIC I */ @@ -86,12 +86,12 @@ #define DC_IS_ADMTEK(x) \ (x->dc_type == DC_TYPE_AL981 || \ - x->dc_type == DC_TYPE_AN985) + x->dc_type == DC_TYPE_AN983) #define DC_IS_INTEL(x) (x->dc_type == DC_TYPE_21143) #define DC_IS_ASIX(x) (x->dc_type == DC_TYPE_ASIX) #define DC_IS_COMET(x) (x->dc_type == DC_TYPE_AL981) -#define DC_IS_CENTAUR(x) (x->dc_type == DC_TYPE_AN985) +#define DC_IS_CENTAUR(x) (x->dc_type == DC_TYPE_AN983) #define DC_IS_DAVICOM(x) (x->dc_type == DC_TYPE_DM9102) #define DC_IS_PNICII(x) (x->dc_type == DC_TYPE_PNICII) #define DC_IS_PNIC(x) (x->dc_type == DC_TYPE_PNIC) @@ -543,8 +543,8 @@ struct dc_mii_frame { */ /* - * ADMtek specific registers and constants for the AL981 and AN985. - * The AN985 doesn't use the magic PHY registers. + * ADMtek specific registers and constants for the AL981 and AN983. + * The AN983 doesn't use the magic PHY registers. */ #define DC_AL_CR 0x88 /* command register */ #define DC_AL_PAR0 0xA4 /* station address */ @@ -890,8 +890,8 @@ struct dc_softc { * ADMtek device IDs. */ #define DC_DEVICEID_AL981 0x0981 -#define DC_DEVICEID_AN985 0x0985 -#define DC_DEVICEID_FA511 0x1985 +#define DC_DEVICEID_AN983 0x0985 +#define DC_DEVICEID_AN985 0x1985 #define DC_DEVICEID_ADM9511 0x9511 #define DC_DEVICEID_ADM9513 0x9513 From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 15:01:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEA81065676; Sun, 3 Jan 2010 15:01:39 +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 DA21A8FC15; Sun, 3 Jan 2010 15:01:38 +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 o03F1cbY063541; Sun, 3 Jan 2010 15:01:38 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03F1cKj063538; Sun, 3 Jan 2010 15:01:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201001031501.o03F1cKj063538@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 3 Jan 2010 15:01: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: r201431 - in head: bin/sh tools/regression/bin/sh/builtins X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 15:01:39 -0000 Author: jilles Date: Sun Jan 3 15:01:38 2010 New Revision: 201431 URL: http://svn.freebsd.org/changeset/base/201431 Log: sh: Send the "not found" message for builtin to redirected fd 2. Added: head/tools/regression/bin/sh/builtins/builtin1.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun Jan 3 13:59:59 2010 (r201430) +++ head/bin/sh/eval.c Sun Jan 3 15:01:38 2010 (r201431) @@ -722,9 +722,10 @@ evalcommand(union node *cmd, int flags, break; if ((cmdentry.u.index = find_builtin(*argv, &cmdentry.special)) < 0) { - out2fmt_flush("%s: not found\n", *argv); - exitstatus = 127; - return; + cmdentry.u.index = BLTINCMD; + argv--; + argc++; + break; } if (cmdentry.u.index != BLTINCMD) break; @@ -944,12 +945,17 @@ prehash(union node *n) */ /* - * No command given, or a bltin command with no arguments. + * No command given, a bltin command with no arguments, or a bltin command + * with an invalid name. */ int -bltincmd(int argc __unused, char **argv __unused) +bltincmd(int argc, char **argv) { + if (argc > 1) { + out2fmt_flush("%s: not found\n", argv[1]); + return 127; + } /* * Preserve exitstatus of a previous possible redirection * as POSIX mandates Added: head/tools/regression/bin/sh/builtins/builtin1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/builtin1.0 Sun Jan 3 15:01:38 2010 (r201431) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +builtin : || echo "Bad return code at $LINENO" +builtin true || echo "Bad return code at $LINENO" +builtin ls 2>/dev/null && echo "Bad return code at $LINENO" +check '"$(builtin pwd)" = "$(pwd)"' +check '-z "$(builtin :)"' +check '-z "$(builtin true)"' +check '-z "$( (builtin nosuchtool) 2>/dev/null)"' +check '-z "$(builtin nosuchtool 2>/dev/null)"' +check '-z "$(builtin nosuchtool 2>/dev/null; :)"' +check '-z "$( (builtin ls) 2>/dev/null)"' +check '-z "$(builtin ls 2>/dev/null)"' +check '-z "$(builtin ls 2>/dev/null; :)"' +check '-n "$( (builtin nosuchtool) 2>&1)"' +check '-n "$(builtin nosuchtool 2>&1)"' +check '-n "$(builtin nosuchtool 2>&1; :)"' +check '-n "$( (builtin ls) 2>&1)"' +check '-n "$(builtin ls 2>&1)"' +check '-n "$(builtin ls 2>&1; :)"' + +exit $((failures > 0)) From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 15:20:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96E6A106566B; Sun, 3 Jan 2010 15:20:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 852508FC12; Sun, 3 Jan 2010 15:20:52 +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 o03FKqvY069225; Sun, 3 Jan 2010 15:20:52 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03FKqCN069221; Sun, 3 Jan 2010 15:20:52 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001031520.o03FKqCN069221@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 3 Jan 2010 15:20: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: r201432 - in head/sbin/geom: class/cache core X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 15:20:52 -0000 Author: trasz Date: Sun Jan 3 15:20:52 2010 New Revision: 201432 URL: http://svn.freebsd.org/changeset/base/201432 Log: Add manual page for gcache(8). Added: head/sbin/geom/class/cache/gcache.8 (contents, props changed) Modified: head/sbin/geom/class/cache/Makefile head/sbin/geom/core/geom.8 Modified: head/sbin/geom/class/cache/Makefile ============================================================================== --- head/sbin/geom/class/cache/Makefile Sun Jan 3 15:01:38 2010 (r201431) +++ head/sbin/geom/class/cache/Makefile Sun Jan 3 15:20:52 2010 (r201432) @@ -3,6 +3,5 @@ .PATH: ${.CURDIR}/../../misc CLASS= cache -NO_MAN= # notyet .include Added: head/sbin/geom/class/cache/gcache.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/geom/class/cache/gcache.8 Sun Jan 3 15:20:52 2010 (r201432) @@ -0,0 +1,192 @@ +.\"- +.\" Copyright (c) 2010 Edward Tomasz Napierala +.\" 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 THE VOICES IN HIS HEAD 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 January 3, 2010 +.Dt GCACHE 8 +.Os +.Sh NAME +.Nm gcache +.Nd "control utility for CACHE GEOM class" +.Sh SYNOPSIS +.Nm +.Cm create +.Op Fl v +.Op Fl b Ar blocksize +.Op Fl s Ar size +.Ar name +.Ar prov +.Nm +.Cm configure +.Op Fl v +.Op Fl b Ar blocksize +.Op Fl s Ar size +.Ar name +.Nm +.Cm destroy +.Op Fl fv +.Ar name +.Nm +.Cm label +.Op Fl v +.Op Fl b Ar blocksize +.Op Fl s Ar size +.Ar name +.Ar prov +.Nm +.Cm stop +.Op Fl fv +.Ar name ... +.Nm +.Cm clear +.Op Fl v +.Ar prov ... +.Nm +.Cm dump +.Ar prov ... +.Nm +.Cm list +.Nm +.Cm status +.Op Fl s Ar name +.Nm +.Cm load +.Op Fl v +.Nm +.Cm unload +.Op Fl v +.Sh DESCRIPTION +The +.Nm +utility is used to control GEOM cache, which can +speed up read performance by sending fixed size +read requests to its consumer. It has been developed to address +the problem of a horrible read performance of a 64k blocksize FS +residing on a RAID3 array with 8 data components, where a single +disk component would only get 8k read requests, thus effectively +killing disk performance under high load. +.Pp +Caching can be configured using two different methods: +.Dq manual +or +.Dq automatic . +When using the +.Dq manual +method, no metadata are stored on the devices, so the cached +device has to be configured by hand every time it is needed. +The +.Dq automatic +method uses on-disk metadata to detect devices. +Once devices are labeled, they will be automatically detected and +configured. +.Pp +The first argument to +.Nm +indicates an action to be performed: +.Bl -tag -width ".Cm destroy" +.It Cm create +Cache the given devices with specified +.Ar name . +This is the +.Dq manual +method. +The kernel module +.Pa geom_cache.ko +will be loaded if it is not loaded already. +.It Cm label +Cache the given devices with the specified +.Ar name . +This is the +.Dq automatic +method, where metadata are stored in every device's last sector. +The kernel module +.Pa geom_cache.ko +will be loaded if it is not loaded already. +.It Cm stop +Turn off existing cache device by its +.Ar name . +This command does not touch on-disk metadata! +.It Cm destroy +Same as +.Cm stop . +.It Cm clear +Clear metadata on the given devices. +.It Cm dump +Dump metadata stored on the given devices. +.It Cm list +See +.Xr geom 8 . +.It Cm status +See +.Xr geom 8 . +.It Cm load +See +.Xr geom 8 . +.It Cm unload +See +.Xr geom 8 . +.El +.Pp +Additional options: +.Bl -tag -width indent +.It Fl f +Force the removal of the specified cache device. +.It Fl v +Be more verbose. +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variables can be used to control the behavior of the +.Nm CACHE +GEOM class. +The default value is shown next to each variable. +.Bl -tag -width indent +.It Va kern.geom.cache.used_hi : No 20 +.It Va kern.geom.cache.used_lo : No 5 +.It Va kern.geom.cache.idletime : No 5 +.It Va kern.geom.cache.timeout : No 10 +.It Va kern.geom.cache.enable : No 1 +.It Va kern.geom.cache.debug : No 0 +Debug level of the +.Nm CACHE +GEOM class. +This can be set to a number between 0 and 3 inclusive. +If set to 0 minimal debug information is printed, and if set to 3 the +maximum amount of debug information is printed. +.El +.Sh EXIT STATUS +Exit status is 0 on success, and 1 if the command fails. +.Sh SEE ALSO +.Xr geom 4 , +.Xr geom 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 7.0 . +.Sh AUTHORS +.An Ruslan Ermilov Aq ru@FreeBSD.org Modified: head/sbin/geom/core/geom.8 ============================================================================== --- head/sbin/geom/core/geom.8 Sun Jan 3 15:01:38 2010 (r201431) +++ head/sbin/geom/core/geom.8 Sun Jan 3 15:20:52 2010 (r201432) @@ -166,7 +166,7 @@ geom md unload .Sh SEE ALSO .Xr libgeom 3 , .Xr geom 4 , -.\" .Xr gcache 8 , +.Xr gcache 8 , .Xr gconcat 8 , .Xr geli 8 , .Xr gjournal 8 , From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 15:32:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4133A1065672; Sun, 3 Jan 2010 15:32:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 310498FC0C; Sun, 3 Jan 2010 15:32:28 +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 o03FWSr0072683; Sun, 3 Jan 2010 15:32:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03FWSpQ072682; Sun, 3 Jan 2010 15:32:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001031532.o03FWSpQ072682@svn.freebsd.org> From: Ed Schouten Date: Sun, 3 Jan 2010 15:32: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: r201433 - head/usr.sbin/sendmail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 15:32:28 -0000 Author: ed Date: Sun Jan 3 15:32:25 2010 New Revision: 201433 URL: http://svn.freebsd.org/changeset/base/201433 Log: Lower WARNS for sendmail. Even though it builds with WARNS=2, some users link sendmail from the base system against SASL. This doesn't build in this case. Reported by: Andrzej Tobola Modified: head/usr.sbin/sendmail/Makefile Modified: head/usr.sbin/sendmail/Makefile ============================================================================== --- head/usr.sbin/sendmail/Makefile Sun Jan 3 15:20:52 2010 (r201432) +++ head/usr.sbin/sendmail/Makefile Sun Jan 3 15:32:25 2010 (r201433) @@ -43,7 +43,7 @@ CFLAGS+= ${DBMDEF} ${NIS} -DTCPWRAPPERS CFLAGS+= -DNETINET6 .endif -WARNS?= 2 +WARNS?= 1 DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 17:19:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E65E1065695; Sun, 3 Jan 2010 17:19:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CAB08FC08; Sun, 3 Jan 2010 17:19:14 +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 o03HJEP2000964; Sun, 3 Jan 2010 17:19:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03HJEZ1000962; Sun, 3 Jan 2010 17:19:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001031719.o03HJEZ1000962@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 3 Jan 2010 17: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: r201438 - head/sys/security/mac_lomac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 17:19:14 -0000 Author: trasz Date: Sun Jan 3 17:19:14 2010 New Revision: 201438 URL: http://svn.freebsd.org/changeset/base/201438 Log: Make mac_lomac(4) able to interpret NFSv4 access bits. Reviewed by: rwatson Modified: head/sys/security/mac_lomac/mac_lomac.c Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sun Jan 3 17:19:04 2010 (r201437) +++ head/sys/security/mac_lomac/mac_lomac.c Sun Jan 3 17:19:14 2010 (r201438) @@ -2470,7 +2470,7 @@ lomac_vnode_check_open(struct ucred *cre obj = SLOT(vplabel); /* XXX privilege override for admin? */ - if (accmode & (VWRITE | VAPPEND | VADMIN)) { + if (accmode & VMODIFY_PERMS) { if (!lomac_subject_dominate(subj, obj)) return (EACCES); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 18:27:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40272106566C; Sun, 3 Jan 2010 18:27:11 +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 2EB368FC14; Sun, 3 Jan 2010 18:27: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 o03IRBMI015820; Sun, 3 Jan 2010 18:27:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03IRBF5015818; Sun, 3 Jan 2010 18:27:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001031827.o03IRBF5015818@svn.freebsd.org> From: Rick Macklem Date: Sun, 3 Jan 2010 18:27: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: r201439 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 18:27:11 -0000 Author: rmacklem Date: Sun Jan 3 18:27:10 2010 New Revision: 201439 URL: http://svn.freebsd.org/changeset/base/201439 Log: Fix three related problems in the experimental nfs client when checking for conflicts w.r.t. byte range locks for NFSv4. 1 - Return 0 instead of EACCES when a conflict is found, for F_GETLK. 2 - Check for "same file" when checking for a conflict. 3 - Don't check for a conflict for the F_UNLCK case. Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sun Jan 3 17:19:14 2010 (r201438) +++ head/sys/fs/nfsclient/nfs_clstate.c Sun Jan 3 18:27:10 2010 (r201439) @@ -116,8 +116,8 @@ static int nfscl_checkconflict(struct nf u_int8_t *, struct nfscllock **); static void nfscl_freelockowner(struct nfscllockowner *, int); static void nfscl_freealllocks(struct nfscllockownerhead *, int); -static int nfscl_localconflict(struct nfsclclient *, struct nfscllock *, - u_int8_t *, struct nfscldeleg *, struct nfscllock **); +static int nfscl_localconflict(struct nfsclclient *, u_int8_t *, int, + struct nfscllock *, u_int8_t *, struct nfscldeleg *, struct nfscllock **); static void nfscl_newopen(struct nfsclclient *, struct nfscldeleg *, struct nfsclowner **, struct nfsclowner **, struct nfsclopen **, struct nfsclopen **, u_int8_t *, u_int8_t *, int, int *); @@ -955,7 +955,8 @@ nfscl_getbytelock(vnode_t vp, u_int64_t lhp = &op->nfso_lock; } if (!error && !recovery) - error = nfscl_localconflict(clp, nlop, ownp, ldp, NULL); + error = nfscl_localconflict(clp, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, nlop, ownp, ldp, NULL); if (error) { if (!recovery) { nfscl_clrelease(clp); @@ -1047,7 +1048,7 @@ nfscl_relbytelock(vnode_t vp, u_int64_t struct nfscldeleg *dp; struct nfsnode *np; u_int8_t own[NFSV4CL_LOCKNAMELEN]; - int ret = 0, fnd, error; + int ret = 0, fnd; np = VTONFS(vp); *lpp = NULL; @@ -1082,16 +1083,6 @@ nfscl_relbytelock(vnode_t vp, u_int64_t dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); - /* Search for a local conflict. */ - error = nfscl_localconflict(clp, nlop, own, dp, NULL); - if (error) { - NFSUNLOCKCLSTATE(); - FREE((caddr_t)nlop, M_NFSCLLOCK); - if (other_lop != NULL) - FREE((caddr_t)other_lop, M_NFSCLLOCK); - return (error); - } - /* * First, unlock any local regions on a delegation. */ @@ -3169,8 +3160,9 @@ nfscl_getmnt(u_int32_t cbident) * a write lock or this is an unlock. */ static int -nfscl_localconflict(struct nfsclclient *clp, struct nfscllock *nlop, - u_int8_t *own, struct nfscldeleg *dp, struct nfscllock **lopp) +nfscl_localconflict(struct nfsclclient *clp, u_int8_t *fhp, int fhlen, + struct nfscllock *nlop, u_int8_t *own, struct nfscldeleg *dp, + struct nfscllock **lopp) { struct nfsclowner *owp; struct nfsclopen *op; @@ -3183,10 +3175,13 @@ nfscl_localconflict(struct nfsclclient * } LIST_FOREACH(owp, &clp->nfsc_owner, nfsow_list) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { - ret = nfscl_checkconflict(&op->nfso_lock, nlop, own, - lopp); - if (ret) - return (ret); + if (op->nfso_fhlen == fhlen && + !NFSBCMP(op->nfso_fh, fhp, fhlen)) { + ret = nfscl_checkconflict(&op->nfso_lock, nlop, + own, lopp); + if (ret) + return (ret); + } } } return (0); @@ -3245,10 +3240,9 @@ nfscl_lockt(vnode_t vp, struct nfsclclie nfscl_filllockowner(p, own); NFSLOCKCLSTATE(); dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); - error = nfscl_localconflict(clp, &nlck, own, dp, &lop); - if (error == NFSERR_DENIED) - error = EACCES; - if (error) { + error = nfscl_localconflict(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, + &nlck, own, dp, &lop); + if (error != 0) { fl->l_whence = SEEK_SET; fl->l_start = lop->nfslo_first; if (lop->nfslo_end == NFS64BITSSET) @@ -3257,6 +3251,7 @@ nfscl_lockt(vnode_t vp, struct nfsclclie fl->l_len = lop->nfslo_end - lop->nfslo_first; fl->l_pid = (pid_t)0; fl->l_type = lop->nfslo_type; + error = -1; /* no RPC required */ } else if (dp != NULL && ((dp->nfsdl_flags & NFSCLDL_WRITE) || fl->l_type == F_RDLCK)) { /* From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 19:14:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AB11065698; Sun, 3 Jan 2010 19:14:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8F6C8FC18; Sun, 3 Jan 2010 19:14:22 +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 o03JEMOn026148; Sun, 3 Jan 2010 19:14:22 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03JEMpB026146; Sun, 3 Jan 2010 19:14:22 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001031914.o03JEMpB026146@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 3 Jan 2010 19:14:22 +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: r201440 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 19:14:23 -0000 Author: gavin Date: Sun Jan 3 19:14:22 2010 New Revision: 201440 URL: http://svn.freebsd.org/changeset/base/201440 Log: The default hash table size is 257 not 255. Reword the rest of the line slightly while here. PR: bin/121671 Submitted by: Artis Caune artis.caune gmail.com Approved by: ed (mentor) Modified: head/etc/rc.d/nsswitch Modified: head/etc/rc.d/nsswitch ============================================================================== --- head/etc/rc.d/nsswitch Sun Jan 3 18:27:10 2010 (r201439) +++ head/etc/rc.d/nsswitch Sun Jan 3 19:14:22 2010 (r201440) @@ -77,10 +77,10 @@ generate_host_conf() nis) echo "nis" >> $host_conf ;; - *=*) + cache | *=*) ;; *) - printf "Warning: unrecognized source [%s]", $_s > "/dev/stderr" + printf "Warning: unrecognized source [%s]\n" $_s > "/dev/stderr" ;; esac done From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 19:28:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A135E106566C; Sun, 3 Jan 2010 19:28:51 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9067F8FC1B; Sun, 3 Jan 2010 19:28: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 o03JSp49029340; Sun, 3 Jan 2010 19:28:51 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03JSp37029338; Sun, 3 Jan 2010 19:28:51 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001031928.o03JSp37029338@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 3 Jan 2010 19:28: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: r201441 - head/usr.sbin/nscd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 19:28:51 -0000 Author: gavin Date: Sun Jan 3 19:28:51 2010 New Revision: 201441 URL: http://svn.freebsd.org/changeset/base/201441 Log: The default hash table size is 257 not 255. Reword the rest of the line slightly while here. PR: bin/121671 Submitted by: Artis Caune artis.caune gmail.com Approved by: ed (mentor) Modified: head/usr.sbin/nscd/nscd.conf.5 Modified: head/usr.sbin/nscd/nscd.conf.5 ============================================================================== --- head/usr.sbin/nscd/nscd.conf.5 Sun Jan 3 19:14:22 2010 (r201440) +++ head/usr.sbin/nscd/nscd.conf.5 Sun Jan 3 19:28:51 2010 (r201441) @@ -106,7 +106,7 @@ The default policy is fifo. This is the internal hash table size. The value should be a prime number for optimum performance. You should only change this value when the number of cached elements is -significantly (in 5-10 times) greater then the default hash table size (255). +significantly (5-10 times) greater than the default hash table size (257). .It Va keep-hot-count Oo Ar cachename Oc Op Ar value The size limit of the cache with the given .Ar cachename . From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 19:51:06 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFE5F106568F for ; Sun, 3 Jan 2010 19:51:06 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247]) by mx1.freebsd.org (Postfix) with ESMTP id 8875C8FC12 for ; Sun, 3 Jan 2010 19:51:06 +0000 (UTC) Received: from mail-gw6.york.ac.uk (mail-gw6.york.ac.uk [144.32.129.26]) by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id o03JJ5BJ011572; Sun, 3 Jan 2010 19:19:05 GMT Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw6.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1NRVyj-0007kT-Hu; Sun, 03 Jan 2010 19:19:05 +0000 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.3/8.14.3) with ESMTP id o03JJ51w087261; Sun, 3 Jan 2010 19:19:05 GMT (envelope-from gavin@FreeBSD.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.3/8.14.3/Submit) with ESMTP id o03JJ5ib087250; Sun, 3 Jan 2010 19:19:05 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Sun, 3 Jan 2010 19:19:05 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org In-Reply-To: <201001031914.o03JEMpB026146@svn.freebsd.org> Message-ID: References: <201001031914.o03JEMpB026146@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: Subject: Re: svn commit: r201440 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 19:51:07 -0000 On Sun, 3 Jan 2010, Gavin Atkinson wrote: > Author: gavin > Date: Sun Jan 3 19:14:22 2010 > New Revision: 201440 > URL: http://svn.freebsd.org/changeset/base/201440 > > Log: > The default hash table size is 257 not 255. Reword the rest of the line > slightly while here. > > PR: bin/121671 > Submitted by: Artis Caune artis.caune gmail.com > Approved by: ed (mentor) Apologies, this is the incorrect commit message. The correct one should have been: Don't complain when we encounter the "cache" source, it's valid. Also fix the error message to include a line feed and not include a stray comma. PR: bin/121671 Submitted by: Artis Caune artis.caune gmail.com Approved by: ed (mentor) MFC after: 2 weeks Gavin From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 20:08:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5E4A1065676; Sun, 3 Jan 2010 20:08:11 +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 B53168FC1D; Sun, 3 Jan 2010 20:08: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 o03K8BFq038046; Sun, 3 Jan 2010 20:08:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03K8Bdm038045; Sun, 3 Jan 2010 20:08:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001032008.o03K8Bdm038045@svn.freebsd.org> From: Rick Macklem Date: Sun, 3 Jan 2010 20:08: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: r201442 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 20:08:11 -0000 Author: rmacklem Date: Sun Jan 3 20:08:10 2010 New Revision: 201442 URL: http://svn.freebsd.org/changeset/base/201442 Log: The test for "same client" for the experimental nfs server over NFSv4 was broken w.r.t. byte range lock conflicts when it was the same client and the request used the open_to_lock_owner4 case, since lckstp->ls_clp was not set. This patch fixes it by using "clp" instead of "lckstp->ls_clp". MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Sun Jan 3 19:28:51 2010 (r201441) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Sun Jan 3 20:08:10 2010 (r201442) @@ -1753,7 +1753,7 @@ tryagain: (new_lop->lo_flags == NFSLCK_WRITE || lop->lo_flags == NFSLCK_WRITE) && lckstp != lop->lo_stp && - (lckstp->ls_clp != lop->lo_stp->ls_clp || + (clp != lop->lo_stp->ls_clp || lckstp->ls_ownerlen != lop->lo_stp->ls_ownerlen || NFSBCMP(lckstp->ls_owner, lop->lo_stp->ls_owner, lckstp->ls_ownerlen))) { From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 20:32:11 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D26A1065696; Sun, 3 Jan 2010 20:32:11 +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 D341C8FC1F; Sun, 3 Jan 2010 20:32:10 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id o03KUoN0002681; Sun, 3 Jan 2010 14:30:54 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id o03KUn6L002680; Sun, 3 Jan 2010 14:30:49 -0600 (CST) (envelope-from brooks) Date: Sun, 3 Jan 2010 14:30:49 -0600 From: Brooks Davis To: Max Laier Message-ID: <20100103203049.GA2600@lor.one-eyed-alien.net> References: <200912312044.nBVKicMb003815@svn.freebsd.org> <200912311547.54045.jhb@freebsd.org> <201001010635.33081.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <201001010635.33081.max@love2party.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Sun, 03 Jan 2010 14:30:55 -0600 (CST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r201351 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 20:32:11 -0000 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 01, 2010 at 06:35:33AM +0100, Max Laier wrote: > On Thursday 31 December 2009 21:47:54 John Baldwin wrote: > > On Thursday 31 December 2009 3:44:38 pm John Baldwin wrote: > > > Author: jhb > > > Date: Thu Dec 31 20:44:38 2009 > > > New Revision: 201351 > > > URL: http://svn.freebsd.org/changeset/base/201351 > > > > > > Log: > > > Use stricter checking to match possible vlan clones by not allowing > > > extra garbage characters around or within the tag. > >=20 > > Previously some odd clone requests such as 'em0.102a', 'em0.10a3bc', and > > 'em0.foo.104' would have succeeded creating interfaces equivalent to > > em0.102, em0.103, and em0.104. >=20 > The em0.foo.104 case seems quite useful, though. Maybe we can keep that= =20 > /feature/? You can always name any interface anything you want and the new rc.d support John added makes that easy. The origional intent of the name based vlan configuration was to support . and I view this as a bugfix. --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFLQP54XY6L6fI4GtQRAmizAKCFfyL6G8N/0l26RSM2IIhEOypSqQCbB/f+ 7xqmFgvQFWiJBIioEMZYDGg= =fnKb -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 20:40:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98F591065676; Sun, 3 Jan 2010 20:40:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86C698FC0C; Sun, 3 Jan 2010 20:40:54 +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 o03KesMe045221; Sun, 3 Jan 2010 20:40:54 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03Kes6r045213; Sun, 3 Jan 2010 20:40:54 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001032040.o03Kes6r045213@svn.freebsd.org> From: Brooks Davis Date: Sun, 3 Jan 2010 20:40: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: r201443 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 20:40:54 -0000 Author: brooks Date: Sun Jan 3 20:40:54 2010 New Revision: 201443 URL: http://svn.freebsd.org/changeset/base/201443 Log: Add vlan(4) to all GENERIC kernels. MFC after: 1 week Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC head/sys/sun4v/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/amd64/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -274,6 +274,7 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/i386/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -287,6 +287,7 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/ia64/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -149,6 +149,7 @@ device sbp # SCSI over FireWire (need # Various (pseudo) devices device ether # Ethernet support +device vlan # 802.1Q VLAN support device faith # IPv6-to-IPv4 relaying (translation) device gif # IPv6 and IPv4 tunneling device loop # Network loopback Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/pc98/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -241,6 +241,7 @@ device xe # Xircom pccard Ethernet device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/powerpc/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -131,6 +131,7 @@ device fxp # Intel EtherExpress PRO/10 device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/sparc64/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -216,6 +216,7 @@ device ath_rate_sample # SampleRate tx device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Sun Jan 3 20:08:10 2010 (r201442) +++ head/sys/sun4v/conf/GENERIC Sun Jan 3 20:40:54 2010 (r201443) @@ -169,6 +169,7 @@ device bge # Broadcom BCM570xx Gigabit device loop # Network loopback device random # Entropy device device ether # Ethernet support +device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 20:45:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32DA610656C1; Sun, 3 Jan 2010 20:45:50 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 223FF8FC16; Sun, 3 Jan 2010 20:45:50 +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 o03KjoFO046344; Sun, 3 Jan 2010 20:45:50 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03KjoUa046342; Sun, 3 Jan 2010 20:45:50 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001032045.o03KjoUa046342@svn.freebsd.org> From: Brooks Davis Date: Sun, 3 Jan 2010 20:45:50 +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: r201444 - head/crypto/heimdal/kcm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 20:45:50 -0000 Author: brooks Date: Sun Jan 3 20:45:49 2010 New Revision: 201444 URL: http://svn.freebsd.org/changeset/base/201444 Log: The size of credential messages is limited by CMGROUP_MAX rather than NGROUPS. MFC after: 1 week Modified: head/crypto/heimdal/kcm/connect.c Modified: head/crypto/heimdal/kcm/connect.c ============================================================================== --- head/crypto/heimdal/kcm/connect.c Sun Jan 3 20:40:54 2010 (r201443) +++ head/crypto/heimdal/kcm/connect.c Sun Jan 3 20:45:49 2010 (r201444) @@ -149,7 +149,7 @@ update_client_creds(int s, kcm_client *p struct sockcred *sc; memset(&msg, 0, sizeof(msg)); - crmsgsize = CMSG_SPACE(SOCKCREDSIZE(NGROUPS)); + crmsgsize = CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)); if (crmsgsize == 0) return 1 ; From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 21:27:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E072A106566C; Sun, 3 Jan 2010 21:27:10 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFDCC8FC16; Sun, 3 Jan 2010 21:27:10 +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 o03LRAMI055476; Sun, 3 Jan 2010 21:27:10 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03LRACN055474; Sun, 3 Jan 2010 21:27:10 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001032127.o03LRACN055474@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 3 Jan 2010 21: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: r201445 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 21:27:11 -0000 Author: gavin Date: Sun Jan 3 21:27:10 2010 New Revision: 201445 URL: http://svn.freebsd.org/changeset/base/201445 Log: Forced commit, to provide correct commit message for r201440: Don't complain when we encounter the "cache" source, it's valid. Also fix the error message to include a line feed and not include a stray comma. PR: bin/121671 Submitted by: Artis Caune artis.caune gmail.com Approved by: ed (mentor) MFC after: 2 weeks While here, change "> /dev/stderr" for more usual ">&2" Submitted by: jilles Modified: head/etc/rc.d/nsswitch Modified: head/etc/rc.d/nsswitch ============================================================================== --- head/etc/rc.d/nsswitch Sun Jan 3 20:45:49 2010 (r201444) +++ head/etc/rc.d/nsswitch Sun Jan 3 21:27:10 2010 (r201445) @@ -80,7 +80,7 @@ generate_host_conf() cache | *=*) ;; *) - printf "Warning: unrecognized source [%s]\n" $_s > "/dev/stderr" + printf "Warning: unrecognized source [%s]\n" $_s >&2 ;; esac done From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 21:33:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 261FE106566C; Sun, 3 Jan 2010 21:33:46 +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 86B6E8FC19; Sun, 3 Jan 2010 21:33:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAOWbQEuDaFvI/2dsb2JhbADSIoQwBA X-IronPort-AV: E=Sophos;i="4.47,493,1257138000"; d="scan'208";a="61124382" Received: from darling.cs.uoguelph.ca ([131.104.91.200]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 03 Jan 2010 16:33:44 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id 87A519400DA; Sun, 3 Jan 2010 16:33:44 -0500 (EST) X-Virus-Scanned: amavisd-new at darling.cs.uoguelph.ca Received: from darling.cs.uoguelph.ca ([127.0.0.1]) by localhost (darling.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Ud2xJRIuZRo; Sun, 3 Jan 2010 16:33:44 -0500 (EST) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by darling.cs.uoguelph.ca (Postfix) with ESMTP id 2085194009E; Sun, 3 Jan 2010 16:33:44 -0500 (EST) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o03LhX700398; Sun, 3 Jan 2010 16:43:33 -0500 (EST) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Sun, 3 Jan 2010 16:43:33 -0500 (EST) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Rick Macklem In-Reply-To: <201001031827.o03IRBF5015818@svn.freebsd.org> Message-ID: References: <201001031827.o03IRBF5015818@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: r201439 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 21:33:46 -0000 On Sun, 3 Jan 2010, Rick Macklem wrote: > Author: rmacklem > Date: Sun Jan 3 18:27:10 2010 > New Revision: 201439 > URL: http://svn.freebsd.org/changeset/base/201439 > > Log: > Fix three related problems in the experimental nfs client when > checking for conflicts w.r.t. byte range locks for NFSv4. > 1 - Return 0 instead of EACCES when a conflict is found, for F_GETLK. > 2 - Check for "same file" when checking for a conflict. > 3 - Don't check for a conflict for the F_UNLCK case. > > Modified: > head/sys/fs/nfsclient/nfs_clstate.c > Oops, forgot to put MFC: 2 weeks on the commit. I am planning on doing that, rick. From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 21:49:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D43B1065695; Sun, 3 Jan 2010 21:49:24 +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 7CB918FC13; Sun, 3 Jan 2010 21:49: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 o03LnOPS060397; Sun, 3 Jan 2010 21:49:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03LnOAS060395; Sun, 3 Jan 2010 21:49:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001032149.o03LnOAS060395@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 3 Jan 2010 21:49: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: r201446 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 21:49:24 -0000 Author: yongari Date: Sun Jan 3 21:49:24 2010 New Revision: 201446 URL: http://svn.freebsd.org/changeset/base/201446 Log: Fix regression introduced in r198318. BCM5754/BCM5754M uses the same ASIC ID of BCM5758 such that r198318 incorecctly enabled TSO on BCM5754.BCM5754M controllers. BCM5754/BCM5754M needs a special firmware to enable TSO and bge(4) does not support firmware based TSO. Reported by: ed Tested by: ed Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Jan 3 21:27:10 2010 (r201445) +++ head/sys/dev/bge/if_bge.c Sun Jan 3 21:49:24 2010 (r201446) @@ -2642,8 +2642,15 @@ bge_attach(device_t dev) * the TSO to the controllers that are not affected TSO issues * (e.g. 5755 or higher). */ - if (BGE_IS_5755_PLUS(sc)) - sc->bge_flags |= BGE_FLAG_TSO; + if (BGE_IS_5755_PLUS(sc)) { + /* + * BCM5754 and BCM5787 shares the same ASIC id so + * explicit device id check is required. + */ + if (pci_get_device(dev) != BCOM_DEVICEID_BCM5754 && + pci_get_device(dev) != BCOM_DEVICEID_BCM5754M) + sc->bge_flags |= BGE_FLAG_TSO; + } /* * Check if this is a PCI-X or PCI Express device. From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 22:29:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50145106568B; Sun, 3 Jan 2010 22:29:07 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F6068FC1F; Sun, 3 Jan 2010 22:29: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 o03MT7CJ069082; Sun, 3 Jan 2010 22:29:07 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03MT7Ys069079; Sun, 3 Jan 2010 22:29:07 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001032229.o03MT7Ys069079@svn.freebsd.org> From: Antoine Brodin Date: Sun, 3 Jan 2010 22:29: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: r201447 - in head: . usr.sbin/ntp/doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 22:29:07 -0000 Author: antoine Date: Sun Jan 3 22:29:06 2010 New Revision: 201447 URL: http://svn.freebsd.org/changeset/base/201447 Log: Complete ntptrace(8) removal: - do not install man page - update ObsoleteFiles.inc Approved by: roberto@ Modified: head/ObsoleteFiles.inc head/usr.sbin/ntp/doc/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jan 3 21:49:24 2010 (r201446) +++ head/ObsoleteFiles.inc Sun Jan 3 22:29:06 2010 (r201447) @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100103: ntptrace(8) removed +OLD_FILES+=usr/sbin/ntptrace +OLD_FILES+=usr/share/man/man8/ntptrace.8.gz # 20091229: remove no longer relevant examples OLD_FILES+=usr/share/examples/pppd/auth-down.sample OLD_FILES+=usr/share/examples/pppd/auth-up.sample Modified: head/usr.sbin/ntp/doc/Makefile ============================================================================== --- head/usr.sbin/ntp/doc/Makefile Sun Jan 3 21:49:24 2010 (r201446) +++ head/usr.sbin/ntp/doc/Makefile Sun Jan 3 22:29:06 2010 (r201447) @@ -24,7 +24,7 @@ FILES= accopt.html assoc.html audio.html .endif MAN= ntp.conf.5 ntp.keys.5 -MAN+= ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 ntptrace.8 +MAN+= ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 .PATH: ${.CURDIR}/../../../contrib/ntp/html \ ${.CURDIR}/../../../contrib/ntp/html/build \ From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 23:15:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5069E1065672; Sun, 3 Jan 2010 23:15:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FF9B8FC0A; Sun, 3 Jan 2010 23:15:15 +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 o03NFFVX079275; Sun, 3 Jan 2010 23:15:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03NFFqQ079273; Sun, 3 Jan 2010 23:15:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001032315.o03NFFqQ079273@svn.freebsd.org> From: Warner Losh Date: Sun, 3 Jan 2010 23:15: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: r201449 - head/sys/dev/dc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 23:15:15 -0000 Author: imp Date: Sun Jan 3 23:15:14 2010 New Revision: 201449 URL: http://svn.freebsd.org/changeset/base/201449 Log: Fix CardBus spelling. MFC after: 1 month Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Sun Jan 3 23:13:35 2010 (r201448) +++ head/sys/dev/dc/if_dc.c Sun Jan 3 23:15:14 2010 (r201449) @@ -44,8 +44,8 @@ __FBSDID("$FreeBSD$"); * ASIX Electronics AX88141 (www.asix.com.tw) * ADMtek AL981 (www.admtek.com.tw) * ADMtek AN983 (www.admtek.com.tw) - * ADMtek cardbus AN985 (www.admtek.com.tw) - * Netgear FA511 (www.netgear.com) Appears to be rebadged ADMTek cardbus AN985 + * ADMtek CardBus AN985 (www.admtek.com.tw) + * Netgear FA511 (www.netgear.com) Appears to be rebadged ADMTek CardBus AN985 * Davicom DM9100, DM9102, DM9102A (www.davicom8.com) * Accton EN1217 (www.accton.com) * Xircom X3201 (www.xircom.com) @@ -165,7 +165,7 @@ static const struct dc_type dc_devs[] = { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN983), 0, "ADMtek AN983 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_AN985), 0, - "ADMtek AN985 cardBus 10/100BaseTX or clone" }, + "ADMtek AN985 CardBus 10/100BaseTX or clone" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_ADM9511), 0, "ADMtek ADM9511 10/100BaseTX" }, { DC_DEVID(DC_VENDORID_ADMTEK, DC_DEVICEID_ADM9513), 0, From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 23:26:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D111A106566B; Sun, 3 Jan 2010 23:26:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0A038FC19; Sun, 3 Jan 2010 23:26:29 +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 o03NQT1W081775; Sun, 3 Jan 2010 23:26:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03NQTHf081773; Sun, 3 Jan 2010 23:26:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001032326.o03NQTHf081773@svn.freebsd.org> From: Warner Losh Date: Sun, 3 Jan 2010 23:26: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: r201450 - head/sys/dev/exca X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 23:26:29 -0000 Author: imp Date: Sun Jan 3 23:26:29 2010 New Revision: 201450 URL: http://svn.freebsd.org/changeset/base/201450 Log: CardBus instead of cardbus. Modified: head/sys/dev/exca/excareg.h Modified: head/sys/dev/exca/excareg.h ============================================================================== --- head/sys/dev/exca/excareg.h Sun Jan 3 23:15:14 2010 (r201449) +++ head/sys/dev/exca/excareg.h Sun Jan 3 23:26:29 2010 (r201450) @@ -355,7 +355,7 @@ /* #define EXCA_RESERVED 0x3E */ /* #define EXCA_RESERVED 0x3F */ -/* cardbus extensions - memory window page registers */ +/* CardBus extensions - memory window page registers */ #define EXCA_MEMREG_WIN_SHIFT 24 #define EXCA_SYSMEM_ADDR0_WIN 0x40 From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 23:28:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEF721065692; Sun, 3 Jan 2010 23:28:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEC1F8FC08; Sun, 3 Jan 2010 23:28: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 o03NSW2H082271; Sun, 3 Jan 2010 23:28:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03NSWjG082269; Sun, 3 Jan 2010 23:28:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001032328.o03NSWjG082269@svn.freebsd.org> From: Warner Losh Date: Sun, 3 Jan 2010 23:28: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: r201451 - head/sys/dev/dc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 23:28:32 -0000 Author: imp Date: Sun Jan 3 23:28:32 2010 New Revision: 201451 URL: http://svn.freebsd.org/changeset/base/201451 Log: cardbus -> CardBus Modified: head/sys/dev/dc/if_dcreg.h Modified: head/sys/dev/dc/if_dcreg.h ============================================================================== --- head/sys/dev/dc/if_dcreg.h Sun Jan 3 23:26:29 2010 (r201450) +++ head/sys/dev/dc/if_dcreg.h Sun Jan 3 23:28:32 2010 (r201451) @@ -1002,7 +1002,7 @@ struct dc_softc { #define DC_VENDORID_MICROSOFT 0x1414 /* - * Supported Microsoft PCI and cardbus NICs. These are really + * Supported Microsoft PCI and CardBus NICs. These are really * ADMtek parts in disguise. */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 23:29:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 318301065670; Sun, 3 Jan 2010 23:29:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2188C8FC16; Sun, 3 Jan 2010 23:29:50 +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 o03NToOm082600; Sun, 3 Jan 2010 23:29:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03NTo0G082598; Sun, 3 Jan 2010 23:29:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001032329.o03NTo0G082598@svn.freebsd.org> From: Warner Losh Date: Sun, 3 Jan 2010 23:29: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: r201452 - head/sys/dev/xl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 23:29:50 -0000 Author: imp Date: Sun Jan 3 23:29:49 2010 New Revision: 201452 URL: http://svn.freebsd.org/changeset/base/201452 Log: cardbus -> CardBus Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sun Jan 3 23:28:32 2010 (r201451) +++ head/sys/dev/xl/if_xl.c Sun Jan 3 23:29:49 2010 (r201452) @@ -929,7 +929,7 @@ xl_reset(struct xl_softc *sc) /* * If we're using memory mapped register mode, pause briefly * after issuing the reset command before trying to access any - * other registers. With my 3c575C cardbus card, failing to do + * other registers. With my 3c575C CardBus card, failing to do * this results in the system locking up while trying to poll * the command busy bit in the status register. */ @@ -1392,7 +1392,7 @@ xl_attach(device_t dev) * Figure out the card type. 3c905B adapters have the * 'supportsNoTxLength' bit set in the capabilities * word in the EEPROM. - * Note: my 3c575C cardbus card lies. It returns a value + * Note: my 3c575C CardBus card lies. It returns a value * of 0x1578 for its capabilities word, which is somewhat * nonsensical. Another way to distinguish a 3c90x chip * from a 3c90xB/C chip is to check for the 'supportsLargePackets' From owner-svn-src-head@FreeBSD.ORG Sun Jan 3 23:31:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F40E0106568B; Sun, 3 Jan 2010 23:31:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAAA78FC18; Sun, 3 Jan 2010 23:31:58 +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 o03NVwmC083106; Sun, 3 Jan 2010 23:31:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o03NVw5Y083102; Sun, 3 Jan 2010 23:31:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001032331.o03NVw5Y083102@svn.freebsd.org> From: Warner Losh Date: Sun, 3 Jan 2010 23:31: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: r201453 - in head/sys/dev: ath mii pccard X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 23:31:59 -0000 Author: imp Date: Sun Jan 3 23:31:58 2010 New Revision: 201453 URL: http://svn.freebsd.org/changeset/base/201453 Log: cardbus -> CardBus Modified: head/sys/dev/ath/if_ath.c head/sys/dev/mii/tdkphy.c head/sys/dev/pccard/card_if.m Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Jan 3 23:29:49 2010 (r201452) +++ head/sys/dev/ath/if_ath.c Sun Jan 3 23:31:58 2010 (r201453) @@ -1190,7 +1190,7 @@ ath_suspend(struct ath_softc *sc) /* * NB: don't worry about putting the chip in low power * mode; pci will power off our socket on suspend and - * cardbus detaches the device. + * CardBus detaches the device. */ } Modified: head/sys/dev/mii/tdkphy.c ============================================================================== --- head/sys/dev/mii/tdkphy.c Sun Jan 3 23:29:49 2010 (r201452) +++ head/sys/dev/mii/tdkphy.c Sun Jan 3 23:31:58 2010 (r201453) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); */ /* - * The TDK 78Q2120 is found on some Xircom X3201 based cardbus cards, + * The TDK 78Q2120 is found on some Xircom X3201 based CardBus cards, * also spotted on some 3C575 cards. It's just like any other normal * phy, except it does auto negotiation in a different way. */ Modified: head/sys/dev/pccard/card_if.m ============================================================================== --- head/sys/dev/pccard/card_if.m Sun Jan 3 23:29:49 2010 (r201452) +++ head/sys/dev/pccard/card_if.m Sun Jan 3 23:31:58 2010 (r201453) @@ -35,7 +35,7 @@ INTERFACE card; # # Companion interface for pccard. We need to set attributes for memory # and i/o port mappings (as well as other types of attributes) that have -# a well defined meaning inside the pccard/cardbus system. The bus +# a well defined meaning inside the PC Card/CardBus system. The bus # methods are inadequate for this because this must be done at the time the # resources are set for the device, which predates their activation. Also, # the driver activating the resources doesn't necessarily know or need to know From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 00:32:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7DA31065679; Mon, 4 Jan 2010 00:32:22 +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 A6F8C8FC14; Mon, 4 Jan 2010 00:32:22 +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 o040WM2v096364; Mon, 4 Jan 2010 00:32:22 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o040WM4j096362; Mon, 4 Jan 2010 00:32:22 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040032.o040WM4j096362@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 00:32:22 +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: r201455 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 00:32:22 -0000 Author: obrien Date: Mon Jan 4 00:32:22 2010 New Revision: 201455 URL: http://svn.freebsd.org/changeset/base/201455 Log: Add check for subversion "original" marker. Modified: head/usr.bin/make/parse.c Modified: head/usr.bin/make/parse.c ============================================================================== --- head/usr.bin/make/parse.c Mon Jan 4 00:11:46 2010 (r201454) +++ head/usr.bin/make/parse.c Mon Jan 4 00:32:22 2010 (r201455) @@ -802,6 +802,7 @@ ParseDoDependency(char *line) * merges. */ if (strncmp(line, "<<<<<<", 6) == 0 || + strncmp(line, "||||||", 6) == 0 || strncmp(line, "======", 6) == 0 || strncmp(line, ">>>>>>", 6) == 0) { Parse_Error(PARSE_FATAL, "Makefile appears to " From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 00:49:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB99106568B; Mon, 4 Jan 2010 00:49:05 +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 29AFA8FC1D; Mon, 4 Jan 2010 00:49: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 o040n5lN000184; Mon, 4 Jan 2010 00:49:05 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o040n5XC000182; Mon, 4 Jan 2010 00:49:05 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040049.o040n5XC000182@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 00:49: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: r201456 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 00:49:05 -0000 Author: obrien Date: Mon Jan 4 00:49:04 2010 New Revision: 201456 URL: http://svn.freebsd.org/changeset/base/201456 Log: Report lines that ought to contain a ':' operator but start with a '.' as "Unknown directive" sinze they are more likely to be .elseif (etc). (NetBSD PR 37222). Obtained from: NetBSD Modified: head/usr.bin/make/parse.c Modified: head/usr.bin/make/parse.c ============================================================================== --- head/usr.bin/make/parse.c Mon Jan 4 00:32:22 2010 (r201455) +++ head/usr.bin/make/parse.c Mon Jan 4 00:49:04 2010 (r201456) @@ -699,6 +699,7 @@ static void ParseDoDependency(char *line) { char *cp; /* our current position */ + char *lstart = line; /* original input line */ GNode *gn; /* a general purpose temporary node */ int op; /* the operator on the line */ char savec; /* a place to save a character */ @@ -809,7 +810,8 @@ ParseDoDependency(char *line) "contain unresolved cvs/rcs/??? merge " "conflicts"); } else - Parse_Error(PARSE_FATAL, "Need an operator"); + Parse_Error(PARSE_FATAL, lstart[0] == '.' ? + "Unknown directive" : "Need an operator"); return; } *cp = '\0'; @@ -1029,7 +1031,8 @@ ParseDoDependency(char *line) op = OP_DEPENDS; } } else { - Parse_Error(PARSE_FATAL, "Missing dependency operator"); + Parse_Error(PARSE_FATAL, lstart[0] == '.' ? + "Unknown directive" : "Missing dependency operator"); return; } From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 03:35:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37C68106568F; Mon, 4 Jan 2010 03:35:46 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2486B8FC0A; Mon, 4 Jan 2010 03:35:46 +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 o043Zki2037894; Mon, 4 Jan 2010 03:35:46 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o043Zk3N037885; Mon, 4 Jan 2010 03:35:46 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001040335.o043Zk3N037885@svn.freebsd.org> From: Rui Paulo Date: Mon, 4 Jan 2010 03:35: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: r201468 - in head/sys: arm/arm arm/conf arm/econa arm/include conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 03:35:46 -0000 Author: rpaulo Date: Mon Jan 4 03:35:45 2010 New Revision: 201468 URL: http://svn.freebsd.org/changeset/base/201468 Log: Add support for Cavium Econa CNS11XX ARM boards. These boards were previously know by StarSemi STR9104. Tested by the submitter on an Emprex NSD-100 board. Submitted by: Yohanes Nugroho Reviewed by: freebsd-arm, stas Obtained from: //depot/projects/str91xx/... Added: head/sys/arm/arm/cpufunc_asm_fa526.S (contents, props changed) head/sys/arm/conf/CNS11XXNAS (contents, props changed) head/sys/arm/conf/CNS11XXNAS.hints (contents, props changed) head/sys/arm/econa/ head/sys/arm/econa/cfi_bus_econa.c (contents, props changed) head/sys/arm/econa/econa.c (contents, props changed) head/sys/arm/econa/econa_machdep.c (contents, props changed) head/sys/arm/econa/econa_reg.h (contents, props changed) head/sys/arm/econa/econa_var.h (contents, props changed) head/sys/arm/econa/ehci_ebus.c (contents, props changed) head/sys/arm/econa/files.econa (contents, props changed) head/sys/arm/econa/if_ece.c (contents, props changed) head/sys/arm/econa/if_ecereg.h (contents, props changed) head/sys/arm/econa/if_ecevar.h (contents, props changed) head/sys/arm/econa/ohci_ec.c (contents, props changed) head/sys/arm/econa/std.econa (contents, props changed) head/sys/arm/econa/timer.c (contents, props changed) head/sys/arm/econa/uart_bus_ec.c (contents, props changed) head/sys/arm/econa/uart_cpu_ec.c (contents, props changed) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/conf/Makefile.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Jan 4 01:52:15 2010 (r201467) +++ head/sys/arm/arm/cpufunc.c Mon Jan 4 03:35:45 2010 (r201468) @@ -781,6 +781,73 @@ struct cpu_functions xscalec3_cpufuncs = xscale_setup /* cpu setup */ }; #endif /* CPU_XSCALE_81342 */ + + +#if defined(CPU_FA526) +struct cpu_functions fa526_cpufuncs = { + /* CPU functions */ + + .cf_id = cpufunc_id, + .cf_cpwait = cpufunc_nullop, + + /* MMU functions */ + + .cf_control = cpufunc_control, + .cf_domains = cpufunc_domains, + .cf_setttb = fa526_setttb, + .cf_faultstatus = cpufunc_faultstatus, + .cf_faultaddress = cpufunc_faultaddress, + + /* TLB functions */ + + .cf_tlb_flushID = armv4_tlb_flushID, + .cf_tlb_flushID_SE = fa526_tlb_flushID_SE, + .cf_tlb_flushI = armv4_tlb_flushI, + .cf_tlb_flushI_SE = fa526_tlb_flushI_SE, + .cf_tlb_flushD = armv4_tlb_flushD, + .cf_tlb_flushD_SE = armv4_tlb_flushD_SE, + + /* Cache operations */ + + .cf_icache_sync_all = fa526_icache_sync_all, + .cf_icache_sync_range = fa526_icache_sync_range, + + .cf_dcache_wbinv_all = fa526_dcache_wbinv_all, + .cf_dcache_wbinv_range = fa526_dcache_wbinv_range, + .cf_dcache_inv_range = fa526_dcache_inv_range, + .cf_dcache_wb_range = fa526_dcache_wb_range, + + .cf_idcache_wbinv_all = fa526_idcache_wbinv_all, + .cf_idcache_wbinv_range = fa526_idcache_wbinv_range, + + + .cf_l2cache_wbinv_all = cpufunc_nullop, + .cf_l2cache_wbinv_range = (void *)cpufunc_nullop, + .cf_l2cache_inv_range = (void *)cpufunc_nullop, + .cf_l2cache_wb_range = (void *)cpufunc_nullop, + + + /* Other functions */ + + .cf_flush_prefetchbuf = fa526_flush_prefetchbuf, + .cf_drain_writebuf = armv4_drain_writebuf, + .cf_flush_brnchtgt_C = cpufunc_nullop, + .cf_flush_brnchtgt_E = fa526_flush_brnchtgt_E, + + .cf_sleep = fa526_cpu_sleep, + + /* Soft functions */ + + .cf_dataabt_fixup = cpufunc_null_fixup, + .cf_prefetchabt_fixup = cpufunc_null_fixup, + + .cf_context_switch = fa526_context_switch, + + .cf_setup = fa526_setup +}; +#endif /* CPU_FA526 */ + + /* * Global constants also used by locore.s */ @@ -793,6 +860,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined (CPU_ARM9E) || defined (CPU_ARM10) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_FA526) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) static void get_cachetype_cp15(void); @@ -1073,6 +1141,19 @@ set_cpufuncs() goto out; } #endif /* CPU_SA1110 */ +#ifdef CPU_FA526 + if (cputype == CPU_ID_FA526) { + cpufuncs = fa526_cpufuncs; + cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ + get_cachetype_cp15(); + pmap_pte_init_generic(); + + /* Use powersave on this CPU. */ + cpu_do_powersave = 1; + + goto out; + } +#endif /* CPU_FA526 */ #ifdef CPU_IXP12X0 if (cputype == CPU_ID_IXP1200) { cpufuncs = ixp12x0_cpufuncs; @@ -1547,7 +1628,8 @@ late_abort_fixup(arg) defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_ARM10) || defined(CPU_ARM11) + defined(CPU_ARM10) || defined(CPU_ARM11) || \ + defined(CPU_FA526) #define IGN 0 #define OR 1 @@ -2013,6 +2095,62 @@ sa11x0_setup(args) } #endif /* CPU_SA1100 || CPU_SA1110 */ +#if defined(CPU_FA526) +struct cpu_option fa526_options[] = { +#ifdef COMPAT_12 + { "nocache", IGN, BIC, (CPU_CONTROL_IC_ENABLE | + CPU_CONTROL_DC_ENABLE) }, + { "nowritebuf", IGN, BIC, CPU_CONTROL_WBUF_ENABLE }, +#endif /* COMPAT_12 */ + { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | + CPU_CONTROL_DC_ENABLE) }, + { "cpu.nocache", OR, BIC, (CPU_CONTROL_IC_ENABLE | + CPU_CONTROL_DC_ENABLE) }, + { "cpu.writebuf", BIC, OR, CPU_CONTROL_WBUF_ENABLE }, + { "cpu.nowritebuf", OR, BIC, CPU_CONTROL_WBUF_ENABLE }, + { NULL, IGN, IGN, 0 } +}; + +void +fa526_setup(char *args) +{ + int cpuctrl, cpuctrlmask; + + cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE + | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE + | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE + | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE; + cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE + | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE + | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE + | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE + | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE + | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE + | CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC; + +#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS + cpuctrl |= CPU_CONTROL_AFLT_ENABLE; +#endif + + cpuctrl = parse_cpu_options(args, fa526_options, cpuctrl); + +#ifdef __ARMEB__ + cpuctrl |= CPU_CONTROL_BEND_ENABLE; +#endif + + if (vector_page == ARM_VECTORS_HIGH) + cpuctrl |= CPU_CONTROL_VECRELOC; + + /* Clear out the cache */ + cpu_idcache_wbinv_all(); + + /* Set the control register */ + ctrl = cpuctrl; + cpu_control(0xffffffff, cpuctrl); +} +#endif /* CPU_FA526 */ + + #if defined(CPU_IXP12X0) struct cpu_option ixp12x0_options[] = { { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, Added: head/sys/arm/arm/cpufunc_asm_fa526.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/cpufunc_asm_fa526.S Mon Jan 4 03:35:45 2010 (r201468) @@ -0,0 +1,209 @@ +/* $NetBSD: cpufunc_asm_fa526.S,v 1.3 2008/10/15 16:56:49 matt Exp $*/ +/*- + * Copyright (c) 2008 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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$"); + +#define CACHELINE_SIZE 16 + +ENTRY(fa526_setttb) + mov r1, #0 + mcr p15, 0, r1, c7, c14, 0 /* clean and invalidate D$ */ + mcr p15, 0, r1, c7, c5, 0 /* invalidate I$ */ + mcr p15, 0, r1, c7, c5, 6 /* invalidate BTB */ + mcr p15, 0, r1, c7, c10, 4 /* drain write and fill buffer */ + + mcr p15, 0, r0, c2, c0, 0 /* Write the TTB */ + + /* If we have updated the TTB we must flush the TLB */ + mcr p15, 0, r1, c8, c7, 0 /* invalidate I+D TLB */ + + /* Make sure that pipeline is emptied */ + mov r0, r0 + mov r0, r0 + mov pc, lr + +/* + * TLB functions + */ +ENTRY(fa526_tlb_flushID_SE) + mcr p15, 0, r0, c8, c7, 1 /* flush Utlb single entry */ + mov pc, lr + +/* + * TLB functions + */ +ENTRY(fa526_tlb_flushI_SE) + mcr p15, 0, r0, c8, c5, 1 /* flush Itlb single entry */ + mov pc, lr + +ENTRY(fa526_cpu_sleep) + mov r0, #0 +/* nop + nop*/ + mcr p15, 0, r0, c7, c0, 4 /* Wait for interrupt*/ + mov pc, lr + +ENTRY(fa526_flush_prefetchbuf) + mov r0, #0 + mcr p15, 0, r0, c7, c5, 4 /* Pre-fetch flush */ + mov pc, lr + +/* + * Cache functions + */ +ENTRY(fa526_idcache_wbinv_all) + mov r0, #0 + mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate D$ */ + mcr p15, 0, r0, c7, c5, 0 /* invalidate I$ */ + mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ + mov pc, lr + +ENTRY(fa526_icache_sync_all) + mov r0, #0 + mcr p15, 0, r0, c7, c5, 0 /* invalidate I$ */ + mov pc, lr + +ENTRY(fa526_dcache_wbinv_all) + mov r0, #0 + mcr p15, 0, r0, c7, c14, 0 /* clean and invalidate D$ */ + mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ + mov pc, lr + +/* + * Soft functions + */ +ENTRY(fa526_dcache_wbinv_range) + cmp r1, #0x4000 + bhs _C_LABEL(fa526_dcache_wbinv_all) + + and r2, r0, #(CACHELINE_SIZE - 1) + add r1, r1, r2 + bic r0, r0, #(CACHELINE_SIZE - 1) + +1: mcr p15, 0, r0, c7, c14, 1 /* clean and invalidate D$ entry */ + add r0, r0, #CACHELINE_SIZE + subs r1, r1, #CACHELINE_SIZE + bhi 1b + + mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ + mov pc, lr + +ENTRY(fa526_dcache_wb_range) + cmp r1, #0x4000 + bls 1f + + mov r0, #0 + mcr p15, 0, r0, c7, c10, 0 /* clean entire D$ */ + b 3f + +1: and r2, r0, #(CACHELINE_SIZE - 1) + add r1, r1, r2 + bic r0, r0, #(CACHELINE_SIZE - 1) + +2: mcr p15, 0, r0, c7, c10, 1 /* clean D$ entry */ + add r0, r0, #CACHELINE_SIZE + subs r1, r1, #CACHELINE_SIZE + bhi 2b + +3: mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ + mov pc, lr + +ENTRY(fa526_dcache_inv_range) + and r2, r0, #(CACHELINE_SIZE - 1) + add r1, r1, r2 + bic r0, r0, #(CACHELINE_SIZE - 1) + +1: mcr p15, 0, r0, c7, c6, 1 /* invalidate D$ single entry */ + add r0, r0, #CACHELINE_SIZE + subs r1, r1, #CACHELINE_SIZE + bhi 1b + + mov pc, lr + +ENTRY(fa526_idcache_wbinv_range) + cmp r1, #0x4000 + bhs _C_LABEL(fa526_idcache_wbinv_all) + + and r2, r0, #(CACHELINE_SIZE - 1) + add r1, r1, r2 + bic r0, r0, #(CACHELINE_SIZE - 1) + +1: mcr p15, 0, r0, c7, c14, 1 /* clean and invalidate D$ entry */ + mcr p15, 0, r0, c7, c5, 1 /* invalidate I$ entry */ + add r0, r0, #CACHELINE_SIZE + subs r1, r1, #CACHELINE_SIZE + bhi 1b + +2: mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ + mov pc, lr + +ENTRY(fa526_icache_sync_range) + cmp r1, #0x4000 + bhs _C_LABEL(fa526_icache_sync_all) + + and r2, r0, #(CACHELINE_SIZE - 1) + add r1, r1, r2 + bic r0, r0, #(CACHELINE_SIZE - 1) + +1: mcr p15, 0, r0, c7, c10, 1 /* clean D$ entry */ + mcr p15, 0, r0, c7, c5, 1 /* invalidate I$ entry */ + add r0, r0, #CACHELINE_SIZE + subs r1, r1, #CACHELINE_SIZE + bhi 1b + +2: mcr p15, 0, r0, c7, c10, 4 /* drain write buffer */ + mov pc, lr + +ENTRY(fa526_flush_brnchtgt_E) + mov r0, #0 + mcr p15, 0, r0, c7, c5, 6 /* invalidate BTB cache */ + mov pc, lr + +ENTRY(fa526_context_switch) + /* + * CF_CACHE_PURGE_ID will *ALWAYS* be called prior to this. + * Thus the data cache will contain only kernel data and the + * instruction cache will contain only kernel code, and all + * kernel mappings are shared by all processes. + */ + + mcr p15, 0, r0, c2, c0, 0 /* Write the TTB */ + + /* If we have updated the TTB we must flush the TLB */ + mov r0, #0 + mcr p15, 0, r0, c8, c7, 0 /* flush the I+D tlb */ + + /* Make sure that pipeline is emptied */ + mov r0, r0 + mov r0, r0 + mov pc, lr + Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Mon Jan 4 01:52:15 2010 (r201467) +++ head/sys/arm/arm/elf_trampoline.c Mon Jan 4 03:35:45 2010 (r201468) @@ -57,6 +57,8 @@ void __startC(void); #define cpu_idcache_wbinv_all arm8_cache_purgeID #elif defined(CPU_ARM9) #define cpu_idcache_wbinv_all arm9_idcache_wbinv_all +#elif defined(CPU_FA526) +#define cpu_idcache_wbinv_all fa526_idcache_wbinv_all #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all #elif defined(CPU_ARM10) Added: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/CNS11XXNAS Mon Jan 4 03:35:45 2010 (r201468) @@ -0,0 +1,126 @@ +# CNS11XXNAS - StarSemi STR9104/Cavium CNS1102 NAS +# kernel configuration file for FreeBSD/arm +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident CNS11XXNAS + +#options PHYSADDR=0x10000000 +#options KERNPHYSADDR=0x10200000 +#options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm +#options FLASHADDR=0x50000000 +#options LOADERRAMADDR=0x00000000 +#options STARTUP_PAGETABLE_ADDR=0x10000000 + +include "../econa/std.econa" + +#To statically compile in device wiring instead of /boot/device.hints +hints "CNS11XXNAS.hints" +makeoptions MODULES_OVERRIDE="" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options HZ=100 +options DEVICE_POLLING + +# Debugging for use in -current +options KDB +#options GDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +##options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + + +#options COMPAT_FREEBSD5 +#options COMPAT_FREEBSD6 +#options COMPAT_FREEBSD7 + + +options SCHED_ULE #ULE scheduler +#options SCHED_4BSD #4BSD scheduler +options GEOM_PART_GPT # GUID Partition Tables. +#options GEOM_PART_EBR +#options GEOM_PART_EBR_COMPAT +options GEOM_LABEL # Provides labelization + + +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCLIENT #Network Filesystem Client +#options NFSSERVER #Network Filesystem Server +#options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options MSDOSFS #MSDOS Filesystem +#options CD9660 #ISO 9660 Filesystem +#options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options MUTEX_NOINLINE #Mutex inlines are space hogs +options RWLOCK_NOINLINE #rwlock inlines are space hogs +options SX_NOINLINE #sx inliens are space hogs +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=npe0 +#options BOOTP_COMPAT + +#device pci +device uart + + +device firmware +device mii # Minimal mii routines +device ether +device bpf + +device pty +device loop + +device md +device random # Entropy device + +#options ARM_USE_SMALL_ALLOC + +device usb +#options USB_DEBUG +device ohci +device ehci +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device pass +device cfi + +#device udav # Davicom DM9601E USB + +device geom_label +device geom_journal +device geom_part_bsd + +options ROOTDEVNAME=\"ufs:da0s1a\" Added: head/sys/arm/conf/CNS11XXNAS.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/CNS11XXNAS.hints Mon Jan 4 03:35:45 2010 (r201468) @@ -0,0 +1 @@ +# $FreeBSD$ Added: head/sys/arm/econa/cfi_bus_econa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/econa/cfi_bus_econa.c Mon Jan 4 03:35:45 2010 (r201468) @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2009 Yohanes Nugroho + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +static int +cfi_econa_probe(device_t dev) +{ + + return cfi_probe(dev); +} + +static device_method_t cfi_econa_methods[] = { + /* device interface */ + DEVMETHOD(device_probe, cfi_econa_probe), + DEVMETHOD(device_attach, cfi_attach), + DEVMETHOD(device_detach, cfi_detach), + + {0, 0} +}; + +static driver_t cfi_econa_driver = { + cfi_driver_name, + cfi_econa_methods, + sizeof(struct cfi_softc), +}; +DRIVER_MODULE(cfi, econaarm, cfi_econa_driver, cfi_devclass, 0, 0); Added: head/sys/arm/econa/econa.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/econa/econa.c Mon Jan 4 03:35:45 2010 (r201468) @@ -0,0 +1,758 @@ +/*- + * Copyright (c) 2009 Yohanes Nugroho + * 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 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 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 +#include +#include +#include +#include +#include +#include +#include +#include + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include + +#include "econa_reg.h" +#include "econa_var.h" + +static struct econa_softc *econa_softc; + +unsigned int CPU_clock = 200000000; +unsigned int AHB_clock; +unsigned int APB_clock; + +bs_protos(generic); +bs_protos(generic_armv4); + +struct bus_space econa_bs_tag = { + /* cookie */ + (void *) 0, + + /* mapping/unmapping */ + generic_bs_map, + generic_bs_unmap, + generic_bs_subregion, + + /* allocation/deallocation */ + generic_bs_alloc, + generic_bs_free, + + /* barrier */ + generic_bs_barrier, + + /* read (single) */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region */ + NULL, + NULL, + NULL, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + NULL, + NULL, + NULL, + NULL, + + /* copy */ + NULL, + NULL, + NULL, + NULL, + + /* read (single) stream */ + NULL, + NULL, + NULL, + NULL, + + /* read multiple stream */ + NULL, + generic_armv4_bs_rm_2, + NULL, + NULL, + + /* read region stream */ + NULL, + NULL, + NULL, + NULL, + + /* write (single) stream */ + NULL, + NULL, + NULL, + NULL, + + /* write multiple stream */ + NULL, + generic_armv4_bs_wm_2, + NULL, + NULL, + + /* write region stream */ + NULL, + NULL, + NULL, + NULL +}; + +bus_space_tag_t obio_tag = &econa_bs_tag; + +static int +econa_probe(device_t dev) +{ + + device_set_desc(dev, "ECONA device bus"); + return (0); +} + +static void +econa_identify(driver_t *drv, device_t parent) +{ + + BUS_ADD_CHILD(parent, 0, "econaarm", 0); +} + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + + return (0); +} + +extern void irq_entry(void); + +static void +econa_add_child(device_t dev, int prio, const char *name, int unit, + bus_addr_t addr, bus_size_t size, + int irq0, int irq1, + int irq2, int irq3, int irq4) +{ + device_t kid; + struct econa_ivar *ivar; + + kid = device_add_child_ordered(dev, prio, name, unit); + if (kid == NULL) { + printf("Can't add child %s%d ordered\n", name, unit); + return; + } + ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO); + if (ivar == NULL) { + device_delete_child(dev, kid); + return; + } + device_set_ivars(kid, ivar); + resource_list_init(&ivar->resources); + if (irq0 != -1) + bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1); + if (irq1 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1); + if (irq2 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1); + if (irq3 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 3, irq3, 1); + if (irq4 != 0) + bus_set_resource(kid, SYS_RES_IRQ, 4, irq4, 1); + + if (addr != 0) + bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); + +} + +struct cpu_devs +{ + const char *name; + int unit; + bus_addr_t mem_base; + bus_size_t mem_len; + int irq0; + int irq1; + int irq2; + int irq3; + int irq4; +}; + +struct cpu_devs econarm_devs[] = +{ + { + "econa_ic", 0, + ECONA_IO_BASE + ECONA_PIC_BASE, ECONA_PIC_SIZE, + 0 + }, + { + "system", 0, + ECONA_IO_BASE + ECONA_SYSTEM_BASE, ECONA_SYSTEM_SIZE, + 0 + }, + { + "uart", 0, + ECONA_IO_BASE + ECONA_UART_BASE, ECONA_UART_SIZE, + ECONA_IRQ_UART + }, + { + "timer", 0, + ECONA_IO_BASE + ECONA_TIMER_BASE, ECONA_TIMER_SIZE, + ECONA_IRQ_TIMER_1, ECONA_IRQ_TIMER_2 + }, + { + "ohci", 0, + ECONA_OHCI_VBASE, ECONA_OHCI_SIZE, + ECONA_IRQ_OHCI + }, + { + "ehci", 0, + ECONA_EHCI_VBASE, ECONA_EHCI_SIZE, + ECONA_IRQ_EHCI + }, + { + "cfi", 0, + ECONA_CFI_VBASE, ECONA_CFI_SIZE, + 0 + }, + { + "ece", 0, + ECONA_IO_BASE + ECONA_NET_BASE, ECONA_NET_SIZE, + ECONA_IRQ_STATUS, + ECONA_IRQ_TSTC, ECONA_IRQ_FSRC, + ECONA_IRQ_TSQE, ECONA_IRQ_FSQF, + }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +static void +econa_cpu_add_builtin_children(device_t dev, struct econa_softc *sc) +{ + int i; + struct cpu_devs *walker; + + for (i = 0, walker = econarm_devs; walker->name; i++, walker++) { + econa_add_child(dev, i, walker->name, walker->unit, + walker->mem_base, walker->mem_len, + walker->irq0,walker->irq1, walker->irq2, + walker->irq3, walker->irq4); + } + +} + +struct intc_trigger_t { + int mode; + int level; +}; + +static struct intc_trigger_t intc_trigger_table[] = { + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_EDGE_TRIGGER, INTC_FALLING_EDGE}, + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_TRIGGER_UNKNOWN, INTC_TRIGGER_UNKNOWN}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_LOW}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_LOW}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_TRIGGER_UNKNOWN, INTC_TRIGGER_UNKNOWN}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_TRIGGER_UNKNOWN, INTC_TRIGGER_UNKNOWN}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_EDGE_TRIGGER, INTC_FALLING_EDGE}, + {INTC_TRIGGER_UNKNOWN, INTC_TRIGGER_UNKNOWN}, + {INTC_TRIGGER_UNKNOWN, INTC_TRIGGER_UNKNOWN}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_HIGH}, + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_EDGE_TRIGGER, INTC_RISING_EDGE}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_LOW}, + {INTC_LEVEL_TRIGGER, INTC_ACTIVE_LOW}, +}; + +static inline uint32_t +read_4(struct econa_softc *sc, bus_size_t off) +{ + + return bus_space_read_4(sc->ec_st, sc->ec_sys_sh, off); +} + +static inline void +write_4(struct econa_softc *sc, bus_size_t off, uint32_t val) +{ + + return bus_space_write_4(sc->ec_st, sc->ec_sys_sh, off, val); +} + +static inline uint32_t +system_read_4(struct econa_softc *sc, bus_size_t off) +{ + + return bus_space_read_4(sc->ec_st, sc->ec_system_sh, off); +} + +static inline void +system_write_4(struct econa_softc *sc, bus_size_t off, uint32_t val) +{ + + return bus_space_write_4(sc->ec_st, sc->ec_system_sh, off, val); +} + + + +static inline void +econa_set_irq_mode(struct econa_softc * sc, unsigned int irq, + unsigned int mode) +{ + unsigned int val; + + if ((mode != INTC_LEVEL_TRIGGER) && (mode != INTC_EDGE_TRIGGER)) + return; + + val = read_4(sc, INTC_INTERRUPT_TRIGGER_MODE_REG_OFFSET); + + if (mode == INTC_LEVEL_TRIGGER) { + if (val & (1UL << irq)) { + val &= ~(1UL << irq); + write_4(sc, INTC_INTERRUPT_TRIGGER_MODE_REG_OFFSET, + val); + } + } else { + if (!(val & (1UL << irq))) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 03:40:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06DAC1065696; Mon, 4 Jan 2010 03:40:47 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA38C8FC12; Mon, 4 Jan 2010 03:40:46 +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 o043ekLU039001; Mon, 4 Jan 2010 03:40:46 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o043ekEK038999; Mon, 4 Jan 2010 03:40:46 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001040340.o043ekEK038999@svn.freebsd.org> From: Rui Paulo Date: Mon, 4 Jan 2010 03:40: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: r201469 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 03:40:47 -0000 Author: rpaulo Date: Mon Jan 4 03:40:46 2010 New Revision: 201469 URL: http://svn.freebsd.org/changeset/base/201469 Log: Remove CNS11XXNAS.hints. Deleted: head/sys/arm/conf/CNS11XXNAS.hints Modified: head/sys/arm/conf/CNS11XXNAS Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Mon Jan 4 03:35:45 2010 (r201468) +++ head/sys/arm/conf/CNS11XXNAS Mon Jan 4 03:40:46 2010 (r201469) @@ -29,8 +29,6 @@ ident CNS11XXNAS include "../econa/std.econa" -#To statically compile in device wiring instead of /boot/device.hints -hints "CNS11XXNAS.hints" makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 04:10:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEBE01065670; Mon, 4 Jan 2010 04:10:50 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id BDDFC8FC08; Mon, 4 Jan 2010 04:10:49 +0000 (UTC) Received: by fxm27 with SMTP id 27so430491fxm.3 for ; Sun, 03 Jan 2010 20:10:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=ipGa4QdRJMw1aGRtaTwRAc0SwnZkEbdLlyfcUYHUk4Q=; b=VJ+XlwE9E9MwuQeppQr9SRXVYbexTB4I9I1xUknZEUmADkZPhh8zQCLb/R2T+ygJf9 FL+34H0Rs1/ulAA8GfWrj3lu8CgsMMXeiGU2ROFcrHOegTcsXKlRnMcB/OjoLjzjOR7j 9j8FDpHrvdNNH6sVbKOkU8Q8oGIQmv8KARVpE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=V2WDVLwUPuKwWkeC2YEftUMkbO4t/TCfhZ59gRsEQvEFYtv2Q3yzg+pAvU7lhMmL6L Q5oYt4MtCPkKFTSjLMrk5oLD6Xuf+t9HmQwK/qpDqxDolnXBJ/VFN85YEXp3moryo3na pNHrgOIeszL5ZrTlbI0M0o7TFaMDR4ryMcp28= Received: by 10.223.4.150 with SMTP id 22mr24195092far.5.1262578245367; Sun, 03 Jan 2010 20:10:45 -0800 (PST) Received: from ?10.0.10.2? (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id d13sm25768097fka.17.2010.01.03.20.10.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 03 Jan 2010 20:10:44 -0800 (PST) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201001020102.o0212xa5080515@svn.freebsd.org> Date: Mon, 4 Jan 2010 04:10:43 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <1AD7A3E3-0259-4D4E-A48F-48E216B56E4D@freebsd.org> References: <201001020102.o0212xa5080515@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201374 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 04:10:50 -0000 On 2 Jan 2010, at 01:02, Marcel Moolenaar wrote: > Author: marcel > Date: Sat Jan 2 01:02:59 2010 > New Revision: 201374 > URL: http://svn.freebsd.org/changeset/base/201374 >=20 > Log: > Properly return the UUID represented by the alias. >=20 > PR: 142174 > Submitted by: Przemyslaw Laczynski > Pointy hat to: rpaulo Thanks! >=20 > Modified: > head/sys/geom/part/g_part_gpt.c >=20 > Modified: head/sys/geom/part/g_part_gpt.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/geom/part/g_part_gpt.c Sat Jan 2 00:37:00 2010 = (r201373) > +++ head/sys/geom/part/g_part_gpt.c Sat Jan 2 01:02:59 2010 = (r201374) > @@ -375,7 +375,7 @@ gpt_parse_type(const char *type, struct=20 > for (uap =3D &gpt_uuid_alias_match[0]; uap->uuid; uap++) { > alias =3D g_part_alias_name(uap->alias); > if (!strcasecmp(type, alias)) { > - uuid =3D uap->uuid; > + *uuid =3D *uap->uuid; > return (0); > } > } -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 05:27:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64C1A1065694; Mon, 4 Jan 2010 05:27:50 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5280E8FC25; Mon, 4 Jan 2010 05:27:50 +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 o045RoU2062668; Mon, 4 Jan 2010 05:27:50 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o045RoNN062634; Mon, 4 Jan 2010 05:27:50 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001040527.o045RoNN062634@svn.freebsd.org> From: David Xu Date: Mon, 4 Jan 2010 05:27:50 +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: r201472 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 05:27:50 -0000 Author: davidxu Date: Mon Jan 4 05:27:49 2010 New Revision: 201472 URL: http://svn.freebsd.org/changeset/base/201472 Log: Add user-level semaphore synchronous type, this change allows multiple processes to share semaphore by using shared memory area, in simplest case, only one atomic operation is needed in userland, waiter flag is maintained by kernel and userland only checks the flag, if the flag is set, user code enters kernel and does a wakeup() call. Move type definitions into file _umtx.h to minimize compiling time. Also type names need to be prefixed with underline character, this would reduce name conflict (still in progress). Added: head/sys/sys/_umtx.h (contents, props changed) Modified: head/sys/kern/kern_umtx.c head/sys/sys/umtx.h Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Jan 4 04:29:01 2010 (r201471) +++ head/sys/kern/kern_umtx.c Mon Jan 4 05:27:49 2010 (r201472) @@ -2759,6 +2759,110 @@ out: return (error); } +static int +do_sem_wait(struct thread *td, struct _usem *sem, struct timespec *timeout) +{ + struct umtx_q *uq; + struct timeval tv; + struct timespec cts, ets, tts; + uint32_t flags, count; + int error; + + uq = td->td_umtxq; + flags = fuword32(&sem->_flags); + error = umtx_key_get(sem, TYPE_CV, GET_SHARE(flags), &uq->uq_key); + if (error != 0) + return (error); + umtxq_lock(&uq->uq_key); + umtxq_busy(&uq->uq_key); + umtxq_insert(uq); + umtxq_unlock(&uq->uq_key); + + count = fuword32(__DEVOLATILE(uint32_t *, &sem->_count)); + if (count != 0) { + umtxq_lock(&uq->uq_key); + umtxq_unbusy(&uq->uq_key); + umtxq_remove(uq); + umtxq_unlock(&uq->uq_key); + umtx_key_release(&uq->uq_key); + return (0); + } + + /* + * The magic thing is we should set c_has_waiters to 1 before + * releasing user mutex. + */ + suword32(__DEVOLATILE(uint32_t *, &sem->_has_waiters), 1); + + umtxq_lock(&uq->uq_key); + umtxq_unbusy(&uq->uq_key); + umtxq_unlock(&uq->uq_key); + + umtxq_lock(&uq->uq_key); + if (timeout == NULL) { + error = umtxq_sleep(uq, "usem", 0); + } else { + getnanouptime(&ets); + timespecadd(&ets, timeout); + TIMESPEC_TO_TIMEVAL(&tv, timeout); + for (;;) { + error = umtxq_sleep(uq, "usem", tvtohz(&tv)); + if (error != ETIMEDOUT) + break; + getnanouptime(&cts); + if (timespeccmp(&cts, &ets, >=)) { + error = ETIMEDOUT; + break; + } + tts = ets; + timespecsub(&tts, &cts); + TIMESPEC_TO_TIMEVAL(&tv, &tts); + } + } + + if (error != 0) { + if ((uq->uq_flags & UQF_UMTXQ) == 0) { + if (!umtxq_signal(&uq->uq_key, 1)) + error = 0; + } + if (error == ERESTART) + error = EINTR; + } + umtxq_remove(uq); + umtxq_unlock(&uq->uq_key); + umtx_key_release(&uq->uq_key); + return (error); +} + +/* + * Signal a userland condition variable. + */ +static int +do_sem_wake(struct thread *td, struct _usem *sem) +{ + struct umtx_key key; + int error, cnt, nwake; + uint32_t flags; + + flags = fuword32(&sem->_flags); + if ((error = umtx_key_get(sem, TYPE_CV, GET_SHARE(flags), &key)) != 0) + return (error); + umtxq_lock(&key); + umtxq_busy(&key); + cnt = umtxq_count(&key); + nwake = umtxq_signal(&key, 1); + if (cnt <= nwake) { + umtxq_unlock(&key); + error = suword32( + __DEVOLATILE(uint32_t *, &sem->_has_waiters), 0); + umtxq_lock(&key); + } + umtxq_unbusy(&key); + umtxq_unlock(&key); + umtx_key_release(&key); + return (error); +} + int _umtx_lock(struct thread *td, struct _umtx_lock_args *uap) /* struct umtx *umtx */ @@ -3031,6 +3135,35 @@ __umtx_op_rw_unlock(struct thread *td, s return do_rw_unlock(td, uap->obj); } +static int +__umtx_op_sem_wait(struct thread *td, struct _umtx_op_args *uap) +{ + struct timespec *ts, timeout; + int error; + + /* Allow a null timespec (wait forever). */ + if (uap->uaddr2 == NULL) + ts = NULL; + else { + error = copyin(uap->uaddr2, &timeout, + sizeof(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)); +} + +static int +__umtx_op_sem_wake(struct thread *td, struct _umtx_op_args *uap) +{ + return do_sem_wake(td, uap->obj); +} + typedef int (*_umtx_op_func)(struct thread *td, struct _umtx_op_args *uap); static _umtx_op_func op_table[] = { @@ -3052,7 +3185,9 @@ static _umtx_op_func op_table[] = { __umtx_op_wait_uint_private, /* UMTX_OP_WAIT_UINT_PRIVATE */ __umtx_op_wake_private, /* UMTX_OP_WAKE_PRIVATE */ __umtx_op_wait_umutex, /* UMTX_OP_UMUTEX_WAIT */ - __umtx_op_wake_umutex /* UMTX_OP_UMUTEX_WAKE */ + __umtx_op_wake_umutex, /* UMTX_OP_UMUTEX_WAKE */ + __umtx_op_sem_wait, /* UMTX_OP_SEM_WAIT */ + __umtx_op_sem_wake /* UMTX_OP_SEM_WAKE */ }; int @@ -3274,6 +3409,27 @@ __umtx_op_wait_uint_private_compat32(str return do_wait(td, uap->obj, uap->val, ts, 1, 1); } +static int +__umtx_op_sem_wait_compat32(struct thread *td, struct _umtx_op_args *uap) +{ + struct timespec *ts, timeout; + int error; + + /* Allow a null timespec (wait forever). */ + if (uap->uaddr2 == NULL) + ts = NULL; + else { + error = 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)); +} + static _umtx_op_func op_table_compat32[] = { __umtx_op_lock_umtx_compat32, /* UMTX_OP_LOCK */ __umtx_op_unlock_umtx_compat32, /* UMTX_OP_UNLOCK */ @@ -3293,7 +3449,9 @@ static _umtx_op_func op_table_compat32[] __umtx_op_wait_uint_private_compat32, /* UMTX_OP_WAIT_UINT_PRIVATE */ __umtx_op_wake_private, /* UMTX_OP_WAKE_PRIVATE */ __umtx_op_wait_umutex_compat32, /* UMTX_OP_UMUTEX_WAIT */ - __umtx_op_wake_umutex /* UMTX_OP_UMUTEX_WAKE */ + __umtx_op_wake_umutex, /* UMTX_OP_UMUTEX_WAKE */ + __umtx_op_sem_wait_compat32, /* UMTX_OP_SEM_WAIT */ + __umtx_op_sem_wake /* UMTX_OP_SEM_WAKE */ }; int Added: head/sys/sys/_umtx.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/_umtx.h Mon Jan 4 05:27:49 2010 (r201472) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2010, David Xu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef _SYS__UMTX_H_ +#define _SYS__UMTX_H_ + +#include + +struct umtx { + volatile unsigned long u_owner; /* Owner of the mutex. */ +}; + +struct umutex { + volatile __lwpid_t m_owner; /* Owner of the mutex */ + __uint32_t m_flags; /* Flags of the mutex */ + __uint32_t m_ceilings[2]; /* Priority protect ceiling */ + __uint32_t m_spare[4]; +}; + +struct ucond { + volatile __uint32_t c_has_waiters; /* Has waiters in kernel */ + __uint32_t c_flags; /* Flags of the condition variable */ + __uint32_t c_spare[2]; /* Spare space */ +}; + +struct urwlock { + volatile __int32_t rw_state; + __uint32_t rw_flags; + __uint32_t rw_blocked_readers; + __uint32_t rw_blocked_writers; + __uint32_t rw_spare[4]; +}; + +struct _usem { + volatile __uint32_t _has_waiters; + volatile __uint32_t _count; + __uint32_t _flags; +}; + +#endif /* !_SYS__UMTX_H_ */ Modified: head/sys/sys/umtx.h ============================================================================== --- head/sys/sys/umtx.h Mon Jan 4 04:29:01 2010 (r201471) +++ head/sys/sys/umtx.h Mon Jan 4 05:27:49 2010 (r201472) @@ -30,19 +30,11 @@ #ifndef _SYS_UMTX_H_ #define _SYS_UMTX_H_ -#include +#include #include -/* - * See pthread_* - */ - -#define UMTX_UNOWNED 0x0 -#define UMTX_CONTESTED LONG_MIN - -struct umtx { - volatile u_long u_owner; /* Owner of the mutex. */ -}; +#define UMTX_UNOWNED 0x0 +#define UMTX_CONTESTED LONG_MIN #define USYNC_PROCESS_SHARED 0x0001 /* Process shared sync objs */ @@ -53,27 +45,6 @@ struct umtx { #define UMUTEX_PRIO_INHERIT 0x0004 /* Priority inherited mutex */ #define UMUTEX_PRIO_PROTECT 0x0008 /* Priority protect mutex */ -struct umutex { - volatile __lwpid_t m_owner; /* Owner of the mutex */ - uint32_t m_flags; /* Flags of the mutex */ - uint32_t m_ceilings[2]; /* Priority protect ceiling */ - uint32_t m_spare[4]; -}; - -struct ucond { - volatile uint32_t c_has_waiters; /* Has waiters in kernel */ - uint32_t c_flags; /* Flags of the condition variable */ - uint32_t c_spare[2]; /* Spare space */ -}; - -struct urwlock { - volatile int32_t rw_state; - uint32_t rw_flags; - uint32_t rw_blocked_readers; - uint32_t rw_blocked_writers; - uint32_t rw_spare[4]; -}; - /* urwlock flags */ #define URWLOCK_PREFER_READER 0x0002 @@ -83,6 +54,9 @@ struct urwlock { #define URWLOCK_MAX_READERS 0x1fffffffU #define URWLOCK_READER_COUNT(c) ((c) & URWLOCK_MAX_READERS) +/* _usem flags */ +#define SEM_NAMED 0x0002 + /* op code for _umtx_op */ #define UMTX_OP_LOCK 0 #define UMTX_OP_UNLOCK 1 @@ -100,10 +74,12 @@ struct urwlock { #define UMTX_OP_RW_WRLOCK 13 #define UMTX_OP_RW_UNLOCK 14 #define UMTX_OP_WAIT_UINT_PRIVATE 15 -#define UMTX_OP_WAKE_PRIVATE 16 -#define UMTX_OP_MUTEX_WAIT 17 -#define UMTX_OP_MUTEX_WAKE 18 -#define UMTX_OP_MAX 19 +#define UMTX_OP_WAKE_PRIVATE 16 +#define UMTX_OP_MUTEX_WAIT 17 +#define UMTX_OP_MUTEX_WAKE 18 +#define UMTX_OP_SEM_WAIT 19 +#define UMTX_OP_SEM_WAKE 20 +#define UMTX_OP_MAX 21 /* flags for UMTX_OP_CV_WAIT */ #define UMTX_CHECK_UNPARKING 0x01 From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 09:16:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D3C1065676; Mon, 4 Jan 2010 09:16:37 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 703228FC18; Mon, 4 Jan 2010 09:16:37 +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 o049GbOY013094; Mon, 4 Jan 2010 09:16:37 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o049GZ1Y013061; Mon, 4 Jan 2010 09:16:35 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201001040916.o049GZ1Y013061@svn.freebsd.org> From: Stanislav Sedov Date: Mon, 4 Jan 2010 09:16: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: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 09:16:37 -0000 Author: stas Date: Mon Jan 4 09:16:35 2010 New Revision: 201477 URL: http://svn.freebsd.org/changeset/base/201477 Log: - Add two particulary interesting quotes from the past decade. Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Mon Jan 4 09:02:39 2010 (r201476) +++ head/games/fortune/datfiles/fortunes Mon Jan 4 09:16:35 2010 (r201477) @@ -1604,6 +1604,13 @@ friends and family, and then justify thi for doing it." -- Bruce Feirstein, "Nice Guys Sleep Alone" % + As we know, there are known knowns. There are things we know we +know. We also know there are known unknowns. That is to say, we know +there're some things we do not know. But there're also unknown unknowns; +the ones we don't know we don't know." + -- Defense Secretary Donald Rumsfeld, + about the invasion to Iraq. +% At a recent meeting in Snowmass, Colorado, a participant from Los Angeles fainted from hyperoxygenation, and we had to hold his head under the exhaust of a bus until he revived. @@ -46372,6 +46379,13 @@ constitutions, displaying the utmost imp overturning everything. -- Plato, "Republic", 370 B.C. % +The investment community feels very putupon. They feel there is no +reason why they shouldn't earn $1 million to $200 million a year, +and they don't want to be held responsible for the global financial +meltdown. + -- Daniel Fass, chairman of Obama's + financial-industry fundraising party +% The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. % From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 09:49:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30018106568B; Mon, 4 Jan 2010 09:49:24 +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 0586C8FC1C; Mon, 4 Jan 2010 09:49: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 o049nNR4020312; Mon, 4 Jan 2010 09:49:23 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o049nNJY020306; Mon, 4 Jan 2010 09:49:23 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040949.o049nNJY020306@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 09:49: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: r201478 - head/tools/regression/usr.bin/make/syntax/directive-t0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 09:49:24 -0000 Author: obrien Date: Mon Jan 4 09:49:23 2010 New Revision: 201478 URL: http://svn.freebsd.org/changeset/base/201478 Log: Regression test for r201456. Added: head/tools/regression/usr.bin/make/syntax/directive-t0/ head/tools/regression/usr.bin/make/syntax/directive-t0/Makefile (contents, props changed) head/tools/regression/usr.bin/make/syntax/directive-t0/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/directive-t0/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/directive-t0/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/syntax/directive-t0/test.t (contents, props changed) Added: head/tools/regression/usr.bin/make/syntax/directive-t0/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/directive-t0/Makefile Mon Jan 4 09:49:23 2010 (r201478) @@ -0,0 +1,8 @@ +# $FreeBSD$ +# +# A typo'ed directive. +# + +.uudef foo + +all: Added: head/tools/regression/usr.bin/make/syntax/directive-t0/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/directive-t0/expected.status.1 Mon Jan 4 09:49:23 2010 (r201478) @@ -0,0 +1 @@ +1 Added: head/tools/regression/usr.bin/make/syntax/directive-t0/expected.stderr.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/directive-t0/expected.stderr.1 Mon Jan 4 09:49:23 2010 (r201478) @@ -0,0 +1,2 @@ +"Makefile", line 6: Unknown directive +make: fatal errors encountered -- cannot continue Added: head/tools/regression/usr.bin/make/syntax/directive-t0/expected.stdout.1 ============================================================================== Added: head/tools/regression/usr.bin/make/syntax/directive-t0/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/syntax/directive-t0/test.t Mon Jan 4 09:49:23 2010 (r201478) @@ -0,0 +1,14 @@ +#! /bin/sh +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="A typo'ed directive." + +# Run +TEST_N=1 +TEST_1= + +eval_cmd $* From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 09:50:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EAC7106566B; Mon, 4 Jan 2010 09:50:31 +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 048E78FC19; Mon, 4 Jan 2010 09:50:31 +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 o049oUOT020613; Mon, 4 Jan 2010 09:50:30 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o049oUN4020612; Mon, 4 Jan 2010 09:50:30 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040950.o049oUN4020612@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 09:50: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: r201479 - in head/tools/regression: usr.bin/lastcomm usr.sbin/sa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 09:50:31 -0000 Author: obrien Date: Mon Jan 4 09:50:30 2010 New Revision: 201479 URL: http://svn.freebsd.org/changeset/base/201479 Log: It is expected these are chmod +x. Modified: Directory Properties: head/tools/regression/usr.bin/lastcomm/regress.t (props changed) head/tools/regression/usr.sbin/sa/regress.t (props changed) From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 09:54:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68EA71065695; Mon, 4 Jan 2010 09:54:24 +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 5890A8FC25; Mon, 4 Jan 2010 09:54: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 o049sOQp021514; Mon, 4 Jan 2010 09:54:24 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o049sOhM021512; Mon, 4 Jan 2010 09:54:24 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040954.o049sOhM021512@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 09:54: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: r201480 - head/tools/regression/usr.bin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 09:54:24 -0000 Author: obrien Date: Mon Jan 4 09:54:24 2010 New Revision: 201480 URL: http://svn.freebsd.org/changeset/base/201480 Log: Don't process 'lastcomm' if "AUTOMATED" is defined. The tests for it require manual setup. Modified: head/tools/regression/usr.bin/Makefile Modified: head/tools/regression/usr.bin/Makefile ============================================================================== --- head/tools/regression/usr.bin/Makefile Mon Jan 4 09:50:30 2010 (r201479) +++ head/tools/regression/usr.bin/Makefile Mon Jan 4 09:54:24 2010 (r201480) @@ -1,5 +1,8 @@ # $FreeBSD$ -SUBDIR= calendar comm file2c join jot m4 printf sed tr uudecode uuencode xargs lastcomm +SUBDIR= calendar comm file2c join jot m4 printf sed tr uudecode uuencode xargs +.if !defined(AUTOMATED) +SUBDIR+= lastcomm +.endif .include From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 09:57:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 814F010656AA; Mon, 4 Jan 2010 09:57:00 +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 5E69E8FC1E; Mon, 4 Jan 2010 09:57:00 +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 o049v0bj022123; Mon, 4 Jan 2010 09:57:00 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o049v0uJ022121; Mon, 4 Jan 2010 09:57:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040957.o049v0uJ022121@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 09:57: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: r201481 - head/tools/regression/acct X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 09:57:00 -0000 Author: obrien Date: Mon Jan 4 09:57:00 2010 New Revision: 201481 URL: http://svn.freebsd.org/changeset/base/201481 Log: Also cleanup after the test run. Modified: head/tools/regression/acct/regress.t Modified: head/tools/regression/acct/regress.t ============================================================================== --- head/tools/regression/acct/regress.t Mon Jan 4 09:54:24 2010 (r201480) +++ head/tools/regression/acct/regress.t Mon Jan 4 09:57:00 2010 (r201481) @@ -17,7 +17,7 @@ check() fi } -(cd $DIR ; make pack) +(cd $DIR ; make pack) >/dev/null 2>&1 echo 1..7 @@ -29,4 +29,6 @@ check 5 1 1000000 check 6 2147483647 999999 check 7 10000000 +(cd $DIR ; make clean) >/dev/null 2>&1 + exit 0 From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 09:59:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A529106566C; Mon, 4 Jan 2010 09:59:18 +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 799298FC0C; Mon, 4 Jan 2010 09:59:18 +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 o049xICg022647; Mon, 4 Jan 2010 09:59:18 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o049xIkw022645; Mon, 4 Jan 2010 09:59:18 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040959.o049xIkw022645@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 09:59:18 +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: r201482 - head/tools/regression/usr.bin/lastcomm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 09:59:18 -0000 Author: obrien Date: Mon Jan 4 09:59:18 2010 New Revision: 201482 URL: http://svn.freebsd.org/changeset/base/201482 Log: You need to be root to run this test. Modified: head/tools/regression/usr.bin/lastcomm/values.sh Modified: head/tools/regression/usr.bin/lastcomm/values.sh ============================================================================== --- head/tools/regression/usr.bin/lastcomm/values.sh Mon Jan 4 09:57:00 2010 (r201481) +++ head/tools/regression/usr.bin/lastcomm/values.sh Mon Jan 4 09:59:18 2010 (r201482) @@ -12,6 +12,11 @@ run() /usr/bin/time -l -o $1.time "$@" } +if [ `whoami` != "root" ]; then + echo "You need to be root to run this test." + exit 1 +fi + echo Redirecting accounting. mkdir $TMPDIR From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 10:37:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B6021065695; Mon, 4 Jan 2010 10:37:08 +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 0B1598FC14; Mon, 4 Jan 2010 10:37:08 +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 o04Ab7eg031250; Mon, 4 Jan 2010 10:37:07 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04Ab7S6031248; Mon, 4 Jan 2010 10:37:07 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041037.o04Ab7S6031248@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 10:37: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: r201484 - head/bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 10:37:08 -0000 Author: obrien Date: Mon Jan 4 10:37:07 2010 New Revision: 201484 URL: http://svn.freebsd.org/changeset/base/201484 Log: Fix the "-t" functionality. Per the regression tests (pgrep-t.t & pkill-t.t), "-t" should accept "v1", which means a plain number should be accepted for UNIX98-style PTY's. Modified: head/bin/pkill/pkill.c Modified: head/bin/pkill/pkill.c ============================================================================== --- head/bin/pkill/pkill.c Mon Jan 4 10:25:00 2010 (r201483) +++ head/bin/pkill/pkill.c Mon Jan 4 10:37:07 2010 (r201484) @@ -670,9 +670,6 @@ makelist(struct listhead *head, enum lis if (li->li_number == 0) li->li_number = -1; /* any jail */ break; - case LT_TTY: - usage(); - /* NOTREACHED */ default: break; } @@ -708,6 +705,10 @@ makelist(struct listhead *head, enum lis if (stat(buf, &st) != -1) goto foundtty; + snprintf(buf, sizeof(buf), _PATH_DEV "pts/%s", cp); + if (stat(buf, &st) != -1) + goto foundtty; + if (errno == ENOENT) errx(STATUS_BADUSAGE, "No such tty: `%s'", sp); err(STATUS_ERROR, "Cannot access `%s'", sp); From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 10:50:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C3F7106566C; Mon, 4 Jan 2010 10:50:18 +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 0BCDA8FC0A; Mon, 4 Jan 2010 10:50:18 +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 o04AoH70036179; Mon, 4 Jan 2010 10:50:17 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04AoHJS036178; Mon, 4 Jan 2010 10:50:17 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041050.o04AoHJS036178@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 10:50: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: r201487 - head/bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 10:50:18 -0000 Author: obrien Date: Mon Jan 4 10:50:17 2010 New Revision: 201487 URL: http://svn.freebsd.org/changeset/base/201487 Log: Committed the wrong version in r201484. This time really fix the "-t" functionality. Per the regression tests (pgrep-t.t & pkill-t.t), "-t" should accept "v1", which means a plain number should be accepted for UNIX98-style PTY's. Modified: head/bin/pkill/pkill.c Modified: head/bin/pkill/pkill.c ============================================================================== --- head/bin/pkill/pkill.c Mon Jan 4 10:39:16 2010 (r201486) +++ head/bin/pkill/pkill.c Mon Jan 4 10:50:17 2010 (r201487) @@ -670,6 +670,20 @@ makelist(struct listhead *head, enum lis if (li->li_number == 0) li->li_number = -1; /* any jail */ break; + case LT_TTY: + if (li->li_number < 0) + errx(STATUS_BADUSAGE, + "Negative /dev/pts tty `%s'", sp); + snprintf(buf, sizeof(buf), _PATH_DEV "pts/%s", + sp); + if (stat(buf, &st) != -1) + goto foundtty; + if (errno == ENOENT) + errx(STATUS_BADUSAGE, "No such tty: `" + _PATH_DEV "pts/%s'", sp); + err(STATUS_ERROR, "Cannot access `" + _PATH_DEV "pts/%s'", sp); + break; default: break; } @@ -705,10 +719,6 @@ makelist(struct listhead *head, enum lis if (stat(buf, &st) != -1) goto foundtty; - snprintf(buf, sizeof(buf), _PATH_DEV "pts/%s", cp); - if (stat(buf, &st) != -1) - goto foundtty; - if (errno == ENOENT) errx(STATUS_BADUSAGE, "No such tty: `%s'", sp); err(STATUS_ERROR, "Cannot access `%s'", sp); From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 10:58:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 887DC106566C; Mon, 4 Jan 2010 10:58:09 +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 77CF78FC08; Mon, 4 Jan 2010 10:58:09 +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 o04Aw9F2037927; Mon, 4 Jan 2010 10:58:09 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04Aw9MP037925; Mon, 4 Jan 2010 10:58:09 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041058.o04Aw9MP037925@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 10:58: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: r201488 - head/tools/regression/usr.bin/calendar X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 10:58:09 -0000 Author: obrien Date: Mon Jan 4 10:58:08 2010 New Revision: 201488 URL: http://svn.freebsd.org/changeset/base/201488 Log: 'prove -r' isn't as smart as grog thought. Modified: head/tools/regression/usr.bin/calendar/regress.sh Modified: head/tools/regression/usr.bin/calendar/regress.sh ============================================================================== --- head/tools/regression/usr.bin/calendar/regress.sh Mon Jan 4 10:50:17 2010 (r201487) +++ head/tools/regression/usr.bin/calendar/regress.sh Mon Jan 4 10:58:08 2010 (r201488) @@ -7,31 +7,25 @@ CALENDAR="${CALENDAR_BIN} ${CALENDAR_FIL REGRESSION_START($1) -echo 1..4 +echo 1..28 REGRESSION_TEST(`s1',`$CALENDAR -t 29.12.2006') REGRESSION_TEST(`s2',`$CALENDAR -t 30.12.2006') REGRESSION_TEST(`s3',`$CALENDAR -t 31.12.2006') REGRESSION_TEST(`s4',`$CALENDAR -t 01.01.2007') -echo 5..9 - REGRESSION_TEST(`a1',`$CALENDAR -A 3 -t 28.12.2006') REGRESSION_TEST(`a2',`$CALENDAR -A 3 -t 29.12.2006') REGRESSION_TEST(`a3',`$CALENDAR -A 3 -t 30.12.2006') REGRESSION_TEST(`a4',`$CALENDAR -A 3 -t 31.12.2006') REGRESSION_TEST(`a5',`$CALENDAR -A 3 -t 01.01.2007') -echo 10..14 - REGRESSION_TEST(`b1',`$CALENDAR -B 3 -t 31.12.2006') REGRESSION_TEST(`b2',`$CALENDAR -B 3 -t 01.01.2007') REGRESSION_TEST(`b3',`$CALENDAR -B 3 -t 02.01.2007') REGRESSION_TEST(`b4',`$CALENDAR -B 3 -t 03.01.2007') REGRESSION_TEST(`b5',`$CALENDAR -B 3 -t 04.01.2007') -echo 15..21 - REGRESSION_TEST(`w0-1',`$CALENDAR -W 0 -t 28.12.2006') REGRESSION_TEST(`w0-2',`$CALENDAR -W 0 -t 29.12.2006') REGRESSION_TEST(`w0-3',`$CALENDAR -W 0 -t 30.12.2006') @@ -40,8 +34,6 @@ REGRESSION_TEST(`w0-5',`$CALENDAR -W 0 - REGRESSION_TEST(`w0-6',`$CALENDAR -W 0 -t 02.01.2007') REGRESSION_TEST(`w0-7',`$CALENDAR -W 0 -t 03.01.2007') -echo 22..28 - REGRESSION_TEST(`wn-1',`$CALENDAR -W 0 -t 28.12.2006') REGRESSION_TEST(`wn-2',`$CALENDAR -W 1 -t 28.12.2006') REGRESSION_TEST(`wn-3',`$CALENDAR -W 2 -t 28.12.2006') From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 10:59:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7FCF106566B; Mon, 4 Jan 2010 10:59:14 +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 D7F378FC1F; Mon, 4 Jan 2010 10:59:14 +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 o04AxE6a038225; Mon, 4 Jan 2010 10:59:14 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04AxEIN038222; Mon, 4 Jan 2010 10:59:14 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041059.o04AxEIN038222@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 10:59: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: r201489 - head/tools/regression/usr.bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 10:59:15 -0000 Author: obrien Date: Mon Jan 4 10:59:14 2010 New Revision: 201489 URL: http://svn.freebsd.org/changeset/base/201489 Log: Catch up with UNIX98-style PTY's. Modified: head/tools/regression/usr.bin/pkill/pgrep-t.t head/tools/regression/usr.bin/pkill/pkill-t.t Modified: head/tools/regression/usr.bin/pkill/pgrep-t.t ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-t.t Mon Jan 4 10:58:08 2010 (r201488) +++ head/tools/regression/usr.bin/pkill/pgrep-t.t Mon Jan 4 10:59:14 2010 (r201489) @@ -11,7 +11,10 @@ if [ "$tty" = "??" ]; then tty="-" ttyshort="-" else - ttyshort=`echo $tty | cut -c 4-` + case $tty in + pts/*) ttyshort=`echo $tty | cut -c 5-` ;; + *) ttyshort=`echo $tty | cut -c 4-` ;; + esac fi sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep Modified: head/tools/regression/usr.bin/pkill/pkill-t.t ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-t.t Mon Jan 4 10:58:08 2010 (r201488) +++ head/tools/regression/usr.bin/pkill/pkill-t.t Mon Jan 4 10:59:14 2010 (r201489) @@ -11,7 +11,10 @@ if [ "$tty" = "??" ]; then tty="-" ttyshort="-" else - ttyshort=`echo $tty | cut -c 4-` + case $tty in + pts/*) ttyshort=`echo $tty | cut -c 5-` ;; + *) ttyshort=`echo $tty | cut -c 4-` ;; + esac fi sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 ln -sf /bin/sleep $sleep From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 11:00:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BD59106566B; Mon, 4 Jan 2010 11:00:13 +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 2B7818FC1E; Mon, 4 Jan 2010 11:00: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 o04B0D5c038481; Mon, 4 Jan 2010 11:00:13 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04B0Dao038479; Mon, 4 Jan 2010 11:00:13 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041100.o04B0Dao038479@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 11:00: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: r201490 - head/tools/regression/usr.bin/sed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 11:00:13 -0000 Author: obrien Date: Mon Jan 4 11:00:12 2010 New Revision: 201490 URL: http://svn.freebsd.org/changeset/base/201490 Log: There are actually 129 tests here. Modified: head/tools/regression/usr.bin/sed/multitest.t Modified: head/tools/regression/usr.bin/sed/multitest.t ============================================================================== --- head/tools/regression/usr.bin/sed/multitest.t Mon Jan 4 10:59:14 2010 (r201489) +++ head/tools/regression/usr.bin/sed/multitest.t Mon Jan 4 11:00:12 2010 (r201490) @@ -50,7 +50,7 @@ main() awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' lines1 awk 'END { for (i = 1; i < 10; i++) print "l2_" i}' lines2 - echo "1..121" + echo "1..129" exec 4>&1 5>&2 tests From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 11:11:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86DAA106578D; Mon, 4 Jan 2010 11:11:37 +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 73D9D8FC15; Mon, 4 Jan 2010 11:11:37 +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 o04BBbhr041069; Mon, 4 Jan 2010 11:11:37 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04BBbQb041066; Mon, 4 Jan 2010 11:11:37 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041111.o04BBbQb041066@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 11:11: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: r201491 - head/tools/regression/usr.bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 11:11:38 -0000 Author: obrien Date: Mon Jan 4 11:11:37 2010 New Revision: 201491 URL: http://svn.freebsd.org/changeset/base/201491 Log: Fix formatting. Modified: head/tools/regression/usr.bin/pkill/pgrep-t.t head/tools/regression/usr.bin/pkill/pkill-t.t Modified: head/tools/regression/usr.bin/pkill/pgrep-t.t ============================================================================== --- head/tools/regression/usr.bin/pkill/pgrep-t.t Mon Jan 4 11:00:12 2010 (r201490) +++ head/tools/regression/usr.bin/pkill/pgrep-t.t Mon Jan 4 11:11:37 2010 (r201491) @@ -13,7 +13,7 @@ if [ "$tty" = "??" ]; then else case $tty in pts/*) ttyshort=`echo $tty | cut -c 5-` ;; - *) ttyshort=`echo $tty | cut -c 4-` ;; + *) ttyshort=`echo $tty | cut -c 4-` ;; esac fi sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 Modified: head/tools/regression/usr.bin/pkill/pkill-t.t ============================================================================== --- head/tools/regression/usr.bin/pkill/pkill-t.t Mon Jan 4 11:00:12 2010 (r201490) +++ head/tools/regression/usr.bin/pkill/pkill-t.t Mon Jan 4 11:11:37 2010 (r201491) @@ -13,7 +13,7 @@ if [ "$tty" = "??" ]; then else case $tty in pts/*) ttyshort=`echo $tty | cut -c 5-` ;; - *) ttyshort=`echo $tty | cut -c 4-` ;; + *) ttyshort=`echo $tty | cut -c 4-` ;; esac fi sleep=`mktemp /tmp/$base.XXXXXX` || exit 1 From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 12:39:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9B3C106568B; Mon, 4 Jan 2010 12:39:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9FB98FC14; Mon, 4 Jan 2010 12:39:42 +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 o04Cdg59060469; Mon, 4 Jan 2010 12:39:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04CdgGR060467; Mon, 4 Jan 2010 12:39:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001041239.o04CdgGR060467@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 4 Jan 2010 12:39:42 +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: r201495 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 12:39:42 -0000 Author: trasz Date: Mon Jan 4 12:39:42 2010 New Revision: 201495 URL: http://svn.freebsd.org/changeset/base/201495 Log: Fix comments. Modified: head/sys/kern/subr_acl_nfs4.c Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Mon Jan 4 12:32:38 2010 (r201494) +++ head/sys/kern/subr_acl_nfs4.c Mon Jan 4 12:39:42 2010 (r201495) @@ -985,7 +985,7 @@ _acls_are_equal(const struct acl *a, con } /* - * This routine is used to determine whether to remove entry_type attribute + * This routine is used to determine whether to remove extended attribute * that stores ACL contents. */ int @@ -1004,9 +1004,8 @@ acl_nfs4_is_trivial(const struct acl *ac * * XXX: I guess there is a faster way to do this. However, even * this slow implementation significantly speeds things up - * for files that don't have any entry_type ACL entries - it's - * critical for performance to not use EA when they are not - * needed. + * for files that don't have non-trivial ACLs - it's critical + * for performance to not use EA when they are not needed. */ tmpaclp = acl_alloc(M_WAITOK | M_ZERO); acl_nfs4_sync_mode_from_acl(&tmpmode, aclp); From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 14:58:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE7811065786; Mon, 4 Jan 2010 14:58: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 DD2D38FC17; Mon, 4 Jan 2010 14:58:41 +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 o04Ewfh2091521; Mon, 4 Jan 2010 14:58:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EwfqN091519; Mon, 4 Jan 2010 14:58:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001041458.o04EwfqN091519@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 4 Jan 2010 14:58: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: r201504 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:58:42 -0000 Author: kib Date: Mon Jan 4 14:58:41 2010 New Revision: 201504 URL: http://svn.freebsd.org/changeset/base/201504 Log: PG_NOSYNC is called VPO_NOSYNC for long time. MFC after: 3 days Modified: head/share/man/man9/vm_page_bits.9 Modified: head/share/man/man9/vm_page_bits.9 ============================================================================== --- head/share/man/man9/vm_page_bits.9 Mon Jan 4 14:58:24 2010 (r201503) +++ head/share/man/man9/vm_page_bits.9 Mon Jan 4 14:58:41 2010 (r201504) @@ -94,7 +94,7 @@ is zero and .Fa size is one page, the modified bit in the page map is cleared; as well, the -.Dv PG_NOSYNC +.Dv VPO_NOSYNC flag is cleared. .Pp .Fn vm_page_clear_dirty From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 15:40:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C3E21065670; Mon, 4 Jan 2010 15:40: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 EE84B8FC15; Mon, 4 Jan 2010 15:40: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 o04FeHnN003849; Mon, 4 Jan 2010 15:40:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04FeHfJ003840; Mon, 4 Jan 2010 15:40:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001041540.o04FeHfJ003840@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 4 Jan 2010 15:40: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: r201512 - in head: include lib/libc/gen usr.bin/catman usr.bin/makewhatis usr.sbin/lpr/common_source X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:40:18 -0000 Author: kib Date: Mon Jan 4 15:40:17 2010 New Revision: 201512 URL: http://svn.freebsd.org/changeset/base/201512 Log: Modernize scandir(3) and alphasort(3) interfaces according to the IEEE Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions, so we better follow too (older glibc used old BSDish alphasort prototype and corresponding type of the comparision function for scandir). While there, change the definitions of the functions to ANSI C and fix several style issues nearby. Remove requirement for "sys/types.h" include for functions from manpage. POSIX also requires that alphasort(3) sorts as if strcoll(3) was used, but leave the strcmp(3) call in the function for now. Adapt in-tree callers of scandir(3) to new declaration. The fact that select_sections() from catman(1) could modify supplied struct dirent is a bug. PR: standards/142255 MFC after: 2 weeks Modified: head/include/dirent.h head/lib/libc/gen/opendir.c head/lib/libc/gen/scandir.3 head/lib/libc/gen/scandir.c head/usr.bin/catman/catman.c head/usr.bin/makewhatis/makewhatis.c head/usr.sbin/lpr/common_source/lp.h head/usr.sbin/lpr/common_source/rmjob.c Modified: head/include/dirent.h ============================================================================== --- head/include/dirent.h Mon Jan 4 15:34:49 2010 (r201511) +++ head/include/dirent.h Mon Jan 4 15:40:17 2010 (r201512) @@ -95,7 +95,7 @@ typedef void * DIR; __BEGIN_DECLS #if __BSD_VISIBLE DIR *__opendir2(const char *, int); -int alphasort(const void *, const void *); +int alphasort(const struct dirent **, const struct dirent **); int getdents(int, char *, int); int getdirentries(int, char *, int, long *); #endif @@ -109,7 +109,8 @@ int readdir_r(DIR *, struct dirent *, s void rewinddir(DIR *); #if __BSD_VISIBLE int scandir(const char *, struct dirent ***, - int (*)(struct dirent *), int (*)(const void *, const void *)); + int (*)(const struct dirent *), int (*)(const struct dirent **, + const struct dirent **)); #endif #if __XSI_VISIBLE void seekdir(DIR *, long); Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Mon Jan 4 15:34:49 2010 (r201511) +++ head/lib/libc/gen/opendir.c Mon Jan 4 15:40:17 2010 (r201512) @@ -240,7 +240,8 @@ __opendir_common(int fd, const char *nam /* * This sort must be stable. */ - mergesort(dpv, n, sizeof(*dpv), alphasort); + mergesort(dpv, n, sizeof(*dpv), (int (*)(const + void *, const void *))alphasort); dpv[n] = NULL; xp = NULL; Modified: head/lib/libc/gen/scandir.3 ============================================================================== --- head/lib/libc/gen/scandir.3 Mon Jan 4 15:34:49 2010 (r201511) +++ head/lib/libc/gen/scandir.3 Mon Jan 4 15:40:17 2010 (r201512) @@ -28,7 +28,7 @@ .\" @(#)scandir.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd January 3, 2010 .Dt SCANDIR 3 .Os .Sh NAME @@ -38,12 +38,11 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In dirent.h .Ft int -.Fn scandir "const char *dirname" "struct dirent ***namelist" "int \\*(lp*select\\*(rp\\*(lpstruct dirent *\\*(rp" "int \\*(lp*compar\\*(rp\\*(lpconst void *, const void *\\*(rp" +.Fn scandir "const char *dirname" "struct dirent ***namelist" "int \\*(lp*select\\*(rp\\*(lpconst struct dirent *\\*(rp" "int \\*(lp*compar\\*(rp\\*(lpconst struct dirent **, const struct dirent **\\*(rp" .Ft int -.Fn alphasort "const void *d1" "const void *d2" +.Fn alphasort "const struct dirent **d1" "const struct dirent **d2" .Sh DESCRIPTION The .Fn scandir Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Mon Jan 4 15:34:49 2010 (r201511) +++ head/lib/libc/gen/scandir.c Mon Jan 4 15:40:17 2010 (r201512) @@ -58,11 +58,9 @@ __FBSDID("$FreeBSD$"); (((dp)->d_namlen + 1 + 3) &~ 3)) int -scandir(dirname, namelist, select, dcomp) - const char *dirname; - struct dirent ***namelist; - int (*select)(struct dirent *); - int (*dcomp)(const void *, const void *); +scandir(const char *dirname, struct dirent ***namelist, + int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, + const struct dirent **)) { struct dirent *d, *p, **names = NULL; size_t nitems = 0; @@ -111,26 +109,25 @@ scandir(dirname, namelist, select, dcomp } closedir(dirp); if (nitems && dcomp != NULL) - qsort(names, nitems, sizeof(struct dirent *), dcomp); + qsort(names, nitems, sizeof(struct dirent *), + (int (*)(const void *, const void *))dcomp); *namelist = names; - return(nitems); + return (nitems); fail: while (nitems > 0) free(names[--nitems]); free(names); closedir(dirp); - return -1; + return (-1); } /* * Alphabetic order comparison routine for those who want it. */ int -alphasort(d1, d2) - const void *d1; - const void *d2; +alphasort(const struct dirent **d1, const struct dirent **d2) { - return(strcmp((*(struct dirent **)d1)->d_name, - (*(struct dirent **)d2)->d_name)); + + return (strcmp((*d1)->d_name, (*d2)->d_name)); } Modified: head/usr.bin/catman/catman.c ============================================================================== --- head/usr.bin/catman/catman.c Mon Jan 4 15:34:49 2010 (r201511) +++ head/usr.bin/catman/catman.c Mon Jan 4 15:40:17 2010 (r201512) @@ -589,9 +589,15 @@ process_section(char *mandir, char *sect } static int -select_sections(struct dirent *entry) +select_sections(const struct dirent *entry) { - return directory_type(entry->d_name) == MAN_SECTION_DIR; + char *name; + int ret; + + name = strdup(entry->d_name); + ret = directory_type(name) == MAN_SECTION_DIR; + free(name); + return (ret); } /* Modified: head/usr.bin/makewhatis/makewhatis.c ============================================================================== --- head/usr.bin/makewhatis/makewhatis.c Mon Jan 4 15:34:49 2010 (r201511) +++ head/usr.bin/makewhatis/makewhatis.c Mon Jan 4 15:40:17 2010 (r201512) @@ -879,9 +879,9 @@ process_section(char *section_dir) * Returns whether the directory entry is a man page section. */ static int -select_sections(struct dirent *entry) +select_sections(const struct dirent *entry) { - char *p = &entry->d_name[3]; + const char *p = &entry->d_name[3]; if (strncmp(entry->d_name, "man", 3) != 0) return 0; Modified: head/usr.sbin/lpr/common_source/lp.h ============================================================================== --- head/usr.sbin/lpr/common_source/lp.h Mon Jan 4 15:34:49 2010 (r201511) +++ head/usr.sbin/lpr/common_source/lp.h Mon Jan 4 15:40:17 2010 (r201512) @@ -280,7 +280,7 @@ void inform(const struct printer *_pp, void init_printer(struct printer *_pp); void init_request(struct request *_rp); int inlist(char *_uname, char *_cfile); -int iscf(struct dirent *_d); +int iscf(const struct dirent *_d); void ldump(const char *_nfile, const char *_datafile, int _copies); void lastprinter(void); int lockchk(struct printer *_pp, char *_slockf); Modified: head/usr.sbin/lpr/common_source/rmjob.c ============================================================================== --- head/usr.sbin/lpr/common_source/rmjob.c Mon Jan 4 15:34:49 2010 (r201511) +++ head/usr.sbin/lpr/common_source/rmjob.c Mon Jan 4 15:40:17 2010 (r201512) @@ -384,7 +384,7 @@ rmremote(const struct printer *pp) * Return 1 if the filename begins with 'cf' */ int -iscf(struct dirent *d) +iscf(const struct dirent *d) { return(d->d_name[0] == 'c' && d->d_name[1] == 'f'); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 15:41:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D818D1065693; Mon, 4 Jan 2010 15:41:16 +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 C64E48FC16; Mon, 4 Jan 2010 15:41:16 +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 o04FfGPm004256; Mon, 4 Jan 2010 15:41:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04FfGWK004254; Mon, 4 Jan 2010 15:41:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001041541.o04FfGWK004254@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 4 Jan 2010 15:41: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: r201513 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:41:16 -0000 Author: kib Date: Mon Jan 4 15:41:16 2010 New Revision: 201513 URL: http://svn.freebsd.org/changeset/base/201513 Log: Bump __FreeBSD_version for scandir(3) and alphasort(3) prototype changes. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Jan 4 15:40:17 2010 (r201512) +++ head/sys/sys/param.h Mon Jan 4 15:41:16 2010 (r201513) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900005 /* Master, propagated to newvers */ +#define __FreeBSD_version 900006 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 15:50:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 415BA106568B; Mon, 4 Jan 2010 15:50:42 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F6748FC0C; Mon, 4 Jan 2010 15:50:42 +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 o04Fog8o007671; Mon, 4 Jan 2010 15:50:42 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04FogAe007669; Mon, 4 Jan 2010 15:50:42 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201001041550.o04FogAe007669@svn.freebsd.org> From: Benedict Reuschling Date: Mon, 4 Jan 2010 15:50:42 +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: r201514 - head/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:50:42 -0000 Author: bcr (doc committer) Date: Mon Jan 4 15:50:41 2010 New Revision: 201514 URL: http://svn.freebsd.org/changeset/base/201514 Log: Now that I'm free from mentorship, it's only fair to document who my mentor was. Modified: head/share/misc/committers-doc.dot Modified: head/share/misc/committers-doc.dot ============================================================================== --- head/share/misc/committers-doc.dot Mon Jan 4 15:41:16 2010 (r201513) +++ head/share/misc/committers-doc.dot Mon Jan 4 15:50:41 2010 (r201514) @@ -35,6 +35,7 @@ node [color=lightblue2, style=filled, bg ache [label="Andrey Chernov\nache@FreeBSD.org\n1997/06/13"] ale [label="Alex Dupre\nale@FreeBSD.org\n2003/12/22"] +bcr [label="Benedict Reuschling\nbcr@FreeBSD.org\n2009/12/24"] blackend [label="Marc Fonvieille\nblackend@FreeBSD.org\n2002/06/16"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2000/08/22"] brd [label="Brad Davis\nbrd@FreeBSD.org\n2005/06/01"] @@ -98,6 +99,7 @@ jesusr -> jcamou jim -> trhodes jkois -> miwi +jkois -> bcr keramida -> blackend keramida -> danger From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 17:30:01 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4753910656F5; Mon, 4 Jan 2010 17:30:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id AD67C8FC14; Mon, 4 Jan 2010 17:30:00 +0000 (UTC) Received: from c220-239-235-55.carlnfd3.nsw.optusnet.com.au (c220-239-235-55.carlnfd3.nsw.optusnet.com.au [220.239.235.55]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o04HTtQj025591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Jan 2010 04:29:58 +1100 Date: Tue, 5 Jan 2010 04:29:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Konstantin Belousov In-Reply-To: <201001041540.o04FeHfJ003840@svn.freebsd.org> Message-ID: <20100105033154.Y53261@delplex.bde.org> References: <201001041540.o04FeHfJ003840@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: r201512 - in head: include lib/libc/gen usr.bin/catman usr.bin/makewhatis usr.sbin/lpr/common_source X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 17:30:01 -0000 On Mon, 4 Jan 2010, Konstantin Belousov wrote: > Log: > Modernize scandir(3) and alphasort(3) interfaces according to the IEEE > Std 1003.1-2008. s/Modernize/Break. (I sent private mail about this, but too late.) The old interfaces were correct, since they were compatible with qsort(), unlike the new interfaces. The new interfaces can be used, but are just harder and/or slower to use correctly. That they are harder to use correctly is shown by their incorrect use (=> undefined behaviour) here. > Both Linux and Solaris conforms to the new definitions, > so we better follow too (older glibc used old BSDish alphasort prototype > and corresponding type of the comparision function for scandir). While > there, change the definitions of the functions to ANSI C and fix several > style issues nearby. Hopefully they won't remain broken. Linux seems to have been broken relatively. According to google and glibc-2.6 sources, some of the history of this bug is: - Linux libc4 and libc5 (pre glibc-2.0 (?)) had the "more precise" [i.e., broken] POSIX prototype. - glibc-2.0 reverted to the "less precise" [i.e., correct] BSD prototype. - glibc-2.3 from May 18 2007 has the BSD prototype - glibc was changed to have the POSIX prototype on Mar 16 2009. > POSIX also requires that alphasort(3) sorts as if strcoll(3) was used, > but leave the strcmp(3) call in the function for now. ISTR a thread on the POSIX mailing list saying that strcoll() is unusable here. Directory entries may contain fairly raw bytes which might not be understood by strcoll(). > Adapt in-tree callers of scandir(3) to new declaration. The fact that > select_sections() from catman(1) could modify supplied struct dirent is > a bug. I don't see any bug here, except another one in the POSIX prototype. catman is allowed to modify its own dirents, and does so. This modification may even be required for its call to scandir() to work, and such modifications may even be useful for working around the strcoll() bug -- you could reasonably modify the names in the dirents to ensure that strcoll() can handle them. However, such modifications shouldn't be allowed by scandir(), especially for the comparison function (select_sections() is the select function). However2, scandir()'s new prototype doesn't say this -- it uses "const struct dirent **" where strict const'ness would require "struct dirent const * const *" (parse?). I think it does this for the same reason that the execve() and strtol() families leave out one `const' -- 2 'const' cause too many problems. With the old interface, there is necessarily only 1 `const', so type safety is incomplete in another (mostly less useful) way. > Modified: head/lib/libc/gen/scandir.c > ============================================================================== > --- head/lib/libc/gen/scandir.c Mon Jan 4 15:34:49 2010 (r201511) > +++ head/lib/libc/gen/scandir.c Mon Jan 4 15:40:17 2010 (r201512) > @@ -58,11 +58,9 @@ __FBSDID("$FreeBSD$"); > (((dp)->d_namlen + 1 + 3) &~ 3)) > > int > -scandir(dirname, namelist, select, dcomp) > - const char *dirname; > - struct dirent ***namelist; > - int (*select)(struct dirent *); > - int (*dcomp)(const void *, const void *); > +scandir(const char *dirname, struct dirent ***namelist, > + int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **, > + const struct dirent **)) > { > struct dirent *d, *p, **names = NULL; > size_t nitems = 0; > @@ -111,26 +109,25 @@ scandir(dirname, namelist, select, dcomp > } > closedir(dirp); > if (nitems && dcomp != NULL) > - qsort(names, nitems, sizeof(struct dirent *), dcomp); > + qsort(names, nitems, sizeof(struct dirent *), > + (int (*)(const void *, const void *))dcomp); This bogus cast prevents detection of undefined behaviour. Casting dcomp to an `int (*)(const void *, const void *)' does not make it a function of that type. The old code was correct. > *namelist = names; > - return(nitems); > + return (nitems); > > fail: > while (nitems > 0) > free(names[--nitems]); > free(names); > closedir(dirp); > - return -1; > + return (-1); > } > > /* > * Alphabetic order comparison routine for those who want it. > */ > int > -alphasort(d1, d2) > - const void *d1; > - const void *d2; > +alphasort(const struct dirent **d1, const struct dirent **d2) Undefined behaviour results when this function is called (if dcomp = alphasort). qsort() can only know to call a function of type `int (*)(const void *, const void *)', and alphasort() doesn't have that type. > { > - return(strcmp((*(struct dirent **)d1)->d_name, > - (*(struct dirent **)d2)->d_name)); The weak type checking let it get away with no const's at all here. > + > + return (strcmp((*d1)->d_name, (*d2)->d_name)); Further undefined behaviour results when the parameters are accessed. The undefined behaviour can be avoided using a wrapper function. This would be ugly for scandir(), since dcomp() would have to be passed as a global. The wrapper function would convert from (const void *d1, const void *d2) (the parameters passed to a qsort() comparison function) to (struct dirent **d1, struct dirent **d2) (the parameters accepted by a broken POSIX comparison function), using essentially the same code as the old version of the above. But this is a stupid way to implement a qsort() comparision function -- both ways need to do the conversion on every call, but the broken way requires an extra function to do it, in a context where inlining is usually impossible. These conversions are usually simple but will require extra register or stack copying with the extra function call. > } Similar undefined behaviour has been fixed in a few utilities in FreeBSD. > Modified: head/usr.bin/catman/catman.c > ============================================================================== > --- head/usr.bin/catman/catman.c Mon Jan 4 15:34:49 2010 (r201511) > +++ head/usr.bin/catman/catman.c Mon Jan 4 15:40:17 2010 (r201512) > @@ -589,9 +589,15 @@ process_section(char *mandir, char *sect > } > > static int > -select_sections(struct dirent *entry) > +select_sections(const struct dirent *entry) > { > - return directory_type(entry->d_name) == MAN_SECTION_DIR; > + char *name; > + int ret; > + > + name = strdup(entry->d_name); > + ret = directory_type(name) == MAN_SECTION_DIR; > + free(name); > + return (ret); > } I think the modification is not needed, and also doesn't actually happen here (since directory names cannot contain slashes). Bruce From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:04:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4584B1065679; Mon, 4 Jan 2010 18:04:37 +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 3399B8FC14; Mon, 4 Jan 2010 18:04:37 +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 o04I4bO7038526; Mon, 4 Jan 2010 18:04:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04I4bUw038524; Mon, 4 Jan 2010 18:04:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001041804.o04I4bUw038524@svn.freebsd.org> From: Xin LI Date: Mon, 4 Jan 2010 18:04: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: r201520 - head/usr.sbin/rtsold X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:04:37 -0000 Author: delphij Date: Mon Jan 4 18:04:36 2010 New Revision: 201520 URL: http://svn.freebsd.org/changeset/base/201520 Log: Test index value is within the range before using it to reference array member. PR: bin/141838 Submitted by: Henning Petersen MFC after: 2 weeks Modified: head/usr.sbin/rtsold/probe.c Modified: head/usr.sbin/rtsold/probe.c ============================================================================== --- head/usr.sbin/rtsold/probe.c Mon Jan 4 17:28:59 2010 (r201519) +++ head/usr.sbin/rtsold/probe.c Mon Jan 4 18:04:36 2010 (r201520) @@ -118,7 +118,7 @@ defrouter_probe(struct ifinfo *ifinfo) goto closeandend; } - for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) { + for (i = 0; i < DRLSTSIZ && dr.defrouter[i].if_index; i++) { if (ifindex && dr.defrouter[i].if_index == ifindex) { /* sanity check */ if (!IN6_IS_ADDR_LINKLOCAL(&dr.defrouter[i].rtaddr)) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:08:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91A261065676; Mon, 4 Jan 2010 18:08:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56B338FC17; Mon, 4 Jan 2010 18:08:16 +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 o04I8Glx039359; Mon, 4 Jan 2010 18:08:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04I8GJ3039357; Mon, 4 Jan 2010 18:08:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001041808.o04I8GJ3039357@svn.freebsd.org> From: Ed Schouten Date: Mon, 4 Jan 2010 18:08: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: r201521 - head/usr.sbin/bootparamd/bootparamd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:08:16 -0000 Author: ed Date: Mon Jan 4 18:08:16 2010 New Revision: 201521 URL: http://svn.freebsd.org/changeset/base/201521 Log: Unbreak bootparamd when setting WITHOUT_NIS. Submitted by: bf1783 googlemail com Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c ============================================================================== --- head/usr.sbin/bootparamd/bootparamd/bootparamd.c Mon Jan 4 18:04:36 2010 (r201520) +++ head/usr.sbin/bootparamd/bootparamd/bootparamd.c Mon Jan 4 18:08:16 2010 (r201521) @@ -191,9 +191,9 @@ int blen; { FILE *bpf; char *where; +#ifdef YP static char *result; int resultlen; -#ifdef YP static char *yp_domain; #endif @@ -294,9 +294,9 @@ int len; int ch, pch; FILE *bpf; int res = 0; +#ifdef YP static char *result; int resultlen; -#ifdef YP static char *yp_domain; #endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:21:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3365910656A5; Mon, 4 Jan 2010 18:21:28 +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 21A3C8FC14; Mon, 4 Jan 2010 18:21:28 +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 o04ILSsK042379; Mon, 4 Jan 2010 18:21:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04ILSMG042377; Mon, 4 Jan 2010 18:21:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001041821.o04ILSMG042377@svn.freebsd.org> From: John Baldwin Date: Mon, 4 Jan 2010 18:21: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: r201522 - head/etc/defaults X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:21:28 -0000 Author: jhb Date: Mon Jan 4 18:21:27 2010 New Revision: 201522 URL: http://svn.freebsd.org/changeset/base/201522 Log: Expose the upper 256 ptys in the default devfs rules. I should have updated this when expanding the old pty(4) driver to use 512 ptys by default. This is more important for 7.x. MFC after: 1 week Modified: head/etc/defaults/devfs.rules Modified: head/etc/defaults/devfs.rules ============================================================================== --- head/etc/defaults/devfs.rules Mon Jan 4 18:08:16 2010 (r201521) +++ head/etc/defaults/devfs.rules Mon Jan 4 18:21:27 2010 (r201522) @@ -44,6 +44,14 @@ add path 'ptyP*' unhide add path 'ptyQ*' unhide add path 'ptyR*' unhide add path 'ptyS*' unhide +add path 'ptyl*' unhide +add path 'ptym*' unhide +add path 'ptyn*' unhide +add path 'ptyo*' unhide +add path 'ptyL*' unhide +add path 'ptyM*' unhide +add path 'ptyN*' unhide +add path 'ptyO*' unhide add path 'ttyp*' unhide add path 'ttyq*' unhide add path 'ttyr*' unhide @@ -52,6 +60,14 @@ add path 'ttyP*' unhide add path 'ttyQ*' unhide add path 'ttyR*' unhide add path 'ttyS*' unhide +add path 'ttyl*' unhide +add path 'ttym*' unhide +add path 'ttyn*' unhide +add path 'ttyo*' unhide +add path 'ttyL*' unhide +add path 'ttyM*' unhide +add path 'ttyN*' unhide +add path 'ttyO*' unhide add path ptmx unhide add path pts unhide add path 'pts/*' unhide From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:25:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9123A1065672; Mon, 4 Jan 2010 18:25:38 +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 7F7338FC0A; Mon, 4 Jan 2010 18:25:38 +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 o04IPcrO043349; Mon, 4 Jan 2010 18:25:38 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04IPcXb043347; Mon, 4 Jan 2010 18:25:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001041825.o04IPcXb043347@svn.freebsd.org> From: Michael Tuexen Date: Mon, 4 Jan 2010 18:25: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: r201523 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:25:38 -0000 Author: tuexen Date: Mon Jan 4 18:25:38 2010 New Revision: 201523 URL: http://svn.freebsd.org/changeset/base/201523 Log: Correct usage of parenthesis. PR: kern/142066 Approved by: rrs (mentor) Obtained from: Henning Petersen, Bruce Cran. MFC after: 2 weeks Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Jan 4 18:21:27 2010 (r201522) +++ head/sys/netinet/sctp_pcb.c Mon Jan 4 18:25:38 2010 (r201523) @@ -5528,7 +5528,7 @@ sctp_pcb_init() /* Init the TIMEWAIT list */ for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { - LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); + LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } #if defined(SCTP_USE_THREAD_BASED_ITERATOR) @@ -6385,7 +6385,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp } skip_vtag_check: - chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; + chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; /* Now what about timed wait ? */ if (!LIST_EMPTY(chain)) { /* From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:46:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31ADF1065670; Mon, 4 Jan 2010 18:46:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210FC8FC33; Mon, 4 Jan 2010 18:46:55 +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 o04IktIN048100; Mon, 4 Jan 2010 18:46:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04IktvK048098; Mon, 4 Jan 2010 18:46:55 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001041846.o04IktvK048098@svn.freebsd.org> From: Ed Schouten Date: Mon, 4 Jan 2010 18:46: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: r201525 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:46:55 -0000 Author: ed Date: Mon Jan 4 18:46:54 2010 New Revision: 201525 URL: http://svn.freebsd.org/changeset/base/201525 Log: This should read #if __BSD_VISIBLE instead of #ifdef __BSD_VISIBLE. Modified: head/include/strings.h Modified: head/include/strings.h ============================================================================== --- head/include/strings.h Mon Jan 4 18:31:39 2010 (r201524) +++ head/include/strings.h Mon Jan 4 18:46:54 2010 (r201525) @@ -46,7 +46,7 @@ void bzero(void *, size_t); /* LEGA #if __XSI_VISIBLE int ffs(int) __pure2; #endif -#ifdef __BSD_VISIBLE +#if __BSD_VISIBLE int ffsl(long) __pure2; int ffsll(long long) __pure2; int fls(int) __pure2; From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:52:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E06C010656A3; Mon, 4 Jan 2010 18:52:29 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id A03B68FC2A; Mon, 4 Jan 2010 18:52:29 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 9C00D7310A; Mon, 4 Jan 2010 20:00:24 +0100 (CET) Date: Mon, 4 Jan 2010 20:00:24 +0100 From: Luigi Rizzo To: Michael Tuexen Message-ID: <20100104190024.GA47532@onelab2.iet.unipi.it> References: <201001041825.o04IPcXb043347@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001041825.o04IPcXb043347@svn.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: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:52:30 -0000 taking a random commit to this tree -- would you guys consider moving the sctp sources to its own directory, e.g. netinet/sctp/ or something that suits better ? It would help to browse through the directory: NAME FILES LINES netinet/ 156 153k sctp* 36 66k tcp* 24 16k ipfw/ 9 9k I understand that some of the headers should remain in netinet/ but surely the code is not bound to a specific place... cheers luigi On Mon, Jan 04, 2010 at 06:25:38PM +0000, Michael Tuexen wrote: > Author: tuexen > Date: Mon Jan 4 18:25:38 2010 > New Revision: 201523 > URL: http://svn.freebsd.org/changeset/base/201523 > > Log: > Correct usage of parenthesis. > > PR: kern/142066 > Approved by: rrs (mentor) > Obtained from: Henning Petersen, Bruce Cran. > MFC after: 2 weeks > > Modified: > head/sys/netinet/sctp_pcb.c > > Modified: head/sys/netinet/sctp_pcb.c > ============================================================================== > --- head/sys/netinet/sctp_pcb.c Mon Jan 4 18:21:27 2010 (r201522) > +++ head/sys/netinet/sctp_pcb.c Mon Jan 4 18:25:38 2010 (r201523) > @@ -5528,7 +5528,7 @@ sctp_pcb_init() > > /* Init the TIMEWAIT list */ > for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { > - LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); > + LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); > } > > #if defined(SCTP_USE_THREAD_BASED_ITERATOR) > @@ -6385,7 +6385,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp > } > skip_vtag_check: > > - chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; > + chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; > /* Now what about timed wait ? */ > if (!LIST_EMPTY(chain)) { > /* From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 18:57:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6B701065672; Mon, 4 Jan 2010 18:57:22 +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 B160B8FC15; Mon, 4 Jan 2010 18:57:22 +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 o04IvMwX050503; Mon, 4 Jan 2010 18:57:22 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04IvMUG050479; Mon, 4 Jan 2010 18:57:22 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001041857.o04IvMUG050479@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 18:57:22 +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: r201526 - in head: tools/regression/usr.bin/make tools/regression/usr.bin/make/sysmk tools/regression/usr.bin/make/sysmk/t0 tools/regression/usr.bin/make/sysmk/t0/2 tools/regression/usr... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 18:57:22 -0000 Author: obrien Date: Mon Jan 4 18:57:22 2010 New Revision: 201526 URL: http://svn.freebsd.org/changeset/base/201526 Log: Add ability to search up the directory hierarchy for the system directory. Do by specifying ".../" with '-m' or MAKESYSPATH (new) environment variable. Reviewed by: Obtained from: NetBSD (+ embellishment by me, sent back to NetBSD) Added: head/tools/regression/usr.bin/make/sysmk/ head/tools/regression/usr.bin/make/sysmk/t0/ head/tools/regression/usr.bin/make/sysmk/t0/2/ head/tools/regression/usr.bin/make/sysmk/t0/2/1/ head/tools/regression/usr.bin/make/sysmk/t0/2/1/Makefile (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t0/2/1/test.t (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t0/mk/ head/tools/regression/usr.bin/make/sysmk/t0/mk/sys.mk (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t1/ head/tools/regression/usr.bin/make/sysmk/t1/2/ head/tools/regression/usr.bin/make/sysmk/t1/2/1/ head/tools/regression/usr.bin/make/sysmk/t1/2/1/cleanup (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t1/2/1/test.t (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t1/mk/ head/tools/regression/usr.bin/make/sysmk/t1/mk/sys.mk (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t2/ head/tools/regression/usr.bin/make/sysmk/t2/2/ head/tools/regression/usr.bin/make/sysmk/t2/2/1/ head/tools/regression/usr.bin/make/sysmk/t2/2/1/cleanup (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t2/2/1/test.t (contents, props changed) head/tools/regression/usr.bin/make/sysmk/t2/mk/ head/tools/regression/usr.bin/make/sysmk/t2/mk/sys.mk (contents, props changed) Modified: head/tools/regression/usr.bin/make/common.sh head/usr.bin/make/dir.c head/usr.bin/make/dir.h head/usr.bin/make/main.c head/usr.bin/make/make.1 Modified: head/tools/regression/usr.bin/make/common.sh ============================================================================== --- head/tools/regression/usr.bin/make/common.sh Mon Jan 4 18:46:54 2010 (r201525) +++ head/tools/regression/usr.bin/make/common.sh Mon Jan 4 18:57:22 2010 (r201526) @@ -233,6 +233,12 @@ reset_test() # eval_clean() { + # + # If you have special cleaning needs, provide a 'cleanup' shell script. + # + if [ -n "${TEST_CLEANUP}" ] ; then + . ${SRC_DIR}/cleanup + fi rm -rf ${WORK_DIR} rm -rf ${OUTPUT_DIR} } Added: head/tools/regression/usr.bin/make/sysmk/t0/2/1/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t0/2/1/Makefile Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,6 @@ +# $FreeBSD$ +# +# Can we traverse up to / and find a 'mk/sys.mk'? +# +all: + @echo ${DASH_M_DOTDOTDOT} Added: head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.status.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t0/2/1/expected.stdout.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1 @@ +Found_DotDotDot_sys_mk Added: head/tools/regression/usr.bin/make/sysmk/t0/2/1/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t0/2/1/test.t Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,17 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../../../common.sh + +# Description +DESC="Can we traverse up to / and find a 'mk/sys.mk'?" + +# Run +TEST_N=1 +TEST_1="-m .../mk" +TEST_MAKE_DIRS="../../mk 755" +TEST_COPY_FILES="../../mk/sys.mk 644" + +eval_cmd $* Added: head/tools/regression/usr.bin/make/sysmk/t0/mk/sys.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t0/mk/sys.mk Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +DASH_M_DOTDOTDOT=Found_DotDotDot_sys_mk Added: head/tools/regression/usr.bin/make/sysmk/t1/2/1/cleanup ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t1/2/1/cleanup Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +rm -rf ${WORK_DIR}/../../../t0/2/1 Added: head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.status.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t1/2/1/expected.stdout.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1 @@ +Found_DotDotDot_sys_mk Added: head/tools/regression/usr.bin/make/sysmk/t1/2/1/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t1/2/1/test.t Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,19 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../../../common.sh + +# Description +DESC="Can we traverse up to / and find a 'mk/sys.mk' with -C -m?" + +# Run +TEST_N=1 +TEST_1="-C ../../../t0/2/1 -m .../mk" +TEST_MAKE_DIRS="../../mk 755 ../../../t0/mk 755 ../../../t0/2/1 755" +TEST_COPY_FILES="../../mk/sys.mk 644 ../../../t0/mk/sys.mk 644 ../../../t0/2/1/Makefile 644" +TEST_CLEAN_FILES="../../../t0/2/1" +TEST_CLEANUP=clean-special + +eval_cmd $* Added: head/tools/regression/usr.bin/make/sysmk/t1/mk/sys.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t1/mk/sys.mk Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +DASH_M_DOTDOTDOT=Found_WRONG_DotDotDot_sys_mk__with_C_before_m Added: head/tools/regression/usr.bin/make/sysmk/t2/2/1/cleanup ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t2/2/1/cleanup Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +rm -rf ${WORK_DIR}/../../../t0/2/1 Added: head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.status.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t2/2/1/expected.stdout.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1 @@ +Found_DotDotDot_sys_mk__with_m_before_C Added: head/tools/regression/usr.bin/make/sysmk/t2/2/1/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t2/2/1/test.t Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,19 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../../../common.sh + +# Description +DESC="Can we traverse up to / and find a 'mk/sys.mk' with -m -C?" + +# Run +TEST_N=1 +TEST_1="-m .../mk -C ../../../t0/2/1" +TEST_MAKE_DIRS="../../mk 755 ../../../t0/mk 755 ../../../t0/2/1 755" +TEST_COPY_FILES="../../mk/sys.mk 644 ../../../t0/mk/sys.mk 644 ../../../t0/2/1/Makefile 644" +TEST_CLEAN_FILES="../../../t0/2/1" +TEST_CLEANUP=clean-special + +eval_cmd $* Added: head/tools/regression/usr.bin/make/sysmk/t2/mk/sys.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/sysmk/t2/mk/sys.mk Mon Jan 4 18:57:22 2010 (r201526) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +DASH_M_DOTDOTDOT=Found_DotDotDot_sys_mk__with_m_before_C Modified: head/usr.bin/make/dir.c ============================================================================== --- head/usr.bin/make/dir.c Mon Jan 4 18:46:54 2010 (r201525) +++ head/usr.bin/make/dir.c Mon Jan 4 18:57:22 2010 (r201526) @@ -61,6 +61,10 @@ __FBSDID("$FreeBSD$"); * If it exists, the entire path is returned. * Otherwise NULL is returned. * + * Dir_FindHereOrAbove Search for a path in the current directory and + * then all the directories above it in turn until + * the path is found or we reach the root ("/"). + * * Dir_MTime Return the modification time of a node. The file * is searched for along the default search path. * The path and mtime fields of the node are filled in. @@ -83,7 +87,7 @@ __FBSDID("$FreeBSD$"); * Dir_PrintDirectories Print stats about the directory cache. */ -#include +#include #include #include #include @@ -851,6 +855,83 @@ Path_FindFile(char *name, struct Path *p /*- *----------------------------------------------------------------------- + * Dir_FindHereOrAbove -- + * search for a path starting at a given directory and then working + * our way up towards the root. + * + * Input: + * here starting directory + * search_path the path we are looking for + * result the result of a successful search is placed here + * rlen the length of the result buffer + * (typically MAXPATHLEN + 1) + * + * Results: + * 0 on failure, 1 on success [in which case the found path is put + * in the result buffer]. + * + * Side Effects: + *----------------------------------------------------------------------- + */ +int +Dir_FindHereOrAbove(char *here, char *search_path, char *result, int rlen) +{ + struct stat st; + char dirbase[MAXPATHLEN + 1], *db_end; + char try[MAXPATHLEN + 1], *try_end; + + /* copy out our starting point */ + snprintf(dirbase, sizeof(dirbase), "%s", here); + db_end = dirbase + strlen(dirbase); + + /* loop until we determine a result */ + while (1) { + /* try and stat(2) it ... */ + snprintf(try, sizeof(try), "%s/%s", dirbase, search_path); + if (stat(try, &st) != -1) { + /* + * Success! If we found a file, chop off + * the filename so we return a directory. + */ + if ((st.st_mode & S_IFMT) != S_IFDIR) { + try_end = try + strlen(try); + while (try_end > try && *try_end != '/') + try_end--; + if (try_end > try) + *try_end = 0; /* chop! */ + } + + /* + * Done! + */ + snprintf(result, rlen, "%s", try); + return(1); + } + + /* + * Nope, we didn't find it. If we used up dirbase we've + * reached the root and failed. + */ + if (db_end == dirbase) + break; /* Failed! */ + + /* + * truncate dirbase from the end to move up a dir + */ + while (db_end > dirbase && *db_end != '/') + db_end--; + *db_end = 0; /* chop! */ + + } /* while (1) */ + + /* + * We failed... + */ + return(0); +} + +/*- + *----------------------------------------------------------------------- * Dir_MTime -- * Find the modification time of the file described by gn along the * search path dirSearchPath. Modified: head/usr.bin/make/dir.h ============================================================================== --- head/usr.bin/make/dir.h Mon Jan 4 18:46:54 2010 (r201525) +++ head/usr.bin/make/dir.h Mon Jan 4 18:57:22 2010 (r201526) @@ -56,6 +56,7 @@ TAILQ_HEAD(Path, PathElement); void Dir_Init(void); void Dir_InitDot(void); Boolean Dir_HasWildcards(const char *); +int Dir_FindHereOrAbove(char *, char *, char *, int); int Dir_MTime(struct GNode *); void Dir_PrintDirectories(void); Modified: head/usr.bin/make/main.c ============================================================================== --- head/usr.bin/make/main.c Mon Jan 4 18:46:54 2010 (r201525) +++ head/usr.bin/make/main.c Mon Jan 4 18:57:22 2010 (r201526) @@ -368,6 +368,7 @@ MainParseArgs(int argc, char **argv) { int c; Boolean found_dd = FALSE; + char found_dir[MAXPATHLEN + 1]; /* for searching for sys.mk */ rearg: optind = 1; /* since we're called more than once */ @@ -394,6 +395,8 @@ rearg: case 'C': if (chdir(optarg) == -1) err(1, "chdir %s", optarg); + if (getcwd(curdir, MAXPATHLEN) == NULL) + err(2, NULL); break; case 'D': Var_SetGlobal(optarg, "1"); @@ -492,7 +495,15 @@ rearg: MFLAGS_append("-k", NULL); break; case 'm': - Path_AddDir(&sysIncPath, optarg); + /* look for magic parent directory search string */ + if (strncmp(".../", optarg, 4) == 0) { + if (!Dir_FindHereOrAbove(curdir, optarg + 4, + found_dir, sizeof(found_dir))) + break; /* nothing doing */ + Path_AddDir(&sysIncPath, found_dir); + } else { + Path_AddDir(&sysIncPath, optarg); + } MFLAGS_append("-m", optarg); break; case 'n': @@ -869,6 +880,7 @@ main(int argc, char **argv) char mdpath[MAXPATHLEN]; char obpath[MAXPATHLEN]; char cdpath[MAXPATHLEN]; + char found_dir[MAXPATHLEN + 1]; /* for searching for sys.mk */ char *cp = NULL, *start; save_argv = argv; @@ -1022,6 +1034,12 @@ main(int argc, char **argv) Job_SetPrefix(); /* + * Find where we are... + */ + if (getcwd(curdir, MAXPATHLEN) == NULL) + err(2, NULL); + + /* * First snag things out of the MAKEFLAGS environment * variable. Then parse the command line arguments. */ @@ -1030,11 +1048,8 @@ main(int argc, char **argv) MainParseArgs(argc, argv); /* - * Find where we are... + * Verify that cwd is sane (after -C may have changed it). */ - if (getcwd(curdir, MAXPATHLEN) == NULL) - err(2, NULL); - { struct stat sa; @@ -1132,18 +1147,37 @@ main(int argc, char **argv) * as dir1:...:dirn) to the system include path. */ if (TAILQ_EMPTY(&sysIncPath)) { - char syspath[] = PATH_DEFSYSPATH; + char defsyspath[] = PATH_DEFSYSPATH; + char *syspath = getenv("MAKESYSPATH"); + + /* + * If no user-supplied system path was given (thru -m option) + * add the directories from the DEFSYSPATH (more than one may + * be given as dir1:...:dirn) to the system include path. + */ + if (syspath == NULL || *syspath == '\0') + syspath = defsyspath; + else + syspath = estrdup(syspath); for (start = syspath; *start != '\0'; start = cp) { for (cp = start; *cp != '\0' && *cp != ':'; cp++) continue; - if (*cp == '\0') { - Path_AddDir(&sysIncPath, start); - } else { + if (*cp == ':') { *cp++ = '\0'; + } + /* look for magic parent directory search string */ + if (strncmp(".../", start, 4) == 0) { + if (Dir_FindHereOrAbove(curdir, start + 4, + found_dir, sizeof(found_dir))) { + Path_AddDir(&sysIncPath, found_dir); + } + } else { Path_AddDir(&sysIncPath, start); } } + if (syspath != defsyspath) + free(syspath); } /* Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Mon Jan 4 18:46:54 2010 (r201525) +++ head/usr.bin/make/make.1 Mon Jan 4 18:57:22 2010 (r201526) @@ -240,6 +240,36 @@ The system include path will always be a for "..."-style inclusions and makefile searches (see the .Fl I option). +.Pp +If a file or directory name in the +.Fl m +argument (or the +.Ev MAKESYSPATH +environment variable) starts with the string +.Qq \&.../ +then +.Nm +will search for the specified file or directory named in the remaining part +of the argument string. +The search starts with the current directory of the Makefile and then works +upward towards the root of the filesystem. +If the search is successful, +then the resulting directory replaces the +.Qq \&.../ +specification in the +.Fl m +argument. +If used, this feature allows +.Nm +to easily search in the current source tree for customized sys.mk files +(e.g. by using +.Qq \&.../mk/sys.mk +as an argument). +Note that a +.Fl C +that are earlier on the command line affect where +.Fl m Qq \&.../ +searches. .It Fl n Display the commands that would have been executed, but do not actually execute them. @@ -1665,8 +1695,9 @@ utility uses the following environment v .Ev MAKE , .Ev MAKEFLAGS , .Ev MAKEOBJDIR , +.Ev MAKEOBJDIRPREFIX , and -.Ev MAKEOBJDIRPREFIX . +.Ev MAKESYSPATH . .Sh FILES .Bl -tag -width /usr/share/doc/psd/12.make -compact .It Pa .depend From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 19:01:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0661065697; Mon, 4 Jan 2010 19:01:22 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 675458FC0C; Mon, 4 Jan 2010 19:01:22 +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 o04J1M0J051453; Mon, 4 Jan 2010 19:01:22 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04J1MdD051439; Mon, 4 Jan 2010 19:01:22 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001041901.o04J1MdD051439@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 4 Jan 2010 19:01:22 +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: r201527 - in head/sys: net netgraph netinet netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 19:01:22 -0000 Author: luigi Date: Mon Jan 4 19:01:22 2010 New Revision: 201527 URL: http://svn.freebsd.org/changeset/base/201527 Log: Various cleanup done in ipfw3-head branch including: - use a uniform mtag format for all packets that exit and re-enter the firewall in the middle of a rulechain. On reentry, all tags containing reinject info are renamed to MTAG_IPFW_RULE so the processing is simpler. - make ipfw and dummynet use ip_len and ip_off in network format everywhere. Conversion is done only once instead of tracking the format in every place. - use a macro FREE_PKT to dispose of mbufs. This eases portability. On passing i also removed a few typos, staticise or localise variables, remove useless declarations and other minor things. Overall the code shrinks a bit and is hopefully more readable. I have tested functionality for all but ng_ipfw and if_bridge/if_ethersubr. For ng_ipfw i am actually waiting for feedback from glebius@ because we might have some small changes to make. For if_bridge and if_ethersubr feedback would be welcome (there are still some redundant parts in these two modules that I would like to remove, but first i need to check functionality). Modified: head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/netgraph/ng_ipfw.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_divert.h head/sys/netinet/ip_dummynet.h head/sys/netinet/ipfw/ip_dummynet.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_dynamic.c head/sys/netinet/ipfw/ip_fw_log.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/ipfw/ip_fw_private.h head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/net/if_bridge.c Mon Jan 4 19:01:22 2010 (r201527) @@ -3040,25 +3040,26 @@ bridge_pfil(struct mbuf **mp, struct ifn } /* XXX this section is also in if_ethersubr.c */ - if (V_ip_fw_chk_ptr && pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { + // XXX PFIL_OUT or DIR_OUT ? + if (V_ip_fw_chk_ptr && pfil_ipfw != 0 && + dir == PFIL_OUT && ifp != NULL) { struct m_tag *mtag; error = -1; - mtag = m_tag_find(*mp, PACKET_TAG_DUMMYNET, NULL); + /* fetch the start point from existing tags, if any */ + mtag = m_tag_locate(*mp, MTAG_IPFW_RULE, 0, NULL); if (mtag == NULL) { - args.slot = 0; + args.rule.slot = 0; } else { struct dn_pkt_tag *dn_tag; + /* XXX can we free the tag after use ? */ mtag->m_tag_id = PACKET_TAG_NONE; dn_tag = (struct dn_pkt_tag *)(mtag + 1); - if (dn_tag->slot != 0 && V_fw_one_pass) - /* packet already partially processed */ + /* packet already partially processed ? */ + if (dn_tag->rule.slot != 0 && V_fw_one_pass) goto ipfwpass; - args.slot = dn_tag->slot; /* next rule to use */ - args.chain_id = dn_tag->chain_id; - args.rulenum = dn_tag->rulenum; - args.rule_id = dn_tag->rule_id; + args.rule = dn_tag->rule; } args.m = *mp; Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/net/if_ethersubr.c Mon Jan 4 19:01:22 2010 (r201527) @@ -469,21 +469,20 @@ ether_ipfw_chk(struct mbuf **m0, struct struct ip_fw_args args; struct m_tag *mtag; - mtag = m_tag_find(*m0, PACKET_TAG_DUMMYNET, NULL); + /* fetch start point from rule, if any */ + mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); if (mtag == NULL) { - args.slot = 0; + args.rule.slot = 0; } else { struct dn_pkt_tag *dn_tag; + /* XXX can we free it after use ? */ mtag->m_tag_id = PACKET_TAG_NONE; dn_tag = (struct dn_pkt_tag *)(mtag + 1); - if (dn_tag->slot != 0 && V_fw_one_pass) + if (dn_tag->rule.slot != 0 && V_fw_one_pass) /* dummynet packet, already partially processed */ return (1); - args.slot = dn_tag->slot; /* matching rule to restart */ - args.rulenum = dn_tag->rulenum; - args.rule_id = dn_tag->rule_id; - args.chain_id = dn_tag->chain_id; + args.rule = dn_tag->rule; } /* Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netgraph/ng_ipfw.c Mon Jan 4 19:01:22 2010 (r201527) @@ -221,21 +221,23 @@ ng_ipfw_findhook1(node_p node, u_int16_t static int ng_ipfw_rcvdata(hook_p hook, item_p item) { - struct ng_ipfw_tag *ngit; + struct ipfw_rule_ref *tag; struct mbuf *m; NGI_GET_M(item, m); NG_FREE_ITEM(item); - if ((ngit = (struct ng_ipfw_tag *)m_tag_locate(m, NGM_IPFW_COOKIE, 0, - NULL)) == NULL) { + tag = (struct ipfw_rule_ref *) + m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); + if (tag == NULL) { NG_FREE_M(m); return (EINVAL); /* XXX: find smth better */ }; - switch (ngit->dir) { - case DIR_OUT: - { + if (tag->info & IPFW_INFO_IN) { + ip_input(m); + return (0); + } else { struct ip *ip; if (m->m_len < sizeof(struct ip) && @@ -244,27 +246,16 @@ ng_ipfw_rcvdata(hook_p hook, item_p item ip = mtod(m, struct ip *); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); + SET_HOST_IPLEN(ip); return ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL); - } - case DIR_IN: - ip_input(m); - return (0); - default: - panic("ng_ipfw_rcvdata: bad dir %u", ngit->dir); } - - /* not reached */ - return (0); } static int ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_args *fwa, int tee) { struct mbuf *m; - struct ng_ipfw_tag *ngit; struct ip *ip; hook_p hook; int error = 0; @@ -273,7 +264,7 @@ ng_ipfw_input(struct mbuf **m0, int dir, * Node must be loaded and corresponding hook must be present. */ if (fw_node == NULL || - (hook = ng_ipfw_findhook1(fw_node, fwa->cookie)) == NULL) { + (hook = ng_ipfw_findhook1(fw_node, fwa->rule.info)) == NULL) { if (tee == 0) m_freem(*m0); return (ESRCH); /* no hook associated with this rule */ @@ -285,21 +276,21 @@ ng_ipfw_input(struct mbuf **m0, int dir, * a copy of a packet and forward it into netgraph without a tag. */ if (tee == 0) { + struct m_tag *tag; + struct ipfw_rule_ref *r; m = *m0; *m0 = NULL; /* it belongs now to netgraph */ - if ((ngit = (struct ng_ipfw_tag *)m_tag_alloc(NGM_IPFW_COOKIE, - 0, TAGSIZ, M_NOWAIT|M_ZERO)) == NULL) { + tag = m_tag_alloc(MTAG_IPFW_RULE, 0, sizeof(*r), + M_NOWAIT|M_ZERO); + if (tag == NULL) { m_freem(m); return (ENOMEM); } - ngit->slot = fwa->slot; - ngit->rulenum = fwa->rulenum; - ngit->rule_id = fwa->rule_id; - ngit->chain_id = fwa->chain_id; - ngit->dir = dir; -// ngit->ifp = fwa->oif; /* XXX do we use it ? */ - m_tag_prepend(m, &ngit->mt); + r = (struct ipfw_rule_ref *)(tag + 1); + *r = fwa->rule; + r->info = dir ? IPFW_INFO_IN : IPFW_INFO_OUT; + m_tag_prepend(m, tag); } else if ((m = m_dup(*m0, M_DONTWAIT)) == NULL) @@ -310,8 +301,6 @@ ng_ipfw_input(struct mbuf **m0, int dir, return (EINVAL); ip = mtod(m, struct ip *); - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); NG_SEND_DATA_ONLY(error, hook, m); Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ip_divert.c Mon Jan 4 19:01:22 2010 (r201527) @@ -52,19 +52,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include -#include #include -#include - -#include #include #include -#include #include #include @@ -72,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -194,7 +186,7 @@ div_destroy(void) * IPPROTO_DIVERT is not in the real IP protocol number space; this * function should never be called. Just in case, drop any packets. */ -void +static void div_input(struct mbuf *m, int off) { @@ -218,9 +210,8 @@ divert_packet(struct mbuf *m, int incomi struct sockaddr_in divsrc; struct m_tag *mtag; - mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL); + mtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); if (mtag == NULL) { - printf("%s: no divert tag\n", __func__); m_freem(m); return; } @@ -245,14 +236,15 @@ divert_packet(struct mbuf *m, int incomi ip->ip_len = htons(ip->ip_len); } #endif + bzero(&divsrc, sizeof(divsrc)); + divsrc.sin_len = sizeof(divsrc); + divsrc.sin_family = AF_INET; + /* record matching rule, in host format */ + divsrc.sin_port = ((struct ipfw_rule_ref *)(mtag+1))->rulenum; /* * Record receive interface address, if any. * But only for incoming packets. */ - bzero(&divsrc, sizeof(divsrc)); - divsrc.sin_len = sizeof(divsrc); - divsrc.sin_family = AF_INET; - divsrc.sin_port = divert_cookie(mtag); /* record matching rule */ if (incoming) { struct ifaddr *ifa; struct ifnet *ifp; @@ -300,7 +292,7 @@ divert_packet(struct mbuf *m, int incomi /* Put packet on socket queue, if any */ sa = NULL; - nport = htons((u_int16_t)divert_info(mtag)); + nport = htons((u_int16_t)(((struct ipfw_rule_ref *)(mtag+1))->info)); INP_INFO_RLOCK(&V_divcbinfo); LIST_FOREACH(inp, &V_divcb, inp_list) { /* XXX why does only one socket match? */ @@ -339,7 +331,7 @@ div_output(struct socket *so, struct mbu struct mbuf *control) { struct m_tag *mtag; - struct divert_tag *dt; + struct ipfw_rule_ref *dt; int error = 0; struct mbuf *options; @@ -354,23 +346,31 @@ div_output(struct socket *so, struct mbu if (control) m_freem(control); /* XXX */ - if ((mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL)) == NULL) { - mtag = m_tag_get(PACKET_TAG_DIVERT, sizeof(struct divert_tag), - M_NOWAIT | M_ZERO); + mtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); + if (mtag == NULL) { + /* this should be normal */ + mtag = m_tag_alloc(MTAG_IPFW_RULE, 0, + sizeof(struct ipfw_rule_ref), M_NOWAIT | M_ZERO); if (mtag == NULL) { error = ENOBUFS; goto cantsend; } - dt = (struct divert_tag *)(mtag+1); m_tag_prepend(m, mtag); - } else - dt = (struct divert_tag *)(mtag+1); + } + dt = (struct ipfw_rule_ref *)(mtag+1); /* Loopback avoidance and state recovery */ if (sin) { int i; - dt->cookie = sin->sin_port; + /* set the starting point. We provide a non-zero slot, + * but a non_matching chain_id to skip that info and use + * the rulenum/rule_id. + */ + dt->slot = 1; /* dummy, chain_id is invalid */ + dt->chain_id = 0; + dt->rulenum = sin->sin_port+1; /* host format ? */ + dt->rule_id = 0; /* * Find receive interface with the given name, stuffed * (if it exists) in the sin_zero[] field. @@ -388,7 +388,7 @@ div_output(struct socket *so, struct mbu struct ip *const ip = mtod(m, struct ip *); struct inpcb *inp; - dt->info |= IP_FW_DIVERT_OUTPUT_FLAG; + dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT; INP_INFO_WLOCK(&V_divcbinfo); inp = sotoinpcb(so); INP_RLOCK(inp); @@ -454,7 +454,7 @@ div_output(struct socket *so, struct mbu m_freem(options); } } else { - dt->info |= IP_FW_DIVERT_LOOPBACK_FLAG; + dt->info |= IPFW_IS_DIVERT | IPFW_INFO_IN; if (m->m_pkthdr.rcvif == NULL) { /* * No luck with the name, check by IP address. @@ -588,7 +588,7 @@ div_send(struct socket *so, int flags, s return div_output(so, m, (struct sockaddr_in *)nam, control); } -void +static void div_ctlinput(int cmd, struct sockaddr *sa, void *vip) { struct in_addr faddr; @@ -801,5 +801,5 @@ static moduledata_t ipdivertmod = { }; DECLARE_MODULE(ipdivert, ipdivertmod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); -MODULE_DEPEND(dummynet, ipfw, 2, 2, 2); +MODULE_DEPEND(ipdivert, ipfw, 2, 2, 2); MODULE_VERSION(ipdivert, 1); Modified: head/sys/netinet/ip_divert.h ============================================================================== --- head/sys/netinet/ip_divert.h Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ip_divert.h Mon Jan 4 19:01:22 2010 (r201527) @@ -36,53 +36,20 @@ #define _NETINET_IP_DIVERT_H_ /* - * Sysctl declaration. + * divert has no custom kernel-userland API. + * + * All communication occurs through a sockaddr_in socket where + * + * kernel-->userland + * sin_port = matching rule, host format; + * sin_addr = IN: first address of the incoming interface; + * OUT: INADDR_ANY + * sin_zero = if fits, the interface name (max 7 bytes + NUL) + * + * userland->kernel + * sin_port = restart-rule - 1, host order + * (we restart at sin_port + 1) + * sin_addr = IN: address of the incoming interface; + * OUT: INADDR_ANY */ -#ifdef SYSCTL_DECL -SYSCTL_DECL(_net_inet_divert); -#endif - -/* - * Divert socket definitions. - */ -struct divert_tag { - u_int32_t info; /* port & flags */ - u_int16_t cookie; /* ipfw rule number */ -}; - -/* - * Return the divert cookie associated with the mbuf; if any. - */ -static __inline u_int16_t -divert_cookie(struct m_tag *mtag) -{ - return ((struct divert_tag *)(mtag+1))->cookie; -} -static __inline u_int16_t -divert_find_cookie(struct mbuf *m) -{ - struct m_tag *mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL); - return mtag ? divert_cookie(mtag) : 0; -} - -/* - * Return the divert info associated with the mbuf; if any. - */ -static __inline u_int32_t -divert_info(struct m_tag *mtag) -{ - return ((struct divert_tag *)(mtag+1))->info; -} -static __inline u_int32_t -divert_find_info(struct mbuf *m) -{ - struct m_tag *mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL); - return mtag ? divert_info(mtag) : 0; -} - -typedef void ip_divert_packet_t(struct mbuf *m, int incoming); -extern ip_divert_packet_t *ip_divert_ptr; - -extern void div_input(struct mbuf *, int); -extern void div_ctlinput(int, struct sockaddr *, void *); #endif /* _NETINET_IP_DIVERT_H_ */ Modified: head/sys/netinet/ip_dummynet.h ============================================================================== --- head/sys/netinet/ip_dummynet.h Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ip_dummynet.h Mon Jan 4 19:01:22 2010 (r201527) @@ -114,11 +114,7 @@ struct dn_heap { * other forms of packet reinjection. */ struct dn_pkt_tag { - /* first part, reinject info */ - uint32_t slot; /* slot of next rule to use */ - uint32_t rulenum; /* matching rule number */ - uint32_t rule_id; /* matching rule id */ - uint32_t chain_id; /* ruleset id */ + struct ipfw_rule_ref rule; /* matching rule */ /* second part, dummynet specific */ int dn_dir; /* action when packet comes out. */ Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ipfw/ip_dummynet.c Mon Jan 4 19:01:22 2010 (r201527) @@ -462,15 +462,10 @@ heap_free(struct dn_heap *h) */ /* - * Dispose a packet in dummynet. Use an inline functions so if we + * Dispose a list of packet. Use an inline functions so if we * need to free extra state associated to a packet, this is a * central point to do it. */ -static __inline void *dn_free_pkt(struct mbuf *m) -{ - m_freem(m); - return NULL; -} static __inline void dn_free_pkts(struct mbuf *mnext) { @@ -478,7 +473,7 @@ static __inline void dn_free_pkts(struct while ((m = mnext) != NULL) { mnext = m->m_nextpkt; - dn_free_pkt(m); + FREE_PKT(m); } } @@ -968,24 +963,31 @@ dummynet_send(struct mbuf *m) for (; m != NULL; m = n) { struct ifnet *ifp; int dst; + struct m_tag *tag; n = m->m_nextpkt; m->m_nextpkt = NULL; - if (m_tag_first(m) == NULL) { + tag = m_tag_first(m); + if (tag == NULL) { dst = DIR_DROP; } else { struct dn_pkt_tag *pkt = dn_tag_get(m); + /* extract the dummynet info, rename the tag */ dst = pkt->dn_dir; ifp = pkt->ifp; + /* rename the tag so it carries reinject info */ + tag->m_tag_cookie = MTAG_IPFW_RULE; + tag->m_tag_id = 0; } switch (dst) { case DIR_OUT: + SET_HOST_IPLEN(mtod(m, struct ip *)); ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL); break ; case DIR_IN : /* put header in network format for ip_input() */ - SET_NET_IPLEN(mtod(m, struct ip *)); + //SET_NET_IPLEN(mtod(m, struct ip *)); netisr_dispatch(NETISR_IP, m); break; #ifdef INET6 @@ -994,6 +996,7 @@ dummynet_send(struct mbuf *m) break; case DIR_OUT | PROTO_IPV6: + SET_HOST_IPLEN(mtod(m, struct ip *)); ip6_output(m, NULL, NULL, IPV6_FORWARDING, NULL, NULL, NULL); break; #endif @@ -1024,12 +1027,12 @@ dummynet_send(struct mbuf *m) case DIR_DROP: /* drop the packet after some time */ - dn_free_pkt(m); + FREE_PKT(m); break; default: printf("dummynet: bad switch %d!\n", dst); - dn_free_pkt(m); + FREE_PKT(m); break; } } @@ -1362,7 +1365,7 @@ dummynet_io(struct mbuf **m0, int dir, s struct dn_pipe *pipe; uint64_t len = m->m_pkthdr.len; struct dn_flow_queue *q = NULL; - int is_pipe = fwa->cookie & 0x8000000 ? 0 : 1; + int is_pipe = fwa->rule.info & IPFW_IS_PIPE; KASSERT(m->m_nextpkt == NULL, ("dummynet_io: mbuf queue passed to dummynet")); @@ -1371,16 +1374,13 @@ dummynet_io(struct mbuf **m0, int dir, s io_pkt++; /* * This is a dummynet rule, so we expect an O_PIPE or O_QUEUE rule. - * - * XXXGL: probably the pipe->fs and fs->pipe logic here - * below can be simplified. */ if (is_pipe) { - pipe = locate_pipe(fwa->cookie & 0xffff); + pipe = locate_pipe(fwa->rule.info & IPFW_INFO_MASK); if (pipe != NULL) fs = &(pipe->fs); } else - fs = locate_flowset(fwa->cookie & 0xffff); + fs = locate_flowset(fwa->rule.info & IPFW_INFO_MASK); if (fs == NULL) goto dropit; /* This queue/pipe does not exist! */ @@ -1426,12 +1426,9 @@ dummynet_io(struct mbuf **m0, int dir, s * Ok, i can handle the pkt now... * Build and enqueue packet + parameters. */ - pkt->slot = fwa->slot; - pkt->rulenum = fwa->rulenum; - pkt->rule_id = fwa->rule_id; - pkt->chain_id = fwa->chain_id; + pkt->rule = fwa->rule; + pkt->rule.info &= IPFW_ONEPASS; /* only keep this info */ pkt->dn_dir = dir; - pkt->ifp = fwa->oif; if (q->head == NULL) @@ -1562,7 +1559,8 @@ dropit: if (q) q->drops++; DUMMYNET_UNLOCK(); - *m0 = dn_free_pkt(m); + FREE_PKT(m); + *m0 = NULL; return ((fs && (fs->flags_fs & DN_NOERROR)) ? 0 : ENOBUFS); } Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ipfw/ip_fw2.c Mon Jan 4 19:01:22 2010 (r201527) @@ -74,7 +74,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -560,7 +559,7 @@ send_reject6(struct ip_fw_args *args, in ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL); } - m_freem(m); + FREE_PKT(m); } else if (code != ICMP6_UNREACH_RST) { /* Send an ICMPv6 unreach. */ #if 0 /* @@ -576,7 +575,7 @@ send_reject6(struct ip_fw_args *args, in #endif icmp6_error(m, ICMP6_DST_UNREACH, code, 0); } else - m_freem(m); + FREE_PKT(m); args->m = NULL; } @@ -603,9 +602,7 @@ send_reject(struct ip_fw_args *args, int #endif if (code != ICMP_REJECT_RST) { /* Send an ICMP unreach */ /* We need the IP header in host order for icmp_error(). */ - if (args->eh != NULL) { - SET_HOST_IPLEN(ip); - } + SET_HOST_IPLEN(ip); icmp_error(args->m, ICMP_UNREACH, code, 0L, 0); } else if (args->f_id.proto == IPPROTO_TCP) { struct tcphdr *const tcp = @@ -618,9 +615,9 @@ send_reject(struct ip_fw_args *args, int if (m != NULL) ip_output(m, NULL, NULL, 0, NULL, NULL); } - m_freem(args->m); + FREE_PKT(args->m); } else - m_freem(args->m); + FREE_PKT(args->m); args->m = NULL; } @@ -709,16 +706,18 @@ check_uidgid(ipfw_insn_u32 *insn, int pr } /* - * Helper function to write the matching rule into args + * Helper function to set args with info on the rule after the matching + * one. slot is precise, whereas we guess rule_id as they are + * assigned sequentially. */ static inline void set_match(struct ip_fw_args *args, int slot, struct ip_fw_chain *chain) { - args->chain_id = chain->id; - args->slot = slot + 1; /* we use 0 as a marker */ - args->rule_id = chain->map[slot]->id; - args->rulenum = chain->map[slot]->rulenum; + args->rule.chain_id = chain->id; + args->rule.slot = slot + 1; /* we use 0 as a marker */ + args->rule.rule_id = 1 + chain->map[slot]->id; + args->rule.rulenum = chain->map[slot]->rulenum; } /* @@ -743,7 +742,7 @@ set_match(struct ip_fw_args *args, int s * args->rule Pointer to the last matching rule (in/out) * args->next_hop Socket we are forwarding to (out). * args->f_id Addresses grabbed from the packet (out) - * args->cookie a cookie depending on rule action + * args->rule.info a cookie depending on rule action * * Return value: * @@ -753,6 +752,8 @@ set_match(struct ip_fw_args *args, int s * IP_FW_TEE tee packet, port in m_tag * IP_FW_DUMMYNET to dummynet, pipe in args->cookie * IP_FW_NETGRAPH into netgraph, cookie args->cookie + * args->rule contains the matching rule, + * args->rule.info has additional information. * */ int @@ -797,14 +798,6 @@ ipfw_chk(struct ip_fw_args *args) int ucred_lookup = 0; /* - * divinput_flags If non-zero, set to the IP_FW_DIVERT_*_FLAG - * associated with a packet input on a divert socket. This - * will allow to distinguish traffic and its direction when - * it originates from a divert socket. - */ - u_int divinput_flags = 0; - - /* * oif | args->oif If NULL, ipfw_chk has been called on the * inbound path (ether_input, ip_input). * If non-NULL, ipfw_chk has been called on the outbound path @@ -862,7 +855,6 @@ ipfw_chk(struct ip_fw_args *args) int dyn_dir = MATCH_UNKNOWN; ipfw_dyn_rule *q = NULL; struct ip_fw_chain *chain = &V_layer3_chain; - struct m_tag *mtag; /* * We store in ulp a pointer to the upper layer protocol header. @@ -1090,16 +1082,8 @@ do { \ proto = ip->ip_p; src_ip = ip->ip_src; dst_ip = ip->ip_dst; -#ifndef HAVE_NET_IPLEN - if (args->eh == NULL) { /* on l3 these are in host format */ - offset = ip->ip_off & IP_OFFMASK; - iplen = ip->ip_len; - } else -#endif /* !HAVE_NET_IPLEN */ - { /* otherwise they are in net format */ - offset = ntohs(ip->ip_off) & IP_OFFMASK; - iplen = ntohs(ip->ip_len); - } + offset = ntohs(ip->ip_off) & IP_OFFMASK; + iplen = ntohs(ip->ip_len); pktlen = iplen < pktlen ? iplen : pktlen; if (offset == 0) { @@ -1143,44 +1127,20 @@ do { \ IPFW_RUNLOCK(chain); return (IP_FW_PASS); /* accept */ } - /* XXX divert should be handled same as other tags */ - mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL); - if (args->slot) { + if (args->rule.slot) { /* * Packet has already been tagged as a result of a previous * match on rule args->rule aka args->rule_id (PIPE, QUEUE, - * REASS, NETGRAPH and similar, never a skipto). + * REASS, NETGRAPH, DIVERT/TEE...) * Validate the slot and continue from the next one * if still present, otherwise do a lookup. */ - if (V_fw_one_pass) { - IPFW_RUNLOCK(chain); - return (IP_FW_PASS); - } - f_pos = (args->chain_id == chain->id) ? - args->slot /* already incremented */ : - ipfw_find_rule(chain, args->rulenum, args->rule_id+1); + f_pos = (args->rule.chain_id == chain->id) ? + args->rule.slot : + ipfw_find_rule(chain, args->rule.rulenum, + args->rule.rule_id); } else { - /* - * Find the starting rule. It can be either the first - * one, or the one after divert_rule if asked so. - */ - int skipto = mtag ? divert_cookie(mtag) : 0; - f_pos = 0; - if (args->eh == NULL && skipto != 0) { - if (skipto >= IPFW_DEFAULT_RULE) { - IPFW_RUNLOCK(chain); - return (IP_FW_DENY); /* invalid */ - } - f_pos = ipfw_find_rule(chain, skipto+1, 0); - } - } - /* reset divert rule to avoid confusion later */ - if (mtag) { - divinput_flags = divert_info(mtag) & - (IP_FW_DIVERT_OUTPUT_FLAG | IP_FW_DIVERT_LOOPBACK_FLAG); - m_tag_delete(m, mtag); } /* @@ -1332,10 +1292,15 @@ do { \ break; case O_DIVERTED: - match = (cmd->arg1 & 1 && divinput_flags & - IP_FW_DIVERT_LOOPBACK_FLAG) || - (cmd->arg1 & 2 && divinput_flags & - IP_FW_DIVERT_OUTPUT_FLAG); + { + /* For diverted packets, args->rule.info + * contains the divert port (in host format) + * reason and direction. + */ + uint32_t i = args->rule.info; + match = (i&IPFW_IS_MASK) == IPFW_IS_DIVERT && + cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); + } break; case O_PROTO: @@ -1755,6 +1720,7 @@ do { \ break; case O_TAG: { + struct m_tag *mtag; uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; @@ -1771,12 +1737,13 @@ do { \ if (cmd->len & F_NOT) { /* `untag' action */ if (mtag != NULL) m_tag_delete(m, mtag); + match = 0; } else if (mtag == NULL) { if ((mtag = m_tag_alloc(MTAG_IPFW, tag, 0, M_NOWAIT)) != NULL) m_tag_prepend(m, mtag); + match = 1; } - match = (cmd->len & F_NOT) ? 0: 1; break; } @@ -1786,6 +1753,7 @@ do { \ break; case O_TAGGED: { + struct m_tag *mtag; uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; @@ -1926,10 +1894,12 @@ do { \ case O_PIPE: case O_QUEUE: set_match(args, f_pos, chain); - args->cookie = (cmd->arg1 == IP_FW_TABLEARG) ? + args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; - if (cmd->opcode == O_QUEUE) - args->cookie |= 0x80000000; + if (cmd->opcode == O_PIPE) + args->rule.info |= IPFW_IS_PIPE; + if (V_fw_one_pass) + args->rule.info |= IPFW_ONEPASS; retval = IP_FW_DUMMYNET; l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ @@ -1942,23 +1912,11 @@ do { \ /* otherwise this is terminal */ l = 0; /* exit inner loop */ done = 1; /* exit outer loop */ - mtag = m_tag_get(PACKET_TAG_DIVERT, - sizeof(struct divert_tag), - M_NOWAIT); - if (mtag == NULL) { - retval = IP_FW_DENY; - } else { - struct divert_tag *dt; - dt = (struct divert_tag *)(mtag+1); - dt->cookie = f->rulenum; - if (cmd->arg1 == IP_FW_TABLEARG) - dt->info = tablearg; - else - dt->info = cmd->arg1; - m_tag_prepend(m, mtag); - retval = (cmd->opcode == O_DIVERT) ? + retval = (cmd->opcode == O_DIVERT) ? IP_FW_DIVERT : IP_FW_TEE; - } + set_match(args, f_pos, chain); + args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ? + tablearg : cmd->arg1; break; case O_COUNT: @@ -2074,7 +2032,7 @@ do { \ case O_NETGRAPH: case O_NGTEE: set_match(args, f_pos, chain); - args->cookie = (cmd->arg1 == IP_FW_TABLEARG) ? + args->rule.info = (cmd->arg1 == IP_FW_TABLEARG) ? tablearg : cmd->arg1; retval = (cmd->opcode == O_NETGRAPH) ? IP_FW_NETGRAPH : IP_FW_NGTEE; @@ -2126,12 +2084,6 @@ do { \ f->pcnt++; f->bcnt += pktlen; l = 0; /* in any case exit inner loop */ - -#ifndef HAVE_NET_IPLEN - if (args->eh == NULL) - ip_off = ip->ip_off; - else -#endif /* !HAVE_NET_IPLEN */ ip_off = ntohs(ip->ip_off); /* if not fragmented, go to next rule */ @@ -2139,19 +2091,14 @@ do { \ break; /* * ip_reass() expects len & off in host - * byte order: fix them in case we come - * from layer2. + * byte order. */ - if (args->eh != NULL) { - SET_HOST_IPLEN(ip); - } + SET_HOST_IPLEN(ip); args->m = m = ip_reass(m); /* - * IP header checksum fixup after - * reassembly and leave header - * in network byte order. + * do IP header checksum fixup. */ if (m == NULL) { /* fragment got swallowed */ retval = IP_FW_DENY; @@ -2160,10 +2107,7 @@ do { \ ip = mtod(m, struct ip *); hlen = ip->ip_hl << 2; - /* revert len. & off to net format if needed */ - if (args->eh != NULL) { - SET_NET_IPLEN(ip); - } + SET_NET_IPLEN(ip); ip->ip_sum = 0; if (hlen == sizeof(struct ip)) ip->ip_sum = in_cksum_hdr(ip); Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Mon Jan 4 19:01:22 2010 (r201527) @@ -917,7 +917,7 @@ ipfw_send_pkt(struct mbuf *replyto, stru #endif default: /* XXX: log me?!? */ - m_freem(m); + FREE_PKT(m); return (NULL); } dir = ((flags & (TH_SYN | TH_RST)) == TH_SYN); @@ -1002,11 +1002,7 @@ ipfw_send_pkt(struct mbuf *replyto, stru h->ip_hl = sizeof(*h) >> 2; h->ip_tos = IPTOS_LOWDELAY; h->ip_off = 0; -#ifdef HAVE_NET_IPLEN /* XXX do we handle layer2 ? */ h->ip_len = htons(len); -#else - h->ip_len = len; -#endif h->ip_ttl = V_ip_defttl; h->ip_sum = 0; break; Modified: head/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_log.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ipfw/ip_fw_log.c Mon Jan 4 19:01:22 2010 (r201527) @@ -165,16 +165,8 @@ ipfw_log(struct ip_fw *f, u_int hlen, st * more info in the header */ mh.mh_data = "DDDDDDSSSSSS\x08\x00"; - if (args->f_id.addr_type == 4) { - /* restore wire format */ - SET_NET_IPLEN(ip); - } } BPF_MTAP(log_if, (struct mbuf *)&mh); - if (args->eh == NULL && args->f_id.addr_type == 4) { - /* restore host format */ - SET_HOST_IPLEN(ip); - } #endif /* !WITHOUT_BPF */ return; } @@ -409,23 +401,15 @@ ipfw_log(struct ip_fw *f, u_int hlen, st } else #endif { - int ip_off, ip_len; -#ifndef HAVE_NET_IPLEN - if (args->eh == NULL) { - ip_off = ip->ip_off; - ip_len = ip->ip_len; - } else -#endif /* !HAVE_NET_IPLEN */ - { - ip_off = ntohs(ip->ip_off); - ip_len = ntohs(ip->ip_len); - } - if (ip_off & (IP_MF | IP_OFFMASK)) + int ipoff, iplen; + ipoff = ntohs(ip->ip_off); + iplen = ntohs(ip->ip_len); + if (ipoff & (IP_MF | IP_OFFMASK)) snprintf(SNPARGS(fragment, 0), " (frag %d:%d@%d%s)", - ntohs(ip->ip_id), ip_len - (ip->ip_hl << 2), + ntohs(ip->ip_id), iplen - (ip->ip_hl << 2), offset << 3, - (ip_off & IP_MF) ? "+" : ""); + (ipoff & IP_MF) ? "+" : ""); } } if (oif || m->m_pkthdr.rcvif) Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ipfw/ip_fw_nat.c Mon Jan 4 19:01:22 2010 (r201527) @@ -219,9 +219,6 @@ ipfw_nat(struct ip_fw_args *args, struct return (IP_FW_DENY); } ip = mtod(mcl, struct ip *); - if (args->eh == NULL) { - SET_NET_IPLEN(ip); - } /* * XXX - Libalias checksum offload 'duct tape': @@ -330,9 +327,6 @@ ipfw_nat(struct ip_fw_args *args, struct mcl->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } } - if (args->eh == NULL) { - SET_HOST_IPLEN(ip); - } args->m = mcl; return (IP_FW_NAT); } Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Mon Jan 4 18:57:22 2010 (r201526) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Mon Jan 4 19:01:22 2010 (r201527) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 19:06:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3D851065698 for ; Mon, 4 Jan 2010 19:06:54 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outJ.internet-mail-service.net (outj.internet-mail-service.net [216.240.47.233]) by mx1.freebsd.org (Postfix) with ESMTP id D8C0D8FC21 for ; Mon, 4 Jan 2010 19:06:54 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 559402DA6E; Mon, 4 Jan 2010 11:06:54 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id D9ED62D6012; Mon, 4 Jan 2010 11:06:53 -0800 (PST) Message-ID: <4B423C4D.30002@elischer.org> Date: Mon, 04 Jan 2010 11:06:53 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Luigi Rizzo References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> In-Reply-To: <20100104190024.GA47532@onelab2.iet.unipi.it> 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, Michael Tuexen Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 19:06:55 -0000 Luigi Rizzo wrote: > taking a random commit to this tree -- would you guys consider moving > the sctp sources to its own directory, e.g. netinet/sctp/ or something > that suits better ? > > It would help to browse through the directory: > > NAME FILES LINES > > netinet/ 156 153k > sctp* 36 66k > tcp* 24 16k > ipfw/ 9 9k > > > I understand that some of the headers should remain in netinet/ > but surely the code is not bound to a specific place... > we should move tcp too.. it's growing without bounds.. From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 19:15:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1728D1065676; Mon, 4 Jan 2010 19:15:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 9476E8FC1F; Mon, 4 Jan 2010 19:15:06 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 82AB041C75D; Mon, 4 Jan 2010 20:15:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id ilYP3NMtVPzJ; Mon, 4 Jan 2010 20:15:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 35D6C41C75C; Mon, 4 Jan 2010 20:15:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id F05E04448EC; Mon, 4 Jan 2010 19:14:40 +0000 (UTC) Date: Mon, 4 Jan 2010 19:14:40 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Julian Elischer In-Reply-To: <4B423C4D.30002@elischer.org> Message-ID: <20100104191318.K88477@maildrop.int.zabbadoz.net> References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <4B423C4D.30002@elischer.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Michael Tuexen , svn-src-all@freebsd.org, src-committers@freebsd.org, Luigi Rizzo Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 19:15:07 -0000 On Mon, 4 Jan 2010, Julian Elischer wrote: > Luigi Rizzo wrote: >> taking a random commit to this tree -- would you guys consider moving >> the sctp sources to its own directory, e.g. netinet/sctp/ or something >> that suits better ? >> >> It would help to browse through the directory: >> >> NAME FILES LINES >> >> netinet/ 156 153k >> sctp* 36 66k >> tcp* 24 16k >> ipfw/ 9 9k >> >> >> I understand that some of the headers should remain in netinet/ >> but surely the code is not bound to a specific place... >> > > we should move tcp too.. it's growing without bounds.. Right and all three of SCTP, UDP and TCP are ideally netinet/ independent and will as well work with netinet6 only one day so moving them to a subdir of netinet is not really future-oriented. /bz -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 19:24:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49B1E1065692; Mon, 4 Jan 2010 19:24:25 +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 AA2918FC0A; Mon, 4 Jan 2010 19:24:24 +0000 (UTC) Received: from [192.168.1.190] (p508FF7CB.dip.t-dialin.net [80.143.247.203]) by mail-n.franken.de (Postfix) with ESMTP id 8628D1C0C0BEA; Mon, 4 Jan 2010 20:24:22 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20100104190024.GA47532@onelab2.iet.unipi.it> Date: Mon, 4 Jan 2010 20:24:21 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 19:24:25 -0000 On Jan 4, 2010, at 8:00 PM, Luigi Rizzo wrote: > taking a random commit to this tree -- would you guys consider moving > the sctp sources to its own directory, e.g. netinet/sctp/ or something > that suits better ? Why do you think that a place different from netinet/ does suit better for the sctp_*.[ch] files than netinet/ ? This is at least the place where TCP and UDP live... Best regards Michael >=20 > It would help to browse through the directory: >=20 > NAME FILES LINES >=20 > netinet/ 156 153k > sctp* 36 66k > tcp* 24 16k > ipfw/ 9 9k >=20 >=20 > I understand that some of the headers should remain in netinet/ > but surely the code is not bound to a specific place... >=20 > cheers > luigi >=20 > On Mon, Jan 04, 2010 at 06:25:38PM +0000, Michael Tuexen wrote: >> Author: tuexen >> Date: Mon Jan 4 18:25:38 2010 >> New Revision: 201523 >> URL: http://svn.freebsd.org/changeset/base/201523 >>=20 >> Log: >> Correct usage of parenthesis. >>=20 >> PR: kern/142066 >> Approved by: rrs (mentor) >> Obtained from: Henning Petersen, Bruce Cran. >> MFC after: 2 weeks >>=20 >> Modified: >> head/sys/netinet/sctp_pcb.c >>=20 >> Modified: head/sys/netinet/sctp_pcb.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_pcb.c Mon Jan 4 18:21:27 2010 = (r201522) >> +++ head/sys/netinet/sctp_pcb.c Mon Jan 4 18:25:38 2010 = (r201523) >> @@ -5528,7 +5528,7 @@ sctp_pcb_init() >>=20 >> /* Init the TIMEWAIT list */ >> for (i =3D 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { >> - LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); >> + LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); >> } >>=20 >> #if defined(SCTP_USE_THREAD_BASED_ITERATOR) >> @@ -6385,7 +6385,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp >> } >> skip_vtag_check: >>=20 >> - chain =3D &SCTP_BASE_INFO(vtag_timewait[(tag % = SCTP_STACK_VTAG_HASH_SIZE))]; >> + chain =3D &SCTP_BASE_INFO(vtag_timewait)[(tag % = SCTP_STACK_VTAG_HASH_SIZE)]; >> /* Now what about timed wait ? */ >> if (!LIST_EMPTY(chain)) { >> /* >=20 From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 19:53:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 791EB1065695; Mon, 4 Jan 2010 19:53: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 4835D8FC13; Mon, 4 Jan 2010 19:53:17 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EB68046B7F; Mon, 4 Jan 2010 14:53:16 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 50CDB8A026; Mon, 4 Jan 2010 14:53:16 -0500 (EST) From: John Baldwin To: Max Laier Date: Mon, 4 Jan 2010 11:01:18 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200912312044.nBVKicMb003815@svn.freebsd.org> <200912311547.54045.jhb@freebsd.org> <201001010635.33081.max@love2party.net> In-Reply-To: <201001010635.33081.max@love2party.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201001041101.18288.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 04 Jan 2010 14:53:16 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201351 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 19:53:17 -0000 On Friday 01 January 2010 12:35:33 am Max Laier wrote: > On Thursday 31 December 2009 21:47:54 John Baldwin wrote: > > On Thursday 31 December 2009 3:44:38 pm John Baldwin wrote: > > > Author: jhb > > > Date: Thu Dec 31 20:44:38 2009 > > > New Revision: 201351 > > > URL: http://svn.freebsd.org/changeset/base/201351 > > > > > > Log: > > > Use stricter checking to match possible vlan clones by not allowing > > > extra garbage characters around or within the tag. > > > > Previously some odd clone requests such as 'em0.102a', 'em0.10a3bc', and > > 'em0.foo.104' would have succeeded creating interfaces equivalent to > > em0.102, em0.103, and em0.104. > > The em0.foo.104 case seems quite useful, though. Maybe we can keep that > /feature/? Err, I would only find it useful for adding a '104' vlan to a 'em0.foo' interface. Otherwise it is ambiguous. Suppose you have an em0 and an em0.foo interface already, then what should em0.foo.104 do in that case? I think the only way that this auto-cloning makes sense if it is an exact match of . as it is documented to be. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 20:59:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 095F31065695; Mon, 4 Jan 2010 20:59:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC81F8FC24; Mon, 4 Jan 2010 20:59:52 +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 o04Kxq8Y078041; Mon, 4 Jan 2010 20:59:52 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04Kxqmq078036; Mon, 4 Jan 2010 20:59:52 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001042059.o04Kxqmq078036@svn.freebsd.org> From: Ed Schouten Date: Mon, 4 Jan 2010 20:59: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: r201532 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 20:59:53 -0000 Author: ed Date: Mon Jan 4 20:59:52 2010 New Revision: 201532 URL: http://svn.freebsd.org/changeset/base/201532 Log: Make TIOCSTI work again. It looks like I didn't implement this when I imported MPSAFE TTY. Applications like mail(1) still use this. I think it's conceptually bad. Tested by: Pete French MFC after: 2 weeks Modified: head/sys/kern/tty.c head/sys/kern/tty_compat.c head/sys/kern/tty_pts.c head/sys/sys/tty.h Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Mon Jan 4 20:55:47 2010 (r201531) +++ head/sys/kern/tty.c Mon Jan 4 20:59:52 2010 (r201532) @@ -505,12 +505,12 @@ ttydev_ioctl(struct cdev *dev, u_long cm case TIOCSPGRP: case TIOCSTART: case TIOCSTAT: + case TIOCSTI: case TIOCSTOP: case TIOCSWINSZ: #if 0 case TIOCSDRAINWAIT: case TIOCSETD: - case TIOCSTI: #endif #ifdef COMPAT_43TTY case TIOCLBIC: @@ -559,7 +559,7 @@ ttydev_ioctl(struct cdev *dev, u_long cm new->c_ospeed = old->c_ospeed; } - error = tty_ioctl(tp, cmd, data, td); + error = tty_ioctl(tp, cmd, data, fflag, td); done: tty_unlock(tp); return (error); @@ -1350,7 +1350,8 @@ tty_flush(struct tty *tp, int flags) } static int -tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td) +tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, + struct thread *td) { int error; @@ -1677,17 +1678,26 @@ tty_generic_ioctl(struct tty *tp, u_long case TIOCSTAT: tty_info(tp); return (0); + case TIOCSTI: + if ((fflag & FREAD) == 0 && priv_check(td, PRIV_TTY_STI)) + return (EPERM); + if (!tty_is_ctty(tp, td->td_proc) && + priv_check(td, PRIV_TTY_STI)) + return (EACCES); + ttydisc_rint(tp, *(char *)data, 0); + ttydisc_rint_done(tp); + return (0); } #ifdef COMPAT_43TTY - return tty_ioctl_compat(tp, cmd, data, td); + return tty_ioctl_compat(tp, cmd, data, fflag, td); #else /* !COMPAT_43TTY */ return (ENOIOCTL); #endif /* COMPAT_43TTY */ } int -tty_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td) +tty_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, struct thread *td) { int error; @@ -1698,7 +1708,7 @@ tty_ioctl(struct tty *tp, u_long cmd, vo error = ttydevsw_ioctl(tp, cmd, data, td); if (error == ENOIOCTL) - error = tty_generic_ioctl(tp, cmd, data, td); + error = tty_generic_ioctl(tp, cmd, data, fflag, td); return (error); } Modified: head/sys/kern/tty_compat.c ============================================================================== --- head/sys/kern/tty_compat.c Mon Jan 4 20:55:47 2010 (r201531) +++ head/sys/kern/tty_compat.c Mon Jan 4 20:59:52 2010 (r201532) @@ -180,7 +180,8 @@ ttsetcompat(struct tty *tp, u_long *com, /*ARGSUSED*/ int -tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, struct thread *td) +tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, int fflag, + struct thread *td) { switch (com) { case TIOCSETP: @@ -196,7 +197,7 @@ tty_ioctl_compat(struct tty *tp, u_long term = tp->t_termios; if ((error = ttsetcompat(tp, &com, data, &term)) != 0) return error; - return tty_ioctl(tp, com, &term, td); + return tty_ioctl(tp, com, &term, fflag, td); } case TIOCGETP: { struct sgttyb *sg = (struct sgttyb *)data; @@ -255,12 +256,13 @@ tty_ioctl_compat(struct tty *tp, u_long int ldisczero = 0; return (tty_ioctl(tp, TIOCSETD, - *(int *)data == 2 ? (caddr_t)&ldisczero : data, td)); + *(int *)data == 2 ? (caddr_t)&ldisczero : data, + fflag, td)); } case OTIOCCONS: *(int *)data = 1; - return (tty_ioctl(tp, TIOCCONS, data, td)); + return (tty_ioctl(tp, TIOCCONS, data, fflag, td)); default: return (ENOIOCTL); Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Mon Jan 4 20:55:47 2010 (r201531) +++ head/sys/kern/tty_pts.c Mon Jan 4 20:59:52 2010 (r201532) @@ -379,7 +379,7 @@ ptsdev_ioctl(struct file *fp, u_long cmd /* Just redirect this ioctl to the slave device. */ tty_lock(tp); - error = tty_ioctl(tp, cmd, data, td); + error = tty_ioctl(tp, cmd, data, fp->f_flag, td); tty_unlock(tp); if (error == ENOIOCTL) error = ENOTTY; Modified: head/sys/sys/tty.h ============================================================================== --- head/sys/sys/tty.h Mon Jan 4 20:55:47 2010 (r201531) +++ head/sys/sys/tty.h Mon Jan 4 20:59:52 2010 (r201532) @@ -182,9 +182,10 @@ void tty_wakeup(struct tty *tp, int flag int tty_checkoutq(struct tty *tp); int tty_putchar(struct tty *tp, char c); -int tty_ioctl(struct tty *tp, u_long cmd, void *data, struct thread *td); -int tty_ioctl_compat(struct tty *tp, u_long cmd, caddr_t data, +int tty_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, struct thread *td); +int tty_ioctl_compat(struct tty *tp, u_long cmd, caddr_t data, + int fflag, struct thread *td); void tty_init_console(struct tty *tp, speed_t speed); void tty_flush(struct tty *tp, int flags); void tty_hiwat_in_block(struct tty *tp); From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 21:30:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6ED110656A4; Mon, 4 Jan 2010 21:30:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C49748FC24; Mon, 4 Jan 2010 21:30:04 +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 o04LU4Td085150; Mon, 4 Jan 2010 21:30:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04LU4ln085140; Mon, 4 Jan 2010 21:30:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001042130.o04LU4ln085140@svn.freebsd.org> From: Warner Losh Date: Mon, 4 Jan 2010 21:30: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: r201534 - in head/sys: amd64/conf arm/conf i386/conf ia64/conf mips/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 21:30:04 -0000 Author: imp Date: Mon Jan 4 21:30:04 2010 New Revision: 201534 URL: http://svn.freebsd.org/changeset/base/201534 Log: Revert 200594. This file isn't intended for these sorts of things. Modified: head/sys/amd64/conf/DEFAULTS head/sys/arm/conf/DEFAULTS head/sys/i386/conf/DEFAULTS head/sys/ia64/conf/DEFAULTS head/sys/mips/conf/DEFAULTS head/sys/pc98/conf/DEFAULTS head/sys/powerpc/conf/DEFAULTS head/sys/sparc64/conf/DEFAULTS head/sys/sun4v/conf/DEFAULTS Modified: head/sys/amd64/conf/DEFAULTS ============================================================================== --- head/sys/amd64/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/amd64/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -20,10 +20,3 @@ options GEOM_PART_BSD options GEOM_PART_EBR options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/arm/conf/DEFAULTS ============================================================================== --- head/sys/arm/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/arm/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -9,10 +9,3 @@ device mem options GEOM_PART_BSD options GEOM_PART_MBR - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/i386/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -28,10 +28,3 @@ options GEOM_PART_MBR # enable support for native hardware options NATIVE device atpic - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/ia64/conf/DEFAULTS ============================================================================== --- head/sys/ia64/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/ia64/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -17,10 +17,3 @@ device uart_ns8250 options GEOM_PART_BSD options GEOM_PART_GPT options GEOM_PART_MBR - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/mips/conf/DEFAULTS ============================================================================== --- head/sys/mips/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/mips/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -11,10 +11,3 @@ device uart_ns8250 options GEOM_PART_BSD options GEOM_PART_MBR - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/pc98/conf/DEFAULTS ============================================================================== --- head/sys/pc98/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/pc98/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -24,10 +24,3 @@ device uart_ns8250 # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_PC98 - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/powerpc/conf/DEFAULTS ============================================================================== --- head/sys/powerpc/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/powerpc/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -14,10 +14,3 @@ device uart_z8530 options GEOM_PART_APM options GEOM_PART_MBR - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/sparc64/conf/DEFAULTS ============================================================================== --- head/sys/sparc64/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/sparc64/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -19,10 +19,3 @@ options GEOM_PART_VTOC8 # Let sunkbd emulate an AT keyboard by default. options SUNKBD_EMULATE_ATKBD - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/sun4v/conf/DEFAULTS ============================================================================== --- head/sys/sun4v/conf/DEFAULTS Mon Jan 4 21:02:01 2010 (r201533) +++ head/sys/sun4v/conf/DEFAULTS Mon Jan 4 21:30:04 2010 (r201534) @@ -11,10 +11,3 @@ device mem # Memory and kernel memory # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_VTOC8 - -# Store the plain version of the configuration file in the kernel itself. -# To store the entire file, including comments, put this in /etc/src.conf: -# CONFIGARGS= -C -# See config(8) for more details. -# -options INCLUDE_CONFIG_FILE # Include this file in kernel From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 22:15:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A1A0106566C; Mon, 4 Jan 2010 22:15:30 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id EEACF8FC12; Mon, 4 Jan 2010 22:15:29 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id DB5C3730A1; Mon, 4 Jan 2010 23:23:23 +0100 (CET) Date: Mon, 4 Jan 2010 23:23:23 +0100 From: Luigi Rizzo To: Michael Tuexen Message-ID: <20100104222323.GA49068@onelab2.iet.unipi.it> References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <517EF225-7EEB-4844-A0AD-019AD72F9403@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: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 22:15:30 -0000 On Mon, Jan 04, 2010 at 08:24:21PM +0100, Michael Tuexen wrote: > On Jan 4, 2010, at 8:00 PM, Luigi Rizzo wrote: > > > taking a random commit to this tree -- would you guys consider moving > > the sctp sources to its own directory, e.g. netinet/sctp/ or something > > that suits better ? > Why do you think that a place different from netinet/ does suit > better for the sctp_*.[ch] files than netinet/ ? This is at least the > place where TCP and UDP live... TCP and UDP landed there 25 years ago, but overall the directory has grown way too much, which makes it hard to browse through the files, check the logs, etc. etc.. BTW the size of individual files is also worrysome. Back in 2.2, the top 10 files in lines where 2302 7272 55414 ip_mroute.c 2226 9339 64746 tcp_input.c 1564 5349 38710 ip_input.c 1366 4768 33974 ip_output.c 1298 4214 32400 ip_fw.c 861 2927 20788 tcp_usrreq.c 764 3273 21779 tcp_output.c 762 2739 21695 in_pcb.c 730 2441 19269 in.c 712 2461 18672 ip_icmp.c Now we have (excluding sctp) 3648 12414 98354 /home/luigi/FreeBSD/head/sys/netinet/igmp.c 3440 13962 102928 /home/luigi/FreeBSD/head/sys/netinet/tcp_input.c 2909 9728 76470 /home/luigi/FreeBSD/head/sys/netinet/in_mcast.c 2894 9269 74956 /home/luigi/FreeBSD/head/sys/netinet/ip_mroute.c 2354 8521 66835 /home/luigi/FreeBSD/head/sys/netinet/tcp_subr.c 2299 6173 56414 /home/luigi/FreeBSD/head/sys/netinet/ip_carp.c 1950 6377 50717 /home/luigi/FreeBSD/head/sys/netinet/in_pcb.c 1871 5740 46629 /home/luigi/FreeBSD/head/sys/netinet/tcp_usrreq.c 1773 6692 51606 /home/luigi/FreeBSD/head/sys/netinet/tcp_syncache.c 1770 6165 45932 /home/luigi/FreeBSD/head/sys/netinet/ip_input.c (and sctp has some quite large files...) 13808 45244 367610 /home/luigi/FreeBSD/head/sys/netinet/sctp_output.c 8101 28015 253529 /home/luigi/FreeBSD/head/sys/netinet/sctp_indata.c 6938 21122 190172 /home/luigi/FreeBSD/head/sys/netinet/sctputil.c 6717 22130 195580 /home/luigi/FreeBSD/head/sys/netinet/sctp_pcb.c 5924 20286 185239 /home/luigi/FreeBSD/head/sys/netinet/sctp_input.c 4900 14271 140811 /home/luigi/FreeBSD/head/sys/netinet/sctp_usrreq.c This was the reason why I moved ipfw-related stuff out of the way and plan to do the same with tcp unless someone precedes me. Just checked, in 2.2 (which was some 12 years ago) netinet/ had 46 files and 21k lines, of which tcp accounted for 13 files/6K lines. Compare with 156 files/153k lines (tcp: 24 files, 16k lines) in HEAD now. I also think that the name of the new directory or the exact percentage of ipv4-ness or netinet-ness of the sctp* and tcp* and multicast* stuff is irrelevant. Moving directories with svn is so easy that we should not worry even if we need a couple of attempts to find a good name. cheers luigi From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 22:22:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04E921065695; Mon, 4 Jan 2010 22:22: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 CE5788FC2F; Mon, 4 Jan 2010 22:22:00 +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 o04MM0xE097637; Mon, 4 Jan 2010 22:22:00 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04MM0Db097633; Mon, 4 Jan 2010 22:22:00 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001042222.o04MM0Db097633@svn.freebsd.org> From: Christian Brueffer Date: Mon, 4 Jan 2010 22:22: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: r201538 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 22:22:01 -0000 Author: brueffer Date: Mon Jan 4 22:22:00 2010 New Revision: 201538 URL: http://svn.freebsd.org/changeset/base/201538 Log: Catch up with the VFS_VPTOFH(9) -> VOP_VPTOFH(9) repocopy that happened almost three years ago in r166794. PR: 140989 Submitted by: Lachlan Kang MFC after: 1 week Modified: head/share/man/man9/VFS.9 head/share/man/man9/VFS_CHECKEXP.9 head/share/man/man9/VFS_FHTOVP.9 Modified: head/share/man/man9/VFS.9 ============================================================================== --- head/share/man/man9/VFS.9 Mon Jan 4 22:21:56 2010 (r201537) +++ head/share/man/man9/VFS.9 Mon Jan 4 22:22:00 2010 (r201538) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd January 4, 2010 .Os .Dt VFS 9 .Sh NAME @@ -53,7 +53,7 @@ rather than implementing empty functions .Xr VFS_SYNC 9 , .Xr VFS_UNMOUNT 9 , .Xr VFS_VGET 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: head/share/man/man9/VFS_CHECKEXP.9 ============================================================================== --- head/share/man/man9/VFS_CHECKEXP.9 Mon Jan 4 22:21:56 2010 (r201537) +++ head/share/man/man9/VFS_CHECKEXP.9 Mon Jan 4 22:22:00 2010 (r201538) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 4, 2010 .Os .Dt VFS_CHECKEXP 9 .Sh NAME @@ -81,7 +81,7 @@ and .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_FHTOVP 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: head/share/man/man9/VFS_FHTOVP.9 ============================================================================== --- head/share/man/man9/VFS_FHTOVP.9 Mon Jan 4 22:21:56 2010 (r201537) +++ head/share/man/man9/VFS_FHTOVP.9 Mon Jan 4 22:22:00 2010 (r201538) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2005 +.Dd January 4, 2010 .Os .Dt VFS_FHTOVP 9 .Sh NAME @@ -76,7 +76,7 @@ The locked vnode for the file will be re .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_CHECKEXP 9 , -.Xr VFS_VPTOFH 9 , +.Xr VOP_VPTOFH 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 22:23:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3ECF106568F; Mon, 4 Jan 2010 22:23:09 +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 E38358FC12; Mon, 4 Jan 2010 22:23:09 +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 o04MN94L097963; Mon, 4 Jan 2010 22:23:09 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04MN9fD097961; Mon, 4 Jan 2010 22:23:09 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001042223.o04MN9fD097961@svn.freebsd.org> From: Christian Brueffer Date: Mon, 4 Jan 2010 22: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: r201539 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 22:23:10 -0000 Author: brueffer Date: Mon Jan 4 22:23:09 2010 New Revision: 201539 URL: http://svn.freebsd.org/changeset/base/201539 Log: Add a missing word. PR: 140989 Submitted by: Lachlan Kang MFC after: 1 week Modified: head/share/man/man7/security.7 Modified: head/share/man/man7/security.7 ============================================================================== --- head/share/man/man7/security.7 Mon Jan 4 22:22:00 2010 (r201538) +++ head/share/man/man7/security.7 Mon Jan 4 22:23:09 2010 (r201539) @@ -88,7 +88,7 @@ incur on the system under adverse condit Brute-force network attacks are harder to deal with. A spoofed-packet attack, for example, is nearly impossible to stop short of cutting your system off from the Internet. -It may not be able to take your machine down, but it can fill up Internet +It may not be able to take your machine down, but it can fill up your Internet pipe. .Pp A user account compromise is even more common than a DoS attack. From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 23:29:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29FBC1065672; Mon, 4 Jan 2010 23:29:05 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id D8E738FC15; Mon, 4 Jan 2010 23:29:04 +0000 (UTC) Authentication-Results: mail.vega.ru; dkim=unverified, header.i=@FreeBSD.org Authentication-Results: mail.vega.ru; domainkeys=; header.sender= Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NRwMB-0001q7-Dx; Tue, 05 Jan 2010 02:29:03 +0300 Date: Tue, 5 Jan 2010 02:28:52 +0300 From: Ruslan Ermilov To: Gleb Smirnoff Message-ID: <20100104232852.GA14676@edoofus.dev.vega.ru> References: <200912021324.nB2DOLuO006676@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912021324.nB2DOLuO006676@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r200026 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 23:29:05 -0000 On Wed, Dec 02, 2009 at 01:24:21PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Dec 2 13:24:21 2009 > New Revision: 200026 > URL: http://svn.freebsd.org/changeset/base/200026 > > Log: > Until this moment carp(4) used a strange logging priority. It used debug > priority for such important information as MASTER/BACKUP state change, > and used a normal logging priority for such innocent messages as receiving > short packet (which is a normal VRRP packet between some other routers) or > receving a CARP packet on non-carp interface (someone else running CARP). > > This commit shifts message logging priorities to a more sane default. > > Modified: > head/sys/netinet/ip_carp.c I was wondering why I get these "carp_input: packet received on non-carp interface: %s" messages on FreeBSD 8 and not on FreeBSD 7. This is because ip_input() no longer filters multicast datagrams itself. "Protocols must perform their own filtering and update statistics accordingly." Anyway, this change went undocumented and I think it's partly inconsistent. Here's a proposed patch: %%% Index: sys/netinet/ip_carp.c =================================================================== --- sys/netinet/ip_carp.c (revision 201533) +++ sys/netinet/ip_carp.c (working copy) @@ -560,7 +560,7 @@ /* verify that the IP TTL is 255. */ if (ip->ip_ttl != CARP_DFLTTL) { CARPSTATS_INC(carps_badttl); - CARP_LOG("carp_input: received ttl %d != 255i on %s\n", + CARP_DEBUG("carp_input: received ttl %d != 255 on %s\n", ip->ip_ttl, m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -739,7 +739,7 @@ CARPSTATS_INC(carps_badauth); SC2IFP(sc)->if_ierrors++; CARP_UNLOCK(ifp->if_carp); - CARP_LOG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); + CARP_DEBUG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); m_freem(m); return; } Index: share/man/man4/carp.4 =================================================================== --- share/man/man4/carp.4 (revision 201533) +++ share/man/man4/carp.4 (working copy) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2006 +.Dd January 5, 2010 .Dt CARP 4 .Os .Sh NAME @@ -118,12 +118,12 @@ Disabled by default. .It Va net.inet.carp.log Value of 0 disables any logging. -Value of 1 enables logging of bad +Value of 1 enables logging state changes of .Nm +interfaces. +Values above 1 enable logging of bad +.Nm packets. -Values above 1 enable logging state changes of -.Nm -interfaces. Default value is 1. .It Va net.inet.carp.arpbalance Balance local traffic using ARP (see below). %%% Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 23:39:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC871065694; Mon, 4 Jan 2010 23:39:53 +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 6E74B8FC1F; Mon, 4 Jan 2010 23:39:53 +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 o04NdraC015687; Mon, 4 Jan 2010 23:39:53 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04NdrYp015685; Mon, 4 Jan 2010 23:39:53 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201001042339.o04NdrYp015685@svn.freebsd.org> From: Qing Li Date: Mon, 4 Jan 2010 23:39: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: r201543 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 23:39:53 -0000 Author: qingli Date: Mon Jan 4 23:39:53 2010 New Revision: 201543 URL: http://svn.freebsd.org/changeset/base/201543 Log: The IFA_RTSELF address flag marks a loopback route has been installed for the interface address. This marker is necessary to properly support PPP types of links where multiple links can have the same local end IP address. The IFA_RTSELF flag bit maps to the RTF_HOST value, which was combined into the route flag bits during prefix installation in IPv6. This inclusion causing the prefix route to be unusable. This patch fixes this bug by excluding the IFA_RTSELF flag during route installation. MFC after: 5 days Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Mon Jan 4 22:57:33 2010 (r201542) +++ head/sys/netinet6/nd6_rtr.c Mon Jan 4 23:39:53 2010 (r201543) @@ -1629,7 +1629,7 @@ nd6_prefix_onlink(struct nd_prefix *pr) bzero(&mask6, sizeof(mask6)); mask6.sin6_len = sizeof(mask6); mask6.sin6_addr = pr->ndpr_mask; - rtflags = ifa->ifa_flags | RTF_UP; + rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP; error = rtrequest(RTM_ADD, (struct sockaddr *)&pr->ndpr_prefix, ifa->ifa_addr, (struct sockaddr *)&mask6, rtflags, &rt); if (error == 0) { From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 00:35:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 353AF1065692; Tue, 5 Jan 2010 00:35:47 +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 244B78FC17; Tue, 5 Jan 2010 00:35:47 +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 o050ZlVF028159; Tue, 5 Jan 2010 00:35:47 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o050Zluo028157; Tue, 5 Jan 2010 00:35:47 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201001050035.o050Zluo028157@svn.freebsd.org> From: Qing Li Date: Tue, 5 Jan 2010 00:35: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: r201544 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 00:35:47 -0000 Author: qingli Date: Tue Jan 5 00:35:46 2010 New Revision: 201544 URL: http://svn.freebsd.org/changeset/base/201544 Log: An existing incomplete ARP entry would expire a subsequent statically configured entry of the same host. This bug was due to the expiration timer was not cancelled when installing the static entry. Since there exist a potential race condition with respect to timer cancellation, simply check for the LLE_STATIC bit inside the expiration function instead of cancelling the active timer. MFC after: 5 days Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Mon Jan 4 23:39:53 2010 (r201543) +++ head/sys/netinet/if_ether.c Tue Jan 5 00:35:46 2010 (r201544) @@ -175,18 +175,24 @@ arptimer(void *arg) CURVNET_SET(ifp->if_vnet); IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if ((!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer))) { - (void) llentry_free(lle); - ARPSTAT_INC(timeouts); - } -#ifdef DIAGNOSTIC + if (lle->la_flags & LLE_STATIC) + LLE_WUNLOCK(lle); else { - struct sockaddr *l3addr = L3_ADDR(lle); - log(LOG_INFO, "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, - inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); - } + if (!callout_pending(&lle->la_timer) && + callout_active(&lle->la_timer)) { + (void) llentry_free(lle); + ARPSTAT_INC(timeouts); + } +#ifdef DIAGNOSTIC + else { + struct sockaddr *l3addr = L3_ADDR(lle); + log(LOG_INFO, + "arptimer issue: %p, IPv4 address: \"%s\"\n", lle, + inet_ntoa( + ((const struct sockaddr_in *)l3addr)->sin_addr)); + } #endif + } IF_AFDATA_UNLOCK(ifp); CURVNET_RESTORE(); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 02:06:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B1CD1065698; Tue, 5 Jan 2010 02:06:05 +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 7F1AF8FC15; Tue, 5 Jan 2010 02:06: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 o05265fJ053912; Tue, 5 Jan 2010 02:06:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05265Ln053910; Tue, 5 Jan 2010 02:06:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001050206.o05265Ln053910@svn.freebsd.org> From: Alexander Motin Date: Tue, 5 Jan 2010 02:06: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: r201545 - head/sys/geom/raid3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 02:06:05 -0000 Author: mav Date: Tue Jan 5 02:06:05 2010 New Revision: 201545 URL: http://svn.freebsd.org/changeset/base/201545 Log: Slightly optimize XOR calculation. Modified: head/sys/geom/raid3/g_raid3.c Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Tue Jan 5 00:35:46 2010 (r201544) +++ head/sys/geom/raid3/g_raid3.c Tue Jan 5 02:06:05 2010 (r201545) @@ -231,31 +231,31 @@ g_raid3_uma_dtor(void *mem, int size, vo sz->sz_inuse--; } -#define g_raid3_xor(src1, src2, dst, size) \ - _g_raid3_xor((uint64_t *)(src1), (uint64_t *)(src2), \ +#define g_raid3_xor(src, dst, size) \ + _g_raid3_xor((uint64_t *)(src), \ (uint64_t *)(dst), (size_t)size) static void -_g_raid3_xor(uint64_t *src1, uint64_t *src2, uint64_t *dst, size_t size) +_g_raid3_xor(uint64_t *src, uint64_t *dst, size_t size) { KASSERT((size % 128) == 0, ("Invalid size: %zu.", size)); for (; size > 0; size -= 128) { - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); - *dst++ = (*src1++) ^ (*src2++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); + *dst++ ^= (*src++); } } @@ -1049,6 +1049,7 @@ g_raid3_scatter(struct bio *pbp) struct g_raid3_disk *disk; struct bio *bp, *cbp, *tmpbp; off_t atom, cadd, padd, left; + int first; sc = pbp->bio_to->geom->softc; bp = NULL; @@ -1079,12 +1080,18 @@ g_raid3_scatter(struct bio *pbp) /* * Calculate parity. */ - bzero(bp->bio_data, bp->bio_length); + first = 1; G_RAID3_FOREACH_SAFE_BIO(pbp, cbp, tmpbp) { if (cbp == bp) continue; - g_raid3_xor(cbp->bio_data, bp->bio_data, bp->bio_data, - bp->bio_length); + if (first) { + bcopy(cbp->bio_data, bp->bio_data, + bp->bio_length); + first = 0; + } else { + g_raid3_xor(cbp->bio_data, bp->bio_data, + bp->bio_length); + } if ((cbp->bio_cflags & G_RAID3_BIO_CFLAG_NODISK) != 0) g_raid3_destroy_bio(sc, cbp); } @@ -1216,7 +1223,7 @@ g_raid3_gather(struct bio *pbp) G_RAID3_FOREACH_BIO(pbp, cbp) { if ((cbp->bio_cflags & G_RAID3_BIO_CFLAG_PARITY) != 0) continue; - g_raid3_xor(cbp->bio_data, xbp->bio_data, xbp->bio_data, + g_raid3_xor(cbp->bio_data, xbp->bio_data, xbp->bio_length); } xbp->bio_cflags &= ~G_RAID3_BIO_CFLAG_PARITY; @@ -1639,7 +1646,7 @@ g_raid3_sync_request(struct bio *bp) bcopy(src, dst, atom); src += atom; for (n = 1; n < sc->sc_ndisks - 1; n++) { - g_raid3_xor(src, dst, dst, atom); + g_raid3_xor(src, dst, atom); src += atom; } dst += atom; From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 02:37:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4ACF1065679; Tue, 5 Jan 2010 02:37:59 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF62D8FC14; Tue, 5 Jan 2010 02:37:59 +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 o052bxvO061454; Tue, 5 Jan 2010 02:37:59 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o052bxEd061444; Tue, 5 Jan 2010 02:37:59 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050237.o052bxEd061444@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 02:37: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: r201546 - in head: . include lib/libc/gen lib/libc/include lib/libthr lib/libthr/thread sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 02:37:59 -0000 Author: davidxu Date: Tue Jan 5 02:37:59 2010 New Revision: 201546 URL: http://svn.freebsd.org/changeset/base/201546 Log: Use umtx to implement process sharable semaphore, to make this work, now type sema_t is a structure which can be put in a shared memory area, and multiple processes can operate it concurrently. User can either use mmap(MAP_SHARED) + sem_init(pshared=1) or use sem_open() to initialize a shared semaphore. Named semaphore uses file system and is located in /tmp directory, and its file name is prefixed with 'SEMD', so now it is chroot or jail friendly. In simplist cases, both for named and un-named semaphore, userland code does not have to enter kernel to reduce/increase semaphore's count. The semaphore is designed to be crash-safe, it means even if an application is crashed in the middle of operating semaphore, the semaphore state is still safely recovered by later use, there is no waiter counter maintained by userland code. The main semaphore code is in libc and libthr only has some necessary stubs, this makes it possible that a non-threaded application can use semaphore without linking to thread library. Old semaphore implementation is kept libc to maintain binary compatibility. The kernel ksem API is no longer used in the new implemenation. Discussed on: threads@ Added: head/include/semaphore.h (contents, props changed) head/lib/libc/gen/sem_new.c (contents, props changed) head/lib/libthr/thread/thr_sem_new.c (contents, props changed) Deleted: head/sys/sys/semaphore.h Modified: head/ObsoleteFiles.inc head/include/Makefile head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/gen/_pthread_stubs.c head/lib/libc/gen/sem.c head/lib/libc/include/libc_private.h head/lib/libthr/pthread.map head/lib/libthr/thread/Makefile.inc head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_sem.c head/sys/kern/uipc_sem.c head/sys/sys/_semaphore.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jan 5 02:06:05 2010 (r201545) +++ head/ObsoleteFiles.inc Tue Jan 5 02:37:59 2010 (r201546) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100105: new userland semaphore implementation +OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed OLD_FILES+=usr/sbin/ntptrace OLD_FILES+=usr/share/man/man8/ntptrace.8.gz Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Tue Jan 5 02:06:05 2010 (r201545) +++ head/include/Makefile Tue Jan 5 02:37:59 2010 (r201546) @@ -18,7 +18,7 @@ INCS= a.out.h ar.h assert.h bitstring.h netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ printf.h proc_service.h pthread.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ - res_update.h resolv.h runetype.h search.h setjmp.h \ + res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \ signal.h spawn.h stab.h \ stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ @@ -28,7 +28,7 @@ INCS= a.out.h ar.h assert.h bitstring.h MHDRS= float.h floatingpoint.h stdarg.h -PHDRS= sched.h semaphore.h _semaphore.h +PHDRS= sched.h _semaphore.h LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdint.h syslog.h \ ucontext.h Added: head/include/semaphore.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/include/semaphore.h Tue Jan 5 02:37:59 2010 (r201546) @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2010 David Xu + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* semaphore.h: POSIX 1003.1b semaphores */ + +#ifndef _SEMAPHORE_H_ +#define _SEMAPHORE_H_ + +#include +#include +#include + +struct _sem { + __uint32_t _magic; + struct _usem _kern; +}; + +typedef struct _sem sem_t; + +#define SEM_FAILED ((sem_t *)0) +#define SEM_VALUE_MAX __INT_MAX + +struct timespec; + +__BEGIN_DECLS +int sem_close(sem_t *); +int sem_destroy(sem_t *); +int sem_getvalue(sem_t * __restrict, int * __restrict); +int sem_init(sem_t *, int, unsigned int); +sem_t *sem_open(const char *, int, ...); +int sem_post(sem_t *); +int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict); +int sem_trywait(sem_t *); +int sem_unlink(const char *); +int sem_wait(sem_t *); +__END_DECLS + +#endif /* !_SEMAPHORE_H_ */ Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Tue Jan 5 02:06:05 2010 (r201545) +++ head/lib/libc/gen/Makefile.inc Tue Jan 5 02:37:59 2010 (r201546) @@ -25,7 +25,7 @@ SRCS+= __getosreldate.c __xuname.c \ pause.c pmadvise.c popen.c posix_spawn.c \ psignal.c pw_scan.c pwcache.c \ raise.c readdir.c readpassphrase.c rewinddir.c \ - scandir.c seed48.c seekdir.c sem.c semctl.c \ + scandir.c seed48.c seekdir.c sem.c sem_new.c semctl.c \ setdomainname.c sethostname.c setjmperr.c setmode.c \ setproctitle.c setprogname.c siginterrupt.c siglist.c signal.c \ sigsetops.c sleep.c srand48.c statvfs.c stringlist.c strtofflags.c \ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Tue Jan 5 02:06:05 2010 (r201545) +++ head/lib/libc/gen/Symbol.map Tue Jan 5 02:37:59 2010 (r201546) @@ -236,16 +236,6 @@ FBSD_1.0 { seekdir; user_from_uid; group_from_gid; - sem_init; - sem_destroy; - sem_open; - sem_close; - sem_unlink; - sem_wait; - sem_trywait; - sem_timedwait; - sem_post; - sem_getvalue; setdomainname; sethostname; longjmperror; @@ -363,11 +353,23 @@ FBSD_1.1 { semctl; tcgetsid; tcsetsid; + __pthread_cleanup_pop_imp; + __pthread_cleanup_push_imp; }; FBSD_1.2 { basename_r; getpagesizes; + sem_close; + sem_destroy; + sem_getvalue; + sem_init; + sem_open; + sem_timedwait; + sem_trywait; + sem_post; + sem_wait; + sem_unlink; }; FBSDprivate_1.0 { @@ -456,16 +458,6 @@ FBSDprivate_1.0 { __pw_scan; /* Used by (at least) libutil */ __raise; _raise; - __sem_init; - __sem_destroy; - __sem_open; - __sem_close; - __sem_unlink; - __sem_wait; - __sem_trywait; - __sem_timedwait; - __sem_post; - __sem_getvalue; __sleep; _sleep; _rtld_allocate_tls; @@ -482,4 +474,23 @@ FBSDprivate_1.0 { _wait; __waitpid; _waitpid; + + _libc_sem_destroy; + _libc_sem_init; + _libc_sem_getvalue; + _libc_sem_trywait; + _libc_sem_wait; + _libc_sem_timedwait; + _libc_sem_post; + + _libc_sem_init_compat; + _libc_sem_destroy_compat; + _libc_sem_open_compat; + _libc_sem_close_compat; + _libc_sem_unlink_compat; + _libc_sem_wait_compat; + _libc_sem_trywait_compat; + _libc_sem_timedwait_compat; + _libc_sem_post_compat; + _libc_sem_getvalue_compat; }; Modified: head/lib/libc/gen/_pthread_stubs.c ============================================================================== --- head/lib/libc/gen/_pthread_stubs.c Tue Jan 5 02:06:05 2010 (r201545) +++ head/lib/libc/gen/_pthread_stubs.c Tue Jan 5 02:37:59 2010 (r201546) @@ -119,6 +119,8 @@ pthread_func_entry_t __thr_jtable[PJT_MA {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_SETSPECIFIC */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_SIGMASK */ {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_TESTCANCEL */ + {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_CLEANUP_POP_IMP */ + {PJT_DUAL_ENTRY(stub_zero)}, /* PJT_CLEANUP_PUSH_IMP */ }; /* @@ -265,6 +267,8 @@ STUB_FUNC2(pthread_kill, PJT_KILL, int, STUB_FUNC2(pthread_setcancelstate, PJT_SETCANCELSTATE, int, int, void *) STUB_FUNC2(pthread_setcanceltype, PJT_SETCANCELTYPE, int, int, void *) STUB_FUNC(pthread_testcancel, PJT_TESTCANCEL, void) +STUB_FUNC1(__pthread_cleanup_pop_imp, PJT_CLEANUP_POP_IMP, int, int) +STUB_FUNC2(__pthread_cleanup_push_imp, PJT_CLEANUP_PUSH_IMP, void, void*, void *); static int stub_zero(void) Modified: head/lib/libc/gen/sem.c ============================================================================== --- head/lib/libc/gen/sem.c Tue Jan 5 02:06:05 2010 (r201545) +++ head/lib/libc/gen/sem.c Tue Jan 5 02:37:59 2010 (r201546) @@ -1,4 +1,5 @@ /* + * Copyright (C) 2010 David Xu . * Copyright (C) 2000 Jason Evans . * All rights reserved. * @@ -59,34 +60,71 @@ #include "namespace.h" #include #include +#include #include +#include +#include +#include #include #include -#include #include #include #include -#include <_semaphore.h> #include "un-namespace.h" #include "libc_private.h" +/* + * Old semaphore definitions. + */ +struct sem { +#define SEM_MAGIC ((u_int32_t) 0x09fa4012) + u_int32_t magic; + pthread_mutex_t lock; + pthread_cond_t gtzero; + u_int32_t count; + u_int32_t nwaiters; +#define SEM_USER (NULL) + semid_t semid; /* semaphore id if kernel (shared) semaphore */ + int syssem; /* 1 if kernel (shared) semaphore */ + LIST_ENTRY(sem) entry; + struct sem **backpointer; +}; + +typedef struct sem* sem_t; + +#define SEM_FAILED ((sem_t *)0) +#define SEM_VALUE_MAX __INT_MAX + +#define SYM_FB10(sym) __CONCAT(sym, _fb10) +#define SYM_FBP10(sym) __CONCAT(sym, _fbp10) +#define WEAK_REF(sym, alias) __weak_reference(sym, alias) +#define SYM_COMPAT(sym, impl, ver) __sym_compat(sym, impl, ver) +#define SYM_DEFAULT(sym, impl, ver) __sym_default(sym, impl, ver) + +#define FB10_COMPAT(func, sym) \ + WEAK_REF(func, SYM_FB10(sym)); \ + SYM_COMPAT(sym, SYM_FB10(sym), FBSD_1.0) + +#define FB10_COMPAT_PRIVATE(func, sym) \ + WEAK_REF(func, SYM_FBP10(sym)); \ + SYM_DEFAULT(sym, SYM_FBP10(sym), FBSDprivate_1.0) + static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem); static void sem_free(sem_t sem); -static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(named_sems); +static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems); static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER; -__weak_reference(__sem_init, sem_init); -__weak_reference(__sem_destroy, sem_destroy); -__weak_reference(__sem_open, sem_open); -__weak_reference(__sem_close, sem_close); -__weak_reference(__sem_unlink, sem_unlink); -__weak_reference(__sem_wait, sem_wait); -__weak_reference(__sem_trywait, sem_trywait); -__weak_reference(__sem_timedwait, sem_timedwait); -__weak_reference(__sem_post, sem_post); -__weak_reference(__sem_getvalue, sem_getvalue); - +FB10_COMPAT(_libc_sem_init_compat, sem_init); +FB10_COMPAT(_libc_sem_destroy_compat, sem_destroy); +FB10_COMPAT(_libc_sem_open_compat, sem_open); +FB10_COMPAT(_libc_sem_close_compat, sem_close); +FB10_COMPAT(_libc_sem_unlink_compat, sem_unlink); +FB10_COMPAT(_libc_sem_wait_compat, sem_wait); +FB10_COMPAT(_libc_sem_trywait_compat, sem_trywait); +FB10_COMPAT(_libc_sem_timedwait_compat, sem_timedwait); +FB10_COMPAT(_libc_sem_post_compat, sem_post); +FB10_COMPAT(_libc_sem_getvalue_compat, sem_getvalue); static inline int sem_check_validity(sem_t *sem) @@ -104,8 +142,6 @@ static void sem_free(sem_t sem) { - _pthread_mutex_destroy(&sem->lock); - _pthread_cond_destroy(&sem->gtzero); sem->magic = 0; free(sem); } @@ -131,13 +167,11 @@ sem_alloc(unsigned int value, semid_t se sem->magic = SEM_MAGIC; sem->semid = semid; sem->syssem = system_sem; - sem->lock = PTHREAD_MUTEX_INITIALIZER; - sem->gtzero = PTHREAD_COND_INITIALIZER; return (sem); } int -__sem_init(sem_t *sem, int pshared, unsigned int value) +_libc_sem_init_compat(sem_t *sem, int pshared, unsigned int value) { semid_t semid; @@ -147,26 +181,27 @@ __sem_init(sem_t *sem, int pshared, unsi * pthread_cond_wait() is just a stub that doesn't really * wait. */ - if (ksem_init(&semid, value) != 0) + semid = (semid_t)SEM_USER; + if ((pshared != 0) && ksem_init(&semid, value) != 0) return (-1); - (*sem) = sem_alloc(value, semid, 1); + *sem = sem_alloc(value, semid, pshared); if ((*sem) == NULL) { - ksem_destroy(semid); + if (pshared != 0) + ksem_destroy(semid); return (-1); } return (0); } int -__sem_destroy(sem_t *sem) +_libc_sem_destroy_compat(sem_t *sem) { int retval; if (sem_check_validity(sem) != 0) return (-1); - _pthread_mutex_lock(&(*sem)->lock); /* * If this is a system semaphore let the kernel track it otherwise * make sure there are no waiters. @@ -181,18 +216,14 @@ __sem_destroy(sem_t *sem) retval = 0; (*sem)->magic = 0; } - _pthread_mutex_unlock(&(*sem)->lock); - if (retval == 0) { - _pthread_mutex_destroy(&(*sem)->lock); - _pthread_cond_destroy(&(*sem)->gtzero); + if (retval == 0) sem_free(*sem); - } return (retval); } sem_t * -__sem_open(const char *name, int oflag, ...) +_libc_sem_open_compat(const char *name, int oflag, ...) { sem_t *sem; sem_t s; @@ -255,7 +286,7 @@ err: } int -__sem_close(sem_t *sem) +_libc_sem_close_compat(sem_t *sem) { if (sem_check_validity(sem) != 0) @@ -280,68 +311,156 @@ __sem_close(sem_t *sem) } int -__sem_unlink(const char *name) +_libc_sem_unlink_compat(const char *name) { return (ksem_unlink(name)); } -int -__sem_wait(sem_t *sem) +static int +enable_async_cancel(void) { + int old; - if (sem_check_validity(sem) != 0) + _pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old); + return (old); +} + +static void +restore_async_cancel(int val) +{ + _pthread_setcanceltype(val, NULL); +} + +static int +_umtx_wait_uint(volatile unsigned *mtx, unsigned id, const struct timespec *timeout) +{ + if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && + timeout->tv_nsec <= 0))) { + errno = ETIMEDOUT; return (-1); + } + return _umtx_op(__DEVOLATILE(void *, mtx), + UMTX_OP_WAIT_UINT_PRIVATE, id, NULL, __DECONST(void*, timeout)); +} - return (ksem_wait((*sem)->semid)); +static int +_umtx_wake(volatile void *mtx) +{ + return _umtx_op(__DEVOLATILE(void *, mtx), UMTX_OP_WAKE_PRIVATE, + 1, NULL, NULL); +} + +#define TIMESPEC_SUB(dst, src, val) \ + do { \ + (dst)->tv_sec = (src)->tv_sec - (val)->tv_sec; \ + (dst)->tv_nsec = (src)->tv_nsec - (val)->tv_nsec; \ + if ((dst)->tv_nsec < 0) { \ + (dst)->tv_sec--; \ + (dst)->tv_nsec += 1000000000; \ + } \ + } while (0) + + +static void +sem_cancel_handler(void *arg) +{ + sem_t *sem = arg; + + atomic_add_int(&(*sem)->nwaiters, -1); + if ((*sem)->nwaiters && (*sem)->count) + _umtx_wake(&(*sem)->count); } int -__sem_trywait(sem_t *sem) +_libc_sem_timedwait_compat(sem_t * __restrict sem, + const struct timespec * __restrict abstime) { - int retval; + struct timespec ts, ts2; + int val, retval, saved_cancel; if (sem_check_validity(sem) != 0) return (-1); - if ((*sem)->syssem != 0) - retval = ksem_trywait((*sem)->semid); - else { - _pthread_mutex_lock(&(*sem)->lock); - if ((*sem)->count > 0) { - (*sem)->count--; - retval = 0; - } else { - errno = EAGAIN; - retval = -1; + if ((*sem)->syssem != 0) { + saved_cancel = enable_async_cancel(); + retval = ksem_wait((*sem)->semid); + restore_async_cancel(saved_cancel); + return (retval); + } + + retval = 0; + _pthread_testcancel(); + for (;;) { + while ((val = (*sem)->count) > 0) { + if (atomic_cmpset_acq_int(&(*sem)->count, val, val - 1)) + return (0); + } + if (retval) + break; + if (abstime) { + if (abstime->tv_nsec >= 1000000000 || abstime->tv_nsec < 0) { + errno = EINVAL; + return (-1); + } + clock_gettime(CLOCK_REALTIME, &ts); + TIMESPEC_SUB(&ts2, abstime, &ts); } - _pthread_mutex_unlock(&(*sem)->lock); + atomic_add_int(&(*sem)->nwaiters, 1); + pthread_cleanup_push(sem_cancel_handler, sem); + saved_cancel = enable_async_cancel(); + retval = _umtx_wait_uint(&(*sem)->count, 0, abstime ? &ts2 : NULL); + restore_async_cancel(saved_cancel); + pthread_cleanup_pop(0); + atomic_add_int(&(*sem)->nwaiters, -1); } return (retval); } int -__sem_timedwait(sem_t * __restrict sem, - const struct timespec * __restrict abs_timeout) +_libc_sem_wait_compat(sem_t *sem) { + return _libc_sem_timedwait_compat(sem, NULL); +} + +int +_libc_sem_trywait_compat(sem_t *sem) +{ + int val; + if (sem_check_validity(sem) != 0) return (-1); - return (ksem_timedwait((*sem)->semid, abs_timeout)); + if ((*sem)->syssem != 0) + return ksem_trywait((*sem)->semid); + + while ((val = (*sem)->count) > 0) { + if (atomic_cmpset_acq_int(&(*sem)->count, val, val - 1)) + return (0); + } + errno = EAGAIN; + return (-1); } int -__sem_post(sem_t *sem) +_libc_sem_post_compat(sem_t *sem) { if (sem_check_validity(sem) != 0) return (-1); - return (ksem_post((*sem)->semid)); + if ((*sem)->syssem != 0) + return ksem_post((*sem)->semid); + + atomic_add_rel_int(&(*sem)->count, 1); + + if ((*sem)->nwaiters) + return _umtx_wake(&(*sem)->count); + return (0); } int -__sem_getvalue(sem_t * __restrict sem, int * __restrict sval) +_libc_sem_getvalue_compat(sem_t * __restrict sem, int * __restrict sval) { int retval; @@ -351,10 +470,7 @@ __sem_getvalue(sem_t * __restrict sem, i if ((*sem)->syssem != 0) retval = ksem_getvalue((*sem)->semid, sval); else { - _pthread_mutex_lock(&(*sem)->lock); *sval = (int)(*sem)->count; - _pthread_mutex_unlock(&(*sem)->lock); - retval = 0; } return (retval); Added: head/lib/libc/gen/sem_new.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/sem_new.c Tue Jan 5 02:37:59 2010 (r201546) @@ -0,0 +1,470 @@ +/* + * Copyright (C) 2010 David Xu . + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``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 COPYRIGHT HOLDER(S) 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$ + */ + +#include "namespace.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "un-namespace.h" + +__weak_reference(_libc_sem_close, sem_close); +__weak_reference(_libc_sem_close, _sem_close); +__weak_reference(_libc_sem_destroy, sem_destroy); +__weak_reference(_libc_sem_destroy, _sem_destroy); +__weak_reference(_libc_sem_getvalue, sem_getvalue); +__weak_reference(_libc_sem_getvalue, _sem_getvalue); +__weak_reference(_libc_sem_init, sem_init); +__weak_reference(_libc_sem_init, _sem_init); +__weak_reference(_libc_sem_open, sem_open); +__weak_reference(_libc_sem_open, _sem_open); +__weak_reference(_libc_sem_post, sem_post); +__weak_reference(_libc_sem_post, _sem_post); +__weak_reference(_libc_sem_timedwait, sem_timedwait); +__weak_reference(_libc_sem_timedwait, _sem_timedwait); +__weak_reference(_libc_sem_trywait, sem_trywait); +__weak_reference(_libc_sem_trywait, _sem_trywait); +__weak_reference(_libc_sem_unlink, sem_unlink); +__weak_reference(_libc_sem_unlink, _sem_unlink); +__weak_reference(_libc_sem_wait, sem_wait); +__weak_reference(_libc_sem_wait, _sem_wait); + +#define SEM_PREFIX "/tmp/SEMD" +#define SEM_MAGIC ((u_int32_t)0x73656d31) + +struct sem_nameinfo { + int open_count; + char *name; + sem_t *sem; + LIST_ENTRY(sem_nameinfo) next; +}; + +static pthread_once_t once = PTHREAD_ONCE_INIT; +static pthread_mutex_t sem_llock; +static LIST_HEAD(,sem_nameinfo) sem_list = LIST_HEAD_INITIALIZER(sem_list); + +static void +sem_prefork() +{ + + _pthread_mutex_lock(&sem_llock); +} + +static void +sem_postfork() +{ + _pthread_mutex_unlock(&sem_llock); +} + +static void +sem_child_postfork() +{ + _pthread_mutex_unlock(&sem_llock); +} + +static void +sem_module_init(void) +{ + pthread_mutexattr_t ma; + + _pthread_mutexattr_init(&ma); + _pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); + _pthread_mutex_init(&sem_llock, &ma); + _pthread_mutexattr_destroy(&ma); + _pthread_atfork(sem_prefork, sem_postfork, sem_child_postfork); +} + +static inline int +sem_check_validity(sem_t *sem) +{ + + if (sem->_magic == SEM_MAGIC) + return (0); + else { + errno = EINVAL; + return (-1); + } +} + +int +_libc_sem_init(sem_t *sem, int pshared, unsigned int value) +{ + + if (value > SEM_VALUE_MAX) { + errno = EINVAL; + return (-1); + } + + bzero(sem, sizeof(sem_t)); + sem->_magic = SEM_MAGIC; + sem->_kern._count = (u_int32_t)value; + sem->_kern._has_waiters = 0; + sem->_kern._flags = pshared ? USYNC_PROCESS_SHARED : 0; + return (0); +} + +sem_t * +_libc_sem_open(const char *name, int flags, ...) +{ + char path[PATH_MAX]; + + struct stat sb; + va_list ap; + struct sem_nameinfo *ni = NULL; + sem_t *sem = NULL; + int fd = -1, mode, len; + + if (name[0] != '/') { + errno = EINVAL; + return (NULL); + } + name++; + + if (flags & ~(O_CREAT|O_EXCL)) { + errno = EINVAL; + return (NULL); + } + + _pthread_once(&once, sem_module_init); + + _pthread_mutex_lock(&sem_llock); + LIST_FOREACH(ni, &sem_list, next) { + if (strcmp(name, ni->name) == 0) { + ni->open_count++; + sem = ni->sem; + _pthread_mutex_unlock(&sem_llock); + return (sem); + } + } + + if (flags & O_CREAT) { + va_start(ap, flags); + mode = va_arg(ap, int); + va_end(ap); + } + + len = sizeof(*ni) + strlen(name) + 1; + ni = (struct sem_nameinfo *)malloc(len); + if (ni == NULL) { + errno = ENOSPC; + goto error; + } + + ni->name = (char *)(ni+1); + strcpy(ni->name, name); + + strcpy(path, SEM_PREFIX); + if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { + errno = ENAMETOOLONG; + goto error; + } + + fd = _open(path, flags|O_RDWR, mode); + if (fd == -1) + goto error; + if (flock(fd, LOCK_EX) == -1) + goto error; + if (_fstat(fd, &sb)) { + flock(fd, LOCK_UN); + goto error; + } + if (sb.st_size < sizeof(sem_t)) { + sem_t tmp; + + tmp._magic = SEM_MAGIC; + tmp._kern._has_waiters = 0; + tmp._kern._count = 0; + tmp._kern._flags = USYNC_PROCESS_SHARED | SEM_NAMED; + if (_write(fd, &tmp, sizeof(tmp)) != sizeof(tmp)) { + flock(fd, LOCK_UN); + goto error; + } + } + flock(fd, LOCK_UN); + sem = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE, + MAP_SHARED|MAP_NOSYNC, fd, 0); + if (sem == MAP_FAILED) { + sem = NULL; + if (errno == ENOMEM) + errno = ENOSPC; + goto error; + } + if (sem->_magic != SEM_MAGIC) { + errno = EINVAL; + goto error; + } + ni->open_count = 1; + ni->sem = sem; + LIST_INSERT_HEAD(&sem_list, ni, next); + _pthread_mutex_unlock(&sem_llock); + _close(fd); + return (sem); + +error: + _pthread_mutex_unlock(&sem_llock); + if (fd != -1) + _close(fd); + if (sem != NULL) + munmap(sem, sizeof(sem_t)); + free(ni); + return (SEM_FAILED); +} + +int +_libc_sem_close(sem_t *sem) +{ + struct sem_nameinfo *ni; + + if (sem_check_validity(sem) != 0) + return (-1); + + if (!(sem->_kern._flags & SEM_NAMED)) { + errno = EINVAL; + return (-1); + } + + _pthread_mutex_lock(&sem_llock); + LIST_FOREACH(ni, &sem_list, next) { + if (sem == ni->sem) { + if (--ni->open_count > 0) { + _pthread_mutex_unlock(&sem_llock); + return (0); + } + else + break; + } + } + + if (ni) { + LIST_REMOVE(ni, next); + _pthread_mutex_unlock(&sem_llock); + munmap(sem, sizeof(*sem)); + free(ni); + return (0); + } + _pthread_mutex_unlock(&sem_llock); + return (-1); +} + +int +_libc_sem_unlink(const char *name) +{ + char path[PATH_MAX]; + + if (name[0] != '/') { + errno = ENOENT; + return -1; + } + name++; + + strcpy(path, SEM_PREFIX); + if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { + errno = ENAMETOOLONG; + return (-1); + } + return unlink(path); +} + +int +_libc_sem_destroy(sem_t *sem) +{ + + if (sem_check_validity(sem) != 0) + return (-1); + + if (sem->_kern._flags & SEM_NAMED) { + errno = EINVAL; + return (-1); + } + sem->_magic = 0; + return (0); +} + +int +_libc_sem_getvalue(sem_t * __restrict sem, int * __restrict sval) +{ + + if (sem_check_validity(sem) != 0) + return (-1); + + *sval = (int)sem->_kern._count; + return (0); +} + +static int +usem_wake(struct _usem *sem) +{ + if (!sem->_has_waiters) + return (0); + return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL); +} + +static int +usem_wait(struct _usem *sem, const struct timespec *timeout) +{ + if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && + timeout->tv_nsec <= 0))) { + errno = ETIMEDOUT; + return (-1); + } + return _umtx_op(sem, UMTX_OP_SEM_WAIT, 0, NULL, + __DECONST(void*, timeout)); +} + +int +_libc_sem_trywait(sem_t *sem) +{ + int val; + + if (sem_check_validity(sem) != 0) + return (-1); + + while ((val = sem->_kern._count) > 0) { + if (atomic_cmpset_acq_int(&sem->_kern._count, val, val - 1)) + return (0); + } + errno = EAGAIN; + return (-1); +} + +static void +sem_cancel_handler(void *arg) +{ + sem_t *sem = arg; + + if (sem->_kern._has_waiters && sem->_kern._count) + usem_wake(&sem->_kern); +} + +#define TIMESPEC_SUB(dst, src, val) \ + do { \ + (dst)->tv_sec = (src)->tv_sec - (val)->tv_sec; \ + (dst)->tv_nsec = (src)->tv_nsec - (val)->tv_nsec; \ + if ((dst)->tv_nsec < 0) { \ + (dst)->tv_sec--; \ + (dst)->tv_nsec += 1000000000; \ + } \ + } while (0) + + +static int +enable_async_cancel(void) +{ + int old; + + _pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old); + return (old); +} + +static void +restore_async_cancel(int val) +{ + _pthread_setcanceltype(val, NULL); +} + +int +_libc_sem_timedwait(sem_t * __restrict sem, + const struct timespec * __restrict abstime) +{ + struct timespec ts, ts2; + int val, retval, saved_cancel; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 03:39:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F08E1065692; Tue, 5 Jan 2010 03:39:31 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D3708FC0A; Tue, 5 Jan 2010 03:39:31 +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 o053dVdj075173; Tue, 5 Jan 2010 03:39:31 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o053dV1j075171; Tue, 5 Jan 2010 03:39:31 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050339.o053dV1j075171@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 03:39: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: r201547 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 03:39:31 -0000 Author: davidxu Date: Tue Jan 5 03:39:31 2010 New Revision: 201547 URL: http://svn.freebsd.org/changeset/base/201547 Log: Don't check has_waiters twice, inline some small functions. performance result on my machine: mutex Elapsed: 902115 us; per iteration: 90 ns. semaphore Elapsed: 958780 us; per iteration: 95 ns. Modified: head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Tue Jan 5 02:37:59 2010 (r201546) +++ head/lib/libc/gen/sem_new.c Tue Jan 5 03:39:31 2010 (r201547) @@ -331,7 +331,7 @@ _libc_sem_getvalue(sem_t * __restrict se return (0); } -static int +static __inline int usem_wake(struct _usem *sem) { if (!sem->_has_waiters) @@ -339,7 +339,7 @@ usem_wake(struct _usem *sem) return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL); } -static int +static __inline int usem_wait(struct _usem *sem, const struct timespec *timeout) { if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && @@ -387,7 +387,7 @@ sem_cancel_handler(void *arg) } while (0) -static int +static __inline int enable_async_cancel(void) { int old; @@ -396,7 +396,7 @@ enable_async_cancel(void) return (old); } -static void +static __inline void restore_async_cancel(int val) { _pthread_setcanceltype(val, NULL); @@ -413,7 +413,6 @@ _libc_sem_timedwait(sem_t * __restrict s return (-1); retval = 0; - _pthread_testcancel(); for (;;) { while ((val = sem->_kern._count) > 0) { if (atomic_cmpset_acq_int(&sem->_kern._count, val, val - 1)) @@ -464,7 +463,5 @@ _libc_sem_post(sem_t *sem) return (-1); atomic_add_rel_int(&sem->_kern._count, 1); - if (sem->_kern._has_waiters) - return usem_wake(&sem->_kern); - return (0); + return usem_wake(&sem->_kern); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 04:40:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BCBC1065670; Tue, 5 Jan 2010 04:40:06 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF0C8FC21; Tue, 5 Jan 2010 04:40:04 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so3572945qwb.7 for ; Mon, 04 Jan 2010 20:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=pbeJsc0nKMHfB1BruYzPMiJvotHLmGE33jhbJ9OiYUU=; b=HkcYk2L6rHlTpFDxzdpxl9cjr8hSZ0nGAe0DeELjuR7n3BM1xYCm0tfD5hupovGNoJ mqpEMVFL1bk1fTt5N89F2RSlUdsmgORTnf3rCIlu2W2GnYd/KhffAECCsPvXS8vYn46J 4S3v24wtVXnxHMZDjEthLTnFNlg6/rgyWbbn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=NeHtnsZGYjTl1OR3K5bwHnFGPLMBBe4S8yprkJIdIIkGhfc6TEcrNLdVafQDs3CCum PMTiNr43vDXti14HkGTqZcerlMec4Dwu93lGVEHc0x689+8DzxSumtysBzU1nrkgMvkf Pts6fPtdchJ7oUZD9pxv5F22FjkgDlUXmx4FY= Received: by 10.224.66.211 with SMTP id o19mr11642572qai.342.1262666396117; Mon, 04 Jan 2010 20:39:56 -0800 (PST) Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net [24.91.218.112]) by mx.google.com with ESMTPS id 4sm15137889qwe.55.2010.01.04.20.39.51 (version=SSLv3 cipher=RC4-MD5); Mon, 04 Jan 2010 20:39:55 -0800 (PST) Date: Mon, 4 Jan 2010 23:39:46 -0500 From: Alexander Kabaev To: David Xu Message-ID: <20100104233946.6d8bfa37@kan.dnsalias.net> In-Reply-To: <201001050339.o053dV1j075171@svn.freebsd.org> References: <201001050339.o053dV1j075171@svn.freebsd.org> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/iIY41kDyQ_qlTyTTcA7e/_S"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201547 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 04:40:06 -0000 --Sig_/iIY41kDyQ_qlTyTTcA7e/_S Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, some quick questions: FB10_COMPAT_PRIVATE is not used anywhere, why did it get committed? That aside, use of SYM_DEFAULT is pretty much always wrong. Also, does libthr really need to export sem_ symbols in 1.2 namespace? I do not think so, but there might be reasons I am missing, could you shed some light here? On Tue, 5 Jan 2010 03:39:31 +0000 (UTC) David Xu wrote: > Author: davidxu > Date: Tue Jan 5 03:39:31 2010 > New Revision: 201547 > URL: http://svn.freebsd.org/changeset/base/201547 >=20 > Log: > Don't check has_waiters twice, inline some small functions. > performance result on my machine: > mutex Elapsed: 902115 us; per iteration: 90 ns. > semaphore Elapsed: 958780 us; per iteration: 95 ns. >=20 > Modified: > head/lib/libc/gen/sem_new.c >=20 > Modified: head/lib/libc/gen/sem_new.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/lib/libc/gen/sem_new.c Tue Jan 5 02:37:59 > 2010 (r201546) +++ head/lib/libc/gen/sem_new.c Tue Jan > 5 03:39:31 2010 (r201547) @@ -331,7 +331,7 @@ > _libc_sem_getvalue(sem_t * __restrict se return (0); > } > =20 > -static int > +static __inline int > usem_wake(struct _usem *sem) > { > if (!sem->_has_waiters) > @@ -339,7 +339,7 @@ usem_wake(struct _usem *sem) > return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL); > } > =20 > -static int > +static __inline int > usem_wait(struct _usem *sem, const struct timespec *timeout) > { > if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec =3D=3D 0 > && @@ -387,7 +387,7 @@ sem_cancel_handler(void *arg) > } while (0) > =20 > =20 > -static int > +static __inline int > enable_async_cancel(void) > { > int old; > @@ -396,7 +396,7 @@ enable_async_cancel(void) > return (old); > } > =20 > -static void > +static __inline void > restore_async_cancel(int val) > { > _pthread_setcanceltype(val, NULL); > @@ -413,7 +413,6 @@ _libc_sem_timedwait(sem_t * __restrict s > return (-1); > =20 > retval =3D 0; > - _pthread_testcancel(); > for (;;) { > while ((val =3D sem->_kern._count) > 0) { > if > (atomic_cmpset_acq_int(&sem->_kern._count, val, val - 1)) @@ -464,7 > +463,5 @@ _libc_sem_post(sem_t *sem) return (-1); > =20 > atomic_add_rel_int(&sem->_kern._count, 1); > - if (sem->_kern._has_waiters) > - return usem_wake(&sem->_kern); > - return (0); > + return usem_wake(&sem->_kern); > } --=20 Alexander Kabaev --Sig_/iIY41kDyQ_qlTyTTcA7e/_S Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iD8DBQFLQsKWQ6z1jMm+XZYRArwyAJwOc/6JtClBjYxuHbGvwayJtQ5KpwCfQStd sgXlj8pE9DNj3cwia4tZsws= =JzuK -----END PGP SIGNATURE----- --Sig_/iIY41kDyQ_qlTyTTcA7e/_S-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 05:39:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E48F61065692; Tue, 5 Jan 2010 05:39:09 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D1FC58FC19; Tue, 5 Jan 2010 05:39:09 +0000 (UTC) Received: from apple.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o055d6fO054251; Tue, 5 Jan 2010 05:39:08 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4B42D07A.5000803@freebsd.org> Date: Tue, 05 Jan 2010 13:39:06 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20080612) MIME-Version: 1.0 To: Alexander Kabaev References: <201001050339.o053dV1j075171@svn.freebsd.org> <20100104233946.6d8bfa37@kan.dnsalias.net> In-Reply-To: <20100104233946.6d8bfa37@kan.dnsalias.net> 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 Subject: Re: svn commit: r201547 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 05:39:10 -0000 Alexander Kabaev wrote: > Hi, > > some quick questions: > > FB10_COMPAT_PRIVATE is not used anywhere, why did it get committed? > That aside, use of SYM_DEFAULT is pretty much always wrong. > Yes, this needs to be cleaned. > Also, does libthr really need to export sem_ symbols in 1.2 namespace? > I do not think so, but there might be reasons I am missing, could you > shed some light here? > If libthr.so does not have 1.2 semaphore, a program linked against libthr may use 1.0 version at linking time, doesn't this cause trouble? anyway, I am not symbol versioning expert, welcome to fix it. From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 05:44:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0891065693; Tue, 5 Jan 2010 05:44:52 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52D798FC17; Tue, 5 Jan 2010 05:44:52 +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 o055iqtI003088; Tue, 5 Jan 2010 05:44:52 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o055iqqA003086; Tue, 5 Jan 2010 05:44:52 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050544.o055iqqA003086@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 05:44: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: r201553 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 05:44:52 -0000 Author: davidxu Date: Tue Jan 5 05:44:52 2010 New Revision: 201553 URL: http://svn.freebsd.org/changeset/base/201553 Log: Remove unused macros. Modified: head/lib/libc/gen/sem.c Modified: head/lib/libc/gen/sem.c ============================================================================== --- head/lib/libc/gen/sem.c Tue Jan 5 05:43:53 2010 (r201552) +++ head/lib/libc/gen/sem.c Tue Jan 5 05:44:52 2010 (r201553) @@ -99,16 +99,11 @@ typedef struct sem* sem_t; #define SYM_FBP10(sym) __CONCAT(sym, _fbp10) #define WEAK_REF(sym, alias) __weak_reference(sym, alias) #define SYM_COMPAT(sym, impl, ver) __sym_compat(sym, impl, ver) -#define SYM_DEFAULT(sym, impl, ver) __sym_default(sym, impl, ver) #define FB10_COMPAT(func, sym) \ WEAK_REF(func, SYM_FB10(sym)); \ SYM_COMPAT(sym, SYM_FB10(sym), FBSD_1.0) -#define FB10_COMPAT_PRIVATE(func, sym) \ - WEAK_REF(func, SYM_FBP10(sym)); \ - SYM_DEFAULT(sym, SYM_FBP10(sym), FBSDprivate_1.0) - static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem); static void sem_free(sem_t sem); From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 05:47:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5099E106566B; Tue, 5 Jan 2010 05:47:19 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9C38FC0A; Tue, 5 Jan 2010 05:47:19 +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 o055lJ0l003693; Tue, 5 Jan 2010 05:47:19 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o055lJue003691; Tue, 5 Jan 2010 05:47:19 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050547.o055lJue003691@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 05:47: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: r201555 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 05:47:19 -0000 Author: davidxu Date: Tue Jan 5 05:47:18 2010 New Revision: 201555 URL: http://svn.freebsd.org/changeset/base/201555 Log: forgot to remove SYM_FBP10. ;-) Modified: head/lib/libc/gen/sem.c Modified: head/lib/libc/gen/sem.c ============================================================================== --- head/lib/libc/gen/sem.c Tue Jan 5 05:45:51 2010 (r201554) +++ head/lib/libc/gen/sem.c Tue Jan 5 05:47:18 2010 (r201555) @@ -96,7 +96,6 @@ typedef struct sem* sem_t; #define SEM_VALUE_MAX __INT_MAX #define SYM_FB10(sym) __CONCAT(sym, _fb10) -#define SYM_FBP10(sym) __CONCAT(sym, _fbp10) #define WEAK_REF(sym, alias) __weak_reference(sym, alias) #define SYM_COMPAT(sym, impl, ver) __sym_compat(sym, impl, ver) From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 05:52:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB7DD106568B; Tue, 5 Jan 2010 05:52:48 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qy0-f176.google.com (mail-qy0-f176.google.com [209.85.221.176]) by mx1.freebsd.org (Postfix) with ESMTP id 4AF408FC12; Tue, 5 Jan 2010 05:52:48 +0000 (UTC) Received: by qyk6 with SMTP id 6so6727120qyk.3 for ; Mon, 04 Jan 2010 21:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=5veqIyWsBJBPmAoQivUKz6LaJXcBM36hA2APJK09+rA=; b=eGD/qy0HzItXbOOJGbt1fTOq1FvxQ0Bb5/L/gb00AQ8GHhR9qeqmLorHXpb9Nve3h1 A3+VEKFuF5UU29Jmiotn2C5bj4ek2nu2yIqSlyWyW1d8WMn9Wj3BnMTQs574SysTtPBk LSg5OV0G2WXVHFNYYXzuL5dbVIXM4ap6pZBoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=O3qXOeM4w+pRFXuENIcPApt4p+d7uVd7vWj4v/xnaUsm0cKxBg4RA53qfCEn6H7mfw CbOv1FYYzoZFeKNQM0jSIRPClj/ae5MqCdMHulVTYuiWXdTGEInLWJ2mDxHEln+q1cdl kxgbX8JSVRezuRtY8WhGt1H2z9vD9nw5fmz6M= Received: by 10.224.63.202 with SMTP id c10mr11790159qai.39.1262670762158; Mon, 04 Jan 2010 21:52:42 -0800 (PST) Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net [24.91.218.112]) by mx.google.com with ESMTPS id 4sm50712932qwe.5.2010.01.04.21.52.39 (version=SSLv3 cipher=RC4-MD5); Mon, 04 Jan 2010 21:52:40 -0800 (PST) Date: Tue, 5 Jan 2010 00:50:42 -0500 From: Alexander Kabaev To: David Xu Message-ID: <20100105005042.7fd9db85@kan.dnsalias.net> In-Reply-To: <4B42D07A.5000803@freebsd.org> References: <201001050339.o053dV1j075171@svn.freebsd.org> <20100104233946.6d8bfa37@kan.dnsalias.net> <4B42D07A.5000803@freebsd.org> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/r1jJl/6LmJiltlx8/HPQCSW"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201547 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 05:52:49 -0000 --Sig_/r1jJl/6LmJiltlx8/HPQCSW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 05 Jan 2010 13:39:06 +0800 David Xu wrote: > Alexander Kabaev wrote: > > Hi, > >=20 > > some quick questions: > >=20 > > FB10_COMPAT_PRIVATE is not used anywhere, why did it get committed? > > That aside, use of SYM_DEFAULT is pretty much always wrong. > >=20 > Yes, this needs to be cleaned. >=20 > > Also, does libthr really need to export sem_ symbols in 1.2 > > namespace? I do not think so, but there might be reasons I am > > missing, could you shed some light here? > >=20 >=20 > If libthr.so does not have 1.2 semaphore, a program linked against=20 > libthr may use 1.0 version at linking time, doesn't this cause > trouble? anyway, I am not symbol versioning expert, welcome to fix it. >=20 No, that won't happen. Compat (single '@') symbols are only resolvable at runtime, bit at link time, so ld won't see any sem_ symbols in libthr and by necessity will pick ones from libc. --=20 Alexander Kabaev --Sig_/r1jJl/6LmJiltlx8/HPQCSW Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iD8DBQFLQtOmQ6z1jMm+XZYRAtNPAKCcgaPECN3d4E0hz0if5Vh1/RX6ggCfbL+f 3KL2Sr7OKHUWX5F2SMc0IoY= =P1Cy -----END PGP SIGNATURE----- --Sig_/r1jJl/6LmJiltlx8/HPQCSW-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 06:02:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C851065670; Tue, 5 Jan 2010 06:02:53 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 17EA48FC15; Tue, 5 Jan 2010 06:02:53 +0000 (UTC) Received: from apple.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0562opM078456; Tue, 5 Jan 2010 06:02:51 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4B42D60A.1090901@freebsd.org> Date: Tue, 05 Jan 2010 14:02:50 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20080612) MIME-Version: 1.0 To: Alexander Kabaev References: <201001050339.o053dV1j075171@svn.freebsd.org> <20100104233946.6d8bfa37@kan.dnsalias.net> <4B42D07A.5000803@freebsd.org> <20100105005042.7fd9db85@kan.dnsalias.net> In-Reply-To: <20100105005042.7fd9db85@kan.dnsalias.net> 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 Subject: Re: svn commit: r201547 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 06:02:53 -0000 Alexander Kabaev wrote: > On Tue, 05 Jan 2010 13:39:06 +0800 > David Xu wrote: > >> Alexander Kabaev wrote: >>> Hi, >>> >>> some quick questions: >>> >>> FB10_COMPAT_PRIVATE is not used anywhere, why did it get committed? >>> That aside, use of SYM_DEFAULT is pretty much always wrong. >>> >> Yes, this needs to be cleaned. >> >>> Also, does libthr really need to export sem_ symbols in 1.2 >>> namespace? I do not think so, but there might be reasons I am >>> missing, could you shed some light here? >>> >> If libthr.so does not have 1.2 semaphore, a program linked against >> libthr may use 1.0 version at linking time, doesn't this cause >> trouble? anyway, I am not symbol versioning expert, welcome to fix it. >> > > No, that won't happen. Compat (single '@') symbols are only resolvable > at runtime, bit at link time, so ld won't see any sem_ symbols in libthr > and by necessity will pick ones from libc. > > My previous test got opposite result, it sticked with libthr, but this time I tested it again, you are right, it uses version 1.2 from libc. I will remove extra stubs from libthr. From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 06:21:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AAA1065676; Tue, 5 Jan 2010 06:21:29 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 708448FC08; Tue, 5 Jan 2010 06:21:29 +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 o056LT7o011406; Tue, 5 Jan 2010 06:21:29 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o056LTL6011404; Tue, 5 Jan 2010 06:21:29 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050621.o056LTL6011404@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 06:21: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: r201559 - in head/lib/libthr: . thread X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 06:21:29 -0000 Author: davidxu Date: Tue Jan 5 06:21:29 2010 New Revision: 201559 URL: http://svn.freebsd.org/changeset/base/201559 Log: Remove extra new semaphore stubs, because libc already has them, and ld can find the newest version which is default. Poked by: kan@ Deleted: head/lib/libthr/thread/thr_sem_new.c Modified: head/lib/libthr/pthread.map Modified: head/lib/libthr/pthread.map ============================================================================== --- head/lib/libthr/pthread.map Tue Jan 5 06:13:15 2010 (r201558) +++ head/lib/libthr/pthread.map Tue Jan 5 06:21:29 2010 (r201559) @@ -396,11 +396,4 @@ FBSD_1.1 { FBSD_1.2 { openat; - sem_destroy; - sem_getvalue; - sem_init; - sem_post; - sem_timedwait; - sem_trywait; - sem_wait; }; From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 06:40:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 730331065679; Tue, 5 Jan 2010 06:40:27 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61A898FC0C; Tue, 5 Jan 2010 06:40: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 o056eRgw015620; Tue, 5 Jan 2010 06:40:27 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o056eRjE015617; Tue, 5 Jan 2010 06:40:27 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050640.o056eRjE015617@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 06:40: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: r201561 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 06:40:27 -0000 Author: davidxu Date: Tue Jan 5 06:40:27 2010 New Revision: 201561 URL: http://svn.freebsd.org/changeset/base/201561 Log: More cleanup, remove _libc prefix because libthr no longer has stubs referencing them. Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Tue Jan 5 06:34:20 2010 (r201560) +++ head/lib/libc/gen/Symbol.map Tue Jan 5 06:40:27 2010 (r201561) @@ -475,14 +475,6 @@ FBSDprivate_1.0 { __waitpid; _waitpid; - _libc_sem_destroy; - _libc_sem_init; - _libc_sem_getvalue; - _libc_sem_trywait; - _libc_sem_wait; - _libc_sem_timedwait; - _libc_sem_post; - _libc_sem_init_compat; _libc_sem_destroy_compat; _libc_sem_open_compat; Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Tue Jan 5 06:34:20 2010 (r201560) +++ head/lib/libc/gen/sem_new.c Tue Jan 5 06:40:27 2010 (r201561) @@ -48,26 +48,16 @@ #include #include "un-namespace.h" -__weak_reference(_libc_sem_close, sem_close); -__weak_reference(_libc_sem_close, _sem_close); -__weak_reference(_libc_sem_destroy, sem_destroy); -__weak_reference(_libc_sem_destroy, _sem_destroy); -__weak_reference(_libc_sem_getvalue, sem_getvalue); -__weak_reference(_libc_sem_getvalue, _sem_getvalue); -__weak_reference(_libc_sem_init, sem_init); -__weak_reference(_libc_sem_init, _sem_init); -__weak_reference(_libc_sem_open, sem_open); -__weak_reference(_libc_sem_open, _sem_open); -__weak_reference(_libc_sem_post, sem_post); -__weak_reference(_libc_sem_post, _sem_post); -__weak_reference(_libc_sem_timedwait, sem_timedwait); -__weak_reference(_libc_sem_timedwait, _sem_timedwait); -__weak_reference(_libc_sem_trywait, sem_trywait); -__weak_reference(_libc_sem_trywait, _sem_trywait); -__weak_reference(_libc_sem_unlink, sem_unlink); -__weak_reference(_libc_sem_unlink, _sem_unlink); -__weak_reference(_libc_sem_wait, sem_wait); -__weak_reference(_libc_sem_wait, _sem_wait); +__weak_reference(_sem_close, sem_close); +__weak_reference(_sem_destroy, sem_destroy); +__weak_reference(_sem_getvalue, sem_getvalue); +__weak_reference(_sem_init, sem_init); +__weak_reference(_sem_open, sem_open); +__weak_reference(_sem_post, sem_post); +__weak_reference(_sem_timedwait, sem_timedwait); +__weak_reference(_sem_trywait, sem_trywait); +__weak_reference(_sem_unlink, sem_unlink); +__weak_reference(_sem_wait, sem_wait); #define SEM_PREFIX "/tmp/SEMD" #define SEM_MAGIC ((u_int32_t)0x73656d31) @@ -127,7 +117,7 @@ sem_check_validity(sem_t *sem) } int -_libc_sem_init(sem_t *sem, int pshared, unsigned int value) +_sem_init(sem_t *sem, int pshared, unsigned int value) { if (value > SEM_VALUE_MAX) { @@ -144,7 +134,7 @@ _libc_sem_init(sem_t *sem, int pshared, } sem_t * -_libc_sem_open(const char *name, int flags, ...) +_sem_open(const char *name, int flags, ...) { char path[PATH_MAX]; @@ -251,7 +241,7 @@ error: } int -_libc_sem_close(sem_t *sem) +_sem_close(sem_t *sem) { struct sem_nameinfo *ni; @@ -287,7 +277,7 @@ _libc_sem_close(sem_t *sem) } int -_libc_sem_unlink(const char *name) +_sem_unlink(const char *name) { char path[PATH_MAX]; @@ -306,7 +296,7 @@ _libc_sem_unlink(const char *name) } int -_libc_sem_destroy(sem_t *sem) +_sem_destroy(sem_t *sem) { if (sem_check_validity(sem) != 0) @@ -321,7 +311,7 @@ _libc_sem_destroy(sem_t *sem) } int -_libc_sem_getvalue(sem_t * __restrict sem, int * __restrict sval) +_sem_getvalue(sem_t * __restrict sem, int * __restrict sval) { if (sem_check_validity(sem) != 0) @@ -352,7 +342,7 @@ usem_wait(struct _usem *sem, const struc } int -_libc_sem_trywait(sem_t *sem) +_sem_trywait(sem_t *sem) { int val; @@ -403,7 +393,7 @@ restore_async_cancel(int val) } int -_libc_sem_timedwait(sem_t * __restrict sem, +_sem_timedwait(sem_t * __restrict sem, const struct timespec * __restrict abstime) { struct timespec ts, ts2; @@ -444,9 +434,9 @@ _libc_sem_timedwait(sem_t * __restrict s } int -_libc_sem_wait(sem_t *sem) +_sem_wait(sem_t *sem) { - return _libc_sem_timedwait(sem, NULL); + return _sem_timedwait(sem, NULL); } /* @@ -456,7 +446,7 @@ _libc_sem_wait(sem_t *sem) * The implementation does not use lock, so it should be safe. */ int -_libc_sem_post(sem_t *sem) +_sem_post(sem_t *sem) { if (sem_check_validity(sem) != 0) From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 07:50:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF34A1065679; Tue, 5 Jan 2010 07:50:31 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95ABF8FC1D; Tue, 5 Jan 2010 07:50:31 +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 o057oVFu031114; Tue, 5 Jan 2010 07:50:31 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o057oVu1031112; Tue, 5 Jan 2010 07:50:31 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001050750.o057oVu1031112@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 07:50: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: r201565 - head/lib/libthr/thread X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 07:50:31 -0000 Author: davidxu Date: Tue Jan 5 07:50:31 2010 New Revision: 201565 URL: http://svn.freebsd.org/changeset/base/201565 Log: remove file thr_sem_new.c. Modified: head/lib/libthr/thread/Makefile.inc Modified: head/lib/libthr/thread/Makefile.inc ============================================================================== --- head/lib/libthr/thread/Makefile.inc Tue Jan 5 07:36:02 2010 (r201564) +++ head/lib/libthr/thread/Makefile.inc Tue Jan 5 07:50:31 2010 (r201565) @@ -41,7 +41,6 @@ SRCS+= \ thr_rwlockattr.c \ thr_self.c \ thr_sem.c \ - thr_sem_new.c \ thr_setprio.c \ thr_setschedparam.c \ thr_sig.c \ From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 10:30:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07BF61065670; Tue, 5 Jan 2010 10:30:57 +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 EB4AF8FC23; Tue, 5 Jan 2010 10:30:56 +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 o05AUuJf068839; Tue, 5 Jan 2010 10:30:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05AUuNC068837; Tue, 5 Jan 2010 10:30:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001051030.o05AUuNC068837@svn.freebsd.org> From: Alexander Motin Date: Tue, 5 Jan 2010 10:30:56 +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: r201566 - head/sys/geom/mirror X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 10:30:57 -0000 Author: mav Date: Tue Jan 5 10:30:56 2010 New Revision: 201566 URL: http://svn.freebsd.org/changeset/base/201566 Log: Move wakeup() out of mutex to reduce contention. Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Jan 5 07:50:31 2010 (r201565) +++ head/sys/geom/mirror/g_mirror.c Tue Jan 5 10:30:56 2010 (r201566) @@ -868,8 +868,8 @@ g_mirror_done(struct bio *bp) bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, bp); - wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); + wakeup(sc); } static void @@ -954,9 +954,9 @@ g_mirror_regular_request(struct bio *bp) pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, pbp); + mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); - mtx_unlock(&sc->sc_queue_mtx); } break; case BIO_DELETE: @@ -994,8 +994,8 @@ g_mirror_sync_done(struct bio *bp) bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, bp); - wakeup(sc); mtx_unlock(&sc->sc_queue_mtx); + wakeup(sc); } static void @@ -1107,9 +1107,9 @@ g_mirror_start(struct bio *bp) } mtx_lock(&sc->sc_queue_mtx); bioq_disksort(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); - mtx_unlock(&sc->sc_queue_mtx); } /* From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 10:52:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6970F106566B; Tue, 5 Jan 2010 10:52:21 +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 589F78FC0C; Tue, 5 Jan 2010 10:52:21 +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 o05AqLKI073569; Tue, 5 Jan 2010 10:52:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05AqLwE073567; Tue, 5 Jan 2010 10:52:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001051052.o05AqLwE073567@svn.freebsd.org> From: Alexander Motin Date: Tue, 5 Jan 2010 10:52:21 +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: r201567 - head/sys/geom/raid3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 10:52:21 -0000 Author: mav Date: Tue Jan 5 10:52:21 2010 New Revision: 201567 URL: http://svn.freebsd.org/changeset/base/201567 Log: Move wakeup() out of mutex to reduce contention. Modified: head/sys/geom/raid3/g_raid3.c Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Tue Jan 5 10:30:56 2010 (r201566) +++ head/sys/geom/raid3/g_raid3.c Tue Jan 5 10:52:21 2010 (r201567) @@ -1271,9 +1271,9 @@ g_raid3_done(struct bio *bp) G_RAID3_LOGREQ(3, bp, "Regular request done (error=%d).", bp->bio_error); mtx_lock(&sc->sc_queue_mtx); bioq_insert_head(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); wakeup(&sc->sc_queue); - mtx_unlock(&sc->sc_queue_mtx); } static void @@ -1379,9 +1379,9 @@ g_raid3_sync_done(struct bio *bp) bp->bio_cflags |= G_RAID3_BIO_CFLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); bioq_insert_head(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); wakeup(&sc->sc_queue); - mtx_unlock(&sc->sc_queue_mtx); } static void @@ -1459,9 +1459,9 @@ g_raid3_start(struct bio *bp) } mtx_lock(&sc->sc_queue_mtx); bioq_insert_tail(&sc->sc_queue, bp); + mtx_unlock(&sc->sc_queue_mtx); G_RAID3_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); - mtx_unlock(&sc->sc_queue_mtx); } /* From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 11:00:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C7121065695; Tue, 5 Jan 2010 11:00:32 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BBD08FC19; Tue, 5 Jan 2010 11:00: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 o05B0W5X075411; Tue, 5 Jan 2010 11:00:32 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05B0WF0075409; Tue, 5 Jan 2010 11:00:32 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001051100.o05B0WF0075409@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 5 Jan 2010 11:00: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: r201568 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 11:00:32 -0000 Author: luigi Date: Tue Jan 5 11:00:31 2010 New Revision: 201568 URL: http://svn.freebsd.org/changeset/base/201568 Log: this file does not require ip_dummynet.h Modified: head/sys/netinet/ipfw/ip_fw_pfil.c Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Tue Jan 5 10:52:21 2010 (r201567) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Tue Jan 5 11:00:31 2010 (r201568) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 11:45:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EBC5106566B; Tue, 5 Jan 2010 11:45:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 07BE18FC16; Tue, 5 Jan 2010 11:45:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 6952641C64A; Tue, 5 Jan 2010 12:45:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id ixZBgVAy9d9n; Tue, 5 Jan 2010 12:45:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A2FEF41C67B; Tue, 5 Jan 2010 12:45:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id A8CDA4448EC; Tue, 5 Jan 2010 11:43:06 +0000 (UTC) Date: Tue, 5 Jan 2010 11:43:06 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Luigi Rizzo In-Reply-To: <20100104222323.GA49068@onelab2.iet.unipi.it> Message-ID: <20100105114047.I88477@maildrop.int.zabbadoz.net> References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> <20100104222323.GA49068@onelab2.iet.unipi.it> X-OpenPGP-Key: 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: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 11:45:07 -0000 On Mon, 4 Jan 2010, Luigi Rizzo wrote: > I also think that the name of the new directory or the exact percentage of > ipv4-ness or netinet-ness of the sctp* and tcp* and multicast* stuff > is irrelevant. Moving directories with svn is so easy that we should not > worry even if we need a couple of attempts to find a good name. While moving in SVN is easy we still export to CVS and have a lot (most) of our users on that. Further a move will imho result in a delete and add by the exporter so there'll be a loss in file history there. Also moving it around often will put us into #include <> hell evenetually for everything that is "local" to files rather than a public interface at a well defined place which we'll need to be very carefull of anyway. /bz -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 12:34:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 091BD1065670; Tue, 5 Jan 2010 12:34:14 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E14DA8FC12; Tue, 5 Jan 2010 12:34: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 o05CYDN3096997; Tue, 5 Jan 2010 12:34:13 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05CYDlR096994; Tue, 5 Jan 2010 12:34:13 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001051234.o05CYDlR096994@svn.freebsd.org> From: David Xu Date: Tue, 5 Jan 2010 12:34: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: r201575 - head/tools/regression/posixsem2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 12:34:14 -0000 Author: davidxu Date: Tue Jan 5 12:34:13 2010 New Revision: 201575 URL: http://svn.freebsd.org/changeset/base/201575 Log: Add test code for POSIX semaphore implementation. Added: head/tools/regression/posixsem2/ head/tools/regression/posixsem2/Makefile (contents, props changed) head/tools/regression/posixsem2/semtest.c (contents, props changed) Added: head/tools/regression/posixsem2/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/posixsem2/Makefile Tue Jan 5 12:34:13 2010 (r201575) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG= semtest +SRCS= semtest.c +NO_MAN= + +WARNS?= 3 + +.include Added: head/tools/regression/posixsem2/semtest.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/posixsem2/semtest.c Tue Jan 5 12:34:13 2010 (r201575) @@ -0,0 +1,101 @@ +/* $FreeBSD$ */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SEM_NAME "/semtst" + +int test_unnamed(void); +int test_named(void); + +int +test_unnamed(void) +{ + sem_t *s; + pid_t pid; + int status; + + printf("testing unnamed process-shared semaphore\n"); + s = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, + -1, 0); + if (s == MAP_FAILED) + err(1, "mmap failed"); + if (sem_init(s, 1, 0)) + err(2, "sem_init failed"); + if ((pid = fork()) == 0) { + printf("child: sem_wait()\n"); + if (sem_wait(s)) + err(3, "sem_wait failed"); + printf("child: sem_wait() returned\n"); + exit(0); + } else { + sleep(1); + printf("parent: sem_post()\n"); + if (sem_post(s)) + err(4, "sem_post failed"); + waitpid(pid, &status, 0); + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) + printf("OK.\n"); + else + printf("Failure."); + } + return (0); +} + +int +test_named(void) +{ + sem_t *s, *s2; + pid_t pid; + int status; + + printf("testing named process-shared semaphore\n"); + sem_unlink(SEM_NAME); + s = sem_open(SEM_NAME, O_CREAT, 0777); + if (s == SEM_FAILED) + err(1, "sem_open failed"); + s2 = sem_open(SEM_NAME, O_CREAT, 0777); + if (s2 == SEM_FAILED) + err(2, "second sem_open call failed"); + if (s != s2) + err(3, "two sem_open calls for same semaphore do not returm same address."); + if (sem_close(s2)) + err(4, "sem_close failed"); + if ((pid = fork()) == 0) { + printf("child: sem_wait()\n"); + if (sem_wait(s)) + err(5, "sem_wait failed"); + printf("child: sem_wait() returned\n"); + exit(0); + } else { + sleep(1); + printf("parent: sem_post()\n"); + if (sem_post(s)) + err(6, "sem_post failed"); + waitpid(pid, &status, 0); + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) + printf("OK.\n"); + else + printf("Failure."); + } + + if (sem_close(s)) + err(7, "sem_close failed"); + + return (0); +} + +int +main(void) +{ + test_unnamed(); + test_named(); + return (0); +} From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 13:12:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E6901065692; Tue, 5 Jan 2010 13:12:48 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 23CF58FC0A; Tue, 5 Jan 2010 13:12:48 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id A3D3CC98FC; Tue, 5 Jan 2010 08:12:47 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 05 Jan 2010 08:12:47 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=ZUMiYOGZdN0uX+/d9wujcvHIs6k=; b=SLhOULiyyM3n+i2Fhv/Lg1MCIzKj51aMm75u0+zFajTofUlJV1ziY2qfNYOirvp5xQPyFSOYGRj3ZqrH1eteihPK7lDVtSO+36M2NsxMyaj3A0k9Yrzr+MQsEMX+WDNW3jwKkFOBxIjLjtBiAU++GT5UE/sEC/ZKdShyx3wUzjI= X-Sasl-enc: 50uKqePfFjUGZgBy7bv0IY+f9PoxDKtC658TR4ca7u4T 1262697167 Received: from [192.168.123.18] (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id AAAAD4A6B0F; Tue, 5 Jan 2010 08:12:46 -0500 (EST) Message-ID: <4B433ACB.5040902@incunabulum.net> Date: Tue, 05 Jan 2010 13:12:43 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Luigi Rizzo References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> <20100104222323.GA49068@onelab2.iet.unipi.it> In-Reply-To: <20100104222323.GA49068@onelab2.iet.unipi.it> 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, Michael Tuexen Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 13:12:48 -0000 On 04/01/2010 22:23, Luigi Rizzo wrote: > I also think that the name of the new directory or the exact percentage of > ipv4-ness or netinet-ness of the sctp* and tcp* and multicast* stuff > is irrelevant. Moving directories with svn is so easy that we should not > worry even if we need a couple of attempts to find a good name. > On a related, but different, note: I actually think that the mcast code could have benefitted from C++ style templates. There's a lot of code duplication between the IPv6 and IPv4 versions of those modules. It's the entry points, and argument types, which ultimately mattered, so when integrating the MLD implementation into FreeBSD back last April, I found myself doing 'cp', 'sed', and manual edits mostly to deal with only *slight* semantic differences between IPv4 and IPv6 in the kernel. Having said all that, it seems to me like the netinet/ code overall could do with being split up further into individual files, to make it more manageable. This has sort of already happened as time has gone on. cheers, BMS From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 13:25:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E70971065670; Tue, 5 Jan 2010 13:25:12 +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 BC1DF8FC08; Tue, 5 Jan 2010 13:25:12 +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 o05DPCk3008734; Tue, 5 Jan 2010 13:25:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05DPC1w008731; Tue, 5 Jan 2010 13:25:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001051325.o05DPC1w008731@svn.freebsd.org> From: Alexander Motin Date: Tue, 5 Jan 2010 13:25: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: r201578 - head/sbin/geom/class/raid3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 13:25:13 -0000 Author: mav Date: Tue Jan 5 13:25:12 2010 New Revision: 201578 URL: http://svn.freebsd.org/changeset/base/201578 Log: For completeness, add -s argument, manually specifying array block size. Modified: head/sbin/geom/class/raid3/geom_raid3.c head/sbin/geom/class/raid3/graid3.8 Modified: head/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- head/sbin/geom/class/raid3/geom_raid3.c Tue Jan 5 12:38:35 2010 (r201577) +++ head/sbin/geom/class/raid3/geom_raid3.c Tue Jan 5 13:25:12 2010 (r201578) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_RAID3_VERSION; +static intmax_t default_blocksize = 0; + static void raid3_main(struct gctl_req *req, unsigned f); static void raid3_clear(struct gctl_req *req); static void raid3_dump(struct gctl_req *req); @@ -87,10 +89,11 @@ struct g_command class_commands[] = { { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, { 'r', "round_robin", NULL, G_TYPE_BOOL }, + { 's', "blocksize", &default_blocksize, G_TYPE_NUMBER }, { 'w', "verify", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-hFnrvw] name prov prov prov ..." + NULL, "[-hFnrvw] [-s blocksize] name prov prov prov ..." }, { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] name prov" @@ -190,7 +193,7 @@ raid3_label(struct gctl_req *req) * sectorsizes of every disk and find the smallest mediasize. */ mediasize = 0; - sectorsize = 0; + sectorsize = gctl_get_intmax(req, "blocksize"); for (i = 1; i < nargs; i++) { str = gctl_get_ascii(req, "arg%d", i); msize = g_get_mediasize(str); Modified: head/sbin/geom/class/raid3/graid3.8 ============================================================================== --- head/sbin/geom/class/raid3/graid3.8 Tue Jan 5 12:38:35 2010 (r201577) +++ head/sbin/geom/class/raid3/graid3.8 Tue Jan 5 13:25:12 2010 (r201578) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2006 +.Dd January 5, 2010 .Dt GRAID3 8 .Os .Sh NAME @@ -34,6 +34,7 @@ .Nm .Cm label .Op Fl Fhnrvw +.Op Fl s Ar blocksize .Ar name .Ar prov prov prov ... .Nm @@ -113,6 +114,12 @@ but sequential reads are slower. One cannot use this option if the .Fl w option is also specified. +.It Fl s +Manually specify array block size. Block size will be set equal to least +common multiple of all component's sector sizes and specified value. +Note that array sector size calculated as multiple of block size and number +of regular data components. Big values may decrease performance and compatibility, +as all I/O requests have to be multiple of sector size. .It Fl w Use verify reading feature. When reading from a device in a complete state, also read data from the parity component From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 13:29:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A599106566B; Tue, 5 Jan 2010 13:29:24 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEB68FC08; Tue, 5 Jan 2010 13:29:22 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so542877eye.9 for ; Tue, 05 Jan 2010 05:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=LuUu1Iacu4Vo6QO8gUnq33sl1xrBpzBOsxsU6aRjod0=; b=xvWboMX3wknRm4Ng/Ny1bkx7G8wvoeY3SEE2xj3YPdABAzq6lck3ePygBbcxIccrv3 bBj64f1s7XdtFogOw37IJgKp24nx7O5BF4JfmCQvrMi6wVADctJoWhhEFKrmnfzeEVE6 O0jxshs08janBH9DIk7hED1THPUWhL1EEvG+c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=xVP3/r1brXnTSLrp1Q2R2BIHC4t6HiWvJI6t2/G/gz0S5t9EXAeqjCRgVd27tjc0vq 3xi9WoGRxDeBom03hoVjCadyqJ6hGR9vH/N5ZN/aMUetGl625qp9+6Ayj1AObTTI0h3R ickinRNANhmNKnnq46X+SFaebPbVLNvNRzHRY= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.90.14 with SMTP id d14mr2074711wef.30.1262698159486; Tue, 05 Jan 2010 05:29:19 -0800 (PST) In-Reply-To: <201001050206.o05265Ln053910@svn.freebsd.org> References: <201001050206.o05265Ln053910@svn.freebsd.org> From: Ivan Voras Date: Tue, 5 Jan 2010 14:28:59 +0100 X-Google-Sender-Auth: 7a1f072c25cc3d90 Message-ID: <9bbcef731001050528k5b46b8ect2f9576f7b47e563a@mail.gmail.com> To: Alexander Motin 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: r201545 - head/sys/geom/raid3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 13:29:24 -0000 2010/1/5 Alexander Motin : > Author: mav > Date: Tue Jan =C2=A05 02:06:05 2010 > New Revision: 201545 > URL: http://svn.freebsd.org/changeset/base/201545 > > Log: > =C2=A0Slightly optimize XOR calculation. Linux has an interesting approach to RAID XOR operations - they calculate at boot time which method is faster, from a set of i386, MMX, SSE and the like and then use it for what appears to be every context requiring fast XORs. E.g. http://fxr.watson.org/fxr/source/arch/x86/include/asm/xor_64.h?v=3Dlinux-2.= 6 (I know SIMD instructions would require a FP-enabled kernel, I'm just pointing out an interesting idea) From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 13:51:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12AC5106566C; Tue, 5 Jan 2010 13:51:40 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id C72718FC13; Tue, 5 Jan 2010 13:51:39 +0000 (UTC) Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 13F17C9510; Tue, 5 Jan 2010 08:51:39 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 05 Jan 2010 08:51:39 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=VNHKVE0/kzW3/vA7S5601Wpytv4=; b=mtSR6rcWGpPYpqcNK4at4eetyZE5+qVXk9ukgSYisvnmAgEQDe8/1hg22/EB9eHBeh6/2Jth9lHH2p0i78m2vSGlV/MAaktXowTJIQZIBHb1cyfhmnzNFD3myamICcLuIECdq3Welox8o/p/uFT8dzNkt9S7NHifiCdqSuwOKsE= X-Sasl-enc: 7RV9vN9v7Uqu88UlyAVxR3W42mLCjYs3cAkEaUbVOt6A 1262699498 Received: from [192.168.123.18] (cpc2-dals7-0-0-cust253.hari.cable.virginmedia.com [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 325414A6E6B; Tue, 5 Jan 2010 08:51:38 -0500 (EST) Message-ID: <4B4343E7.1020408@incunabulum.net> Date: Tue, 05 Jan 2010 13:51:35 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: David Xu References: <201001040527.o045RoNN062634@svn.freebsd.org> In-Reply-To: <201001040527.o045RoNN062634@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: r201472 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 13:51:40 -0000 On 04/01/2010 05:27, David Xu wrote: > Log: > Add user-level semaphore synchronous type... > Nice work! Will this be MFC-able to 8.x? A lot of things could benefit from this, especially Boost.Interprocess. cheers, BMS From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 17:13:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12CBC1065676; Tue, 5 Jan 2010 17:13:21 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com [209.85.211.197]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2228FC0C; Tue, 5 Jan 2010 17:13:20 +0000 (UTC) Received: by ywh35 with SMTP id 35so7761527ywh.7 for ; Tue, 05 Jan 2010 09:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=k3bimljpP8/EnSHhT/2WnfAntxnQMjdju44btgez6Ms=; b=hTWu5Yq96FDv00Uq8ancJgMjbWAKhG09iT2C86KTyCEN66TxZ7rIlBkLjmqdFZQ8sT rVclq4E4XDbO7/Lup+GqoXHVlCz02HNzjgcpsYnyiXLyTnJYJ4hsTFq5m9L+Rqdb9Q9/ 0xEHgvErPKmeCmQknB9zyUmqQr5+7r3vlcjps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=u+nIGG7Yw8XGJmxLlaF7QleiEjTk8XEQtMNTIdrrq1CUbBBINlkVSG6o2R2dXVDpgS VKEJMK8Df/w9PpOqFsFz4/nRno80xMu/GfRRxqRDUWqs1MLxq/uYkY/z0zgSxeyTWr21 v7Su/UGKk+9NTq907jNR1qb7LpLocm8K+ll7M= Received: by 10.150.106.19 with SMTP id e19mr20882149ybc.323.1262711593955; Tue, 05 Jan 2010 09:13:13 -0800 (PST) Received: from ?10.68.43.79? ([166.205.5.36]) by mx.google.com with ESMTPS id 4sm6701595ywi.27.2010.01.05.09.13.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Jan 2010 09:13:12 -0800 (PST) References: <201001051234.o05CYDlR096994@svn.freebsd.org> Message-Id: <80B3618B-57A9-4524-B4E1-0955DF291344@gmail.com> From: Garrett Cooper To: David Xu In-Reply-To: <201001051234.o05CYDlR096994@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (7D11) Mime-Version: 1.0 (iPhone Mail 7D11) Date: Tue, 5 Jan 2010 10:12:50 -0700 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r201575 - head/tools/regression/posixsem2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 17:13:21 -0000 Sent from my iPhone On Jan 5, 2010, at 5:34 AM, David Xu wrote: > Author: davidxu > Date: Tue Jan 5 12:34:13 2010 > New Revision: 201575 > URL: http://svn.freebsd.org/changeset/base/201575 > > Log: > Add test code for POSIX semaphore implementation. > > Added: > head/tools/regression/posixsem2/ > head/tools/regression/posixsem2/Makefile (contents, props changed) > head/tools/regression/posixsem2/semtest.c (contents, props changed) > > Added: head/tools/regression/posixsem2/Makefile > === > === > === > ===================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/regression/posixsem2/Makefile Tue Jan 5 12:34:13 > 2010 (r201575) > @@ -0,0 +1,9 @@ > +# $FreeBSD$ > + > +PROG= semtest > +SRCS= semtest.c > +NO_MAN= > + > +WARNS?= 3 > + > +.include > > Added: head/tools/regression/posixsem2/semtest.c > === > === > === > ===================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/regression/posixsem2/semtest.c Tue Jan 5 12:34:13 > 2010 (r201575) > @@ -0,0 +1,101 @@ > +/* $FreeBSD$ */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define SEM_NAME "/semtst" > + > +int test_unnamed(void); > +int test_named(void); > + > +int > +test_unnamed(void) > +{ > + sem_t *s; > + pid_t pid; > + int status; > + > + printf("testing unnamed process-shared semaphore\n"); > + s = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE, > MAP_ANON|MAP_SHARED, > + -1, 0); > + if (s == MAP_FAILED) > + err(1, "mmap failed"); > + if (sem_init(s, 1, 0)) > + err(2, "sem_init failed"); > + if ((pid = fork()) == 0) { > + printf("child: sem_wait()\n"); > + if (sem_wait(s)) > + err(3, "sem_wait failed"); > + printf("child: sem_wait() returned\n"); > + exit(0); > + } else { > + sleep(1); > + printf("parent: sem_post()\n"); > + if (sem_post(s)) > + err(4, "sem_post failed"); > + waitpid(pid, &status, 0); Same as below... > + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) > + printf("OK.\n"); > + else > + printf("Failure."); > + } > + return (0); > +} > + > +int > +test_named(void) > +{ > + sem_t *s, *s2; > + pid_t pid; > + int status; > + > + printf("testing named process-shared semaphore\n"); > + sem_unlink(SEM_NAME); > + s = sem_open(SEM_NAME, O_CREAT, 0777); > + if (s == SEM_FAILED) > + err(1, "sem_open failed"); > + s2 = sem_open(SEM_NAME, O_CREAT, 0777); > + if (s2 == SEM_FAILED) > + err(2, "second sem_open call failed"); > + if (s != s2) > + err(3, "two sem_open calls for same semaphore do not returm > same address."); > + if (sem_close(s2)) > + err(4, "sem_close failed"); > + if ((pid = fork()) == 0) { > + printf("child: sem_wait()\n"); > + if (sem_wait(s)) > + err(5, "sem_wait failed"); > + printf("child: sem_wait() returned\n"); > + exit(0); > + } else { > + sleep(1); > + printf("parent: sem_post()\n"); > + if (sem_post(s)) > + err(6, "sem_post failed"); > + waitpid(pid, &status, 0); waitpid can fail and the status reported could be completely bogus. Maybe this should be the first branch condition (check for == 0) in the if-statement below? > + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) > + printf("OK.\n"); > + else > + printf("Failure."); > + } > + > + if (sem_close(s)) > + err(7, "sem_close failed"); > + > + return (0); > +} > + > +int > +main(void) > +{ > + test_unnamed(); > + test_named(); > + return (0); > +} From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 18:28:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D251065696 for ; Tue, 5 Jan 2010 18:28:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 32EF58FC29 for ; Tue, 5 Jan 2010 18:28:46 +0000 (UTC) Received: (qmail 10663 invoked by uid 399); 5 Jan 2010 18:28:45 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Jan 2010 18:28:45 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B4384E3.2080600@FreeBSD.org> Date: Tue, 05 Jan 2010 10:28:51 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Stanislav Sedov References: <201001040916.o049GZ1Y013061@svn.freebsd.org> In-Reply-To: <201001040916.o049GZ1Y013061@svn.freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB 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: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 18:28:47 -0000 First off, thanks for sorting these, that's a step in the right direction. :) However, a few quibbles. First, our rule is that anything which might offend someone belongs in fortunes-o, and political quotes are always in the category of "might offend someone." (FWIW, neither of these are offensive to me, I'm just pointing out the general procedure.) Second, while it's clear at this point in time who these people are, and what the context is, read through the fortune files sometime and try to place who some of the people referenced are, when the quote was relevant, etc. At minimum the quotes should be dated (IMO). Finally, let's pretend for a second that this is an international project, and not assume that titles like "defense secretary" are meaningful everywhere. :) Oh, and in the Rumsfeld quote you have "there're" twice, and in the actual quote it's spelled out both times, "there are." I would change the citation in the first quote to read: -- United States Secretary of Defense Donald Rumsfeld 12 February 2002 Personally I don't see the need to mention the context, but if you do you could add "... 2002, On the invasion of Iraq" For the second, you could do something like: -- Daniel Fass, Chairman of United States President Barack Obama's financial-industry fundraising party I'll leave finding a date for that quote up to you. :) Doug Stanislav Sedov wrote: > Author: stas > Date: Mon Jan 4 09:16:35 2010 > New Revision: 201477 > URL: http://svn.freebsd.org/changeset/base/201477 > > Log: > - Add two particulary interesting quotes from the past decade. > > Modified: > head/games/fortune/datfiles/fortunes > > Modified: head/games/fortune/datfiles/fortunes > ============================================================================== > --- head/games/fortune/datfiles/fortunes Mon Jan 4 09:02:39 2010 (r201476) > +++ head/games/fortune/datfiles/fortunes Mon Jan 4 09:16:35 2010 (r201477) > @@ -1604,6 +1604,13 @@ friends and family, and then justify thi > for doing it." > -- Bruce Feirstein, "Nice Guys Sleep Alone" > % > + As we know, there are known knowns. There are things we know we > +know. We also know there are known unknowns. That is to say, we know > +there're some things we do not know. But there're also unknown unknowns; > +the ones we don't know we don't know." > + -- Defense Secretary Donald Rumsfeld, > + about the invasion to Iraq. > +% > At a recent meeting in Snowmass, Colorado, a participant from > Los Angeles fainted from hyperoxygenation, and we had to hold his head > under the exhaust of a bus until he revived. > @@ -46372,6 +46379,13 @@ constitutions, displaying the utmost imp > overturning everything. > -- Plato, "Republic", 370 B.C. > % > +The investment community feels very putupon. They feel there is no > +reason why they shouldn't earn $1 million to $200 million a year, > +and they don't want to be held responsible for the global financial > +meltdown. > + -- Daniel Fass, chairman of Obama's > + financial-industry fundraising party > +% > The IQ of the group is the lowest IQ of a member of > the group divided by the number of people in the group. > % > -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 19:40:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B4C9106566B; Tue, 5 Jan 2010 19:40: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 48CC38FC0C; Tue, 5 Jan 2010 19:40:34 +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 o05JeYbU093372; Tue, 5 Jan 2010 19:40:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05JeWZu093370; Tue, 5 Jan 2010 19:40:32 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001051940.o05JeWZu093370@svn.freebsd.org> From: Doug Barton Date: Tue, 5 Jan 2010 19:40: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: r201601 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 19:40:34 -0000 Author: dougb Date: Tue Jan 5 19:40:32 2010 New Revision: 201601 URL: http://svn.freebsd.org/changeset/base/201601 Log: Remove more duplicates Minor reformatting on a few Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Tue Jan 5 19:25:57 2010 (r201600) +++ head/games/fortune/datfiles/fortunes Tue Jan 5 19:40:32 2010 (r201601) @@ -1703,14 +1703,6 @@ the Cat. "Then it doesn't matter which way you go," said the Cat. -- Lewis Carroll % - COMMENT - -Oh, life is a glorious cycle of song, -A medley of extemporanea; -And love is thing that can never go wrong; -And I am Marie of Roumania. - -- Dorothy Parker -% Concerning the war in Vietnam, Senator George Aiken of Vermont noted in January, 1966, "I'm not very keen for doves or hawks. I think we need more owls." @@ -1930,22 +1922,6 @@ Christmas tree. The piano is missing. you rent your home and own Firearms, in which case you can go to level 4. The best way to get to level 3 is egg-nog. % - FIGHTING WORDS - -Say my love is easy had, - Say I'm bitten raw with pride, -Say I am too often sad -- - Still behold me at your side. - -Say I'm neither brave nor young, - Say I woo and coddle care, -Say the devil touched my tongue -- - Still you have my heart to wear. - -But say my verses do not scan, - And I get me another man! - -- Dorothy Parker -% "For I perceive that behind this seemingly unrelated sequence of events, there lurks a singular, sinister attitude of mind." @@ -2217,20 +2193,6 @@ full of money before." "Didn't you see it?" "Damn kid had it under his coat." % - Hug O' War - -I will not play at tug o' war. -I'd rather play at hug o' war, -Where everyone hugs -Instead of tugs, -Where everyone giggles -And rolls on the rug, -Where everyone kisses, -And everyone grins, -And everyone cuddles, -And everyone wins. - -- Shel Silverstein -% Human thinking can skip over a great deal, leap over small misunderstandings, can contain ifs and buts in untroubled corners of the mind. But the machine has no corners. Despite all the attempts to @@ -2684,33 +2646,6 @@ right any day." life-style otherwise." -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % - Insofar as I may be heard by anything, which may or may not care -what I say, I ask, if it matters, that you be forgiven for anything you -may have done or failed to do which requires forgiveness. Conversely, if -not forgiveness but something else may be required to insure any possible -benefit for which you may be eligible after the destruction of your body, -I ask this, whatever it may be, be granted or withheld, as the case may be, -in such a manner as to insure your receiving said benefit. I ask this in my -capacity as your elected intermediary between yourself and that which may -not be yourself, but which may have an interest in the matter of your -receiving as much as it is possible for you to receive of this thing, and -which may in some way be influenced by this ceremony. - Amen. - -- Roger Zelazny, "Creatures of Light and Darkness", 1969 -% - INVENTORY -Four be the things I am wiser to know: -Idleness, sorrow, a friend, and a foe. - -Four be the things I'd been better without: -Love, curiosity, freckles, and doubt. - -Three be the things I shall never attain: -Envy, content, and sufficient champagne. - -Three be the things I shall have till I die: -Laughter and hope and a sock in the eye. -% "Is there any point to which you would wish to draw my attention?" "To the curious incident of the dog in the night-time." "The dog did nothing in the night-time." @@ -3990,28 +3925,6 @@ almost succeeded in getting a VAX to thi organization say that each time the machine fails to think it ceases to exist. % - THE LESSER-KNOWN PROGRAMMING LANGUAGES #5: VALGOL -From its modest beginnings in Southern California's San Fernando Valley, -VALGOL is enjoying a dramatic surge of popularity across the industry. - -Here is a sample program: - LIKE, Y*KNOW(I MEAN)START - IF PIZZA = LIKE BITCHEN AND GUY = LIKE TUBULAR AND - VALLEY GIRL = LIKE GRODY**MAX(FERSURE)**2 THEN - FOR I = LIKE 1 TO OH*MAYBE 100 - DO*WAH - (DITTY**2) - BARF(I)=TOTALLY GROSS(OUT) - SURE - LIKE BAG THIS PROGRAM - REALLY - LIKE TOTALLY (Y*KNOW) - IM*SURE - GOTO THE MALL - -When the user makes a syntax error, the interpreter displays the message: - - GAG ME WITH A SPOON!! -% THE LESSER-KNOWN PROGRAMMING LANGUAGES #8: LAIDBACK This language was developed at the Marin County Center for T'ai Chi, @@ -5342,9 +5255,6 @@ that he didn't force you down on the ask -- A plethora of individuals wither expertise in culinary techniques vitiated the potable concoction produced by steeping certain coupestibles. -- Eleemosynary deeds have their initial incidence intramurally. --- Male cadavers are incapable of yielding testimony. --- Individuals who make their abode in vitreous edifices would be well - advised to refrain from catapulting projectiles. % =============== ALL FRESHMEN PLEASE NOTE =============== @@ -11083,9 +10993,6 @@ Armstrong's Collection Law: If the check is truly in the mail, it is surely made out to someone else. % -Arnold's Addendum: - Anything not fitting into these categories causes cancer in rats. -% Arnold's Laws of Documentation: 1.) If it should exist, it doesn't. 2.) If it does exist, it's out of date. @@ -12661,7 +12568,7 @@ Boren's Laws: (2) When in trouble, delegate. (3) When in doubt, mumble. % -boss, n: +Boss, n: According to the Oxford English Dictionary, in the Middle Ages the words "boss" and "botch" were largely synonymous, except that boss, in addition to meaning "a supervisor of workers" also meant "an @@ -12942,7 +12849,7 @@ wrote the program. Fortunately, the second-to-last bug has just been fixed. -- Ray Simard % -bug, n: +Bug, n: An elusive creature living in a program that makes it incorrect. The activity of "debugging", or removing bugs from a program, ends when people get tired of doing it, not when the bugs are removed. @@ -13531,14 +13438,14 @@ only robust persons doing this thing is others who have tried it. -- Ambrose Bierce, "The Devil's Dictionary" % - -Certain passages in several laws have always defied interpretation and the -most inexplicable must be a matter of opinion. A judge of the Court of -Session of Scotland has sent the editors of this book his candidate which -reads, "In the Nuts (unground), (other than ground nuts) Order, the expression -nuts shall have reference to such nuts, other than ground nuts, as would -but for this amending Order not qualify as nuts (unground) (other than ground -nuts) by reason of their being nuts (unground)." +Certain passages in several laws have always defied interpretation and +the most inexplicable must be a matter of opinion. A judge of the Court +of Session of Scotland has sent the editors of this book his candidate +which reads, "In the Nuts (unground), (other than ground nuts) Order, +the expression nuts shall have reference to such nuts, other than ground +nuts, as would but for this amending Order not qualify as nuts +(unground) (other than ground nuts) by reason of their being nuts +(unground)." -- Guinness Book of World Records, 1973 % Certainly the game is rigged. @@ -15064,17 +14971,6 @@ letter, or even 25 cents on a stamp! so post it as many places as you can. -- Emily Postnews Answers Your Questions on Netiquette % -Dear Sir, - I am firmly opposed to the spread of microchips either to the home or -to the office. We have more than enough of them foisted upon us in public -places. They are a disgusting Americanism, and can only result in the farmers -being forced to grow smaller potatoes, which in turn will cause massive un- -employment in the already severely depressed agricultural industry. - Yours faithfully, - Capt. Quinton D'Arcy, J.P. - Sevenoaks - -- Letters To The Editor, The Times of London -% Death before dishonor. But neither before breakfast. % @@ -17845,9 +17741,6 @@ Finagle's Eleventh Law: it happened according to his pet theory. % Finagle's First Law: - If an experiment works, something has gone wrong. -% -Finagle's First Law: To study a subject best, understand it thoroughly before you start. Finagle's Second Law: @@ -18180,9 +18073,6 @@ For children with short attention spans: For courage mounteth with occasion. -- William Shakespeare, "King John" % -For every action, there is an equal and opposite criticism. - -- Harrison -% For every bloke who makes his mark, there's half a dozen waiting to rub it out. -- Andy Capp @@ -19527,17 +19417,6 @@ Your butt is on the menu And the check is in the mail. -- The Piranha Club Anthem, to the tune of "De Camptown Races" % -From the "Guinness Book of World Records", 1973: - -Certain passages in several laws have always defied interpretation and -the most inexplicable must be a matter of opinion. A judge of the -Court of Session of Scotland has sent the editors of this book his -candidate which reads, "In the Nuts (unground), (other than ground -nuts) Order, the expression nuts shall have reference to such nuts, -other than ground nuts, as would but for this amending Order not -qualify as nuts (unground)(other than ground nuts) by reason of their -being nuts (unground)." -% From the moment I picked your book up until I put it down I was convulsed with laughter. Some day I intend reading it. -- Groucho Marx, from "The Book of Insults" @@ -24042,21 +23921,6 @@ I may not be totally perfect, but parts I met a wonderful new man. He's fictional, but you can't have everything. -- Cecelia, "The Purple Rose of Cairo" % -I met him in a swamp down in Dagobah -Where it bubbles all the time like a giant cabinet soda - S-O-D-A soda -I saw the little runt sitting there on a log -I asked him his name and in a raspy voice he said Yoda - Y-O-D-A Yoda, Yo-Yo-Yo-Yo Yoda - -Well I've been around but I ain't never seen -A guy who looks like a Muppet but he's wrinkled and green - Oh my Yoda, Yo-Yo-Yo-Yo Yoda -Well I'm not dumb but I can't understand -How he can raise me in the air just by raising his hand - Oh my Yoda, Yo-Yo-Yo-Yo Yoda, Yo-Yo-Yo-Yo Yoda - -- The STAR WARS Song, to "Lola", by the Kinks -% I met my latest girl friend in a department store. She was looking at clothes, and I was putting Slinkys on the escalators. -- Steven Wright @@ -24531,10 +24395,6 @@ are worth considering, to wit: "When paying tolls, remember that it is necessary to release the quarter a full 3 seconds before passing the basket if you are traveling more than 60 MPH." - -[110.13]: - "When traveling on a one-way street, stay to the right, so as not - to interfere with oncoming traffic." % I suppose some of the variation between Boston drivers and the rest of the country is due to the progressive Massachusetts Driver Education Manual which @@ -24628,12 +24488,6 @@ I think that I shall never see A billboard lovely as a tree. Indeed, unless the billboards fall I'll never see a tree at all. - -- Nash -% -I think that I shall never see -A billboard lovely as a tree. -Perhaps, unless the billboards fall -I'll never see a tree at all. -- Ogden Nash % I think that I shall never see @@ -25899,21 +25753,6 @@ this is the case, then programmers stand software engineers dig each other's graves. -- Unknown % -If I have seen farther than others, it is because I was standing on the -shoulders of giants. - -- Isaac Newton - -In the sciences, we are now uniquely privileged to sit side by side -with the giants on whose shoulders we stand. - -- Gerald Holton - -If I have not seen as far as others, it is because giants were standing -on my shoulders. - -- Hal Abelson - -In computer science, we stand on each other's feet. - -- Brian K. Reid -% If I have to lay an egg for my country, I'll do it. -- Bob Hope % @@ -37641,7 +37480,7 @@ Pardo's First Postulate: fattening. Arnold's Addendum: - Everything else causes cancer in rats. + Anything not fitting into these categories causes cancer in rats. % Parents often talk about the younger generation as if they didn't have much of anything to do with it. @@ -39438,10 +39277,6 @@ A: A dope ring. Q: Why do blondes put their hair in ponytails? A: To cover up the valve stem. - -Q: Why did the blonde get so excited after she finished her jigsaw - puzzle in only 6 months? -A: Because on the box it said "From 2-4 years". % Q: What do you call a blind pre-historic animal? A: Diyathinkhesaurus. @@ -41474,25 +41309,6 @@ Spock: Affirmative. Kirk: Mr. Sulu, go to pass two. Sulu: Aye aye, sir, going to pass two. % -Scratch the disks, dump the core, Shut it down, pull the plug -Roll the tapes across the floor, Give the core an extra tug -And the system is going to crash. And the system is going to crash. -Teletypes smashed to bits. Mem'ry cards, one and all, -Give the scopes some nasty hits Toss out halfway down the hall -And the system is going to crash. And the system is going to crash. -And we've also found Just flip one switch -When you turn the power down, And the lights will cease to twitch -You turn the disk readers into trash. And the tape drives will crumble -Oh, it's so much fun, in a flash. -Now the CPU won't run When the CPU -And the system is going to crash. Can print nothing out but "foo," - The system is going to crash. - -- To The Caissons Go Rolling Along -% -Scratch the disks! -Drop the core! -Roll the tapes across the floor! -% Screw up your courage! You've screwed up everything else. % Scribline, n.: @@ -46676,7 +46492,8 @@ often turn to a related (but infinitely % THE LESSER-KNOWN PROGRAMMING LANGUAGES #14 -- VALGOL - VALGOL is enjoying a dramatic surge of popularity across the + From its modest beginnings in Southern California's San Fernando +Valley VALGOL is enjoying a dramatic surge of popularity across the industry. VALGOL commands include REALLY, LIKE, WELL, and Y*KNOW. Variables are assigned with the =LIKE and =TOTALLY operators. Other operators include the "California booleans", AX and NOWAY. Loops are @@ -48383,9 +48200,6 @@ and peculiar sort of voluntary thinking. The solution of this problem is trivial and is left as an exercise for the reader. % -The solution to a problem changes the nature of the problem. - -- Peer -% The somewhat old and crusty vicar was taking a well-earned retirement from his rather old and crusty parish. As is usual in these cases, a locum was sent to cover the transition period. This particular man was young and @@ -52054,7 +51868,7 @@ yourself and that which may have an inte as much as it is possible for you to receive of this thing, and which may in some way be influenced by this ceremony. Amen. - -- Roger Zelazny, "Creatures of Light and Darkness" + -- Roger Zelazny, "Creatures of Light and Darkness", 1969 % To understand a program you must become both the machine and the program. % @@ -56803,22 +56617,6 @@ I'd LOVE to, but... -- I'm teaching my ferret to yodel. -- My crayons all melted together. % -Why I Can't Go Out With You: - -I'd LOVE to, but ... - -- I have to floss my cat. - -- I've dedicated my life to linguini. - -- I need to spend more time with my blender. - -- it wouldn't be fair to the other Beautiful People. - -- it's my night to pet the dog/ferret/goldfish. - -- I'm going downtown to try on some gloves. - -- I have to check the freshness dates on my dairy products. - -- I'm going down to the bakery to watch the buns rise. - -- I have an appointment with a cuticle specialist. - -- I have some really hard words to look up. - -- I've got a Friends of the Lowly Rutabaga meeting. - -- I promised to help a friend fold road maps. -% Why is it called a funny bone when it hurts so much? % Why is it taking so long for her to bring out all the good in you? @@ -57873,9 +57671,6 @@ a private eye. Yeah, there are more important things in life than money, but they won't go out with you if you don't have any. % -YEAR: - A period of three hundred and sixty-five disappointments. -% Year Name James Bond Book ---- -------------------------------- -------------- ---- 50's James Bond TV Series Barry Nelson From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:17:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00291106568F; Tue, 5 Jan 2010 20:17:13 +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 E3A3F8FC25; Tue, 5 Jan 2010 20:17: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 o05KHDRt001569; Tue, 5 Jan 2010 20:17:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KHDmw001567; Tue, 5 Jan 2010 20:17:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001052017.o05KHDmw001567@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 5 Jan 2010 20:17: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: r201602 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:17:14 -0000 Author: kib Date: Tue Jan 5 20:17:13 2010 New Revision: 201602 URL: http://svn.freebsd.org/changeset/base/201602 Log: Move scandir(3) and alphasort(3) into XSI namespace. Noted and reviewed by: bde MFC after: 2 weeks Modified: head/include/dirent.h Modified: head/include/dirent.h ============================================================================== --- head/include/dirent.h Tue Jan 5 19:40:32 2010 (r201601) +++ head/include/dirent.h Tue Jan 5 20:17:13 2010 (r201602) @@ -93,9 +93,11 @@ typedef void * DIR; #ifndef _KERNEL __BEGIN_DECLS +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700 +int alphasort(const struct dirent **, const struct dirent **); +#endif #if __BSD_VISIBLE DIR *__opendir2(const char *, int); -int alphasort(const struct dirent **, const struct dirent **); int getdents(int, char *, int); int getdirentries(int, char *, int, long *); #endif @@ -107,7 +109,7 @@ struct dirent * int readdir_r(DIR *, struct dirent *, struct dirent **); #endif void rewinddir(DIR *); -#if __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)); From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:18:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE4FE106568B; Tue, 5 Jan 2010 20:18:41 +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 9D8188FC0A; Tue, 5 Jan 2010 20:18:41 +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 o05KIf7G001902; Tue, 5 Jan 2010 20:18:41 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KIfIa001900; Tue, 5 Jan 2010 20:18:41 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001052018.o05KIfIa001900@svn.freebsd.org> From: Christian Brueffer Date: Tue, 5 Jan 2010 20:18: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: r201603 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:18:41 -0000 Author: brueffer Date: Tue Jan 5 20:18:41 2010 New Revision: 201603 URL: http://svn.freebsd.org/changeset/base/201603 Log: Fix a double free(). PR: 142339 Submitted by: Henning Petersen MFC after: 2 weeks Modified: head/lib/libc/rpc/getnetpath.c Modified: head/lib/libc/rpc/getnetpath.c ============================================================================== --- head/lib/libc/rpc/getnetpath.c Tue Jan 5 20:17:13 2010 (r201602) +++ head/lib/libc/rpc/getnetpath.c Tue Jan 5 20:18:41 2010 (r201603) @@ -101,7 +101,7 @@ setnetpath() if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { free(np_sessionp); syslog (LOG_ERR, "rpc: failed to open " NETCONFIG); - goto failed; + return (NULL); } np_sessionp->valid = NP_VALID; np_sessionp->ncp_list = NULL; From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:20:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 377D11065676; Tue, 5 Jan 2010 20:20:32 +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 1BE898FC17; Tue, 5 Jan 2010 20:20: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 o05KKWhL002340; Tue, 5 Jan 2010 20:20:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KKVEp002337; Tue, 5 Jan 2010 20:20:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001052020.o05KKVEp002337@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 5 Jan 2010 20:20: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: r201604 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:20:32 -0000 Author: kib Date: Tue Jan 5 20:20:31 2010 New Revision: 201604 URL: http://svn.freebsd.org/changeset/base/201604 Log: Do not rely on behaviour undefined by ANSI C, use thunks to adapt alphasort-like interface to the comparision function required by qsort() and qsort_r(). For opendir() thunk and alphasort(), comment on why we deviated from POSIX by using strcmp() instead of strcoll(). Requested and reviewed by: bde MFC after: 2 weeks Modified: head/lib/libc/gen/opendir.c head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Tue Jan 5 20:18:41 2010 (r201603) +++ head/lib/libc/gen/opendir.c Tue Jan 5 20:20:31 2010 (r201604) @@ -93,6 +93,18 @@ __opendir2(const char *name, int flags) } /* + * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for + * directory entries ordering. Use local copy that uses strcmp(). + */ +static int +opendir_alphasort(const void *p1, const void *p2) +{ + + return (strcmp((*(const struct dirent **)p1)->d_name, + (*(const struct dirent **)p2)->d_name)); +} + +/* * Common routine for opendir(3), __opendir2(3) and fdopendir(3). */ static DIR * @@ -240,8 +252,8 @@ __opendir_common(int fd, const char *nam /* * This sort must be stable. */ - mergesort(dpv, n, sizeof(*dpv), (int (*)(const - void *, const void *))alphasort); + mergesort(dpv, n, sizeof(*dpv), + opendir_alphasort); dpv[n] = NULL; xp = NULL; Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Tue Jan 5 20:18:41 2010 (r201603) +++ head/lib/libc/gen/scandir.c Tue Jan 5 20:20:31 2010 (r201604) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +static int alphasort_thunk(void *thunk, const void *p1, const void *p2); + /* * The DIRSIZ macro is the minimum record length which will hold the directory * entry. This requires the amount of space in struct dirent without the @@ -109,8 +111,8 @@ scandir(const char *dirname, struct dire } closedir(dirp); if (nitems && dcomp != NULL) - qsort(names, nitems, sizeof(struct dirent *), - (int (*)(const void *, const void *))dcomp); + qsort_r(names, nitems, sizeof(struct dirent *), + &dcomp, alphasort_thunk); *namelist = names; return (nitems); @@ -124,6 +126,12 @@ fail: /* * Alphabetic order comparison routine for those who want it. + * + * XXXKIB POSIX 2008 requires the alphasort() to use strcoll(). Keep + * strcmp() for now, since environment locale settings could have no + * relevance for the byte sequence of the file name. Moreover, it + * might be even invalid sequence in current locale, and then + * behaviour of alphasort would be undefined. */ int alphasort(const struct dirent **d1, const struct dirent **d2) @@ -131,3 +139,12 @@ alphasort(const struct dirent **d1, cons return (strcmp((*d1)->d_name, (*d2)->d_name)); } + +static int +alphasort_thunk(void *thunk, const void *p1, const void *p2) +{ + int (*dc)(const struct dirent **, const struct dirent **); + + dc = *(int (**)(const struct dirent **, const struct dirent **))thunk; + return (dc((const struct dirent **)p1, (const struct dirent **)p2)); +} From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:29:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E4A91065672; Tue, 5 Jan 2010 20:29:31 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D63A8FC18; Tue, 5 Jan 2010 20:29:31 +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 o05KTVqv004352; Tue, 5 Jan 2010 20:29:31 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KTVVA004350; Tue, 5 Jan 2010 20:29:31 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201001052029.o05KTVVA004350@svn.freebsd.org> From: Mitsuru IWASAKI Date: Tue, 5 Jan 2010 20:29: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: r201605 - head/sys/dev/acpi_support X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:29:31 -0000 Author: iwasaki Date: Tue Jan 5 20:29:30 2010 New Revision: 201605 URL: http://svn.freebsd.org/changeset/base/201605 Log: Update acpi_ibm syctl nodes on resume. This should fix some Thinkpad specific problems such as connecting to a headphone jack is not functional on X41. Reviewed by: takawata MFC after: 1 week Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Tue Jan 5 20:20:31 2010 (r201604) +++ head/sys/dev/acpi_support/acpi_ibm.c Tue Jan 5 20:29:30 2010 (r201605) @@ -255,6 +255,7 @@ ACPI_SERIAL_DECL(ibm, "ACPI IBM extras") static int acpi_ibm_probe(device_t dev); static int acpi_ibm_attach(device_t dev); static int acpi_ibm_detach(device_t dev); +static int acpi_ibm_resume(device_t dev); static void ibm_led(void *softc, int onoff); static void ibm_led_task(struct acpi_ibm_softc *sc, int pending __unused); @@ -273,6 +274,7 @@ static device_method_t acpi_ibm_methods[ DEVMETHOD(device_probe, acpi_ibm_probe), DEVMETHOD(device_attach, acpi_ibm_attach), DEVMETHOD(device_detach, acpi_ibm_detach), + DEVMETHOD(device_resume, acpi_ibm_resume), {0, 0} }; @@ -435,6 +437,34 @@ acpi_ibm_detach(device_t dev) } static int +acpi_ibm_resume(device_t dev) +{ + struct acpi_ibm_softc *sc = device_get_softc(dev); + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + ACPI_SERIAL_BEGIN(ibm); + for (int i = 0; acpi_ibm_sysctls[i].name != NULL; i++) { + int val; + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_RD) == 0) { + continue; + } + + val = acpi_ibm_sysctl_get(sc, i); + + if ((acpi_ibm_sysctls[i].access & CTLFLAG_WR) == 0) { + continue; + } + + acpi_ibm_sysctl_set(sc, i, val); + } + ACPI_SERIAL_END(ibm); + + return (0); +} + +static int acpi_ibm_eventmask_set(struct acpi_ibm_softc *sc, int val) { ACPI_OBJECT arg[2]; From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:32:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E35381065696; Tue, 5 Jan 2010 20:32:08 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D278A8FC0A; Tue, 5 Jan 2010 20:32:08 +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 o05KW8GB004987; Tue, 5 Jan 2010 20:32:08 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KW8fU004984; Tue, 5 Jan 2010 20:32:08 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001052032.o05KW8fU004984@svn.freebsd.org> From: David Malone Date: Tue, 5 Jan 2010 20: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: r201606 - head/usr.bin/ctags X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:32:09 -0000 Author: dwmalone Date: Tue Jan 5 20:32:08 2010 New Revision: 201606 URL: http://svn.freebsd.org/changeset/base/201606 Log: Change a char that is used as an index into an array into an unisgned char. Add a missing new style function definition. Modified: head/usr.bin/ctags/ctags.c head/usr.bin/ctags/fortran.c Modified: head/usr.bin/ctags/ctags.c ============================================================================== --- head/usr.bin/ctags/ctags.c Tue Jan 5 20:29:30 2010 (r201605) +++ head/usr.bin/ctags/ctags.c Tue Jan 5 20:32:08 2010 (r201606) @@ -244,7 +244,7 @@ void init(void) { int i; - const char *sp; + const unsigned char *sp; for (i = 0; i < 256; i++) { _wht[i] = _etk[i] = _itk[i] = _btk[i] = NO; Modified: head/usr.bin/ctags/fortran.c ============================================================================== --- head/usr.bin/ctags/fortran.c Tue Jan 5 20:29:30 2010 (r201605) +++ head/usr.bin/ctags/fortran.c Tue Jan 5 20:32:08 2010 (r201606) @@ -52,7 +52,7 @@ static void takeprec(void); char *lbp; /* line buffer pointer */ int -PF_funcs() +PF_funcs(void) { bool pfcnt; /* pascal/fortran functions found */ char *cp; From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:40:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A82810656A8; Tue, 5 Jan 2010 20:40:41 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDD728FC26; Tue, 5 Jan 2010 20:40:40 +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 o05Keehb006929; Tue, 5 Jan 2010 20:40:40 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KeeaP006927; Tue, 5 Jan 2010 20:40:40 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001052040.o05KeeaP006927@svn.freebsd.org> From: David Malone Date: Tue, 5 Jan 2010 20:40: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: r201608 - head/usr.sbin/cdcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:40:41 -0000 Author: dwmalone Date: Tue Jan 5 20:40:40 2010 New Revision: 201608 URL: http://svn.freebsd.org/changeset/base/201608 Log: New style function definitions. Fix constness problem - don't know that pstatus won't change a string with no whitespace. Modified: head/usr.sbin/cdcontrol/cdcontrol.c Modified: head/usr.sbin/cdcontrol/cdcontrol.c ============================================================================== --- head/usr.sbin/cdcontrol/cdcontrol.c Tue Jan 5 20:38:59 2010 (r201607) +++ head/usr.sbin/cdcontrol/cdcontrol.c Tue Jan 5 20:40:40 2010 (r201608) @@ -152,7 +152,7 @@ __const char *strstatus(int); static u_int dbprog_discid(void); __const char *cdcontrol_prompt(void); -void help () +void help (void) { struct cmdtab *c; const char *s; @@ -178,7 +178,7 @@ void help () printf ("\tThe plain target address is taken as a synonym for play.\n"); } -void usage () +void usage (void) { fprintf (stderr, "usage: cdcontrol [-sv] [-f device] [command ...]\n"); exit (1); @@ -413,8 +413,11 @@ int run (int cmd, char *arg) if (fd < 0 && !open_cd ()) return (0); - if (! strlen (arg)) - return pstatus ("volume"); + if (! strlen (arg)) { + char volume[] = "volume"; + + return pstatus (volume); + } if (! strncasecmp (arg, "left", strlen(arg))) return ioctl (fd, CDIOCSETLEFT); @@ -899,7 +902,7 @@ dbprog_sum(int n) * The integer disc ID. */ static u_int -dbprog_discid() +dbprog_discid(void) { struct ioc_toc_header h; int rc; @@ -930,7 +933,7 @@ dbprog_discid() return((n % 0xff) << 24 | t << 8 | ntr); } -int cdid () +int cdid (void) { u_int id; @@ -1130,7 +1133,7 @@ int status (int *trk, int *min, int *sec } const char * -cdcontrol_prompt() +cdcontrol_prompt(void) { return ("cdcontrol> "); } @@ -1249,7 +1252,7 @@ char *parse (char *buf, int *cmd) return p; } -int open_cd () +int open_cd (void) { char devbuf[MAXPATHLEN]; const char *dev; From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:42:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DAED1065692; Tue, 5 Jan 2010 20:42:25 +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 5CA678FC15; Tue, 5 Jan 2010 20:42:25 +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 o05KgP2E007357; Tue, 5 Jan 2010 20:42:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KgPQ6007353; Tue, 5 Jan 2010 20:42:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001052042.o05KgPQ6007353@svn.freebsd.org> From: John Baldwin Date: Tue, 5 Jan 2010 20:42: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: r201609 - in head/sys/dev: cardbus pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:42:25 -0000 Author: jhb Date: Tue Jan 5 20:42:25 2010 New Revision: 201609 URL: http://svn.freebsd.org/changeset/base/201609 Log: Move the PCI-specific logic of removing a cardbus device into a pci_delete_child() function called by the cardbus driver. The new function uses resource_list_unreserve() to release the BARs decoded by the device being removed. Reviewed by: imp Tested by: brooks Modified: head/sys/dev/cardbus/cardbus.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_private.h Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Tue Jan 5 20:40:40 2010 (r201608) +++ head/sys/dev/cardbus/cardbus.c Tue Jan 5 20:42:25 2010 (r201609) @@ -80,8 +80,6 @@ static void cardbus_driver_added(device_ static int cardbus_probe(device_t cbdev); static int cardbus_read_ivar(device_t cbdev, device_t child, int which, uintptr_t *result); -static void cardbus_release_all_resources(device_t cbdev, - struct cardbus_devinfo *dinfo); /************************************************************************/ /* Probe/Attach */ @@ -226,16 +224,11 @@ cardbus_detach_card(device_t cbdev) for (tmp = 0; tmp < numdevs; tmp++) { struct cardbus_devinfo *dinfo = device_get_ivars(devlist[tmp]); - int status = device_get_state(devlist[tmp]); if (dinfo->pci.cfg.dev != devlist[tmp]) device_printf(cbdev, "devinfo dev mismatch\n"); - if (status == DS_ATTACHED || status == DS_BUSY) - device_detach(devlist[tmp]); - cardbus_release_all_resources(cbdev, dinfo); cardbus_device_destroy(dinfo); - device_delete_child(cbdev, devlist[tmp]); - pci_freecfg((struct pci_devinfo *)dinfo); + pci_delete_child(cbdev, devlist[tmp]); } POWER_DISABLE_SOCKET(device_get_parent(cbdev), cbdev); free(devlist, M_TEMP); @@ -283,28 +276,6 @@ cardbus_driver_added(device_t cbdev, dri free(devlist, M_TEMP); } -static void -cardbus_release_all_resources(device_t cbdev, struct cardbus_devinfo *dinfo) -{ - struct resource_list_entry *rle; - device_t dev; - - /* Turn off access to resources we're about to free */ - dev = dinfo->pci.cfg.dev; - pci_write_config(dev, PCIR_COMMAND, - pci_read_config(dev, PCIR_COMMAND, 2) & - ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN), 2); - /* Free all allocated resources */ - STAILQ_FOREACH(rle, &dinfo->pci.resources, link) { - if (rle->res) { - BUS_RELEASE_RESOURCE(device_get_parent(cbdev), - cbdev, rle->type, rle->rid, rle->res); - rle->res = NULL; - } - } - resource_list_free(&dinfo->pci.resources); -} - /************************************************************************/ /* Other Bus Methods */ /************************************************************************/ Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue Jan 5 20:40:40 2010 (r201608) +++ head/sys/dev/pci/pci.c Tue Jan 5 20:42:25 2010 (r201609) @@ -3797,6 +3797,46 @@ pci_deactivate_resource(device_t dev, de } void +pci_delete_child(device_t dev, device_t child) +{ + struct resource_list_entry *rle; + struct resource_list *rl; + struct pci_devinfo *dinfo; + + dinfo = device_get_ivars(child); + rl = &dinfo->resources; + + if (device_is_attached(child)) + device_detach(child); + + /* Turn off access to resources we're about to free */ + pci_write_config(child, PCIR_COMMAND, pci_read_config(child, + PCIR_COMMAND, 2) & ~(PCIM_CMD_MEMEN | PCIM_CMD_PORTEN), 2); + + /* Free all allocated resources */ + STAILQ_FOREACH(rle, rl, link) { + if (rle->res) { + if (rman_get_flags(rle->res) & RF_ACTIVE || + resource_list_busy(rl, rle->type, rle->rid)) { + pci_printf(&dinfo->cfg, + "Resource still owned, oops. " + "(type=%d, rid=%d, addr=%lx)\n", + rle->type, rle->rid, + rman_get_start(rle->res)); + bus_release_resource(child, rle->type, rle->rid, + rle->res); + } + resource_list_unreserve(rl, dev, child, rle->type, + rle->rid); + } + } + resource_list_free(rl); + + device_delete_child(dev, child); + pci_freecfg(dinfo); +} + +void pci_delete_resource(device_t dev, device_t child, int type, int rid) { struct pci_devinfo *dinfo; Modified: head/sys/dev/pci/pci_private.h ============================================================================== --- head/sys/dev/pci/pci_private.h Tue Jan 5 20:40:40 2010 (r201608) +++ head/sys/dev/pci/pci_private.h Tue Jan 5 20:42:25 2010 (r201609) @@ -43,6 +43,7 @@ void pci_add_children(device_t dev, int void pci_add_child(device_t bus, struct pci_devinfo *dinfo); void pci_add_resources(device_t bus, device_t dev, int force, uint32_t prefetchmask); +void pci_delete_child(device_t dev, device_t child); void pci_driver_added(device_t dev, driver_t *driver); int pci_print_child(device_t dev, device_t child); void pci_probe_nomatch(device_t dev, device_t child); From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 20:53:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7631065692; Tue, 5 Jan 2010 20:53:56 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 111548FC17; Tue, 5 Jan 2010 20:53:56 +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 o05Krt1Y010091; Tue, 5 Jan 2010 20:53:55 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05Krtmh010089; Tue, 5 Jan 2010 20:53:55 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001052053.o05Krtmh010089@svn.freebsd.org> From: David Malone Date: Tue, 5 Jan 2010 20:53: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: r201610 - head/usr.bin/xlint/xlint X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:53:56 -0000 Author: dwmalone Date: Tue Jan 5 20:53:55 2010 New Revision: 201610 URL: http://svn.freebsd.org/changeset/base/201610 Log: 1) Make usage() as dead2 - it helps the compiler know that some vars are not used uninitialised. 2) Fix some constness problems. 3) Avoid a signedness problem by casting to size_t. If bn != stuff, than stuff-1-bn should be > 0. Modified: head/usr.bin/xlint/xlint/xlint.c Modified: head/usr.bin/xlint/xlint/xlint.c ============================================================================== --- head/usr.bin/xlint/xlint/xlint.c Tue Jan 5 20:42:25 2010 (r201609) +++ head/usr.bin/xlint/xlint/xlint.c Tue Jan 5 20:53:55 2010 (r201610) @@ -135,7 +135,7 @@ static char *concat3(const char *, const static void terminate(int) __attribute__((__noreturn__)); static const char *lbasename(const char *, int); static void appdef(char ***, const char *); -static void usage(void); +static void usage(void) __dead2; static void fname(const char *); static void runchild(const char *, char *const *, const char *, int); static void findlibs(char *const *); @@ -304,11 +304,12 @@ int main(int argc, char *argv[]) { int c; - char flgbuf[3], *tmp, *s; + char flgbuf[3], *s; + const char *tmp; size_t len; if ((tmp = getenv("TMPDIR")) == NULL || (len = strlen(tmp)) == 0) { - tmpdir = xstrdup(_PATH_TMP); + tmpdir = _PATH_TMP; } else { s = xmalloc(len + 2); (void)sprintf(s, "%s%s", tmp, tmp[len - 1] == '/' ? "" : "/"); @@ -555,9 +556,9 @@ main(int argc, char *argv[]) terminate(0); if (!oflag) { - if ((s = getenv("LIBDIR")) == NULL || strlen(s) == 0) - s = PATH_LINTLIB; - appcstrg(&libsrchpath, s); + if ((tmp = getenv("LIBDIR")) == NULL || strlen(tmp) == 0) + tmp = PATH_LINTLIB; + appcstrg(&libsrchpath, tmp); findlibs(libs); findlibs(deflibs); } @@ -620,7 +621,7 @@ fname(const char *name) return; } ofn = xmalloc(strlen(bn) + (bn == suff ? 4 : 2)); - len = bn == suff ? strlen(bn) : (suff - 1) - bn; + len = bn == suff ? strlen(bn) : (size_t)((suff - 1) - bn); (void)sprintf(ofn, "%.*s", (int)len, bn); (void)strcat(ofn, ".ln"); } else { From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 21:00:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D4A10656AA; Tue, 5 Jan 2010 21:00:24 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 446678FC14; Tue, 5 Jan 2010 21:00: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 o05L0OXj011654; Tue, 5 Jan 2010 21:00:24 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05L0OQx011652; Tue, 5 Jan 2010 21:00:24 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001052100.o05L0OQx011652@svn.freebsd.org> From: David Malone Date: Tue, 5 Jan 2010 21:00: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: r201611 - head/usr.bin/w X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 21:00:24 -0000 Author: dwmalone Date: Tue Jan 5 21:00:23 2010 New Revision: 201611 URL: http://svn.freebsd.org/changeset/base/201611 Log: Shuffle parens to avoid type-punning warning. Modified: head/usr.bin/w/w.c Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Tue Jan 5 20:53:55 2010 (r201610) +++ head/usr.bin/w/w.c Tue Jan 5 21:00:23 2010 (r201611) @@ -118,7 +118,7 @@ struct entry { struct kinfo_proc *dkp; /* debug option proc list */ } *ep, *ehead = NULL, **nextp = &ehead; -#define debugproc(p) *((struct kinfo_proc **)&(p)->ki_udata) +#define debugproc(p) *(&((struct kinfo_proc *)p)->ki_udata) #define W_DISPUSERSIZE 10 #define W_DISPLINESIZE 8 From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 21:10:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A036106568B; Tue, 5 Jan 2010 21:10:00 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2078FC12; Tue, 5 Jan 2010 21:10:00 +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 o05LA0pT013817; Tue, 5 Jan 2010 21:10:00 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05L9xdr013816; Tue, 5 Jan 2010 21:09:59 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001052109.o05L9xdr013816@svn.freebsd.org> From: David Malone Date: Tue, 5 Jan 2010 21: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: r201612 - head/usr.bin/tcopy X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 21:10:00 -0000 Author: dwmalone Date: Tue Jan 5 21:09:59 2010 New Revision: 201612 URL: http://svn.freebsd.org/changeset/base/201612 Log: 1) Mark usage as dead2. 2) Deregister. 3) New style function definitions. Some WARNS still remain here - some printf format warning on some arches and the compiler can't see that a variable should always be initialised. Modified: head/usr.bin/tcopy/tcopy.c Modified: head/usr.bin/tcopy/tcopy.c ============================================================================== --- head/usr.bin/tcopy/tcopy.c Tue Jan 5 21:00:23 2010 (r201611) +++ head/usr.bin/tcopy/tcopy.c Tue Jan 5 21:09:59 2010 (r201612) @@ -70,17 +70,15 @@ FILE *msg; void *getspace(int); void intr(int); -static void usage(void); +static void usage(void) __dead2; void verify(int, int, char *); void writeop(int, int); void rewind_tape(int); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { - register int lastnread, nread, nw, inp, outp; + int lastnread, nread, nw, inp, outp; enum {READ, VERIFY, COPY, COPYVERIFY} op = READ; sig_t oldsig; int ch, needeof; @@ -227,12 +225,10 @@ r1: guesslen = 0; } void -verify(inp, outp, outb) - register int inp, outp; - register char *outb; +verify(int inp, int outp, char *outb) { - register int eot, inmaxblk, inn, outmaxblk, outn; - register char *inb; + int eot, inmaxblk, inn, outmaxblk, outn; + char *inb; inb = getspace(maxblk); inmaxblk = outmaxblk = maxblk; @@ -281,8 +277,7 @@ r2: if (inn != outn) { } void -intr(signo) - int signo __unused; +intr(int signo __unused) { if (record) { if (record - lastrec > 1) @@ -296,8 +291,7 @@ intr(signo) } void * -getspace(blk) - int blk; +getspace(int blk) { void *bp; @@ -307,8 +301,7 @@ getspace(blk) } void -writeop(fd, type) - int fd, type; +writeop(int fd, int type) { struct mtop op; @@ -319,7 +312,7 @@ writeop(fd, type) } static void -usage() +usage(void) { fprintf(stderr, "usage: tcopy [-cvx] [-s maxblk] [src [dest]]\n"); exit(1); From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 21:14:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E184106568B; Tue, 5 Jan 2010 21:14:49 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F14178FC08; Tue, 5 Jan 2010 21:14:48 +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 o05LEmHJ014919; Tue, 5 Jan 2010 21:14:48 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05LEmmR014916; Tue, 5 Jan 2010 21:14:48 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001052114.o05LEmmR014916@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 5 Jan 2010 21:14: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: r201613 - head/games/pom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 21:14:49 -0000 Author: edwin Date: Tue Jan 5 21:14:48 2010 New Revision: 201613 URL: http://svn.freebsd.org/changeset/base/201613 Log: Be able to specify a certain date and/or time for which to calculate the phase of the moon. While not worlds best improvements, it will help calendar(1) later on. Modified: head/games/pom/pom.6 head/games/pom/pom.c Modified: head/games/pom/pom.6 ============================================================================== --- head/games/pom/pom.6 Tue Jan 5 21:09:59 2010 (r201612) +++ head/games/pom/pom.6 Tue Jan 5 21:14:48 2010 (r201613) @@ -32,15 +32,34 @@ .\" @(#)pom.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.TH POM 6 "May 31, 1993" +.Dd May 31, 1993 +.Dt POM 6 .UC 7 -.SH NAME -pom \- display the phase of the moon -.SH SYNOPSIS -.B pom -.SH DESCRIPTION +.Sh NAME +.Nm pom +.Nd display the phase of the moon +.Sh SYNOPSIS +.Nm +.Op Fl d Ar yyyy.mm.dd +.Op Fl t Ar hh:mm:ss +.Sh DESCRIPTION The -.I pom +.Nm utility displays the current phase of the moon. Useful for selecting software completion target dates and predicting managerial behavior. +.Pp +Use the arguments +.Fl d +and +.Fl o +to specify a specific date and time for which the phase of the moon +has to be calculated. +If +.Fl d +but not +.Fl t +has been specified, it will calculate the phase of the moon on that +day at midnight. +.Sh SEE ALSO +`Practical Astronomy with Your Calculator' by Duffett-Smith. Modified: head/games/pom/pom.c ============================================================================== --- head/games/pom/pom.c Tue Jan 5 21:09:59 2010 (r201612) +++ head/games/pom/pom.c Tue Jan 5 21:14:48 2010 (r201613) @@ -57,9 +57,13 @@ __FBSDID("$FreeBSD$"); * */ -#include #include +#include #include +#include +#include +#include +#include #ifndef PI #define PI 3.14159265358979323846 @@ -76,20 +80,62 @@ __FBSDID("$FreeBSD$"); static void adj360(double *); static double dtor(double); static double potm(double); +static void usage(char *progname); int -main(void) +main(int argc, char **argv) { time_t tt; - struct tm *GMT; + struct tm GMT, tmd; double days, today, tomorrow; int cnt; + char *odate = NULL, *otime = NULL, ch; + + while ((ch = getopt(argc, argv, "d:t:")) != -1) + switch (ch) { + case 'd': + odate = optarg; + break; + case 't': + otime = optarg; + break; + default: + usage(argv[0]); + } + + argc -= optind; + argv += optind; + + if (argc) + usage(argv[0]); - (void) time(&tt); - GMT = gmtime(&tt); - days = (GMT->tm_yday + 1) + ((GMT->tm_hour + - (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0); - for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt) + /* Adjust based on users preferences */ + time(&tt); + if (otime != NULL || odate != NULL) { + /* Save today in case -d isn't specified */ + localtime_r(&tt, &tmd); + + if (odate != NULL) { + tmd.tm_year = strtol(odate, NULL, 10) - 1900; + tmd.tm_mon = strtol(odate + 5, NULL, 10) - 1; + tmd.tm_mday = strtol(odate + 8, NULL, 10); + /* Use midnight as the middle of the night */ + tmd.tm_hour = 0; + tmd.tm_min = 0; + tmd.tm_sec = 0; + } + if (otime != NULL) { + tmd.tm_hour = strtol(otime, NULL, 10); + tmd.tm_min = strtol(otime + 3, NULL, 10); + tmd.tm_sec = strtol(otime + 6, NULL, 10); + } + tt = mktime(&tmd); + } + + gmtime_r(&tt, &GMT); + days = (GMT.tm_yday + 1) + ((GMT.tm_hour + + (GMT.tm_min / 60.0) + (GMT.tm_sec / 3600.0)) / 24.0); + for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) days += isleap(1900 + cnt) ? 366 : 365; today = potm(days) + .5; (void)printf("The Moon is "); @@ -160,6 +206,7 @@ potm(double days) static double dtor(double deg) { + return(deg * PI / 180); } @@ -170,6 +217,7 @@ dtor(double deg) static void adj360(double *deg) { + for (;;) if (*deg < 0) *deg += 360; @@ -178,3 +226,11 @@ adj360(double *deg) else break; } + +static void +usage(char *progname) +{ + + fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname); + exit(EX_USAGE); +} From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 23:00:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF82106566C; Tue, 5 Jan 2010 23:00:00 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D85418FC15; Tue, 5 Jan 2010 22:59:59 +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 o05Mxx6k039073; Tue, 5 Jan 2010 22:59:59 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05MxxGB039071; Tue, 5 Jan 2010 22:59:59 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001052259.o05MxxGB039071@svn.freebsd.org> From: Rui Paulo Date: Tue, 5 Jan 2010 22:59: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: r201620 - head/sys/dev/if_ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 23:00:00 -0000 Author: rpaulo Date: Tue Jan 5 22:59:59 2010 New Revision: 201620 URL: http://svn.freebsd.org/changeset/base/201620 Log: Add net80211 media status reporting. PR: 142197 Submitted by: Paul Modified: head/sys/dev/if_ndis/if_ndis.c Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Tue Jan 5 22:53:20 2010 (r201619) +++ head/sys/dev/if_ndis/if_ndis.c Tue Jan 5 22:59:59 2010 (r201620) @@ -189,6 +189,7 @@ static int ndis_set_offload (struct ndis static void ndis_getstate_80211 (struct ndis_softc *); static void ndis_setstate_80211 (struct ndis_softc *); static void ndis_auth_and_assoc (struct ndis_softc *, struct ieee80211vap *); +static void ndis_media_status (struct ifnet *, struct ifmediareq *); static int ndis_set_cipher (struct ndis_softc *, int); static int ndis_set_wpa (struct ndis_softc *, void *, int); static int ndis_add_key (struct ieee80211vap *, @@ -993,7 +994,7 @@ ndis_vap_create(struct ieee80211com *ic, vap->iv_newstate = ndis_newstate; /* complete setup */ - ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); + ieee80211_vap_attach(vap, ieee80211_media_change, ndis_media_status); ic->ic_opmode = opmode; /* install key handing routines */ vap->iv_key_set = ndis_add_key; @@ -2237,6 +2238,23 @@ ndis_set_wpa(sc, ie, ielen) } static void +ndis_media_status(struct ifnet *ifp, struct ifmediareq *imr) +{ + struct ieee80211vap *vap = ifp->if_softc; + struct ndis_softc *sc = vap->iv_ic->ic_ifp->if_softc; + uint32_t txrate; + size_t len; + + if (!NDIS_INITIALIZED(sc)) + return; + + len = sizeof(txrate); + if (ndis_get_info(sc, OID_GEN_LINK_SPEED, &txrate, &len) == 0) + vap->iv_bss->ni_txrate = txrate / 5000; + ieee80211_media_status(ifp, imr); +} + +static void ndis_setstate_80211(sc) struct ndis_softc *sc; { @@ -2696,13 +2714,6 @@ ndis_getstate_80211(sc) bs->nwbx_ssid.ns_ssidlen); ni->ni_esslen = bs->nwbx_ssid.ns_ssidlen; - len = sizeof(arg); - rval = ndis_get_info(sc, OID_GEN_LINK_SPEED, &arg, &len); - if (rval) - device_printf(sc->ndis_dev, "get link speed failed: %d\n", - rval); - ni->ni_txrate = arg / 5000; - if (ic->ic_caps & IEEE80211_C_PMGT) { len = sizeof(arg); rval = ndis_get_info(sc, OID_802_11_POWER_MODE, &arg, &len); From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 23:23:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915F5106566C; Tue, 5 Jan 2010 23:23:17 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 82E218FC14; Tue, 5 Jan 2010 23:23:16 +0000 (UTC) Received: from orion.SpringDaemons.com (adsl-99-48-191-9.dsl.snfc21.sbcglobal.net [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 3F9368FC51; Wed, 6 Jan 2010 02:23:15 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id AA4AA39C24; Tue, 5 Jan 2010 15:23:00 -0800 (PST) Date: Tue, 5 Jan 2010 15:23:00 -0800 From: Stanislav Sedov To: Doug Barton Message-Id: <20100105152300.eb7a66d1.stas@FreeBSD.org> In-Reply-To: <4B4384E3.2080600@FreeBSD.org> References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon 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: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 23:23:17 -0000 On Tue, 05 Jan 2010 10:28:51 -0800 Doug Barton mentioned: > First off, thanks for sorting these, that's a step in the right > direction. :) However, a few quibbles. First, our rule is that > anything which might offend someone belongs in fortunes-o, and > political quotes are always in the category of "might offend someone." > (FWIW, neither of these are offensive to me, I'm just pointing out the > general procedure.) > > Second, while it's clear at this point in time who these people are, > and what the context is, read through the fortune files sometime and > try to place who some of the people referenced are, when the quote was > relevant, etc. At minimum the quotes should be dated (IMO). > > Finally, let's pretend for a second that this is an international > project, and not assume that titles like "defense secretary" are > meaningful everywhere. :) > > Oh, and in the Rumsfeld quote you have "there're" twice, and in the > actual quote it's spelled out both times, "there are." > > I would change the citation in the first quote to read: > > -- United States Secretary of Defense Donald Rumsfeld > 12 February 2002 > Personally I don't see the need to mention the context, but if you do > you could add "... 2002, On the invasion of Iraq" > > For the second, you could do something like: > > -- Daniel Fass, Chairman of United States President > Barack Obama's financial-industry fundraising party > I'll leave finding a date for that quote up to you. :) > Thanks for suggestions! What's regarding the "there're" spelling --- I'm not sure what the correct version is: I took this quote from the San Francisco Chronicle newspaper, and it saved the original spelling. -- Stanislav Sedov ST4096-RIPE From owner-svn-src-head@FreeBSD.ORG Tue Jan 5 23:35:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDBEF106566B; Tue, 5 Jan 2010 23:35:45 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7468FC08; Tue, 5 Jan 2010 23:35:45 +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 o05NZjM2047820; Tue, 5 Jan 2010 23:35:45 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05NZiEC047787; Tue, 5 Jan 2010 23:35:44 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201001052335.o05NZiEC047787@svn.freebsd.org> From: Stanislav Sedov Date: Tue, 5 Jan 2010 23:35: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: r201626 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 23:35:46 -0000 Author: stas Date: Tue Jan 5 23:35:43 2010 New Revision: 201626 URL: http://svn.freebsd.org/changeset/base/201626 Log: - Move potentially offensive quotes I committed recently to fortunes-o. - Reference date. - Be more clear on context. Suggested by: dougb Modified: head/games/fortune/datfiles/fortunes head/games/fortune/datfiles/fortunes-o.real Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Tue Jan 5 23:33:29 2010 (r201625) +++ head/games/fortune/datfiles/fortunes Tue Jan 5 23:35:43 2010 (r201626) @@ -1604,13 +1604,6 @@ friends and family, and then justify thi for doing it." -- Bruce Feirstein, "Nice Guys Sleep Alone" % - As we know, there are known knowns. There are things we know we -know. We also know there are known unknowns. That is to say, we know -there're some things we do not know. But there're also unknown unknowns; -the ones we don't know we don't know." - -- Defense Secretary Donald Rumsfeld, - about the invasion to Iraq. -% At a recent meeting in Snowmass, Colorado, a participant from Los Angeles fainted from hyperoxygenation, and we had to hold his head under the exhaust of a bus until he revived. @@ -46195,13 +46188,6 @@ constitutions, displaying the utmost imp overturning everything. -- Plato, "Republic", 370 B.C. % -The investment community feels very putupon. They feel there is no -reason why they shouldn't earn $1 million to $200 million a year, -and they don't want to be held responsible for the global financial -meltdown. - -- Daniel Fass, chairman of Obama's - financial-industry fundraising party -% The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. % Modified: head/games/fortune/datfiles/fortunes-o.real ============================================================================== --- head/games/fortune/datfiles/fortunes-o.real Tue Jan 5 23:33:29 2010 (r201625) +++ head/games/fortune/datfiles/fortunes-o.real Tue Jan 5 23:35:43 2010 (r201626) @@ -663,6 +663,13 @@ posh hotel. "Why, yes, young man," said the gentleman. "Would you bring me a postcard?" % + As we know, there are known knowns. There are things we know we +know. We also know there are known unknowns. That is to say, we know +there're some things we do not know. But there're also unknown unknowns; +the ones we don't know we don't know." + -- United States Secretary of Defense Donald Rumsfeld + 12 February 2002, on the invasion to Iraq. +% "Are pirates an ethnic group? Or are they just people who burn illegal cds?" "Arrrr! We prefer to be called Buccaneer-Americans." @@ -12873,6 +12880,14 @@ Contraception", has been withdrawn after pull it out at the last minute. -- Not the Nine O'Clock News % +The investment community feels very putupon. They feel there is no +reason why they shouldn't earn $1 million to $200 million a year, +and they don't want to be held responsible for the global financial +meltdown. + -- Daniel Fass, Chairman of United States President + Barack Obama's financial-industry fundraising party + 20 October 2009 +% The king arranged a regal marriage for his daughter -- a bond that would unite two great kingdoms. Yet, because the young couple seemed so formal to each other, he posted a spy outside the royal wedding chamber and demanded a full From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 00:03:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 394C21065676 for ; Wed, 6 Jan 2010 00:03:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id D68308FC19 for ; Wed, 6 Jan 2010 00:03:13 +0000 (UTC) Received: (qmail 6157 invoked by uid 399); 6 Jan 2010 00:03:13 -0000 Received: from localhost (HELO ?192.168.0.110?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 6 Jan 2010 00:03:13 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B43D346.4020900@FreeBSD.org> Date: Tue, 05 Jan 2010 16:03:18 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Stanislav Sedov References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <20100105152300.eb7a66d1.stas@FreeBSD.org> In-Reply-To: <20100105152300.eb7a66d1.stas@FreeBSD.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB 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: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 00:03:14 -0000 Stanislav Sedov wrote: > Thanks for suggestions! And thank you for making the changes. :) > What's regarding the "there're" spelling --- I'm not sure what the > correct version is: I took this quote from the San Francisco > Chronicle newspaper, and it saved the original spelling. Couple of things regarding that. First, "there're" is very far from being a common English construction, especially in formal speech such as the context of this quote. Second, I found numerous citations that have it spelled out on line, I didn't find any that had the contraction (although I admit that I did not do an exhaustive search). Finally, the chronicle is not who I would choose to be objective in regards to a quotation from someone with whom they share an opposite political viewpoint. :) In regards to what you appended to the date, "On" would be fine, after thinking about it "Regarding" would probably be more clear. Either way it should be capitalized. The "to" should definitely be changed to "of" however, for proper English'ification. I'm happy to make the changes if you'd rather, since I realize that it's annoying having to fix grammar nits, especially about something as trivial as the fortune files. :) Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 00:20:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B0221065692; Wed, 6 Jan 2010 00:20:37 +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 5A7558FC15; Wed, 6 Jan 2010 00:20:37 +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 o060Kbc9057780; Wed, 6 Jan 2010 00:20:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o060Kbbw057778; Wed, 6 Jan 2010 00:20:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001060020.o060Kbbw057778@svn.freebsd.org> From: Xin LI Date: Wed, 6 Jan 2010 00:20: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: r201627 - head/games/pom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 00:20:37 -0000 Author: delphij Date: Wed Jan 6 00:20:37 2010 New Revision: 201627 URL: http://svn.freebsd.org/changeset/base/201627 Log: Fix build: getopt() returns int so use an integer to get the value. Modified: head/games/pom/pom.c Modified: head/games/pom/pom.c ============================================================================== --- head/games/pom/pom.c Tue Jan 5 23:35:43 2010 (r201626) +++ head/games/pom/pom.c Wed Jan 6 00:20:37 2010 (r201627) @@ -88,8 +88,8 @@ main(int argc, char **argv) time_t tt; struct tm GMT, tmd; double days, today, tomorrow; - int cnt; - char *odate = NULL, *otime = NULL, ch; + int ch, cnt; + char *odate = NULL, *otime = NULL; while ((ch = getopt(argc, argv, "d:t:")) != -1) switch (ch) { From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 00:25:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E2D3106566B; Wed, 6 Jan 2010 00:25:05 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id DC6A38FC1B; Wed, 6 Jan 2010 00:25:04 +0000 (UTC) Received: from orion.SpringDaemons.com (unknown [99.48.191.9]) by mx0.deglitch.com (Postfix) with ESMTPA id 520EE8FC4E; Wed, 6 Jan 2010 03:25:03 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id EEFBB39C24; Tue, 5 Jan 2010 16:24:47 -0800 (PST) Date: Tue, 5 Jan 2010 16:24:47 -0800 From: Stanislav Sedov To: Doug Barton Message-Id: <20100105162447.7deac6d7.stas@FreeBSD.org> In-Reply-To: <4B43D346.4020900@FreeBSD.org> References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <20100105152300.eb7a66d1.stas@FreeBSD.org> <4B43D346.4020900@FreeBSD.org> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Tue__5_Jan_2010_16_24_47_-0800_.By98Nb8oPcr5+BP" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 00:25:05 -0000 --Signature=_Tue__5_Jan_2010_16_24_47_-0800_.By98Nb8oPcr5+BP Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 05 Jan 2010 16:03:18 -0800 Doug Barton mentioned: > Stanislav Sedov wrote: > > Thanks for suggestions! >=20 > And thank you for making the changes. :) >=20 > > What's regarding the "there're" spelling --- I'm not sure what the > > correct version is: I took this quote from the San Francisco > > Chronicle newspaper, and it saved the original spelling. >=20 > Couple of things regarding that. First, "there're" is very far from > being a common English construction, especially in formal speech such > as the context of this quote. Second, I found numerous citations that > have it spelled out on line, I didn't find any that had the > contraction (although I admit that I did not do an exhaustive search). > Finally, the chronicle is not who I would choose to be objective in > regards to a quotation from someone with whom they share an opposite > political viewpoint. :) Yeah, true :-) >=20 > In regards to what you appended to the date, "On" would be fine, after > thinking about it "Regarding" would probably be more clear. Either way > it should be capitalized. The "to" should definitely be changed to > "of" however, for proper English'ification. Hmm, I'm not by any means the English language expert [just learning], but isn't "invasion of" in this context is somewhat vague? I mean, from what I see from dictionaries "invasion of smth" could mean both the action by smth, and action against smth. Is "invasion to" grammatically incorrect? BTW, why it should be capitalized, it's not a start of a sentence? >=20 > I'm happy to make the changes if you'd rather, since I realize that > it's annoying having to fix grammar nits, especially about something > as trivial as the fortune files. :) >=20 Yeah, please do. I'm clearly not competent enough at this area. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Tue__5_Jan_2010_16_24_47_-0800_.By98Nb8oPcr5+BP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJLQ9hPAAoJEL8lojEJL9nwgzAP/1Te58ZNxo6/AyBaZ+jHS3vv WNaoxc/Cow0MIwEZMYuq4vdb5eSG4FcxbokPys1mUE7Xn4ISmW2xtHY1FU8zRHUZ sUnIb9dFCKslXMfERAnIP5qq0006BCr6VLmnIEKopOf2nloDo5turVKSyV3acOiY BbDnFfWTn04hfUfcVB8ciolUmKBNMl2mSpHEpEQ2HGDyIiYGxDIqL1JaEgSDziGX BOPZQdu30YBQ8rTgxfRQmn0s3nmJlm/rzqKCi1PRxq7XAm0MHLpmk29MJ3MAdwHU XzVtXN3Xk91vkM0ywQDlnE1p3RUVlz4sMs0BOQP1l+MGtfQJfEBwaon5eKPsjlsW shvyIQh93n3Oum8VCI20DgGh3TNI8ShGCnygmrxlI1nSBOqo7I3QuVMmUkGIYqTJ UYSeTa3Zuiga6phtRq0c56CcwT1RLHGOmDwrUfPJiB4PnwkgJDRMId3KJJD7B19T CGI6gvonCaQMOduShp9ogqe2CgvfDWAi3Y1HTtVmcqKixefTLxQmZodxOxZBXPCo CU49Rd+djm2EUiJaLvQMAJeZ1/DGI3e0bUZQw+8CiO6iIoT456m4KMGia/sGmIJ7 C7TQDXHwkhNY+vINMzEZipHQ8FGXp45ESKcg9JgPASXC+oCRnEqAJcEjp7VQCCIc VMoX1gvlqly3yonozKu7 =+Jem -----END PGP SIGNATURE----- --Signature=_Tue__5_Jan_2010_16_24_47_-0800_.By98Nb8oPcr5+BP-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 00:49:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1A411065694; Wed, 6 Jan 2010 00:49:47 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 868F38FC16; Wed, 6 Jan 2010 00:49:47 +0000 (UTC) Received: from apple.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o060njKx099376; Wed, 6 Jan 2010 00:49:46 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4B43DE29.3070206@freebsd.org> Date: Wed, 06 Jan 2010 08:49:45 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20080612) MIME-Version: 1.0 To: Bruce Simpson References: <201001040527.o045RoNN062634@svn.freebsd.org> <4B4343E7.1020408@incunabulum.net> In-Reply-To: <4B4343E7.1020408@incunabulum.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: r201472 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 00:49:47 -0000 Bruce Simpson wrote: > On 04/01/2010 05:27, David Xu wrote: >> Log: >> Add user-level semaphore synchronous type... >> > > Nice work! Will this be MFC-able to 8.x? > A lot of things could benefit from this, especially Boost.Interprocess. > > cheers, > BMS > > This is MFC-able. ;-) From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 04:11:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B04951065672; Wed, 6 Jan 2010 04:11:18 +0000 (UTC) Date: Wed, 6 Jan 2010 04:11:18 +0000 From: Alexey Dokuchaev To: Stanislav Sedov Message-ID: <20100106041118.GA91881@FreeBSD.org> References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <20100105152300.eb7a66d1.stas@FreeBSD.org> <4B43D346.4020900@FreeBSD.org> <20100105162447.7deac6d7.stas@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20100105162447.7deac6d7.stas@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 04:11:18 -0000 On Tue, Jan 05, 2010 at 04:24:47PM -0800, Stanislav Sedov wrote: > from what I see from dictionaries "invasion of smth" could mean both > the action by smth, and action against smth. Is "invasion to" > grammatically incorrect? I'm far from being an expert either, but invasion is clearly "of". It can help to think of embracing, not intrusion. Also, simple Google check for "invasion of" vs. "invasion to" kinda proves the point. ./danfe P.S. OK, I admit, I'm too drunk to give technically-backed answer; "of" just sounds right to me. From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 06:35:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D6511065694; Wed, 6 Jan 2010 06:35:11 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F13198FC0C; Wed, 6 Jan 2010 06:35:10 +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 o066ZAU7040887; Wed, 6 Jan 2010 06:35:10 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o066ZArO040885; Wed, 6 Jan 2010 06:35:10 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001060635.o066ZArO040885@svn.freebsd.org> From: Tim Kientzle Date: Wed, 6 Jan 2010 06:35: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: r201630 - head/usr.bin/unzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 06:35:11 -0000 Author: kientzle Date: Wed Jan 6 06:35:10 2010 New Revision: 201630 URL: http://svn.freebsd.org/changeset/base/201630 Log: When restoring files, use the mode for the mode. Thanks to: Jun Kuriyama for pointing this out Modified: head/usr.bin/unzip/unzip.c Modified: head/usr.bin/unzip/unzip.c ============================================================================== --- head/usr.bin/unzip/unzip.c Wed Jan 6 05:58:07 2010 (r201629) +++ head/usr.bin/unzip/unzip.c Wed Jan 6 06:35:10 2010 (r201630) @@ -383,7 +383,7 @@ extract_dir(struct archive *a, struct ar { int mode; - mode = archive_entry_filetype(e) & 0777; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0755; @@ -425,7 +425,7 @@ extract_file(struct archive *a, struct a ssize_t len; unsigned char *p, *q, *end; - mode = archive_entry_filetype(e) & 0777; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0644; mtime = archive_entry_mtime(e); From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 13:13:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 479D81065672; Wed, 6 Jan 2010 13:13:15 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3729A8FC0C; Wed, 6 Jan 2010 13:13:15 +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 o06DDFdc033235; Wed, 6 Jan 2010 13:13:15 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06DDFaP033233; Wed, 6 Jan 2010 13:13:15 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001061313.o06DDFaP033233@svn.freebsd.org> From: Rui Paulo Date: Wed, 6 Jan 2010 13:13: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: r201644 - head/sys/dev/if_ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 13:13:15 -0000 Author: rpaulo Date: Wed Jan 6 13:13:14 2010 New Revision: 201644 URL: http://svn.freebsd.org/changeset/base/201644 Log: len must be int, not size_t Submitted by: novel Modified: head/sys/dev/if_ndis/if_ndis.c Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Wed Jan 6 12:43:59 2010 (r201643) +++ head/sys/dev/if_ndis/if_ndis.c Wed Jan 6 13:13:14 2010 (r201644) @@ -2243,7 +2243,7 @@ ndis_media_status(struct ifnet *ifp, str struct ieee80211vap *vap = ifp->if_softc; struct ndis_softc *sc = vap->iv_ic->ic_ifp->if_softc; uint32_t txrate; - size_t len; + int len; if (!NDIS_INITIALIZED(sc)) return; From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 13:14:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B70F7106566B; Wed, 6 Jan 2010 13:14:37 +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 9CCA38FC12; Wed, 6 Jan 2010 13:14:37 +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 o06DEbxf033570; Wed, 6 Jan 2010 13:14:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06DEb8t033566; Wed, 6 Jan 2010 13:14:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001061314.o06DEb8t033566@svn.freebsd.org> From: Alexander Motin Date: Wed, 6 Jan 2010 13:14: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: r201645 - in head/sys/geom: . part uzip X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 13:14:37 -0000 Author: mav Date: Wed Jan 6 13:14:37 2010 New Revision: 201645 URL: http://svn.freebsd.org/changeset/base/201645 Log: Change the way in which zero stripesize is handled. Instead of reporting zero stripeoffset in such case (as if device has no stripes), report offset from the beginning of the media (as if device has single infinite stripe). This gives partitioning tools information, required to guess better partition alignment, in case if hardware doesn't report it's stripe size. For example, it should give disklabel info about odd offset made by fdisk. Modified: head/sys/geom/geom_slice.c head/sys/geom/part/g_part.c head/sys/geom/uzip/g_uzip.c Modified: head/sys/geom/geom_slice.c ============================================================================== --- head/sys/geom/geom_slice.c Wed Jan 6 13:13:14 2010 (r201644) +++ head/sys/geom/geom_slice.c Wed Jan 6 13:14:37 2010 (r201645) @@ -393,10 +393,10 @@ g_slice_config(struct g_geom *gp, u_int pp = g_new_providerf(gp, sbuf_data(sb)); pp2 = LIST_FIRST(&gp->consumer)->provider; pp->flags = pp2->flags & G_PF_CANDELETE; - if (pp2->stripesize > 0) { - pp->stripesize = pp2->stripesize; - pp->stripeoffset = (pp2->stripeoffset + offset) % pp->stripesize; - } + pp->stripesize = pp2->stripesize; + pp->stripeoffset = pp2->stripeoffset + offset; + if (pp->stripesize > 0) + pp->stripeoffset %= pp->stripesize; if (0 && bootverbose) printf("GEOM: Configure %s, start %jd length %jd end %jd\n", pp->name, (intmax_t)offset, (intmax_t)length, Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Wed Jan 6 13:13:14 2010 (r201644) +++ head/sys/geom/part/g_part.c Wed Jan 6 13:14:37 2010 (r201645) @@ -288,11 +288,10 @@ g_part_new_provider(struct g_geom *gp, s entry->gpe_pp->mediasize -= entry->gpe_offset - offset; entry->gpe_pp->sectorsize = pp->sectorsize; entry->gpe_pp->flags = pp->flags & G_PF_CANDELETE; - if (pp->stripesize > 0) { - entry->gpe_pp->stripesize = pp->stripesize; - entry->gpe_pp->stripeoffset = (pp->stripeoffset + - entry->gpe_offset) % pp->stripesize; - } + entry->gpe_pp->stripesize = pp->stripesize; + entry->gpe_pp->stripeoffset = pp->stripeoffset + entry->gpe_offset; + if (pp->stripesize > 0) + entry->gpe_pp->stripeoffset %= pp->stripesize; g_error_provider(entry->gpe_pp, 0); } Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Wed Jan 6 13:13:14 2010 (r201644) +++ head/sys/geom/uzip/g_uzip.c Wed Jan 6 13:14:37 2010 (r201645) @@ -467,10 +467,8 @@ g_uzip_taste(struct g_class *mp, struct pp2->sectorsize = 512; pp2->mediasize = (off_t)sc->nblocks * sc->blksz; pp2->flags = pp->flags & G_PF_CANDELETE; - if (pp->stripesize > 0) { - pp2->stripesize = pp->stripesize; - pp2->stripeoffset = pp->stripeoffset; - } + pp2->stripesize = pp->stripesize; + pp2->stripeoffset = pp->stripeoffset; g_error_provider(pp2, 0); g_access(cp, -1, 0, 0); From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 13:49:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EDC21065693; Wed, 6 Jan 2010 13:49:44 +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 2452C8FC18; Wed, 6 Jan 2010 13:49:44 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 54C411FFC22; Wed, 6 Jan 2010 13:49:43 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 1EB7C8448E; Wed, 6 Jan 2010 14:49:43 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Stanislav Sedov References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <20100105152300.eb7a66d1.stas@FreeBSD.org> <4B43D346.4020900@FreeBSD.org> <20100105162447.7deac6d7.stas@FreeBSD.org> Date: Wed, 06 Jan 2010 14:49:42 +0100 In-Reply-To: <20100105162447.7deac6d7.stas@FreeBSD.org> (Stanislav Sedov's message of "Tue, 5 Jan 2010 16:24:47 -0800") Message-ID: <86fx6jgx6x.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) 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, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 13:49:44 -0000 Stanislav Sedov writes: > Hmm, I'm not by any means the English language expert [just learning], > but isn't "invasion of" in this context is somewhat vague? I mean, > from what I see from dictionaries "invasion of smth" could mean both > the action by smth, and action against smth. Is "invasion to" > grammatically incorrect? Either "the invasion of Iraq by the US" or "the US invasion of Iraq". Never "to". DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 14:01:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FDA1065679; Wed, 6 Jan 2010 14:01:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B99F88FC0A; Wed, 6 Jan 2010 14:01:28 +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 o06E1SkO044016; Wed, 6 Jan 2010 14:01:28 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06E1SbJ044014; Wed, 6 Jan 2010 14:01:28 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001061401.o06E1SbJ044014@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 6 Jan 2010 14:01: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: r201647 - head/sbin/dumpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 14:01:28 -0000 Author: gavin Date: Wed Jan 6 14:01:28 2010 New Revision: 201647 URL: http://svn.freebsd.org/changeset/base/201647 Log: Print leading zeros in the UFS2 FSID. PR: bin/142155 Submitted by: Efstratios Karatzas gpf.kira gmail.com Approved by: ed (mentor) MFC after: 2 weeks Modified: head/sbin/dumpfs/dumpfs.c Modified: head/sbin/dumpfs/dumpfs.c ============================================================================== --- head/sbin/dumpfs/dumpfs.c Wed Jan 6 13:56:49 2010 (r201646) +++ head/sbin/dumpfs/dumpfs.c Wed Jan 6 14:01:28 2010 (r201647) @@ -160,7 +160,7 @@ dumpfs(const char *name) fstime = afs.fs_old_time; printf("magic\t%x (UFS1)\ttime\t%s", afs.fs_magic, ctime(&fstime)); - printf("id\t[ %x %x ]\n", afs.fs_id[0], afs.fs_id[1]); + printf("id\t[ %08x %08x ]\n", afs.fs_id[0], afs.fs_id[1]); printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n", afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize); break; From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 14:13:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6627D1065694; Wed, 6 Jan 2010 14:13:58 +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 24E798FC1D; Wed, 6 Jan 2010 14:13:58 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 2DF5D1FFC22; Wed, 6 Jan 2010 14:13:57 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E7099844C2; Wed, 6 Jan 2010 15:13:56 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Doug Barton References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> Date: Wed, 06 Jan 2010 15:13:56 +0100 In-Reply-To: <4B4384E3.2080600@FreeBSD.org> (Doug Barton's message of "Tue, 05 Jan 2010 10:28:51 -0800") Message-ID: <867hrvgw2j.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 14:13:58 -0000 Doug Barton writes: > First off, thanks for sorting these, that's a step in the right > direction. :) However, a few quibbles. First, our rule is that > anything which might offend someone belongs in fortunes-o, and > political quotes are always in the category of "might offend someone." I don't see how the Rumsfeld quote could offend anyone. True, Rumsfeld is a politician (and not a particularly popular one in most parts of the world), but the quote itself is not political. It is a somewhat comically worded expression of an important truism that many people would do well to remember (cf. the classical "there are no unknown bugs in our software"). Would you have suggested moving it to -o if it had been a Steve Martin quote? The Fass quote is more borderline. I guess shys^H^H^H^Hinvestment bankers might take offense. > Personally I don't see the need to mention the context, but if you do > you could add "... 2002, On the invasion of Iraq" Like you say, "of", and not "to" which is what was committed. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 17:12:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D621065679; Wed, 6 Jan 2010 17:12:18 +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 72F7E8FC17; Wed, 6 Jan 2010 17:12:18 +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 o06HCIAW087129; Wed, 6 Jan 2010 17:12:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06HCICF087127; Wed, 6 Jan 2010 17:12:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001061712.o06HCICF087127@svn.freebsd.org> From: Alexander Motin Date: Wed, 6 Jan 2010 17:12:18 +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: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 17:12:18 -0000 Author: mav Date: Wed Jan 6 17:12:18 2010 New Revision: 201658 URL: http://svn.freebsd.org/changeset/base/201658 Log: Increase default block size from 4K to 64K. It was reduces 6 yeard ago, when trees were big and FAST mode was enabled by default. So small block size doesn't benefits linear I/O operations in FAST and significantly slowdowns in ECONOMIC (default) mode. For single stream random I/Os so small block doesn't give much benefits, as access time is usually bigger then transfer time there. Same time it requires all heads to seek together for every single request, reducing performance on parallel load. Modified: head/sbin/geom/class/stripe/geom_stripe.c Modified: head/sbin/geom/class/stripe/geom_stripe.c ============================================================================== --- head/sbin/geom/class/stripe/geom_stripe.c Wed Jan 6 16:56:31 2010 (r201657) +++ head/sbin/geom/class/stripe/geom_stripe.c Wed Jan 6 17:12:18 2010 (r201658) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); uint32_t lib_version = G_LIB_VERSION; uint32_t version = G_STRIPE_VERSION; -static intmax_t default_stripesize = 4096; +static intmax_t default_stripesize = 65536; static void stripe_main(struct gctl_req *req, unsigned flags); static void stripe_clear(struct gctl_req *req); From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 17:38:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3761A1065670; Wed, 6 Jan 2010 17:38:34 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 48B168FC20; Wed, 6 Jan 2010 17:38:33 +0000 (UTC) Received: by ewy26 with SMTP id 26so15688705ewy.3 for ; Wed, 06 Jan 2010 09:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=23GwsrLpZyhJDHsw/d12ISCZG4f5e8Vrc5ic1Eo+MZU=; b=bI8u4ZHyy6FCWCxgLt6tjmG66qvJN9pIm18IGkXoFDglQ9P0i6TCUmch473MOZ8wkE yFlfSnOGu1nWiAFsGI4DOxHFhJ8g3u8kYiM2wtO2p+CQygOyxR5f/7Xy6bchMBs/h/An 2TdDcyBAYUH9IKa6X1g8AvVkoNs3lUfXEQozM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=ZkJQssAdhMo+NYuKWVuB6sMnaVA7W3hXzyY3I4TaToSno0IerKQOVhdZbss3Lce9PR /fQbjKSXqbiRaG2PAjhxMfs9jJhUcPF/xH2XFQqYAb23OSzAxdRaJ0dsXs20eARBQpuK 5e9GICSVLv8U95cTeol4SzWOFR+w/D1F1IV4M= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.90.210 with SMTP id e60mr1511911wef.120.1262799508120; Wed, 06 Jan 2010 09:38:28 -0800 (PST) In-Reply-To: <201001061712.o06HCICF087127@svn.freebsd.org> References: <201001061712.o06HCICF087127@svn.freebsd.org> From: Ivan Voras Date: Wed, 6 Jan 2010 18:38:07 +0100 X-Google-Sender-Auth: f59e6cd615f45e48 Message-ID: <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> To: Alexander Motin 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: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 17:38:34 -0000 2010/1/6 Alexander Motin : > Author: mav > Date: Wed Jan =C2=A06 17:12:18 2010 > New Revision: 201658 > URL: http://svn.freebsd.org/changeset/base/201658 > > Log: > =C2=A0Increase default block size from 4K to 64K. It was reduces 6 yeard = ago, > =C2=A0when trees were big and FAST mode was enabled by default. > > =C2=A0So small block size doesn't benefits linear I/O operations in FAST = and > =C2=A0significantly slowdowns in ECONOMIC (default) mode. For single stre= am random > =C2=A0I/Os so small block doesn't give much benefits, as access time is u= sually > =C2=A0bigger then transfer time there. Same time it requires all heads to= seek > =C2=A0together for every single request, reducing performance on parallel= load. I think there was one more reason - though I'm not sure if it is still valid because of your current and future work - the MAXPHYS limitation. If MAXPHYS is 128k, with 64k stripes data was only to be read from maximum of 2 drives. With 4k stripes it would have been read from 128/4=3D32 drives, though I agree 4k is too low in any case nowadays. I usually choose 16k or 32k for my setups. From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 18:40:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6191065672; Wed, 6 Jan 2010 18:40:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 6725D8FC08; Wed, 6 Jan 2010 18:40:05 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so875749eye.9 for ; Wed, 06 Jan 2010 10:39:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=lGUiaXoEVHsC85jyvk7VhW8BwoQ9oBz7pggV+e/Syic=; b=lL3xRIajPWUeH/9lJdsrtZioMtFjDJACzaui9fmDJvZR6mGEUzHozvq2nm+vmrYfA7 KyObkcU1txLe7LzOFxh6P2rEv1QoQpX9Zd6WKJb7+J/9KgIFuJVxXuORQeFcz3y8F4n3 Kes2oqxOU8IJnf5+7kAMauiQrAPK3UB0it0jM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=SaSmg0am79CpnYYlpfZW7eVdo1P5Hh/eEYhLToJzUZN1oc43pnwjyA4uFO6F5bC6l7 2EfhLjjyOB4ZuISP42iAQ34wyVEa9UPewoYV+sVOoiQiKbUC4XZOCXm7YWSGJ0Dpk7jR /Ps2EeQcRMUCjoorI2EEObT+10CnaPRR+35/c= Received: by 10.216.85.134 with SMTP id u6mr2724995wee.213.1262803195320; Wed, 06 Jan 2010 10:39:55 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([72.14.240.162]) by mx.google.com with ESMTPS id g9sm54973359gvc.25.2010.01.06.10.39.53 (version=SSLv3 cipher=RC4-MD5); Wed, 06 Jan 2010 10:39:54 -0800 (PST) Sender: Alexander Motin Message-ID: <4B44D8FA.2000608@FreeBSD.org> Date: Wed, 06 Jan 2010 20:39:54 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Ivan Voras References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> In-Reply-To: <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> X-Enigmail-Version: 0.96.0 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: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 18:40:07 -0000 Ivan Voras wrote: > 2010/1/6 Alexander Motin : >> Author: mav >> Date: Wed Jan 6 17:12:18 2010 >> New Revision: 201658 >> URL: http://svn.freebsd.org/changeset/base/201658 >> >> Log: >> Increase default block size from 4K to 64K. It was reduces 6 yeard ago, >> when trees were big and FAST mode was enabled by default. >> >> So small block size doesn't benefits linear I/O operations in FAST and >> significantly slowdowns in ECONOMIC (default) mode. For single stream random >> I/Os so small block doesn't give much benefits, as access time is usually >> bigger then transfer time there. Same time it requires all heads to seek >> together for every single request, reducing performance on parallel load. > > I think there was one more reason - though I'm not sure if it is still > valid because of your current and future work - the MAXPHYS > limitation. If MAXPHYS is 128k, with 64k stripes data was only to be > read from maximum of 2 drives. With 4k stripes it would have been read > from 128/4=32 drives, though I agree 4k is too low in any case > nowadays. I usually choose 16k or 32k for my setups. While you are right about MAXPHYS influence, and I hope we can rise it not so far, IMHO it is file system business to manage deep enough read-ahead/write-back to make all drives busy, independently from MAXPHYS value. With small MAXPHYS value FS should just generate more requests in advance. Except some RAID3/5/6 cases, where short writes ineffective, MAXPHYS value should only affect processing overhead. I've chosen 64K as level, where most of modern HDDs/SSDs reaching close to maximum performance, where large request splitting with present MAXPHYS is still possible, where medium request splitting not very reduces performance on parallel load, and where interrupt rate is not so high. Definitely it is question of personal tuning, but I think it is a reasonable default. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 19:03:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5B0D106568B; Wed, 6 Jan 2010 19:03:45 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id B912A8FC15; Wed, 6 Jan 2010 19:03:44 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so881196eye.9 for ; Wed, 06 Jan 2010 11:03:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=soXwXsriCnPocEk3BSBLKLTePyGHCTAbH4C2g2zOhxM=; b=Iwjib4TdmDgVMXHpfqYU0GxPRMu1tFMhf9gIZMRvyh4p5cS7DNAcxeeyn1tNR7i+Ip qIx/2hQ2/hqAlayMGecMTcnzTI0Kz8OLxPXwDbJObxjL/H/fxidPkU64OF3cZL8IH17v pCG/gnLvokuVd02PIPzKrV+GqsqLGge6RRZnM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=wK7G9CEb2w+aSzPnlYHZV3/mnt7KoReiV6g+0qG8tyBNRFAgwweSWCh3vaKlksvk/5 9CPYl+0c/2AAiT/s+AhsSvQbSybiORZnnUrvWjt3KMLdG1UfHsTL84yRjh4z//xl7cAx 4SdOpG3c8vU8a+i/cJgXsIn7vOa329mBgzzes= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.86.85 with SMTP id v63mr470777wee.32.1262804617027; Wed, 06 Jan 2010 11:03:37 -0800 (PST) In-Reply-To: <4B44D8FA.2000608@FreeBSD.org> References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> <4B44D8FA.2000608@FreeBSD.org> From: Ivan Voras Date: Wed, 6 Jan 2010 20:03:16 +0100 X-Google-Sender-Auth: 2db26b6cfc458966 Message-ID: <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 19:03:45 -0000 2010/1/6 Alexander Motin : > Ivan Voras wrote: >> I think there was one more reason - though I'm not sure if it is still >> valid because of your current and future work - the MAXPHYS >> limitation. If MAXPHYS is 128k, with 64k stripes data was only to be >> read from maximum of 2 drives. With 4k stripes it would have been read >> from 128/4=32 drives, though I agree 4k is too low in any case >> nowadays. I usually choose 16k or 32k for my setups. > > While you are right about MAXPHYS influence, and I hope we can rise it > not so far, IMHO it is file system business to manage deep enough > read-ahead/write-back to make all drives busy, independently from > MAXPHYS value. With small MAXPHYS value FS should just generate more > requests in advance. Except some RAID3/5/6 cases, where short writes > ineffective, MAXPHYS value should only affect processing overhead. Yes, my experience which lead to the post was mostly on UFS which, while AFAIK it does read-ahead, it still does it serially (I think this is implied by your experiments with NCQ and ZFS vs UFS) - so in any case only 2 drives are hit with 64k stripe size at any moment in time. In any case, as you say it is tunable so personal preferences can be applied. Thanks! From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 19:23:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A136E106568F; Wed, 6 Jan 2010 19:23: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 70C428FC2D; Wed, 6 Jan 2010 19:23:17 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1D4DE46B49; Wed, 6 Jan 2010 14:23:17 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id BFF508A01D; Wed, 6 Jan 2010 14:23:04 -0500 (EST) From: John Baldwin To: "Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?=" Date: Wed, 6 Jan 2010 14:00:26 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> In-Reply-To: <867hrvgw2j.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201001061400.26082.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 06 Jan 2010 14:23:04 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 19:23:17 -0000 On Wednesday 06 January 2010 9:13:56 am Dag-Erling Sm=C3=B8rgrav wrote: > Doug Barton writes: > > First off, thanks for sorting these, that's a step in the right > > direction. :) However, a few quibbles. First, our rule is that > > anything which might offend someone belongs in fortunes-o, and > > political quotes are always in the category of "might offend someone." >=20 > I don't see how the Rumsfeld quote could offend anyone. True, Rumsfeld > is a politician (and not a particularly popular one in most parts of the > world), but the quote itself is not political. It is a somewhat > comically worded expression of an important truism that many people > would do well to remember (cf. the classical "there are no unknown bugs > in our software"). Would you have suggested moving it to -o if it had > been a Steve Martin quote? I agree that the quote isn't particularly politically partisan, just made b= y a=20 political figure. =2D-=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 20:01:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C5C106566C; Wed, 6 Jan 2010 20:01:31 +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 37C3E8FC16; Wed, 6 Jan 2010 20:01:30 +0000 (UTC) Received: from c122-106-170-81.carlnfd1.nsw.optusnet.com.au (c122-106-170-81.carlnfd1.nsw.optusnet.com.au [122.106.170.81]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o06K1SwI017802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jan 2010 07:01:29 +1100 Date: Thu, 7 Jan 2010 07:01:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ivan Voras In-Reply-To: <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> Message-ID: <20100107065127.U55530@delplex.bde.org> References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> <4B44D8FA.2000608@FreeBSD.org> <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 20:01:31 -0000 On Wed, 6 Jan 2010, Ivan Voras wrote: > 2010/1/6 Alexander Motin : >> Ivan Voras wrote: > >>> I think there was one more reason - though I'm not sure if it is still >>> valid because of your current and future work - the MAXPHYS >>> limitation. If MAXPHYS is 128k, with 64k stripes data was only to be >>> read from maximum of 2 drives. With 4k stripes it would have been read >>> from 128/4=32 drives, though I agree 4k is too low in any case >>> nowadays. I usually choose 16k or 32k for my setups. >> >> While you are right about MAXPHYS influence, and I hope we can rise it >> not so far, IMHO it is file system business to manage deep enough >> read-ahead/write-back to make all drives busy, independently from >> MAXPHYS value. With small MAXPHYS value FS should just generate more >> requests in advance. Except some RAID3/5/6 cases, where short writes >> ineffective, MAXPHYS value should only affect processing overhead. > > Yes, my experience which lead to the post was mostly on UFS which, > while AFAIK it does read-ahead, it still does it serially (I think > this is implied by your experiments with NCQ and ZFS vs UFS) - so in > any case only 2 drives are hit with 64k stripe size at any moment in > time. fsck has no signifcant knowledge of read-ahead. Normally it uses vfs read clustering, which under the most favourable circumstances reduces to read-ahead of a maxiumum of MAXPHYS (less the initial size). If read clustering is disabled, then ffs does old-style read-ahead of a whole block (16K). Most file systems in FreeBSD are similar or worse (some support a block size of 512 and reading ahead by that amount gives interestingly slow behaviour). Bruce From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 20:43:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95D831065672; Wed, 6 Jan 2010 20:43:40 +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 855578FC08; Wed, 6 Jan 2010 20:43:40 +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 o06Kheb1034290; Wed, 6 Jan 2010 20:43:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06KhebK034288; Wed, 6 Jan 2010 20:43:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001062043.o06KhebK034288@svn.freebsd.org> From: John Baldwin Date: Wed, 6 Jan 2010 20: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: r201669 - head/lib/libc/stdtime X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 20:43:40 -0000 Author: jhb Date: Wed Jan 6 20:43:40 2010 New Revision: 201669 URL: http://svn.freebsd.org/changeset/base/201669 Log: Use _pthread_once() rather than _once() for localtime() and gmtime(). These methods are only invoked when __isthreaded is true at which point it is safe to use _pthread_once() directly. MFC after: 1 week Modified: head/lib/libc/stdtime/localtime.c Modified: head/lib/libc/stdtime/localtime.c ============================================================================== --- head/lib/libc/stdtime/localtime.c Wed Jan 6 20:41:12 2010 (r201668) +++ head/lib/libc/stdtime/localtime.c Wed Jan 6 20:43:40 2010 (r201669) @@ -1426,7 +1426,7 @@ const time_t * const timep; struct tm *p_tm; if (__isthreaded != 0) { - _once(&localtime_once, localtime_key_init); + _pthread_once(&localtime_once, localtime_key_init); if (localtime_key_error != 0) { errno = localtime_key_error; return(NULL); @@ -1527,7 +1527,7 @@ const time_t * const timep; struct tm *p_tm; if (__isthreaded != 0) { - _once(&gmtime_once, gmtime_key_init); + _pthread_once(&gmtime_once, gmtime_key_init); if (gmtime_key_error != 0) { errno = gmtime_key_error; return(NULL); From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 21:46:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062CB1065698; Wed, 6 Jan 2010 21:46:09 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA1228FC16; Wed, 6 Jan 2010 21:46:08 +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 o06Lk8K7049039; Wed, 6 Jan 2010 21:46:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06Lk8Mv049037; Wed, 6 Jan 2010 21:46:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001062146.o06Lk8Mv049037@svn.freebsd.org> From: Andrew Thompson Date: Wed, 6 Jan 2010 21:46: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: r201680 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 21:46:09 -0000 Author: thompsa Date: Wed Jan 6 21:46:08 2010 New Revision: 201680 URL: http://svn.freebsd.org/changeset/base/201680 Log: scratch_size was incorrectly passed as language ID when retrieving the language ID table, this broke string retrieval on some devices. Submitted by: Hans Petter Selasky Reported by: Renato Botelho Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Jan 6 21:45:30 2010 (r201679) +++ head/sys/dev/usb/usb_device.c Wed Jan 6 21:46:08 2010 (r201680) @@ -1691,8 +1691,7 @@ usb_alloc_device(device_t parent_dev, st udev->ddesc.iSerialNumber) { /* read out the language ID string */ err = usbd_req_get_string_desc(udev, NULL, - (char *)scratch_ptr, 4, scratch_size, - USB_LANGUAGE_TABLE); + (char *)scratch_ptr, 4, 0, USB_LANGUAGE_TABLE); } else { err = USB_ERR_INVAL; } From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 22:14:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7D52106566B; Wed, 6 Jan 2010 22:14:05 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B50CB8FC0C; Wed, 6 Jan 2010 22:14: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 o06ME5a2055265; Wed, 6 Jan 2010 22:14:05 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06ME5oD055260; Wed, 6 Jan 2010 22:14:05 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001062214.o06ME5oD055260@svn.freebsd.org> From: Andrew Thompson Date: Wed, 6 Jan 2010 22:14: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: r201681 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 22:14:06 -0000 Author: thompsa Date: Wed Jan 6 22:14:05 2010 New Revision: 201681 URL: http://svn.freebsd.org/changeset/base/201681 Log: Improve u3g device ejecting by providing additional methods for the eject command in the usb_msctest routines, as well as a general tidyup. This now properly ejects the ZTE MF636, Option Gi0322 and Novatel MC950D devices I have on my desk. Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_msctest.c head/sys/dev/usb/usb_msctest.h Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Wed Jan 6 21:46:08 2010 (r201680) +++ head/sys/dev/usb/serial/u3g.c Wed Jan 6 22:14:05 2010 (r201681) @@ -86,10 +86,14 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3GSP_HSPA 6 #define U3GSP_MAX 7 -#define U3GFL_HUAWEI_INIT 0x0001 /* Init command required */ -#define U3GFL_SCSI_EJECT 0x0002 /* SCSI eject command required */ -#define U3GFL_SIERRA_INIT 0x0004 /* Init command required */ -#define U3GFL_SAEL_M460_INIT 0x0008 /* Init device */ +#define U3GINIT_HUAWEI 1 /* Requires Huawei init command */ +#define U3GINIT_SIERRA 2 /* Requires Sierra init command */ +#define U3GINIT_SCSIEJECT 3 /* Requires SCSI eject command */ +#define U3GINIT_REZERO 4 /* Requires SCSI rezero command */ +#define U3GINIT_ZTESTOR 5 /* Requires ZTE SCSI command */ +#define U3GINIT_CMOTECH 6 /* Requires CMOTECH SCSI command */ +#define U3GINIT_WAIT 7 /* Device reappears after a delay */ +#define U3GINIT_SAEL_M460 8 /* Requires vendor init */ enum { U3G_BULK_WR, @@ -192,6 +196,7 @@ static const struct usb_device_id u3g_de U3G_DEV(ANYDATA, ADU_E100X, 0), U3G_DEV(AXESSTEL, DATAMODEM, 0), U3G_DEV(CMOTECH, CDMA_MODEM1, 0), + U3G_DEV(CMOTECH, CGU628, U3GINIT_CMOTECH), U3G_DEV(DELL, U5500, 0), U3G_DEV(DELL, U5505, 0), U3G_DEV(DELL, U5510, 0), @@ -211,73 +216,73 @@ static const struct usb_device_id u3g_de U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), - U3G_DEV(HUAWEI, E1401, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1402, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1403, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1404, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1405, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1406, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1407, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1408, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1409, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E140F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1410, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1411, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1412, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1413, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1414, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1415, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1416, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1417, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1418, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1419, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141C, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E141F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1420, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1421, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1422, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1423, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1424, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1425, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1426, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1427, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1428, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1429, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142C, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E142F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1430, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1431, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1432, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1433, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1434, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1435, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1436, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1437, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1438, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E1439, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143A, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143B, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143C, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143D, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143E, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E143F, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E14AC, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E180V, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E220, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, E220BIS, U3GFL_HUAWEI_INIT), - U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT), + U3G_DEV(HUAWEI, E1401, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1402, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1403, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1404, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1405, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1406, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1407, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1408, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1409, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E140F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1410, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1411, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1412, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1413, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1414, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1415, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1416, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1417, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1418, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1419, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141C, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E141F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1420, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1421, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1422, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1423, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1424, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1425, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1426, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1427, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1428, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1429, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142C, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E142F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1430, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1431, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1432, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1433, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1434, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1435, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1436, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1437, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1438, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1439, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143A, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143B, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143C, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143D, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143E, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E143F, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E14AC, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E180V, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(MERLIN, V620, 0), @@ -294,7 +299,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, U727_2, 0), U3G_DEV(NOVATEL, U740, 0), U3G_DEV(NOVATEL, U740_2, 0), - U3G_DEV(NOVATEL, U760, U3GFL_SCSI_EJECT), + U3G_DEV(NOVATEL, U760, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, U870, 0), U3G_DEV(NOVATEL, V620, 0), U3G_DEV(NOVATEL, V640, 0), @@ -338,7 +343,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, AC2726, 0), U3G_DEV(QUALCOMMINC, AC8700, 0), U3G_DEV(QUALCOMMINC, AC8710, 0), - U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GFL_SCSI_EJECT), + U3G_DEV(QUALCOMMINC, CDMA_MSM, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, E0002, 0), U3G_DEV(QUALCOMMINC, E0003, 0), U3G_DEV(QUALCOMMINC, E0004, 0), @@ -405,7 +410,6 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), - U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GFL_SCSI_EJECT), U3G_DEV(QUANTA, GKE, 0), U3G_DEV(QUANTA, GLE, 0), U3G_DEV(QUANTA, GLX, 0), @@ -466,7 +470,7 @@ static const struct usb_device_id u3g_de U3G_DEV(SIERRA, MINI5725, 0), U3G_DEV(SIERRA, T11, 0), U3G_DEV(SIERRA, T598, 0), - U3G_DEV(SILABS, SAEL, U3GFL_SAEL_M460_INIT), + U3G_DEV(SILABS, SAEL, U3GINIT_SAEL_M460), U3G_DEV(STELERA, C105, 0), U3G_DEV(STELERA, E1003, 0), U3G_DEV(STELERA, E1004, 0), @@ -492,12 +496,14 @@ static const struct usb_device_id u3g_de U3G_DEV(TOSHIBA, HSDPA, 0), U3G_DEV(YISO, C893, 0), /* Autoinstallers */ - U3G_DEV(NOVATEL, ZEROCD, U3GFL_SCSI_EJECT), - U3G_DEV(SIERRA, TRUINSTALL, U3GFL_SIERRA_INIT), + U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT), + U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), + U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), + U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; -static void +static int u3g_sierra_init(struct usb_device *udev) { struct usb_device_request req; @@ -512,10 +518,10 @@ u3g_sierra_init(struct usb_device *udev) NULL, 0, NULL, USB_MS_HZ)) { /* ignore any errors */ } - return; + return (0); } -static void +static int u3g_huawei_init(struct usb_device *udev) { struct usb_device_request req; @@ -530,7 +536,7 @@ u3g_huawei_init(struct usb_device *udev) NULL, 0, NULL, USB_MS_HZ)) { /* ignore any errors */ } - return; + return (0); } static void @@ -625,7 +631,7 @@ u3g_test_autoinst(void *arg, struct usb_ { struct usb_interface *iface; struct usb_interface_descriptor *id; - uint32_t flags; + int error; if (uaa->dev_state != UAA_DEV_READY) return; @@ -636,25 +642,41 @@ u3g_test_autoinst(void *arg, struct usb_ id = iface->idesc; if (id == NULL || id->bInterfaceClass != UICLASS_MASS) return; - if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)) { - /* no device match */ - return; - } - flags = USB_GET_DRIVER_INFO(uaa); + if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)) + return; /* no device match */ - if (flags & U3GFL_HUAWEI_INIT) { - u3g_huawei_init(udev); - } else if (flags & U3GFL_SCSI_EJECT) { - if (usb_test_autoinstall(udev, 0, 1) != 0) - return; - } else if (flags & U3GFL_SIERRA_INIT) { - u3g_sierra_init(udev); - } else { - /* no quirks */ - return; + switch (USB_GET_DRIVER_INFO(uaa)) { + case U3GINIT_HUAWEI: + error = u3g_huawei_init(udev); + break; + case U3GINIT_SCSIEJECT: + error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); + break; + case U3GINIT_REZERO: + error = usb_msc_eject(udev, 0, MSC_EJECT_REZERO); + break; + case U3GINIT_ZTESTOR: + error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + break; + case U3GINIT_CMOTECH: + error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); + break; + case U3GINIT_SIERRA: + error = u3g_sierra_init(udev); + break; + case U3GINIT_WAIT: + /* Just pretend we ejected, the card will timeout */ + error = 0; + break; + default: + /* no 3G eject quirks */ + error = EOPNOTSUPP; + break; + } + if (error == 0) { + /* success, mark the udev as disappearing */ + uaa->dev_state = UAA_DEV_EJECTING; } - uaa->dev_state = UAA_DEV_EJECTING; - return; /* success */ } static int @@ -701,15 +723,14 @@ u3g_attach(device_t dev) struct usb_interface *iface; struct usb_interface_descriptor *id; uint32_t iface_valid; - int error, flags, nports; + int error, type, nports; int ep, n; uint8_t i; DPRINTF("sc=%p\n", sc); - flags = USB_GET_DRIVER_INFO(uaa); - - if (flags & U3GFL_SAEL_M460_INIT) + type = USB_GET_DRIVER_INFO(uaa); + if (type == U3GINIT_SAEL_M460) u3g_sael_m460_init(uaa->device); /* copy in USB config */ @@ -781,8 +802,8 @@ u3g_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } - if (sc->sc_numports > 1) - device_printf(dev, "Found %u ports.\n", sc->sc_numports); + device_printf(dev, "Found %u port%s.\n", sc->sc_numports, + sc->sc_numports > 1 ? "s":""); return (0); detach: Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Jan 6 21:46:08 2010 (r201680) +++ head/sys/dev/usb/usb_device.c Wed Jan 6 22:14:05 2010 (r201681) @@ -1805,7 +1805,7 @@ repeat_set_config: * Try to figure out if we have an * auto-install disk there: */ - if (usb_test_autoinstall(udev, 0, 0) == 0) { + if (usb_iface_is_cdrom(udev, 0)) { DPRINTFN(0, "Found possible auto-install " "disk (trying next config)\n"); config_index++; Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Wed Jan 6 21:46:08 2010 (r201680) +++ head/sys/dev/usb/usb_msctest.c Wed Jan 6 22:14:05 2010 (r201681) @@ -67,8 +67,7 @@ #include #include #include - -#include +#include enum { ST_COMMAND, @@ -86,7 +85,18 @@ enum { DIR_NONE, }; +#define SCSI_INQ_LEN 0x24 +static uint8_t scsi_test_unit_ready[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_inquiry[] = { 0x12, 0x00, 0x00, 0x00, SCSI_INQ_LEN, 0x00 }; +static uint8_t scsi_rezero_init[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_start_stop_unit[] = { 0x1b, 0x00, 0x00, 0x00, 0x02, 0x00 }; +static uint8_t scsi_ztestor_eject[] = { 0x85, 0x01, 0x01, 0x01, 0x18, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00 }; +static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43, + 0x48, 0x47 }; + #define BULK_SIZE 64 /* dummy */ +#define ERR_CSW_FAILED -1 /* Command Block Wrapper */ struct bbb_cbw { @@ -134,8 +144,8 @@ struct bbb_transfer { uint8_t dir; uint8_t lun; uint8_t state; - uint8_t error; uint8_t status_try; + int error; uint8_t buffer[256]; }; @@ -147,6 +157,15 @@ static usb_callback_t bbb_data_write_cal static usb_callback_t bbb_data_wr_cs_callback; static usb_callback_t bbb_status_callback; +static void bbb_done(struct bbb_transfer *, int); +static void bbb_transfer_start(struct bbb_transfer *, uint8_t); +static void bbb_data_clear_stall_callback(struct usb_xfer *, uint8_t, + uint8_t); +static uint8_t bbb_command_start(struct bbb_transfer *, uint8_t, uint8_t, + void *, size_t, void *, size_t, usb_timeout_t); +static struct bbb_transfer *bbb_attach(struct usb_device *, uint8_t); +static void bbb_detach(struct bbb_transfer *); + static const struct usb_config bbb_config[ST_MAX] = { [ST_COMMAND] = { @@ -208,25 +227,9 @@ static const struct usb_config bbb_confi }; static void -bbb_done(struct bbb_transfer *sc, uint8_t error) +bbb_done(struct bbb_transfer *sc, int error) { - struct usb_xfer *xfer; - - xfer = sc->xfer[sc->state]; - - /* verify the error code */ - if (error) { - switch (USB_GET_STATE(xfer)) { - case USB_ST_SETUP: - case USB_ST_TRANSFERRED: - error = 1; - break; - default: - error = 2; - break; - } - } sc->error = error; sc->state = ST_COMMAND; sc->status_try = 1; @@ -253,7 +256,7 @@ bbb_data_clear_stall_callback(struct usb bbb_transfer_start(sc, next_xfer); break; default: - bbb_done(sc, 1); + bbb_done(sc, USB_ERR_STALLED); break; } } @@ -291,7 +294,7 @@ bbb_command_callback(struct usb_xfer *xf break; default: /* Error */ - bbb_done(sc, 1); + bbb_done(sc, error); break; } } @@ -333,7 +336,7 @@ bbb_data_read_callback(struct usb_xfer * default: /* Error */ if (error == USB_ERR_CANCELLED) { - bbb_done(sc, 1); + bbb_done(sc, error); } else { bbb_transfer_start(sc, ST_DATA_RD_CS); } @@ -385,7 +388,7 @@ bbb_data_write_callback(struct usb_xfer default: /* Error */ if (error == USB_ERR_CANCELLED) { - bbb_done(sc, 1); + bbb_done(sc, error); } else { bbb_transfer_start(sc, ST_DATA_WR_CS); } @@ -415,11 +418,11 @@ bbb_status_callback(struct usb_xfer *xfe /* very simple status check */ if (actlen < sizeof(sc->csw)) { - bbb_done(sc, 1);/* error */ + bbb_done(sc, USB_ERR_SHORT_XFER); } else if (sc->csw.bCSWStatus == CSWSTATUS_GOOD) { - bbb_done(sc, 0);/* success */ + bbb_done(sc, 0); /* success */ } else { - bbb_done(sc, 1);/* error */ + bbb_done(sc, ERR_CSW_FAILED); /* error */ } break; @@ -429,11 +432,11 @@ bbb_status_callback(struct usb_xfer *xfe break; default: - DPRINTFN(0, "Failed to read CSW: %s, try %d\n", + DPRINTF("Failed to read CSW: %s, try %d\n", usbd_errstr(error), sc->status_try); if (error == USB_ERR_CANCELLED || sc->status_try) { - bbb_done(sc, 1); + bbb_done(sc, error); } else { sc->status_try = 1; bbb_transfer_start(sc, ST_DATA_RD_CS); @@ -451,7 +454,7 @@ bbb_status_callback(struct usb_xfer *xfe *------------------------------------------------------------------------*/ static uint8_t bbb_command_start(struct bbb_transfer *sc, uint8_t dir, uint8_t lun, - void *data_ptr, usb_size_t data_len, uint8_t cmd_len, + void *data_ptr, size_t data_len, void *cmd_ptr, size_t cmd_len, usb_timeout_t data_timeout) { sc->lun = lun; @@ -461,54 +464,46 @@ bbb_command_start(struct bbb_transfer *s sc->data_rem = data_len; sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; + sc->data_ptr = data_ptr; sc->cmd_len = cmd_len; + bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); + bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); + DPRINTFN(1, "SCSI cmd = %*D\n", cmd_len, &sc->cbw.CBWCDB, ":"); + mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); while (usbd_transfer_pending(sc->xfer[sc->state])) { cv_wait(&sc->cv, &sc->mtx); } + mtx_unlock(&sc->mtx); return (sc->error); } -/*------------------------------------------------------------------------* - * usb_test_autoinstall - * - * Return values: - * 0: This interface is an auto install disk (CD-ROM) - * Else: Not an auto install disk. - *------------------------------------------------------------------------*/ -usb_error_t -usb_test_autoinstall(struct usb_device *udev, uint8_t iface_index, - uint8_t do_eject) +static struct bbb_transfer * +bbb_attach(struct usb_device *udev, uint8_t iface_index) { struct usb_interface *iface; struct usb_interface_descriptor *id; - usb_error_t err; - uint8_t timeout; - uint8_t sid_type; struct bbb_transfer *sc; + usb_error_t err; - if (udev == NULL) { - return (USB_ERR_INVAL); - } iface = usbd_get_iface(udev, iface_index); - if (iface == NULL) { - return (USB_ERR_INVAL); - } + if (iface == NULL) + return (NULL); + id = iface->idesc; - if (id == NULL) { - return (USB_ERR_INVAL); - } - if (id->bInterfaceClass != UICLASS_MASS) { - return (USB_ERR_INVAL); - } + if (id == NULL || id->bInterfaceClass != UICLASS_MASS) + return (NULL); + switch (id->bInterfaceSubClass) { case UISUBCLASS_SCSI: case UISUBCLASS_UFI: + case UISUBCLASS_SFF8020I: + case UISUBCLASS_SFF8070I: break; default: - return (USB_ERR_INVAL); + return (NULL); } switch (id->bInterfaceProtocol) { @@ -516,75 +511,112 @@ usb_test_autoinstall(struct usb_device * case UIPROTO_MASS_BBB: break; default: - return (USB_ERR_INVAL); + return (NULL); } sc = malloc(sizeof(*sc), M_USB, M_WAITOK | M_ZERO); - if (sc == NULL) { - return (USB_ERR_NOMEM); - } mtx_init(&sc->mtx, "USB autoinstall", NULL, MTX_DEF); cv_init(&sc->cv, "WBBB"); - err = usbd_transfer_setup(udev, - &iface_index, sc->xfer, bbb_config, + err = usbd_transfer_setup(udev, &iface_index, sc->xfer, bbb_config, ST_MAX, sc, &sc->mtx); - if (err) { - goto done; + bbb_detach(sc); + return (NULL); } - mtx_lock(&sc->mtx); - - timeout = 4; /* tries */ - -repeat_inquiry: - - sc->cbw.CBWCDB[0] = 0x12; /* INQUIRY */ - sc->cbw.CBWCDB[1] = 0; - sc->cbw.CBWCDB[2] = 0; - sc->cbw.CBWCDB[3] = 0; - sc->cbw.CBWCDB[4] = 0x24; /* length */ - sc->cbw.CBWCDB[5] = 0; - err = bbb_command_start(sc, DIR_IN, 0, - sc->buffer, 0x24, 6, USB_MS_HZ); - - if ((sc->actlen != 0) && (err == 0)) { - sid_type = sc->buffer[0] & 0x1F; - if (sid_type == 0x05) { - /* CD-ROM */ - if (do_eject) { - /* 0: opcode: SCSI START/STOP */ - sc->cbw.CBWCDB[0] = 0x1b; - /* 1: byte2: Not immediate */ - sc->cbw.CBWCDB[1] = 0x00; - /* 2..3: reserved */ - sc->cbw.CBWCDB[2] = 0x00; - sc->cbw.CBWCDB[3] = 0x00; - /* 4: Load/Eject command */ - sc->cbw.CBWCDB[4] = 0x02; - /* 5: control */ - sc->cbw.CBWCDB[5] = 0x00; - err = bbb_command_start(sc, DIR_OUT, 0, - NULL, 0, 6, USB_MS_HZ); - - DPRINTFN(0, "Eject CD command " - "status: %s\n", usbd_errstr(err)); - } - err = 0; - goto done; - } - } else if ((err != 2) && --timeout) { - usb_pause_mtx(&sc->mtx, hz); - goto repeat_inquiry; - } - err = USB_ERR_INVAL; - goto done; + return (sc); +} -done: - mtx_unlock(&sc->mtx); +static void +bbb_detach(struct bbb_transfer *sc) +{ usbd_transfer_unsetup(sc->xfer, ST_MAX); mtx_destroy(&sc->mtx); cv_destroy(&sc->cv); free(sc, M_USB); - return (err); +} + +/*------------------------------------------------------------------------* + * usb_iface_is_cdrom + * + * Return values: + * 1: This interface is an auto install disk (CD-ROM) + * 0: Not an auto install disk. + *------------------------------------------------------------------------*/ +int +usb_iface_is_cdrom(struct usb_device *udev, uint8_t iface_index) +{ + struct bbb_transfer *sc; + usb_error_t err; + uint8_t timeout, is_cdrom; + uint8_t sid_type; + + sc = bbb_attach(udev, iface_index); + if (sc == NULL) + return (0); + + is_cdrom = 0; + timeout = 4; /* tries */ + while (--timeout) { + err = bbb_command_start(sc, DIR_IN, 0, sc->buffer, + SCSI_INQ_LEN, &scsi_inquiry, sizeof(scsi_inquiry), + USB_MS_HZ); + + if (err == 0 && sc->actlen > 0) { + sid_type = sc->buffer[0] & 0x1F; + if (sid_type == 0x05) + is_cdrom = 1; + break; + } else if (err != ERR_CSW_FAILED) + break; /* non retryable error */ + usb_pause_mtx(NULL, hz); + } + bbb_detach(sc); + return (is_cdrom); +} + +usb_error_t +usb_msc_eject(struct usb_device *udev, uint8_t iface_index, int method) +{ + struct bbb_transfer *sc; + usb_error_t err; + + sc = bbb_attach(udev, iface_index); + if (sc == NULL) + return (USB_ERR_INVAL); + + err = 0; + switch (method) { + case MSC_EJECT_STOPUNIT: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_test_unit_ready, sizeof(scsi_test_unit_ready), + USB_MS_HZ); + DPRINTF("Test unit ready status: %s\n", usbd_errstr(err)); + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_start_stop_unit, sizeof(scsi_start_stop_unit), + USB_MS_HZ); + break; + case MSC_EJECT_REZERO: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_rezero_init, sizeof(scsi_rezero_init), + USB_MS_HZ); + break; + case MSC_EJECT_ZTESTOR: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_ztestor_eject, sizeof(scsi_ztestor_eject), + USB_MS_HZ); + break; + case MSC_EJECT_CMOTECH: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_cmotech_eject, sizeof(scsi_cmotech_eject), + USB_MS_HZ); + break; + default: + printf("usb_msc_eject: unknown eject method (%d)\n", method); + break; + } + DPRINTF("Eject CD command status: %s\n", usbd_errstr(err)); + + bbb_detach(sc); + return (0); } Modified: head/sys/dev/usb/usb_msctest.h ============================================================================== --- head/sys/dev/usb/usb_msctest.h Wed Jan 6 21:46:08 2010 (r201680) +++ head/sys/dev/usb/usb_msctest.h Wed Jan 6 22:14:05 2010 (r201681) @@ -27,7 +27,16 @@ #ifndef _USB_MSCTEST_H_ #define _USB_MSCTEST_H_ -usb_error_t usb_test_autoinstall(struct usb_device *udev, - uint8_t iface_index, uint8_t do_eject); +enum { + MSC_EJECT_STOPUNIT, + MSC_EJECT_REZERO, + MSC_EJECT_ZTESTOR, + MSC_EJECT_CMOTECH +}; + +int usb_iface_is_cdrom(struct usb_device *udev, + uint8_t iface_index); +usb_error_t usb_msc_eject(struct usb_device *udev, + uint8_t iface_index, int method); #endif /* _USB_MSCTEST_H_ */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 22:31:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FEC81065676; Wed, 6 Jan 2010 22:31:20 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 80B948FC13; Wed, 6 Jan 2010 22:31:19 +0000 (UTC) Received: by bwz5 with SMTP id 5so11322380bwz.3 for ; Wed, 06 Jan 2010 14:31:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=GGgRMC5o7xd9M0yC7ks/1n9JbSTpmIR/cs7HKiOQ194=; b=L6u1+YP2ZvutzQYsTkMw3HREJHuVFdADx/cqcNzfFjGA06KbX735EcZwyxfSTxoz6a DLIQXfd9UHpzeGpx+V95NnLz9UwfCGcm79H0xryYv+1j9//J7OR0CLQfqDtdc/yoOD/K Eq97zvWosCScHFgQwrzQrhwEFPnh4VmxKeZ5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=t0zgP4GZq4lYENG5gpcY5kP3vqKn5cj42iNKaKUjEtCl9xgpVU/ZQgR31Sf4paxRjy SxUgXWGsHKGYxkQrnMGFinhOqgoMbRlAt/0OYRJtkbc1sSf5gtQUSwuwNvyFDqFg+OGJ xw76ku/PaNRaDXdDdlc96C76D9QGoi7BNQG68= Received: by 10.204.153.202 with SMTP id l10mr1942566bkw.92.1262817073809; Wed, 06 Jan 2010 14:31:13 -0800 (PST) Received: from mavbook.mavhome.dp.ua ([72.14.240.162]) by mx.google.com with ESMTPS id 13sm6853096bwz.10.2010.01.06.14.31.12 (version=SSLv3 cipher=RC4-MD5); Wed, 06 Jan 2010 14:31:13 -0800 (PST) Sender: Alexander Motin Message-ID: <4B450F30.20705@FreeBSD.org> Date: Thu, 07 Jan 2010 00:31:12 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Ivan Voras References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> <4B44D8FA.2000608@FreeBSD.org> <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> In-Reply-To: <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> X-Enigmail-Version: 0.96.0 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: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 22:31:20 -0000 Ivan Voras wrote: > 2010/1/6 Alexander Motin : >> Ivan Voras wrote: > >>> I think there was one more reason - though I'm not sure if it is still >>> valid because of your current and future work - the MAXPHYS >>> limitation. If MAXPHYS is 128k, with 64k stripes data was only to be >>> read from maximum of 2 drives. With 4k stripes it would have been read >>> from 128/4=32 drives, though I agree 4k is too low in any case >>> nowadays. I usually choose 16k or 32k for my setups. >> While you are right about MAXPHYS influence, and I hope we can rise it >> not so far, IMHO it is file system business to manage deep enough >> read-ahead/write-back to make all drives busy, independently from >> MAXPHYS value. With small MAXPHYS value FS should just generate more >> requests in advance. Except some RAID3/5/6 cases, where short writes >> ineffective, MAXPHYS value should only affect processing overhead. > > Yes, my experience which lead to the post was mostly on UFS which, > while AFAIK it does read-ahead, it still does it serially (I think > this is implied by your experiments with NCQ and ZFS vs UFS) - so in > any case only 2 drives are hit with 64k stripe size at any moment in > time. I do not think it is true. On system with default MAXPHYS I've made gstripe with 64K block of 4 equal drives with 108MB/s of maximal read speed. Reads with dd from large pre-written file on UFS shown: vfs.read_max=8 (default) - 235090074 bytes/sec vfs.read_max=16 - 378385148 bytes/sec vfs.read_max=32 - 386620109 bytes/sec I've put some printfs into the clustering read code and found enough read-ahead there. So it works. One thing IMHO would be nice to see there is the alignment of the read-ahead requests to the array stripe size/offset. Dirty hack I've tried there, reduced number of requests to the array components by 30%. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 22:39:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 020E6106568F; Wed, 6 Jan 2010 22:39:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5DAB8FC19; Wed, 6 Jan 2010 22:39:40 +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 o06MdeqK061079; Wed, 6 Jan 2010 22:39:40 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06MdeSA061078; Wed, 6 Jan 2010 22:39:40 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201001062239.o06MdeSA061078@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 6 Jan 2010 22:39: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: r201684 - head/sys/cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 22:39:41 -0000 Author: pjd Date: Wed Jan 6 22:39:40 2010 New Revision: 201684 URL: http://svn.freebsd.org/changeset/base/201684 Log: Teach the (gpt)zfsboot and zfsloader raidz code to use its buffers more efficiently. Before this patch, in the worst case memory use would increase exponentially on the number of drives in the raidz vdev. Submitted by: Matt Reimer Sponsored by: VPOP Technologies, Inc. Silence from: dfr Modified: head/sys/cddl/boot/zfs/zfssubr.c Modified: head/sys/cddl/boot/zfs/zfssubr.c ============================================================================== --- head/sys/cddl/boot/zfs/zfssubr.c Wed Jan 6 22:19:57 2010 (r201683) +++ head/sys/cddl/boot/zfs/zfssubr.c Wed Jan 6 22:39:40 2010 (r201684) @@ -454,7 +454,7 @@ vdev_raidz_reconstruct_q(raidz_col_t *co static void vdev_raidz_reconstruct_pq(raidz_col_t *cols, int nparity, int acols, - int x, int y) + int x, int y, void *temp_p, void *temp_q) { uint8_t *p, *q, *pxy, *qxy, *xd, *yd, tmp, a, b, aexp, bexp; void *pdata, *qdata; @@ -478,10 +478,8 @@ vdev_raidz_reconstruct_pq(raidz_col_t *c xsize = cols[x].rc_size; ysize = cols[y].rc_size; - cols[VDEV_RAIDZ_P].rc_data = - zfs_alloc_temp(cols[VDEV_RAIDZ_P].rc_size); - cols[VDEV_RAIDZ_Q].rc_data = - zfs_alloc_temp(cols[VDEV_RAIDZ_Q].rc_size); + cols[VDEV_RAIDZ_P].rc_data = temp_p; + cols[VDEV_RAIDZ_Q].rc_data = temp_q; cols[x].rc_size = 0; cols[y].rc_size = 0; @@ -551,9 +549,12 @@ vdev_raidz_read(vdev_t *vdev, const blkp uint64_t f = b % dcols; uint64_t o = (b / dcols) << unit_shift; uint64_t q, r, coff; - int c, c1, bc, col, acols, devidx, asize, n; + int c, c1, bc, col, acols, devidx, asize, n, max_rc_size; static raidz_col_t cols[16]; raidz_col_t *rc, *rc1; + void *orig, *orig1, *temp_p, *temp_q; + + orig = orig1 = temp_p = temp_q = NULL; q = s / (dcols - nparity); r = s - q * (dcols - nparity); @@ -561,6 +562,7 @@ vdev_raidz_read(vdev_t *vdev, const blkp acols = (q == 0 ? bc : dcols); asize = 0; + max_rc_size = 0; for (c = 0; c < acols; c++) { col = f + c; @@ -577,6 +579,8 @@ vdev_raidz_read(vdev_t *vdev, const blkp cols[c].rc_tried = 0; cols[c].rc_skipped = 0; asize += cols[c].rc_size; + if (cols[c].rc_size > max_rc_size) + max_rc_size = cols[c].rc_size; } asize = roundup(asize, (nparity + 1) << unit_shift); @@ -777,8 +781,13 @@ reconstruct: //ASSERT(c != acols); //ASSERT(!rc->rc_skipped || rc->rc_error == ENXIO || rc->rc_error == ESTALE); + if (temp_p == NULL) + temp_p = zfs_alloc_temp(max_rc_size); + if (temp_q == NULL) + temp_q = zfs_alloc_temp(max_rc_size); + vdev_raidz_reconstruct_pq(cols, nparity, acols, - c1, c); + c1, c, temp_p, temp_q); if (zio_checksum_error(bp, buf) == 0) return (0); @@ -845,18 +854,12 @@ reconstruct: return (EIO); } - asize = 0; - for (c = 0; c < acols; c++) { - rc = &cols[c]; - if (rc->rc_size > asize) - asize = rc->rc_size; - } if (cols[VDEV_RAIDZ_P].rc_error == 0) { /* * Attempt to reconstruct the data from parity P. */ - void *orig; - orig = zfs_alloc_temp(asize); + if (orig == NULL) + orig = zfs_alloc_temp(max_rc_size); for (c = nparity; c < acols; c++) { rc = &cols[c]; @@ -874,8 +877,8 @@ reconstruct: /* * Attempt to reconstruct the data from parity Q. */ - void *orig; - orig = zfs_alloc_temp(asize); + if (orig == NULL) + orig = zfs_alloc_temp(max_rc_size); for (c = nparity; c < acols; c++) { rc = &cols[c]; @@ -895,9 +898,14 @@ reconstruct: /* * Attempt to reconstruct the data from both P and Q. */ - void *orig, *orig1; - orig = zfs_alloc_temp(asize); - orig1 = zfs_alloc_temp(asize); + if (orig == NULL) + orig = zfs_alloc_temp(max_rc_size); + if (orig1 == NULL) + orig1 = zfs_alloc_temp(max_rc_size); + if (temp_p == NULL) + temp_p = zfs_alloc_temp(max_rc_size); + if (temp_q == NULL) + temp_q = zfs_alloc_temp(max_rc_size); for (c = nparity; c < acols - 1; c++) { rc = &cols[c]; @@ -909,7 +917,7 @@ reconstruct: memcpy(orig1, rc1->rc_data, rc1->rc_size); vdev_raidz_reconstruct_pq(cols, nparity, - acols, c, c1); + acols, c, c1, temp_p, temp_q); if (zio_checksum_error(bp, buf) == 0) return (0); From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 23:05:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AD4C1065693; Wed, 6 Jan 2010 23:05:01 +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 039208FC1C; Wed, 6 Jan 2010 23:05:01 +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 o06N50bg067142; Wed, 6 Jan 2010 23:05:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06N50Cd067140; Wed, 6 Jan 2010 23:05:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001062305.o06N50Cd067140@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 6 Jan 2010 23:05: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: r201688 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 23:05:01 -0000 Author: bz Date: Wed Jan 6 23:05:00 2010 New Revision: 201688 URL: http://svn.freebsd.org/changeset/base/201688 Log: Correct a typo. Submitted by: sn_ (sn_ gmx.net) on hackers@ MFC after: 3 days Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Wed Jan 6 23:02:35 2010 (r201687) +++ head/sys/netinet6/icmp6.c Wed Jan 6 23:05:00 2010 (r201688) @@ -296,7 +296,7 @@ icmp6_error(struct mbuf *m, int type, in * we should basically suppress sending an error (RFC 2463, Section * 2.4). * We have two exceptions (the item e.2 in that section): - * - the Pakcet Too Big message can be sent for path MTU discovery. + * - the Packet Too Big message can be sent for path MTU discovery. * - the Parameter Problem Message that can be allowed an icmp6 error * in the option type field. This check has been done in * ip6_unknown_opt(), so we can just check the type and code. From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 23:09:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 299921065696; Wed, 6 Jan 2010 23:09:24 +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 101F98FC13; Wed, 6 Jan 2010 23:09: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 o06N9NGa068127; Wed, 6 Jan 2010 23:09:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06N9NpH068124; Wed, 6 Jan 2010 23:09:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001062309.o06N9NpH068124@svn.freebsd.org> From: Xin LI Date: Wed, 6 Jan 2010 23:09: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: r201689 - in head/sys: boot/zfs cddl/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 23:09:24 -0000 Author: delphij Date: Wed Jan 6 23:09:23 2010 New Revision: 201689 URL: http://svn.freebsd.org/changeset/base/201689 Log: Instead of assuming all vdevs are healthy, check the newest vdev label for each vdev's status. Booting from a degraded vdev should now be more robust. Submitted by: Matt Reimer Sponsored by: VPOP Technologies, Inc. MFC after: 2 weeks Modified: head/sys/boot/zfs/zfsimpl.c head/sys/cddl/boot/zfs/zfsimpl.h Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Jan 6 23:05:00 2010 (r201688) +++ head/sys/boot/zfs/zfsimpl.c Wed Jan 6 23:09:23 2010 (r201689) @@ -404,7 +404,7 @@ vdev_create(uint64_t guid, vdev_read_t * } static int -vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t **vdevp) +vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t **vdevp, int is_newer) { int rc; uint64_t guid, id, ashift, nparity; @@ -412,7 +412,8 @@ vdev_init_from_nvlist(const unsigned cha const char *path; vdev_t *vdev, *kid; const unsigned char *kids; - int nkids, i; + int nkids, i, is_new; + uint64_t is_offline, is_faulted, is_degraded, is_removed; if (nvlist_find(nvlist, ZPOOL_CONFIG_GUID, DATA_TYPE_UINT64, 0, &guid) @@ -424,17 +425,6 @@ vdev_init_from_nvlist(const unsigned cha return (ENOENT); } - /* - * Assume that if we've seen this vdev tree before, this one - * will be identical. - */ - vdev = vdev_find(guid); - if (vdev) { - if (vdevp) - *vdevp = vdev; - return (0); - } - if (strcmp(type, VDEV_TYPE_MIRROR) && strcmp(type, VDEV_TYPE_DISK) && strcmp(type, VDEV_TYPE_RAIDZ)) { @@ -442,6 +432,21 @@ vdev_init_from_nvlist(const unsigned cha return (EIO); } + is_offline = is_removed = is_faulted = is_degraded = 0; + + nvlist_find(nvlist, ZPOOL_CONFIG_OFFLINE, DATA_TYPE_UINT64, 0, + &is_offline); + nvlist_find(nvlist, ZPOOL_CONFIG_REMOVED, DATA_TYPE_UINT64, 0, + &is_removed); + nvlist_find(nvlist, ZPOOL_CONFIG_FAULTED, DATA_TYPE_UINT64, 0, + &is_faulted); + nvlist_find(nvlist, ZPOOL_CONFIG_DEGRADED, DATA_TYPE_UINT64, 0, + &is_degraded); + + vdev = vdev_find(guid); + if (!vdev) { + is_new = 1; + if (!strcmp(type, VDEV_TYPE_MIRROR)) vdev = vdev_create(guid, vdev_mirror_read); else if (!strcmp(type, VDEV_TYPE_RAIDZ)) @@ -480,6 +485,39 @@ vdev_init_from_nvlist(const unsigned cha vdev->v_name = strdup(type); } } + + if (is_offline) + vdev->v_state = VDEV_STATE_OFFLINE; + else if (is_removed) + vdev->v_state = VDEV_STATE_REMOVED; + else if (is_faulted) + vdev->v_state = VDEV_STATE_FAULTED; + else if (is_degraded) + vdev->v_state = VDEV_STATE_DEGRADED; + else + vdev->v_state = VDEV_STATE_HEALTHY; + } else { + is_new = 0; + + if (is_newer) { + /* + * We've already seen this vdev, but from an older + * vdev label, so let's refresh its state from the + * newer label. + */ + if (is_offline) + vdev->v_state = VDEV_STATE_OFFLINE; + else if (is_removed) + vdev->v_state = VDEV_STATE_REMOVED; + else if (is_faulted) + vdev->v_state = VDEV_STATE_FAULTED; + else if (is_degraded) + vdev->v_state = VDEV_STATE_DEGRADED; + else + vdev->v_state = VDEV_STATE_HEALTHY; + } + } + rc = nvlist_find(nvlist, ZPOOL_CONFIG_CHILDREN, DATA_TYPE_NVLIST_ARRAY, &nkids, &kids); /* @@ -488,10 +526,12 @@ vdev_init_from_nvlist(const unsigned cha if (rc == 0) { vdev->v_nchildren = nkids; for (i = 0; i < nkids; i++) { - rc = vdev_init_from_nvlist(kids, &kid); + rc = vdev_init_from_nvlist(kids, &kid, is_newer); if (rc) return (rc); - STAILQ_INSERT_TAIL(&vdev->v_children, kid, v_childlink); + if (is_new) + STAILQ_INSERT_TAIL(&vdev->v_children, kid, + v_childlink); kids = nvlist_next(kids); } } else { @@ -593,7 +633,9 @@ state_name(vdev_state_t state) "UNKNOWN", "CLOSED", "OFFLINE", + "REMOVED", "CANT_OPEN", + "FAULTED", "DEGRADED", "ONLINE" }; @@ -711,7 +753,7 @@ vdev_probe(vdev_phys_read_t *read, void uint64_t pool_txg, pool_guid; const char *pool_name; const unsigned char *vdevs; - int i, rc; + int i, rc, is_newer; char upbuf[1024]; const struct uberblock *up; @@ -793,12 +835,15 @@ vdev_probe(vdev_phys_read_t *read, void spa = spa_create(pool_guid); spa->spa_name = strdup(pool_name); } - if (pool_txg > spa->spa_txg) + if (pool_txg > spa->spa_txg) { spa->spa_txg = pool_txg; + is_newer = 1; + } else + is_newer = 0; /* * Get the vdev tree and create our in-core copy of it. - * If we already have a healthy vdev with this guid, this must + * If we already have a vdev with this guid, this must * be some kind of alias (overlapping slices, dangerously dedicated * disks etc). */ @@ -808,16 +853,16 @@ vdev_probe(vdev_phys_read_t *read, void return (EIO); } vdev = vdev_find(guid); - if (vdev && vdev->v_state == VDEV_STATE_HEALTHY) { + if (vdev && vdev->v_phys_read) /* Has this vdev already been inited? */ return (EIO); - } if (nvlist_find(nvlist, ZPOOL_CONFIG_VDEV_TREE, DATA_TYPE_NVLIST, 0, &vdevs)) { return (EIO); } - rc = vdev_init_from_nvlist(vdevs, &top_vdev); + + rc = vdev_init_from_nvlist(vdevs, &top_vdev, is_newer); if (rc) return (rc); @@ -838,7 +883,6 @@ vdev_probe(vdev_phys_read_t *read, void if (vdev) { vdev->v_phys_read = read; vdev->v_read_priv = read_priv; - vdev->v_state = VDEV_STATE_HEALTHY; } else { printf("ZFS: inconsistent nvlist contents\n"); return (EIO); Modified: head/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- head/sys/cddl/boot/zfs/zfsimpl.h Wed Jan 6 23:05:00 2010 (r201688) +++ head/sys/cddl/boot/zfs/zfsimpl.h Wed Jan 6 23:09:23 2010 (r201689) @@ -548,7 +548,6 @@ typedef enum { #define ZPOOL_CONFIG_DTL "DTL" #define ZPOOL_CONFIG_STATS "stats" #define ZPOOL_CONFIG_WHOLE_DISK "whole_disk" -#define ZPOOL_CONFIG_OFFLINE "offline" #define ZPOOL_CONFIG_ERRCOUNT "error_count" #define ZPOOL_CONFIG_NOT_PRESENT "not_present" #define ZPOOL_CONFIG_SPARES "spares" @@ -558,6 +557,16 @@ typedef enum { #define ZPOOL_CONFIG_HOSTNAME "hostname" #define ZPOOL_CONFIG_TIMESTAMP "timestamp" /* not stored on disk */ +/* + * The persistent vdev state is stored as separate values rather than a single + * 'vdev_state' entry. This is because a device can be in multiple states, such + * as offline and degraded. + */ +#define ZPOOL_CONFIG_OFFLINE "offline" +#define ZPOOL_CONFIG_FAULTED "faulted" +#define ZPOOL_CONFIG_DEGRADED "degraded" +#define ZPOOL_CONFIG_REMOVED "removed" + #define VDEV_TYPE_ROOT "root" #define VDEV_TYPE_MIRROR "mirror" #define VDEV_TYPE_REPLACING "replacing" @@ -590,7 +599,9 @@ typedef enum vdev_state { VDEV_STATE_UNKNOWN = 0, /* Uninitialized vdev */ VDEV_STATE_CLOSED, /* Not currently open */ VDEV_STATE_OFFLINE, /* Not allowed to open */ + VDEV_STATE_REMOVED, /* Explicitly removed from system */ VDEV_STATE_CANT_OPEN, /* Tried to open, but failed */ + VDEV_STATE_FAULTED, /* External request to fault device */ VDEV_STATE_DEGRADED, /* Replicated vdev with unhealthy kids */ VDEV_STATE_HEALTHY /* Presumed good */ } vdev_state_t; From owner-svn-src-head@FreeBSD.ORG Wed Jan 6 23:11:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F7A210656B0; Wed, 6 Jan 2010 23:11:56 +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 575CD8FC2E; Wed, 6 Jan 2010 23:11:56 +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 o06NBuqk068758; Wed, 6 Jan 2010 23:11:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06NBuBB068756; Wed, 6 Jan 2010 23:11:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001062311.o06NBuBB068756@svn.freebsd.org> From: Xin LI Date: Wed, 6 Jan 2010 23:11:56 +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: r201690 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 23:11:56 -0000 Author: delphij Date: Wed Jan 6 23:11:56 2010 New Revision: 201690 URL: http://svn.freebsd.org/changeset/base/201690 Log: Space cleanup for revision 201689 committed separately for easier review. This commit is purely space changes. Submitted by: Matt Reimer Sponsored by: VPOP Technologies, Inc. MFC after: 2 weeks Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Jan 6 23:09:23 2010 (r201689) +++ head/sys/boot/zfs/zfsimpl.c Wed Jan 6 23:11:56 2010 (r201690) @@ -447,44 +447,44 @@ vdev_init_from_nvlist(const unsigned cha if (!vdev) { is_new = 1; - if (!strcmp(type, VDEV_TYPE_MIRROR)) - vdev = vdev_create(guid, vdev_mirror_read); - else if (!strcmp(type, VDEV_TYPE_RAIDZ)) - vdev = vdev_create(guid, vdev_raidz_read); - else - vdev = vdev_create(guid, vdev_disk_read); + if (!strcmp(type, VDEV_TYPE_MIRROR)) + vdev = vdev_create(guid, vdev_mirror_read); + else if (!strcmp(type, VDEV_TYPE_RAIDZ)) + vdev = vdev_create(guid, vdev_raidz_read); + else + vdev = vdev_create(guid, vdev_disk_read); - vdev->v_id = id; - if (nvlist_find(nvlist, ZPOOL_CONFIG_ASHIFT, - DATA_TYPE_UINT64, 0, &ashift) == 0) - vdev->v_ashift = ashift; - else - vdev->v_ashift = 0; - if (nvlist_find(nvlist, ZPOOL_CONFIG_NPARITY, - DATA_TYPE_UINT64, 0, &nparity) == 0) - vdev->v_nparity = nparity; - else - vdev->v_nparity = 0; - if (nvlist_find(nvlist, ZPOOL_CONFIG_PATH, - DATA_TYPE_STRING, 0, &path) == 0) { - if (strlen(path) > 5 - && path[0] == '/' - && path[1] == 'd' - && path[2] == 'e' - && path[3] == 'v' - && path[4] == '/') - path += 5; - vdev->v_name = strdup(path); - } else { - if (!strcmp(type, "raidz")) { - if (vdev->v_nparity == 1) - vdev->v_name = "raidz1"; - else - vdev->v_name = "raidz2"; + vdev->v_id = id; + if (nvlist_find(nvlist, ZPOOL_CONFIG_ASHIFT, + DATA_TYPE_UINT64, 0, &ashift) == 0) + vdev->v_ashift = ashift; + else + vdev->v_ashift = 0; + if (nvlist_find(nvlist, ZPOOL_CONFIG_NPARITY, + DATA_TYPE_UINT64, 0, &nparity) == 0) + vdev->v_nparity = nparity; + else + vdev->v_nparity = 0; + if (nvlist_find(nvlist, ZPOOL_CONFIG_PATH, + DATA_TYPE_STRING, 0, &path) == 0) { + if (strlen(path) > 5 + && path[0] == '/' + && path[1] == 'd' + && path[2] == 'e' + && path[3] == 'v' + && path[4] == '/') + path += 5; + vdev->v_name = strdup(path); } else { - vdev->v_name = strdup(type); + if (!strcmp(type, "raidz")) { + if (vdev->v_nparity == 1) + vdev->v_name = "raidz1"; + else + vdev->v_name = "raidz2"; + } else { + vdev->v_name = strdup(type); + } } - } if (is_offline) vdev->v_state = VDEV_STATE_OFFLINE; From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 00:17:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E56106566C; Thu, 7 Jan 2010 00:17:37 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9D498FC1E; Thu, 7 Jan 2010 00:17:36 +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 o070HaZx084010; Thu, 7 Jan 2010 00:17:36 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o070HaSF084008; Thu, 7 Jan 2010 00:17:36 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001070017.o070HaSF084008@svn.freebsd.org> From: Kirk McKusick Date: Thu, 7 Jan 2010 00:17: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: r201700 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 00:17:37 -0000 Author: mckusick Date: Thu Jan 7 00:17:36 2010 New Revision: 201700 URL: http://svn.freebsd.org/changeset/base/201700 Log: This corrects a bug that manifested itself as identifying the last cylinder group of a UFS1 filesystem as bad. The error was in the check and not in the cylinder group itself. So even though fsck fixed the cylinder group correctly, it was still endlessly reported as bad. PR: 141992 MFC after: 2 weeks Reported by: Dan Strick Modified: head/sbin/fsck_ffs/fsutil.c Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Thu Jan 7 00:04:29 2010 (r201699) +++ head/sbin/fsck_ffs/fsutil.c Thu Jan 7 00:17:36 2010 (r201700) @@ -436,7 +436,7 @@ check_cgmagic(int cg, struct cg *cgp) ((sblock.fs_magic == FS_UFS1_MAGIC && cgp->cg_old_niblk == sblock.fs_ipg && cgp->cg_ndblk <= sblock.fs_fpg && - cgp->cg_old_ncyl == sblock.fs_old_cpg) || + cgp->cg_old_ncyl <= sblock.fs_old_cpg) || (sblock.fs_magic == FS_UFS2_MAGIC && cgp->cg_niblk == sblock.fs_ipg && cgp->cg_ndblk <= sblock.fs_fpg && From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 00:30:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD1051065672; Thu, 7 Jan 2010 00:30:59 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15C58FC23; Thu, 7 Jan 2010 00:30:59 +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 o070UxWD087032; Thu, 7 Jan 2010 00:30:59 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o070Uxen087029; Thu, 7 Jan 2010 00:30:59 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001070030.o070Uxen087029@svn.freebsd.org> From: Andrew Thompson Date: Thu, 7 Jan 2010 00:30: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: r201701 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 00:30:59 -0000 Author: thompsa Date: Thu Jan 7 00:30:59 2010 New Revision: 201701 URL: http://svn.freebsd.org/changeset/base/201701 Log: Add new umass quirks for Western Digital MYBook and JMicron JM20337. PR: usb/142225, usb/142228 Submitted by: Thomas Ward, Yoshikazu GOTO MFC after: 1 week 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 Thu Jan 7 00:17:36 2010 (r201700) +++ head/sys/dev/usb/quirk/usb_quirk.c Thu Jan 7 00:30:59 2010 (r201701) @@ -225,6 +225,9 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, + UQ_MSC_FORCE_PROTO_SCSI, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(KYOCERA, FINECAM_L3, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(KYOCERA, FINECAM_S3X, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, @@ -413,7 +416,8 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), USB_QUIRK(WESTERN, MYBOOK, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD), + UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY_EVPD, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(WESTERN, MYPASSWORD, 0x0000, 0xffff, UQ_MSC_FORCE_SHORT_INQ), USB_QUIRK(WINMAXGROUP, FLASH64MC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Jan 7 00:17:36 2010 (r201700) +++ head/sys/dev/usb/usbdevs Thu Jan 7 00:30:59 2010 (r201701) @@ -603,6 +603,7 @@ vendor SUPERTOP 0x14cd Super Top vendor PLANEX3 0x14ea Planex Communications vendor SILICONPORTALS 0x1527 Silicon Portals vendor UBIQUAM 0x1529 UBIQUAM Co., Ltd. +vendor JMICRON 0x152d JMicron vendor UBLOX 0x1546 U-blox vendor PNY 0x154b PNY vendor OQO 0x1557 OQO @@ -1671,6 +1672,9 @@ product JABLOTRON PC60B 0x0001 PC-60B /* Jaton products */ product JATON EDA 0x5704 Ethernet +/* JMicron products */ +product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge + /* JVC products */ product JVC GR_DX95 0x000a GR-DX95 product JVC MP_PRX1 0x3008 MP-PRX1 Ethernet From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 00:47:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4F02106566B; Thu, 7 Jan 2010 00:47:50 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD9D8FC08; Thu, 7 Jan 2010 00:47:50 +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 o070lok9091016; Thu, 7 Jan 2010 00:47:50 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o070looW091014; Thu, 7 Jan 2010 00:47:50 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001070047.o070looW091014@svn.freebsd.org> From: Attilio Rao Date: Thu, 7 Jan 2010 00:47:50 +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: r201703 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 00:47:50 -0000 Author: attilio Date: Thu Jan 7 00:47:50 2010 New Revision: 201703 URL: http://svn.freebsd.org/changeset/base/201703 Log: Exclusive waiters sleeping with LK_SLEEPFAIL on and using interruptible sleeps/timeout may have left spourious lk_exslpfail counts on, so clean it up even when accessing a shared queue acquisition, giving to lk_exslpfail the value of 'upper limit'. In the worst case scenario, infact (mixed interruptible sleep / LK_SLEEPFAIL waiters) what may happen is that both queues are awaken even if that's not necessary, but still no harm. Reported by: Lucius Windschuh Reviewed by: kib Tested by: pho, Lucius Windschuh Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Thu Jan 7 00:44:54 2010 (r201702) +++ head/sys/kern/kern_lock.c Thu Jan 7 00:47:50 2010 (r201703) @@ -300,7 +300,14 @@ wakeupshlk(struct lock *lk, const char * } } else { - MPASS(lk->lk_exslpfail == 0); + + /* + * Exclusive waiters sleeping with LK_SLEEPFAIL on + * and using interruptible sleeps/timeout may have + * left spourious lk_exslpfail counts on, so clean + * it up anyway. + */ + lk->lk_exslpfail = 0; queue = SQ_SHARED_QUEUE; } @@ -959,7 +966,14 @@ __lockmgr_args(struct lock *lk, u_int fl queue = SQ_SHARED_QUEUE; } } else { - MPASS(lk->lk_exslpfail == 0); + + /* + * Exclusive waiters sleeping with LK_SLEEPFAIL + * on and using interruptible sleeps/timeout + * may have left spourious lk_exslpfail counts + * on, so clean it up anyway. + */ + lk->lk_exslpfail = 0; queue = SQ_SHARED_QUEUE; } @@ -1037,8 +1051,16 @@ __lockmgr_args(struct lock *lk, u_int fl queue = SQ_EXCLUSIVE_QUEUE; v &= ~LK_EXCLUSIVE_WAITERS; } else { + + /* + * Exclusive waiters sleeping with + * LK_SLEEPFAIL on and using + * interruptible sleeps/timeout may + * have left spourious lk_exslpfail + * counts on, so clean it up anyway. + */ MPASS(v & LK_SHARED_WAITERS); - MPASS(lk->lk_exslpfail == 0); + lk->lk_exslpfail = 0; queue = SQ_SHARED_QUEUE; v &= ~LK_SHARED_WAITERS; } From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 00:50:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18E55106568F; Thu, 7 Jan 2010 00:50:46 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 073A58FC15; Thu, 7 Jan 2010 00:50:46 +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 o070okmX091742; Thu, 7 Jan 2010 00:50:46 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o070ojEZ091737; Thu, 7 Jan 2010 00:50:45 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001070050.o070ojEZ091737@svn.freebsd.org> From: Andrew Thompson Date: Thu, 7 Jan 2010 00:50: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: r201705 - head/usr.sbin/usbconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 00:50:46 -0000 Author: thompsa Date: Thu Jan 7 00:50:45 2010 New Revision: 201705 URL: http://svn.freebsd.org/changeset/base/201705 Log: Sync to p4 - Add new quirks commands and the '-d' option optionally to specify the ugen device. Submitted by: Hans Petter Selasky Modified: head/usr.sbin/usbconfig/dump.c head/usr.sbin/usbconfig/dump.h head/usr.sbin/usbconfig/usbconfig.8 head/usr.sbin/usbconfig/usbconfig.c Modified: head/usr.sbin/usbconfig/dump.c ============================================================================== --- head/usr.sbin/usbconfig/dump.c Thu Jan 7 00:48:10 2010 (r201704) +++ head/usr.sbin/usbconfig/dump.c Thu Jan 7 00:50:45 2010 (r201705) @@ -365,3 +365,40 @@ dump_config(struct libusb20_device *pdev } return; } + +void +dump_string_by_index(struct libusb20_device *pdev, uint8_t str_index) +{ + char *pbuf; + uint8_t n; + uint8_t len; + + pbuf = malloc(256); + if (pbuf == NULL) + err(1, "out of memory"); + + if (str_index == 0) { + /* language table */ + if (libusb20_dev_req_string_sync(pdev, + str_index, 0, pbuf, 256)) { + printf("STRING_0x%02x = \n", str_index); + } else { + printf("STRING_0x%02x = ", str_index); + len = (uint8_t)pbuf[0]; + for (n = 0; n != len; n++) { + printf("0x%02x%s", (uint8_t)pbuf[n], + (n != (len-1)) ? ", " : ""); + } + printf("\n"); + } + } else { + /* ordinary string */ + if (libusb20_dev_req_string_simple_sync(pdev, + str_index, pbuf, 256)) { + printf("STRING_0x%02x = \n", str_index); + } else { + printf("STRING_0x%02x = <%s>\n", str_index, pbuf); + } + } + free(pbuf); +} Modified: head/usr.sbin/usbconfig/dump.h ============================================================================== --- head/usr.sbin/usbconfig/dump.h Thu Jan 7 00:48:10 2010 (r201704) +++ head/usr.sbin/usbconfig/dump.h Thu Jan 7 00:50:45 2010 (r201705) @@ -24,11 +24,17 @@ * SUCH DAMAGE. */ +#ifndef _DUMP_H_ +#define _DUMP_H_ + const char *dump_mode(uint8_t value); const char *dump_speed(uint8_t value); const char *dump_power_mode(uint8_t value); +void dump_string_by_index(struct libusb20_device *pdev, uint8_t index); void dump_device_info(struct libusb20_device *pdev, uint8_t show_drv); void dump_be_quirk_names(struct libusb20_backend *pbe); void dump_be_dev_quirks(struct libusb20_backend *pbe); void dump_device_desc(struct libusb20_device *pdev); void dump_config(struct libusb20_device *pdev, uint8_t all_cfg); + +#endif /* _DUMP_H_ */ Modified: head/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.8 Thu Jan 7 00:48:10 2010 (r201704) +++ head/usr.sbin/usbconfig/usbconfig.8 Thu Jan 7 00:50:45 2010 (r201705) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +.\" Copyright (c) 2008-2010 Hans Petter Selasky. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 1, 2009 +.Dd January 6, 2010 .Dt USBCONFIG 8 .Os .Sh NAME @@ -34,6 +34,9 @@ .Op Fl u Ar unit .Op Fl a Ar addr .Op cmds... +.Nm +.Op Fl d Ar [ugen]. +.Op cmds... .Sh DESCRIPTION The .Nm @@ -46,6 +49,9 @@ Limit device range to USB devices connec .It Fl a Ar addr Limit device range to the given USB device index. Should only be used in conjunction with the unit argument. +.It Fl d Ar [ugen]. +Limit device range to USB devices connected to the given unit and address. +The unit and address coordinates may be prefixed by the lowercased word "ugen". .It Fl h Show help and available commands. .El @@ -57,5 +63,34 @@ prints a list of all available USB devic Show information about the device on USB bus 1 at address 2: .Pp .Dl usbconfig -u 1 -a 2 dump_info +.Pp +Dump HID descriptor for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 do_request 0x81 0x06 0x2200 0 0x100 +.Pp +Dump string descriptor at index Z for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_string Z +.Pp +Dump current configuration descriptor for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_curr_config_desc +.Pp +Dump device descriptor for device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_device_desc +.Pp +Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on: +.Pp +.Dl usbconfig -u 1 -a 2 suspend +.Dl usbconfig -u 1 -a 2 resume +.Dl usbconfig -u 1 -a 2 power_off +.Dl usbconfig -u 1 -a 2 power_save +.Dl usbconfig -u 1 -a 2 power_on +.Pp +Display a list of available quirk names: +.Pp +.Dl usbconfig dump_quirk_names +.Pp .Sh SEE ALSO .Xr usb 4 Modified: head/usr.sbin/usbconfig/usbconfig.c ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.c Thu Jan 7 00:48:10 2010 (r201704) +++ head/usr.sbin/usbconfig/usbconfig.c Thu Jan 7 00:50:45 2010 (r201705) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2009 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -81,6 +81,8 @@ struct options { uint8_t got_show_iface_driver:1; uint8_t got_remove_device_quirk:1; uint8_t got_add_device_quirk:1; + uint8_t got_remove_quirk:1; + uint8_t got_add_quirk:1; uint8_t got_dump_string:1; uint8_t got_do_request:1; }; @@ -94,6 +96,7 @@ struct token { enum { T_UNIT, T_ADDR, + T_UGEN, T_IFACE, T_SET_CONFIG, T_SET_ALT, @@ -101,6 +104,8 @@ enum { T_GET_TEMPLATE, T_ADD_DEVICE_QUIRK, T_REMOVE_DEVICE_QUIRK, + T_ADD_QUIRK, + T_REMOVE_QUIRK, T_SHOW_IFACE_DRIVER, T_DUMP_QUIRK_NAMES, T_DUMP_DEVICE_QUIRKS, @@ -124,6 +129,7 @@ static struct options options; static const struct token token[] = { {"-u", T_UNIT, 1}, {"-a", T_ADDR, 1}, + {"-d", T_UGEN, 1}, {"-i", T_IFACE, 1}, {"set_config", T_SET_CONFIG, 1}, {"set_alt", T_SET_ALT, 1}, @@ -131,6 +137,8 @@ static const struct token token[] = { {"get_template", T_GET_TEMPLATE, 0}, {"add_dev_quirk_vplh", T_ADD_DEVICE_QUIRK, 5}, {"remove_dev_quirk_vplh", T_REMOVE_DEVICE_QUIRK, 5}, + {"add_quirk", T_ADD_QUIRK, 1}, + {"remove_quirk", T_REMOVE_QUIRK, 1}, {"dump_quirk_names", T_DUMP_QUIRK_NAMES, 0}, {"dump_device_quirks", T_DUMP_DEVICE_QUIRKS, 0}, {"dump_device_desc", T_DUMP_DEVICE_DESC, 0}, @@ -247,11 +255,20 @@ get_int(const char *s) } static void +duplicate_option(const char *ptr) +{ + printf("Syntax error: " + "Duplicate option: '%s'\n", ptr); + exit(1); +} + +static void usage(void) { printf("" "usbconfig - configure the USB subsystem" "\n" "usage: usbconfig -u -a -i [cmds...]" "\n" + "usage: usbconfig -d [ugen]. -i [cmds...]" "\n" "commands:" "\n" " set_config " "\n" " set_alt " "\n" @@ -259,6 +276,8 @@ usage(void) " get_template" "\n" " add_dev_quirk_vplh " "\n" " remove_dev_quirk_vplh " "\n" + " add_quirk " "\n" + " remove_quirk " "\n" " dump_quirk_names" "\n" " dump_device_quirks" "\n" " dump_device_desc" "\n" @@ -360,25 +379,33 @@ flush_command(struct libusb20_backend *p } matches++; + if (opt->got_remove_quirk) { + struct LIBUSB20_DEVICE_DESC_DECODED *ddesc; + + ddesc = libusb20_dev_get_device_desc(pdev); + + be_dev_remove_quirk(pbe, + ddesc->idVendor, ddesc->idProduct, + ddesc->bcdDevice, ddesc->bcdDevice, + opt->quirkname); + } + + if (opt->got_add_quirk) { + struct LIBUSB20_DEVICE_DESC_DECODED *ddesc; + + ddesc = libusb20_dev_get_device_desc(pdev); + + be_dev_add_quirk(pbe, + ddesc->idVendor, ddesc->idProduct, + ddesc->bcdDevice, ddesc->bcdDevice, + opt->quirkname); + } + if (libusb20_dev_open(pdev, 0)) { err(1, "could not open device"); } if (opt->got_dump_string) { - char *pbuf; - - pbuf = malloc(256); - if (pbuf == NULL) { - err(1, "out of memory"); - } - if (libusb20_dev_req_string_simple_sync(pdev, - opt->string_index, pbuf, 256)) { - printf("STRING_0x%02x = \n", - opt->string_index); - } else { - printf("STRING_0x%02x = <%s>\n", - opt->string_index, pbuf); - } - free(pbuf); + dump_string_by_index(pdev, opt->string_index); } if (opt->got_do_request) { uint16_t actlen; @@ -501,6 +528,9 @@ main(int argc, char **argv) { struct libusb20_backend *pbe; struct options *opt = &options; + const char *ptr; + int unit; + int addr; int n; int t; @@ -518,6 +548,28 @@ main(int argc, char **argv) if (t > 255) t = 255; switch (get_token(argv[n], t)) { + case T_ADD_QUIRK: + if (opt->got_add_quirk) { + flush_command(pbe, opt); + } + opt->quirkname = argv[n + 1]; + n++; + + opt->got_add_quirk = 1; + opt->got_any++; + break; + + case T_REMOVE_QUIRK: + if (opt->got_remove_quirk) { + flush_command(pbe, opt); + } + opt->quirkname = argv[n + 1]; + n++; + + opt->got_remove_quirk = 1; + opt->got_any++; + break; + case T_ADD_DEVICE_QUIRK: if (opt->got_add_device_quirk) { flush_command(pbe, opt); @@ -548,11 +600,15 @@ main(int argc, char **argv) break; case T_DUMP_QUIRK_NAMES: + if (opt->got_dump_quirk_names) + duplicate_option(argv[n]); opt->got_dump_quirk_names = 1; opt->got_any++; break; case T_DUMP_DEVICE_QUIRKS: + if (opt->got_dump_device_quirks) + duplicate_option(argv[n]); opt->got_dump_device_quirks = 1; opt->got_any++; break; @@ -561,6 +617,33 @@ main(int argc, char **argv) opt->got_show_iface_driver = 1; break; + case T_UGEN: + if (opt->got_any) { + /* allow multiple commands on the same line */ + flush_command(pbe, opt); + } + ptr = argv[n + 1]; + + if ((ptr[0] == 'u') && + (ptr[1] == 'g') && + (ptr[2] == 'e') && + (ptr[3] == 'n')) + ptr += 4; + + if ((sscanf(ptr, "%d.%d", + &unit, &addr) != 2) || + (unit < 0) || (unit > 65535) || + (addr < 0) || (addr > 65535)) { + errx(1, "cannot " + "parse '%s'", argv[n + 1]); + } + opt->bus = unit; + opt->addr = addr; + opt->got_bus = 1; +; opt->got_addr = 1; + n++; + break; + case T_UNIT: if (opt->got_any) { /* allow multiple commands on the same line */ @@ -581,84 +664,112 @@ main(int argc, char **argv) n++; break; case T_SET_CONFIG: + if (opt->got_set_config) + duplicate_option(argv[n]); opt->config_index = num_id(argv[n + 1], "cfg_index"); opt->got_set_config = 1; opt->got_any++; n++; break; case T_SET_ALT: + if (opt->got_set_alt) + duplicate_option(argv[n]); opt->alt_index = num_id(argv[n + 1], "cfg_index"); opt->got_set_alt = 1; opt->got_any++; n++; break; case T_SET_TEMPLATE: + if (opt->got_set_template) + duplicate_option(argv[n]); opt->template = get_int(argv[n + 1]); opt->got_set_template = 1; opt->got_any++; n++; break; case T_GET_TEMPLATE: + if (opt->got_get_template) + duplicate_option(argv[n]); opt->got_get_template = 1; opt->got_any++; break; case T_DUMP_DEVICE_DESC: + if (opt->got_dump_device_desc) + duplicate_option(argv[n]); opt->got_dump_device_desc = 1; opt->got_any++; break; case T_DUMP_CURR_CONFIG_DESC: + if (opt->got_dump_curr_config) + duplicate_option(argv[n]); opt->got_dump_curr_config = 1; opt->got_any++; break; case T_DUMP_ALL_CONFIG_DESC: + if (opt->got_dump_all_config) + duplicate_option(argv[n]); opt->got_dump_all_config = 1; opt->got_any++; break; case T_DUMP_INFO: + if (opt->got_dump_info) + duplicate_option(argv[n]); opt->got_dump_info = 1; opt->got_any++; break; case T_DUMP_STRING: - if (opt->got_dump_string) { - flush_command(pbe, opt); - } + if (opt->got_dump_string) + duplicate_option(argv[n]); opt->string_index = num_id(argv[n + 1], "str_index"); opt->got_dump_string = 1; opt->got_any++; n++; break; case T_SUSPEND: + if (opt->got_suspend) + duplicate_option(argv[n]); opt->got_suspend = 1; opt->got_any++; break; case T_RESUME: + if (opt->got_resume) + duplicate_option(argv[n]); opt->got_resume = 1; opt->got_any++; break; case T_POWER_OFF: + if (opt->got_power_off) + duplicate_option(argv[n]); opt->got_power_off = 1; opt->got_any++; break; case T_POWER_SAVE: + if (opt->got_power_save) + duplicate_option(argv[n]); opt->got_power_save = 1; opt->got_any++; break; case T_POWER_ON: + if (opt->got_power_on) + duplicate_option(argv[n]); opt->got_power_on = 1; opt->got_any++; break; case T_RESET: + if (opt->got_reset) + duplicate_option(argv[n]); opt->got_reset = 1; opt->got_any++; break; case T_LIST: + if (opt->got_list) + duplicate_option(argv[n]); opt->got_list = 1; opt->got_any++; break; case T_DO_REQUEST: - if (opt->got_do_request) { - flush_command(pbe, opt); - } + if (opt->got_do_request) + duplicate_option(argv[n]); LIBUSB20_INIT(LIBUSB20_CONTROL_SETUP, &opt->setup); opt->setup.bmRequestType = num_id(argv[n + 1], "bmReqTyp"); opt->setup.bRequest = num_id(argv[n + 2], "bReq"); From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 01:10:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEC12106568F; Thu, 7 Jan 2010 01:10:50 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE3278FC28; Thu, 7 Jan 2010 01:10:50 +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 o071AoQN096477; Thu, 7 Jan 2010 01:10:50 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o071AoeD096476; Thu, 7 Jan 2010 01:10:50 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001070110.o071AoeD096476@svn.freebsd.org> From: Kirk McKusick Date: Thu, 7 Jan 2010 01:10: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: r201708 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 01:10:51 -0000 Author: mckusick Date: Thu Jan 7 01:10:49 2010 New Revision: 201708 URL: http://svn.freebsd.org/changeset/base/201708 Log: Add some error messages suggested in PR bin/138043. The code to correct the problem was added in r176575 by delphij on 2008-02-25. PR: 138043 Reported by: Heikki Suonsivu Modified: head/sbin/fsck_ffs/main.c head/sbin/fsck_ffs/pass1.c Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Thu Jan 7 00:57:40 2010 (r201707) +++ head/sbin/fsck_ffs/main.c Thu Jan 7 01:10:49 2010 (r201708) @@ -406,7 +406,10 @@ checkfilesys(char *filesys) */ if (duplist) { if (preen || usedsoftdep) - pfatal("INTERNAL ERROR: dups with -p"); + pfatal("INTERNAL ERROR: dups with %s%s%s", + preen ? "-p" : "", + (preen && usedsoftdep) ? " and " : "", + usedsoftdep ? "softupdates" : ""); printf("** Phase 1b - Rescan For More DUPS\n"); pass1b(); } Modified: head/sbin/fsck_ffs/pass1.c ============================================================================== --- head/sbin/fsck_ffs/pass1.c Thu Jan 7 00:57:40 2010 (r201707) +++ head/sbin/fsck_ffs/pass1.c Thu Jan 7 01:10:49 2010 (r201708) @@ -98,10 +98,16 @@ pass1(void) rebuildcg = 1; if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) { inosused = cgrp.cg_initediblk; - if (inosused > sblock.fs_ipg) + if (inosused > sblock.fs_ipg) { + pfatal("%s (%d > %d) %s %d\nReset to %d\n", + "Too many initialized inodes", inosused, + sblock.fs_ipg, "in cylinder group", c, + sblock.fs_ipg); inosused = sblock.fs_ipg; - } else + } + } else { inosused = sblock.fs_ipg; + } if (got_siginfo) { printf("%s: phase 1: cyl group %d of %d (%d%%)\n", cdevname, c, sblock.fs_ncg, From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 01:19:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91DDA106566B; Thu, 7 Jan 2010 01:19:01 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67B348FC1C; Thu, 7 Jan 2010 01:19:01 +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 o071J1t4098307; Thu, 7 Jan 2010 01:19:01 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o071J1V9098305; Thu, 7 Jan 2010 01:19:01 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001070119.o071J1V9098305@svn.freebsd.org> From: Attilio Rao Date: Thu, 7 Jan 2010 01:19: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: r201709 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 01:19:01 -0000 Author: attilio Date: Thu Jan 7 01:19:01 2010 New Revision: 201709 URL: http://svn.freebsd.org/changeset/base/201709 Log: Tweak comments. Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Thu Jan 7 01:10:49 2010 (r201708) +++ head/sys/kern/kern_lock.c Thu Jan 7 01:19:01 2010 (r201709) @@ -277,6 +277,11 @@ wakeupshlk(struct lock *lk, const char * * avoid a starvation for the threads sleeping on the shared * queue by giving them precedence and cleaning up the * exclusive waiters bit anyway. + * Please note that lk_exslpfail count may be lying about + * the real number of waiters with the LK_SLEEPFAIL flag on + * because they may be used in conjuction with interruptible + * sleeps so lk_exslpfail is consider as a 'upper limit' + * bound, considering the edge cases. */ realexslp = sleepq_sleepcnt(&lk->lock_object, SQ_EXCLUSIVE_QUEUE); @@ -943,6 +948,12 @@ __lockmgr_args(struct lock *lk, u_int fl * empty avoid a starvation for the threads sleeping * on the shared queue by giving them precedence * and cleaning up the exclusive waiters bit anyway. + * Please note that lk_exslpfail count may be lying + * about the real number of waiters with the + * LK_SLEEPFAIL flag on because they may be used in + * conjuction with interruptible sleeps so + * lk_exslpfail is consider as a 'upper limit' bound, + * considering the edge cases. */ MPASS((x & LK_EXCLUSIVE_SPINNERS) == 0); realexslp = sleepq_sleepcnt(&lk->lock_object, @@ -1046,6 +1057,13 @@ __lockmgr_args(struct lock *lk, u_int fl * threads sleeping on the shared queue by * giving them precedence and cleaning up the * exclusive waiters bit anyway. + * Please note that lk_exslpfail count may be + * lying about the real number of waiters with + * the LK_SLEEPFAIL flag on because they may + * be used in conjuction with interruptible + * sleeps so lk_exslpfail is consider as a + * 'upper limit' bound, considering the edge + * cases. */ if (v & LK_EXCLUSIVE_WAITERS) { queue = SQ_EXCLUSIVE_QUEUE; From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 01:24:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C4A41065694; Thu, 7 Jan 2010 01:24:09 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BCBD8FC14; Thu, 7 Jan 2010 01:24:09 +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 o071O92w099467; Thu, 7 Jan 2010 01:24:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o071O9XX099465; Thu, 7 Jan 2010 01:24:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001070124.o071O9XX099465@svn.freebsd.org> From: Attilio Rao Date: Thu, 7 Jan 2010 01:24: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: r201710 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 01:24:09 -0000 Author: attilio Date: Thu Jan 7 01:24:09 2010 New Revision: 201710 URL: http://svn.freebsd.org/changeset/base/201710 Log: Fix typos. Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Thu Jan 7 01:19:01 2010 (r201709) +++ head/sys/kern/kern_lock.c Thu Jan 7 01:24:09 2010 (r201710) @@ -280,8 +280,8 @@ wakeupshlk(struct lock *lk, const char * * Please note that lk_exslpfail count may be lying about * the real number of waiters with the LK_SLEEPFAIL flag on * because they may be used in conjuction with interruptible - * sleeps so lk_exslpfail is consider as a 'upper limit' - * bound, considering the edge cases. + * sleeps so lk_exslpfail might be considered an 'upper limit' + * bound, including the edge cases. */ realexslp = sleepq_sleepcnt(&lk->lock_object, SQ_EXCLUSIVE_QUEUE); @@ -952,8 +952,8 @@ __lockmgr_args(struct lock *lk, u_int fl * about the real number of waiters with the * LK_SLEEPFAIL flag on because they may be used in * conjuction with interruptible sleeps so - * lk_exslpfail is consider as a 'upper limit' bound, - * considering the edge cases. + * lk_exslpfail might be considered an 'upper limit' + * bound, including the edge cases. */ MPASS((x & LK_EXCLUSIVE_SPINNERS) == 0); realexslp = sleepq_sleepcnt(&lk->lock_object, @@ -1061,8 +1061,8 @@ __lockmgr_args(struct lock *lk, u_int fl * lying about the real number of waiters with * the LK_SLEEPFAIL flag on because they may * be used in conjuction with interruptible - * sleeps so lk_exslpfail is consider as a - * 'upper limit' bound, considering the edge + * sleeps so lk_exslpfail might be considered + * an 'upper limit' bound, including the edge * cases. */ if (v & LK_EXCLUSIVE_WAITERS) { From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 02:25:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22017106568F; Thu, 7 Jan 2010 02:25:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10C0F8FC0A; Thu, 7 Jan 2010 02:25:20 +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 o072PJqF013267; Thu, 7 Jan 2010 02:25:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o072PJjC013265; Thu, 7 Jan 2010 02:25:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001070225.o072PJjC013265@svn.freebsd.org> From: Andrew Thompson Date: Thu, 7 Jan 2010 02:25: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: r201714 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 02:25:20 -0000 Author: thompsa Date: Thu Jan 7 02:25:19 2010 New Revision: 201714 URL: http://svn.freebsd.org/changeset/base/201714 Log: Fix debug printf on 64bit arches. Spotted by: b. f. Modified: head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Thu Jan 7 01:57:13 2010 (r201713) +++ head/sys/dev/usb/usb_msctest.c Thu Jan 7 02:25:19 2010 (r201714) @@ -468,7 +468,7 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", cmd_len, &sc->cbw.CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 04:15:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B5571065696; Thu, 7 Jan 2010 04:15:49 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FAB48FC1C; Thu, 7 Jan 2010 04:15:49 +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 o074Fn8X037683; Thu, 7 Jan 2010 04:15:49 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o074Fnvw037680; Thu, 7 Jan 2010 04:15:49 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001070415.o074Fnvw037680@svn.freebsd.org> From: David Xu Date: Thu, 7 Jan 2010 04:15: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: r201715 - in head: lib/libc/gen tools/regression/posixsem2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 04:15:49 -0000 Author: davidxu Date: Thu Jan 7 04:15:49 2010 New Revision: 201715 URL: http://svn.freebsd.org/changeset/base/201715 Log: Don't forget to use fourth argument if O_CREAT is set in argument oflag. The fourth specifies initial value for the semaphore. Modified: head/lib/libc/gen/sem_new.c head/tools/regression/posixsem2/semtest.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Thu Jan 7 02:25:19 2010 (r201714) +++ head/lib/libc/gen/sem_new.c Thu Jan 7 04:15:49 2010 (r201715) @@ -143,6 +143,7 @@ _sem_open(const char *name, int flags, . struct sem_nameinfo *ni = NULL; sem_t *sem = NULL; int fd = -1, mode, len; + int value = 0; if (name[0] != '/') { errno = EINVAL; @@ -170,6 +171,7 @@ _sem_open(const char *name, int flags, . if (flags & O_CREAT) { va_start(ap, flags); mode = va_arg(ap, int); + value = va_arg(ap, int); va_end(ap); } @@ -203,7 +205,7 @@ _sem_open(const char *name, int flags, . tmp._magic = SEM_MAGIC; tmp._kern._has_waiters = 0; - tmp._kern._count = 0; + tmp._kern._count = value; tmp._kern._flags = USYNC_PROCESS_SHARED | SEM_NAMED; if (_write(fd, &tmp, sizeof(tmp)) != sizeof(tmp)) { flock(fd, LOCK_UN); Modified: head/tools/regression/posixsem2/semtest.c ============================================================================== --- head/tools/regression/posixsem2/semtest.c Thu Jan 7 02:25:19 2010 (r201714) +++ head/tools/regression/posixsem2/semtest.c Thu Jan 7 04:15:49 2010 (r201715) @@ -58,10 +58,10 @@ test_named(void) printf("testing named process-shared semaphore\n"); sem_unlink(SEM_NAME); - s = sem_open(SEM_NAME, O_CREAT, 0777); + s = sem_open(SEM_NAME, O_CREAT, 0777, 0); if (s == SEM_FAILED) err(1, "sem_open failed"); - s2 = sem_open(SEM_NAME, O_CREAT, 0777); + s2 = sem_open(SEM_NAME, O_CREAT, 0777, 0); if (s2 == SEM_FAILED) err(2, "second sem_open call failed"); if (s != s2) From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 04:47:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1F51065672; Thu, 7 Jan 2010 04:47:09 +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 BA0748FC19; Thu, 7 Jan 2010 04:47:09 +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 o074l9m3044656; Thu, 7 Jan 2010 04:47:09 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o074l918044653; Thu, 7 Jan 2010 04:47:09 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001070447.o074l918044653@svn.freebsd.org> From: Alan Cox Date: Thu, 7 Jan 2010 04:47: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: r201716 - in head/sys/i386: i386 xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 04:47:09 -0000 Author: alc Date: Thu Jan 7 04:47:09 2010 New Revision: 201716 URL: http://svn.freebsd.org/changeset/base/201716 Log: Eliminate unused variables (see r137912). Modified: head/sys/i386/i386/locore.s head/sys/i386/xen/locore.s Modified: head/sys/i386/i386/locore.s ============================================================================== --- head/sys/i386/i386/locore.s Thu Jan 7 04:15:49 2010 (r201715) +++ head/sys/i386/i386/locore.s Thu Jan 7 04:47:09 2010 (r201716) @@ -110,9 +110,7 @@ IdlePDPT: .long 0 /* phys addr of kerne KPTphys: .long 0 /* phys addr of kernel page tables */ .globl proc0kstack -proc0uarea: .long 0 /* address of proc 0 uarea (unused)*/ proc0kstack: .long 0 /* address of proc 0 kstack space */ -p0upa: .long 0 /* phys addr of proc0 UAREA (unused) */ p0kpa: .long 0 /* phys addr of proc0's STACK */ vm86phystk: .long 0 /* PA of vm86/bios stack */ Modified: head/sys/i386/xen/locore.s ============================================================================== --- head/sys/i386/xen/locore.s Thu Jan 7 04:15:49 2010 (r201715) +++ head/sys/i386/xen/locore.s Thu Jan 7 04:47:09 2010 (r201716) @@ -152,9 +152,7 @@ KPTphys: .long 0 /* phys addr of kernel gdtset: .long 0 /* GDT is valid */ .globl proc0kstack -proc0uarea: .long 0 /* address of proc 0 uarea (unused)*/ proc0kstack: .long 0 /* address of proc 0 kstack space */ -p0upa: .long 0 /* phys addr of proc0 UAREA (unused) */ p0kpa: .long 0 /* phys addr of proc0's STACK */ vm86phystk: .long 0 /* PA of vm86/bios stack */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 05:04:15 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5588A1065693; Thu, 7 Jan 2010 05:04:15 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 888B48FC1A; Thu, 7 Jan 2010 05:04:14 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0754CGd085737; Thu, 7 Jan 2010 08:04:12 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1262840652; bh=l3kyg3rPFbynmV0cAUesUeu3I4E8lSugddtOu/ECFAY=; l=1078; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=fyjlfFU9Cpor/queBDrjGZ9Nt6qFpZ0iPaJfUW4Uqi+vrojgiDn9pb8SPqc+xULZU RqriVa7rk90fXekuNf1BS8+LI0bM+hU08yoQ1BN9QlB2mSpI9mnk3eUaU5WrlaUawy rX/5LEwH0bCL3cmwDUGdkCu4nzySHmsWBRNQRtZ4= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0754Bx7085736; Thu, 7 Jan 2010 08:04:11 +0300 (MSK) (envelope-from ache) Date: Thu, 7 Jan 2010 08:04:10 +0300 From: Andrey Chernov To: Konstantin Belousov Message-ID: <20100107050409.GA85573@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Konstantin Belousov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201001052020.o05KKVEp002337@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001052020.o05KKVEp002337@svn.freebsd.org> 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: r201604 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 05:04:15 -0000 On Tue, Jan 05, 2010 at 08:20:31PM +0000, Konstantin Belousov wrote: > * Alphabetic order comparison routine for those who want it. > + * > + * XXXKIB POSIX 2008 requires the alphasort() to use strcoll(). Keep > + * strcmp() for now, since environment locale settings could have no > + * relevance for the byte sequence of the file name. Moreover, it > + * might be even invalid sequence in current locale, and then > + * behaviour of alphasort would be undefined. > */ This is wrong turn. Exact the same can be said about text files: "environment locale settings could have no relevance for the byte sequence of the text. Moreover, it might be even invalid sequence in current locale, and then behaviour of sort would be undefined". Despite of this, we use localized sort in the system. You made result of something like 'ls | sort' and alphasort() differs. Please use strcoll() as POSIX said. It is user responsibility to set correct locale for non-suid programs, and for suid ones locale can't be set by user. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 06:20:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF64D1065672; Thu, 7 Jan 2010 06:20:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD63F8FC21; Thu, 7 Jan 2010 06:20: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 o076K7Ba064980; Thu, 7 Jan 2010 06:20:07 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o076K7uA064978; Thu, 7 Jan 2010 06:20:07 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201001070620.o076K7uA064978@svn.freebsd.org> From: Kirk McKusick Date: Thu, 7 Jan 2010 06:20: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: r201717 - head/sys/ufs/ufs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 06:20:08 -0000 Author: mckusick Date: Thu Jan 7 06:20:07 2010 New Revision: 201717 URL: http://svn.freebsd.org/changeset/base/201717 Log: KASSERT that condition raised by Coverity cannot happen. Found by: Coverity Prevent (tm) KASSERT by: sam Modified: head/sys/ufs/ufs/ufs_dirhash.c Modified: head/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- head/sys/ufs/ufs/ufs_dirhash.c Thu Jan 7 04:47:09 2010 (r201716) +++ head/sys/ufs/ufs/ufs_dirhash.c Thu Jan 7 06:20:07 2010 (r201717) @@ -632,6 +632,7 @@ restart: goto fail; } } + KASSERT(bp != NULL, ("no buffer allocated")); dp = (struct direct *)(bp->b_data + (offset & bmask)); if (dp->d_reclen == 0 || dp->d_reclen > DIRBLKSIZ - (offset & (DIRBLKSIZ - 1))) { From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 09:28:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3DD5106566C; Thu, 7 Jan 2010 09:28:17 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 939708FC15; Thu, 7 Jan 2010 09:28: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 o079SHqZ007079; Thu, 7 Jan 2010 09:28:17 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o079SHKU007077; Thu, 7 Jan 2010 09:28:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001070928.o079SHKU007077@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 09:28: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: r201722 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 09:28:17 -0000 Author: luigi Date: Thu Jan 7 09:28:17 2010 New Revision: 201722 URL: http://svn.freebsd.org/changeset/base/201722 Log: put ip_len in correct order for ip_output(). This prevents a panic when ipfw generates packets on its own (such as reject or keepalives for dynamic rules). Reported by: Chagin Dmitry Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jan 7 09:21:13 2010 (r201721) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jan 7 09:28:17 2010 (r201722) @@ -1002,7 +1002,8 @@ ipfw_send_pkt(struct mbuf *replyto, stru h->ip_hl = sizeof(*h) >> 2; h->ip_tos = IPTOS_LOWDELAY; h->ip_off = 0; - h->ip_len = htons(len); + /* ip_len must be in host format for ip_output */ + h->ip_len = len; h->ip_ttl = V_ip_defttl; h->ip_sum = 0; break; From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 09:40:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3230C1065694; Thu, 7 Jan 2010 09:40:35 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 059F18FC1B; Thu, 7 Jan 2010 09:40:35 +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 o079eYv7010175; Thu, 7 Jan 2010 09:40:34 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o079eYav010173; Thu, 7 Jan 2010 09:40:34 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001070940.o079eYav010173@svn.freebsd.org> From: David Malone Date: Thu, 7 Jan 2010 09:40: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: r201724 - head/usr.sbin/cdcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 09:40:35 -0000 Author: dwmalone Date: Thu Jan 7 09:40:34 2010 New Revision: 201724 URL: http://svn.freebsd.org/changeset/base/201724 Log: This now passes a make universe with WARNS=6. Modified: head/usr.sbin/cdcontrol/Makefile Modified: head/usr.sbin/cdcontrol/Makefile ============================================================================== --- head/usr.sbin/cdcontrol/Makefile Thu Jan 7 09:37:59 2010 (r201723) +++ head/usr.sbin/cdcontrol/Makefile Thu Jan 7 09:40:34 2010 (r201724) @@ -2,8 +2,6 @@ PROG= cdcontrol -WARNS?= 3 - DPADD= ${LIBEDIT} ${LIBTERMCAP} LDADD= -ledit -ltermcap From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 09:45:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6081F106566B; Thu, 7 Jan 2010 09:45:15 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5057D8FC25; Thu, 7 Jan 2010 09:45:15 +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 o079jF8m011265; Thu, 7 Jan 2010 09:45:15 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o079jFHn011263; Thu, 7 Jan 2010 09:45:15 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001070945.o079jFHn011263@svn.freebsd.org> From: David Malone Date: Thu, 7 Jan 2010 09:45: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: r201725 - head/usr.bin/xlint/xlint X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 09:45:15 -0000 Author: dwmalone Date: Thu Jan 7 09:45:15 2010 New Revision: 201725 URL: http://svn.freebsd.org/changeset/base/201725 Log: This now passes a make universe with WARNS=6. Modified: head/usr.bin/xlint/xlint/Makefile Modified: head/usr.bin/xlint/xlint/Makefile ============================================================================== --- head/usr.bin/xlint/xlint/Makefile Thu Jan 7 09:40:34 2010 (r201724) +++ head/usr.bin/xlint/xlint/Makefile Thu Jan 7 09:45:15 2010 (r201725) @@ -11,7 +11,5 @@ MAN= lint.1 CFLAGS+=-I${.CURDIR}/../lint1 CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}\" -WARNS?= 2 - .include "${.CURDIR}/../../Makefile.inc" .include From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 09:47:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48730106566C; Thu, 7 Jan 2010 09:47:06 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1D48FC23; Thu, 7 Jan 2010 09:47:06 +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 o079l6bv011769; Thu, 7 Jan 2010 09:47:06 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o079l6et011767; Thu, 7 Jan 2010 09:47:06 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001070947.o079l6et011767@svn.freebsd.org> From: David Malone Date: Thu, 7 Jan 2010 09:47: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: r201727 - head/usr.bin/w X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 09:47:06 -0000 Author: dwmalone Date: Thu Jan 7 09:47:05 2010 New Revision: 201727 URL: http://svn.freebsd.org/changeset/base/201727 Log: This now passes a make universe with WARNS=6. Modified: head/usr.bin/w/Makefile Modified: head/usr.bin/w/Makefile ============================================================================== --- head/usr.bin/w/Makefile Thu Jan 7 09:45:17 2010 (r201726) +++ head/usr.bin/w/Makefile Thu Jan 7 09:47:05 2010 (r201727) @@ -10,8 +10,6 @@ LDADD= -lkvm -lulog -lutil #BINMODE=2555 LINKS= ${BINDIR}/w ${BINDIR}/uptime -WARNS?= 1 - .PATH: ${.CURDIR}/../../bin/ps .include From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 10:08:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F17FB106566C; Thu, 7 Jan 2010 10:08:05 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0C598FC13; Thu, 7 Jan 2010 10:08: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 o07A8556016709; Thu, 7 Jan 2010 10:08:05 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07A85KV016703; Thu, 7 Jan 2010 10:08:05 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071008.o07A85KV016703@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 10:08: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: r201732 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 10:08:06 -0000 Author: luigi Date: Thu Jan 7 10:08:05 2010 New Revision: 201732 URL: http://svn.freebsd.org/changeset/base/201732 Log: some header shuffling to help decoupling ip_divert from ipfw Modified: head/sys/netinet/ipfw/ip_dummynet.c head/sys/netinet/ipfw/ip_fw_log.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/ipfw/ip_fw_sockopt.c head/sys/netinet/ipfw/ip_fw_table.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 7 10:08:05 2010 (r201732) @@ -52,8 +52,6 @@ __FBSDID("$FreeBSD$"); * 000601: WF2Q support * 000106: large rewrite, use heaps to handle very many pipes. * 980513: initial release - * - * include files marked with XXX are probably not needed */ #include @@ -75,10 +73,10 @@ __FBSDID("$FreeBSD$"); #include #include #include /* ip_len, ip_off */ +#include /* ip_output(), IP_FORWARDING */ #include #include #include -#include /* ip_output(), IP_FORWARDING */ #include /* various ether_* routines */ Modified: head/sys/netinet/ipfw/ip_fw_log.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_log.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_log.c Thu Jan 7 10:08:05 2010 (r201732) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Thu Jan 7 10:08:05 2010 (r201732) @@ -73,12 +73,6 @@ static VNET_DEFINE(int, fw6_enable) = 1; int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); -/* Divert hooks. */ -void (*ip_divert_ptr)(struct mbuf *m, int incoming); - -/* ng_ipfw hooks. */ -ng_ipfw_input_t *ng_ipfw_input_p = NULL; - /* Forward declarations. */ static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int); @@ -219,7 +213,7 @@ again: case IP_FW_NGTEE: case IP_FW_NETGRAPH: - if (!NG_IPFW_LOADED) { + if (ng_ipfw_input_p == NULL) { ret = EACCES; break; /* i.e. drop */ } Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Thu Jan 7 10:08:05 2010 (r201732) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* hooks */ #include #include @@ -676,7 +677,7 @@ check_ipfw_struct(struct ip_fw *rule, in goto check_size; case O_NETGRAPH: case O_NGTEE: - if (!NG_IPFW_LOADED) + if (ng_ipfw_input_p == NULL) return EINVAL; else goto check_size; Modified: head/sys/netinet/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_table.c Thu Jan 7 10:06:09 2010 (r201731) +++ head/sys/netinet/ipfw/ip_fw_table.c Thu Jan 7 10:08:05 2010 (r201732) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* struct ipfw_rule_ref */ #include #include From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 10:27:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B20AC1065679; Thu, 7 Jan 2010 10:27:52 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A20CC8FC12; Thu, 7 Jan 2010 10:27:52 +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 o07ARqu1021116; Thu, 7 Jan 2010 10:27:52 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07ARqaR021114; Thu, 7 Jan 2010 10:27:52 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071027.o07ARqaR021114@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 10:27: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: r201734 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 10:27:52 -0000 Author: luigi Date: Thu Jan 7 10:27:52 2010 New Revision: 201734 URL: http://svn.freebsd.org/changeset/base/201734 Log: put ip_var before ip_fw_private.h as this will be needed in the near future Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Jan 7 10:23:07 2010 (r201733) +++ head/sys/net/if_ethersubr.c Thu Jan 7 10:27:52 2010 (r201734) @@ -70,10 +70,10 @@ #include #include #include +#include #include #include #include -#include #endif #ifdef INET6 #include From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 10:39:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23C121065692; Thu, 7 Jan 2010 10:39:16 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11FE38FC1A; Thu, 7 Jan 2010 10:39:16 +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 o07AdFU8025878; Thu, 7 Jan 2010 10:39:15 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07AdF6m025873; Thu, 7 Jan 2010 10:39:15 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071039.o07AdF6m025873@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 10:39: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: r201735 - in head/sys/netinet: . ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 10:39:16 -0000 Author: luigi Date: Thu Jan 7 10:39:15 2010 New Revision: 201735 URL: http://svn.freebsd.org/changeset/base/201735 Log: Following up on a request from Ermal Luci to make ip_divert work as a client of pf(4), make ip_divert not depend on ipfw. This is achieved by moving to ip_var.h the struct ipfw_rule_ref (which is part of the mtag for all reinjected packets) and other declarations of global variables, and moving to raw_ip.c global variables for filter and divert hooks. Note that names and locations could be made more generic (ipfw_rule_ref is really a generic reference robust to reconfigurations; the packet filter is not necessarily ipfw; filters and their clients are not necessarily limited to ipv4), but _right now_ most of this stuff works on ipfw and ipv4, so i don't feel like doing a gratuitous renaming, at least for the time being. Modified: head/sys/netinet/ip_divert.c head/sys/netinet/ip_var.h head/sys/netinet/ipfw/ip_fw_private.h head/sys/netinet/raw_ip.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Thu Jan 7 10:27:52 2010 (r201734) +++ head/sys/netinet/ip_divert.c Thu Jan 7 10:39:15 2010 (r201735) @@ -32,14 +32,10 @@ __FBSDID("$FreeBSD$"); #if !defined(KLD_MODULE) #include "opt_inet.h" -#include "opt_ipfw.h" #include "opt_sctp.h" #ifndef INET #error "IPDIVERT requires INET." #endif -#ifndef IPFIREWALL -#error "IPDIVERT requires IPFIREWALL" -#endif #endif #include @@ -55,10 +51,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include #include #include @@ -66,8 +62,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #ifdef SCTP #include #endif @@ -85,27 +79,29 @@ __FBSDID("$FreeBSD$"); #define DIVRCVQ (65536 + 100) /* - * Divert sockets work in conjunction with ipfw, see the divert(4) - * manpage for features. - * Internally, packets selected by ipfw in ip_input() or ip_output(), - * and never diverted before, are passed to the input queue of the - * divert socket with a given 'divert_port' number (as specified in - * the matching ipfw rule), and they are tagged with a 16 bit cookie - * (representing the rule number of the matching ipfw rule), which - * is passed to process reading from the socket. + * Divert sockets work in conjunction with ipfw or other packet filters, + * see the divert(4) manpage for features. + * Packets are selected by the packet filter and tagged with an + * MTAG_IPFW_RULE tag carrying the 'divert port' number (as set by + * the packet filter) and information on the matching filter rule for + * subsequent reinjection. The divert_port is used to put the packet + * on the corresponding divert socket, while the rule number is passed + * up (at least partially) as the sin_port in the struct sockaddr. * - * Packets written to the divert socket are again tagged with a cookie - * (usually the same as above) and a destination address. - * If the destination address is INADDR_ANY then the packet is - * treated as outgoing and sent to ip_output(), otherwise it is - * treated as incoming and sent to ip_input(). - * In both cases, the packet is tagged with the cookie. + * Packets written to the divert socket carry in sin_addr a + * destination address, and in sin_port the number of the filter rule + * after which to continue processing. + * If the destination address is INADDR_ANY, the packet is treated as + * as outgoing and sent to ip_output(); otherwise it is treated as + * incoming and sent to ip_input(). + * Further, sin_zero carries some information on the interface, + * which can be used in the reinject -- see comments in the code. * * On reinjection, processing in ip_input() and ip_output() * will be exactly the same as for the original packet, except that - * ipfw processing will start at the rule number after the one - * written in the cookie (so, tagging a packet with a cookie of 0 - * will cause it to be effectively considered as a standard packet). + * packet filter processing will start at the rule number after the one + * written in the sin_port (ipfw does not allow a rule #0, so sin_port=0 + * will apply the entire ruleset to the packet). */ /* Internal variables. */ Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Jan 7 10:27:52 2010 (r201734) +++ head/sys/netinet/ip_var.h Thu Jan 7 10:39:15 2010 (r201735) @@ -249,7 +249,43 @@ VNET_DECLARE(struct pfil_head, inet_pfil void in_delayed_cksum(struct mbuf *m); -/* ipfw and dummynet hooks. Most are declared in raw_ip.c */ +/* Hooks for ipfw, dummynet, divert etc. Most are declared in raw_ip.c */ +/* + * Reference to an ipfw or packet filter rule that can be carried + * outside critical sections. + * A rule is identified by rulenum:rule_id which is ordered. + * In version chain_id the rule can be found in slot 'slot', so + * we don't need a lookup if chain_id == chain->id. + * + * On exit from the firewall this structure refers to the rule after + * the matching one (slot points to the new rule; rulenum:rule_id-1 + * is the matching rule), and additional info (e.g. info often contains + * the insn argument or tablearg in the low 16 bits, in host format). + * On entry, the structure is valid if slot>0, and refers to the starting + * rules. 'info' contains the reason for reinject, e.g. divert port, + * divert direction, and so on. + */ +struct ipfw_rule_ref { + uint32_t slot; /* slot for matching rule */ + uint32_t rulenum; /* matching rule number */ + uint32_t rule_id; /* matching rule id */ + uint32_t chain_id; /* ruleset id */ + uint32_t info; /* see below */ +}; + +enum { + IPFW_INFO_MASK = 0x0000ffff, + IPFW_INFO_OUT = 0x00000000, /* outgoing, just for convenience */ + IPFW_INFO_IN = 0x80000000, /* incoming, overloads dir */ + IPFW_ONEPASS = 0x40000000, /* One-pass, do not reinject */ + IPFW_IS_MASK = 0x30000000, /* which source ? */ + IPFW_IS_DIVERT = 0x20000000, + IPFW_IS_DUMMYNET =0x10000000, + IPFW_IS_PIPE = 0x08000000, /* pip1=1, queue = 0 */ +}; +#define MTAG_IPFW 1148380143 /* IPFW-tagged cookie */ +#define MTAG_IPFW_RULE 1262273568 /* rule reference */ + struct ip_fw_args; typedef int (*ip_fw_chk_ptr_t)(struct ip_fw_args *args); typedef int (*ip_fw_ctl_ptr_t)(struct sockopt *); @@ -258,9 +294,14 @@ VNET_DECLARE(ip_fw_ctl_ptr_t, ip_fw_ctl_ #define V_ip_fw_chk_ptr VNET(ip_fw_chk_ptr) #define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) +/* Divert hooks. */ +extern void (*ip_divert_ptr)(struct mbuf *m, int incoming); +/* ng_ipfw hooks -- XXX make it the same as divert and dummynet */ +extern int (*ng_ipfw_input_p)(struct mbuf **, int, + struct ip_fw_args *, int); + extern int (*ip_dn_ctl_ptr)(struct sockopt *); -extern int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa); -extern void (*ip_dn_ruledel_ptr)(void *); /* in ip_fw2.c */ +extern int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); VNET_DECLARE(int, ip_do_randomid); #define V_ip_do_randomid VNET(ip_do_randomid) Modified: head/sys/netinet/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_fw_private.h Thu Jan 7 10:27:52 2010 (r201734) +++ head/sys/netinet/ipfw/ip_fw_private.h Thu Jan 7 10:39:15 2010 (r201735) @@ -35,8 +35,6 @@ #ifdef _KERNEL -#define MTAG_IPFW 1148380143 /* IPFW-tagged cookie */ -#define MTAG_IPFW_RULE 1262273568 /* rule reference */ /* Return values from ipfw_chk() */ enum { @@ -66,38 +64,6 @@ struct _ip6dn_args { struct route_in6 ro_pmtu_or; }; -/* - * Reference to an ipfw rule that can be carried outside critical sections. - * A rule is identified by rulenum:rule_id which is ordered. - * In version chain_id the rule can be found in slot 'slot', so - * we don't need a lookup if chain_id == chain->id. - * - * On exit from the firewall this structure refers to the rule after - * the matching one (slot points to the new rule; rulenum:rule_id-1 - * is the matching rule), and additional info (e.g. info often contains - * the insn argument or tablearg in the low 16 bits, in host format). - * On entry, the structure is valid if slot>0, and refers to the starting - * rules. 'info' contains the reason for reinject, e.g. divert port, - * divert direction, and so on. - */ -struct ipfw_rule_ref { - uint32_t slot; /* slot for matching rule */ - uint32_t rulenum; /* matching rule number */ - uint32_t rule_id; /* matching rule id */ - uint32_t chain_id; /* ruleset id */ - uint32_t info; /* see below */ -}; - -enum { - IPFW_INFO_MASK = 0x0000ffff, - IPFW_INFO_OUT = 0x00000000, /* outgoing, just for convenience */ - IPFW_INFO_IN = 0x80000000, /* incoming, overloads dir */ - IPFW_ONEPASS = 0x40000000, /* One-pass, do not reinject */ - IPFW_IS_MASK = 0x30000000, /* which source ? */ - IPFW_IS_DIVERT = 0x20000000, - IPFW_IS_DUMMYNET =0x10000000, - IPFW_IS_PIPE = 0x08000000, /* pip1=1, queue = 0 */ -}; /* * Arguments for calling ipfw_chk() and dummynet_io(). We put them @@ -289,10 +255,7 @@ int ipfw_del_table_entry(struct ip_fw_ch int ipfw_count_table(struct ip_fw_chain *ch, uint32_t tbl, uint32_t *cnt); int ipfw_dump_table(struct ip_fw_chain *ch, ipfw_table *tbl); -/* hooks for divert */ -extern void (*ip_divert_ptr)(struct mbuf *m, int incoming); - -/* In ip_fw_nat.c */ +/* In ip_fw_nat.c -- XXX to be moved to ip_var.h */ extern struct cfg_nat *(*lookup_nat_ptr)(struct nat_list *, int); @@ -307,14 +270,5 @@ extern ipfw_nat_cfg_t *ipfw_nat_del_ptr; extern ipfw_nat_cfg_t *ipfw_nat_get_cfg_ptr; extern ipfw_nat_cfg_t *ipfw_nat_get_log_ptr; -/* netgraph prototypes */ - -typedef int ng_ipfw_input_t(struct mbuf **, int, struct ip_fw_args *, int); -extern ng_ipfw_input_t *ng_ipfw_input_p; -#define NG_IPFW_LOADED (ng_ipfw_input_p != NULL) - -#define TAGSIZ (sizeof(struct ng_ipfw_tag) - sizeof(struct m_tag)) - - #endif /* _KERNEL */ #endif /* _IPFW2_PRIVATE_H */ Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu Jan 7 10:27:52 2010 (r201734) +++ head/sys/netinet/raw_ip.c Thu Jan 7 10:39:15 2010 (r201735) @@ -80,14 +80,18 @@ VNET_DEFINE(struct inpcbinfo, ripcbinfo) #define V_ripcbinfo VNET(ripcbinfo) /* - * Control and data hooks for ipfw and dummynet. + * Control and data hooks for ipfw, dummynet, divert and so on. * The data hooks are not used here but it is convenient * to keep them all in one place. */ VNET_DEFINE(ip_fw_chk_ptr_t, ip_fw_chk_ptr) = NULL; VNET_DEFINE(ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) = NULL; -int (*ip_dn_ctl_ptr)(struct sockopt *) = NULL; -int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa) = NULL; + +int (*ip_dn_ctl_ptr)(struct sockopt *); +int (*ip_dn_io_ptr)(struct mbuf **, int, struct ip_fw_args *); +void (*ip_divert_ptr)(struct mbuf *, int); +int (*ng_ipfw_input_p)(struct mbuf **, int, + struct ip_fw_args *, int); /* * Hooks for multicast routing. They all default to NULL, so leave them not From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 11:29:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B00861065670; Thu, 7 Jan 2010 11:29:36 +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 889A58FC12; Thu, 7 Jan 2010 11:29:36 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 1232E46B2E; Thu, 7 Jan 2010 06:29:36 -0500 (EST) Date: Thu, 7 Jan 2010 11:29:35 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Luigi Rizzo In-Reply-To: <20100104190024.GA47532@onelab2.iet.unipi.it> Message-ID: References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> 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-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Michael Tuexen Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 11:29:36 -0000 On Mon, 4 Jan 2010, Luigi Rizzo wrote: > taking a random commit to this tree -- would you guys consider moving the > sctp sources to its own directory, e.g. netinet/sctp/ or something that > suits better ? > > It would help to browse through the directory: > > NAME FILES LINES > > netinet/ 156 153k > sctp* 36 66k > tcp* 24 16k > ipfw/ 9 9k > > > I understand that some of the headers should remain in netinet/ but surely > the code is not bound to a specific place... Keep in mind that every file rename invalidates outstanding patch sets against those files maintained in our own branches, and at external vendors. I think we should be cautious about gratuitous renaming, as it increases the work factor both inside and outside the project significantly for relatively little gain. Especially when the files already have a quite consistent naming scheme that makes it easy to know which files belong to which component -- tcp_*, sctp_*, udp_*, etc. Robert N M Watson Computer Laboratory University of Cambridge > > cheers > luigi > > On Mon, Jan 04, 2010 at 06:25:38PM +0000, Michael Tuexen wrote: >> Author: tuexen >> Date: Mon Jan 4 18:25:38 2010 >> New Revision: 201523 >> URL: http://svn.freebsd.org/changeset/base/201523 >> >> Log: >> Correct usage of parenthesis. >> >> PR: kern/142066 >> Approved by: rrs (mentor) >> Obtained from: Henning Petersen, Bruce Cran. >> MFC after: 2 weeks >> >> Modified: >> head/sys/netinet/sctp_pcb.c >> >> Modified: head/sys/netinet/sctp_pcb.c >> ============================================================================== >> --- head/sys/netinet/sctp_pcb.c Mon Jan 4 18:21:27 2010 (r201522) >> +++ head/sys/netinet/sctp_pcb.c Mon Jan 4 18:25:38 2010 (r201523) >> @@ -5528,7 +5528,7 @@ sctp_pcb_init() >> >> /* Init the TIMEWAIT list */ >> for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { >> - LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); >> + LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); >> } >> >> #if defined(SCTP_USE_THREAD_BASED_ITERATOR) >> @@ -6385,7 +6385,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp >> } >> skip_vtag_check: >> >> - chain = &SCTP_BASE_INFO(vtag_timewait[(tag % SCTP_STACK_VTAG_HASH_SIZE))]; >> + chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; >> /* Now what about timed wait ? */ >> if (!LIST_EMPTY(chain)) { >> /* > From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 11:30:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C88E41065672; Thu, 7 Jan 2010 11:30:54 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B80AD8FC12; Thu, 7 Jan 2010 11:30:54 +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 o07BUsMO037290; Thu, 7 Jan 2010 11:30:54 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07BUsOv037288; Thu, 7 Jan 2010 11:30:54 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <201001071130.o07BUsOv037288@svn.freebsd.org> From: Daniel Gerzo Date: Thu, 7 Jan 2010 11:30: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: r201736 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 11:30:54 -0000 Author: danger (doc committer) Date: Thu Jan 7 11:30:54 2010 New Revision: 201736 URL: http://svn.freebsd.org/changeset/base/201736 Log: - s/unsecure/insecure/ as this is the correct keyword Modified: head/share/man/man7/security.7 Modified: head/share/man/man7/security.7 ============================================================================== --- head/share/man/man7/security.7 Thu Jan 7 10:39:15 2010 (r201735) +++ head/share/man/man7/security.7 Thu Jan 7 11:30:54 2010 (r201736) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2006 +.Dd January 7, 2010 .Dt SECURITY 7 .Os .Sh NAME @@ -175,7 +175,7 @@ outside of the console or possibly even .Xr su 1 utility. For example, make sure that your PTYs are specified as being -.Dq Li unsecure +.Dq Li insecure in the .Pa /etc/ttys file From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 11:32:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB3A1106566B; Thu, 7 Jan 2010 11:32:30 +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 B26918FC14; Thu, 7 Jan 2010 11:32:30 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 60C0F46B38; Thu, 7 Jan 2010 06:32:30 -0500 (EST) Date: Thu, 7 Jan 2010 11:32:30 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Luigi Rizzo In-Reply-To: <20100104222323.GA49068@onelab2.iet.unipi.it> Message-ID: References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> <20100104222323.GA49068@onelab2.iet.unipi.it> 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-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Michael Tuexen Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 11:32:31 -0000 On Mon, 4 Jan 2010, Luigi Rizzo wrote: > I also think that the name of the new directory or the exact percentage of > ipv4-ness or netinet-ness of the sctp* and tcp* and multicast* stuff is > irrelevant. Moving directories with svn is so easy that we should not worry > even if we need a couple of attempts to find a good name. This is simply not the case. It's easy to rename in the parent branch, but that rename is propagated poorly to children branches, where developers will have to manually reconstruct changes made to the old file and apply them by hand to the new file. It's even worse when things are propagated from one repository to another, as all of our downstream vendors do, importing them into some vast combination of {CVS, SVN, P4, git, ..}. Why create unnecessary work for everyone? Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 12:00:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 898E61065679; Thu, 7 Jan 2010 12:00:54 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 793BA8FC1F; Thu, 7 Jan 2010 12:00:54 +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 o07C0sVa044095; Thu, 7 Jan 2010 12:00:54 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07C0sKR044093; Thu, 7 Jan 2010 12:00:54 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071200.o07C0sKR044093@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 12:00: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: r201740 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 12:00:54 -0000 Author: luigi Date: Thu Jan 7 12:00:54 2010 New Revision: 201740 URL: http://svn.freebsd.org/changeset/base/201740 Log: check that we have an ipv4 packet before swapping ip_len and ip_off. This should fix the handling of ipv6 packets which i broke when i made ipfw operate on packets in network format. Reported by: Hajimu UMEMOTO Modified: head/sys/netinet/ipfw/ip_fw_pfil.c Modified: head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_pfil.c Thu Jan 7 11:54:36 2010 (r201739) +++ head/sys/netinet/ipfw/ip_fw_pfil.c Thu Jan 7 12:00:54 2010 (r201740) @@ -104,7 +104,8 @@ ipfw_check_hook(void *arg, struct mbuf * int ret; /* all the processing now uses ip_len in net format */ - SET_NET_IPLEN(mtod(*m0, struct ip *)); + if (mtod(*m0, struct ip *)->ip_v == 4) + SET_NET_IPLEN(mtod(*m0, struct ip *)); /* convert dir to IPFW values */ dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; @@ -236,7 +237,7 @@ again: FREE_PKT(*m0); *m0 = NULL; } - if (*m0) + if (*m0 && mtod(*m0, struct ip *)->ip_v == 4) SET_HOST_IPLEN(mtod(*m0, struct ip *)); return ret; } From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 12:58:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CCB310656A5; Thu, 7 Jan 2010 12:58:03 +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 7C3648FC0A; Thu, 7 Jan 2010 12:58:03 +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 o07Cw3l2056859; Thu, 7 Jan 2010 12:58:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07Cw39U056857; Thu, 7 Jan 2010 12:58:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001071258.o07Cw39U056857@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 7 Jan 2010 12:58: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: r201742 - head/sys/modules/crypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 12:58:03 -0000 Author: bz Date: Thu Jan 7 12:58:03 2010 New Revision: 201742 URL: http://svn.freebsd.org/changeset/base/201742 Log: After adding an SDT provider for opencrypto in r199884 we should also depend on opt_kdtrace.h for the module build. Submitted by: (Andre.Albsmeier siemens.com) MFC after: 3 days Modified: head/sys/modules/crypto/Makefile Modified: head/sys/modules/crypto/Makefile ============================================================================== --- head/sys/modules/crypto/Makefile Thu Jan 7 12:06:32 2010 (r201741) +++ head/sys/modules/crypto/Makefile Thu Jan 7 12:58:03 2010 (r201742) @@ -16,6 +16,6 @@ SRCS += skipjack.c bf_enc.c bf_skey.c SRCS += des_ecb.c des_enc.c des_setkey.c SRCS += sha1.c sha2.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h -SRCS += opt_ddb.h +SRCS += opt_ddb.h opt_kdtrace.h SRCS += camellia.c camellia-api.c .include From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 13:31:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 435D41065679; Thu, 7 Jan 2010 13:31: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 330038FC1C; Thu, 7 Jan 2010 13:31:01 +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 o07DV1Ql064232; Thu, 7 Jan 2010 13:31:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07DV1r7064230; Thu, 7 Jan 2010 13:31:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001071331.o07DV1r7064230@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 7 Jan 2010 13:31: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: r201743 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 13:31:01 -0000 Author: kib Date: Thu Jan 7 13:31:00 2010 New Revision: 201743 URL: http://svn.freebsd.org/changeset/base/201743 Log: Give some information on SF_MNOWAIT flag. MFC after: 3 days Modified: head/lib/libc/sys/sendfile.2 Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Thu Jan 7 12:58:03 2010 (r201742) +++ head/lib/libc/sys/sendfile.2 Thu Jan 7 13:31:00 2010 (r201743) @@ -116,9 +116,17 @@ Busy servers may benefit by transferring block to a separate I/O worker thread. .It .Dv SF_MNOWAIT . -(description missing) +Do not wait for some kernel resource to become available, +in particular, +.Vt mbuf +and +.Vt sf_buf . +The flag does not make the +.Fn sendfile +syscall trully non-blocking, since other resources are still allocated +in blocking fashion. .It -.Dv SF_SYNC , +.Dv SF_SYNC . .Nm sleeps until the network stack no longer references the VM pages of the file, making subsequent modifications to it safe. From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 13:53:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5DAB1065692; Thu, 7 Jan 2010 13:53:47 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CD008FC15; Thu, 7 Jan 2010 13:53:47 +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 o07DrltZ069395; Thu, 7 Jan 2010 13:53:47 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07Drl2F069393; Thu, 7 Jan 2010 13:53:47 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071353.o07Drl2F069393@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 13:53: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: r201745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 13:53:47 -0000 Author: luigi Date: Thu Jan 7 13:53:47 2010 New Revision: 201745 URL: http://svn.freebsd.org/changeset/base/201745 Log: we don't use dummynet_drain! Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 7 13:42:28 2010 (r201744) +++ head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 7 13:53:47 2010 (r201745) @@ -103,7 +103,7 @@ static int red_lookup_depth = 256; /* RE static int red_avg_pkt_size = 512; /* RED - default medium packet size */ static int red_max_pkt_size = 1500; /* RED - default max packet size */ -static struct timeval prev_t, t; +static struct timeval prev_t; static long tick_last; /* Last tick duration (usec). */ static long tick_delta; /* Last vs standard tick diff (usec). */ static long tick_delta_sum; /* Accumulated tick difference (usec).*/ @@ -239,7 +239,6 @@ static int ip_dn_ctl(struct sockopt *sop static void dummynet(void *); static void dummynet_flush(void); static void dummynet_send(struct mbuf *); -void dummynet_drain(void); static int dummynet_io(struct mbuf **, int , struct ip_fw_args *); /* @@ -851,7 +850,9 @@ dummynet(void * __unused unused) } /* - * The main dummynet processing function. + * The timer handler for dummynet. Time is computed in ticks, but + * but the code is tolerant to the actual rate at which this is called. + * Once complete, the function reschedules itself for the next tick. */ static void dummynet_task(void *context, int pending) @@ -862,6 +863,7 @@ dummynet_task(void *context, int pending struct dn_heap *h; void *p; /* generic parameter to handler */ int i; + struct timeval t; DUMMYNET_LOCK(); @@ -1955,35 +1957,6 @@ pipe_remove_from_heap(struct dn_heap *h, } /* - * drain all queues. Called in case of severe mbuf shortage. - */ -void -dummynet_drain(void) -{ - struct dn_flow_set *fs; - struct dn_pipe *pipe; - int i; - - DUMMYNET_LOCK_ASSERT(); - - heap_free(&ready_heap); - heap_free(&wfq_ready_heap); - heap_free(&extract_heap); - /* remove all references to this pipe from flow_sets */ - for (i = 0; i < HASHSIZE; i++) - SLIST_FOREACH(fs, &flowsethash[i], next) - purge_flow_set(fs, 0); - - for (i = 0; i < HASHSIZE; i++) { - SLIST_FOREACH(pipe, &pipehash[i], next) { - purge_flow_set(&(pipe->fs), 0); - dn_free_pkts(pipe->head); - pipe->head = pipe->tail = NULL; - } - } -} - -/* * Fully delete a pipe or a queue, cleaning up associated info. */ static int From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 14:15:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CB00106568F; Thu, 7 Jan 2010 14:15:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id CEDD08FC1D; Thu, 7 Jan 2010 14:15:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id B4FB441C707; Thu, 7 Jan 2010 15:15:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id KsCAsXxeyn7w; Thu, 7 Jan 2010 15:15:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 2822C41C6A7; Thu, 7 Jan 2010 15:15:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 77C3C4448EC; Thu, 7 Jan 2010 14:13:01 +0000 (UTC) Date: Thu, 7 Jan 2010 14:13:01 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Luigi Rizzo In-Reply-To: <201001071353.o07Drl2F069393@svn.freebsd.org> Message-ID: <20100107141227.T50938@maildrop.int.zabbadoz.net> References: <201001071353.o07Drl2F069393@svn.freebsd.org> X-OpenPGP-Key: 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: r201745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 14:15:08 -0000 On Thu, 7 Jan 2010, Luigi Rizzo wrote: > Author: luigi > Date: Thu Jan 7 13:53:47 2010 > New Revision: 201745 > URL: http://svn.freebsd.org/changeset/base/201745 > > Log: > we don't use dummynet_drain! I think this doesn't fix all... 40 9418664 1197140 2515480 13131284 c85e14 kernel.debug 41 In file included from /scratch/tmp/bz/HEAD.commit/sys/modules/netgraph/ipfw/../../../netgraph/ng_ipfw.c:47: 42 @/netinet/ipfw/ip_fw_private.h:85: error: field 'rule' has incomplete type 43 *** Error code 1 -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 14:23:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3050106568B; Thu, 7 Jan 2010 14:23:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 927978FC08; Thu, 7 Jan 2010 14:23:19 +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 o07ENJKj076086; Thu, 7 Jan 2010 14:23:19 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07ENJnO076084; Thu, 7 Jan 2010 14:23:19 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201001071423.o07ENJnO076084@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Jan 2010 14:23: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: r201748 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 14:23:19 -0000 Author: luigi Date: Thu Jan 7 14:23:19 2010 New Revision: 201748 URL: http://svn.freebsd.org/changeset/base/201748 Log: ip_var.h now needs to be before ip_fw_private.h Modified: head/sys/netgraph/ng_ipfw.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Thu Jan 7 14:15:34 2010 (r201747) +++ head/sys/netgraph/ng_ipfw.c Thu Jan 7 14:23:19 2010 (r201748) @@ -43,10 +43,10 @@ #include #include #include +#include #include #include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 14:23:48 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BE2E1065672; Thu, 7 Jan 2010 14:23:48 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 18F6A8FC15; Thu, 7 Jan 2010 14:23:46 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 408C6730A1; Thu, 7 Jan 2010 15:31:45 +0100 (CET) Date: Thu, 7 Jan 2010 15:31:45 +0100 From: Luigi Rizzo To: "Bjoern A. Zeeb" Message-ID: <20100107143145.GA28781@onelab2.iet.unipi.it> References: <201001071353.o07Drl2F069393@svn.freebsd.org> <20100107141227.T50938@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100107141227.T50938@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r201745 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 14:23:48 -0000 On Thu, Jan 07, 2010 at 02:13:01PM +0000, Bjoern A. Zeeb wrote: > On Thu, 7 Jan 2010, Luigi Rizzo wrote: > > >Author: luigi > >Date: Thu Jan 7 13:53:47 2010 > >New Revision: 201745 > >URL: http://svn.freebsd.org/changeset/base/201745 > > > >Log: > > we don't use dummynet_drain! > > I think this doesn't fix all... fixed , thanks -- i thought i had done it already but it was in my branch instead. > 40 9418664 1197140 2515480 13131284 c85e14 kernel.debug > 41 In file included from > /scratch/tmp/bz/HEAD.commit/sys/modules/netgraph/ipfw/../../../netgraph/ng_ipfw.c:47: > 42 @/netinet/ipfw/ip_fw_private.h:85: error: field 'rule' has incomplete > type > 43 *** Error code 1 > > > -- > Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 15:15:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C71D1065672; Thu, 7 Jan 2010 15:15:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id AF6888FC08; Thu, 7 Jan 2010 15:15:13 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o07FFAWp021843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jan 2010 02:15:11 +1100 Date: Fri, 8 Jan 2010 02:15:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alexander Motin In-Reply-To: <4B450F30.20705@FreeBSD.org> Message-ID: <20100108013737.S56162@delplex.bde.org> References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> <4B44D8FA.2000608@FreeBSD.org> <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> <4B450F30.20705@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, Ivan Voras Subject: Re: svn commit: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 15:15:14 -0000 On Thu, 7 Jan 2010, Alexander Motin wrote: > Ivan Voras wrote: >> Yes, my experience which lead to the post was mostly on UFS which, >> while AFAIK it does read-ahead, it still does it serially (I think >> this is implied by your experiments with NCQ and ZFS vs UFS) - so in >> any case only 2 drives are hit with 64k stripe size at any moment in >> time. > > I do not think it is true. On system with default MAXPHYS I've made > gstripe with 64K block of 4 equal drives with 108MB/s of maximal read > speed. Reads with dd from large pre-written file on UFS shown: > > vfs.read_max=8 (default) - 235090074 bytes/sec > vfs.read_max=16 - 378385148 bytes/sec > vfs.read_max=32 - 386620109 bytes/sec Maybe I'm wrong about it being limited by MAXPHYS. 'racluster' is limited by MAXPHYS, but 'maxra' (vfs.read_max) is not, and these interact confusingly. BTW, vfs.read_max has bogus units -- fs blocks (bsize not fsize for ffs IIRC). The default of 8 works very badly when the fs block size is small (512 say). In my version, the units are DEV_BSIZE blocks and the default is the default MAXPHYS/DEV_BSIZE (should be MAXPHYS/DEV_BSIZE). > I've put some printfs into the clustering read code and found enough > read-ahead there. So it works. > > One thing IMHO would be nice to see there is the alignment of the > read-ahead requests to the array stripe size/offset. Dirty hack I've > tried there, reduced number of requests to the array components by 30%. ffs thinks that bsize alignment is adequate. It doesn't try to align files any more than that. Then for sequential reads from the beginning of the file, vfs read clustering tries to read MAXPHYS bytes at a time, so it perfectly preserves any initial misalignment. I'm not sure what happens for large random reads. Does seeking ouside of the read-ahead reset the alignment to the seek point? It shouldn't, if alignment done by the file system is to work right. However, vfs should re-align if the file system or user i/o doesn't, so that all of its reads of mnt_iosize_max bytes start on an alignment boundary. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 15:37:14 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4273D1065670; Thu, 7 Jan 2010 15:37:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 90EF28FC12; Thu, 7 Jan 2010 15:37:13 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o07Fb9Bf004779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jan 2010 02:37:11 +1100 Date: Fri, 8 Jan 2010 02:37:09 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Konstantin Belousov In-Reply-To: <201001052020.o05KKVEp002337@svn.freebsd.org> Message-ID: <20100108023003.L56206@delplex.bde.org> References: <201001052020.o05KKVEp002337@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: r201604 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 15:37:14 -0000 On Tue, 5 Jan 2010, Konstantin Belousov wrote: > Log: > Do not rely on behaviour undefined by ANSI C, use thunks to adapt > alphasort-like interface to the comparision function required by > qsort() and qsort_r(). > > For opendir() thunk and alphasort(), comment on why we deviated from > POSIX by using strcmp() instead of strcoll(). > > Requested and reviewed by: bde > MFC after: 2 weeks Thanks. FreeBSD (wollman) fixed the corresponding undefined behaviour (which was inherited from 4.4BSD) in fts's comparison function in 2002. fts uses extra indirections and mostly-wasted space instead of qsort_r(). Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 16:29:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA71106568B; Thu, 7 Jan 2010 16:29:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 140AE8FC12; Thu, 7 Jan 2010 16:29:10 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o07GT78s004851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jan 2010 03:29:09 +1100 Date: Fri, 8 Jan 2010 03:29:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Andrey Chernov In-Reply-To: <20100107050409.GA85573@nagual.pp.ru> Message-ID: <20100108030937.Q56559@delplex.bde.org> References: <201001052020.o05KKVEp002337@svn.freebsd.org> <20100107050409.GA85573@nagual.pp.ru> 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, Konstantin Belousov Subject: Re: svn commit: r201604 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 16:29:11 -0000 On Thu, 7 Jan 2010, Andrey Chernov wrote: > On Tue, Jan 05, 2010 at 08:20:31PM +0000, Konstantin Belousov wrote: >> * Alphabetic order comparison routine for those who want it. >> + * >> + * XXXKIB POSIX 2008 requires the alphasort() to use strcoll(). Keep >> + * strcmp() for now, since environment locale settings could have no >> + * relevance for the byte sequence of the file name. Moreover, it >> + * might be even invalid sequence in current locale, and then >> + * behaviour of alphasort would be undefined. >> */ > > This is wrong turn. Nothing has turned here yet. We just didn't want to risk changing alphasort() yet. > Exact the same can be said about text files: "environment locale > settings could have no relevance for the byte sequence of the text. > Moreover, it might be even invalid sequence in current locale, and then > behaviour of sort would be undefined". Despite of this, we use > localized sort in the system. > > You made result of something like 'ls | sort' and alphasort() differs. alphasort() has always used strcmp(). It became inconsistent with plain ls when you changed ls to use strcoll() in 2006. (ls has never used scandir() or alphasort() in FreeBSD; it uses fts). "| sort" might be useable to give the same ordering for both ls and utilities using alphasort(). POSIX adds an EINVAL error and a requirement that errno no be modified if there is no error, so that errors from strcoll() can be detected (still messily -- you have to set errno to != EINVAL before the call). Maybe falling back to strcmp() is good enough for the errnor handling. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 16:52:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FCCC1065695; Thu, 7 Jan 2010 16:52:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F3F28FC18; Thu, 7 Jan 2010 16:52:00 +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 o07Gq0Qf008959; Thu, 7 Jan 2010 16:52:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07Gq0gQ008957; Thu, 7 Jan 2010 16:52:00 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001071652.o07Gq0gQ008957@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 7 Jan 2010 16:52: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: r201750 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 16:52:00 -0000 Author: trasz Date: Thu Jan 7 16:52:00 2010 New Revision: 201750 URL: http://svn.freebsd.org/changeset/base/201750 Log: Remove BUGS section that no longer applies after recent changes to semaphore code. OK-ed by: davidxu Modified: head/lib/libc/gen/sem_init.3 Modified: head/lib/libc/gen/sem_init.3 ============================================================================== --- head/lib/libc/gen/sem_init.3 Thu Jan 7 16:18:46 2010 (r201749) +++ head/lib/libc/gen/sem_init.3 Thu Jan 7 16:52:00 2010 (r201750) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2009 +.Dd January 7, 2010 .Dt SEM_INIT 3 .Os .Sh NAME @@ -90,10 +90,3 @@ The .Fn sem_init function conforms to .St -p1003.1-96 . -.Sh BUGS -A sem_t is a pointer to a separately allocated structure, -therefore process shared semaphores only work between related processes -and do not perform very well -(each operation is a system call, -while single-process semaphores only do a system call -if they need to block or wake up a thread). From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 16:59:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0831106566C; Thu, 7 Jan 2010 16:59:24 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id C41528FC16; Thu, 7 Jan 2010 16:59:23 +0000 (UTC) Received: by fxm27 with SMTP id 27so3890663fxm.3 for ; Thu, 07 Jan 2010 08:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=uO5WrjrkHwEqGKdd6QQgcOYfxqdlYkBSa4ylknVw9l4=; b=O0xEU34l7SNxrCvYMvTX6HhjKmi4bs4L/tPIKutWYUDWAE/6iqwh8CgFS1pzqk/eSk u1teJwChOUW9vgEIq23arT9yv+q4UKWQbgtB58BUJnQWqf6dL1ohHvqYyv38Cv3+wdOk hBuwtfz9hJvSneodbrJmKacpBvP1OFptvZt0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=oCUztKdJoP4QsjVT+KzSXfUlKjeEv4GrB4KyieCf4/tfuCds3s62TJXRsXPcxWRilA V/g4lmdOn3u5TS7F1o1uPA0F1qj21o5KY+3W4gYoubIV7CeZDr5rUiemFCNNDFR9nTGP tXWusc96IJCWTuizKnVfUa/T0IuUf8oJ9/BXE= Received: by 10.223.29.193 with SMTP id r1mr289509fac.29.1262883557063; Thu, 07 Jan 2010 08:59:17 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm7796508fxm.1.2010.01.07.08.59.14 (version=SSLv3 cipher=RC4-MD5); Thu, 07 Jan 2010 08:59:15 -0800 (PST) Sender: Alexander Motin Message-ID: <4B4612E2.70506@FreeBSD.org> Date: Thu, 07 Jan 2010 18:59:14 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Bruce Evans References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> <4B44D8FA.2000608@FreeBSD.org> <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> <4B450F30.20705@FreeBSD.org> <20100108013737.S56162@delplex.bde.org> In-Reply-To: <20100108013737.S56162@delplex.bde.org> X-Enigmail-Version: 0.96.0 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, Ivan Voras Subject: Re: svn commit: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 16:59:24 -0000 Bruce Evans wrote: > On Thu, 7 Jan 2010, Alexander Motin wrote: >> One thing IMHO would be nice to see there is the alignment of the >> read-ahead requests to the array stripe size/offset. Dirty hack I've >> tried there, reduced number of requests to the array components by 30%. > > ffs thinks that bsize alignment is adequate. Alignment definitely should be adequate, but it is a different task. I say that bsize and stripe size are not needed to be equal, as they serve different purposes. Even with perfectly aligned usual 16K bsize and 64K stripe size we will have 75% chance of misaligned I/O. > It doesn't try to align > files any more than that. Then for sequential reads from the beginning > of the file, vfs read clustering tries to read MAXPHYS bytes at a time, > so it perfectly preserves any initial misalignment. I think we would benefit, if vfs could shrink first request of long read-ahead session a bit, to get all further MAXPHYS-sized reads to not cross more stripe boundaries then really required. In worst case it can generate one extra request to array, in best case it can twice reduce number of requests to the array components. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 17:34:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E0C6106566C; Thu, 7 Jan 2010 17:34:45 +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 63ED68FC08; Thu, 7 Jan 2010 17:34:45 +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 o07HYjsd018390; Thu, 7 Jan 2010 17:34:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07HYjIr018386; Thu, 7 Jan 2010 17:34:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001071734.o07HYjIr018386@svn.freebsd.org> From: Alan Cox Date: Thu, 7 Jan 2010 17:34: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: r201751 - in head/sys/i386: i386 include xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 17:34:45 -0000 Author: alc Date: Thu Jan 7 17:34:45 2010 New Revision: 201751 URL: http://svn.freebsd.org/changeset/base/201751 Log: Make pmap_set_pg() static. Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h head/sys/i386/xen/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Jan 7 16:52:00 2010 (r201750) +++ head/sys/i386/i386/pmap.c Thu Jan 7 17:34:45 2010 (r201751) @@ -321,6 +321,7 @@ static vm_offset_t pmap_kmem_choose(vm_o #ifdef PAE static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif +static void pmap_set_pg(void); CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -548,7 +549,7 @@ pmap_init_pat(void) /* * Set PG_G on kernel pages. Only the BSP calls this when SMP is turned on. */ -void +static void pmap_set_pg(void) { pd_entry_t pdir; Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Thu Jan 7 16:52:00 2010 (r201750) +++ head/sys/i386/include/pmap.h Thu Jan 7 17:34:45 2010 (r201751) @@ -480,7 +480,6 @@ boolean_t pmap_page_is_mapped(vm_page_t void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); void pmap_unmapdev(vm_offset_t, vm_size_t); pt_entry_t *pmap_pte(pmap_t, vm_offset_t) __pure2; -void pmap_set_pg(void); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Jan 7 16:52:00 2010 (r201750) +++ head/sys/i386/xen/pmap.c Thu Jan 7 17:34:45 2010 (r201751) @@ -318,6 +318,7 @@ static __inline void pagezero(void *page #if defined(PAE) && !defined(XEN) static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif +static void pmap_set_pg(void); CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -552,7 +553,7 @@ pmap_init_pat(void) /* * Set PG_G on kernel pages. Only the BSP calls this when SMP is turned on. */ -void +static void pmap_set_pg(void) { pd_entry_t pdir; From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 17:46:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C8621065692; Thu, 7 Jan 2010 17:46:25 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5278FC17; Thu, 7 Jan 2010 17:46:25 +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 o07HkPJx020990; Thu, 7 Jan 2010 17:46:25 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07HkP8g020988; Thu, 7 Jan 2010 17:46:25 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001071746.o07HkP8g020988@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 7 Jan 2010 17:46: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: r201752 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 17:46:25 -0000 Author: ume Date: Thu Jan 7 17:46:25 2010 New Revision: 201752 URL: http://svn.freebsd.org/changeset/base/201752 Log: Since the IPv4 rule allows ICMP_TIMXCEED, allow ICMP6_TIME_EXCEEDED as well for workstation type firewall. It makes traceroute6 work. Modified: head/etc/rc.firewall Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Thu Jan 7 17:34:45 2010 (r201751) +++ head/etc/rc.firewall Thu Jan 7 17:46:25 2010 (r201752) @@ -505,7 +505,10 @@ case ${firewall_type} in # Allow "mandatory" ICMP in. ${fwcmd} add pass icmp from any to any icmptype 3,4,11 - + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from any to any icmp6type 3 + fi + # Add permits for this workstations published services below # Only IPs and nets in firewall_allowservices is allowed in. # If you really wish to let anyone use services on your From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 18:43:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46A241065672; Thu, 7 Jan 2010 18:43:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id CDB928FC12; Thu, 7 Jan 2010 18:43:22 +0000 (UTC) Received: from besplex.bde.org (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o07IhJQ3014812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jan 2010 05:43:20 +1100 Date: Fri, 8 Jan 2010 05:43:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin In-Reply-To: <4B4612E2.70506@FreeBSD.org> Message-ID: <20100108052300.P4481@besplex.bde.org> References: <201001061712.o06HCICF087127@svn.freebsd.org> <9bbcef731001060938k2b0014a2m15eef911b9922b2c@mail.gmail.com> <4B44D8FA.2000608@FreeBSD.org> <9bbcef731001061103u33fd289q727179454b21ce18@mail.gmail.com> <4B450F30.20705@FreeBSD.org> <20100108013737.S56162@delplex.bde.org> <4B4612E2.70506@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, Ivan Voras , Bruce Evans Subject: Re: svn commit: r201658 - head/sbin/geom/class/stripe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 18:43:23 -0000 On Thu, 7 Jan 2010, Alexander Motin wrote: > Bruce Evans wrote: >> On Thu, 7 Jan 2010, Alexander Motin wrote: >>> One thing IMHO would be nice to see there is the alignment of the >>> read-ahead requests to the array stripe size/offset. Dirty hack I've >>> tried there, reduced number of requests to the array components by 30%. >> >> ffs thinks that bsize alignment is adequate. > > Alignment definitely should be adequate, but it is a different task. I > say that bsize and stripe size are not needed to be equal, as they serve > different purposes. Even with perfectly aligned usual 16K bsize and 64K > stripe size we will have 75% chance of misaligned I/O. That's what I meant by bsize alignment (only) being thought to be adequate (by ffs, not us). >> It doesn't try to align >> files any more than that. Then for sequential reads from the beginning >> of the file, vfs read clustering tries to read MAXPHYS bytes at a time, >> so it perfectly preserves any initial misalignment. Even with alignment by vfs, with misalignment by ffs we would get things like an inital 64K read being split up into 48K (to reach a stripe alignment boundary), then 16K (since that is all that is left to read). For larger files starting with this misalignment, we would get i/o sizes like 48K+128K+...+128K+trailingK, except with ffs there is also the pessimal allocation of indirect blocks, which will put a bubble in the i/o at 12*bsize (default 192K) to seek far away to the indirect block. > I think we would benefit, if vfs could shrink first request of long > read-ahead session a bit, to get all further MAXPHYS-sized reads to not > cross more stripe boundaries then really required. In worst case it can > generate one extra request to array, in best case it can twice reduce > number of requests to the array components. Yes, that is the only relatively easy thing to change. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 20:10:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 529E21065676; Thu, 7 Jan 2010 20:10:23 +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 40F198FC24; Thu, 7 Jan 2010 20:10:23 +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 o07KAN1H053041; Thu, 7 Jan 2010 20:10:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07KANrI053039; Thu, 7 Jan 2010 20:10:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001072010.o07KANrI053039@svn.freebsd.org> From: Xin LI Date: Thu, 7 Jan 2010 20:10: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: r201756 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 20:10:23 -0000 Author: delphij Date: Thu Jan 7 20:10:22 2010 New Revision: 201756 URL: http://svn.freebsd.org/changeset/base/201756 Log: Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD revision 200726 and 200727). It looks like that the two revisions were not applied in the right sequence, I found this when comparing with the OpenSolaris code. MFC after: 3 days Reviewed by: mm@ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Jan 7 19:40:11 2010 (r201755) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Jan 7 20:10:22 2010 (r201756) @@ -847,6 +847,12 @@ restore_object(struct restorearg *ra, ob if (err != 0 && err != ENOENT) return (EINVAL); + if (drro->drr_bonuslen) { + data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); + if (ra->err) + return (ra->err); + } + if (err == ENOENT) { /* currently free, want to be allocated */ tx = dmu_tx_create(os); @@ -862,7 +868,6 @@ restore_object(struct restorearg *ra, ob dmu_tx_commit(tx); } else { /* currently allocated, want to be allocated */ - err = dmu_object_reclaim(os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen); @@ -870,12 +875,6 @@ restore_object(struct restorearg *ra, ob if (err) return (EINVAL); - if (drro->drr_bonuslen) { - data = restore_read(ra, P2ROUNDUP(drro->drr_bonuslen, 8)); - if (ra->err) - return (ra->err); - } - tx = dmu_tx_create(os); dmu_tx_hold_bonus(tx, drro->drr_object); err = dmu_tx_assign(tx, TXG_WAIT); From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 20:35:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27794106568B; Thu, 7 Jan 2010 20:35:37 +0000 (UTC) (envelope-from philip@paeps.cx) Received: from rincewind.paeps.cx (rincewind.paeps.cx [IPv6:2002:596a:f092::149]) by mx1.freebsd.org (Postfix) with ESMTP id D92688FC18; Thu, 7 Jan 2010 20:35:36 +0000 (UTC) Received: by rincewind.paeps.cx (Postfix, from userid 1001) id 46AF2D74404; Thu, 7 Jan 2010 21:35:36 +0100 (CET) Date: Thu, 7 Jan 2010 21:35:36 +0100 From: Philip Paeps To: Luigi Rizzo Message-ID: <20100107203536.GB8230@rincewind.paeps.cx> Mail-Followup-To: Luigi Rizzo , Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> <20100104222323.GA49068@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20100104222323.GA49068@onelab2.iet.unipi.it> X-PGP-Fingerprint: 356B AE02 4763 F739 2FA2 E438 2649 E628 C5D3 4D05 X-Date: Today is Boomtime, the 7th day of Chaos in the YOLD 3176 X-Phase-of-Moon: The Moon is Waning Crescent (46% of Full) X-Philip-Conspiracy: There is no conspiracy Organization: Happily Disorganized User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Michael Tuexen Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 20:35:37 -0000 On 2010-01-04 23:23:23 (+0100), Luigi Rizzo wrote: > This was the reason why I moved ipfw-related stuff out of the way > and plan to do the same with tcp unless someone precedes me. Please discuss this on -net or so first. I have worked in an environment where tcp was moved out of netinet when it was imported (around 2.2.8-time) and it opens the door to a number of strange phenomena. What do you do with udp, for instance? Compared to tcp and sctp, it's trivial in terms of code, but it's an upper layer protocol from the perspective of netinet/netinet6 - do we put it in its own directory too? Also note that this won't only cause churn for people who have patches against or (out-of-tree) branches from netinet/, but also in other kernel subsystems which rely on tcp -- nfs, for instance. I would be very hesitant to do this... > Just checked, in 2.2 (which was some 12 years ago) netinet/ > had 46 files and 21k lines, of which tcp accounted for 13 files/6K lines. > Compare with 156 files/153k lines (tcp: 24 files, 16k lines) in HEAD now. TCP has got a bit more complicated in its old age. :-) I think the naming convention we have under netinet/ is clear enough... We don't pay per dirent these days. - Philip -- Philip Paeps Please don't Cc me, I am philip@freebsd.org subscribed to the list. From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 21:01:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 371CA106566C; Thu, 7 Jan 2010 21:01:39 +0000 (UTC) (envelope-from mbr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 217828FC17; Thu, 7 Jan 2010 21:01:39 +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 o07L1drr064461; Thu, 7 Jan 2010 21:01:39 GMT (envelope-from mbr@svn.freebsd.org) Received: (from mbr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07L1c6m064401; Thu, 7 Jan 2010 21:01:38 GMT (envelope-from mbr@svn.freebsd.org) Message-Id: <201001072101.o07L1c6m064401@svn.freebsd.org> From: Martin Blapp Date: Thu, 7 Jan 2010 21:01: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: r201758 - in head/sys: cam/scsi compat/linux dev/aac dev/agp dev/amd dev/amr dev/arcmsr dev/ata dev/ata/chipsets dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5416 dev... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 21:01:39 -0000 Author: mbr Date: Thu Jan 7 21:01:37 2010 New Revision: 201758 URL: http://svn.freebsd.org/changeset/base/201758 Log: Remove extraneous semicolons, no functional changes. Submitted by: Marc Balmer MFC after: 1 week Modified: head/sys/cam/scsi/scsi_ses.c head/sys/cam/scsi/scsi_targ_bh.c head/sys/compat/linux/linux_futex.c head/sys/dev/aac/aac.c head/sys/dev/agp/agp.c head/sys/dev/amd/amd.c head/sys/dev/amr/amr.c head/sys/dev/arcmsr/arcmsr.c head/sys/dev/ata/ata-raid.c head/sys/dev/ata/chipsets/ata-ahci.c head/sys/dev/ata/chipsets/ata-siliconimage.c head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c head/sys/dev/bktr/bktr_i2c.c head/sys/dev/cs/if_cs.c head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/de/if_de.c head/sys/dev/e1000/if_em.c head/sys/dev/fatm/if_fatm.c head/sys/dev/firewire/sbp.c head/sys/dev/hatm/if_hatm.c head/sys/dev/hptmv/entry.c head/sys/dev/if_ndis/if_ndis_usb.c head/sys/dev/iscsi/initiator/isc_sm.c head/sys/dev/isp/isp.c head/sys/dev/isp/isp_library.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/malo/if_malo.c head/sys/dev/mge/if_mge.c head/sys/dev/mxge/if_mxge.c head/sys/dev/patm/if_patm_intr.c head/sys/dev/pdq/if_fea.c head/sys/dev/safe/safe.c head/sys/dev/sound/pci/maestro3.c head/sys/dev/ste/if_ste.c head/sys/dev/trm/trm.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/storage/umass.c head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c head/sys/isa/pnp.c head/sys/kern/kern_fail.c head/sys/kern/subr_firmware.c head/sys/mips/adm5120/if_admsw.c head/sys/mips/mips/elf_machdep.c head/sys/net/flowtable.c head/sys/net80211/ieee80211_node.c head/sys/netinet/libalias/alias_db.c head/sys/netinet/libalias/alias_mod.c head/sys/netinet/sctp_asconf.c head/sys/netinet/sctputil.c head/sys/nfsclient/bootp_subr.c head/sys/pci/ncr.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/rpc/clnt_dg.c head/sys/ufs/ffs/ffs_snapshot.c head/sys/xen/xenbus/xenbus_probe.c Modified: head/sys/cam/scsi/scsi_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_ses.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/cam/scsi/scsi_ses.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1555,7 +1555,7 @@ ses_encode(char *b, int amt, uint8_t *ep */ static int safte_getconfig(ses_softc_t *); -static int safte_rdstat(ses_softc_t *, int);; +static int safte_rdstat(ses_softc_t *, int); static int set_objstat_sel(ses_softc_t *, ses_objstat *, int); static int wrbuf16(ses_softc_t *, uint8_t, uint8_t, uint8_t, uint8_t, int); static void wrslot_stat(ses_softc_t *, int); @@ -2257,7 +2257,7 @@ safte_rdstat(ses_softc_t *ssc, int slpfl ssc->ses_objmap[oid].encstat[0] = SES_OBJSTAT_NOTAVAIL; ssc->ses_objmap[oid].encstat[1] = 0; ssc->ses_objmap[oid].encstat[2] = sdata[r]; - ssc->ses_objmap[oid].encstat[3] = 0;; + ssc->ses_objmap[oid].encstat[3] = 0; ssc->ses_objmap[oid++].svalid = 1; r++; } Modified: head/sys/cam/scsi/scsi_targ_bh.c ============================================================================== --- head/sys/cam/scsi/scsi_targ_bh.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/cam/scsi/scsi_targ_bh.c Thu Jan 7 21:01:37 2010 (r201758) @@ -429,7 +429,7 @@ targbhdtor(struct cam_periph *periph) switch (softc->init_level) { case 0: - panic("targdtor - impossible init level");; + panic("targdtor - impossible init level"); case 1: /* FALLTHROUGH */ default: Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/compat/linux/linux_futex.c Thu Jan 7 21:01:37 2010 (r201758) @@ -493,7 +493,7 @@ linux_sys_futex(struct thread *td, struc return (error); if (f == NULL) { td->td_retval[0] = 0; - return (error);; + return (error); } td->td_retval[0] = futex_wake(f, args->val); futex_put(f, NULL); Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/aac/aac.c Thu Jan 7 21:01:37 2010 (r201758) @@ -553,7 +553,7 @@ aac_alloc(struct aac_softc *sc) 0, /* flags */ NULL, NULL, /* No locking needed */ &sc->aac_fib_dmat)) { - device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");; + device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n"); return (ENOMEM); } Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/agp/agp.c Thu Jan 7 21:01:37 2010 (r201758) @@ -763,7 +763,7 @@ agp_allocate_user(device_t dev, agp_allo static int agp_deallocate_user(device_t dev, int id) { - struct agp_memory *mem = agp_find_memory(dev, id);; + struct agp_memory *mem = agp_find_memory(dev, id); if (mem) { AGP_FREE_MEMORY(dev, mem); Modified: head/sys/dev/amd/amd.c ============================================================================== --- head/sys/dev/amd/amd.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/amd/amd.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1657,7 +1657,7 @@ amdhandlemsgreject(struct amd_softc *amd tinfo_sync_period[pDCB->SyncPeriod - 4]; pDCB->tinfo.goal.offset = pDCB->SyncOffset; pDCB->tinfo.current.period = - tinfo_sync_period[pDCB->SyncPeriod - 4];; + tinfo_sync_period[pDCB->SyncPeriod - 4]; pDCB->tinfo.current.offset = pDCB->SyncOffset; /* Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/amr/amr.c Thu Jan 7 21:01:37 2010 (r201758) @@ -221,7 +221,7 @@ amr_attach(struct amr_softc *sc) sc->amr_submit_command = amr_std_submit_command; sc->amr_get_work = amr_std_get_work; sc->amr_poll_command = amr_std_poll_command; - amr_std_attach_mailbox(sc);; + amr_std_attach_mailbox(sc); } #ifdef AMR_BOARD_INIT Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/arcmsr/arcmsr.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1940,7 +1940,7 @@ static void arcmsr_handle_virtual_comman switch (pccb->csio.cdb_io.cdb_bytes[0]) { case INQUIRY: { unsigned char inqdata[36]; - char *buffer=pccb->csio.data_ptr;; + char *buffer=pccb->csio.data_ptr; if (pccb->ccb_h.target_lun) { pccb->ccb_h.status |= CAM_SEL_TIMEOUT; Modified: head/sys/dev/ata/ata-raid.c ============================================================================== --- head/sys/dev/ata/ata-raid.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ata/ata-raid.c Thu Jan 7 21:01:37 2010 (r201758) @@ -407,7 +407,7 @@ ata_raid_strategy(struct bio *bp) if (rdp->status & AR_S_REBUILDING) blk = ((lba / rdp->interleave) * rdp->width) * rdp->interleave + (rdp->interleave * (drv % rdp->width)) + - lba % rdp->interleave;; + lba % rdp->interleave; if (bp->bio_cmd == BIO_READ) { int src_online = Modified: head/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ahci.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ata/chipsets/ata-ahci.c Thu Jan 7 21:01:37 2010 (r201758) @@ -656,9 +656,9 @@ ata_ahci_pm_write(device_t dev, int port ctp->cfis[3] = reg; ctp->cfis[7] = port | ATA_D_LBA; ctp->cfis[12] = value & 0xff; - ctp->cfis[4] = (value >> 8) & 0xff;; - ctp->cfis[5] = (value >> 16) & 0xff;; - ctp->cfis[6] = (value >> 24) & 0xff;; + ctp->cfis[4] = (value >> 8) & 0xff; + ctp->cfis[5] = (value >> 16) & 0xff; + ctp->cfis[6] = (value >> 24) & 0xff; ctp->cfis[15] = ATA_A_4BIT; if (ata_ahci_issue_cmd(dev, 0, 100)) { Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-siliconimage.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ata/chipsets/ata-siliconimage.c Thu Jan 7 21:01:37 2010 (r201758) @@ -716,9 +716,9 @@ ata_siiprb_pm_write(device_t dev, int po prb->fis[3] = reg; prb->fis[7] = port; prb->fis[12] = value & 0xff; - prb->fis[4] = (value >> 8) & 0xff;; - prb->fis[5] = (value >> 16) & 0xff;; - prb->fis[6] = (value >> 24) & 0xff;; + prb->fis[4] = (value >> 8) & 0xff; + prb->fis[5] = (value >> 16) & 0xff; + prb->fis[6] = (value >> 24) & 0xff; if (ata_siiprb_issue_cmd(dev)) { device_printf(dev, "error writing PM port\n"); return ATA_E_ABORT; Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Thu Jan 7 21:01:37 2010 (r201758) @@ -136,7 +136,7 @@ static void ar5211GetLowerUpperPcdacs(ui uint16_t channel, const PCDACS_EEPROM *pSrcStruct, uint16_t *pLowerPcdac, uint16_t *pUpperPcdac); -static void ar5211SetRfgain(struct ath_hal *, const GAIN_VALUES *);; +static void ar5211SetRfgain(struct ath_hal *, const GAIN_VALUES *); static void ar5211RequestRfgain(struct ath_hal *); static HAL_BOOL ar5211InvalidGainReadback(struct ath_hal *, GAIN_VALUES *); static HAL_BOOL ar5211IsGainAdjustNeeded(struct ath_hal *, const GAIN_VALUES *); Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Thu Jan 7 21:01:37 2010 (r201758) @@ -76,7 +76,7 @@ ar5212GetPendingInterrupts(struct ath_ha isr = OS_REG_READ(ah, AR_ISR_RAC); if (isr == 0xffffffff) { *masked = 0; - return AH_FALSE;; + return AH_FALSE; } *masked = isr & HAL_INT_COMMON; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Jan 7 21:01:37 2010 (r201758) @@ -104,7 +104,7 @@ ar5416GetPendingInterrupts(struct ath_ha isr = OS_REG_READ(ah, AR_ISR_RAC); if (isr == 0xffffffff) { *masked = 0; - return AH_FALSE;; + return AH_FALSE; } *masked = isr & HAL_INT_COMMON; Modified: head/sys/dev/bktr/bktr_i2c.c ============================================================================== --- head/sys/dev/bktr/bktr_i2c.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/bktr/bktr_i2c.c Thu Jan 7 21:01:37 2010 (r201758) @@ -331,7 +331,7 @@ bti2c_smb_readb(device_t dev, u_char sla /* clear status bits */ OUTL(sc,BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE)); - OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd);; + OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd); BTI2C_DEBUG(printf("r%lx/", (u_long)(((slave & 0xff) << 24) | (u_char)cmd))); Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/cs/if_cs.c Thu Jan 7 21:01:37 2010 (r201758) @@ -475,7 +475,7 @@ int cs_attach(device_t dev) { int error, media=0; - struct cs_softc *sc = device_get_softc(dev);; + struct cs_softc *sc = device_get_softc(dev); struct ifnet *ifp; sc->dev = dev; Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/cxgb/cxgb_sge.c Thu Jan 7 21:01:37 2010 (r201758) @@ -152,7 +152,7 @@ struct rx_desc { uint32_t len_gen; uint32_t gen2; uint32_t addr_hi; -} __packed;; +} __packed; struct rsp_desc { /* response queue descriptor */ struct rss_header rss_hdr; Modified: head/sys/dev/de/if_de.c ============================================================================== --- head/sys/dev/de/if_de.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/de/if_de.c Thu Jan 7 21:01:37 2010 (r201758) @@ -2290,7 +2290,7 @@ tulip_identify_asante_nic(tulip_softc_t mi->mi_gpr_length = 0; mi->mi_gpr_offset = 0; mi->mi_reset_length = 0; - mi->mi_reset_offset = 0;; + mi->mi_reset_offset = 0; mi->mi_phyaddr = TULIP_MII_NOPHY; for (idx = 20; idx > 0 && mi->mi_phyaddr == TULIP_MII_NOPHY; idx--) { Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/e1000/if_em.c Thu Jan 7 21:01:37 2010 (r201758) @@ -4346,7 +4346,7 @@ em_free_receive_structures(struct adapte static int em_rxeof(struct adapter *adapter, int count) { - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct mbuf *mp; u8 status, accept_frame = 0, eop = 0; u16 len, desc_len, prev_len_adj; Modified: head/sys/dev/fatm/if_fatm.c ============================================================================== --- head/sys/dev/fatm/if_fatm.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/fatm/if_fatm.c Thu Jan 7 21:01:37 2010 (r201758) @@ -858,7 +858,7 @@ fatm_getprom(struct fatm_softc *sc) NEXT_QUEUE_ENTRY(sc->cmdqueue.head, FATM_CMD_QLEN); q->error = 0; - q->cb = NULL;; + q->cb = NULL; H_SETSTAT(q->q.statp, FATM_STAT_PENDING); H_SYNCSTAT_PREWRITE(sc, q->q.statp); Modified: head/sys/dev/firewire/sbp.c ============================================================================== --- head/sys/dev/firewire/sbp.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/firewire/sbp.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1573,7 +1573,7 @@ END_DEBUG bcopy(&sbp_cmd_status->s_keydep[0], &sense->sense_key_spec[0], 3); - ocb->ccb->csio.scsi_status = sbp_cmd_status->status;; + ocb->ccb->csio.scsi_status = sbp_cmd_status->status; ocb->ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; /* @@ -2148,7 +2148,7 @@ sbp_free_target(struct sbp_target *targe } STAILQ_INIT(&target->xferlist); free(target->luns, M_SBP); - target->num_lun = 0;; + target->num_lun = 0; target->luns = NULL; target->fwdev = NULL; } @@ -2318,7 +2318,7 @@ sbp_timeout(void *arg) sbp_cam_detach_target(target); if (target->luns != NULL) free(target->luns, M_SBP); - target->num_lun = 0;; + target->num_lun = 0; target->luns = NULL; target->fwdev = NULL; #endif Modified: head/sys/dev/hatm/if_hatm.c ============================================================================== --- head/sys/dev/hatm/if_hatm.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/hatm/if_hatm.c Thu Jan 7 21:01:37 2010 (r201758) @@ -836,7 +836,7 @@ hatm_init_rx_buffer_pool(struct hatm_sof uint32_t lbuf_addr; /* address of current buffer */ u_int i; - row_size = sc->bytes_per_row;; + row_size = sc->bytes_per_row; row_addr = start * row_size; lbuf_size = sc->cells_per_lbuf * 48; lbufs_per_row = sc->cells_per_row / sc->cells_per_lbuf; @@ -889,7 +889,7 @@ hatm_init_tx_buffer_pool(struct hatm_sof uint32_t lbuf_addr; /* address of current buffer */ u_int i; - row_size = sc->bytes_per_row;; + row_size = sc->bytes_per_row; row_addr = start * row_size; lbuf_size = sc->cells_per_lbuf * 48; lbufs_per_row = sc->cells_per_row / sc->cells_per_lbuf; Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/hptmv/entry.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1341,7 +1341,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) #endif &pAdapter->io_dma_parent /* tag */)) { - return ENXIO;; + return ENXIO; } Modified: head/sys/dev/if_ndis/if_ndis_usb.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis_usb.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/if_ndis/if_ndis_usb.c Thu Jan 7 21:01:37 2010 (r201758) @@ -205,7 +205,7 @@ ndisusb_detach(device_t self) { int i; struct ndis_softc *sc = device_get_softc(self); - struct ndisusb_ep *ne;; + struct ndisusb_ep *ne; sc->ndisusb_status |= NDISUSB_STATUS_DETACH; Modified: head/sys/dev/iscsi/initiator/isc_sm.c ============================================================================== --- head/sys/dev/iscsi/initiator/isc_sm.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/iscsi/initiator/isc_sm.c Thu Jan 7 21:01:37 2010 (r201758) @@ -399,7 +399,7 @@ ism_recv(isc_session_t *sp, pduq_t *pq) if(sp->flags & ISC_STALLED) { sdebug(4, "window opened: max=0x%x exp=0x%x opcode=0x%x cmd=0x%x cws=%d.", sn->maxCmd, sn->expCmd, bhs->opcode, sn->cmd, sp->cws); - sp->flags &= ~ISC_STALLED;; + sp->flags &= ~ISC_STALLED; } } } Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/isp/isp.c Thu Jan 7 21:01:37 2010 (r201758) @@ -6658,8 +6658,8 @@ isp_mbox_continue(ispsoftc_t *isp) ptr = isp->isp_mbxworkp; switch (isp->isp_lastmbxcmd) { case MBOX_WRITE_RAM_WORD: - mbs.param[1] = isp->isp_mbxwrk1++;; - mbs.param[2] = *ptr++;; + mbs.param[1] = isp->isp_mbxwrk1++; + mbs.param[2] = *ptr++; break; case MBOX_READ_RAM_WORD: *ptr++ = isp->isp_mboxtmp[2]; @@ -6669,7 +6669,7 @@ isp_mbox_continue(ispsoftc_t *isp) offset = isp->isp_mbxwrk1; offset |= isp->isp_mbxwrk8 << 16; - mbs.param[2] = *ptr++;; + mbs.param[2] = *ptr++; mbs.param[1] = offset; mbs.param[8] = offset >> 16; isp->isp_mbxwrk1 = ++offset; Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/isp/isp_library.c Thu Jan 7 21:01:37 2010 (r201758) @@ -670,7 +670,7 @@ isp_clear_commands(ispsoftc_t *isp) } else { ct_entry_t *ctio = (ct_entry_t *) local; ctio->ct_syshandle = handle & 0xffff; - ctio->ct_status = CT_HBA_RESET & 0xff;; + ctio->ct_status = CT_HBA_RESET & 0xff; ctio->ct_header.rqs_entry_type = RQSTYPE_CTIO; } isp_async(isp, ISPASYNC_TARGET_ACTION, local); Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ixgbe/ixgbe.c Thu Jan 7 21:01:37 2010 (r201758) @@ -4743,7 +4743,7 @@ static void ixgbe_reinit_fdir(void *context, int pending) { struct adapter *adapter = context; - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; if (adapter->fdir_reinit != 1) /* Shouldn't happen */ return; @@ -4763,7 +4763,7 @@ ixgbe_reinit_fdir(void *context, int pen static void ixgbe_update_stats_counters(struct adapter *adapter) { - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct ixgbe_hw *hw = &adapter->hw; u32 missed_rx = 0, bprc, lxon, lxoff, total; u64 total_missed_rx = 0; Modified: head/sys/dev/malo/if_malo.c ============================================================================== --- head/sys/dev/malo/if_malo.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/malo/if_malo.c Thu Jan 7 21:01:37 2010 (r201758) @@ -2108,7 +2108,7 @@ malo_rx_proc(void *arg, int npending) * payload prior to constructing the header. */ m = bf->bf_m; - data = mtod(m, uint8_t *);; + data = mtod(m, uint8_t *); hdrlen = ieee80211_anyhdrsize(data + sizeof(uint16_t)); off = sizeof(uint16_t) + sizeof(struct ieee80211_frame_addr4); Modified: head/sys/dev/mge/if_mge.c ============================================================================== --- head/sys/dev/mge/if_mge.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/mge/if_mge.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1150,7 +1150,7 @@ mge_intr_tx_locked(struct mge_softc *sc) break; sc->tx_desc_used_idx = - (++sc->tx_desc_used_idx) % MGE_TX_DESC_NUM;; + (++sc->tx_desc_used_idx) % MGE_TX_DESC_NUM; sc->tx_desc_used_count--; /* Update collision statistics */ Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/mxge/if_mxge.c Thu Jan 7 21:01:37 2010 (r201758) @@ -3173,23 +3173,23 @@ mxge_alloc_slice_rings(struct mxge_slice bytes = rx_ring_entries * sizeof (*ss->rx_small.shadow); ss->rx_small.shadow = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK); if (ss->rx_small.shadow == NULL) - return err;; + return err; bytes = rx_ring_entries * sizeof (*ss->rx_big.shadow); ss->rx_big.shadow = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK); if (ss->rx_big.shadow == NULL) - return err;; + return err; /* allocate the rx host info rings */ bytes = rx_ring_entries * sizeof (*ss->rx_small.info); ss->rx_small.info = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK); if (ss->rx_small.info == NULL) - return err;; + return err; bytes = rx_ring_entries * sizeof (*ss->rx_big.info); ss->rx_big.info = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK); if (ss->rx_big.info == NULL) - return err;; + return err; /* allocate the rx busdma resources */ err = bus_dma_tag_create(sc->parent_dmat, /* parent */ @@ -3207,7 +3207,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d allocating rx_small dmat\n", err); - return err;; + return err; } err = bus_dma_tag_create(sc->parent_dmat, /* parent */ @@ -3234,7 +3234,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d allocating rx_big dmat\n", err); - return err;; + return err; } for (i = 0; i <= ss->rx_small.mask; i++) { err = bus_dmamap_create(ss->rx_small.dmat, 0, @@ -3242,7 +3242,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d rx_small dmamap\n", err); - return err;; + return err; } } err = bus_dmamap_create(ss->rx_small.dmat, 0, @@ -3250,7 +3250,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d extra rx_small dmamap\n", err); - return err;; + return err; } for (i = 0; i <= ss->rx_big.mask; i++) { @@ -3259,7 +3259,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d rx_big dmamap\n", err); - return err;; + return err; } } err = bus_dmamap_create(ss->rx_big.dmat, 0, @@ -3267,7 +3267,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d extra rx_big dmamap\n", err); - return err;; + return err; } /* now allocate TX resouces */ @@ -3287,7 +3287,7 @@ mxge_alloc_slice_rings(struct mxge_slice sizeof (*ss->tx.req_list) * (ss->tx.max_desc + 4); ss->tx.req_bytes = malloc(bytes, M_DEVBUF, M_WAITOK); if (ss->tx.req_bytes == NULL) - return err;; + return err; /* ensure req_list entries are aligned to 8 bytes */ ss->tx.req_list = (mcp_kreq_ether_send_t *) ((unsigned long)(ss->tx.req_bytes + 7) & ~7UL); @@ -3297,13 +3297,13 @@ mxge_alloc_slice_rings(struct mxge_slice ss->tx.seg_list = (bus_dma_segment_t *) malloc(bytes, M_DEVBUF, M_WAITOK); if (ss->tx.seg_list == NULL) - return err;; + return err; /* allocate the tx host info ring */ bytes = tx_ring_entries * sizeof (*ss->tx.info); ss->tx.info = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK); if (ss->tx.info == NULL) - return err;; + return err; /* allocate the tx busdma resources */ err = bus_dma_tag_create(sc->parent_dmat, /* parent */ @@ -3322,7 +3322,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d allocating tx dmat\n", err); - return err;; + return err; } /* now use these tags to setup dmamaps for each slot @@ -3333,7 +3333,7 @@ mxge_alloc_slice_rings(struct mxge_slice if (err != 0) { device_printf(sc->dev, "Err %d tx dmamap\n", err); - return err;; + return err; } } return 0; Modified: head/sys/dev/patm/if_patm_intr.c ============================================================================== --- head/sys/dev/patm/if_patm_intr.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/patm/if_patm_intr.c Thu Jan 7 21:01:37 2010 (r201758) @@ -381,7 +381,7 @@ patm_feed_lbufs(struct patm_softc *sc) static void patm_intr_tsif(struct patm_softc *sc) { - struct idt_tsqe *tsqe = sc->tsq_next;; + struct idt_tsqe *tsqe = sc->tsq_next; struct idt_tsqe *prev = NULL; uint32_t stamp; Modified: head/sys/dev/pdq/if_fea.c ============================================================================== --- head/sys/dev/pdq/if_fea.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/pdq/if_fea.c Thu Jan 7 21:01:37 2010 (r201758) @@ -140,7 +140,7 @@ pdq_eisa_probe (dev) u_int32_t maddr; u_int32_t msize; - u_int32_t eisa_id = eisa_get_id(dev);; + u_int32_t eisa_id = eisa_get_id(dev); desc = pdq_eisa_match(eisa_id); if (!desc) { Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/safe/safe.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1902,7 +1902,7 @@ safe_init_board(struct safe_softc *sc) { u_int32_t v, dwords; - v = READ_REG(sc, SAFE_PE_DMACFG);; + v = READ_REG(sc, SAFE_PE_DMACFG); v &=~ SAFE_PE_DMACFG_PEMODE; v |= SAFE_PE_DMACFG_FSENA /* failsafe enable */ | SAFE_PE_DMACFG_GPRPCI /* gather ring on PCI */ Modified: head/sys/dev/sound/pci/maestro3.c ============================================================================== --- head/sys/dev/sound/pci/maestro3.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/sound/pci/maestro3.c Thu Jan 7 21:01:37 2010 (r201758) @@ -353,7 +353,7 @@ m3_wrcd(kobj_t kobj, void *devinfo, int struct sc_info *sc = (struct sc_info *)devinfo; if (m3_wait(sc)) { device_printf(sc->dev, "m3_wrcd timed out.\n"); - return -1;; + return -1; } m3_wr_2(sc, CODEC_DATA, data); m3_wr_1(sc, CODEC_COMMAND, regno & 0x7f); Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/ste/if_ste.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1125,7 +1125,7 @@ ste_attach(device_t dev) if (ste_read_eeprom(sc, eaddr, STE_EEADDR_NODE0, 3, 0)) { device_printf(dev, "failed to read station address\n"); - error = ENXIO;; + error = ENXIO; goto fail; } ste_sysctl_node(sc); Modified: head/sys/dev/trm/trm.c ============================================================================== --- head/sys/dev/trm/trm.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/trm/trm.c Thu Jan 7 21:01:37 2010 (r201758) @@ -2770,7 +2770,7 @@ trm_DoingSRB_Done(PACB pACB) xpt_done(pccb); psrb = psrb2; } - pdcb->GoingSRBCnt = 0;; + pdcb->GoingSRBCnt = 0; pdcb->pGoingSRB = NULL; pdcb = pdcb->pNextDCB; } Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/usb/controller/musb_otg.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1799,7 +1799,7 @@ musbotg_init(struct musbotg_softc *sc) MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, temp); fsize = MUSB2_READ_1(sc, MUSB2_REG_FSIZE); - frx = (fsize & MUSB2_MASK_RX_FSIZE) / 16;; + frx = (fsize & MUSB2_MASK_RX_FSIZE) / 16; ftx = (fsize & MUSB2_MASK_TX_FSIZE); DPRINTF("Endpoint %u FIFO size: IN=%u, OUT=%u, DYN=%d\n", Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/dev/usb/storage/umass.c Thu Jan 7 21:01:37 2010 (r201758) @@ -3036,7 +3036,7 @@ umass_atapi_transform(struct umass_softc case 0xad: /* READ_DVD_STRUCTURE */ case 0xbb: /* SET_CD_SPEED */ case 0xe5: /* READ_TRACK_INFO_PHILIPS */ - break;; + break; case READ_12: case WRITE_12: @@ -3044,7 +3044,7 @@ umass_atapi_transform(struct umass_softc DPRINTF(sc, UDMASS_SCSI, "Unsupported ATAPI " "command 0x%02x - trying anyway\n", cmd_ptr[0]); - break;; + break; } bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1117,7 +1117,7 @@ _xfs_strategy( } */ *ap) { daddr_t blkno; - struct buf *bp;; + struct buf *bp; struct bufobj *bo; struct vnode *vp; struct xfs_mount *xmp; Modified: head/sys/isa/pnp.c ============================================================================== --- head/sys/isa/pnp.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/isa/pnp.c Thu Jan 7 21:01:37 2010 (r201758) @@ -480,7 +480,7 @@ pnp_create_devices(device_t parent, pnp_ } resinfo = resp; resp += PNP_SRES_LEN(tag); - scanning -= PNP_SRES_LEN(tag);; + scanning -= PNP_SRES_LEN(tag); switch (PNP_SRES_NUM(tag)) { case PNP_TAG_LOGICAL_DEVICE: Modified: head/sys/kern/kern_fail.c ============================================================================== --- head/sys/kern/kern_fail.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/kern/kern_fail.c Thu Jan 7 21:01:37 2010 (r201758) @@ -452,7 +452,7 @@ parse_term(struct fail_point_entries *en } else if (*p == '*') { if (!units || decimal) return 0; - ent->fe_count = units;; + ent->fe_count = units; } else { return 0; @@ -497,7 +497,7 @@ parse_number(int *out_units, int *out_de /* whole part */ old_p = p; - *out_units = strtol(p, &p, 10);; + *out_units = strtol(p, &p, 10); if (p == old_p && *p != '.') return 0; Modified: head/sys/kern/subr_firmware.c ============================================================================== --- head/sys/kern/subr_firmware.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/kern/subr_firmware.c Thu Jan 7 21:01:37 2010 (r201758) @@ -500,7 +500,7 @@ firmware_modevent(module_t mod, int type mtx_lock(&firmware_mtx); for (i = 0; i < FIRMWARE_MAX; i++) { fp = &firmware_table[i]; - fp->flags |= FW_UNLOAD;; + fp->flags |= FW_UNLOAD; } mtx_unlock(&firmware_mtx); taskqueue_enqueue(firmware_tq, &firmware_unload_task); Modified: head/sys/mips/adm5120/if_admsw.c ============================================================================== --- head/sys/mips/adm5120/if_admsw.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/mips/adm5120/if_admsw.c Thu Jan 7 21:01:37 2010 (r201758) @@ -528,7 +528,7 @@ admsw_attach(device_t dev) ifmedia_add(&sc->sc_ifmedia[i], IFM_ETHER|IFM_AUTO, 0, NULL); ifmedia_set(&sc->sc_ifmedia[i], IFM_ETHER|IFM_AUTO); - ifp = sc->sc_ifnet[i] = if_alloc(IFT_ETHER);; + ifp = sc->sc_ifnet[i] = if_alloc(IFT_ETHER); /* Setup interface parameters */ ifp->if_softc = sc; Modified: head/sys/mips/mips/elf_machdep.c ============================================================================== --- head/sys/mips/mips/elf_machdep.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/mips/mips/elf_machdep.c Thu Jan 7 21:01:37 2010 (r201758) @@ -105,7 +105,7 @@ static int elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, int local, elf_lookup_fn lookup) { - Elf_Addr *where = (Elf_Addr *)NULL;; + Elf_Addr *where = (Elf_Addr *)NULL; Elf_Addr addr; Elf_Addr addend = (Elf_Addr)0; Elf_Word rtype = (Elf_Word)0, symidx; Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/net/flowtable.c Thu Jan 7 21:01:37 2010 (r201758) @@ -404,7 +404,7 @@ ipv4_flow_lookup_hash_internal(struct mb if (*flags & FL_HASH_PORTS) goto noop; /* no port - hence not a protocol we care about */ - break;; + break; } *protop = proto; Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/net80211/ieee80211_node.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1739,7 +1739,7 @@ ieee80211_node_delucastkey(struct ieee80 status = ieee80211_crypto_delkey(ni->ni_vap, &ni->ni_ucastkey); if (nt->nt_keyixmap != NULL && keyix < nt->nt_keyixmax) { nikey = nt->nt_keyixmap[keyix]; - nt->nt_keyixmap[keyix] = NULL;; + nt->nt_keyixmap[keyix] = NULL; } } if (!isowned) Modified: head/sys/netinet/libalias/alias_db.c ============================================================================== --- head/sys/netinet/libalias/alias_db.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/netinet/libalias/alias_db.c Thu Jan 7 21:01:37 2010 (r201758) @@ -2136,7 +2136,7 @@ void SetProtocolFlags(struct alias_link *lnk, int pflags) { - lnk->pflags = pflags;; + lnk->pflags = pflags; } int Modified: head/sys/netinet/libalias/alias_mod.c ============================================================================== --- head/sys/netinet/libalias/alias_mod.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/netinet/libalias/alias_mod.c Thu Jan 7 21:01:37 2010 (r201758) @@ -158,7 +158,7 @@ _attach_handler(struct proto_handler *p) static int _detach_handler(struct proto_handler *p) { - struct proto_handler *b, *b_tmp;; + struct proto_handler *b, *b_tmp; LIBALIAS_WLOCK_ASSERT(); LIST_FOREACH_SAFE(b, &handler_chain, entries, b_tmp) { Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/netinet/sctp_asconf.c Thu Jan 7 21:01:37 2010 (r201758) @@ -2224,7 +2224,7 @@ sctp_asconf_iterator_stcb(struct sctp_in } if (stcb->asoc.ipv4_local_scope == 0 && IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { - continue;; + continue; } if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && SCTP_IPV6_V6ONLY(inp6)) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/netinet/sctputil.c Thu Jan 7 21:01:37 2010 (r201758) @@ -4382,7 +4382,7 @@ sctp_add_to_readq(struct sctp_inpcb *inp m = SCTP_BUF_NEXT(prev); } if (m == NULL) { - control->tail_mbuf = prev;; + control->tail_mbuf = prev; } continue; } Modified: head/sys/nfsclient/bootp_subr.c ============================================================================== --- head/sys/nfsclient/bootp_subr.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/nfsclient/bootp_subr.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1332,7 +1332,7 @@ bootpc_compose_query(struct bootpc_ifcon *vendp++ = TAG_VENDOR_INDENTIFIER; *vendp++ = vendor_client_len; memcpy(vendp, vendor_client, vendor_client_len); - vendp += vendor_client_len;; + vendp += vendor_client_len; ifctx->dhcpquerytype = DHCP_NOMSG; switch (ifctx->state) { case IF_DHCP_UNRESOLVED: Modified: head/sys/pci/ncr.c ============================================================================== --- head/sys/pci/ncr.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/pci/ncr.c Thu Jan 7 21:01:37 2010 (r201758) @@ -3992,7 +3992,7 @@ ncr_action (struct cam_sim *sim, union c msgptr[msglen++] = MSG_EXT_SDTR_LEN; msgptr[msglen++] = MSG_EXT_SDTR; msgptr[msglen++] = tp->tinfo.goal.period; - msgptr[msglen++] = tp->tinfo.goal.offset;; + msgptr[msglen++] = tp->tinfo.goal.offset; if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(ccb); printf ("sync msgout: "); Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/powerpc/aim/mmu_oea.c Thu Jan 7 21:01:37 2010 (r201758) @@ -922,7 +922,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k thread0.td_kstack = va; thread0.td_kstack_pages = KSTACK_PAGES; for (i = 0; i < KSTACK_PAGES; i++) { - moea_kenter(mmup, va, pa);; + moea_kenter(mmup, va, pa); pa += PAGE_SIZE; va += PAGE_SIZE; } @@ -935,7 +935,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k va = virtual_avail; virtual_avail += round_page(MSGBUF_SIZE); while (va < virtual_avail) { - moea_kenter(mmup, va, pa);; + moea_kenter(mmup, va, pa); pa += PAGE_SIZE; va += PAGE_SIZE; } @@ -948,7 +948,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k va = virtual_avail; virtual_avail += DPCPU_SIZE; while (va < virtual_avail) { - moea_kenter(mmup, va, pa);; + moea_kenter(mmup, va, pa); pa += PAGE_SIZE; va += PAGE_SIZE; } Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Jan 7 21:01:37 2010 (r201758) @@ -1019,7 +1019,7 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o thread0.td_kstack = va; thread0.td_kstack_pages = KSTACK_PAGES; for (i = 0; i < KSTACK_PAGES; i++) { - moea64_kenter(mmup, va, pa);; + moea64_kenter(mmup, va, pa); pa += PAGE_SIZE; va += PAGE_SIZE; } @@ -1032,7 +1032,7 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o va = virtual_avail; virtual_avail += round_page(MSGBUF_SIZE); while (va < virtual_avail) { - moea64_kenter(mmup, va, pa);; + moea64_kenter(mmup, va, pa); pa += PAGE_SIZE; va += PAGE_SIZE; } @@ -1045,7 +1045,7 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o va = virtual_avail; virtual_avail += DPCPU_SIZE; while (va < virtual_avail) { - moea64_kenter(mmup, va, pa);; + moea64_kenter(mmup, va, pa); pa += PAGE_SIZE; va += PAGE_SIZE; } Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/powerpc/booke/pmap.c Thu Jan 7 21:01:37 2010 (r201758) @@ -2307,7 +2307,7 @@ make_sure_to_unlock: static void mmu_booke_change_wiring(mmu_t mmu, pmap_t pmap, vm_offset_t va, boolean_t wired) { - pte_t *pte;; + pte_t *pte; PMAP_LOCK(pmap); if ((pte = pte_find(mmu, pmap, va)) != NULL) { @@ -2791,7 +2791,7 @@ tlb1_write_entry(unsigned int idx) mtspr(SPR_MAS7, mas7); __asm __volatile("isync; tlbwe; isync; msync"); - //debugf("tlb1_write_entry: e\n");; + //debugf("tlb1_write_entry: e\n"); } /* Modified: head/sys/rpc/clnt_dg.c ============================================================================== --- head/sys/rpc/clnt_dg.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/rpc/clnt_dg.c Thu Jan 7 21:01:37 2010 (r201758) @@ -258,7 +258,7 @@ clnt_dg_create( rpc_createerr.cf_error.re_errno = 0; goto err2; } - cu->cu_mcalllen = XDR_GETPOS(&xdrs);; + cu->cu_mcalllen = XDR_GETPOS(&xdrs); /* * By default, closeit is always FALSE. It is users responsibility Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/ufs/ffs/ffs_snapshot.c Thu Jan 7 21:01:37 2010 (r201758) @@ -739,7 +739,7 @@ out1: auio.uio_iovcnt = 1; aiov.iov_base = (void *)snapblklist; aiov.iov_len = snaplistsize * sizeof(daddr_t); - auio.uio_resid = aiov.iov_len;; + auio.uio_resid = aiov.iov_len; auio.uio_offset = ip->i_size; auio.uio_segflg = UIO_SYSSPACE; auio.uio_rw = UIO_WRITE; Modified: head/sys/xen/xenbus/xenbus_probe.c ============================================================================== --- head/sys/xen/xenbus/xenbus_probe.c Thu Jan 7 20:40:38 2010 (r201757) +++ head/sys/xen/xenbus/xenbus_probe.c Thu Jan 7 21:01:37 2010 (r201758) @@ -330,7 +330,7 @@ xenbus_devices_changed(struct xenbus_wat device_t dev = sc->xs_dev; char *node, *bus, *type, *id, *p; - node = strdup(vec[XS_WATCH_PATH], M_DEVBUF);; + node = strdup(vec[XS_WATCH_PATH], M_DEVBUF); p = strchr(node, '/'); if (!p) goto out; From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 21:08:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA5F3106566C; Thu, 7 Jan 2010 21:08:22 +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 A8CCC8FC08; Thu, 7 Jan 2010 21:08:22 +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 o07L8M66065990; Thu, 7 Jan 2010 21:08:22 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07L8MB8065988; Thu, 7 Jan 2010 21:08:22 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001072108.o07L8MB8065988@svn.freebsd.org> From: Christian Brueffer Date: Thu, 7 Jan 2010 21:08:22 +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: r201759 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 21:08:22 -0000 Author: brueffer Date: Thu Jan 7 21:08:22 2010 New Revision: 201759 URL: http://svn.freebsd.org/changeset/base/201759 Log: Fix a typo and bump date for the previous commit. Modified: head/lib/libc/sys/sendfile.2 Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Thu Jan 7 21:01:37 2010 (r201758) +++ head/lib/libc/sys/sendfile.2 Thu Jan 7 21:08:22 2010 (r201759) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2006 +.Dd January 7, 2010 .Dt SENDFILE 2 .Os .Sh NAME @@ -123,7 +123,7 @@ and .Vt sf_buf . The flag does not make the .Fn sendfile -syscall trully non-blocking, since other resources are still allocated +syscall truly non-blocking, since other resources are still allocated in blocking fashion. .It .Dv SF_SYNC . From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 21:14:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 356E41065670; Thu, 7 Jan 2010 21:14:47 +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 23F798FC08; Thu, 7 Jan 2010 21:14:47 +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 o07LElPl067424; Thu, 7 Jan 2010 21:14:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07LElxx067422; Thu, 7 Jan 2010 21:14:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001072114.o07LElxx067422@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 7 Jan 2010 21:14: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: r201760 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 21:14:47 -0000 Author: kib Date: Thu Jan 7 21:14:46 2010 New Revision: 201760 URL: http://svn.freebsd.org/changeset/base/201760 Log: Further fix grammar. Suggested by: alc MFC after: 3 days Modified: head/lib/libc/sys/sendfile.2 Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Thu Jan 7 21:08:22 2010 (r201759) +++ head/lib/libc/sys/sendfile.2 Thu Jan 7 21:14:46 2010 (r201760) @@ -124,7 +124,7 @@ and The flag does not make the .Fn sendfile syscall truly non-blocking, since other resources are still allocated -in blocking fashion. +in a blocking fashion. .It .Dv SF_SYNC . .Nm From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 21:35:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FA881065670; Thu, 7 Jan 2010 21:35:35 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2DE358FC0C; Thu, 7 Jan 2010 21:35:35 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 682D2730A1; Thu, 7 Jan 2010 22:43:34 +0100 (CET) Date: Thu, 7 Jan 2010 22:43:34 +0100 From: Luigi Rizzo To: Michael Tuexen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100107214334.GA35184@onelab2.iet.unipi.it> References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100104190024.GA47532@onelab2.iet.unipi.it> <517EF225-7EEB-4844-A0AD-019AD72F9403@freebsd.org> <20100104222323.GA49068@onelab2.iet.unipi.it> <20100107203536.GB8230@rincewind.paeps.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100107203536.GB8230@rincewind.paeps.cx> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 21:35:35 -0000 On Thu, Jan 07, 2010 at 09:35:36PM +0100, Philip Paeps wrote: > On 2010-01-04 23:23:23 (+0100), Luigi Rizzo wrote: > > This was the reason why I moved ipfw-related stuff out of the way > > and plan to do the same with tcp unless someone precedes me. > > Please discuss this on -net or so first. I have worked in an environment here we are :) > where tcp was moved out of netinet when it was imported (around 2.2.8-time) > and it opens the door to a number of strange phenomena. I think i know pretty well the problems involved, because I have done the process already for ipfw/ (so you can see how i proceeded) and this is not just related to the number of files but also to their size. I know that adding a few lines to a header, or a few functions to a file, is often quicker for the programmer than partitioning the files. But when files and directories become 3..10 times larger than their original version at least calls for a scrutiny of whether the content still fits the original design. > What do you do with udp, for instance? Compared to tcp and sctp, it's > trivial in terms of code, but it's an upper layer protocol from the > perspective of netinet/netinet6 - do we put it in its own directory too? > Also note that this won't only cause churn for people who have patches against > or (out-of-tree) branches from netinet/, but also in other kernel subsystems > which rely on tcp -- nfs, for instance. + I have no intention to move headers whose name constitutes a de-facto standard for userland apps; that would be stupid, as it would break a lot of stuff over which we have no control. + there is also no reason to move single files (such as udp) somewhere else. + i don't much follow the issue churn on nfs or kernel subsystems: .c files are not #included, and headers will be handled with due care, see above. Plus, we usually try to make the kernel buildable after such changes. + i find the concern about churn in external patchsets a bit weak, first of all because this is bound to happen unless we stop all development, and secondly because this kind of file moving or splitting happens once every 10-15 years which is well beyond the lifetime of a patchset. cheers luigi From owner-svn-src-head@FreeBSD.ORG Thu Jan 7 23:30:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 453A910656B7; Thu, 7 Jan 2010 23:30:11 +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 33FB98FC17; Thu, 7 Jan 2010 23:30: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 o07NUBvM097465; Thu, 7 Jan 2010 23:30:11 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o07NUB0K097463; Thu, 7 Jan 2010 23:30:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001072330.o07NUB0K097463@svn.freebsd.org> From: Doug Barton Date: Thu, 7 Jan 2010 23:30: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: r201764 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 23:30:11 -0000 Author: dougb Date: Thu Jan 7 23:30:10 2010 New Revision: 201764 URL: http://svn.freebsd.org/changeset/base/201764 Log: For the now-infamous Rumsfeld quote: Change "there're" to "there are" which is consistent with the vast majority of on line references. Remove a spurious trailing " Update the citation text with a suggestion from des. Modified: head/games/fortune/datfiles/fortunes-o.real Modified: head/games/fortune/datfiles/fortunes-o.real ============================================================================== --- head/games/fortune/datfiles/fortunes-o.real Thu Jan 7 23:28:58 2010 (r201763) +++ head/games/fortune/datfiles/fortunes-o.real Thu Jan 7 23:30:10 2010 (r201764) @@ -665,10 +665,10 @@ a postcard?" % As we know, there are known knowns. There are things we know we know. We also know there are known unknowns. That is to say, we know -there're some things we do not know. But there're also unknown unknowns; -the ones we don't know we don't know." +there are some things we do not know. But there are also unknown +unknowns; the ones we don't know we don't know. -- United States Secretary of Defense Donald Rumsfeld - 12 February 2002, on the invasion to Iraq. + 12 February 2002, Regarding the US invasion of Iraq % "Are pirates an ethnic group? Or are they just people who burn illegal cds?" From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 00:05:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 828201065670; Fri, 8 Jan 2010 00:05:10 +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 716368FC08; Fri, 8 Jan 2010 00:05:10 +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 o0805Ais005291; Fri, 8 Jan 2010 00:05:10 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0805Ad4005288; Fri, 8 Jan 2010 00:05:10 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001080005.o0805Ad4005288@svn.freebsd.org> From: Doug Barton Date: Fri, 8 Jan 2010 00:05: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: r201765 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 00:05:10 -0000 Author: dougb Date: Fri Jan 8 00:05:10 2010 New Revision: 201765 URL: http://svn.freebsd.org/changeset/base/201765 Log: Update copyright date Update delete_temproot() to include the error message if it fails, and clean up the places where it's called. If there are no files left in temproot when the comparison is done delete it without prompting. This should make "automated" runs of mergemaster without -a a little easier. Document the new behavior in the man page. Modified: head/usr.sbin/mergemaster/mergemaster.8 head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.8 Thu Jan 7 23:30:10 2010 (r201764) +++ head/usr.sbin/mergemaster/mergemaster.8 Fri Jan 8 00:05:10 2010 (r201765) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2009 Douglas Barton +.\" Copyright (c) 1998-2010 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2009 +.Dd January 7, 2010 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -165,6 +165,14 @@ which will be read before Options specified on the command line are updated last, and therefore can override both files. .Pp +When the comparison is done if there are any files remaining +in the temproot directory they will be listed, and if the +.Fl a +option is not in use the user will be given the option of +deleting the temproot directory. +If there are no files remaining in the temproot directory +it will be deleted. +.Pp The options are as follows: .Bl -tag -width Fl .It Fl s Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 7 23:30:10 2010 (r201764) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 8 00:05:10 2010 (r201765) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2009 Douglas Barton +# Copyright 1998-2010 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -511,7 +511,7 @@ CVS_ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null chflags -R 0 "${TEMPROOT}" 2>/dev/null - rm -rf "${TEMPROOT}" || exit 1 + rm -rf "${TEMPROOT}" || { echo "*** Unable to delete ${TEMPROOT}"; exit 1; } } case "${RERUN}" in @@ -542,7 +542,7 @@ case "${RERUN}" in echo '' echo " *** Deleting the old ${TEMPROOT}" echo '' - delete_temproot || exit 1 + delete_temproot unset TEST_TEMP_ROOT ;; [tT]) @@ -1144,28 +1144,26 @@ if [ -n "${TEST_FOR_FILES}" ]; then echo "*** Files that remain for you to merge by hand:" find "${TEMPROOT}" -type f -size +0 | sort echo '' -fi - -case "${AUTO_RUN}" in -'') - echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " - read DEL_TEMPROOT - case "${DEL_TEMPROOT}" in - [yY]*) - if delete_temproot; then - echo " *** ${TEMPROOT} has been deleted" - else - echo " *** Unable to delete ${TEMPROOT}" - fi - ;; - *) - echo " *** ${TEMPROOT} will remain" + case "${AUTO_RUN}" in + '') + echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " + read DEL_TEMPROOT + case "${DEL_TEMPROOT}" in + [yY]*) + delete_temproot + ;; + *) + echo " *** ${TEMPROOT} will remain" + ;; + esac ;; + *) ;; esac - ;; -*) ;; -esac +else + echo "*** ${TEMPROOT} is empty, deleting" + delete_temproot +fi case "${AUTO_INSTALLED_FILES}" in '') ;; From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 01:41:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AF71065670; Fri, 8 Jan 2010 01:41:58 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70EE98FC0C; Fri, 8 Jan 2010 01:41:58 +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 o081fwkx026687; Fri, 8 Jan 2010 01:41:58 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o081fwVp026685; Fri, 8 Jan 2010 01:41:58 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001080141.o081fwVp026685@svn.freebsd.org> From: Andrew Thompson Date: Fri, 8 Jan 2010 01:41: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: r201766 - head/sys/dev/usb/serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 01:41:58 -0000 Author: thompsa Date: Fri Jan 8 01:41:58 2010 New Revision: 201766 URL: http://svn.freebsd.org/changeset/base/201766 Log: Remove unneeded includes. Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Jan 8 00:05:10 2010 (r201765) +++ head/sys/dev/usb/serial/u3g.c Fri Jan 8 01:41:58 2010 (r201766) @@ -59,9 +59,7 @@ #define USB_DEBUG_VAR u3g_debug #include #include -#include #include -#include #include From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 02:39:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06224106566B; Fri, 8 Jan 2010 02:39:56 +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 CD9E08FC15; Fri, 8 Jan 2010 02:39:55 +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 o082dt5c039374; Fri, 8 Jan 2010 02:39:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o082drqe039372; Fri, 8 Jan 2010 02:39:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001080239.o082drqe039372@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 8 Jan 2010 02:39: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: r201767 - head/sys/dev/ste X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 02:39:56 -0000 Author: yongari Date: Fri Jan 8 02:39:53 2010 New Revision: 201767 URL: http://svn.freebsd.org/changeset/base/201767 Log: Fix EEPROM access code to return data in host byte order. EEPROM on ST201 always returns 16bits data with little endian format so conversion to host order is required. This change fixes inversed ethernet address on sparc64. Modified: head/sys/dev/ste/if_ste.c Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Fri Jan 8 01:41:58 2010 (r201766) +++ head/sys/dev/ste/if_ste.c Fri Jan 8 02:39:53 2010 (r201767) @@ -120,7 +120,7 @@ static int ste_miibus_readreg(device_t, static void ste_miibus_statchg(device_t); static int ste_miibus_writereg(device_t, int, int, int); static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *); -static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); +static int ste_read_eeprom(struct ste_softc *, uint16_t *, int, int); static void ste_reset(struct ste_softc *); static void ste_restart_tx(struct ste_softc *); static int ste_rxeof(struct ste_softc *, int); @@ -538,9 +538,8 @@ ste_eeprom_wait(struct ste_softc *sc) * data is stored in the EEPROM in network byte order. */ static int -ste_read_eeprom(struct ste_softc *sc, caddr_t dest, int off, int cnt, int swap) +ste_read_eeprom(struct ste_softc *sc, uint16_t *dest, int off, int cnt) { - uint16_t word, *ptr; int err = 0, i; if (ste_eeprom_wait(sc)) @@ -551,12 +550,8 @@ ste_read_eeprom(struct ste_softc *sc, ca err = ste_eeprom_wait(sc); if (err) break; - word = CSR_READ_2(sc, STE_EEPROM_DATA); - ptr = (uint16_t *)(dest + (i * 2)); - if (swap) - *ptr = ntohs(word); - else - *ptr = word; + *dest = le16toh(CSR_READ_2(sc, STE_EEPROM_DATA)); + dest++; } return (err ? 1 : 0); @@ -1063,7 +1058,7 @@ ste_attach(device_t dev) { struct ste_softc *sc; struct ifnet *ifp; - u_char eaddr[6]; + uint16_t eaddr[ETHER_ADDR_LEN / 2]; int error = 0, pmc, rid; sc = device_get_softc(dev); @@ -1122,8 +1117,7 @@ ste_attach(device_t dev) /* * Get station address from the EEPROM. */ - if (ste_read_eeprom(sc, eaddr, - STE_EEADDR_NODE0, 3, 0)) { + if (ste_read_eeprom(sc, eaddr, STE_EEADDR_NODE0, ETHER_ADDR_LEN / 2)) { device_printf(dev, "failed to read station address\n"); error = ENXIO; goto fail; @@ -1163,7 +1157,7 @@ ste_attach(device_t dev) /* * Call MI attach routine. */ - ether_ifattach(ifp, eaddr); + ether_ifattach(ifp, (uint8_t *)eaddr); /* * Tell the upper layer(s) we support long frames. From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 02:43:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 691511065672; Fri, 8 Jan 2010 02:43:20 +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 5883F8FC13; Fri, 8 Jan 2010 02:43:20 +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 o082hKxW040137; Fri, 8 Jan 2010 02:43:20 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o082hKkb040135; Fri, 8 Jan 2010 02:43:20 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001080243.o082hKkb040135@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 8 Jan 2010 02:43: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: r201768 - head/sys/dev/ste X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 02:43:20 -0000 Author: yongari Date: Fri Jan 8 02:43:20 2010 New Revision: 201768 URL: http://svn.freebsd.org/changeset/base/201768 Log: Make sure to store dma address of RX buffer in little endian form. This fixes the last bug which keeps ste(4) from working on sparc64. Modified: head/sys/dev/ste/if_ste.c Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Fri Jan 8 02:39:53 2010 (r201767) +++ head/sys/dev/ste/if_ste.c Fri Jan 8 02:43:20 2010 (r201768) @@ -1573,12 +1573,14 @@ ste_init_rx_list(struct ste_softc *sc) return (error); if (i == (STE_RX_LIST_CNT - 1)) { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[0]; - ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + - (sizeof(struct ste_desc_onefrag) * 0); + ld->ste_rx_list[i].ste_next = + htole32(ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * 0)); } else { cd->ste_rx_chain[i].ste_next = &cd->ste_rx_chain[i + 1]; - ld->ste_rx_list[i].ste_next = ld->ste_rx_list_paddr + - (sizeof(struct ste_desc_onefrag) * (i + 1)); + ld->ste_rx_list[i].ste_next = + htole32(ld->ste_rx_list_paddr + + (sizeof(struct ste_desc_onefrag) * (i + 1))); } } From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 02:46:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1E8106566B; Fri, 8 Jan 2010 02:46:34 +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 AC5DD8FC08; Fri, 8 Jan 2010 02:46:34 +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 o082kY5w040902; Fri, 8 Jan 2010 02:46:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o082kYsj040900; Fri, 8 Jan 2010 02:46:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001080246.o082kYsj040900@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 8 Jan 2010 02:46: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: r201769 - head/sys/sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 02:46:34 -0000 Author: yongari Date: Fri Jan 8 02:46:34 2010 New Revision: 201769 URL: http://svn.freebsd.org/changeset/base/201769 Log: Enable ste(4). ste(4) should work on all architectures. Modified: head/sys/sparc64/conf/GENERIC Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Fri Jan 8 02:43:20 2010 (r201768) +++ head/sys/sparc64/conf/GENERIC Fri Jan 8 02:46:34 2010 (r201769) @@ -190,7 +190,7 @@ device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') #device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -#device ste # Sundance ST201 (D-Link DFE-550TX) +device ste # Sundance ST201 (D-Link DFE-550TX) device stge # Sundance/Tamarack TC9021 gigabit Ethernet #device tl # Texas Instruments ThunderLAN #device tx # SMC EtherPower II (83c170 ``EPIC'') From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 06:11:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD908106566C; Fri, 8 Jan 2010 06:11:26 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 424248FC13; Fri, 8 Jan 2010 06:11:25 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o086BOuQ013651; Fri, 8 Jan 2010 09:11:24 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1262931084; bh=QTuze42duKMnF2ri105X2/q9xZMPei0vMk2y6GKTkzY=; l=698; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=ggaPd/pkzcNlJ9CQIPUMQ+Q34H7Pc7cAHaDXIoJgpvP9V3lHcAb3azThWvicjleQX Kx2h+yIimAOqZqrBbEFNw2AM4iD7WXW/5lTlGmZInoZ9W5XOzWE038qnFEcgg7ao1k fNan2pHpP5QKw8nqbMhNHxJmk4QS+mwKJVQSPbmU= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o086BNuP013650; Fri, 8 Jan 2010 09:11:24 +0300 (MSK) (envelope-from ache) Date: Fri, 8 Jan 2010 09:11:23 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100108061123.GA13136@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001052020.o05KKVEp002337@svn.freebsd.org> <20100107050409.GA85573@nagual.pp.ru> <20100108030937.Q56559@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100108030937.Q56559@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r201604 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 06:11:26 -0000 On Fri, Jan 08, 2010 at 03:29:07AM +1100, Bruce Evans wrote: > Nothing has turned here yet. We just didn't want to risk changing > alphasort() yet. I mean the comment itself. > POSIX adds an EINVAL error and a requirement that errno no be modified > if there is no error, so that errors from strcoll() can be detected > (still messily -- you have to set errno to != EINVAL before the call). > Maybe falling back to strcmp() is good enough for the errnor handling. Currently strcoll() never use EILSEQ and always falback to ASCII when ordering is equal. In the future, when EILSEQ will be used, it can fallback to ASCII too, producing stable ordering. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 06:25:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E98A106568D for ; Fri, 8 Jan 2010 06:25:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 758548FC16 for ; Fri, 8 Jan 2010 06:25:46 +0000 (UTC) Received: (qmail 23313 invoked by uid 399); 8 Jan 2010 06:25:46 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 8 Jan 2010 06:25:46 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B46CFE8.8000501@FreeBSD.org> Date: Thu, 07 Jan 2010 22:25:44 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> In-Reply-To: <867hrvgw2j.fsf@ds4.des.no> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 06:25:47 -0000 Dag-Erling Smørgrav wrote: > I don't see how the Rumsfeld quote could offend anyone. A) Better safe than sorry B) Regardless of my own opinions I can easily see how someone could be offended by anything having to do with Rumsfeld, the Iraq war, etc. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 06:26:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BCE106566C; Fri, 8 Jan 2010 06:26:39 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 7A6748FC20; Fri, 8 Jan 2010 06:26:38 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o086QZ5f015087; Fri, 8 Jan 2010 09:26:35 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1262931995; bh=hGyLPH9fzOB6E1q2tUdE7G6KP4AtZIw6sdtmIOCTsW8=; l=559; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=sWeeRCUhcRsSaUU0420hy+Y++ih5Gp7mw4CA27AeIbFR0zJuUAaXj3YGXfOH1SjV2 9B8br2Jyllp40tdeAouoIaubJKKSF82RdFweonBP8dhs4Nqsjz4cBHq2K2sf4lTSiV DAg/iYFw5OegEfM2kJtlAZIE6yu7wbXDajZWW0ic= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o086QYM1015085; Fri, 8 Jan 2010 09:26:35 +0300 (MSK) (envelope-from ache) Date: Fri, 8 Jan 2010 09:26:34 +0300 From: Andrey Chernov To: Bruce Evans , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100108062634.GA14489@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001052020.o05KKVEp002337@svn.freebsd.org> <20100107050409.GA85573@nagual.pp.ru> <20100108030937.Q56559@delplex.bde.org> <20100108061123.GA13136@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100108061123.GA13136@nagual.pp.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r201604 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 06:26:39 -0000 On Fri, Jan 08, 2010 at 09:11:23AM +0300, Andrey Chernov wrote: > On Fri, Jan 08, 2010 at 03:29:07AM +1100, Bruce Evans wrote: > > Nothing has turned here yet. We just didn't want to risk changing > > alphasort() yet. > > I mean the comment itself. I.e. instead of making this doubtful comment, it will be more logical to commit strcmp() -> strcoll() replacement, while someone (kib@) in that area. Lack of strcoll() in alphasort() is just missed change and not risk area. ls proved to pass this risk area well. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 07:57:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08DCF106566B; Fri, 8 Jan 2010 07:57:44 +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 ECB9F8FC12; Fri, 8 Jan 2010 07:57:43 +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 o087vh1h009801; Fri, 8 Jan 2010 07:57:43 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o087vhrr009799; Fri, 8 Jan 2010 07:57:43 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001080757.o087vhrr009799@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 8 Jan 2010 07:57:43 +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: r201773 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 07:57:44 -0000 Author: jh Date: Fri Jan 8 07:57:43 2010 New Revision: 201773 URL: http://svn.freebsd.org/changeset/base/201773 Log: - Change the type of size_max to u_quad_t because its value is converted with vfs_scanopt(9) using the "%qu" format string. - Limit the maximum value of size_max to (SIZE_MAX - PAGE_SIZE) to prevent overflow in howmany() macro. PR: kern/141194 Approved by: trasz (mentor) MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Fri Jan 8 07:42:01 2010 (r201772) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Fri Jan 8 07:57:43 2010 (r201773) @@ -185,8 +185,8 @@ tmpfs_mount(struct mount *mp) ino_t nodes; int error; /* Size counters. */ - ino_t nodes_max; - size_t size_max; + ino_t nodes_max; + u_quad_t size_max; /* Root node attributes. */ uid_t root_uid; @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max >= SIZE_MAX) + if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE)) pages = SIZE_MAX; else pages = howmany(size_max, PAGE_SIZE); From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 09:16:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B71F1106566B; Fri, 8 Jan 2010 09:16:37 +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 A73C88FC18; Fri, 8 Jan 2010 09:16:37 +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 o089GbSt027073; Fri, 8 Jan 2010 09:16:37 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o089Gblb027071; Fri, 8 Jan 2010 09:16:37 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001080916.o089Gblb027071@svn.freebsd.org> From: Alan Cox Date: Fri, 8 Jan 2010 09:16: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: r201774 - head/sys/i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 09:16:37 -0000 Author: alc Date: Fri Jan 8 09:16:37 2010 New Revision: 201774 URL: http://svn.freebsd.org/changeset/base/201774 Log: Catch up with r183101 that added "device acpi" to GENERIC. Modified: head/sys/i386/conf/PAE Modified: head/sys/i386/conf/PAE ============================================================================== --- head/sys/i386/conf/PAE Fri Jan 8 07:57:43 2010 (r201773) +++ head/sys/i386/conf/PAE Fri Jan 8 09:16:37 2010 (r201774) @@ -10,10 +10,6 @@ ident PAE-GENERIC # To make a PAE kernel, the next option is needed options PAE # Physical Address Extensions Kernel -# Compile acpi in statically since the module isn't built properly. Most -# machines which support large amounts of memory require acpi. -device acpi - # Don't build modules with this kernel config, since they are not built with # the correct options headers. makeoptions NO_MODULES=yes From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 10:32:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFC241065696; Fri, 8 Jan 2010 10:32:27 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D286F8FC1F; Fri, 8 Jan 2010 10:32: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 o08AWR7m045969; Fri, 8 Jan 2010 10:32:27 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08AWROo045967; Fri, 8 Jan 2010 10:32:27 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001081032.o08AWROo045967@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 8 Jan 2010 10:32: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: r201781 - head/sys/dev/jme X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 10:32:28 -0000 Author: gavin Date: Fri Jan 8 10:32:27 2010 New Revision: 201781 URL: http://svn.freebsd.org/changeset/base/201781 Log: If we fail to read the Ethernet address from the card, just print an warning message and attach without setting the Ethernet address to a random address. It is not believed that this code can actually be executed, and if it does, we're better off printing an error message than faking up an Ethernet address. PR: kern/133239 Reviewed by: yongari (earlier version of patch) Approved by: ed (mentor) Modified: head/sys/dev/jme/if_jme.c Modified: head/sys/dev/jme/if_jme.c ============================================================================== --- head/sys/dev/jme/if_jme.c Fri Jan 8 10:15:11 2010 (r201780) +++ head/sys/dev/jme/if_jme.c Fri Jan 8 10:32:27 2010 (r201781) @@ -462,15 +462,7 @@ jme_reg_macaddr(struct jme_softc *sc) if ((par0 == 0 && par1 == 0) || (par0 == 0xFFFFFFFF && par1 == 0xFFFF)) { device_printf(sc->jme_dev, - "generating fake ethernet address.\n"); - par0 = arc4random(); - /* Set OUI to JMicron. */ - sc->jme_eaddr[0] = 0x02; /* U/L bit set. */ - sc->jme_eaddr[1] = 0x1B; - sc->jme_eaddr[2] = 0x8C; - sc->jme_eaddr[3] = (par0 >> 16) & 0xff; - sc->jme_eaddr[4] = (par0 >> 8) & 0xff; - sc->jme_eaddr[5] = par0 & 0xff; + "Failed to retrieve Ethernet address.\n"); } else { sc->jme_eaddr[0] = (par0 >> 0) & 0xFF; sc->jme_eaddr[1] = (par0 >> 8) & 0xFF; From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 10:54:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 656111065672; Fri, 8 Jan 2010 10:54:15 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54EB28FC13; Fri, 8 Jan 2010 10:54:15 +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 o08AsF7p050833; Fri, 8 Jan 2010 10:54:15 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08AsFVA050831; Fri, 8 Jan 2010 10:54:15 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201001081054.o08AsFVA050831@svn.freebsd.org> From: Maxim Sobolev Date: Fri, 8 Jan 2010 10:54: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: r201782 - head/contrib/tcp_wrappers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 10:54:15 -0000 Author: sobomax Date: Fri Jan 8 10:54:15 2010 New Revision: 201782 URL: http://svn.freebsd.org/changeset/base/201782 Log: Allow comment (#) to be placed anywhere in the line, not only at the beginning, so it's consistent with other configuration files. MFC after: 3 weeks Modified: head/contrib/tcp_wrappers/hosts_access.c Modified: head/contrib/tcp_wrappers/hosts_access.c ============================================================================== --- head/contrib/tcp_wrappers/hosts_access.c Fri Jan 8 10:32:27 2010 (r201781) +++ head/contrib/tcp_wrappers/hosts_access.c Fri Jan 8 10:54:15 2010 (r201782) @@ -148,6 +148,7 @@ struct request_info *request; char *sh_cmd; /* becomes optional shell command */ int match = NO; struct tcpd_context saved_context; + char *cp; saved_context = tcpd_context; /* stupid compilers */ @@ -164,7 +165,16 @@ struct request_info *request; tcpd_warn("missing newline or line too long"); continue; } - if (sv_list[0] == '#' || sv_list[strspn(sv_list, " \t\r\n")] == 0) + /* Ignore anything after unescaped # character */ + for (cp = strchr(sv_list, '#'); cp != NULL;) { + if (cp > sv_list && cp[-1] == '\\') { + cp = strchr(cp + 1, '#'); + continue; + } + *cp = '\0'; + break; + } + if (sv_list[strspn(sv_list, " \t\r\n")] == 0) continue; if ((cl_list = split_at(sv_list, ':')) == 0) { tcpd_warn("missing \":\" separator"); From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 11:16:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D45B7106568B; Fri, 8 Jan 2010 11:16:58 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2B08FC0A; Fri, 8 Jan 2010 11:16:58 +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 o08BGwsw055919; Fri, 8 Jan 2010 11:16:58 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08BGw3c055917; Fri, 8 Jan 2010 11:16:58 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <201001081116.o08BGw3c055917@svn.freebsd.org> From: David Malone Date: Fri, 8 Jan 2010 11:16: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: r201784 - head/usr.bin/ctags X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 11:16:58 -0000 Author: dwmalone Date: Fri Jan 8 11:16:58 2010 New Revision: 201784 URL: http://svn.freebsd.org/changeset/base/201784 Log: This now passes a make universe with WARNS=6. Modified: head/usr.bin/ctags/Makefile Modified: head/usr.bin/ctags/Makefile ============================================================================== --- head/usr.bin/ctags/Makefile Fri Jan 8 11:06:13 2010 (r201783) +++ head/usr.bin/ctags/Makefile Fri Jan 8 11:16:58 2010 (r201784) @@ -5,6 +5,4 @@ PROG= ctags SRCS= C.c ctags.c fortran.c lisp.c print.c tree.c yacc.c CFLAGS+=-I${.CURDIR} -WARNS?= 1 - .include From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 11:43:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F0AE106566B; Fri, 8 Jan 2010 11:43:48 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 886908FC0C; Fri, 8 Jan 2010 11:43:47 +0000 (UTC) Received: by fxm27 with SMTP id 27so4579794fxm.3 for ; Fri, 08 Jan 2010 03:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pK/zzBRyYSX+7I3LfKnjitKNTx7zy11JSzJOREXnSk4=; b=maWl010nZA9cMr91wGjkIjY/aqCk9cV3hleXdyroYUpt3xmLYIj8TRPIRbd3Jy14zN tF4GnhjUMh0K2DfKKo+9G3t3yAZdk6wXuTjC3c6yjLFcAheyZjiogkpDOt/XSspIFDAr nDQlENb3TB698koDHQuIR4mTuYlEaQ1S3lfFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=B28pt0SAp0N22Jr0HmE5xhhHrjF5/ou+IjvjJzoaBLUyQwYiT4NuXK/UaKgYd+kDFJ 3emzO+Ww6URJCVEEPChoKtSESX7PoxLzrDVlAeWIPHTuCVvPfaasw+H8dKkIfCaFsiFy 3RQ+WSnI3cea6JJiQ8DJf/nvAQfG8y9qBBsDY= MIME-Version: 1.0 Received: by 10.239.168.9 with SMTP id i9mr1499424hbe.76.1262951021644; Fri, 08 Jan 2010 03:43:41 -0800 (PST) In-Reply-To: <4B46CFE8.8000501@FreeBSD.org> References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> <4B46CFE8.8000501@FreeBSD.org> Date: Fri, 8 Jan 2010 09:43:41 -0200 Message-ID: From: "Carlos A. M. dos Santos" To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Stanislav Sedov , =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 11:43:48 -0000 2010/1/8 Doug Barton : > Dag-Erling Sm=F8rgrav wrote: >> I don't see how the Rumsfeld quote could offend anyone. > > A) Better safe than sorry > B) Regardless of my own opinions I can easily see how someone could be > offended by anything having to do with Rumsfeld, the Iraq war, etc. Perhaps, at the moment. Five to ten years from now that quotation will be just history, like the ones from/about JFK, Richard Nixon, and Spiro Agnew. Are you whiling to apply such rule to all supposedly political fortunes? Looks like political correctness started to infect the BSD culture. Once upon a time this was the OS with guts to have a function called "die_you_gravy_sucking_pig_dog". From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 13:47:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFDF3106566C; Fri, 8 Jan 2010 13:47:16 +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 A02A88FC14; Fri, 8 Jan 2010 13:47:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5A2DA46B23; Fri, 8 Jan 2010 08:47:16 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 60D7F8A01F; Fri, 8 Jan 2010 08:47:15 -0500 (EST) From: John Baldwin To: Luigi Rizzo Date: Fri, 8 Jan 2010 08:12:21 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100107203536.GB8230@rincewind.paeps.cx> <20100107214334.GA35184@onelab2.iet.unipi.it> In-Reply-To: <20100107214334.GA35184@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001080812.21124.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 08 Jan 2010 08:47:15 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Michael Tuexen Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 13:47:16 -0000 On Thursday 07 January 2010 4:43:34 pm Luigi Rizzo wrote: > > What do you do with udp, for instance? Compared to tcp and sctp, it's > > trivial in terms of code, but it's an upper layer protocol from the > > perspective of netinet/netinet6 - do we put it in its own directory too? > > Also note that this won't only cause churn for people who have patches against > > or (out-of-tree) branches from netinet/, but also in other kernel subsystems > > which rely on tcp -- nfs, for instance. > > + i find the concern about churn in external patchsets a bit weak, first of > all because this is bound to happen unless we stop all development, > and secondly because this kind of file moving or splitting happens > once every 10-15 years which is well beyond the lifetime of a patchset. Having the files rename is entirely different from merging changes. At least for svn and p4 I believe that merging a rename into a branch is not smart enough to merge your local changes into the new files. Instead it involves a big manual fixup. Also, the 10-15 years thing is completely non-relevant. What is relevant is if you are working on a project in a branch and someone renames files before you have finished your branch and merged it up to HEAD. For example, assume that someone else renamed the ipfw files in HEAD next week. That would create an utter mess for you to resolve in your current ipfw3 branch. Moving TCP would create similar a headache, except much more widespread since TCP is one of the most widely worked-on subsystems. FWIW, I do think it would be cleaner to have netinet more split up perhaps, but I do not think it is worth the pain that would be involved. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 14:55:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE45106566C; Fri, 8 Jan 2010 14:55:11 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E12E8FC0A; Fri, 8 Jan 2010 14:55: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 o08EtBw9004347; Fri, 8 Jan 2010 14:55:11 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08EtB0b004344; Fri, 8 Jan 2010 14:55:11 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001081455.o08EtB0b004344@svn.freebsd.org> From: Attilio Rao Date: Fri, 8 Jan 2010 14:55: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: r201790 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 14:55:11 -0000 Author: attilio Date: Fri Jan 8 14:55:11 2010 New Revision: 201790 URL: http://svn.freebsd.org/changeset/base/201790 Log: - Fix a bug in sched_4bsd where the timestamp for the sleeping operation is not cleaned up on the wakeup but reset. This is harmless mostly because td_slptick (and ki_slptime from userland) should be analyzed only with the assumption that the thread is actually sleeping (thus while the td_slptick is correctly set) but without this invariant the number is nomore consistent. - Move td_slptick from u_int to int in order to follow 'ticks' signedness and wrap up accordingly [0] [0] Submitted by: emaste Sponsored by: Sandvine Incorporated MFC 1 week Modified: head/sys/kern/sched_4bsd.c head/sys/sys/proc.h Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Fri Jan 8 14:55:10 2010 (r201789) +++ head/sys/kern/sched_4bsd.c Fri Jan 8 14:55:11 2010 (r201790) @@ -1050,7 +1050,7 @@ sched_wakeup(struct thread *td) updatepri(td); resetpriority(td); } - td->td_slptick = ticks; + td->td_slptick = 0; ts->ts_slptime = 0; sched_add(td, SRQ_BORING); } Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Fri Jan 8 14:55:10 2010 (r201789) +++ head/sys/sys/proc.h Fri Jan 8 14:55:11 2010 (r201790) @@ -217,7 +217,7 @@ struct thread { int td_pinned; /* (k) Temporary cpu pin count. */ struct ucred *td_ucred; /* (k) Reference to credentials. */ u_int td_estcpu; /* (t) estimated cpu utilization */ - u_int td_slptick; /* (t) Time at sleep. */ + int td_slptick; /* (t) Time at sleep. */ struct rusage td_ru; /* (t) rusage information */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:41:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 579ED10656A3; Fri, 8 Jan 2010 15:41:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460F58FC1E; Fri, 8 Jan 2010 15:41: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 o08FfOSt014566; Fri, 8 Jan 2010 15:41:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08FfOHb014564; Fri, 8 Jan 2010 15:41:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081541.o08FfOHb014564@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:41: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: r201793 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:41:24 -0000 Author: trasz Date: Fri Jan 8 15:41:24 2010 New Revision: 201793 URL: http://svn.freebsd.org/changeset/base/201793 Log: Fix #ifdefs so that GCC 4.4 doesn't complain about it. Reviewed by: rpaulo Modified: head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Fri Jan 8 15:28:22 2010 (r201792) +++ head/sys/net80211/ieee80211_var.h Fri Jan 8 15:41:24 2010 (r201793) @@ -32,11 +32,11 @@ * Definitions for IEEE 802.11 drivers. */ /* NB: portability glue must go first */ -#ifdef __NetBSD__ +#if defined(__NetBSD__) #include -#elif __FreeBSD__ +#elif defined(__FreeBSD__) #include -#elif __linux__ +#elif defined(__linux__) #include #else #error "No support for your operating system!" From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:44:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA1181065670; Fri, 8 Jan 2010 15:44:49 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE64C8FC0C; Fri, 8 Jan 2010 15:44:49 +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 o08Fincv015364; Fri, 8 Jan 2010 15:44:49 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08FinVh015359; Fri, 8 Jan 2010 15:44:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081544.o08FinVh015359@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:44: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: r201794 - in head/sys: ddb dev/ep dev/ex netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:44:50 -0000 Author: trasz Date: Fri Jan 8 15:44:49 2010 New Revision: 201794 URL: http://svn.freebsd.org/changeset/base/201794 Log: Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in order to silence newer GCC versions. Modified: head/sys/ddb/db_ps.c head/sys/dev/ep/if_ep.c head/sys/dev/ex/if_ex.c head/sys/netinet6/ip6_input.c Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Fri Jan 8 15:41:24 2010 (r201793) +++ head/sys/ddb/db_ps.c Fri Jan 8 15:44:49 2010 (r201794) @@ -136,7 +136,7 @@ db_ps(db_expr_t addr, boolean_t hasaddr, if (TD_ON_LOCK(td)) lflag++; if (TD_IS_SLEEPING(td)) { - if (!td->td_flags & TDF_SINTR) + if (!(td->td_flags & TDF_SINTR)) dflag++; else sflag++; @@ -171,7 +171,7 @@ db_ps(db_expr_t addr, boolean_t hasaddr, state[1] = '\0'; /* Additional process state flags. */ - if (!p->p_flag & P_INMEM) + if (!(p->p_flag & P_INMEM)) strlcat(state, "W", sizeof(state)); if (p->p_flag & P_TRACED) strlcat(state, "X", sizeof(state)); Modified: head/sys/dev/ep/if_ep.c ============================================================================== --- head/sys/dev/ep/if_ep.c Fri Jan 8 15:41:24 2010 (r201793) +++ head/sys/dev/ep/if_ep.c Fri Jan 8 15:44:49 2010 (r201794) @@ -815,7 +815,7 @@ read_again: #endif EP_FRST(sc, F_RX_FIRST); status = CSR_READ_2(sc, EP_W1_RX_STATUS); - if (!status & ERR_RX_INCOMPLETE) { + if (!(status & ERR_RX_INCOMPLETE)) { /* * We see if by now, the packet has completly * arrived Modified: head/sys/dev/ex/if_ex.c ============================================================================== --- head/sys/dev/ex/if_ex.c Fri Jan 8 15:41:24 2010 (r201793) +++ head/sys/dev/ex/if_ex.c Fri Jan 8 15:44:49 2010 (r201794) @@ -677,7 +677,7 @@ ex_tx_intr(struct ex_softc *sc) while (sc->tx_head != sc->tx_tail) { CSR_WRITE_2(sc, HOST_ADDR_REG, sc->tx_head); - if (! CSR_READ_2(sc, IO_PORT_REG) & Done_bit) + if (!(CSR_READ_2(sc, IO_PORT_REG) & Done_bit)) break; tx_status = CSR_READ_2(sc, IO_PORT_REG); Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Fri Jan 8 15:41:24 2010 (r201793) +++ head/sys/netinet6/ip6_input.c Fri Jan 8 15:44:49 2010 (r201794) @@ -1406,7 +1406,7 @@ ip6_savecontrol(struct inpcb *in6p, stru mp = &(*mp)->m_next; break; case IPPROTO_ROUTING: - if (!in6p->inp_flags & IN6P_RTHDR) + if (!(in6p->inp_flags & IN6P_RTHDR)) break; *mp = sbcreatecontrol((caddr_t)ip6e, elen, From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:46:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E5B21065670; Fri, 8 Jan 2010 15:46:28 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CEFB8FC1C; Fri, 8 Jan 2010 15:46:28 +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 o08FkRGV015764; Fri, 8 Jan 2010 15:46:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08FkRIp015762; Fri, 8 Jan 2010 15:46:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081546.o08FkRIp015762@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:46: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: r201795 - head/sys/dev/mly X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:46:28 -0000 Author: trasz Date: Fri Jan 8 15:46:27 2010 New Revision: 201795 URL: http://svn.freebsd.org/changeset/base/201795 Log: Put mly_timeout() under MLY_DEBUG, so that newer GCC versions don't complain about unused static function. Reviewed by: scottl Modified: head/sys/dev/mly/mly.c Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Fri Jan 8 15:44:49 2010 (r201794) +++ head/sys/dev/mly/mly.c Fri Jan 8 15:46:27 2010 (r201795) @@ -117,9 +117,9 @@ static void mly_printstate(struct mly_so static void mly_print_command(struct mly_command *mc); static void mly_print_packet(struct mly_command *mc); static void mly_panic(struct mly_softc *sc, char *reason); +static int mly_timeout(struct mly_softc *sc); #endif void mly_print_controller(int controller); -static int mly_timeout(struct mly_softc *sc); static d_open_t mly_user_open; @@ -2981,6 +2981,7 @@ mly_user_health(struct mly_softc *sc, st return(error); } +#ifdef MLY_DEBUG static int mly_timeout(struct mly_softc *sc) { @@ -3000,3 +3001,4 @@ mly_timeout(struct mly_softc *sc) return (0); } +#endif From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:47:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C9631065695; Fri, 8 Jan 2010 15:47:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B36A8FC20; Fri, 8 Jan 2010 15:47:23 +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 o08FlNEJ015997; Fri, 8 Jan 2010 15:47:23 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08FlNux015995; Fri, 8 Jan 2010 15:47:23 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081547.o08FlNux015995@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:47: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: r201796 - head/sys/dev/iir X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:47:23 -0000 Author: trasz Date: Fri Jan 8 15:47:23 2010 New Revision: 201796 URL: http://svn.freebsd.org/changeset/base/201796 Log: Remove unused iir_watchdog(). Reviewed by: scottl Modified: head/sys/dev/iir/iir.c Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Fri Jan 8 15:46:27 2010 (r201795) +++ head/sys/dev/iir/iir.c Fri Jan 8 15:47:23 2010 (r201796) @@ -153,7 +153,6 @@ static void iir_action(struct cam_si static void iir_poll(struct cam_sim *sim); static void iir_shutdown(void *arg, int howto); static void iir_timeout(void *arg); -static void iir_watchdog(void *arg); static void gdt_eval_mapping(u_int32_t size, int *cyls, int *heads, int *secs); @@ -1484,40 +1483,6 @@ iir_timeout(void *arg) GDT_DPRINTF(GDT_D_TIMEOUT, ("iir_timeout(%p)\n", gccb)); } -static void -iir_watchdog(void *arg) -{ - struct gdt_softc *gdt; - - gdt = (struct gdt_softc *)arg; - GDT_DPRINTF(GDT_D_DEBUG, ("iir_watchdog(%p)\n", gdt)); - - { - int ccbs = 0, ucmds = 0, frees = 0, pends = 0; - struct gdt_ccb *p; - struct ccb_hdr *h; - struct gdt_ucmd *u; - - for (h = TAILQ_FIRST(&gdt->sc_ccb_queue); h != NULL; - h = TAILQ_NEXT(h, sim_links.tqe)) - ccbs++; - for (u = TAILQ_FIRST(&gdt->sc_ucmd_queue); u != NULL; - u = TAILQ_NEXT(u, links)) - ucmds++; - for (p = SLIST_FIRST(&gdt->sc_free_gccb); p != NULL; - p = SLIST_NEXT(p, sle)) - frees++; - for (p = SLIST_FIRST(&gdt->sc_pending_gccb); p != NULL; - p = SLIST_NEXT(p, sle)) - pends++; - - GDT_DPRINTF(GDT_D_TIMEOUT, ("ccbs %d ucmds %d frees %d pends %d\n", - ccbs, ucmds, frees, pends)); - } - - timeout(iir_watchdog, (caddr_t)gdt, hz * 15); -} - static void iir_shutdown( void *arg, int howto ) { From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:52:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65B82106566C; Fri, 8 Jan 2010 15:52:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53C408FC20; Fri, 8 Jan 2010 15:52: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 o08Fq6Ul017082; Fri, 8 Jan 2010 15:52:06 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08Fq69e017080; Fri, 8 Jan 2010 15:52:06 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081552.o08Fq69e017080@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:52: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: r201797 - head/sys/dev/usb/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:52:07 -0000 Author: trasz Date: Fri Jan 8 15:52:06 2010 New Revision: 201797 URL: http://svn.freebsd.org/changeset/base/201797 Log: Remove unused uhci_dump_qhs(). Reviewed by: hps Modified: head/sys/dev/usb/controller/uhci.c Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Fri Jan 8 15:47:23 2010 (r201796) +++ head/sys/dev/usb/controller/uhci.c Fri Jan 8 15:52:06 2010 (r201797) @@ -830,33 +830,6 @@ uhci_dump_all(uhci_softc_t *sc) } static void -uhci_dump_qhs(uhci_qh_t *sqh) -{ - uint8_t temp; - - temp = uhci_dump_qh(sqh); - - /* - * uhci_dump_qhs displays all the QHs and TDs from the given QH - * onwards Traverses sideways first, then down. - * - * QH1 QH2 No QH TD2.1 TD2.2 TD1.1 etc. - * - * TD2.x being the TDs queued at QH2 and QH1 being referenced from QH1. - */ - - if (temp & 1) - uhci_dump_qhs(sqh->h_next); - else - DPRINTF("No QH\n"); - - if (temp & 2) - uhci_dump_tds(sqh->e_next); - else - DPRINTF("No TD\n"); -} - -static void uhci_dump_tds(uhci_td_t *td) { for (; From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:53:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8778D106568B; Fri, 8 Jan 2010 15:53:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 755818FC15; Fri, 8 Jan 2010 15:53: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 o08Fr72n017315; Fri, 8 Jan 2010 15:53:07 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08Fr7S7017313; Fri, 8 Jan 2010 15:53:07 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081553.o08Fr7S7017313@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:53: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: r201798 - head/sys/fs/smbfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:53:07 -0000 Author: trasz Date: Fri Jan 8 15:53:07 2010 New Revision: 201798 URL: http://svn.freebsd.org/changeset/base/201798 Log: Remove unused smbfs_smb_qpathinfo(). Modified: head/sys/fs/smbfs/smbfs_smb.c Modified: head/sys/fs/smbfs/smbfs_smb.c ============================================================================== --- head/sys/fs/smbfs/smbfs_smb.c Fri Jan 8 15:52:06 2010 (r201797) +++ head/sys/fs/smbfs/smbfs_smb.c Fri Jan 8 15:53:07 2010 (r201798) @@ -139,116 +139,6 @@ smbfs_smb_lock(struct smbnode *np, int o return smbfs_smb_lockandx(np, op, (uintptr_t)id, start, end, scred); } -static int -smbfs_smb_qpathinfo(struct smbnode *np, struct smbfattr *fap, - struct smb_cred *scred, short infolevel) -{ - struct smb_share *ssp = np->n_mount->sm_share; - struct smb_vc *vcp = SSTOVC(ssp); - struct smb_t2rq *t2p; - int error, svtz, timesok = 1; - struct mbchain *mbp; - struct mdchain *mdp; - u_int16_t date, time, wattr; - int64_t lint; - u_int32_t size, dattr; - - error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_QUERY_PATH_INFORMATION, - scred, &t2p); - if (error) - return error; - mbp = &t2p->t2_tparam; - mb_init(mbp); - if (!infolevel) { - if (SMB_DIALECT(vcp) < SMB_DIALECT_NTLM0_12) - infolevel = SMB_QUERY_FILE_STANDARD; - else - infolevel = SMB_QUERY_FILE_BASIC_INFO; - } - mb_put_uint16le(mbp, infolevel); - mb_put_uint32le(mbp, 0); - /* mb_put_uint8(mbp, SMB_DT_ASCII); specs are wrong */ - error = smbfs_fullpath(mbp, vcp, np, NULL, 0); - if (error) { - smb_t2_done(t2p); - return error; - } - t2p->t2_maxpcount = 2; - t2p->t2_maxdcount = vcp->vc_txmax; - error = smb_t2_request(t2p); - if (error) { - smb_t2_done(t2p); - if (infolevel == SMB_QUERY_FILE_STANDARD || error != EINVAL) - return error; - return smbfs_smb_qpathinfo(np, fap, scred, - SMB_QUERY_FILE_STANDARD); - } - mdp = &t2p->t2_rdata; - svtz = vcp->vc_sopt.sv_tz; - switch (infolevel) { - case SMB_QUERY_FILE_STANDARD: - timesok = 0; - md_get_uint16le(mdp, NULL); - md_get_uint16le(mdp, NULL); /* creation time */ - md_get_uint16le(mdp, &date); - md_get_uint16le(mdp, &time); /* access time */ - if (date || time) { - timesok++; - smb_dos2unixtime(date, time, 0, svtz, &fap->fa_atime); - } - md_get_uint16le(mdp, &date); - md_get_uint16le(mdp, &time); /* modify time */ - if (date || time) { - timesok++; - smb_dos2unixtime(date, time, 0, svtz, &fap->fa_mtime); - } - md_get_uint32le(mdp, &size); - fap->fa_size = size; - md_get_uint32(mdp, NULL); /* allocation size */ - md_get_uint16le(mdp, &wattr); - fap->fa_attr = wattr; - break; - case SMB_QUERY_FILE_BASIC_INFO: - timesok = 0; - md_get_int64(mdp, NULL); /* creation time */ - md_get_int64le(mdp, &lint); - if (lint) { - timesok++; - smb_time_NT2local(lint, svtz, &fap->fa_atime); - } - md_get_int64le(mdp, &lint); - if (lint) { - timesok++; - smb_time_NT2local(lint, svtz, &fap->fa_mtime); - } - md_get_int64le(mdp, &lint); - if (lint) { - timesok++; - smb_time_NT2local(lint, svtz, &fap->fa_ctime); - } - md_get_uint32le(mdp, &dattr); - fap->fa_attr = dattr; - md_get_uint32(mdp, NULL); - /* XXX could use ALL_INFO to get size */ - break; - default: - SMBERROR("unexpected info level %d\n", infolevel); - error = EINVAL; - } - smb_t2_done(t2p); - /* - * if all times are zero (observed with FAT on NT4SP6) - * then fall back to older info level - */ - if (!timesok) { - if (infolevel != SMB_QUERY_FILE_STANDARD) - return smbfs_smb_qpathinfo(np, fap, scred, - SMB_QUERY_FILE_STANDARD); - error = EINVAL; - } - return error; -} - int smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp, struct smb_cred *scred) From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 15:57:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82E02106566C; Fri, 8 Jan 2010 15:57:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 714418FC1B; Fri, 8 Jan 2010 15:57:56 +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 o08FvuHB018405; Fri, 8 Jan 2010 15:57:56 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08Fvu4D018403; Fri, 8 Jan 2010 15:57:56 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081557.o08Fvu4D018403@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 15:57:56 +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: r201799 - head/sys/dev/lmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 15:57:56 -0000 Author: trasz Date: Fri Jan 8 15:57:56 2010 New Revision: 201799 URL: http://svn.freebsd.org/changeset/base/201799 Log: One more #ifdef fix for GCC 4.4. Modified: head/sys/dev/lmc/if_lmc.c Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Fri Jan 8 15:53:07 2010 (r201798) +++ head/sys/dev/lmc/if_lmc.c Fri Jan 8 15:57:56 2010 (r201799) @@ -4842,7 +4842,7 @@ setup_ifnet(struct ifnet *ifp) if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); # elif defined(__NetBSD__) strcpy(ifp->if_xname, sc->dev.dv_xname); -# elif __OpenBSD__ +# elif defined(__OpenBSD__) bcopy(sc->dev.dv_xname, ifp->if_xname, IFNAMSIZ); # elif defined(__bsdi__) ifp->if_name = sc->dev.dv_cfdata->cf_driver->cd_name; From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:12:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76C1F1065679; Fri, 8 Jan 2010 16:12:15 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep15-int.chello.at (viefep15-int.chello.at [62.179.121.35]) by mx1.freebsd.org (Postfix) with ESMTP id DE3908FC17; Fri, 8 Jan 2010 16:12:13 +0000 (UTC) Received: from edge04.upc.biz ([192.168.13.239]) by viefep15-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20100108161212.DRGA18259.viefep15-int.chello.at@edge04.upc.biz>; Fri, 8 Jan 2010 17:12:12 +0100 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge04.upc.biz with edge id T4CB1d01n0a5KZh044CCM7; Fri, 08 Jan 2010 17:12:12 +0100 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id AF2A66D41B; Fri, 8 Jan 2010 17:12:10 +0100 (CET) Date: Fri, 8 Jan 2010 17:12:10 +0100 From: Stefan Farfeleder To: Edward Tomasz Napierala Message-ID: <20100108161210.GC1610@mole.fafoe.narf.at> References: <201001081544.o08FinVh015359@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001081544.o08FinVh015359@svn.freebsd.org> 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: r201794 - in head/sys: ddb dev/ep dev/ex netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:12:15 -0000 On Fri, Jan 08, 2010 at 03:44:49PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Jan 8 15:44:49 2010 > New Revision: 201794 > URL: http://svn.freebsd.org/changeset/base/201794 > > Log: > Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in order > to silence newer GCC versions. They are not identical, !a & b is parsed as (!a) & b. The code now seems more correct however. From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:14:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 124221065694; Fri, 8 Jan 2010 16:14:42 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00AAD8FC21; Fri, 8 Jan 2010 16:14:42 +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 o08GEfa9022217; Fri, 8 Jan 2010 16:14:41 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08GEf6A022214; Fri, 8 Jan 2010 16:14:41 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001081614.o08GEf6A022214@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 8 Jan 2010 16:14: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: r201801 - in head: share/man/man4 sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:14:42 -0000 Author: ru Date: Fri Jan 8 16:14:41 2010 New Revision: 201801 URL: http://svn.freebsd.org/changeset/base/201801 Log: Complete the swap of carp(4) log levels and document the change. MFC after: 3 days Modified: head/share/man/man4/carp.4 head/sys/netinet/ip_carp.c Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Fri Jan 8 16:07:39 2010 (r201800) +++ head/share/man/man4/carp.4 Fri Jan 8 16:14:41 2010 (r201801) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2006 +.Dd January 5, 2010 .Dt CARP 4 .Os .Sh NAME @@ -118,12 +118,12 @@ See also the first example. Disabled by default. .It Va net.inet.carp.log Value of 0 disables any logging. -Value of 1 enables logging of bad -.Nm -packets. -Values above 1 enable logging state changes of +Value of 1 enables logging state changes of .Nm interfaces. +Values above 1 enable logging of bad +.Nm +packets. Default value is 1. .It Va net.inet.carp.arpbalance Balance local traffic using ARP (see below). Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Fri Jan 8 16:07:39 2010 (r201800) +++ head/sys/netinet/ip_carp.c Fri Jan 8 16:14:41 2010 (r201801) @@ -560,7 +560,7 @@ carp_input(struct mbuf *m, int hlen) /* verify that the IP TTL is 255. */ if (ip->ip_ttl != CARP_DFLTTL) { CARPSTATS_INC(carps_badttl); - CARP_LOG("carp_input: received ttl %d != 255i on %s\n", + CARP_DEBUG("carp_input: received ttl %d != 255 on %s\n", ip->ip_ttl, m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -739,7 +739,7 @@ carp_input_c(struct mbuf *m, struct carp CARPSTATS_INC(carps_badauth); SC2IFP(sc)->if_ierrors++; CARP_UNLOCK(ifp->if_carp); - CARP_LOG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); + CARP_DEBUG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); m_freem(m); return; } From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:44:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4501E106566B; Fri, 8 Jan 2010 16:44:34 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32F208FC14; Fri, 8 Jan 2010 16:44:34 +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 o08GiYgK028860; Fri, 8 Jan 2010 16:44:34 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08GiYLN028858; Fri, 8 Jan 2010 16:44:34 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081644.o08GiYLN028858@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 16:44: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: r201803 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:44:34 -0000 Author: trasz Date: Fri Jan 8 16:44:33 2010 New Revision: 201803 URL: http://svn.freebsd.org/changeset/base/201803 Log: Stop GCC from complaining about lagg_port_checkstacking() being unused. Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri Jan 8 16:28:17 2010 (r201802) +++ head/sys/net/if_lagg.c Fri Jan 8 16:44:33 2010 (r201803) @@ -95,7 +95,9 @@ static int lagg_port_ioctl(struct ifnet static int lagg_port_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct route *); static void lagg_port_ifdetach(void *arg __unused, struct ifnet *); +#ifdef LAGG_PORT_STACKING static int lagg_port_checkstacking(struct lagg_softc *); +#endif static void lagg_port2req(struct lagg_port *, struct lagg_reqport *); static void lagg_init(void *); static void lagg_stop(struct lagg_softc *); @@ -456,7 +458,8 @@ lagg_port_create(struct lagg_softc *sc, mtx_unlock(&lagg_list_mtx); free(lp, M_DEVBUF); return (EINVAL); - /* XXX disable stacking for the moment, its untested + /* XXX disable stacking for the moment, its untested */ +#ifdef LAGG_PORT_STACKING lp->lp_flags |= LAGG_PORT_STACK; if (lagg_port_checkstacking(sc_ptr) >= LAGG_MAX_STACKING) { @@ -464,7 +467,7 @@ lagg_port_create(struct lagg_softc *sc, free(lp, M_DEVBUF); return (E2BIG); } - */ +#endif } } mtx_unlock(&lagg_list_mtx); @@ -515,6 +518,7 @@ lagg_port_create(struct lagg_softc *sc, return (error); } +#ifdef LAGG_PORT_STACKING static int lagg_port_checkstacking(struct lagg_softc *sc) { @@ -533,6 +537,7 @@ lagg_port_checkstacking(struct lagg_soft return (m + 1); } +#endif static int lagg_port_destroy(struct lagg_port *lp, int runpd) From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:45:32 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28AE11065676; Fri, 8 Jan 2010 16:45:32 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 94E5C8FC20; Fri, 8 Jan 2010 16:45:31 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o08GjUql062907; Fri, 8 Jan 2010 11:45:30 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o08GjUp1062906; Fri, 8 Jan 2010 11:45:30 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Fri, 8 Jan 2010 11:45:30 -0500 From: David Schultz To: Jaakko Heinonen Message-ID: <20100108164530.GA62775@zim.MIT.EDU> Mail-Followup-To: Jaakko Heinonen , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200912171703.nBHH3mEn041893@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912171703.nBHH3mEn041893@svn.freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r200633 - head/usr.bin/uniq X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:45:32 -0000 On Thu, Dec 17, 2009, Jaakko Heinonen wrote: > Sync getline() with comm(1): > > - Prevent overflowing of the buffer length variable in getline() by > limiting its maximum value. > - Exit if reallocf(3) fails in getline(). Failure was silently > considered as end-of-file. We should consider using getline(3) from libc, rather than hand-rolled versions of almost the same thing that are copy-pasted in multiple places. The only catch is I need to check in the wide character version of getline() I've had sitting in my tree for months. I'll try to get on that this weekend. From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:56:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B59E51065693; Fri, 8 Jan 2010 16:56:11 +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 A46DC8FC13; Fri, 8 Jan 2010 16:56: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 o08GuBou031437; Fri, 8 Jan 2010 16:56:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08GuB2C031435; Fri, 8 Jan 2010 16:56:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001081656.o08GuB2C031435@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 8 Jan 2010 16:56: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: r201804 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:56:11 -0000 Author: bz Date: Fri Jan 8 16:56:11 2010 New Revision: 201804 URL: http://svn.freebsd.org/changeset/base/201804 Log: Unbreak the XEN build after r201751. Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Jan 8 16:44:33 2010 (r201803) +++ head/sys/i386/xen/pmap.c Fri Jan 8 16:56:11 2010 (r201804) @@ -318,7 +318,9 @@ static __inline void pagezero(void *page #if defined(PAE) && !defined(XEN) static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif +#ifndef XEN static void pmap_set_pg(void); +#endif CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -550,6 +552,7 @@ pmap_init_pat(void) wrmsr(MSR_PAT, pat_msr); } +#ifndef XEN /* * Set PG_G on kernel pages. Only the BSP calls this when SMP is turned on. */ @@ -588,6 +591,7 @@ pmap_set_pg(void) } } } +#endif /* * Initialize a vm_page's machine-dependent fields. From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:56:29 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787CA106566C; Fri, 8 Jan 2010 16:56:29 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 334B78FC15; Fri, 8 Jan 2010 16:56:28 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o08GuSjW062968; Fri, 8 Jan 2010 11:56:28 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o08GuRmL062967; Fri, 8 Jan 2010 11:56:27 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Fri, 8 Jan 2010 11:56:27 -0500 From: David Schultz To: "M. Warner Losh" Message-ID: <20100108165627.GB62775@zim.MIT.EDU> Mail-Followup-To: "M. Warner Losh" , brooks@freebsd.org, ume@freebsd.org, dougb@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, freebsd-rc@freebsd.org References: <4B2DD2A1.8060907@FreeBSD.org> <20091220183519.GB64667@lor.one-eyed-alien.net> <20091221.210850.220301508585541755.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091221.210850.220301508585541755.imp@bsdimp.com> Cc: brooks@FreeBSD.ORG, freebsd-rc@FreeBSD.ORG, ume@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, dougb@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Subject: Re: svn commit: r200743 - in head/usr.sbin: . service X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:56:29 -0000 On Mon, Dec 21, 2009, M. Warner Losh wrote: > In message: <20091220183519.GB64667@lor.one-eyed-alien.net> > Brooks Davis writes: > : This is where the value of service(8) would lie for me. The ability > : to not have things work by accident due to my environment and then break > : at reboot would be be very helful. > > I'd love to have some way to say 'If the daemon dies, please restart > it. But don't be so eager about it that your attempts to keep it > running interfere with things like service' The service management stuff introduced in Solaris 10 has this capability, as well as some other nice bits of sophistication. For instance, when a service is restarted, it will automatically restart any services whose operation depends on that service. Anyone working on services might want to peruse their svcs(1) and smf(5) for ideas. From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 16:59:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AD1D1065676; Fri, 8 Jan 2010 16:59:28 +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 88E798FC18; Fri, 8 Jan 2010 16:59:28 +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 o08GxSJG032232; Fri, 8 Jan 2010 16:59:28 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08GxS5O032229; Fri, 8 Jan 2010 16:59:28 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001081659.o08GxS5O032229@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 8 Jan 2010 16:59: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: r201806 - head/usr.sbin/traceroute X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 16:59:28 -0000 Author: bz Date: Fri Jan 8 16:59:28 2010 New Revision: 201806 URL: http://svn.freebsd.org/changeset/base/201806 Log: Switch traceroute over to make use of proper in-kernel source address selection. Reviewed by: rwatson, fenner MFC after: 1 week X-MFCable to: stable/8, stable/7 (after r183571). PR: kern/139454 Tested by: Frank Steinborn (steinex nognu.de) Added: head/usr.sbin/traceroute/findsaddr-udp.c (contents, props changed) Modified: head/usr.sbin/traceroute/Makefile Modified: head/usr.sbin/traceroute/Makefile ============================================================================== --- head/usr.sbin/traceroute/Makefile Fri Jan 8 16:58:37 2010 (r201805) +++ head/usr.sbin/traceroute/Makefile Fri Jan 8 16:59:28 2010 (r201806) @@ -5,7 +5,7 @@ TRACEROUTE_DISTDIR?= ${.CURDIR}/../../co PROG= traceroute MAN= traceroute.8 -SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-socket.c +SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-udp.c BINOWN= root BINMODE=4555 CLEANFILES= version.c @@ -29,7 +29,7 @@ DPADD= ${LIBIPSEC} LDADD= -lipsec .endif -CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl +CFLAGS+= -I${TRACEROUTE_DISTDIR}/lbl -I${TRACEROUTE_DISTDIR} WARNS?= 0 Added: head/usr.sbin/traceroute/findsaddr-udp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/traceroute/findsaddr-udp.c Fri Jan 8 16:59:28 2010 (r201806) @@ -0,0 +1,94 @@ +/*- + * Copyright (c) 2010 Bjoern A. Zeeb + * 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$ + */ + +#include +#include + +#include +#include + +#include + +#include "findsaddr.h" +#include "traceroute.h" + +/* + * Return the source address for the given destination address. + * + * This makes use of proper source address seclection in the FreeBSD kernel + * even taking jails into account (sys/netinet/in_pcb.c:in_pcbladdr()). + * We open a UDP socket, and connect to the destination, letting the kernel + * do the bind and then read the source IPv4 address using getsockname(2). + * This has multiple advantages: no need to do PF_ROUTE operations possibly + * needing special privileges, jails properly taken into account and most + * important - getting the result the kernel would give us rather than + * best-guessing ourselves. + */ +const char * +findsaddr(register const struct sockaddr_in *to, + register struct sockaddr_in *from) +{ + const char *errstr; + struct sockaddr_in cto, cfrom; + int s; + socklen_t len; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s == -1) + return ("failed to open DGRAM socket for src addr selection."); + + errstr = NULL; + len = sizeof(struct sockaddr_in); + memcpy(&cto, to, len); + cto.sin_port = htons(65535); /* Dummy port for connect(2). */ + if (connect(s, (struct sockaddr *)&cto, len) == -1) { + errstr = "failed to connect to peer for src addr selection."; + goto err; + } + + if (getsockname(s, (struct sockaddr *)&cfrom, &len) == -1) { + errstr = "failed to get socket name for src addr selection."; + goto err; + } + + if (len != sizeof(struct sockaddr_in) || cfrom.sin_family != AF_INET) { + errstr = "unexpected address family in src addr selection."; + goto err; + } + + /* Update source address for traceroute. */ + setsin(from, cfrom.sin_addr.s_addr); + +err: + (void) close(s); + + /* No error (string) to return. */ + return (errstr); +} + +/* end */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 17:08:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 258A81065694; Fri, 8 Jan 2010 17:08:42 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 32DB08FC12; Fri, 8 Jan 2010 17:08:40 +0000 (UTC) Received: by fxm27 with SMTP id 27so4881596fxm.3 for ; Fri, 08 Jan 2010 09:08:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=xc8WOQqwh+N47PPjwZhbLKcqLKaS1t4N2hr92+4yXQ4=; b=xbrRWmrlnUoE8pnJtoYdd4qgm9ksWB9UOpeZCtcDey/TW2dsC6aZ9UmXYA9QY9xvG3 wTl5kxbM7IEFKSZUR7ODsMWShjzVZHkPx7iTtWjzC8ZpaDpG7bs/I/m9PwJKeZG6qLLg sxwXWWYRfi+xTA6LWZvUOAHcaFGCE6SoLYaMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=nvQ11tnC9NTyXh05BER0zJZQa3ilDWrBa9y6ptJJgMnfs1UES1HGhZWIAOh0VtAXd3 AVbsjw3jDANUrkiBM/NvH/vOcP+Evd0+TP98YCmfXchP2672R8XZAwRSzHzqib8RLlDl YYxQeO4j5nKP3iFYKy9LE6W8qY2ihBFg65OI8= Received: by 10.86.239.21 with SMTP id m21mr9030982fgh.27.1262968906890; Fri, 08 Jan 2010 08:41:46 -0800 (PST) Received: from ?192.168.1.100? (45.81.datacomsa.pl [195.34.81.45]) by mx.google.com with ESMTPS id d4sm49359889fga.21.2010.01.08.08.41.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 08 Jan 2010 08:41:46 -0800 (PST) Sender: =?UTF-8?Q?Edward_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20100108161210.GC1610@mole.fafoe.narf.at> Date: Fri, 8 Jan 2010 17:41:42 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201001081544.o08FinVh015359@svn.freebsd.org> <20100108161210.GC1610@mole.fafoe.narf.at> To: Stefan Farfeleder X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201794 - in head/sys: ddb dev/ep dev/ex netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 17:08:42 -0000 Wiadomo=B6=E6 napisana przez Stefan Farfeleder w dniu 2010-01-08, o = godz. 17:12: > On Fri, Jan 08, 2010 at 03:44:49PM +0000, Edward Tomasz Napierala = wrote: >> Author: trasz >> Date: Fri Jan 8 15:44:49 2010 >> New Revision: 201794 >> URL: http://svn.freebsd.org/changeset/base/201794 >>=20 >> Log: >> Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in = order >> to silence newer GCC versions. >=20 > They are not identical, !a & b is parsed as (!a) & b. The code now > seems more correct however. Looks like I've got the operator precedence backwards there - I assumed there was no functional change involved. But yes, the code now looks = more correct - logical 'and' of a constant with the truth value is pointless. -- If you cut off my head, what would I say? Me and my head, or me and my = body? From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 17:20:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36F1E1065676; Fri, 8 Jan 2010 17:20:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2571E8FC18; Fri, 8 Jan 2010 17:20:42 +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 o08HKgQT038622; Fri, 8 Jan 2010 17:20:42 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08HKgSg038619; Fri, 8 Jan 2010 17:20:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081720.o08HKgSg038619@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 17:20:42 +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: r201807 - head/sys/dev/dpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 17:20:42 -0000 Author: trasz Date: Fri Jan 8 17:20:41 2010 New Revision: 201807 URL: http://svn.freebsd.org/changeset/base/201807 Log: Get rid of #ident, GCC 4.4 warns about it being deprecated. OK-ed by: scottl Modified: head/sys/dev/dpt/dpt.h head/sys/dev/dpt/dpt_scsi.c Modified: head/sys/dev/dpt/dpt.h ============================================================================== --- head/sys/dev/dpt/dpt.h Fri Jan 8 16:59:28 2010 (r201806) +++ head/sys/dev/dpt/dpt.h Fri Jan 8 17:20:41 2010 (r201807) @@ -26,6 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ /* @@ -39,9 +40,6 @@ * FreeBSD.ORG; Great O/S to work on and for. */ - -#ident "$FreeBSD$" - #ifndef _DPT_H #define _DPT_H Modified: head/sys/dev/dpt/dpt_scsi.c ============================================================================== --- head/sys/dev/dpt/dpt_scsi.c Fri Jan 8 16:59:28 2010 (r201806) +++ head/sys/dev/dpt/dpt_scsi.c Fri Jan 8 17:20:41 2010 (r201807) @@ -27,7 +27,6 @@ * SUCH DAMAGE. */ -#ident "$FreeBSD$" #include __FBSDID("$FreeBSD$"); From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 17:38:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD093106568F; Fri, 8 Jan 2010 17:38:40 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id B19018FC14; Fri, 8 Jan 2010 17:38:40 +0000 (UTC) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 3592C2C2DB3; Fri, 8 Jan 2010 11:38:40 -0600 (CST) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YSGG6mzMo6dW; Fri, 8 Jan 2010 11:38:32 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 404532C2D3F; Fri, 8 Jan 2010 11:38:32 -0600 (CST) Message-ID: <4B476D97.2050009@cs.rice.edu> Date: Fri, 08 Jan 2010 11:38:31 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.23 (X11/20100102) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201001081656.o08GuB2C031435@svn.freebsd.org> In-Reply-To: <201001081656.o08GuB2C031435@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: r201804 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 17:38:41 -0000 Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 8 16:56:11 2010 > New Revision: 201804 > URL: http://svn.freebsd.org/changeset/base/201804 > > Log: > Unbreak the XEN build after r201751. > Thanks for fixing this. Alan From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 17:47:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307671065759; Fri, 8 Jan 2010 17:47:38 +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 1EC088FC2A; Fri, 8 Jan 2010 17:47:38 +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 o08HlcgX046363; Fri, 8 Jan 2010 17:47:38 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08HlckB046361; Fri, 8 Jan 2010 17:47:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001081747.o08HlckB046361@svn.freebsd.org> From: Christian Brueffer Date: Fri, 8 Jan 2010 17:47: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: r201810 - head/release/doc/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 17:47:38 -0000 Author: brueffer Date: Fri Jan 8 17:47:37 2010 New Revision: 201810 URL: http://svn.freebsd.org/changeset/base/201810 Log: Remove ste(4), it should work on all architectures now. Modified: head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/share/misc/dev.archlist.txt ============================================================================== --- head/release/doc/share/misc/dev.archlist.txt Fri Jan 8 17:46:27 2010 (r201809) +++ head/release/doc/share/misc/dev.archlist.txt Fri Jan 8 17:47:37 2010 (r201810) @@ -139,7 +139,6 @@ snd_t4dwave i386,amd64 snd_via8233 i386,amd64 snd_via82c686 i386,amd64 snd_vibes i386,amd64 -ste i386,pc98,amd64 stg i386,pc98 stge i386,amd64,sparc64 ti i386,pc98,amd64,sparc64 From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 17:49:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8D9E1065672; Fri, 8 Jan 2010 17:49:24 +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 D7C2A8FC16; Fri, 8 Jan 2010 17:49: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 o08HnO10046800; Fri, 8 Jan 2010 17:49:24 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08HnONs046798; Fri, 8 Jan 2010 17:49:24 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201001081749.o08HnONs046798@svn.freebsd.org> From: Qing Li Date: Fri, 8 Jan 2010 17:49: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: r201811 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 17:49:25 -0000 Author: qingli Date: Fri Jan 8 17:49:24 2010 New Revision: 201811 URL: http://svn.freebsd.org/changeset/base/201811 Log: Ensure an address is removed from the interface address list when the installation of that address fails. PR: 139559 Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 8 17:47:37 2010 (r201810) +++ head/sys/netinet/in.c Fri Jan 8 17:49:24 2010 (r201811) @@ -562,7 +562,7 @@ in_control(struct socket *so, u_long cmd (hostIsNew || maskIsNew)) error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0); if (error != 0 && iaIsNew) - goto out; + break; if ((ifp->if_flags & IFF_BROADCAST) && (ifra->ifra_broadaddr.sin_family == AF_INET)) From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 18:43:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BF7C106566B for ; Fri, 8 Jan 2010 18:43:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 31B128FC13 for ; Fri, 8 Jan 2010 18:43:11 +0000 (UTC) Received: (qmail 2953 invoked by uid 399); 8 Jan 2010 18:43:11 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 8 Jan 2010 18:43:11 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B477CBE.6090000@FreeBSD.org> Date: Fri, 08 Jan 2010 10:43:10 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: "Carlos A. M. dos Santos" References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> <4B46CFE8.8000501@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 18:43:12 -0000 Carlos A. M. dos Santos wrote: > 2010/1/8 Doug Barton : >> Dag-Erling Smørgrav wrote: >>> I don't see how the Rumsfeld quote could offend anyone. >> A) Better safe than sorry >> B) Regardless of my own opinions I can easily see how someone could be >> offended by anything having to do with Rumsfeld, the Iraq war, etc. > > Perhaps, at the moment. Which is where we are now, yes. > Five to ten years from now that quotation will > be just history, like the ones from/about JFK, Richard Nixon, and > Spiro Agnew. Actually there are several things in the main fortunes file that I find offensive related to political stuff of the 60's and 70's (although not for the reasons that I think most people would find them offensive). Note, I am not however suggesting that we do a wholesale move of potentially offensive stuff. > Are you whiling to apply such rule to all supposedly > political fortunes? My very first post on this was, "Anything that may offend someone belongs in fortunes-o, and all political commentary belongs in this category." FWIW, while I am definitely in favor of treating all people with courtesy and respect, I am just about as anti-mindless-political-correctness as you can possibly be. In fact, in both my .bashrc and my xscreensaver config I use fortune -a because as much as some of the things in there offend me, I find it refreshing to be challenged by other viewpoints. OTOH, I am also in favor of us building a professional-quality operating system, and while I actually _voiced_ my objection to the removal of "die_you_gravy_sucking_pig_dog" because that is not something that is user-visible, I think that if we SAY there is a distinction between fortunes and fortunes-o that we ought to follow through on that. Putting something that we know could (and almost certainly will) be found offensive in the fortunes file because WE are smarter and more sophisticated than those fools who would be offended by it is childish, foolish, and unprofessional. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 18:57:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BDDD106568F; Fri, 8 Jan 2010 18:57:32 +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 186588FC0C; Fri, 8 Jan 2010 18:57: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 o08IvVoO061893; Fri, 8 Jan 2010 18:57:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08IvVtn061885; Fri, 8 Jan 2010 18:57:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001081857.o08IvVtn061885@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 8 Jan 2010 18:57: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: r201813 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 18:57:32 -0000 Author: bz Date: Fri Jan 8 18:57:31 2010 New Revision: 201813 URL: http://svn.freebsd.org/changeset/base/201813 Log: In sys//conf/Makefile set TARGET to . That allows sys/conf/makeLINT.mk to only do certain things for certain architectures. Note that neither arm nor mips have the Makefile there, thus essentially not (yet) supporting LINT. This would enable them do add special treatment to sys/conf/makeLINT.mk as well chosing one of the many configurations as LINT. This is a hack of doing this and keeping it in a separate commit will allow us to more easily identify and back it out. Discussed on/with: arch, jhb (as part of the LINT-VIMAGE thread) MFC after: 1 month Modified: head/sys/amd64/conf/Makefile head/sys/i386/conf/Makefile head/sys/ia64/conf/Makefile head/sys/pc98/conf/Makefile head/sys/powerpc/conf/Makefile head/sys/sparc64/conf/Makefile head/sys/sun4v/conf/Makefile Modified: head/sys/amd64/conf/Makefile ============================================================================== --- head/sys/amd64/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/amd64/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=amd64 + .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/i386/conf/Makefile ============================================================================== --- head/sys/i386/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/i386/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=i386 + .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/ia64/conf/Makefile ============================================================================== --- head/sys/ia64/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/ia64/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=ia64 + .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/pc98/conf/Makefile ============================================================================== --- head/sys/pc98/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/pc98/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=pc98 + .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/powerpc/conf/Makefile ============================================================================== --- head/sys/powerpc/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/powerpc/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=powerpc + .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/sparc64/conf/Makefile ============================================================================== --- head/sys/sparc64/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/sparc64/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=sparc64 + .include "${.CURDIR}/../../conf/makeLINT.mk" Modified: head/sys/sun4v/conf/Makefile ============================================================================== --- head/sys/sun4v/conf/Makefile Fri Jan 8 18:29:04 2010 (r201812) +++ head/sys/sun4v/conf/Makefile Fri Jan 8 18:57:31 2010 (r201813) @@ -1,3 +1,5 @@ # $FreeBSD$ +TARGET=sun4v + .include "${.CURDIR}/../../conf/makeLINT.mk" From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 19:00:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96C641065692; Fri, 8 Jan 2010 19:00:20 +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 863758FC21; Fri, 8 Jan 2010 19:00:20 +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 o08J0KlW062546; Fri, 8 Jan 2010 19:00:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08J0Kb7062544; Fri, 8 Jan 2010 19:00:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001081900.o08J0Kb7062544@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 8 Jan 2010 19:00: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: r201814 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 19:00:20 -0000 Author: bz Date: Fri Jan 8 19:00:20 2010 New Revision: 201814 URL: http://svn.freebsd.org/changeset/base/201814 Log: Generate a second LINT configuration for i386 and amd64 in sys/conf/makeLINT.mk, which includes LINT and sets options VIMAGE so that we will have VIMAGE LINT builds[1]. For now only do it for those two architectures to avoid massive universe times for archs, where people will less likely use VIMAGE or not at all. Requested by: jhb [1] Discussed on/with: arch, jhb, rwatson MFC after: 1 month Modified: head/sys/conf/makeLINT.mk Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Fri Jan 8 18:57:31 2010 (r201813) +++ head/sys/conf/makeLINT.mk Fri Jan 8 19:00:20 2010 (r201814) @@ -5,7 +5,15 @@ all: clean: rm -f LINT +.if ${TARGET} == "amd64" || ${TARGET} == "i386" + rm -f LINT-VIMAGE +.endif NOTES= ../../conf/NOTES NOTES LINT: ${NOTES} ../../conf/makeLINT.sed cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +.if ${TARGET} == "amd64" || ${TARGET} == "i386" + echo "include ${.TARGET}" > ${.TARGET}-VIMAGE + echo "ident ${.TARGET}-VIMAGE" >> ${.TARGET}-VIMAGE + echo "options VIMAGE" >> ${.TARGET}-VIMAGE +.endif From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 19:01:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 437561065670; Fri, 8 Jan 2010 19:01:51 +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 32E918FC12; Fri, 8 Jan 2010 19:01: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 o08J1pBW062911; Fri, 8 Jan 2010 19:01:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08J1pjc062909; Fri, 8 Jan 2010 19:01:51 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001081901.o08J1pjc062909@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 8 Jan 2010 19: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: r201815 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 19:01:51 -0000 Author: bz Date: Fri Jan 8 19:01:50 2010 New Revision: 201815 URL: http://svn.freebsd.org/changeset/base/201815 Log: To avoid hardcoding further kernel configuration names for make universe, split the logic into two parts: - 1st to build worlds and generate kernel configs like LINT. - 2nd to build kernels for a given TARGET architecture correctly finding all newly generated configs, not knowing anything about LINT anymore. (*) (*) If you know better/cleaner/... ways to do this, let me know. Discussed on/with: arch, jhb, rwatson MFC after: 1 month Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Jan 8 19:00:20 2010 (r201814) +++ head/Makefile Fri Jan 8 19:01:50 2010 (r201815) @@ -278,7 +278,7 @@ tinderbox: # with a reasonable chance of success, regardless of how old your # existing system is. # -.if make(universe) || make(tinderbox) +.if make(universe) || make(universe_kernels) || make(tinderbox) TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v .if defined(DOING_TINDERBOX) @@ -297,10 +297,6 @@ universe_prologue: rm -f ${FAILFILE} .endif .for target in ${TARGETS} -KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ - find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ - ! -name DEFAULTS ! -name LINT -KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} .ORDER: universe_prologue universe_${target} universe_epilogue universe_${target}: @@ -320,16 +316,25 @@ universe_${target}: (echo "${target} 'make LINT' failed," \ "check _.${target}.makeLINT for details"| ${MAKEFAIL})) .endif + @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \ + universe_kernels + @echo ">> ${target} completed on `LC_ALL=C date`" +.endfor +universe_kernels: universe_kernconfs +BUILD_ARCH!= uname -p +TARGET?= ${BUILD_ARCH} +KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ + ! -name DEFAULTS ! -name NOTES +universe_kernconfs: .for kernel in ${KERNCONFS} @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${MAKE} ${JFLAG} buildkernel \ - TARGET=${target} \ + TARGET=${TARGET} \ KERNCONF=${kernel} \ - > _.${target}.${kernel} 2>&1 || \ - (echo "${target} ${kernel} kernel failed," \ - "check _.${target}.${kernel} for details"| ${MAKEFAIL})) -.endfor - @echo ">> ${target} completed on `LC_ALL=C date`" + > _.${TARGET}.${kernel} 2>&1 || \ + (echo "${TARGET} ${kernel} kernel failed," \ + "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) .endfor universe: universe_epilogue universe_epilogue: From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 19:33:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDA93106566C; Fri, 8 Jan 2010 19:33:48 +0000 (UTC) (envelope-from marc@msys.ch) Received: from sleipnir.msys.ch (unknown [IPv6:2001:4060:c0de:f000::3]) by mx1.freebsd.org (Postfix) with ESMTP id 5110A8FC13; Fri, 8 Jan 2010 19:33:47 +0000 (UTC) Received: from mail.msys.ch (smtp.msys.ch [157.161.101.10]) by sleipnir.msys.ch (8.14.3/8.14.1) with ESMTP id o08JXfZE003370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 8 Jan 2010 20:33:41 +0100 (CET) Received: from [10.0.1.3] (gw.vnode.ch [62.12.170.129]) (authenticated bits=0) by mail.msys.ch (8.14.3/8.14.1) with ESMTP id o08JXdag005915 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 8 Jan 2010 20:33:40 +0100 (CET) Message-Id: <0F2B2EB1-C91F-459D-BE93-A81B7FF4173C@msys.ch> From: Marc Balmer To: Doug Barton In-Reply-To: <4B477CBE.6090000@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 8 Jan 2010 20:33:39 +0100 References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> <4B46CFE8.8000501@FreeBSD.org> <4B477CBE.6090000@FreeBSD.org> X-Mailer: Apple Mail (2.936) X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: AWL,FH_DATE_PAST_20XX Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 19:33:49 -0000 Am 08.01.2010 um 19:43 schrieb Doug Barton: > Carlos A. M. dos Santos wrote: >> 2010/1/8 Doug Barton : >>> Dag-Erling Sm=F8rgrav wrote: >>>> I don't see how the Rumsfeld quote could offend anyone. >>> A) Better safe than sorry >>> B) Regardless of my own opinions I can easily see how someone =20 >>> could be >>> offended by anything having to do with Rumsfeld, the Iraq war, etc. >> >> Perhaps, at the moment. > > Which is where we are now, yes. > >> Five to ten years from now that quotation will >> be just history, like the ones from/about JFK, Richard Nixon, and >> Spiro Agnew. > > Actually there are several things in the main fortunes file that I > find offensive related to political stuff of the 60's and 70's > (although not for the reasons that I think most people would find them > offensive). Note, I am not however suggesting that we do a wholesale > move of potentially offensive stuff. > >> Are you whiling to apply such rule to all supposedly >> political fortunes? > > My very first post on this was, "Anything that may offend someone > belongs in fortunes-o, and all political commentary belongs in this > category." > > FWIW, while I am definitely in favor of treating all people with > courtesy and respect, I am just about as > anti-mindless-political-correctness as you can possibly be. In fact, > in both my .bashrc and my xscreensaver config I use fortune -a because > as much as some of the things in there offend me, I find it refreshing > to be challenged by other viewpoints. OTOH, I am also in favor of us > building a professional-quality operating system, and while I actually > _voiced_ my objection to the removal of > "die_you_gravy_sucking_pig_dog" because that is not something that is > user-visible, I think that if we SAY there is a distinction between > fortunes and fortunes-o that we ought to follow through on that. > Putting something that we know could (and almost certainly will) be > found offensive in the fortunes file because WE are smarter and more > sophisticated than those fools who would be offended by it is > childish, foolish, and unprofessional. > Actually I think -o should be the default for fortune. I think it =20 would be funnier. There should of course be an option like maybe -f ("faint at heart" or =20= so) for people without a sense or humour or who are easily offended by =20= a good joke.... -mb From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 19:46:11 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C446B106566B; Fri, 8 Jan 2010 19:46:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 42AAC8FC12; Fri, 8 Jan 2010 19:46:10 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o08Jk7Aa006987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jan 2010 06:46:08 +1100 Date: Sat, 9 Jan 2010 06:46:07 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jaakko Heinonen In-Reply-To: <201001080757.o087vhrr009799@svn.freebsd.org> Message-ID: <20100109051536.R57595@delplex.bde.org> References: <201001080757.o087vhrr009799@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: r201773 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 19:46:11 -0000 On Fri, 8 Jan 2010, Jaakko Heinonen wrote: > Author: jh > Date: Fri Jan 8 07:57:43 2010 > New Revision: 201773 > URL: http://svn.freebsd.org/changeset/base/201773 > > Log: > - Change the type of size_max to u_quad_t because its value is converted > with vfs_scanopt(9) using the "%qu" format string. %qu should never be used, since there are no correct uses of u_quad_t. However, there seems to be nothing much better, due to API design and implementation bugs. (%lu and u_long would work, but is a bit fragile. I thought at first that size_max was a page count, so that it should have type u_int like all page counts in vm, and thus easily scanned using %u.) > - Limit the maximum value of size_max to (SIZE_MAX - PAGE_SIZE) to > prevent overflow in howmany() macro. Overflow still occurs, since `pages' remains "infinite" when howmany() would overflow. > Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c > ============================================================================== > --- head/sys/fs/tmpfs/tmpfs_vfsops.c Fri Jan 8 07:42:01 2010 (r201772) > +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Fri Jan 8 07:57:43 2010 (r201773) > @@ -185,8 +185,8 @@ tmpfs_mount(struct mount *mp) > ino_t nodes; > int error; > /* Size counters. */ > - ino_t nodes_max; Indentation error in old version. Local variables are not indented in KNF. The local variables before here are normally indented. > - size_t size_max; Indentation error, as above. > + ino_t nodes_max; Even larger indentation error in new version. Now the variable name doesn't even line up with the other 1-fold-excessively indented variables. There are also many type errors associated with this variable. ino_t is a reasonable type for a limit on the number of inodes (unless you want to support inodes numbered 0 to the maximum -- then you need a larger type to hold the maximum plus 1), but there is no scanf letter for ino_t and thus no correct way to scan an ino_t in vfs_scanopt(). The current incorrect way is to use %d. Since ino_t happens to have type uint32_t and u_int happens to have type uint32_t on all supported machines, %u would work but %d gives undefined behaviour when the value exceeds INT_MAX. The simplest fix is to use u_int and %u. > + u_quad_t size_max; Even larger indentation error, as above. The technically correct type to use here is vm_size_t, but this cannot be used either since it cannot be scanned, as for ino_t. vm types and size_t are also more machine-dependent than ino_t, so u_int would not work here. There is a scanf letter for size_t in scanf(3); however, this is not supported by scanf(9) (only printf(9) supports the C99 letters). scanf(9) does support u_quad_t, though this depends on undefined or implementation-defined behaviour when the value exceeds QUAD_MAX. scanf also doesn't support the most general type and easist to use correctly type that could be used here -- uintmax_t. Most uses of u_quad_t and %qu are for when the user really wants the largest integral type but hasn't caught up with C99. The bugs in scanf(9) should be fixed by removing scanf(9) from the kernel and only using strto*() and something special for string scanning in the couple of places it is needed. It is unfortunately too late to remove scanf(3). scanf is unusable for almost all purposes since it gives undefined behaviour on overflow, unlike strto*(). kenv and its uses have similar type problems, but at least it doesn't use scanf. It hasn't caught up with C99 either, and uses the quad mistake via strtoq() for all numeric input, with null error handling to get implementation-defined instead of undefined behaviour on overflow (large values get truncated to QUAD_MAX, which is even less than ULONG_MAX on 64-bit machines). > > /* Root node attributes. */ > uid_t root_uid; This and the remaining loal variables have typedefed types, so they too cannot be scanned correctly. > @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) > * allowed to use, based on the maximum size the user passed in > * the mount structure. A value of zero is treated as if the > * maximum available space was requested. */ The comment doesn't match the code. Values between 1 and PAGE_SIZE-1 are also treated as if the maximum available space were requested. The comment is not formatted in KNF (leading and trailing delimiters). > - if (size_max < PAGE_SIZE || size_max >= SIZE_MAX) > + if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE)) Style bug: extra (). > pages = SIZE_MAX; This is the "infinite" setting of `pages' > else > pages = howmany(size_max, PAGE_SIZE); > Page counts are normally divided by PAGE_SIZE like they are here, so they are far from infinite. tmpfs consistently uses the bogus type size_t for page counts. This at least allows it to represent the above "infinite" value. But using this value risks overflow. Overflow first occurs a few lines later: % if (nodes_max <= 3) % nodes = 3 + pages * PAGE_SIZE / 1024; ^^^^^^^^^^^^^^^^^ % else % nodes = nodes_max; Elsewhere, `pages' seems to only be used as a limit, so overflow doesn't occur but the limit has no effect, unlike the limit given by a size_max of SIZE_MAX - PAGE_SIZE. However, this limit probably has no effect either, since it is impossible to use use all pages except 1 in an address space for tmpfs on any supported machine. Apart from overflow problems, SIZE_MAX is a better limit on the number of pages than howmany(SIZE_MAX - PAGE_SIZE, PAGE_SIZE), since there might be more pages than can be mapped. vm already supports this (for PAE). It uses u_int for all page counts and APIs (struct vmmeter and too many sysctls). This barely works for PAE, since 2^32 pages is 4096 times as many as can be mapped and no one can afford that many and/or PAE hardware is limited to that many. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 19:56:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A83971065670; Fri, 8 Jan 2010 19:56:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 976968FC0A; Fri, 8 Jan 2010 19:56:37 +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 o08JubwS075265; Fri, 8 Jan 2010 19:56:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08Jubn9075263; Fri, 8 Jan 2010 19:56:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001081956.o08Jubn9075263@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 19:56: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: r201818 - head/sys/contrib/ngatm/netnatm/api X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 19:56:37 -0000 Author: trasz Date: Fri Jan 8 19:56:37 2010 New Revision: 201818 URL: http://svn.freebsd.org/changeset/base/201818 Log: Fix array overflow. Reviewed by: philip Modified: head/sys/contrib/ngatm/netnatm/api/cc_conn.c Modified: head/sys/contrib/ngatm/netnatm/api/cc_conn.c ============================================================================== --- head/sys/contrib/ngatm/netnatm/api/cc_conn.c Fri Jan 8 19:40:29 2010 (r201817) +++ head/sys/contrib/ngatm/netnatm/api/cc_conn.c Fri Jan 8 19:56:37 2010 (r201818) @@ -768,7 +768,7 @@ cc_party_drop_ack_ind(struct ccconn *con party = cc_party_find(conn, drop->epref.epref); if (party == NULL) { cc_party_log(party, "no party for %s", - ptab[CONN_SIG_DROP_PARTY_ACK_IND]); + cc_conn_sigtab[CONN_SIG_DROP_PARTY_ACK_IND]); return; } switch (party->state) { From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 20:25:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD6591065670; Fri, 8 Jan 2010 20:25:20 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from scuttle.submonkey.net (scuttle.submonkey.net [208.111.43.184]) by mx1.freebsd.org (Postfix) with ESMTP id 8D0328FC1D; Fri, 8 Jan 2010 20:25:20 +0000 (UTC) Received: from cpc1-cdif1-0-0-cust63.cdif.cable.ntl.com ([81.104.164.64] helo=shrike.submonkey.net) by scuttle.submonkey.net with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NTKtI-0006lR-Dn; Fri, 08 Jan 2010 19:53:00 +0000 Received: from ceri by shrike.submonkey.net with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NTKtF-000L6x-Rz; Fri, 08 Jan 2010 19:52:57 +0000 Date: Fri, 8 Jan 2010 19:52:57 +0000 From: Ceri Davies To: Doug Barton Message-ID: <20100108195257.GB29586@submonkey.net> References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> <4B46CFE8.8000501@FreeBSD.org> <4B477CBE.6090000@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <4B477CBE.6090000@FreeBSD.org> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.20 (2009-06-14) Sender: Ceri Davies Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 20:25:20 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 08, 2010 at 10:43:10AM -0800, Doug Barton wrote: > FWIW, while I am definitely in favor of treating all people with > courtesy and respect, I am just about as > anti-mindless-political-correctness as you can possibly be. *feels tickle in brain-stem*... *clickety-click*... Ah, yes. If any proof of this were needed, I can supply the appropriate Message-ID headers :) Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iD8DBQFLR40ZocfcwTS3JF8RAsbqAJ9jHjaZX2z4BZQrzD5Jzi1iu9NqAACfce3W y5eViIp5+rPBNhCZXFa38Cc= =0i/3 -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 20:33:55 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D595B1065672; Fri, 8 Jan 2010 20:33:55 +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 544438FC22; Fri, 8 Jan 2010 20:33:55 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o08KXphW017110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jan 2010 07:33:53 +1100 Date: Sat, 9 Jan 2010 07:33:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Edward Tomasz Napierala In-Reply-To: <201001081541.o08FfOHb014564@svn.freebsd.org> Message-ID: <20100109071832.H57772@delplex.bde.org> References: <201001081541.o08FfOHb014564@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: r201793 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 20:33:55 -0000 On Fri, 8 Jan 2010, Edward Tomasz Napierala wrote: > Log: > Fix #ifdefs so that GCC 4.4 doesn't complain about it. > > Reviewed by: rpaulo > > Modified: > head/sys/net80211/ieee80211_var.h > > Modified: head/sys/net80211/ieee80211_var.h > ============================================================================== > --- head/sys/net80211/ieee80211_var.h Fri Jan 8 15:28:22 2010 (r201792) > +++ head/sys/net80211/ieee80211_var.h Fri Jan 8 15:41:24 2010 (r201793) > @@ -32,11 +32,11 @@ > * Definitions for IEEE 802.11 drivers. > */ > /* NB: portability glue must go first */ > -#ifdef __NetBSD__ > +#if defined(__NetBSD__) "#if defined()" instead of "#ifdef" is a style bug. > #include > -#elif __FreeBSD__ > +#elif defined(__FreeBSD__) "defined()" is unfortunately needed with #elif (or if multple #ifdefs in a single statement are needed). > #include > -#elif __linux__ > +#elif defined(__linux__) > #include > #else > #error "No support for your operating system!" > It is a compiler bug to complain about undefined identifiers in cpp expressions, or a user bug to configure the compiler to have this bug. It is a standard C feature (6.10 [#3] in C99) that undefined identifiers are replaced by 0 in preprocessor expressions. This feature is very useful for avoiding ugliness like the above defined()'s. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 20:38:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7836B1065670; Fri, 8 Jan 2010 20:38:41 +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 67BF28FC15; Fri, 8 Jan 2010 20:38:41 +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 o08KcfDD084777; Fri, 8 Jan 2010 20:38:41 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08Kcfwp084775; Fri, 8 Jan 2010 20:38:41 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001082038.o08Kcfwp084775@svn.freebsd.org> From: Christian Brueffer Date: Fri, 8 Jan 2010 20:38: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: r201820 - head/release/doc/share/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 20:38:41 -0000 Author: brueffer Date: Fri Jan 8 20:38:41 2010 New Revision: 201820 URL: http://svn.freebsd.org/changeset/base/201820 Log: sk(4), stge(4) and vge(4) should work on all architectures, snd_t4dwave(4) works on sparc64. Submitted by: yongari Modified: head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/share/misc/dev.archlist.txt ============================================================================== --- head/release/doc/share/misc/dev.archlist.txt Fri Jan 8 20:25:59 2010 (r201819) +++ head/release/doc/share/misc/dev.archlist.txt Fri Jan 8 20:38:41 2010 (r201820) @@ -107,7 +107,6 @@ rum i386,amd64 safe i386,pc98,amd64 sbp i386,sparc64,ia64,amd64 sis i386,pc98,ia64,amd64 -sk i386,sparc64,pc98,amd64 sn i386,amd64 snc pc98 snd_ad1816 i386,amd64 @@ -135,12 +134,11 @@ snd_neomagic i386,amd64 snd_sbc i386,amd64 snd_solo i386,amd64 snd_spicds i386,amd64 -snd_t4dwave i386,amd64 +snd_t4dwave i386,amd64,sparc64 snd_via8233 i386,amd64 snd_via82c686 i386,amd64 snd_vibes i386,amd64 stg i386,pc98 -stge i386,amd64,sparc64 ti i386,pc98,amd64,sparc64 tl i386,pc98,amd64 trm i386,amd64 @@ -161,7 +159,6 @@ ural i386,amd64 urio i386,pc98,amd64,powerpc uvisor i386,pc98,amd64 uvscom i386,pc98,amd64 -vge i386,pc98,amd64 vpo i386 vx i386,pc98,ia64,amd64 wb i386,pc98,amd64 From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 20:40:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AA9A1065692; Fri, 8 Jan 2010 20:40:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E56C38FC0C; Fri, 8 Jan 2010 20:40:28 +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 o08KeSub085210; Fri, 8 Jan 2010 20:40:28 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08KeS2q085208; Fri, 8 Jan 2010 20:40:28 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001082040.o08KeS2q085208@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 20:40: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: r201821 - head/sys/dev/iir X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 20:40:29 -0000 Author: trasz Date: Fri Jan 8 20:40:28 2010 New Revision: 201821 URL: http://svn.freebsd.org/changeset/base/201821 Log: Get rid of #ident. Modified: head/sys/dev/iir/iir_pci.c Modified: head/sys/dev/iir/iir_pci.c ============================================================================== --- head/sys/dev/iir/iir_pci.c Fri Jan 8 20:38:41 2010 (r201820) +++ head/sys/dev/iir/iir_pci.c Fri Jan 8 20:40:28 2010 (r201821) @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#ident "$Id: iir_pci.c 1.2 2003/08/26 12:29:55 achim Exp $" #include __FBSDID("$FreeBSD$"); From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 20:56:13 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84533106568B; Fri, 8 Jan 2010 20:56:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 1E44E8FC1B; Fri, 8 Jan 2010 20:56:12 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o08KuAjB015357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Jan 2010 07:56:11 +1100 Date: Sat, 9 Jan 2010 07:56:10 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Edward Tomasz Napierala In-Reply-To: <201001081544.o08FinVh015359@svn.freebsd.org> Message-ID: <20100109073716.E57804@delplex.bde.org> References: <201001081544.o08FinVh015359@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: r201794 - in head/sys: ddb dev/ep dev/ex netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 20:56:13 -0000 On Fri, 8 Jan 2010, Edward Tomasz Napierala wrote: > Log: > Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in order > to silence newer GCC versions. I don't like compilers warning about simple logical expressions (especially && vs || and & vs | precedence :-(), but as stefanf pointed out, the reason to change this (or almost anything) is not to silence a broken compiler, but to fix a bug. > Modified: head/sys/ddb/db_ps.c > ============================================================================== > --- head/sys/ddb/db_ps.c Fri Jan 8 15:41:24 2010 (r201793) > +++ head/sys/ddb/db_ps.c Fri Jan 8 15:44:49 2010 (r201794) > @@ -136,7 +136,7 @@ db_ps(db_expr_t addr, boolean_t hasaddr, > if (TD_ON_LOCK(td)) > lflag++; > if (TD_IS_SLEEPING(td)) { > - if (!td->td_flags & TDF_SINTR) > + if (!(td->td_flags & TDF_SINTR)) > dflag++; > else > sflag++; All of these bugs should have been avoided by using normal style. KNF doesn't even use the "!" operator for testing simple booleans! Older KNF code in kern uses comparisions with 0 fairly consistently for testing flags in a bitmap being 0. Even the not-so-old KNF code in kern that tests the not-so-old flag TDF_SINTR does this (there is only one instance, in kern_sig.c, where the above is spelled correctly as ((td->td_flags & TDF_SINTR) == 0). I like to use ! for testing even sets of flags so I prefer the above, but this is not KNF. Spelling for testing the opposite sense is more mixed. Omitting the != 0 seems to be most common. > @@ -171,7 +171,7 @@ db_ps(db_expr_t addr, boolean_t hasaddr, > state[1] = '\0'; > > /* Additional process state flags. */ > - if (!p->p_flag & P_INMEM) > + if (!(p->p_flag & P_INMEM)) > strlcat(state, "W", sizeof(state)); > if (p->p_flag & P_TRACED) > strlcat(state, "X", sizeof(state)); Also spelled correctly in kern (1 instance). Other tests of P_INMEM in kern show the mixed style for putting parentheses around the test for the opposite sense. Then the parentheses are optional and are sometimes omitted in expressions like (p->p_flag & P_INMEM && p->p_pid == pid). Bruce From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 21:02:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0698A106566B; Fri, 8 Jan 2010 21:02:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EABDC8FC0C; Fri, 8 Jan 2010 21:02:12 +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 o08L2CQl090057; Fri, 8 Jan 2010 21:02:12 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08L2CuZ090055; Fri, 8 Jan 2010 21:02:12 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001082102.o08L2CuZ090055@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 8 Jan 2010 21:02: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: r201822 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 21:02:13 -0000 Author: trasz Date: Fri Jan 8 21:02:12 2010 New Revision: 201822 URL: http://svn.freebsd.org/changeset/base/201822 Log: Fix array overflow. Reviewed by: rpaulo Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Fri Jan 8 20:40:28 2010 (r201821) +++ head/sys/dev/iwn/if_iwn.c Fri Jan 8 21:02:12 2010 (r201822) @@ -3928,7 +3928,7 @@ iwn5000_get_rssi(struct iwn_softc *sc, s DPRINTF(sc, IWN_DEBUG_RECV, "%s: agc %d rssi %d %d %d " "result %d\n", __func__, agc, - phy->rssi[0], phy->rssi[2], phy->rssi[4], + phy->rssi[0], phy->rssi[1], phy->rssi[2], rssi - agc - IWN_RSSI_TO_DBM); return rssi - agc - IWN_RSSI_TO_DBM; } From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 22:02:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28CC110656E2; Fri, 8 Jan 2010 22:02:43 +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 182D68FC1A; Fri, 8 Jan 2010 22:02:43 +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 o08M2g17004450; Fri, 8 Jan 2010 22:02:42 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08M2glH004448; Fri, 8 Jan 2010 22:02:42 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001082202.o08M2glH004448@svn.freebsd.org> From: Christian Brueffer Date: Fri, 8 Jan 2010 22:02:42 +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: r201836 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 22:02:43 -0000 Author: brueffer Date: Fri Jan 8 22:02:42 2010 New Revision: 201836 URL: http://svn.freebsd.org/changeset/base/201836 Log: Remove unnecessary quoting and markup, add missing punctuation. PR: 140494 Submitted by: Jeremy Huddleston , bde MFC after: 1 week Modified: head/lib/libc/stdio/getc.3 Modified: head/lib/libc/stdio/getc.3 ============================================================================== --- head/lib/libc/stdio/getc.3 Fri Jan 8 21:58:12 2010 (r201835) +++ head/lib/libc/stdio/getc.3 Fri Jan 8 22:02:42 2010 (r201836) @@ -56,7 +56,7 @@ .Ft int .Fn getchar void .Ft int -.Fn getchar_unlocked "void" +.Fn getchar_unlocked void .Ft int .Fn getw "FILE *stream" .Sh DESCRIPTION @@ -141,7 +141,7 @@ until the condition is cleared with .Sh STANDARDS The .Fn fgetc , -.Fn getc +.Fn getc , and .Fn getchar functions @@ -167,4 +167,3 @@ The size and byte order of an varies from one machine to another, and .Fn getw is not recommended for portable applications. -.Pp From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 22:07:29 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EC98106568D; Fri, 8 Jan 2010 22:07:29 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id D26658FC1E; Fri, 8 Jan 2010 22:07:28 +0000 (UTC) Received: from a91-153-117-195.elisa-laajakaista.fi (a91-153-117-195.elisa-laajakaista.fi [91.153.117.195]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 1621A151592; Fri, 8 Jan 2010 23:48:22 +0200 (EET) Date: Fri, 8 Jan 2010 23:48:21 +0200 From: Jaakko Heinonen To: Bruce Evans Message-ID: <20100108214821.GA985@a91-153-117-195.elisa-laajakaista.fi> References: <201001080757.o087vhrr009799@svn.freebsd.org> <20100109051536.R57595@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100109051536.R57595@delplex.bde.org> 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: r201773 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 22:07:29 -0000 Thank you for looking at this. On 2010-01-09, Bruce Evans wrote: > The current incorrect way is to use %d. Since ino_t happens to have > type uint32_t and u_int happens to have type uint32_t on all supported > machines, %u would work but %d gives undefined behaviour when the > value exceeds INT_MAX. > > The simplest fix is to use u_int and %u. > > > + u_quad_t size_max; > > Even larger indentation error, as above. Does following patch look reasonable? - Fix style bugs introduced in r201773. - Change the type of nodes_max to u_int and use "%u" format string to convert its value. %%% Index: sys/fs/tmpfs/tmpfs_vfsops.c =================================================================== --- sys/fs/tmpfs/tmpfs_vfsops.c (revision 201818) +++ sys/fs/tmpfs/tmpfs_vfsops.c (working copy) @@ -185,8 +185,8 @@ tmpfs_mount(struct mount *mp) ino_t nodes; int error; /* Size counters. */ - ino_t nodes_max; - u_quad_t size_max; + u_int nodes_max; + u_quad_t size_max; /* Root node attributes. */ uid_t root_uid; @@ -223,7 +223,7 @@ tmpfs_mount(struct mount *mp) if (mp->mnt_cred->cr_ruid != 0 || vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if (vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) + if (vfs_scanopt(mp->mnt_optnew, "inodes", "%u", &nodes_max) != 1) nodes_max = 0; if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) size_max = 0; @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * maximum available space was requested. */ - if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE)) + if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE) pages = SIZE_MAX; else pages = howmany(size_max, PAGE_SIZE); %%% -- Jaakko From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 22:58:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9F8710656A9; Fri, 8 Jan 2010 22:58:50 +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 9913D8FC0A; Fri, 8 Jan 2010 22:58:50 +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 o08Mwo4L017692; Fri, 8 Jan 2010 22:58:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08MworN017690; Fri, 8 Jan 2010 22:58:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001082258.o08MworN017690@svn.freebsd.org> From: Christian Brueffer Date: Fri, 8 Jan 2010 22:58:50 +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: r201848 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 22:58:50 -0000 Author: brueffer Date: Fri Jan 8 22:58:50 2010 New Revision: 201848 URL: http://svn.freebsd.org/changeset/base/201848 Log: Free allocated sbufs before returning ENOMEM. PR: 128335 Submitted by: Mateusz Guzik MFC after: 2 week Modified: head/sys/kern/kern_cpu.c Modified: head/sys/kern/kern_cpu.c ============================================================================== --- head/sys/kern/kern_cpu.c Fri Jan 8 22:56:46 2010 (r201847) +++ head/sys/kern/kern_cpu.c Fri Jan 8 22:58:50 2010 (r201848) @@ -935,8 +935,10 @@ cpufreq_levels_sysctl(SYSCTL_HANDLER_ARG /* Get settings from the device and generate the output string. */ count = CF_MAX_LEVELS; levels = malloc(count * sizeof(*levels), M_TEMP, M_NOWAIT); - if (levels == NULL) + if (levels == NULL) { + sbuf_delete(&sb); return (ENOMEM); + } error = CPUFREQ_LEVELS(sc->dev, levels, &count); if (error) { if (error == E2BIG) @@ -974,8 +976,10 @@ cpufreq_settings_sysctl(SYSCTL_HANDLER_A /* Get settings from the device and generate the output string. */ set_count = MAX_SETTINGS; sets = malloc(set_count * sizeof(*sets), M_TEMP, M_NOWAIT); - if (sets == NULL) + if (sets == NULL) { + sbuf_delete(&sb); return (ENOMEM); + } error = CPUFREQ_DRV_SETTINGS(dev, sets, &set_count); if (error) goto out; From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:02:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A49E1065676; Fri, 8 Jan 2010 23:02:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 199C88FC15; Fri, 8 Jan 2010 23:02:18 +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 o08N2Hdw018515; Fri, 8 Jan 2010 23:02:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08N2HBY018513; Fri, 8 Jan 2010 23:02:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082302.o08N2HBY018513@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:02: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: r201849 - head/gnu/usr.bin/cc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:02:18 -0000 Author: imp Date: Fri Jan 8 23:02:17 2010 New Revision: 201849 URL: http://svn.freebsd.org/changeset/base/201849 Log: Back-merge (by hand) r195668: r195668 | gonzo | 2009-07-13 17:01:12 -0600 (Mon, 13 Jul 2009) | 3 lines - Get rid of ugly TARGET_CPU_DEFAULT default. 16 is MASK_DSP and was set there due to my ignroance. Modified: head/gnu/usr.bin/cc/Makefile.tgt Modified: head/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- head/gnu/usr.bin/cc/Makefile.tgt Fri Jan 8 22:58:50 2010 (r201848) +++ head/gnu/usr.bin/cc/Makefile.tgt Fri Jan 8 23:02:17 2010 (r201849) @@ -15,9 +15,6 @@ GCC_CPU= ${TARGET_ARCH} .if ${TARGET_ARCH} == "ia64" TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD .endif -.if ${TARGET_ARCH} == "mips" -TARGET_CPU_DEFAULT= 16 -.endif .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:06:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A21011065670; Fri, 8 Jan 2010 23:06:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 916038FC16; Fri, 8 Jan 2010 23:06:56 +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 o08N6um0019589; Fri, 8 Jan 2010 23:06:56 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08N6uh2019587; Fri, 8 Jan 2010 23:06:56 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082306.o08N6uh2019587@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:06:56 +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: r201850 - head/gnu/usr.bin/binutils X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:06:56 -0000 Author: imp Date: Fri Jan 8 23:06:56 2010 New Revision: 201850 URL: http://svn.freebsd.org/changeset/base/201850 Log: Merge from project/mips r195021: r195021 | gonzo | 2009-06-25 18:44:23 -0600 (Thu, 25 Jun 2009) | 2 lines - Add MIPS to the list of 32-bit architectures Modified: head/gnu/usr.bin/binutils/Makefile.inc0 Modified: head/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 Fri Jan 8 23:02:17 2010 (r201849) +++ head/gnu/usr.bin/binutils/Makefile.inc0 Fri Jan 8 23:06:56 2010 (r201850) @@ -22,7 +22,8 @@ RELTOP:= .. RELSRC= ${RELTOP}/../../../contrib/binutils SRCDIR= ${.CURDIR}/${RELSRC} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc" +.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || \ + ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "mips" CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:09:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EAC8106568F; Fri, 8 Jan 2010 23:09:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1438FC14; Fri, 8 Jan 2010 23:09: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 o08N9B3Q020119; Fri, 8 Jan 2010 23:09:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08N9Brs020117; Fri, 8 Jan 2010 23:09:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082309.o08N9Brs020117@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:09: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: r201851 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:09:11 -0000 Author: imp Date: Fri Jan 8 23:09:11 2010 New Revision: 201851 URL: http://svn.freebsd.org/changeset/base/201851 Log: Merge r195575 and 195530 from projects/mips to head by hand: r195575 | imp | 2009-07-10 12:24:02 -0600 (Fri, 10 Jul 2009) | 2 lines quick hack for the problem gonzo is seeing. r195530 | imp | 2009-07-10 01:18:30 -0600 (Fri, 10 Jul 2009) | 5 lines Always build all 4 emulators into the mips toolchain. # I think we have a gcc spec file issue with abi=64 since I have to do other # hacks to get it mostly kinda right. Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.mips Fri Jan 8 23:06:56 2010 (r201850) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Fri Jan 8 23:09:11 2010 (r201851) @@ -10,15 +10,22 @@ NATIVE_EMULATION=elf${_sz}btsmip_fbsd NATIVE_EMULATION=elf${_sz}ltsmip_fbsd .endif -SRCS+= e${NATIVE_EMULATION}.c -CLEANFILES+= e${NATIVE_EMULATION}.c - +MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd +.for abi in ${MIPS_ABIS} +#.if (${abi} != ${NATIVE_EMULATION}) +EMS+= ${abi} +#.endif +.for ext in ${ELF_SCR_EXT} +LDSCRIPTS+= ${abi}.${ext} +.endfor +SRCS+= e${abi}.c +CLEANFILES+= e${abi}.c # nb: elf32 handles both elf32 and elf64 targets -e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ +e${abi}.c: ${.CURDIR}/${abi}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ - ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ - ${.CURDIR}/${NATIVE_EMULATION}.sh - + ${abi} "" no ${abi} ${TARGET_TUPLE} \ + ${.CURDIR}/${abi}.sh +.endfor From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:11:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 458231065670; Fri, 8 Jan 2010 23:11:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34EDC8FC14; Fri, 8 Jan 2010 23:11: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 o08NBOMS020666; Fri, 8 Jan 2010 23:11:24 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08NBOlN020664; Fri, 8 Jan 2010 23:11:24 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082311.o08NBOlN020664@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:11: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: r201852 - head/gnu/lib/libgcc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:11:24 -0000 Author: imp Date: Fri Jan 8 23:11:23 2010 New Revision: 201852 URL: http://svn.freebsd.org/changeset/base/201852 Log: Merge r195030 from project/mips into head by hand: r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 lines - Switch to libc softfloat from libgcc implementation. The problem with latter is that it is not complete, fpsetXXX/fpgetXXX functions are missing. Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Fri Jan 8 23:09:11 2010 (r201851) +++ head/gnu/lib/libgcc/Makefile Fri Jan 8 23:11:23 2010 (r201852) @@ -115,6 +115,10 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatuns # _fixsfsi _fixunssfsi _floatdidf _floatdisf .endif +.if ${TARGET_ARCH} == "mips" +LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c +.endif + .if ${TARGET_ARCH} == "ia64" # from config/ia64/t-ia64 LIB1ASMSRC = lib1funcs.asm @@ -179,7 +183,7 @@ OBJ_GRPS = STD DIV # # Floating point emulation functions # -.if ${TARGET_ARCH} == "armNOT_YET" || ${TARGET_ARCH} == "mips" || \ +.if ${TARGET_ARCH} == "armNOT_YET" || \ ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" FPBIT_CFLAGS = -DFINE_GRAINED_LIBRARIES -DFLOAT From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:26:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E98C106568F; Fri, 8 Jan 2010 23:26:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C04F8FC0A; Fri, 8 Jan 2010 23:26: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 o08NQB0d023965; Fri, 8 Jan 2010 23:26:11 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08NQA6w023961; Fri, 8 Jan 2010 23:26:10 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001082326.o08NQA6w023961@svn.freebsd.org> From: Brooks Davis Date: Fri, 8 Jan 2010 23:26: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: r201853 - in head/sys: conf rpc/rpcsec_gss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:26:11 -0000 Author: brooks Date: Fri Jan 8 23:26:10 2010 New Revision: 201853 URL: http://svn.freebsd.org/changeset/base/201853 Log: Make options KGSSAPI build and add it to NOTES. rpcsec_gss_prot.c: Use kernel printf and headers. vc_rpcsec_gss.c: Use a local RPCAUTH_UNIXGIDS definition for 16 instead of using NGROUPS. Modified: head/sys/conf/NOTES head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Jan 8 23:11:23 2010 (r201852) +++ head/sys/conf/NOTES Fri Jan 8 23:26:10 2010 (r201853) @@ -973,6 +973,7 @@ options NFSSERVER #Network File System options NFSLOCKD #Network Lock Manager options NFSCL #experimental NFS client with NFSv4 options NFSD #experimental NFS server with NFSv4 +options KGSSAPI #Kernel GSSAPI implementaion # NT File System. Read-mostly, see mount_ntfs(8) for details. # For a full read-write NTFS support consider sysutils/fusefs-ntfs Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c ============================================================================== --- head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Fri Jan 8 23:11:23 2010 (r201852) +++ head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Fri Jan 8 23:26:10 2010 (r201853) @@ -307,7 +307,7 @@ xdr_rpc_gss_unwrap_data(struct mbuf **re } #ifdef DEBUG -#include +#include void rpc_gss_log_debug(const char *fmt, ...) @@ -315,9 +315,9 @@ rpc_gss_log_debug(const char *fmt, ...) va_list ap; va_start(ap, fmt); - fprintf(stderr, "rpcsec_gss: "); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); + printf("rpcsec_gss: "); + vprintf(fmt, ap); + printf("\n"); va_end(ap); } @@ -328,7 +328,7 @@ rpc_gss_log_status(const char *m, gss_OI gss_buffer_desc msg; int msg_ctx = 0; - fprintf(stderr, "rpcsec_gss: %s: ", m); + printf("rpcsec_gss: %s: ", m); gss_display_status(&min, maj_stat, GSS_C_GSS_CODE, GSS_C_NULL_OID, &msg_ctx, &msg); Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri Jan 8 23:11:23 2010 (r201852) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri Jan 8 23:26:10 2010 (r201853) @@ -121,6 +121,9 @@ enum svc_rpc_gss_client_state { }; #define SVC_RPC_GSS_SEQWINDOW 128 +#ifndef RPCAUTH_UNIXGIDS +#define RPCAUTH_UNIXGIDS 16 +#endif struct svc_rpc_gss_clientid { unsigned long ci_hostid; @@ -147,7 +150,7 @@ struct svc_rpc_gss_client { int cl_rpcflavor; /* RPC pseudo sec flavor */ bool_t cl_done_callback; /* TRUE after call */ void *cl_cookie; /* user cookie from callback */ - gid_t cl_gid_storage[NGROUPS]; + gid_t cl_gid_storage[RPCAUTH_UNIXGIDS]; gss_OID cl_mech; /* mechanism */ gss_qop_t cl_qop; /* quality of protection */ uint32_t cl_seqlast; /* sequence window origin */ @@ -735,7 +738,7 @@ svc_rpc_gss_build_ucred(struct svc_rpc_g uc->gid = 65534; uc->gidlist = client->cl_gid_storage; - numgroups = NGROUPS; + numgroups = RPCAUTH_UNIXGIDS; maj_stat = gss_pname_to_unix_cred(&min_stat, name, client->cl_mech, &uc->uid, &uc->gid, &numgroups, &uc->gidlist[0]); if (GSS_ERROR(maj_stat)) @@ -932,7 +935,7 @@ svc_rpc_gss_accept_sec_context(struct sv "", client->cl_rawcred.client_principal->name, mechname.length, (char *)mechname.value, - client->cl_qop, client->rawcred.service); + client->cl_qop, client->cl_rawcred.service); gss_release_buffer(&min_stat, &mechname); } From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:37:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0229C106566C; Fri, 8 Jan 2010 23:37:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E57358FC12; Fri, 8 Jan 2010 23:37: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 o08NbUXq026523; Fri, 8 Jan 2010 23:37:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08NbUUb026521; Fri, 8 Jan 2010 23:37:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082337.o08NbUUb026521@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:37: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: r201855 - head/contrib/gcc/config/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:37:31 -0000 Author: imp Date: Fri Jan 8 23:37:30 2010 New Revision: 201855 URL: http://svn.freebsd.org/changeset/base/201855 Log: Merge r194519 from projects/mips to head by hand: r194519 | gonzo | 2009-06-19 17:28:26 -0600 (Fri, 19 Jun 2009) | 3 lines - set -mabicalls and -msoft-float as a default in order to simplify building ports Modified: head/contrib/gcc/config/mips/freebsd.h Modified: head/contrib/gcc/config/mips/freebsd.h ============================================================================== --- head/contrib/gcc/config/mips/freebsd.h Fri Jan 8 23:30:43 2010 (r201854) +++ head/contrib/gcc/config/mips/freebsd.h Fri Jan 8 23:37:30 2010 (r201855) @@ -97,6 +97,9 @@ Boston, MA 02110-1301, USA. */ Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ +#undef TARGET_DEFAULT +#define TARGET_DEFAULT (MASK_ABICALLS | MASK_SOFT_FLOAT) + #if TARGET_ENDIAN_DEFAULT != 0 #define TARGET_VERSION fprintf (stderr, " (FreeBSD/mips)"); #else From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:50:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB260106566C; Fri, 8 Jan 2010 23:50:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8B8F8FC15; Fri, 8 Jan 2010 23:50:39 +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 o08NodqG029477; Fri, 8 Jan 2010 23:50:39 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08NodWn029470; Fri, 8 Jan 2010 23:50:39 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082350.o08NodWn029470@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:50: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: r201856 - in head/lib/libc/mips/gen: . hardfloat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:50:40 -0000 Author: imp Date: Fri Jan 8 23:50:39 2010 New Revision: 201856 URL: http://svn.freebsd.org/changeset/base/201856 Log: Merge r195025 from projects/mips to head by hand: r195025 | gonzo | 2009-06-25 19:01:50 -0600 (Thu, 25 Jun 2009) | 4 lines - Move fpgetXXX.c/fpsetXXX.c sources to hardfloat subdir/ to prevenmt them from being mixed up with lib/libc/softfloat files with the same names Added: head/lib/libc/mips/gen/hardfloat/ head/lib/libc/mips/gen/hardfloat/fpgetmask.c - copied unchanged from r201686, head/lib/libc/mips/gen/fpgetmask.c head/lib/libc/mips/gen/hardfloat/fpgetround.c - copied unchanged from r201686, head/lib/libc/mips/gen/fpgetround.c head/lib/libc/mips/gen/hardfloat/fpgetsticky.c - copied unchanged from r201686, head/lib/libc/mips/gen/fpgetsticky.c head/lib/libc/mips/gen/hardfloat/fpsetmask.c - copied unchanged from r201686, head/lib/libc/mips/gen/fpsetmask.c head/lib/libc/mips/gen/hardfloat/fpsetround.c - copied unchanged from r201686, head/lib/libc/mips/gen/fpsetround.c head/lib/libc/mips/gen/hardfloat/fpsetsticky.c - copied unchanged from r201686, head/lib/libc/mips/gen/fpsetsticky.c Deleted: head/lib/libc/mips/gen/fpgetmask.c head/lib/libc/mips/gen/fpgetround.c head/lib/libc/mips/gen/fpgetsticky.c head/lib/libc/mips/gen/fpsetmask.c head/lib/libc/mips/gen/fpsetround.c head/lib/libc/mips/gen/fpsetsticky.c Copied: head/lib/libc/mips/gen/hardfloat/fpgetmask.c (from r201686, head/lib/libc/mips/gen/fpgetmask.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/mips/gen/hardfloat/fpgetmask.c Fri Jan 8 23:50:39 2010 (r201856, copy of r201686, head/lib/libc/mips/gen/fpgetmask.c) @@ -0,0 +1,29 @@ +/* $NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpgetmask,_fpgetmask) +#endif + +fp_except_t +fpgetmask() +{ + int x; + + __asm("cfc1 %0,$31" : "=r" (x)); + return (x >> 7) & 0x1f; +} Copied: head/lib/libc/mips/gen/hardfloat/fpgetround.c (from r201686, head/lib/libc/mips/gen/fpgetround.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/mips/gen/hardfloat/fpgetround.c Fri Jan 8 23:50:39 2010 (r201856, copy of r201686, head/lib/libc/mips/gen/fpgetround.c) @@ -0,0 +1,29 @@ +/* $NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpgetround,_fpgetround) +#endif + +fp_rnd_t +fpgetround() +{ + int x; + + __asm("cfc1 %0,$31" : "=r" (x)); + return x & 0x03; +} Copied: head/lib/libc/mips/gen/hardfloat/fpgetsticky.c (from r201686, head/lib/libc/mips/gen/fpgetsticky.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/mips/gen/hardfloat/fpgetsticky.c Fri Jan 8 23:50:39 2010 (r201856, copy of r201686, head/lib/libc/mips/gen/fpgetsticky.c) @@ -0,0 +1,29 @@ +/* $NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpgetsticky,_fpgetsticky) +#endif + +fp_except_t +fpgetsticky() +{ + int x; + + __asm("cfc1 %0,$31" : "=r" (x)); + return (x >> 2) & 0x1f; +} Copied: head/lib/libc/mips/gen/hardfloat/fpsetmask.c (from r201686, head/lib/libc/mips/gen/fpsetmask.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/mips/gen/hardfloat/fpsetmask.c Fri Jan 8 23:50:39 2010 (r201856, copy of r201686, head/lib/libc/mips/gen/fpsetmask.c) @@ -0,0 +1,38 @@ +/* $NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpsetmask,_fpsetmask) +#endif + +fp_except_t +fpsetmask(mask) + fp_except_t mask; +{ + fp_except_t old; + fp_except_t new; + + __asm("cfc1 %0,$31" : "=r" (old)); + + new = old; + new &= ~(0x1f << 7); + new |= ((mask & 0x1f) << 7); + + __asm("ctc1 %0,$31" : : "r" (new)); + + return (old >> 7) & 0x1f; +} Copied: head/lib/libc/mips/gen/hardfloat/fpsetround.c (from r201686, head/lib/libc/mips/gen/fpsetround.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/mips/gen/hardfloat/fpsetround.c Fri Jan 8 23:50:39 2010 (r201856, copy of r201686, head/lib/libc/mips/gen/fpsetround.c) @@ -0,0 +1,37 @@ +/* $NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpsetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpsetround,_fpsetround) +#endif + +fp_rnd_t +fpsetround(fp_rnd_t rnd_dir) +{ + fp_rnd_t old; + fp_rnd_t new; + + __asm("cfc1 %0,$31" : "=r" (old)); + + new = old; + new &= ~0x03; + new |= (rnd_dir & 0x03); + + __asm("ctc1 %0,$31" : : "r" (new)); + + return old & 0x03; +} Copied: head/lib/libc/mips/gen/hardfloat/fpsetsticky.c (from r201686, head/lib/libc/mips/gen/fpsetsticky.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/mips/gen/hardfloat/fpsetsticky.c Fri Jan 8 23:50:39 2010 (r201856, copy of r201686, head/lib/libc/mips/gen/fpsetsticky.c) @@ -0,0 +1,38 @@ +/* $NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ + +/* + * Written by J.T. Conklin, Apr 11, 1995 + * Public domain. + */ + +#include +__FBSDID("$FreeBSD$"); +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD: fpsetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + +#include + +#ifdef __weak_alias +__weak_alias(fpsetsticky,_fpsetsticky) +#endif + +fp_except +fpsetsticky(sticky) + fp_except sticky; +{ + fp_except old; + fp_except new; + + __asm("cfc1 %0,$31" : "=r" (old)); + + new = old; + new &= ~(0x1f << 2); + new |= ((sticky & 0x1f) << 2); + + __asm("ctc1 %0,$31" : : "r" (new)); + + return (old >> 2) & 0x1f; +} From owner-svn-src-head@FreeBSD.ORG Fri Jan 8 23:59:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A32701065670; Fri, 8 Jan 2010 23:59:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 923B58FC21; Fri, 8 Jan 2010 23:59:04 +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 o08Nx4jS031375; Fri, 8 Jan 2010 23:59:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08Nx4FC031372; Fri, 8 Jan 2010 23:59:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001082359.o08Nx4FC031372@svn.freebsd.org> From: Warner Losh Date: Fri, 8 Jan 2010 23:59: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: r201858 - in head/lib/libc/mips: . sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 23:59:04 -0000 Author: imp Date: Fri Jan 8 23:59:04 2010 New Revision: 201858 URL: http://svn.freebsd.org/changeset/base/201858 Log: Merge r197800 from projects/mips to head by hand: r197800 | gonzo | 2009-10-06 00:35:52 -0600 (Tue, 06 Oct 2009) | 3 lines - curbrk variable for sbrk and brk should be the same - Add correct variable names to Symbol.map Modified: head/lib/libc/mips/Symbol.map head/lib/libc/mips/sys/brk.S Modified: head/lib/libc/mips/Symbol.map ============================================================================== --- head/lib/libc/mips/Symbol.map Fri Jan 8 23:57:30 2010 (r201857) +++ head/lib/libc/mips/Symbol.map Fri Jan 8 23:59:04 2010 (r201858) @@ -56,8 +56,8 @@ FBSDprivate_1.0 { __siglongjmp; __sys_vfork; _vfork; - end; /* XXX - Should this be _end (see sys/brk.S)? */ - curbrk; + _end; + __curbrk; minbrk; _brk; _sbrk; Modified: head/lib/libc/mips/sys/brk.S ============================================================================== --- head/lib/libc/mips/sys/brk.S Fri Jan 8 23:57:30 2010 (r201857) +++ head/lib/libc/mips/sys/brk.S Fri Jan 8 23:59:04 2010 (r201858) @@ -42,15 +42,12 @@ __FBSDID("$FreeBSD$"); #endif /* LIBC_SCCS and not lint */ .globl _C_LABEL(minbrk) - .globl _C_LABEL(curbrk) + .globl _C_LABEL(__curbrk) .globl _C_LABEL(_end) .data _C_LABEL(minbrk): .word _C_LABEL(_end) -_C_LABEL(curbrk): - .word _C_LABEL(_end) - .text LEAF(__sys_brk) WEAK_ALIAS(brk, __sys_brk) @@ -67,7 +64,7 @@ LEAF(__sys_brk) li v0, SYS_break syscall bne a3, zero, 2f - sw a0, _C_LABEL(curbrk) + sw a0, _C_LABEL(__curbrk) move v0, zero j ra 2: From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 00:01:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9C561065698; Sat, 9 Jan 2010 00:01:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89668FC15; Sat, 9 Jan 2010 00:01:35 +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 o0901ZEe032011; Sat, 9 Jan 2010 00:01:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0901Z3E032008; Sat, 9 Jan 2010 00:01:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001090001.o0901Z3E032008@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 00:01: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: r201859 - in head/lib/libc: . mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 00:01:35 -0000 Author: imp Date: Sat Jan 9 00:01:35 2010 New Revision: 201859 URL: http://svn.freebsd.org/changeset/base/201859 Log: Merge r195030 from project/mips to head by hand r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 lines - Switch to libc softfloat from libgcc implementation. The problem with latter is that it is not complete, fpsetXXX/fpgetXXX functions are missing. Modified: head/lib/libc/Makefile head/lib/libc/mips/Symbol.map Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Fri Jan 8 23:59:04 2010 (r201858) +++ head/lib/libc/Makefile Sat Jan 9 00:01:35 2010 (r201859) @@ -64,7 +64,7 @@ NOASM= .include "${.CURDIR}/rpc/Makefile.inc" .include "${.CURDIR}/uuid/Makefile.inc" .include "${.CURDIR}/xdr/Makefile.inc" -.if ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips" .include "${.CURDIR}/softfloat/Makefile.inc" .endif .if ${MK_NIS} != "no" Modified: head/lib/libc/mips/Symbol.map ============================================================================== --- head/lib/libc/mips/Symbol.map Fri Jan 8 23:59:04 2010 (r201858) +++ head/lib/libc/mips/Symbol.map Sat Jan 9 00:01:35 2010 (r201859) @@ -61,4 +61,22 @@ FBSDprivate_1.0 { minbrk; _brk; _sbrk; + + /* softfloat */ + __addsf3; + __adddf3; + __subsf3; + __subdf3; + __mulsf3; + __muldf3; + __divsf3; + __divdf3; + __floatsisf; + __floatsidf; + __fixsfsi; + __fixdfsi; + __fixunssfsi; + __fixunsdfsi; + __extendsfdf2; + __truncdfsf2; }; From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 00:07:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F2A71065692; Sat, 9 Jan 2010 00:07:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4708FC17; Sat, 9 Jan 2010 00:07:48 +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 o0907mi1033639; Sat, 9 Jan 2010 00:07:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0907mfI033637; Sat, 9 Jan 2010 00:07:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001090007.o0907mfI033637@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 00:07: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: r201864 - head/lib/libthr/arch/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 00:07:48 -0000 Author: imp Date: Sat Jan 9 00:07:47 2010 New Revision: 201864 URL: http://svn.freebsd.org/changeset/base/201864 Log: Merge r195129 from project/mips to head by hand: r195129 | gonzo | 2009-06-27 17:28:56 -0600 (Sat, 27 Jun 2009) | 2 lines - Use sysarch(2) in MIPS version of _tcb_set/_tcb_get Modified: head/lib/libthr/arch/mips/include/pthread_md.h Modified: head/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/mips/include/pthread_md.h Sat Jan 9 00:07:46 2010 (r201863) +++ head/lib/libthr/arch/mips/include/pthread_md.h Sat Jan 9 00:07:47 2010 (r201864) @@ -60,7 +60,8 @@ void _tcb_dtor(struct tcb *); static __inline void _tcb_set(struct tcb *tcb) { - mips_tcb_set(tcb); + + sysarch(MIPS_SET_TLS, tcb); } /* @@ -69,7 +70,10 @@ _tcb_set(struct tcb *tcb) static __inline struct tcb * _tcb_get(void) { - return (mips_tcb_get()); + void *tcb; + + sysarch(MIPS_GET_TLS, &tcb); + return tcb; } extern struct pthread *_thr_initial; From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 00:10:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 279A8106566B; Sat, 9 Jan 2010 00:10:57 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 88C958FC15; Sat, 9 Jan 2010 00:10:56 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so4470373qwb.7 for ; Fri, 08 Jan 2010 16:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=D9TKbl7Zv5gVmHu8Sjv9DnMjPn+vQChAwE/ZVGJR5og=; b=OYDVUJFXfSdUCIDjdnl0Jc4tz0LIdEYiWJRHsA7L/Cdex3vSaIjCtSnLWoCVY0vPtG YJbxSWv7eRhv+Cp4kubr//lcuvuJxAsfUMCRBV87ksFvDcHfv50I6hTHP+Sj9Y+PEG+Q Doqa67aU9IPfBUJqhdMbEezV/JMvjCO0Bs3Fc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=pr8uZSL/zO3f1JUpRUcE2Ucx1k7Iy0q+Q9yqV0nD9dKbl2yshDXqf7UF2KL0Uhv4xy PMWjrouF0/oc4NgHERfnZTyfJXsPsBXmVGrWrUKYPb4PWbcEBUiZn5IIhhAF9bCNgs00 DeOmqu7/6rhpqI3wr3ndsfbs4fCEN9w/qUGzw= Received: by 10.224.62.233 with SMTP id y41mr14979373qah.11.1262995846876; Fri, 08 Jan 2010 16:10:46 -0800 (PST) Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net [24.91.218.112]) by mx.google.com with ESMTPS id 8sm64032812qwj.43.2010.01.08.16.10.45 (version=SSLv3 cipher=RC4-MD5); Fri, 08 Jan 2010 16:10:45 -0800 (PST) Date: Fri, 8 Jan 2010 19:10:39 -0500 From: Alexander Kabaev To: Warner Losh Message-ID: <20100108191039.0143fa1d@kan.dnsalias.net> In-Reply-To: <201001090001.o0901Z3E032008@svn.freebsd.org> References: <201001090001.o0901Z3E032008@svn.freebsd.org> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/gL7MYCDjOeG+IeLdgDbVdqU"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201859 - in head/lib/libc: . mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 00:10:57 -0000 --Sig_/gL7MYCDjOeG+IeLdgDbVdqU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 9 Jan 2010 00:01:35 +0000 (UTC) Warner Losh wrote: > Author: imp > Date: Sat Jan 9 00:01:35 2010 > New Revision: 201859 > URL: http://svn.freebsd.org/changeset/base/201859 >=20 > Log: > Merge r195030 from project/mips to head by hand > =20 > r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 > lines > - Switch to libc softfloat from libgcc implementation. The problem > with latter is that it is not complete, fpsetXXX/fpgetXXX > functions are missing. >=20 ... yet fpsetXXX is missing from the list of exported symbols? --=20 Alexander Kabaev --Sig_/gL7MYCDjOeG+IeLdgDbVdqU Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iD8DBQFLR8mEQ6z1jMm+XZYRArfIAKCgVPdN+U2drtjtpTy07vFN1k31kgCgtE0q u33cGAxb5C0M2fcNiTNPLl4= =1Muh -----END PGP SIGNATURE----- --Sig_/gL7MYCDjOeG+IeLdgDbVdqU-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 00:20:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7912D106568B; Sat, 9 Jan 2010 00:20:17 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id EF4838FC1D; Sat, 9 Jan 2010 00:20:16 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 9so4471808qwb.7 for ; Fri, 08 Jan 2010 16:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=9A6+m8Ws8ocKyQxsKGIzNtb2QozRmp7LTiUvj9vXh3Y=; b=YUt+vPtVwWINj2ohQ+GzYeChuBvbadT9jTwkOQr5opi9WXXr+nTwtjrUcQN+mVCGNO KwfdKRV5g68h+dGZL1PKR2VqG79BXHoZnfx/ll4uZnKjOWuGnTFInmjNWNdCfNJkBmUq ua1+RfCVWW5sEVtp2ivNUuemoemwaN+1L1Wqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=OJfXjAg4xY6itttvobJA7Ldookcz4Q2JB5bsr4kW+Xz6kNWZARViSxmNkh9o6Zmw3e WDZta8CHXDJoIBUDLrbXXwaf+9lw+JWO3OjbLtdcupQerBwJhtt8IynZBiMNWrnxhax+ BSNIQEMVUar1PsV5VJeYCxdCaeVnx7dP/sq5U= Received: by 10.224.72.11 with SMTP id k11mr1677665qaj.5.1262996416028; Fri, 08 Jan 2010 16:20:16 -0800 (PST) Received: from kan.dnsalias.net (c-24-91-218-112.hsd1.ma.comcast.net [24.91.218.112]) by mx.google.com with ESMTPS id 7sm13803170qwf.14.2010.01.08.16.20.14 (version=SSLv3 cipher=RC4-MD5); Fri, 08 Jan 2010 16:20:14 -0800 (PST) Date: Fri, 8 Jan 2010 19:20:04 -0500 From: Alexander Kabaev To: Alexander Kabaev Message-ID: <20100108192004.5089586f@kan.dnsalias.net> In-Reply-To: <20100108191039.0143fa1d@kan.dnsalias.net> References: <201001090001.o0901Z3E032008@svn.freebsd.org> <20100108191039.0143fa1d@kan.dnsalias.net> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.18.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/L75gtXDQ_F.qbkw0a1swrTy"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r201859 - in head/lib/libc: . mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 00:20:17 -0000 --Sig_/L75gtXDQ_F.qbkw0a1swrTy Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 8 Jan 2010 19:10:39 -0500 Alexander Kabaev wrote: > On Sat, 9 Jan 2010 00:01:35 +0000 (UTC) > Warner Losh wrote: >=20 > > Author: imp > > Date: Sat Jan 9 00:01:35 2010 > > New Revision: 201859 > > URL: http://svn.freebsd.org/changeset/base/201859 > >=20 > > Log: > > Merge r195030 from project/mips to head by hand > > =20 > > r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 > > lines > > - Switch to libc softfloat from libgcc implementation. The problem > > with latter is that it is not complete, fpsetXXX/fpgetXXX > > functions are missing. > >=20 > ... yet fpsetXXX is missing from the list of exported symbols? >=20 > --=20 > Alexander Kabaev Never mind, softloat subdir exports them. --=20 Alexander Kabaev --Sig_/L75gtXDQ_F.qbkw0a1swrTy Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iD8DBQFLR8u9Q6z1jMm+XZYRAuXYAKCRttJ3s7Qy1SvlELeSeBFzepjD0wCg2h/o Alug3ho52MZVpHdiPfpW1cI= =PIQL -----END PGP SIGNATURE----- --Sig_/L75gtXDQ_F.qbkw0a1swrTy-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 00:24:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1243106568D; Sat, 9 Jan 2010 00:24:54 +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 964C28FC25; Sat, 9 Jan 2010 00:24:54 +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 o090Os1E037870; Sat, 9 Jan 2010 00:24:54 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o090OsmW037868; Sat, 9 Jan 2010 00:24:54 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001090024.o090OsmW037868@svn.freebsd.org> From: Christian Brueffer Date: Sat, 9 Jan 2010 00:24: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: r201870 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 00:24:54 -0000 Author: brueffer Date: Sat Jan 9 00:24:54 2010 New Revision: 201870 URL: http://svn.freebsd.org/changeset/base/201870 Log: Various language fixes. PR: 38061 Submitted by: Chris Pepper MFC after: 1 week Modified: head/share/man/man4/faith.4 Modified: head/share/man/man4/faith.4 ============================================================================== --- head/share/man/man4/faith.4 Sat Jan 9 00:20:33 2010 (r201869) +++ head/share/man/man4/faith.4 Sat Jan 9 00:24:54 2010 (r201870) @@ -58,15 +58,15 @@ variable in .Xr rc.conf 5 . .Pp Special action will be taken when IPv6 TCP traffic is seen on a router, -and routing table suggests to route it to +and the routing table suggests to route it to the .Nm interface. In this case, the packet will be accepted by the router, -regardless of list of IPv6 interface addresses assigned to the router. -The packet will be captured by an IPv6 TCP socket, if it has +regardless of the list of IPv6 interface addresses assigned to the router. +The packet will be captured by an IPv6 TCP socket, if it has the .Dv IN6P_FAITH -flag turned on and it has matching address/port pairs. -In result, +flag turned on and matching address/port pairs. +As a result, .Nm will let you capture IPv6 TCP traffic to some specific destination addresses. Userland programs, such as @@ -79,43 +79,42 @@ and perform application-specific address .Pp The .Dv IN6P_FAITH -flag on IPv6 TCP socket can be set by using +flag on a IPv6 TCP socket can be set by using .Xr setsockopt 2 , -with level equals to +with level .Dv IPPROTO_IPV6 -and optname equals to +and optname .Dv IPv6_FAITH . .Pp -To handle error reports by ICMPv6, some of ICMPv6 packets routed to +To handle error reports by ICMPv6, some ICMPv6 packets routed to an .Nm interface will be delivered to IPv6 TCP, as well. .Pp To understand how .Nm -can be used, take a look at source code of +can be used, take a look at the source code of .Xr faithd 8 . .Pp -As +As the .Nm -interface implements potentially dangerous operation, -great care must be taken when configuring -.Nm -interface. -To avoid possible misuse, +interface implements potentially dangerous operations, +great care must be taken when configuring it. +To avoid possible misuse, the .Xr sysctl 8 variable .Li net.inet6.ip6.keepfaith must be set to .Li 1 -prior to the use of the interface. +prior to using the interface. When .Li net.inet6.ip6.keepfaith is .Li 0 , -no packet will be captured by +no packets will be captured by the .Nm interface. .Pp +The .Nm interface is intended to be used on routers, not on hosts. .\" @@ -130,5 +129,5 @@ interface is intended to be used on rout .%O RFC3142 .Re .Sh HISTORY -The FAITH IPv6-to-IPv4 TCP relay translator was first appeared in +The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the WIDE hydrangea IPv6 stack. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 00:49:10 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCED3106566B; Sat, 9 Jan 2010 00:49:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 613418FC13; Sat, 9 Jan 2010 00:49:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o090i9qa009031; Fri, 8 Jan 2010 17:44:09 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 08 Jan 2010 17:44:57 -0700 (MST) Message-Id: <20100108.174457.1108826596265063191.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201001061400.26082.jhb@freebsd.org> References: <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> <201001061400.26082.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dougb@FreeBSD.org, svn-src-all@FreeBSD.org, stas@FreeBSD.org, src-committers@FreeBSD.org, svn-src-head@FreeBSD.org, des@des.no Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 00:49:10 -0000 In message: <201001061400.26082.jhb@freebsd.org> John Baldwin writes: : On Wednesday 06 January 2010 9:13:56 am Dag-Erling Sm=F8rgrav wrote: : > Doug Barton writes: : > > First off, thanks for sorting these, that's a step in the right : > > direction. :) However, a few quibbles. First, our rule is that : > > anything which might offend someone belongs in fortunes-o, and : > > political quotes are always in the category of "might offend some= one." : > = : > I don't see how the Rumsfeld quote could offend anyone. True, Rums= feld : > is a politician (and not a particularly popular one in most parts o= f the : > world), but the quote itself is not political. It is a somewhat : > comically worded expression of an important truism that many people= : > would do well to remember (cf. the classical "there are no unknown = bugs : > in our software"). Would you have suggested moving it to -o if it = had : > been a Steve Martin quote? : = : I agree that the quote isn't particularly politically partisan, just = made by a = : political figure. There are fortunes that are offensive. There are fortunes that are political. Political doesn't imply offensive, and it shouldn't be move to the fortunes-o file unless it is also offensive. Warner From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 01:05:49 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85A291065672; Sat, 9 Jan 2010 01:05:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 140778FC0A; Sat, 9 Jan 2010 01:05:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o090tpZM009120; Fri, 8 Jan 2010 17:55:51 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 08 Jan 2010 17:56:40 -0700 (MST) Message-Id: <20100108.175640.1104512900458971844.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201001080812.21124.jhb@freebsd.org> References: <20100107203536.GB8230@rincewind.paeps.cx> <20100107214334.GA35184@onelab2.iet.unipi.it> <201001080812.21124.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, tuexen@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rizzo@iet.unipi.it Subject: Re: moving sctp to a separate directory ? X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 01:05:49 -0000 In message: <201001080812.21124.jhb@freebsd.org> John Baldwin writes: : On Thursday 07 January 2010 4:43:34 pm Luigi Rizzo wrote: : > > What do you do with udp, for instance? Compared to tcp and sctp, it's : > > trivial in terms of code, but it's an upper layer protocol from the : > > perspective of netinet/netinet6 - do we put it in its own directory too? : > > Also note that this won't only cause churn for people who have patches against : > > or (out-of-tree) branches from netinet/, but also in other kernel subsystems : > > which rely on tcp -- nfs, for instance. : > : > + i find the concern about churn in external patchsets a bit weak, first of : > all because this is bound to happen unless we stop all development, : > and secondly because this kind of file moving or splitting happens : > once every 10-15 years which is well beyond the lifetime of a patchset. : : Having the files rename is entirely different from merging changes. At least : for svn and p4 I believe that merging a rename into a branch is not smart : enough to merge your local changes into the new files. Instead it involves a : big manual fixup. : : Also, the 10-15 years thing is completely non-relevant. What is relevant is : if you are working on a project in a branch and someone renames files before : you have finished your branch and merged it up to HEAD. For example, assume : that someone else renamed the ipfw files in HEAD next week. That would : create an utter mess for you to resolve in your current ipfw3 branch. Moving : TCP would create similar a headache, except much more widespread since TCP is : one of the most widely worked-on subsystems. : : FWIW, I do think it would be cleaner to have netinet more split up perhaps, : but I do not think it is worth the pain that would be involved. It is painful enough moving drivers around. I think that while well intentioned, it will cause us nothing but grief. Warner From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 01:05:59 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AFA9106575A; Sat, 9 Jan 2010 01:05:58 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C3A2E8FC17; Sat, 9 Jan 2010 01:05:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o090sOmv009078; Fri, 8 Jan 2010 17:54:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 08 Jan 2010 17:55:12 -0700 (MST) Message-Id: <20100108.175512.706189011738064018.imp@bsdimp.com> To: unixmania@gmail.com From: "M. Warner Losh" In-Reply-To: References: <867hrvgw2j.fsf@ds4.des.no> <4B46CFE8.8000501@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dougb@FreeBSD.org, svn-src-all@FreeBSD.org, stas@FreeBSD.org, src-committers@FreeBSD.org, svn-src-head@FreeBSD.org, des@des.no Subject: Re: svn commit: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 01:05:59 -0000 In message: = "Carlos A. M. dos Santos" writes: : 2010/1/8 Doug Barton : : > Dag-Erling Sm=F8rgrav wrote: : >> I don't see how the Rumsfeld quote could offend anyone. : > : > A) Better safe than sorry : > B) Regardless of my own opinions I can easily see how someone could= be : > offended by anything having to do with Rumsfeld, the Iraq war, etc.= : = : Perhaps, at the moment. Five to ten years from now that quotation wil= l : be just history, like the ones from/about JFK, Richard Nixon, and : Spiro Agnew. Are you whiling to apply such rule to all supposedly : political fortunes? : = : : Looks like political correctness started to infect the BSD culture. : Once upon a time this was the OS with guts to have a function called : "die_you_gravy_sucking_pig_dog". : It should be moved back. Doug is being too sensitive here. IMHO. Warner From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 01:46:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12555106568D; Sat, 9 Jan 2010 01:46:39 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F38078FC1B; Sat, 9 Jan 2010 01:46:38 +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 o091kcfR056379; Sat, 9 Jan 2010 01:46:38 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o091kc2i056369; Sat, 9 Jan 2010 01:46:38 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001090146.o091kc2i056369@svn.freebsd.org> From: Attilio Rao Date: Sat, 9 Jan 2010 01:46: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: r201879 - in head: . share/man/man9 sys/conf sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 01:46:39 -0000 Author: attilio Date: Sat Jan 9 01:46:38 2010 New Revision: 201879 URL: http://svn.freebsd.org/changeset/base/201879 Log: Introduce the new kernel thread called "deadlock resolver". While the name is pretentious, a good explanation of its targets is reported in this 17 months old presentation e-mail: http://lists.freebsd.org/pipermail/freebsd-arch/2008-August/008452.html In order to implement it, the sq_type in sleepqueues is mandatory and not only compiled along with INVARIANTS option. Additively, a new sleepqueue function, sleepq_type() is added, returning the type of the sleepqueue linked to a wchan. Three new sysctls are added in order to configure the thread: debug.deadlkres.slptime_threshold debug.deadlkres.blktime_threshold debug.deadlkres.sleepfreq rappresenting the thresholds for sleep and block time that will lead to a deadlock matching (when exceeded), while the sleepfreq rappresents the number of seconds between 2 consecutive thread runnings. In order to enable the deadlock resolver thread recompile your kernel with the option DEADLKRES. Reviewed by: jeff Tested by: pho, Giovanni Trematerra Sponsored by: Nokia Incorporated, Sandvine Incorporated MFC after: 2 weeks Modified: head/UPDATING head/share/man/man9/sleepqueue.9 head/sys/conf/NOTES head/sys/conf/options head/sys/kern/kern_clock.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_turnstile.c head/sys/sys/proc.h head/sys/sys/sleepqueue.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jan 9 01:20:01 2010 (r201878) +++ head/UPDATING Sat Jan 9 01:46:38 2010 (r201879) @@ -22,6 +22,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100108: + Introduce the kernel thread "deadlock resolver" (which can be enabled + via the DEADLKRES option, see NOTES for more details) and the + sleepq_type() function for sleepqueues. + 20091202: The rc.firewall and rc.firewall6 were unified, and rc.firewall6 and rc.d/ip6fw were removed. Modified: head/share/man/man9/sleepqueue.9 ============================================================================== --- head/share/man/man9/sleepqueue.9 Sat Jan 9 01:20:01 2010 (r201878) +++ head/share/man/man9/sleepqueue.9 Sat Jan 9 01:46:38 2010 (r201879) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2009 +.Dd January 8, 2010 .Dt SLEEPQUEUE 9 .Os .Sh NAME @@ -44,6 +44,7 @@ .Nm sleepq_sleepcnt , .Nm sleepq_timedwait , .Nm sleepq_timedwait_sig , +.Nm sleepq_type , .Nm sleepq_wait , .Nm sleepq_wait_sig .Nd manage the queues of sleeping threads @@ -84,6 +85,8 @@ .Fn sleepq_timedwait "void *wchan" .Ft int .Fn sleepq_timedwait_sig "void *wchan" "int signal_caught" +.Ft int +.Fn sleepq_type "void *wchan" .Ft void .Fn sleepq_wait "void *wchan" .Ft int @@ -366,6 +369,12 @@ given a .Fa wchan . .Pp The +.Fn sleepq_type +function returns the type of +.Fa wchan +associated to a sleepqueue. +.Pp +The .Fn sleepq_abort , .Fn sleepq_broadcast , and Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/conf/NOTES Sat Jan 9 01:46:38 2010 (r201879) @@ -2531,6 +2531,11 @@ options BOOTP_BLOCKSIZE=8192 # Override options SW_WATCHDOG # +# Add the software deadlock resolver thread. +# +options DEADLKRES + +# # Disable swapping of stack pages. This option removes all # code which actually performs swapping, so it's not possible to turn # it back on at run-time. Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/conf/options Sat Jan 9 01:46:38 2010 (r201879) @@ -72,6 +72,7 @@ COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7 opt_compat.h COMPILING_LINT opt_global.h CY_PCI_FASTINTR +DEADLKRES opt_watchdog.h DIRECTIO FULL_PREEMPTION opt_sched.h IPI_PREEMPTION opt_sched.h Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/kern/kern_clock.c Sat Jan 9 01:46:38 2010 (r201879) @@ -48,14 +48,16 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -159,6 +161,124 @@ sysctl_kern_cp_times(SYSCTL_HANDLER_ARGS SYSCTL_PROC(_kern, OID_AUTO, cp_times, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, 0,0, sysctl_kern_cp_times, "LU", "per-CPU time statistics"); +#ifdef DEADLKRES +static int slptime_threshold = 1800; +static int blktime_threshold = 900; +static int sleepfreq = 3; + +static void +deadlkres(void) +{ + struct proc *p; + struct thread *td; + void *wchan; + int blkticks, slpticks, slptype, tryl, tticks; + + tryl = 0; + for (;;) { + blkticks = blktime_threshold * hz; + slpticks = slptime_threshold * hz; + + /* + * Avoid to sleep on the sx_lock in order to avoid a possible + * priority inversion problem leading to starvation. + * If the lock can't be held after 100 tries, panic. + */ + if (!sx_try_slock(&allproc_lock)) { + if (tryl > 100) + panic("%s: possible deadlock detected on allproc_lock\n", + __func__); + tryl++; + pause("allproc_lock deadlkres", sleepfreq * hz); + continue; + } + tryl = 0; + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + FOREACH_THREAD_IN_PROC(p, td) { + thread_lock(td); + if (TD_ON_LOCK(td)) { + + /* + * The thread should be blocked on a + * turnstile, simply check if the + * turnstile channel is in good state. + */ + MPASS(td->td_blocked != NULL); + tticks = ticks - td->td_blktick; + thread_unlock(td); + if (tticks > blkticks) { + + /* + * Accordingly with provided + * thresholds, this thread is + * stuck for too long on a + * turnstile. + */ + PROC_UNLOCK(p); + sx_sunlock(&allproc_lock); + panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", + __func__, td, tticks); + } + } else if (TD_IS_SLEEPING(td)) { + + /* + * Check if the thread is sleeping on a + * lock, otherwise skip the check. + * Drop the thread lock in order to + * avoid a LOR with the sleepqueue + * spinlock. + */ + wchan = td->td_wchan; + tticks = ticks - td->td_slptick; + thread_unlock(td); + slptype = sleepq_type(wchan); + if ((slptype == SLEEPQ_SX || + slptype == SLEEPQ_LK) && + tticks > slpticks) { + + /* + * Accordingly with provided + * thresholds, this thread is + * stuck for too long on a + * sleepqueue. + */ + PROC_UNLOCK(p); + sx_sunlock(&allproc_lock); + panic("%s: possible deadlock detected for %p, blocked for %d ticks\n", + __func__, td, tticks); + } + } else + thread_unlock(td); + } + PROC_UNLOCK(p); + } + sx_sunlock(&allproc_lock); + + /* Sleep for sleepfreq seconds. */ + pause("deadlkres", sleepfreq * hz); + } +} + +static struct kthread_desc deadlkres_kd = { + "deadlkres", + deadlkres, + (struct thread **)NULL +}; + +SYSINIT(deadlkres, SI_SUB_CLOCKS, SI_ORDER_ANY, kthread_start, &deadlkres_kd); + +SYSCTL_NODE(_debug, OID_AUTO, deadlkres, CTLFLAG_RW, 0, "Deadlock resolver"); +SYSCTL_INT(_debug_deadlkres, OID_AUTO, slptime_threshold, CTLFLAG_RW, + &slptime_threshold, 0, + "Number of seconds within is valid to sleep on a sleepqueue"); +SYSCTL_INT(_debug_deadlkres, OID_AUTO, blktime_threshold, CTLFLAG_RW, + &blktime_threshold, 0, + "Number of seconds within is valid to block on a turnstile"); +SYSCTL_INT(_debug_deadlkres, OID_AUTO, sleepfreq, CTLFLAG_RW, &sleepfreq, 0, + "Number of seconds between any deadlock resolver thread run"); +#endif /* DEADLKRES */ + void read_cpu_time(long *cp_time) { Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/kern/subr_sleepqueue.c Sat Jan 9 01:46:38 2010 (r201879) @@ -122,8 +122,8 @@ struct sleepqueue { LIST_ENTRY(sleepqueue) sq_hash; /* (c) Chain and free list. */ LIST_HEAD(, sleepqueue) sq_free; /* (c) Free queues. */ void *sq_wchan; /* (c) Wait channel. */ -#ifdef INVARIANTS int sq_type; /* (c) Queue type. */ +#ifdef INVARIANTS struct lock_object *sq_lock; /* (c) Associated lock. */ #endif }; @@ -317,7 +317,6 @@ sleepq_add(void *wchan, struct lock_obje ("thread's sleep queue has a non-empty free list")); KASSERT(sq->sq_wchan == NULL, ("stale sq_wchan pointer")); sq->sq_lock = lock; - sq->sq_type = flags & SLEEPQ_TYPE; #endif #ifdef SLEEPQUEUE_PROFILING sc->sc_depth++; @@ -330,6 +329,7 @@ sleepq_add(void *wchan, struct lock_obje sq = td->td_sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; + sq->sq_type = flags & SLEEPQ_TYPE; } else { MPASS(wchan == sq->sq_wchan); MPASS(lock == sq->sq_lock); @@ -669,6 +669,28 @@ sleepq_timedwait_sig(void *wchan, int pr } /* + * Returns the type of sleepqueue given a waitchannel. + */ +int +sleepq_type(void *wchan) +{ + struct sleepqueue *sq; + int type; + + MPASS(wchan != NULL); + + sleepq_lock(wchan); + sq = sleepq_lookup(wchan); + if (sq == NULL) { + sleepq_release(wchan); + return (-1); + } + type = sq->sq_type; + sleepq_release(wchan); + return (type); +} + +/* * Removes a thread from a sleep queue and makes it * runnable. */ @@ -1176,8 +1198,8 @@ DB_SHOW_COMMAND(sleepq, db_show_sleepque return; found: db_printf("Wait channel: %p\n", sq->sq_wchan); -#ifdef INVARIANTS db_printf("Queue type: %d\n", sq->sq_type); +#ifdef INVARIANTS if (sq->sq_lock) { lock = sq->sq_lock; db_printf("Associated Interlock: %p - (%s) %s\n", lock, Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/kern/subr_turnstile.c Sat Jan 9 01:46:38 2010 (r201879) @@ -733,6 +733,7 @@ turnstile_wait(struct turnstile *ts, str td->td_tsqueue = queue; td->td_blocked = ts; td->td_lockname = lock->lo_name; + td->td_blktick = ticks; TD_SET_LOCK(td); mtx_unlock_spin(&tc->tc_lock); propagate_priority(td); @@ -925,6 +926,7 @@ turnstile_unpend(struct turnstile *ts, i MPASS(TD_CAN_RUN(td)); td->td_blocked = NULL; td->td_lockname = NULL; + td->td_blktick = 0; #ifdef INVARIANTS td->td_tsqueue = 0xff; #endif Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/sys/proc.h Sat Jan 9 01:46:38 2010 (r201879) @@ -218,6 +218,7 @@ struct thread { struct ucred *td_ucred; /* (k) Reference to credentials. */ u_int td_estcpu; /* (t) estimated cpu utilization */ int td_slptick; /* (t) Time at sleep. */ + int td_blktick; /* (t) Time spent blocked. */ struct rusage td_ru; /* (t) rusage information */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */ Modified: head/sys/sys/sleepqueue.h ============================================================================== --- head/sys/sys/sleepqueue.h Sat Jan 9 01:20:01 2010 (r201878) +++ head/sys/sys/sleepqueue.h Sat Jan 9 01:46:38 2010 (r201879) @@ -112,6 +112,7 @@ void sleepq_set_timeout(void *wchan, int u_int sleepq_sleepcnt(void *wchan, int queue); int sleepq_timedwait(void *wchan, int pri); int sleepq_timedwait_sig(void *wchan, int pri); +int sleepq_type(void *wchan); void sleepq_wait(void *wchan, int pri); int sleepq_wait_sig(void *wchan, int pri); From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 04:00:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFEE4106566B; Sat, 9 Jan 2010 04:00:22 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADEFA8FC08; Sat, 9 Jan 2010 04:00:22 +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 o0940M8Y086235; Sat, 9 Jan 2010 04:00:22 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0940MPm086232; Sat, 9 Jan 2010 04:00:22 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201001090400.o0940MPm086232@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 9 Jan 2010 04:00:22 +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: r201882 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 04:00:22 -0000 Author: keramida (doc committer) Date: Sat Jan 9 04:00:22 2010 New Revision: 201882 URL: http://svn.freebsd.org/changeset/base/201882 Log: Revert iwn channel-argument handling of set_txpower() to r201822 Pass the channel argument as a real argument and not through RXON. The RXON version seems to have problem with both the older 228.57.2.23 firmware and the latest 228.61.2.24 version resulting in device initialization errors like: wpa_supplicant[2928]: Failed to initiate AP scan. kernel: firmware error log: kernel: error type = "SYSASSERT" (0x00000005) kernel: program counter = 0x0000147C kernel: source line = 0x0000058B kernel: error data = 0x0000058B00000000 kernel: branch link = 0x0000145A00001492 kernel: interrupt link = 0x000006DE00000000 kernel: time = 7310 ... kernel: iwn0: iwn_config: could not set TX power kernel: iwn0: iwn_init_locked: could not configure device, error 35 By passing the current channel to hal->set_txpower() the firmware error is fixed, at least for the 4965 chipset of my Thinkpad and the ones tested by Bernhard. Submitted by: Bernhard Schmidt Approved by: rpaulo Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Jan 9 03:08:22 2010 (r201881) +++ head/sys/dev/iwn/if_iwn.c Sat Jan 9 04:00:22 2010 (r201882) @@ -171,8 +171,10 @@ void iwn_set_led(struct iwn_softc *, ui int iwn_set_critical_temp(struct iwn_softc *); int iwn_set_timing(struct iwn_softc *, struct ieee80211_node *); void iwn4965_power_calibration(struct iwn_softc *, int); -int iwn4965_set_txpower(struct iwn_softc *, int); -int iwn5000_set_txpower(struct iwn_softc *, int); +int iwn4965_set_txpower(struct iwn_softc *, + struct ieee80211_channel *, int); +int iwn5000_set_txpower(struct iwn_softc *, + struct ieee80211_channel *, int); int iwn4965_get_rssi(struct iwn_softc *, struct iwn_rx_stat *); int iwn5000_get_rssi(struct iwn_softc *, struct iwn_rx_stat *); int iwn_get_noise(const struct iwn_rx_general_stats *); @@ -3694,13 +3696,16 @@ iwn_set_timing(struct iwn_softc *sc, str void iwn4965_power_calibration(struct iwn_softc *sc, int temp) { + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + /* Adjust TX power if need be (delta >= 3 degC.) */ DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: temperature %d->%d\n", __func__, sc->temp, temp); if (abs(temp - sc->temp) >= 3) { /* Record temperature of last calibration. */ sc->temp = temp; - (void)iwn4965_set_txpower(sc, 1); + (void)iwn4965_set_txpower(sc, ic->ic_bsschan, 1); } } @@ -3710,7 +3715,8 @@ iwn4965_power_calibration(struct iwn_sof * the current temperature and the current voltage. */ int -iwn4965_set_txpower(struct iwn_softc *sc, int async) +iwn4965_set_txpower(struct iwn_softc *sc, struct ieee80211_channel *ch, + int async) { /* Fixed-point arithmetic division using a n-bit fractional part. */ #define fdivround(a, b, n) \ @@ -3723,7 +3729,6 @@ iwn4965_set_txpower(struct iwn_softc *sc struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; struct iwn_ucode_info *uc = &sc->ucode_info; - struct ieee80211_channel *ch; struct iwn4965_cmd_txpower cmd; struct iwn4965_eeprom_chan_samples *chans; int32_t vdiff, tdiff; @@ -3731,11 +3736,10 @@ iwn4965_set_txpower(struct iwn_softc *sc const uint8_t *rf_gain, *dsp_gain; uint8_t chan; - /* Retrieve current channel from last RXON. */ - chan = sc->rxon.chan; + /* Retrieve channel number. */ + chan = ieee80211_chan2ieee(ic, ch); DPRINTF(sc, IWN_DEBUG_RESET, "setting TX power for channel %d\n", chan); - ch = &ic->ic_channels[chan]; memset(&cmd, 0, sizeof cmd); cmd.band = IEEE80211_IS_CHAN_5GHZ(ch) ? 0 : 1; @@ -3863,7 +3867,8 @@ iwn4965_set_txpower(struct iwn_softc *sc } int -iwn5000_set_txpower(struct iwn_softc *sc, int async) +iwn5000_set_txpower(struct iwn_softc *sc, struct ieee80211_channel *ch, + int async) { struct iwn5000_cmd_txpower cmd; @@ -4519,7 +4524,7 @@ iwn_config(struct iwn_softc *sc) } /* Configuration has changed, set TX power accordingly. */ - error = hal->set_txpower(sc, 0); + error = hal->set_txpower(sc, ic->ic_curchan, 0); if (error != 0) { device_printf(sc->sc_dev, "%s: could not set TX power\n", __func__); @@ -4765,7 +4770,7 @@ iwn_auth(struct iwn_softc *sc, struct ie } /* Configuration has changed, set TX power accordingly. */ - error = hal->set_txpower(sc, 1); + error = hal->set_txpower(sc, ni->ni_chan, 1); if (error != 0) { device_printf(sc->sc_dev, "%s: could not set Tx power, error %d\n", __func__, error); @@ -4882,7 +4887,7 @@ iwn_run(struct iwn_softc *sc, struct iee /* Configuration has changed, set TX power accordingly. */ - error = hal->set_txpower(sc, 1); + error = hal->set_txpower(sc, ni->ni_chan, 1); if (error != 0) { device_printf(sc->sc_dev, "%s: could not set Tx power, error %d\n", __func__, error); Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Sat Jan 9 03:08:22 2010 (r201881) +++ head/sys/dev/iwn/if_iwnvar.h Sat Jan 9 04:00:22 2010 (r201882) @@ -166,7 +166,8 @@ struct iwn_hal { uint16_t); int (*get_temperature)(struct iwn_softc *); int (*get_rssi)(struct iwn_softc *, struct iwn_rx_stat *); - int (*set_txpower)(struct iwn_softc *, int); + int (*set_txpower)(struct iwn_softc *, + struct ieee80211_channel *, int); int (*init_gains)(struct iwn_softc *); int (*set_gains)(struct iwn_softc *); int (*add_node)(struct iwn_softc *, struct iwn_node_info *, From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 04:36:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75B63106566C; Sat, 9 Jan 2010 04:36:49 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 7ADAE8FC0C; Sat, 9 Jan 2010 04:36:48 +0000 (UTC) Received: by fxm27 with SMTP id 27so5260228fxm.3 for ; Fri, 08 Jan 2010 20:36:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=dNQJbjJ6odeFu79IlS6zfXOo1B3VOnZF3TZkfyWDq+M=; b=wMpAinf6C0qzKGVZrLDdBQhmWKf9vROB3iXo0Ra/j9YcJNNJhaPVr5R+AQynN0QdLQ rVQ0q+IXDksCYuWKsSLGczo+fNAaNuP6heC+dc6oRp4yx7/ggQ836fy/8akyOx5uTVLX xCIDl4klndW81swbow8EMhfB6B0jCIvjV1OgA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=vpGtk0nRU+/vOBQ0CfSDyxiBnb3Y0GRVGXRBxL5leEMu3Nogez9/yITssrXyjlw0IW foIHnePi9iL1viynyJFZETrI9uao3UlK10X28zFci59vQ4dAJFt7oQobu36R3pPfUUU2 o7EZWBREeteXGKq7H54NjgEEC9NBl6sHNbdks= MIME-Version: 1.0 Received: by 10.239.185.132 with SMTP id c4mr611517hbh.20.1263011796599; Fri, 08 Jan 2010 20:36:36 -0800 (PST) In-Reply-To: <4B477CBE.6090000@FreeBSD.org> References: <201001040916.o049GZ1Y013061@svn.freebsd.org> <4B4384E3.2080600@FreeBSD.org> <867hrvgw2j.fsf@ds4.des.no> <4B46CFE8.8000501@FreeBSD.org> <4B477CBE.6090000@FreeBSD.org> Date: Sat, 9 Jan 2010 02:36:36 -0200 Message-ID: From: "Carlos A. M. dos Santos" To: Doug Barton 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: r201477 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 04:36:49 -0000 On Fri, Jan 8, 2010 at 4:43 PM, Doug Barton wrote: > Carlos A. M. dos Santos wrote: [...] >> Five to ten years from now that quotation will >> be just history, like the ones from/about JFK, Richard Nixon, and >> Spiro Agnew. > > Actually there are several things in the main fortunes file that I > find offensive related to political stuff of the 60's and 70's > (although not for the reasons that I think most people would find them > offensive). Note, I am not however suggesting that we do a wholesale > move of potentially offensive stuff. Have somebody *ever* complained about this? Is there any PR asking that offensive stuff be removed from the default fortunes file? If not, you are overzealously attempting to solve a non-existing problem. >> Are you whiling to apply such rule to all supposedly >> political fortunes? > > My very first post on this was, "Anything that may offend someone > belongs in fortunes-o, and all political commentary belongs in this > category." All business is based on the mutual trust of one of the parts. -- Poul Henningsen [1894-1967] Verdict: offensive to businessmen Women are always anxious to urge bachelors to matrimony; is it from charity, or revenge? -- Gustave Vapereau Verdict: sexist It's the same old story; boy meets beer, boy drinks beer... boy gets another beer. -- Cheers Verdict: offensive to young men (and to alcoholics) It's amazing how much "mature wisdom" resembles being too tired. Verdict: offensive to elders There is not much to choose between a woman who deceives us for another, and a woman who deceives another for ourselves. -- Augier Verdict: sexist Home is the place where, when you have to go there, they have to take you in. -- Robert Frost, "The Death of the Hired Man" Verdict: offensive to the concepts of family and home And so on. > FWIW, while I am definitely in favor of treating all people with > courtesy and respect, =A0I am just about as > anti-mindless-political-correctness as you can possibly be. In fact, > in both my .bashrc and my xscreensaver config I use fortune -a because > as much as some of the things in there offend me, I find it refreshing > to be challenged by other viewpoints. OTOH, I am also in favor of us > building a professional-quality operating system, and while I actually > _voiced_ my objection to the removal of > "die_you_gravy_sucking_pig_dog" because that is not something that is > user-visible Fortune is also not visible unless explicitly invoked by the user. It is not invoked by the default /etc/csh.cshrc, /etc/csh.login or /etc/profile. Moreover, the skeleton .login and .profile files, in /usr/src/share/skel, invoke "fortune freebsd-tips", which is pretty much harmless. > I think that if we SAY there is a distinction between > fortunes and fortunes-o that we ought to follow through on that. Too late. See the verdicts above. And you are aiming an impossible goal. People can feel offended by almost anything. > Putting something that we know could (and almost certainly will) be > found offensive in the fortunes file because WE are smarter and more > sophisticated than those fools who would be offended by it is > childish, foolish, and unprofessional. The only possible solution would be creating a custom BSD, the "Boring Software Distribution": # cd /usr/src # echo WITHOUT_GAMES=3D1 >> /etc/src.conf # make love (yes, FreeBSD's make knows how to make love!) # make buildworld # ... > =A0 =A0 =A0 =A0Computers are useless. They can only give you answers. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Pablo Picasso As a computer scientist and software developer, I feel irremediably offended by this quotation. ;-) --=20 My preferred quotation of Robert Louis Stevenson is "You cannot make an omelette without breaking eggs". Not because I like the omelettes, but because I like the sound of eggs being broken. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 04:59:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A9B1065676; Sat, 9 Jan 2010 04:59:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460408FC12; Sat, 9 Jan 2010 04:59:58 +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 o094xwwD099436; Sat, 9 Jan 2010 04:59:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o094xwH1099434; Sat, 9 Jan 2010 04:59:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001090459.o094xwH1099434@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 04:59: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: r201883 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 04:59:58 -0000 Author: imp Date: Sat Jan 9 04:59:57 2010 New Revision: 201883 URL: http://svn.freebsd.org/changeset/base/201883 Log: Merge r195128 from project/mips to head. r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines - Add support for handling TLS area address in kernel space. From the userland point of view get/set operations are performed using sysarch(2) call. Modified: head/sys/mips/include/sysarch.h Modified: head/sys/mips/include/sysarch.h ============================================================================== --- head/sys/mips/include/sysarch.h Sat Jan 9 04:00:22 2010 (r201882) +++ head/sys/mips/include/sysarch.h Sat Jan 9 04:59:57 2010 (r201883) @@ -35,16 +35,12 @@ #ifndef _MACHINE_SYSARCH_H_ #define _MACHINE_SYSARCH_H_ +#define MIPS_SET_TLS 1 +#define MIPS_GET_TLS 2 + #ifndef _KERNEL #include -#if 0 -/* Something useful for each MIPS platform. */ -#else -#define mips_tcb_set(tcb) do {} while (0) -#define mips_tcb_get() NULL -#endif /* _MIPS_ARCH_XLR */ - __BEGIN_DECLS int sysarch(int, void *); __END_DECLS From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 05:40:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6AC01065676; Sat, 9 Jan 2010 05:40:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA228FC0A; Sat, 9 Jan 2010 05:40:46 +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 o095ek0o008551; Sat, 9 Jan 2010 05:40:46 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o095ekeT008548; Sat, 9 Jan 2010 05:40:46 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001090540.o095ekeT008548@svn.freebsd.org> From: David Xu Date: Sat, 9 Jan 2010 05:40: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: r201884 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 05:40:46 -0000 Author: davidxu Date: Sat Jan 9 05:40:46 2010 New Revision: 201884 URL: http://svn.freebsd.org/changeset/base/201884 Log: Update manual for sem_init and sem_open, restrictions of shared semaphore and 14 characters in name length no longer exist. Reviewed by: deischen@ Modified: head/lib/libc/gen/sem_init.3 head/lib/libc/gen/sem_open.3 Modified: head/lib/libc/gen/sem_init.3 ============================================================================== --- head/lib/libc/gen/sem_init.3 Sat Jan 9 04:59:57 2010 (r201883) +++ head/lib/libc/gen/sem_init.3 Sat Jan 9 05:40:46 2010 (r201884) @@ -46,9 +46,19 @@ function initializes the unnamed semapho .Fa sem to have the value .Fa value . +.Pp A non-zero value for .Fa pshared -specifies a shared semaphore that can be used by multiple processes. +specifies a shared semaphore that can be used by multiple processes, +the semaphore should be located in shared memory region (see +.Xr mmap 2 , +.Xr shm_open 2 , +and +.Xr shmget 2 ) , +any process having read and write access to address +.Fa sem +can perform semaphore operations on +.Fa sem . .Pp Following a successful call to .Fn sem_init , Modified: head/lib/libc/gen/sem_open.3 ============================================================================== --- head/lib/libc/gen/sem_open.3 Sat Jan 9 04:59:57 2010 (r201883) +++ head/lib/libc/gen/sem_open.3 Sat Jan 9 05:40:46 2010 (r201884) @@ -58,6 +58,12 @@ The returned semaphore may be used in su and .Fn sem_close . .Pp +This implementation places strict requirements on the value of +.Fa name : +it must begin with a slash +.Pq Ql / , +contain no other slash characters. +.Pp The following bits may be set in the .Fa oflag argument: @@ -217,11 +223,3 @@ functions conform to .Sh HISTORY Support for named semaphores first appeared in .Fx 5.0 . -.Sh BUGS -This implementation places strict requirements on the value of -.Fa name : -it must begin with a slash -.Pq Ql / , -contain no other slash characters, -and be less than 14 characters in length -not including the terminating null character. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 06:05:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6864106566C; Sat, 9 Jan 2010 06:05:31 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95E9F8FC0C; Sat, 9 Jan 2010 06:05:31 +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 o0965Vto013972; Sat, 9 Jan 2010 06:05:31 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0965Vr8013970; Sat, 9 Jan 2010 06:05:31 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001090605.o0965Vr8013970@svn.freebsd.org> From: David Xu Date: Sat, 9 Jan 2010 06:05: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: r201885 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 06:05:31 -0000 Author: davidxu Date: Sat Jan 9 06:05:31 2010 New Revision: 201885 URL: http://svn.freebsd.org/changeset/base/201885 Log: Add key type TYPE_SEM. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Jan 9 05:40:46 2010 (r201884) +++ head/sys/kern/kern_umtx.c Sat Jan 9 06:05:31 2010 (r201885) @@ -59,12 +59,13 @@ __FBSDID("$FreeBSD$"); #endif #define TYPE_SIMPLE_WAIT 0 -#define TYPE_CV 1 -#define TYPE_SIMPLE_LOCK 2 -#define TYPE_NORMAL_UMUTEX 3 -#define TYPE_PI_UMUTEX 4 -#define TYPE_PP_UMUTEX 5 -#define TYPE_RWLOCK 6 +#define TYPE_CV (TYPE_SIMPLE_WAIT+1) +#define TYPE_SEM (TYPE_CV+1) +#define TYPE_SIMPLE_LOCK (TYPE_SEM+1) +#define TYPE_NORMAL_UMUTEX (TYPE_SIMPLE_LOCK+1) +#define TYPE_PI_UMUTEX (TYPE_NORMAL_UMUTEX+1) +#define TYPE_PP_UMUTEX (TYPE_PI_UMUTEX+1) +#define TYPE_RWLOCK (TYPE_PP_UMUTEX+1) #define _UMUTEX_TRY 1 #define _UMUTEX_WAIT 2 @@ -2770,7 +2771,7 @@ do_sem_wait(struct thread *td, struct _u uq = td->td_umtxq; flags = fuword32(&sem->_flags); - error = umtx_key_get(sem, TYPE_CV, GET_SHARE(flags), &uq->uq_key); + error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), &uq->uq_key); if (error != 0) return (error); umtxq_lock(&uq->uq_key); @@ -2845,7 +2846,7 @@ do_sem_wake(struct thread *td, struct _u uint32_t flags; flags = fuword32(&sem->_flags); - if ((error = umtx_key_get(sem, TYPE_CV, GET_SHARE(flags), &key)) != 0) + if ((error = umtx_key_get(sem, TYPE_SEM, GET_SHARE(flags), &key)) != 0) return (error); umtxq_lock(&key); umtxq_busy(&key); From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 06:12:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB3A01065692; Sat, 9 Jan 2010 06:12:44 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A5D28FC0A; Sat, 9 Jan 2010 06:12:44 +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 o096Cihf015553; Sat, 9 Jan 2010 06:12:44 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o096CiZG015551; Sat, 9 Jan 2010 06:12:44 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001090612.o096CiZG015551@svn.freebsd.org> From: David Xu Date: Sat, 9 Jan 2010 06:12: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: r201886 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 06:12:44 -0000 Author: davidxu Date: Sat Jan 9 06:12:44 2010 New Revision: 201886 URL: http://svn.freebsd.org/changeset/base/201886 Log: put semaphore waiter in long term list. Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Jan 9 06:05:31 2010 (r201885) +++ head/sys/kern/kern_umtx.c Sat Jan 9 06:12:44 2010 (r201886) @@ -292,7 +292,7 @@ umtx_key_match(const struct umtx_key *k1 static inline struct umtxq_chain * umtxq_getchain(struct umtx_key *key) { - if (key->type <= TYPE_CV) + if (key->type <= TYPE_SEM) return (&umtxq_chains[1][key->hash]); return (&umtxq_chains[0][key->hash]); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 06:14:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9131910656A6; Sat, 9 Jan 2010 06:14:48 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4EA8FC15; Sat, 9 Jan 2010 06:14:48 +0000 (UTC) Received: by pxi12 with SMTP id 12so13486188pxi.3 for ; Fri, 08 Jan 2010 22:14:29 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.142.1.27 with SMTP id 27mr3125721wfa.33.1263017669057; Fri, 08 Jan 2010 22:14:29 -0800 (PST) In-Reply-To: <201001090605.o0965Vr8013970@svn.freebsd.org> References: <201001090605.o0965Vr8013970@svn.freebsd.org> From: Juli Mallett Date: Fri, 8 Jan 2010 22:14:09 -0800 X-Google-Sender-Auth: 932e51e83bb5edef Message-ID: To: David Xu 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: r201885 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 06:14:48 -0000 On Fri, Jan 8, 2010 at 22:05, David Xu wrote: > #define TYPE_SIMPLE_WAIT 0 > -#define TYPE_CV 1 > -#define TYPE_SIMPLE_LOCK 2 > -#define TYPE_NORMAL_UMUTEX 3 > -#define TYPE_PI_UMUTEX 4 > -#define TYPE_PP_UMUTEX 5 > -#define TYPE_RWLOCK 6 > +#define TYPE_CV (TYPE_SIMPLE_WAIT+1) > +#define TYPE_SEM (TYPE_CV+1) > +#define TYPE_SIMPLE_LOCK (TYPE_SEM+1) > +#define TYPE_NORMAL_UMUTEX (TYPE_SIMPLE_LOCK+1) > +#define TYPE_PI_UMUTEX (TYPE_NORMAL_UMUTEX+1) > +#define TYPE_PP_UMUTEX (TYPE_PI_UMUTEX+1) > +#define TYPE_RWLOCK (TYPE_PP_UMUTEX+1) > I am not sure I get the benefit of defining them this way. Certainly it does nothing to improve stability in the face of additions, removals or re-sorting (in the latter case, it makes figuring out how to define a new one exceptionally hard.) I am not aware of a trend towards defining constants this way in the kernel (there are none in sys/ that I see) and find it kind of baffling and needlessly obtuse. If there is a need to define them in such an unusual manner, it would be nice to see a comment that says why. If you don't need to use #defines and have a dislike assigning numbers by hand, why not simply use 'enum'? From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 06:30:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D63AF106566B; Sat, 9 Jan 2010 06:30:40 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5F998FC12; Sat, 9 Jan 2010 06:30:40 +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 o096Ue1M019504; Sat, 9 Jan 2010 06:30:40 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o096UeOT019502; Sat, 9 Jan 2010 06:30:40 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001090630.o096UeOT019502@svn.freebsd.org> From: David Xu Date: Sat, 9 Jan 2010 06:30: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: r201887 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 06:30:40 -0000 Author: davidxu Date: Sat Jan 9 06:30:40 2010 New Revision: 201887 URL: http://svn.freebsd.org/changeset/base/201887 Log: Use enum to define key types. Suggested by: jmallett Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Jan 9 06:12:44 2010 (r201886) +++ head/sys/kern/kern_umtx.c Sat Jan 9 06:30:40 2010 (r201887) @@ -58,14 +58,16 @@ __FBSDID("$FreeBSD$"); #include #endif -#define TYPE_SIMPLE_WAIT 0 -#define TYPE_CV (TYPE_SIMPLE_WAIT+1) -#define TYPE_SEM (TYPE_CV+1) -#define TYPE_SIMPLE_LOCK (TYPE_SEM+1) -#define TYPE_NORMAL_UMUTEX (TYPE_SIMPLE_LOCK+1) -#define TYPE_PI_UMUTEX (TYPE_NORMAL_UMUTEX+1) -#define TYPE_PP_UMUTEX (TYPE_PI_UMUTEX+1) -#define TYPE_RWLOCK (TYPE_PP_UMUTEX+1) +enum { + TYPE_SIMPLE_WAIT, + TYPE_CV, + TYPE_SEM, + TYPE_SIMPLE_LOCK, + TYPE_NORMAL_UMUTEX, + TYPE_PI_UMUTEX, + TYPE_PP_UMUTEX, + TYPE_RWLOCK +}; #define _UMUTEX_TRY 1 #define _UMUTEX_WAIT 2 From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 07:45:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C0C1065670; Sat, 9 Jan 2010 07:45:10 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by mx1.freebsd.org (Postfix) with ESMTP id 4AC988FC13; Sat, 9 Jan 2010 07:45:09 +0000 (UTC) Received: by ewy5 with SMTP id 5so8814822ewy.14 for ; Fri, 08 Jan 2010 23:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=uC8beMhbuB7ZObAcY/BGmDEA4tjjp9qI3HlgelK2bX8=; b=A9vJOpMSRmA69PYbgdqQafV2rT4JK7zeRzErgD/QeQdS/U3VHOa20htAZiwmesF+YQ Rq2qR4FXRu6ceKLJzbpCdw9T6yarc+1zNCyNRgEp3/Zi47OGveapUNXGQQfZIsVs5Ftd QbTZU7pbaqCWKljnPh8MFOCNEskZJHVmfIDhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=wFG7p5DSIayrWDu+iPraoVed6zr1MubqgpSP6z9EfCYu09T0Egod13mwZyBbdw8qz2 RwhYGCzK3/cYZ3hBjPwleFGv3rXfwmQEd7vEHafNMLwdB2lwcGHofnjSNhdu70SM2LgO UA0zQshbXS96IxXItdsyV99eTdc1iBfOk8uPE= Received: by 10.213.0.151 with SMTP id 23mr424398ebb.43.1263023101363; Fri, 08 Jan 2010 23:45:01 -0800 (PST) Received: from localhost (lan-78-157-90-54.vln.skynet.lt [78.157.90.54]) by mx.google.com with ESMTPS id 13sm2227517ewy.9.2010.01.08.23.45.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 08 Jan 2010 23:45:00 -0800 (PST) Date: Sat, 9 Jan 2010 09:44:48 +0200 From: Gleb Kurtsou To: Jaakko Heinonen Message-ID: <20100109074448.GA1865@tops.skynet.lt> References: <201001080757.o087vhrr009799@svn.freebsd.org> <20100109051536.R57595@delplex.bde.org> <20100108214821.GA985@a91-153-117-195.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20100108214821.GA985@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r201773 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 07:45:10 -0000 On (08/01/2010 23:48), Jaakko Heinonen wrote: > > Thank you for looking at this. > > On 2010-01-09, Bruce Evans wrote: > > The current incorrect way is to use %d. Since ino_t happens to have > > type uint32_t and u_int happens to have type uint32_t on all supported > > machines, %u would work but %d gives undefined behaviour when the > > value exceeds INT_MAX. > > > > The simplest fix is to use u_int and %u. > > > > > + u_quad_t size_max; There is also kern/138367 which tries to address the same issue, although in a bit different way. It also introduces maximum file size, fixes possible nodes and pages overflows. Thanks, Gleb > > Even larger indentation error, as above. > > Does following patch look reasonable? > > - Fix style bugs introduced in r201773. > - Change the type of nodes_max to u_int and use "%u" format string to > convert its value. > > %%% > Index: sys/fs/tmpfs/tmpfs_vfsops.c > =================================================================== > --- sys/fs/tmpfs/tmpfs_vfsops.c (revision 201818) > +++ sys/fs/tmpfs/tmpfs_vfsops.c (working copy) > @@ -185,8 +185,8 @@ tmpfs_mount(struct mount *mp) > ino_t nodes; > int error; > /* Size counters. */ > - ino_t nodes_max; > - u_quad_t size_max; > + u_int nodes_max; > + u_quad_t size_max; > > /* Root node attributes. */ > uid_t root_uid; > @@ -223,7 +223,7 @@ tmpfs_mount(struct mount *mp) > if (mp->mnt_cred->cr_ruid != 0 || > vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) > root_mode = va.va_mode; > - if (vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) > + if (vfs_scanopt(mp->mnt_optnew, "inodes", "%u", &nodes_max) != 1) > nodes_max = 0; > if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) > size_max = 0; > @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) > * allowed to use, based on the maximum size the user passed in > * the mount structure. A value of zero is treated as if the > * maximum available space was requested. */ > - if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE)) > + if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE) > pages = SIZE_MAX; > else > pages = howmany(size_max, PAGE_SIZE); > %%% > > -- > Jaakko > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 09:30:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40E44106566C; Sat, 9 Jan 2010 09:30:10 +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 301548FC08; Sat, 9 Jan 2010 09:30:10 +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 o099UAMe058860; Sat, 9 Jan 2010 09:30:10 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o099UATp058858; Sat, 9 Jan 2010 09:30:10 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001090930.o099UATp058858@svn.freebsd.org> From: Christian Brueffer Date: Sat, 9 Jan 2010 09:30: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: r201888 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 09:30:10 -0000 Author: brueffer Date: Sat Jan 9 09:30:09 2010 New Revision: 201888 URL: http://svn.freebsd.org/changeset/base/201888 Log: bridge(4) acts like a switch, not like a hub. PR: 141350 Submitted by: brucec Reviewed by: thompsa MFC after: 1 week Modified: head/share/man/man4/bridge.4 Modified: head/share/man/man4/bridge.4 ============================================================================== --- head/share/man/man4/bridge.4 Sat Jan 9 06:30:40 2010 (r201887) +++ head/share/man/man4/bridge.4 Sat Jan 9 09:30:09 2010 (r201888) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2009 +.Dd January 9, 2010 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -111,7 +111,7 @@ by-default. A bridge can be used to provide several services, such as a simple 802.11-to-Ethernet bridge for wireless hosts, and traffic isolation. .Pp -A bridge works like a hub, forwarding traffic from one interface +A bridge works like a switch, forwarding traffic from one interface to another. Multicast and broadcast packets are always forwarded to all interfaces that are part of the bridge. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 10:24:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CAF41065692; Sat, 9 Jan 2010 10:24:09 +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 6A9F48FC12; Sat, 9 Jan 2010 10:24:09 +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 o09AO94u072586; Sat, 9 Jan 2010 10:24:09 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09AO9HR072584; Sat, 9 Jan 2010 10:24:09 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001091024.o09AO9HR072584@svn.freebsd.org> From: Christian Brueffer Date: Sat, 9 Jan 2010 10:24: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: r201889 - head/usr.sbin/faithd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 10:24:09 -0000 Author: brueffer Date: Sat Jan 9 10:24:09 2010 New Revision: 201889 URL: http://svn.freebsd.org/changeset/base/201889 Log: Various language fixes. Also fixed the URL to totd, obtained from NetBSD. PR: 38061 Submitted by: Chris Pepper MFC after: 1 week Modified: head/usr.sbin/faithd/faithd.8 Modified: head/usr.sbin/faithd/faithd.8 ============================================================================== --- head/usr.sbin/faithd/faithd.8 Sat Jan 9 09:30:09 2010 (r201888) +++ head/usr.sbin/faithd/faithd.8 Sat Jan 9 10:24:09 2010 (r201889) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 1998 +.Dd January 9, 2010 .Dt FAITHD 8 .Os .Sh NAME @@ -44,20 +44,18 @@ .Sh DESCRIPTION The .Nm -utility provides IPv6-to-IPv4 TCP relay. -It must be used on an IPv4/v6 dual stack router. +utility provides IPv6-to-IPv4 TCP relaying. +It can only be used on an IPv4/v6 dual stack router. .Pp When .Nm receives .Tn TCPv6 -traffic, -.Nm -will relay the +traffic, it will relay the .Tn TCPv6 traffic to .Tn TCPv4 . -Destination for relayed +The destination for the relayed .Tn TCPv4 connection will be determined by the last 4 octets of the original .Tn IPv6 @@ -73,14 +71,14 @@ destination address is the traffic will be relayed to IPv4 destination .Li 10.1.1.1 . .Pp -To use +To use the .Nm translation service, an IPv6 address prefix must be reserved for mapping IPv4 addresses into. -Kernel must be properly configured to route all the TCP connection +The kernel must be properly configured to route all the TCP connections toward the reserved IPv6 address prefix into the .Xr faith 4 -pseudo interface, by using +pseudo interface, using the .Xr route 8 command. Also, @@ -91,7 +89,7 @@ to .Dv 1 . .Pp The router must be configured to capture all the TCP traffic -toward reserved +for the reserved .Tn IPv6 address prefix, by using .Xr route 8 @@ -101,21 +99,20 @@ commands. .Pp The .Nm -utility needs a special name-to-address translation logic, so that -hostnames gets resolved into special +utility needs special name-to-address translation logic, so that +hostnames get resolved into the special .Tn IPv6 address prefix. -For small-scale installation, use -.Xr hosts 5 . -For large-scale installation, it is useful to have +For small-scale installations, use +.Xr hosts 5 ; +For large-scale installations, it is useful to have a DNS server with special address translation support. An implementation called .Nm totd -is available -at -.Pa http://www.vermicelli.pasta.cs.uit.no/ipv6/software.html . -Make sure you do not propagate translated DNS records to normal DNS cloud, -it is highly harmful. +is available at +.Pa http://www.vermicelli.pasta.cs.uit.no/software/totd.html . +Make sure you do not propagate translated DNS records over to normal +DNS, as it can cause severe problems. .Ss Daemon mode When .Nm @@ -150,9 +147,9 @@ to you can run local daemons on the router. The .Nm -utility will invoke local daemon at +utility will invoke a local daemon at .Ar serverpath -if the destination address is local interface address, +if the destination address is a local interface address, and will perform translation to IPv4 TCP in other cases. You can also specify .Ar serverargs @@ -182,7 +179,7 @@ The .Nm utility includes special support for protocols used by .Xr ftp 1 . -When translating FTP protocol, +When translating the FTP protocol, .Nm translates network level addresses in .Li PORT/LPRT/EPRT @@ -191,8 +188,8 @@ and commands. .Pp Inactive sessions will be disconnected in 30 minutes, -to avoid stale sessions from chewing up resources. -This may be inappropriate for some of the services +to prevent stale sessions from chewing up resources. +This may be inappropriate for some services (should this be configurable?). .Ss inetd mode When @@ -200,13 +197,13 @@ When is invoked via .Xr inetd 8 , .Nm -will handle connection passed from standard input. +will handle connections passed from standard input. If the connection endpoint is in the reserved IPv6 address prefix, .Nm will relay the connection. Otherwise, .Nm -will invoke service-specific daemon like +will invoke a service-specific daemon like .Xr telnetd 8 , by using the command argument passed from .Xr inetd 8 . @@ -219,16 +216,16 @@ For example, if .Nm is invoked via .Xr inetd 8 -on FTP port, it will operate as a FTP relay. +on the FTP port, it will operate as an FTP relay. .Pp The operation mode requires special support for .Nm in .Xr inetd 8 . .Ss Access control -To prevent malicious accesses, +To prevent malicious access, .Nm -implements a simple address-based access control. +implements simple address-based access control. With .Pa /etc/faithd.conf (or @@ -239,7 +236,7 @@ specified by will avoid relaying unwanted traffic. The .Pa faithd.conf -contains directives with the following format: +configuration file contains directives of the following format: .Bl -bullet .It .Ar src Ns / Ns Ar slen Cm deny Ar dst Ns / Ns Ar dlen @@ -281,6 +278,7 @@ on error. .Sh EXAMPLES Before invoking .Nm , +the .Xr faith 4 interface has to be configured properly. .Bd -literal -offset @@ -334,12 +332,12 @@ ssh stream tcp6/faith nowait root .Ed .Pp .Xr inetd 8 -will open listening sockets with enabling kernel TCP relay support. -Whenever connection comes in, +will open listening sockets with kernel TCP relay support enabled. +Whenever a connection comes in, .Nm will be invoked by .Xr inetd 8 . -If it the connection endpoint is in the reserved IPv6 address prefix. +If the connection endpoint is in the reserved IPv6 address prefix. The .Nm utility will relay the connection. @@ -377,12 +375,12 @@ setting. .Sh HISTORY The .Nm -utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. +utility first appeared in the WIDE Hydrangea IPv6 protocol stack kit. .\" .Pp IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack was initially integrated into -.Fx 4.0 +.Fx 4.0 . .Sh SECURITY CONSIDERATIONS It is very insecure to use IP-address based authentication, for connections relayed by .Nm , @@ -392,16 +390,15 @@ Administrators are advised to limit acce .Nm using .Pa faithd.conf , -or by using IPv6 packet filters. -It is to protect +or by using IPv6 packet filters, to protect the .Nm -service from malicious parties and avoid theft of service/bandwidth. -IPv6 destination address can be limited by -carefully configuring routing entries that points to +service from malicious parties, and to avoid theft of service/bandwidth. +IPv6 destination addresses can be limited by +carefully configuring routing entries that point to .Xr faith 4 , using .Xr route 8 . -IPv6 source address needs to be filtered by using packet filters. -Documents listed in +The IPv6 source address needs to be filtered using packet filters. +The documents listed in .Sx SEE ALSO -have more discussions on this topic. +have more information on this topic. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 11:28:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C56D01065676; Sat, 9 Jan 2010 11:28: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 B47DE8FC12; Sat, 9 Jan 2010 11:28:01 +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 o09BS1CY086740; Sat, 9 Jan 2010 11:28:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09BS1MQ086738; Sat, 9 Jan 2010 11:28:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001091128.o09BS1MQ086738@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 9 Jan 2010 11:28: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: r201890 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 11:28:01 -0000 Author: kib Date: Sat Jan 9 11:28:01 2010 New Revision: 201890 URL: http://svn.freebsd.org/changeset/base/201890 Log: Set md_ldt (pointer to the LDT) after md_ldt_sd (system segment descriptor for the LDT) is populated. md_ldt is used by context-switch code as indicator that LDT segment register shall be loaded with GUSERLDT segment instead of 0, so context switch at the wrong time may cause attempt to load non-populated descriptor. Use store with the barrier to prevent other CPUs from seeing updated md_ldt but not seeing updated md_ldt_sd. Multithreaded process may context-switch to another thread of the process on another CPU and read md_ldt. MFC after: 1 week Modified: head/sys/amd64/amd64/sys_machdep.c Modified: head/sys/amd64/amd64/sys_machdep.c ============================================================================== --- head/sys/amd64/amd64/sys_machdep.c Sat Jan 9 10:24:09 2010 (r201889) +++ head/sys/amd64/amd64/sys_machdep.c Sat Jan 9 11:28:01 2010 (r201890) @@ -420,13 +420,14 @@ user_ldt_alloc(struct proc *p, int force return (pldt); } - mdp->md_ldt = new_ldt; if (pldt != NULL) { bcopy(pldt->ldt_base, new_ldt->ldt_base, max_ldt_segment * sizeof(struct user_segment_descriptor)); user_ldt_derefl(pldt); } ssdtosyssd(&sldt, &p->p_md.md_ldt_sd); + atomic_store_rel_ptr((volatile uintptr_t *)&mdp->md_ldt, + (uintptr_t)new_ldt); if (p == curproc) set_user_ldt(mdp); From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 12:31:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2A52106566B; Sat, 9 Jan 2010 12:31:11 +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 BF8BB8FC13; Sat, 9 Jan 2010 12:31: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 o09CVBrp000792; Sat, 9 Jan 2010 12:31:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09CVBKa000784; Sat, 9 Jan 2010 12:31:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001091231.o09CVBKa000784@svn.freebsd.org> From: Xin LI Date: Sat, 9 Jan 2010 12:31: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: r201892 - in head: lib/libc/sys share/man/man3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 12:31:11 -0000 Author: delphij Date: Sat Jan 9 12:31:11 2010 New Revision: 201892 URL: http://svn.freebsd.org/changeset/base/201892 Log: Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3). Reviewed by: davidxu MFC after: 2 weeks Added: head/share/man/man3/pthread_affinity_np.3 (contents, props changed) head/share/man/man3/pthread_attr_affinity_np.3 (contents, props changed) Modified: head/lib/libc/sys/cpuset.2 head/lib/libc/sys/cpuset_getaffinity.2 head/share/man/man3/Makefile head/share/man/man3/pthread.3 head/share/man/man3/pthread_attr.3 Modified: head/lib/libc/sys/cpuset.2 ============================================================================== --- head/lib/libc/sys/cpuset.2 Sat Jan 9 12:28:42 2010 (r201891) +++ head/lib/libc/sys/cpuset.2 Sat Jan 9 12:31:11 2010 (r201892) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 29, 2008 +.Dd January 8, 2010 .Dt CPUSET 2 .Os .Sh NAME @@ -216,7 +216,9 @@ for allocation. .Xr cpuset 1 , .Xr cpuset_getaffinity 2 , .Xr cpuset_setaffinity 2 , -.Xr CPU_SET 3 +.Xr CPU_SET 3 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 .Sh HISTORY The .Nm Modified: head/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- head/lib/libc/sys/cpuset_getaffinity.2 Sat Jan 9 12:28:42 2010 (r201891) +++ head/lib/libc/sys/cpuset_getaffinity.2 Sat Jan 9 12:31:11 2010 (r201892) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2008 +.Dd January 8, 2010 .Dt CPUSET 2 .Os .Sh NAME @@ -147,7 +147,9 @@ operation. .Xr cpuset 2 , .Xr cpuset_getid 2 , .Xr cpuset_setid 2 , -.Xr CPU_SET 3 +.Xr CPU_SET 3 , +.Xr pthread_affinity_np 3 , +.Xr pthread_attr_affinity_np 3 .Sh HISTORY The .Nm Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Sat Jan 9 12:28:42 2010 (r201891) +++ head/share/man/man3/Makefile Sat Jan 9 12:31:11 2010 (r201892) @@ -155,8 +155,10 @@ MLINKS+= tree.3 RB_EMPTY.3 \ .if ${MK_LIBTHR} != "no" PTHREAD_MAN= pthread.3 \ + pthread_affinity_np.3 \ pthread_atfork.3 \ pthread_attr.3 \ + pthread_attr_affinity_np.3 \ pthread_attr_get_np.3 \ pthread_attr_setcreatesuspend_np.3 \ pthread_barrierattr.3 \ @@ -218,7 +220,9 @@ PTHREAD_MAN= pthread.3 \ pthread_testcancel.3 \ pthread_yield.3 -PTHREAD_MLINKS= pthread_attr.3 pthread_attr_destroy.3 \ +PTHREAD_MLINKS= pthread_affinity_np.3 pthread_getaffinity_np.3 \ + pthread_affinity_np.3 pthread_setaffinity_np.3 +PTHREAD_MLINKS+=pthread_attr.3 pthread_attr_destroy.3 \ pthread_attr.3 pthread_attr_getdetachstate.3 \ pthread_attr.3 pthread_attr_getguardsize.3 \ pthread_attr.3 pthread_attr_getinheritsched.3 \ @@ -238,6 +242,8 @@ PTHREAD_MLINKS= pthread_attr.3 pthread_a pthread_attr.3 pthread_attr_setstack.3 \ pthread_attr.3 pthread_attr_setstackaddr.3 \ pthread_attr.3 pthread_attr_setstacksize.3 +PTHREAD_MLINKS+=pthread_attr_affinity_np.3 pthread_attr_getaffinity_np.3 \ + pthread_attr_affinity_np.3 pthread_attr_setaffinity_np.3 PTHREAD_MLINKS+=pthread_barrierattr.3 pthread_barrierattr_destroy.3 \ pthread_barrierattr.3 pthread_barrierattr_getpshared.3 \ pthread_barrierattr.3 pthread_barrierattr_init.3 \ Modified: head/share/man/man3/pthread.3 ============================================================================== --- head/share/man/man3/pthread.3 Sat Jan 9 12:28:42 2010 (r201891) +++ head/share/man/man3/pthread.3 Sat Jan 9 12:31:11 2010 (r201892) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2009 +.Dd January 8, 2010 .Dt PTHREAD 3 .Os .Sh NAME @@ -478,7 +478,9 @@ functions and the thread functions. Threaded applications are linked with this library. .Sh SEE ALSO .Xr libthr 3 , +.Xr pthread_affinity_np 3 , .Xr pthread_atfork 3 , +.Xr pthread_attr 3 , .Xr pthread_cancel 3 , .Xr pthread_cleanup_pop 3 , .Xr pthread_cleanup_push 3 , Added: head/share/man/man3/pthread_affinity_np.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man3/pthread_affinity_np.3 Sat Jan 9 12:31:11 2010 (r201892) @@ -0,0 +1,157 @@ +.\"- +.\" Copyright (c) 2010 Xin LI +.\" 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 January 8, 2010 +.Dt PTHREAD_AFFINITY_NP 3 +.Os +.Sh NAME +.Nm pthread_getaffinity_np , +.Nm pthread_setaffinity_np +.Nd manage CPU affinity +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft int +.Fn pthread_getaffinity_np "pthread_t td" "size_t cpusetsize" "cpuset_t *cpusetp" +.Ft int +.Fn pthread_setaffinity_np "pthread_t td" "size_t cpusetsize" "const cpuset_t *cpusetp" +.Sh DESCRIPTION +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +allow the manipulation of sets of CPUs available to specified thread. +.Pp +Masks of type +.Ft cpuset_t +are composed using the +.Xr CPU_SET 2 +macros. +The kernel tolerates large sets as long as all CPUs specified +in the set exist. +Sets smaller than the kernel uses generate an error on calls to +.Fn pthread_getaffinity_np +even if the result set would fit within the user supplied set. +Calls to +.Fn pthread_setaffinity_np +tolerate small sets with no restrictions. +.Pp +The supplied mask should have a size of +.Fa cpusetsize +bytes. +This size is usually provided by calling +.Li sizeof(cpuset_t) +which is ultimately determined by the value of +.Dv CPU_SETSIZE +as defined in +.In sys/cpuset.h . +.Pp +.Fn pthread_getaffinity_np +retrieves the +mask from the thread specified by +.Fa td , +and stores it in the space provided by +.Fa cpumaskp . +.Pp +.Fn pthread_setaffinity_np +attempts to set the mask for the thread specified by +.Fa td +to the value in +.Fa cpumaskp . +.Pp +.Sh RETURN VALUES +If successful, the +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +functions will return zero. +Otherwise an error number will be returned +to indicate the error. +.Sh ERRORS +The +.Fn pthread_getaffinity_np +and +.Fn pthread_setaffinity_np +functions may fail if: +.Bl -tag -width Er +.It Bq Er EDEADLK +The +.Fn pthread_setaffinity_np +call would leave a thread without a valid CPU to run on because the set +does not overlap with the thread's anonymous mask. +.It Bq Er EFAULT +The +.Fa cpumaskp +pointer passed was invalid. +.It Bq Er ESRCH +The thread specified by the +.Fa td +argument could not be found. +.It Bq Er ERANGE +The +.Fa cpusetsize +was either preposterously large or smaller than the kernel set size. +.It Bq Er EPERM +The calling thread did not have the credentials required to complete the +operation. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setid 2 , +.Xr CPU_SET 3 , +.Xr pthread 3 , +.Xr pthread_attr_get_affinity_np 3 , +.Xr pthread_attr_set_affinity_np 3 . +.Sh STANDARDS +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +functions are non-standard +.Fx +extensions and may be not available on other operating systems. +.Sh HISTORY +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +function first appeared in +.Fx 7.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm pthread_getaffinity_np +and +.Nm pthread_setaffinity_np +functions were written by +.An David Xu +.Aq davidxu@FreeBSD.org , +and this manpage was written by +.An Xin LI +.Aq delphij@FreeBSD.org . Modified: head/share/man/man3/pthread_attr.3 ============================================================================== --- head/share/man/man3/pthread_attr.3 Sat Jan 9 12:28:42 2010 (r201891) +++ head/share/man/man3/pthread_attr.3 Sat Jan 9 12:31:11 2010 (r201892) @@ -26,7 +26,7 @@ .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd April 28, 2000 +.Dd January 8, 2010 .Dt PTHREAD_ATTR 3 .Os .Sh NAME @@ -209,9 +209,9 @@ Invalid or unsupported value for .El .Sh SEE ALSO .Xr pthread_attr_get_np 3 , +.Xr pthread_attr_affinity_np 3 , .Xr pthread_create 3 .Sh STANDARDS -The .Fn pthread_attr_init , .Fn pthread_attr_destroy , .Fn pthread_attr_setstacksize , Added: head/share/man/man3/pthread_attr_affinity_np.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man3/pthread_attr_affinity_np.3 Sat Jan 9 12:31:11 2010 (r201892) @@ -0,0 +1,150 @@ +.\"- +.\" Copyright (c) 2010 Xin LI +.\" 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 January 8, 2010 +.Dt PTHREAD_ATTR_AFFINITY_NP 3 +.Os +.Sh NAME +.Nm pthread_attr_getaffinity_np , +.Nm pthread_attr_setaffinity_np +.Nd manage CPU affinity in thread attribute object +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft int +.Fn pthread_attr_getaffinity_np "const pthread_attr_t *pattr" "size_t cpusetsize" "cpuset_t *cpusetp" +.Ft int +.Fn pthread_attr_setaffinity_np "pthread_attr_t *pattr" "size_t cpusetsize" "const cpuset_t *cpusetp" +.Sh DESCRIPTION +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +allow the manipulation of sets of CPUs available to specified thread attribute object. +.Pp +Masks of type +.Ft cpuset_t +are composed using the +.Xr CPU_SET 2 +macros. +The kernel tolerates large sets as long as all CPUs specified +in the set exist. +Sets smaller than the kernel uses generate an error on calls to +.Fn pthread_attr_getaffinity_np +even if the result set would fit within the user supplied set. +Calls to +.Fn pthread_attr_setaffinity_np +tolerate small sets with no restrictions. +.Pp +The supplied mask should have a size of +.Fa cpusetsize +bytes. +This size is usually provided by calling +.Li sizeof(cpuset_t) +which is ultimately determined by the value of +.Dv CPU_SETSIZE +as defined in +.In sys/cpuset.h . +.Pp +.Fn pthread_attr_getaffinity_np +retrieves the +mask from the thread attribute object specified by +.Fa pattr , +and stores it in the space provided by +.Fa cpumaskp . +.Pp +.Fn pthread_attr_setaffinity_np +set the mask for the thread attribute object specified by +.Fa pattr +to the value in +.Fa cpumaskp . +.Pp +.Sh RETURN VALUES +If successful, the +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +functions will return zero. +Otherwise an error number will be returned +to indicate the error. +.Sh ERRORS +The +.Fn pthread_attr_getaffinity_np +and +.Fn pthread_attr_setaffinity_np +functions will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa pattr +or the attribute specified by it is NULL. +.El +.Pp +The +.Fn pthread_attr_setaffinity_np +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa pattr +or the attribute specified by it is NULL. +.It Bq Er ENOMEM +Insufficient memory exists to store the cpuset mask. +.El +.Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , +.Xr cpuset_getid 2 , +.Xr cpuset_setid 2 , +.Xr CPU_SET 3 , +.Xr pthread_get_affinity_np 3 , +.Xr pthread_set_affinity_np 3 . +.Sh STANDARDS +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions are non-standard +.Fx +extensions and may be not available on other operating systems. +.Sh HISTORY +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions first appeared in +.Fx 7.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm pthread_attr_getaffinity_np +and +.Nm pthread_attr_setaffinity_np +functions were written by +.An David Xu Aq davidxu@FreeBSD.org , +and this manpage was written by +.An Xin LI Aq delphij@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 12:34:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 440A3106566B; Sat, 9 Jan 2010 12:34:16 +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 3329C8FC16; Sat, 9 Jan 2010 12:34:16 +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 o09CYGwn001570; Sat, 9 Jan 2010 12:34:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09CYGXi001568; Sat, 9 Jan 2010 12:34:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001091234.o09CYGXi001568@svn.freebsd.org> From: Xin LI Date: Sat, 9 Jan 2010 12: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: r201894 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 12:34:16 -0000 Author: delphij Date: Sat Jan 9 12:34:15 2010 New Revision: 201894 URL: http://svn.freebsd.org/changeset/base/201894 Log: Fix formatting. MFC after: 2 weeks Modified: head/share/man/man4/uart.4 Modified: head/share/man/man4/uart.4 ============================================================================== --- head/share/man/man4/uart.4 Sat Jan 9 12:32:07 2010 (r201893) +++ head/share/man/man4/uart.4 Sat Jan 9 12:34:15 2010 (r201894) @@ -28,11 +28,9 @@ .Dd March 12, 2008 .Dt UART 4 .Os -.\" .Sh NAME .Nm uart .Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices -.\" .Sh SYNOPSIS .Cd "device uart" .Pp @@ -42,7 +40,6 @@ .Cd "device scc" .Cd "device uart" .Pp -.Bd -ragged offset -compact In .Pa /boot/device.hints : .Cd hint.uart.0.disabled="1" From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 13:00:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D2AC106566B; Sat, 9 Jan 2010 13:00:19 +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 43BA68FC0A; Sat, 9 Jan 2010 13:00:19 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D388946B06; Sat, 9 Jan 2010 08:00:18 -0500 (EST) Date: Sat, 9 Jan 2010 13:00:18 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <201001080812.21124.jhb@freebsd.org> Message-ID: References: <201001041825.o04IPcXb043347@svn.freebsd.org> <20100107203536.GB8230@rincewind.paeps.cx> <20100107214334.GA35184@onelab2.iet.unipi.it> <201001080812.21124.jhb@freebsd.org> 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-head@freebsd.org, Michael Tuexen , svn-src-all@freebsd.org, src-committers@freebsd.org, Luigi Rizzo Subject: Re: moving sctp to a separate directory ? (Re: svn commit: r201523 - head/sys/netinet) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 13:00:19 -0000 On Fri, 8 Jan 2010, John Baldwin wrote: > Also, the 10-15 years thing is completely non-relevant. What is relevant is > if you are working on a project in a branch and someone renames files before > you have finished your branch and merged it up to HEAD. For example, assume > that someone else renamed the ipfw files in HEAD next week. That would > create an utter mess for you to resolve in your current ipfw3 branch. > Moving TCP would create similar a headache, except much more widespread > since TCP is one of the most widely worked-on subsystems. > > FWIW, I do think it would be cleaner to have netinet more split up perhaps, > but I do not think it is worth the pain that would be involved. Right, I'm very much in the same camp here. I also think our directory layout could stand to be improved and that it would make things easier to find. For less-modified (and especially, more recent) things like SCTP, I don't see harm in moving them now. But a lot of people have extensive local diffs against TCP, UDP, and their shared infrastructure. I know I do, and that many of our firewall/router/appliance/etc shops do as well. Also, having worked with a couple of trees that moved TCP around, I have to say that it's quite annoying to have the TCP headers and implementation in different spots. Every one grep turns into two, etc. :-) Finally, "Moving directories with svn is so easy that we should not worry even if we need a couple of attempts to find a good name" sends shivers down my spine. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 14:56:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6664106566C; Sat, 9 Jan 2010 14:56:38 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BF0B8FC0A; Sat, 9 Jan 2010 14:56:38 +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 o09EucXH032848; Sat, 9 Jan 2010 14:56:38 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09EucEs032845; Sat, 9 Jan 2010 14:56:38 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201001091456.o09EucEs032845@svn.freebsd.org> From: Marko Zec Date: Sat, 9 Jan 2010 14:56: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: r201895 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 14:56:38 -0000 Author: zec Date: Sat Jan 9 14:56:38 2010 New Revision: 201895 URL: http://svn.freebsd.org/changeset/base/201895 Log: Reduce recursions on curvnet and thus spamming the console with warning messages for kernels built with options VIMAGE and VNET_DEBUG enabled. Reviewed by: bz MFC after: 3 days Modified: head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Sat Jan 9 12:34:15 2010 (r201894) +++ head/sys/nfsclient/nfs_vfsops.c Sat Jan 9 14:56:38 2010 (r201895) @@ -423,14 +423,18 @@ nfs_mountroot(struct mount *mp) char buf[128]; char *cp; + CURVNET_SET(TD_TO_VNET(td)); + #if defined(BOOTP_NFSROOT) && defined(BOOTP) bootpc_init(); /* use bootp to get nfs_diskless filled in */ #elif defined(NFS_ROOT) nfs_setup_diskless(); #endif - if (nfs_diskless_valid == 0) + if (nfs_diskless_valid == 0) { + CURVNET_RESTORE(); return (-1); + } if (nfs_diskless_valid == 1) nfs_convert_diskless(); @@ -516,6 +520,7 @@ nfs_mountroot(struct mount *mp) nd->root_args.hostname = buf; if ((error = nfs_mountdiskless(buf, &nd->root_saddr, &nd->root_args, td, &vp, mp)) != 0) { + CURVNET_RESTORE(); return (error); } @@ -529,6 +534,7 @@ nfs_mountroot(struct mount *mp) sizeof (prison0.pr_hostname)); mtx_unlock(&prison0.pr_mtx); inittodr(ntohl(nd->root_time)); + CURVNET_RESTORE(); return (0); } @@ -827,8 +833,6 @@ nfs_mount(struct mount *mp) has_fh_opt = 0; has_hostname_opt = 0; - CURVNET_SET(CRED_TO_VNET(curthread->td_ucred)); - if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; goto out; @@ -1128,7 +1132,6 @@ out: mp->mnt_kern_flag |= (MNTK_MPSAFE|MNTK_LOOKUP_SHARED); MNT_IUNLOCK(mp); } - CURVNET_RESTORE(); return (error); } Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Sat Jan 9 12:34:15 2010 (r201894) +++ head/sys/nfsclient/nfs_vnops.c Sat Jan 9 14:56:38 2010 (r201895) @@ -1555,19 +1555,15 @@ nfs_create(struct vop_create_args *ap) struct vattr vattr; int v3 = NFS_ISV3(dvp); - CURVNET_SET(CRED_TO_VNET(curthread->td_ucred)); - /* * Oops, not for me.. */ if (vap->va_type == VSOCK) { error = nfs_mknodrpc(dvp, ap->a_vpp, cnp, vap); - CURVNET_RESTORE(); return (error); } if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0) { - CURVNET_RESTORE(); return (error); } if (vap->va_vaflags & VA_EXCLUSIVE) @@ -1665,7 +1661,6 @@ nfsmout: KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(dvp); } mtx_unlock(&(VTONFS(dvp))->n_mtx); - CURVNET_RESTORE(); return (error); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 15:14:45 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09981106568B; Sat, 9 Jan 2010 15:14:45 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id A35BC8FC13; Sat, 9 Jan 2010 15:14:44 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id o09FEeOn056295; Sun, 10 Jan 2010 00:14:42 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sun, 10 Jan 2010 00:14:29 +0900 (JST) Message-Id: <20100110.001429.173527971.nyan@FreeBSD.org> To: bz@FreeBSD.org From: TAKAHASHI Yoshihiro In-Reply-To: <201001081901.o08J1pjc062909@svn.freebsd.org> References: <201001081901.o08J1pjc062909@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) 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: r201815 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 15:14:45 -0000 In article <201001081901.o08J1pjc062909@svn.freebsd.org> "Bjoern A. Zeeb" writes: > To avoid hardcoding further kernel configuration names for > make universe, split the logic into two parts: > - 1st to build worlds and generate kernel configs like LINT. > - 2nd to build kernels for a given TARGET architecture correctly > finding all newly generated configs, not knowing anything about > LINT anymore. (*) > +universe_kernels: universe_kernconfs > +BUILD_ARCH!= uname -p Should this be "uname -m"? > +TARGET?= ${BUILD_ARCH} > +KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ > + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ > + ! -name DEFAULTS ! -name NOTES --- TAKAHASHI Yoshihiro From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 15:31:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37AAC1065693; Sat, 9 Jan 2010 15:31:28 +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 0CE818FC20; Sat, 9 Jan 2010 15:31:28 +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 o09FVRT8040507; Sat, 9 Jan 2010 15:31:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09FVREK040503; Sat, 9 Jan 2010 15:31:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001091531.o09FVREK040503@svn.freebsd.org> From: Marius Strobl Date: Sat, 9 Jan 2010 15:31: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: r201896 - head/sys/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 15:31:28 -0000 Author: marius Date: Sat Jan 9 15:31:27 2010 New Revision: 201896 URL: http://svn.freebsd.org/changeset/base/201896 Log: Exclude options COMPAT_FREEBSD4 now that the MD freebsd4_sigreturn() is gone since r201396 and which is also in line with the fact that FreeBSD 4 didn't supported sparc64. PR: 142102 (second part) MFC after: 1 week Modified: head/sys/nfsserver/nfs.h head/sys/nfsserver/nfs_fha.c head/sys/nfsserver/nfs_srvkrpc.c Modified: head/sys/nfsserver/nfs.h ============================================================================== --- head/sys/nfsserver/nfs.h Sat Jan 9 14:56:38 2010 (r201895) +++ head/sys/nfsserver/nfs.h Sat Jan 9 15:31:27 2010 (r201896) @@ -240,6 +240,7 @@ extern int nfs_debug; #endif +void nfs_realign(struct mbuf **); struct mbuf *nfs_rephead(int, struct nfsrv_descript *, int, struct mbuf **, caddr_t *); void nfsm_srvfattr(struct nfsrv_descript *, struct vattr *, Modified: head/sys/nfsserver/nfs_fha.c ============================================================================== --- head/sys/nfsserver/nfs_fha.c Sat Jan 9 14:56:38 2010 (r201895) +++ head/sys/nfsserver/nfs_fha.c Sat Jan 9 15:31:27 2010 (r201896) @@ -158,9 +158,9 @@ SYSUNINIT(nfs_fha, SI_SUB_ROOT_CONF, SI_ static void fha_extract_info(struct svc_req *req, struct fha_info *i) { - struct mbuf *md = req->rq_args; + struct mbuf *md; nfsfh_t fh; - caddr_t dpos = mtod(md, caddr_t); + caddr_t dpos; static u_int64_t random_fh = 0; int error; int v3 = (req->rq_vers == 3); @@ -201,6 +201,10 @@ fha_extract_info(struct svc_req *req, st procnum == NFSPROC_NULL) goto out; + nfs_realign(&req->rq_args); + md = req->rq_args; + dpos = mtod(md, caddr_t); + /* Grab the filehandle. */ error = nfsm_srvmtofh_xx(&fh.fh_generic, v3, &md, &dpos); if (error) Modified: head/sys/nfsserver/nfs_srvkrpc.c ============================================================================== --- head/sys/nfsserver/nfs_srvkrpc.c Sat Jan 9 14:56:38 2010 (r201895) +++ head/sys/nfsserver/nfs_srvkrpc.c Sat Jan 9 15:31:27 2010 (r201896) @@ -266,7 +266,7 @@ nfs_rephead(int siz, struct nfsrv_descri * not occur with NFS/UDP and is supposed to only occassionally occur * with TCP. Use vfs.nfs.realign_count and realign_test to check this. */ -static void +void nfs_realign(struct mbuf **pm) /* XXX COMMON */ { struct mbuf *m; From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 15:37:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C0F91065670; Sat, 9 Jan 2010 15:37:24 +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 8B2988FC23; Sat, 9 Jan 2010 15:37: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 o09FbOjt041863; Sat, 9 Jan 2010 15:37:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09FbODM041861; Sat, 9 Jan 2010 15:37:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001091537.o09FbODM041861@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 9 Jan 2010 15:37: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: r201897 - head/usr.sbin/traceroute X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 15:37:24 -0000 Author: bz Date: Sat Jan 9 15:37:24 2010 New Revision: 201897 URL: http://svn.freebsd.org/changeset/base/201897 Log: Correct spelling. Submitted by: (pluknet gmail.com) MFC after: 4 days X-MFC with: r201806 Modified: head/usr.sbin/traceroute/findsaddr-udp.c Modified: head/usr.sbin/traceroute/findsaddr-udp.c ============================================================================== --- head/usr.sbin/traceroute/findsaddr-udp.c Sat Jan 9 15:31:27 2010 (r201896) +++ head/usr.sbin/traceroute/findsaddr-udp.c Sat Jan 9 15:37:24 2010 (r201897) @@ -40,7 +40,7 @@ /* * Return the source address for the given destination address. * - * This makes use of proper source address seclection in the FreeBSD kernel + * This makes use of proper source address selection in the FreeBSD kernel * even taking jails into account (sys/netinet/in_pcb.c:in_pcbladdr()). * We open a UDP socket, and connect to the destination, letting the kernel * do the bind and then read the source IPv4 address using getsockname(2). From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 15:43:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CDF01065679; Sat, 9 Jan 2010 15:43:48 +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 1B6C48FC15; Sat, 9 Jan 2010 15:43:48 +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 o09FhmQ7043280; Sat, 9 Jan 2010 15:43:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09FhliQ043278; Sat, 9 Jan 2010 15:43:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001091543.o09FhliQ043278@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 9 Jan 2010 15:43: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: r201898 - head/sys/opencrypto X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 15:43:48 -0000 Author: bz Date: Sat Jan 9 15:43:47 2010 New Revision: 201898 URL: http://svn.freebsd.org/changeset/base/201898 Log: Add comments trying to explain what bad things happen here, i.e. how hashed MD5/SHA are implemented, abusing Final() for padding and sw_octx to transport the key from the beginning to the end. Enlightened about what was going on here by: cperciva Reviewed by: cperciva MFC After: 3 days X-MFC with: r187826 PR: kern/126468 Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Sat Jan 9 15:37:24 2010 (r201897) +++ head/sys/opencrypto/cryptosoft.c Sat Jan 9 15:43:47 2010 (r201898) @@ -434,7 +434,16 @@ swcr_authprepare(struct auth_hash *axf, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: { - /* We need a buffer that can hold an md5 and a sha1 result. */ + /* + * We need a buffer that can hold an md5 and a sha1 result + * just to throw it away. + * What we do here is the initial part of: + * ALGO( key, keyfill, .. ) + * adding the key to sw_ictx and abusing Final() to get the + * "keyfill" padding. + * In addition we abuse the sw_octx to save the key to have + * it to be able to append it at the end in swcr_authcompute(). + */ u_char buf[SHA1_RESULTLEN]; sw->sw_klen = klen; @@ -495,9 +504,17 @@ swcr_authcompute(struct cryptodesc *crd, case CRYPTO_MD5_KPDK: case CRYPTO_SHA1_KPDK: + /* If we have no key saved, return error. */ if (sw->sw_octx == NULL) return EINVAL; + /* + * Add the trailing copy of the key (see comment in + * swcr_authprepare()) after the data: + * ALGO( .., key, algofill ) + * and let Final() do the proper, natural "algofill" + * padding. + */ axf->Update(&ctx, sw->sw_octx, sw->sw_klen); axf->Final(aalg, &ctx); break; From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 15:59:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E3FB1065676; Sat, 9 Jan 2010 15:59:15 +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 6B41E8FC20; Sat, 9 Jan 2010 15:59:15 +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 o09FxF4p046689; Sat, 9 Jan 2010 15:59:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09FxFuE046685; Sat, 9 Jan 2010 15:59:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001091559.o09FxFuE046685@svn.freebsd.org> From: Marius Strobl Date: Sat, 9 Jan 2010 15:59: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: r201899 - head/sys/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 15:59:15 -0000 Author: marius Date: Sat Jan 9 15:59:15 2010 New Revision: 201899 URL: http://svn.freebsd.org/changeset/base/201899 Log: Some style(9) fixes in order to fabricate a commit to denote that the commit message for r201896 actually should have read: As nfsm_srvmtofh_xx() assumes the 4-byte alignment required by XDR ensure the mbuf data is aligned accordingly by calling nfs_realign() in fha_extract_info(). This fix is orthogonal to the problem solved by r199274/r199284. PR: 142102 (second part) MFC after: 1 week Modified: head/sys/nfsserver/nfs.h head/sys/nfsserver/nfs_fha.c head/sys/nfsserver/nfs_srvkrpc.c Modified: head/sys/nfsserver/nfs.h ============================================================================== --- head/sys/nfsserver/nfs.h Sat Jan 9 15:43:47 2010 (r201898) +++ head/sys/nfsserver/nfs.h Sat Jan 9 15:59:15 2010 (r201899) @@ -82,14 +82,13 @@ #define IO_METASYNC 0 #endif - /* NFS state flags XXX -Wunused */ #define NFSRV_SNDLOCK 0x01000000 /* Send socket lock */ #define NFSRV_WANTSND 0x02000000 /* Want above */ /* - * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs - * should ever try and use it. + * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and + * mount_nfs should ever try and use it. */ /* Modified: head/sys/nfsserver/nfs_fha.c ============================================================================== --- head/sys/nfsserver/nfs_fha.c Sat Jan 9 15:43:47 2010 (r201898) +++ head/sys/nfsserver/nfs_fha.c Sat Jan 9 15:59:15 2010 (r201899) @@ -71,16 +71,17 @@ static struct fha_global { u_long hashmask; } g_fha; -/* - * These are the entries in the filehandle hash. They talk about a specific - * file, requests against which are being handled by one or more nfsds. We keep - * a chain of nfsds against the file. We only have more than one if reads are - * ongoing, and then only if the reads affect disparate regions of the file. +/* + * These are the entries in the filehandle hash. They talk about a specific + * file, requests against which are being handled by one or more nfsds. We + * keep a chain of nfsds against the file. We only have more than one if reads + * are ongoing, and then only if the reads affect disparate regions of the + * file. * - * In general, we want to assign a new request to an existing nfsd if it is - * going to contend with work happening already on that nfsd, or if the - * operation is a read and the nfsd is already handling a proximate read. We - * do this to avoid jumping around in the read stream unnecessarily, and to + * In general, we want to assign a new request to an existing nfsd if it is + * going to contend with work happening already on that nfsd, or if the + * operation is a read and the nfsd is already handling a proximate read. We + * do this to avoid jumping around in the read stream unnecessarily, and to * avoid contention between threads over single files. */ struct fha_hash_entry { @@ -101,7 +102,7 @@ struct fha_info { }; static int fhe_stats_sysctl(SYSCTL_HANDLER_ARGS); - + static void nfs_fha_init(void *foo) { @@ -136,7 +137,7 @@ nfs_fha_init(void *foo) &fha_ctls.max_reqs_per_nfsd, 0, "Maximum requests that " "single nfsd thread should be working on at any time"); - SYSCTL_ADD_OID(&fha_clist, SYSCTL_STATIC_CHILDREN(_vfs_nfsrv_fha), + SYSCTL_ADD_OID(&fha_clist, SYSCTL_STATIC_CHILDREN(_vfs_nfsrv_fha), OID_AUTO, "fhe_stats", CTLTYPE_STRING | CTLFLAG_RD, 0, 0, fhe_stats_sysctl, "A", ""); } @@ -151,7 +152,7 @@ nfs_fha_uninit(void *foo) SYSINIT(nfs_fha, SI_SUB_ROOT_CONF, SI_ORDER_ANY, nfs_fha_init, NULL); SYSUNINIT(nfs_fha, SI_SUB_ROOT_CONF, SI_ORDER_ANY, nfs_fha_uninit, NULL); -/* +/* * This just specifies that offsets should obey affinity when within * the same 1Mbyte (1<<20) chunk for the file (reads only for now). */ @@ -167,18 +168,18 @@ fha_extract_info(struct svc_req *req, st u_int32_t *tl; rpcproc_t procnum; - /* - * We start off with a random fh. If we get a reasonable - * procnum, we set the fh. If there's a concept of offset + /* + * We start off with a random fh. If we get a reasonable + * procnum, we set the fh. If there's a concept of offset * that we're interested in, we set that. */ i->fh = ++random_fh; i->offset = 0; i->locktype = LK_EXCLUSIVE; - + /* * Extract the procnum and convert to v3 form if necessary, - * taking care to deal with out-of-range procnums. Caller will + * taking care to deal with out-of-range procnums. Caller will * ensure that rq_vers is either 2 or 3. */ procnum = req->rq_proc; @@ -188,19 +189,19 @@ fha_extract_info(struct svc_req *req, st procnum = nfsrv_nfsv3_procid[procnum]; } - /* - * We do affinity for most. However, we divide a realm of affinity - * by file offset so as to allow for concurrent random access. We - * only do this for reads today, but this may change when IFS supports + /* + * We do affinity for most. However, we divide a realm of affinity + * by file offset so as to allow for concurrent random access. We + * only do this for reads today, but this may change when IFS supports * efficient concurrent writes. */ if (procnum == NFSPROC_FSSTAT || procnum == NFSPROC_FSINFO || procnum == NFSPROC_PATHCONF || - procnum == NFSPROC_NOOP || + procnum == NFSPROC_NOOP || procnum == NFSPROC_NULL) goto out; - + nfs_realign(&req->rq_args); md = req->rq_args; dpos = mtod(md, caddr_t); @@ -270,8 +271,8 @@ fha_hash_entry_new(u_int64_t fh) e->num_writes = 0; e->num_threads = 0; LIST_INIT(&e->threads); - - return e; + + return (e); } static void @@ -296,10 +297,9 @@ fha_hash_entry_lookup(SVCPOOL *pool, u_i { struct fha_hash_entry *fhe, *new_fhe; - LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) { + LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) if (fhe->fh == fh) break; - } if (!fhe) { /* Allocate a new entry. */ @@ -308,25 +308,24 @@ fha_hash_entry_lookup(SVCPOOL *pool, u_i mtx_lock(&pool->sp_lock); /* Double-check to make sure we still need the new entry. */ - LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) { + LIST_FOREACH(fhe, &g_fha.hashtable[fh % g_fha.hashmask], link) if (fhe->fh == fh) break; - } if (!fhe) { fhe = new_fhe; LIST_INSERT_HEAD(&g_fha.hashtable[fh % g_fha.hashmask], fhe, link); - } else { + } else fha_hash_entry_destroy(new_fhe); - } } - return fhe; + return (fhe); } static void fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) { + LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); fhe->num_threads++; } @@ -339,7 +338,7 @@ fha_hash_entry_remove_thread(struct fha_ fhe->num_threads--; } -/* +/* * Account for an ongoing operation associated with this file. */ static void @@ -365,7 +364,7 @@ get_idle_thread(SVCPOOL *pool) } -/* +/* * Get the service thread currently associated with the fhe that is * appropriate to handle this operation. */ @@ -387,15 +386,15 @@ fha_hash_entry_choose_thread(SVCPOOL *po /* If there are any writes in progress, use the first thread. */ if (fhe->num_writes) { #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)w", thread, req_count); #endif return (thread); } - /* - * Check for read locality, making sure that we won't - * exceed our per-thread load limit in the process. + /* + * Check for read locality, making sure that we won't + * exceed our per-thread load limit in the process. */ offset1 = i->offset >> fha_ctls.bin_shift; offset2 = STAILQ_FIRST(&thread->st_reqs)->rq_p3 @@ -404,21 +403,21 @@ fha_hash_entry_choose_thread(SVCPOOL *po if ((fha_ctls.max_reqs_per_nfsd == 0) || (req_count < fha_ctls.max_reqs_per_nfsd)) { #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)r", thread, req_count); #endif return (thread); } } - /* + /* * We don't have a locality match, so skip this thread, - * but keep track of the most attractive thread in case + * but keep track of the most attractive thread in case * we need to come back to it later. */ #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, - "fha: %p(%d)s off1 %llu off2 %llu", thread, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + "fha: %p(%d)s off1 %llu off2 %llu", thread, req_count, offset1, offset2); #endif if ((min_thread == NULL) || (req_count < min_count)) { @@ -427,38 +426,38 @@ fha_hash_entry_choose_thread(SVCPOOL *po } } - /* - * We didn't find a good match yet. See if we can add + /* + * We didn't find a good match yet. See if we can add * a new thread to this file handle entry's thread list. */ - if ((fha_ctls.max_nfsds_per_fh == 0) || + if ((fha_ctls.max_nfsds_per_fh == 0) || (fhe->num_threads < fha_ctls.max_nfsds_per_fh)) { - /* - * We can add a new thread, so try for an idle thread - * first, and fall back to this_thread if none are idle. + /* + * We can add a new thread, so try for an idle thread + * first, and fall back to this_thread if none are idle. */ if (STAILQ_EMPTY(&this_thread->st_reqs)) { thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)t", thread, thread->st_reqcount); #endif } else if ((thread = get_idle_thread(pool))) { #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)i", thread, thread->st_reqcount); #endif - } else { + } else { thread = this_thread; #if 0 - ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, + ITRACE_CURPROC(ITRACE_NFS, ITRACE_INFO, "fha: %p(%d)b", thread, thread->st_reqcount); #endif } fha_hash_entry_add_thread(fhe, thread); } else { - /* - * We don't want to use any more threads for this file, so + /* + * We don't want to use any more threads for this file, so * go back to the most attractive nfsd we're already using. */ thread = min_thread; @@ -467,8 +466,8 @@ fha_hash_entry_choose_thread(SVCPOOL *po return (thread); } -/* - * After getting a request, try to assign it to some thread. Usually we +/* + * After getting a request, try to assign it to some thread. Usually we * handle it ourselves. */ SVCTHREAD * @@ -491,16 +490,16 @@ fha_assign(SVCTHREAD *this_thread, struc pool = req->rq_xprt->xp_pool; fha_extract_info(req, &i); - /* - * We save the offset associated with this request for later + /* + * We save the offset associated with this request for later * nfsd matching. */ fhe = fha_hash_entry_lookup(pool, i.fh); req->rq_p1 = fhe; req->rq_p2 = i.locktype; req->rq_p3 = i.offset; - - /* + + /* * Choose a thread, taking into consideration locality, thread load, * and the number of threads already working on this file. */ @@ -511,8 +510,8 @@ fha_assign(SVCTHREAD *this_thread, struc return (thread); } -/* - * Called when we're done with an operation. The request has already +/* + * Called when we're done with an operation. The request has already * been de-queued. */ void Modified: head/sys/nfsserver/nfs_srvkrpc.c ============================================================================== --- head/sys/nfsserver/nfs_srvkrpc.c Sat Jan 9 15:43:47 2010 (r201898) +++ head/sys/nfsserver/nfs_srvkrpc.c Sat Jan 9 15:59:15 2010 (r201899) @@ -187,19 +187,18 @@ nfssvc_nfsserver(struct thread *td, stru } error = nfssvc_addsock(fp, td); fdrop(fp, td); - } else if (uap->flag & NFSSVC_OLDNFSD) { + } else if (uap->flag & NFSSVC_OLDNFSD) error = nfssvc_nfsd(td, NULL); - } else if (uap->flag & NFSSVC_NFSD) { - if (!uap->argp) + else if (uap->flag & NFSSVC_NFSD) { + if (!uap->argp) return (EINVAL); error = copyin(uap->argp, (caddr_t)&nfsdarg, sizeof(nfsdarg)); if (error) return (error); error = nfssvc_nfsd(td, &nfsdarg); - } else { + } else error = ENXIO; - } return (error); } @@ -447,9 +446,8 @@ nfssvc_addsock(struct file *fp, struct t siz = sb_max_adj; error = soreserve(so, siz, siz); - if (error) { + if (error) return (error); - } /* * Steal the socket from userland so that it doesn't close @@ -471,7 +469,7 @@ nfssvc_addsock(struct file *fp, struct t } /* - * Called by nfssvc() for nfsds. Just loops around servicing rpc requests + * Called by nfssvc() for nfsds. Just loops around servicing rpc requests * until it is killed by a signal. */ static int @@ -496,9 +494,9 @@ nfssvc_nfsd(struct thread *td, struct nf #endif /* - * Only the first nfsd actually does any work. The RPC code - * adds threads to it as needed. Any extra processes offered - * by nfsd just exit. If nfsd is new enough, it will call us + * Only the first nfsd actually does any work. The RPC code + * adds threads to it as needed. Any extra processes offered + * by nfsd just exit. If nfsd is new enough, it will call us * once with a structure that specifies how many threads to * use. */ @@ -522,7 +520,7 @@ nfssvc_nfsd(struct thread *td, struct nf nfsrv_pool->sp_minthreads = 4; nfsrv_pool->sp_maxthreads = 4; } - + svc_run(nfsrv_pool); #ifdef KGSSAPI @@ -541,7 +539,7 @@ nfssvc_nfsd(struct thread *td, struct nf /* * Size the NFS server's duplicate request cache at 1/2 the - * nmbclusters, floating within a (64, 2048) range. This is to + * nmbclusters, floating within a (64, 2048) range. This is to * prevent all mbuf clusters being tied up in the NFS dupreq * cache for small values of nmbclusters. */ From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 16:16:58 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC693106568F; Sat, 9 Jan 2010 16:16:58 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 739248FC26; Sat, 9 Jan 2010 16:16:58 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id E311F730A1; Sat, 9 Jan 2010 17:24:58 +0100 (CET) Date: Sat, 9 Jan 2010 17:24:58 +0100 From: Luigi Rizzo To: "M. Warner Losh" Message-ID: <20100109162458.GA8270@onelab2.iet.unipi.it> References: <20100107203536.GB8230@rincewind.paeps.cx> <20100107214334.GA35184@onelab2.iet.unipi.it> <201001080812.21124.jhb@freebsd.org> <20100108.175640.1104512900458971844.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100108.175640.1104512900458971844.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, tuexen@FreeBSD.org, jhb@FreeBSD.org Subject: Re: moving sctp to a separate directory ? X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 16:16:58 -0000 On Fri, Jan 08, 2010 at 05:56:40PM -0700, M. Warner Losh wrote: > In message: <201001080812.21124.jhb@freebsd.org> > John Baldwin writes: > : On Thursday 07 January 2010 4:43:34 pm Luigi Rizzo wrote: > : > > What do you do with udp, for instance? Compared to tcp and sctp, it's > : > > trivial in terms of code, but it's an upper layer protocol from the > : > > perspective of netinet/netinet6 - do we put it in its own directory too? > : > > Also note that this won't only cause churn for people who have patches against > : > > or (out-of-tree) branches from netinet/, but also in other kernel subsystems > : > > which rely on tcp -- nfs, for instance. > : > > : > + i find the concern about churn in external patchsets a bit weak, first of > : > all because this is bound to happen unless we stop all development, > : > and secondly because this kind of file moving or splitting happens > : > once every 10-15 years which is well beyond the lifetime of a patchset. > : > : Having the files rename is entirely different from merging changes. At least > : for svn and p4 I believe that merging a rename into a branch is not smart > : enough to merge your local changes into the new files. Instead it involves a > : big manual fixup. > : > : Also, the 10-15 years thing is completely non-relevant. What is relevant is > : if you are working on a project in a branch and someone renames files before > : you have finished your branch and merged it up to HEAD. For example, assume > : that someone else renamed the ipfw files in HEAD next week. That would > : create an utter mess for you to resolve in your current ipfw3 branch. Moving > : TCP would create similar a headache, except much more widespread since TCP is > : one of the most widely worked-on subsystems. > : > : FWIW, I do think it would be cleaner to have netinet more split up perhaps, > : but I do not think it is worth the pain that would be involved. > > It is painful enough moving drivers around. I think that while well > intentioned, it will cause us nothing but grief. given the overwhelming response, i give up :) > Warner From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 17:09:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 625C91065670; Sat, 9 Jan 2010 17:09: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 50EBC8FC0A; Sat, 9 Jan 2010 17:09:57 +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 o09H9vmt062331; Sat, 9 Jan 2010 17:09:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09H9vhK062329; Sat, 9 Jan 2010 17:09:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001091709.o09H9vhK062329@svn.freebsd.org> From: Marius Strobl Date: Sat, 9 Jan 2010 17:09: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: r201901 - head/sys/boot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 17:09:57 -0000 Author: marius Date: Sat Jan 9 17:09:57 2010 New Revision: 201901 URL: http://svn.freebsd.org/changeset/base/201901 Log: Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNF license FreeBSD had in sys/boot). Obtained from: NetBSD Modified: head/sys/boot/common/dev_net.c Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sat Jan 9 16:15:10 2010 (r201900) +++ head/sys/boot/common/dev_net.c Sat Jan 9 17:09:57 2010 (r201901) @@ -1,6 +1,4 @@ -/* - * $NetBSD: dev_net.c,v 1.12 1997/12/10 20:38:37 gwr Exp $ - */ +/* $NetBSD: dev_net.c,v 1.23 2008/04/28 20:24:06 martin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -17,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 17:10:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4DD0106566C; Sat, 9 Jan 2010 17:10:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7248FC17; Sat, 9 Jan 2010 17:10:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o09H4MtH018769; Sat, 9 Jan 2010 10:04:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 09 Jan 2010 10:05:12 -0700 (MST) Message-Id: <20100109.100512.623571555980925615.imp@bsdimp.com> To: nyan@freebsd.org From: "M. Warner Losh" In-Reply-To: <20100110.001429.173527971.nyan@FreeBSD.org> References: <201001081901.o08J1pjc062909@svn.freebsd.org> <20100110.001429.173527971.nyan@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) 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, bz@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r201815 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 17:10:50 -0000 In message: <20100110.001429.173527971.nyan@FreeBSD.org> TAKAHASHI Yoshihiro writes: : In article <201001081901.o08J1pjc062909@svn.freebsd.org> : "Bjoern A. Zeeb" writes: : : > To avoid hardcoding further kernel configuration names for : > make universe, split the logic into two parts: : > - 1st to build worlds and generate kernel configs like LINT. : > - 2nd to build kernels for a given TARGET architecture correctly : > finding all newly generated configs, not knowing anything about : > LINT anymore. (*) : : > +universe_kernels: universe_kernconfs : > +BUILD_ARCH!= uname -p : : Should this be "uname -m"? : : : > +TARGET?= ${BUILD_ARCH} : > +KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ : > + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ : > + ! -name DEFAULTS ! -name NOTES Yes. Also, the name BUILD_ARCH is misleading, since it corresponds to MACHINE, not to MACHINE_ARCH. it is clear that it is used in the MACHINE context, not the MACHINE_ARCH context. These two are often confused, but many of the embedded platforms have added to the confusion and it is unclear where the sharp dividing line should be here anymore. It used to be separate boot environment, but even that has gotten fuzzy for architectures like mips and arm that boot with a huge variety of boot loaders... Warner From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 17:21:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA17A1065670; Sat, 9 Jan 2010 17:21:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 996928FC1C; Sat, 9 Jan 2010 17:21:36 +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 o09HLatT064950; Sat, 9 Jan 2010 17:21:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09HLaw9064948; Sat, 9 Jan 2010 17:21:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091721.o09HLaw9064948@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 17:21: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: r201903 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 17:21:36 -0000 Author: imp Date: Sat Jan 9 17:21:36 2010 New Revision: 201903 URL: http://svn.freebsd.org/changeset/base/201903 Log: Merge r201902 and r195669 from projects/mips into head by hand: r201902 | imp | 2010-01-09 10:16:19 -0700 (Sat, 09 Jan 2010) | 2 lines Fix comment, which was missed in an earlier commit... r195669 | gonzo | 2009-07-13 17:03:44 -0600 (Mon, 13 Jul 2009) | 3 lines - Remove -mno-dsp from CFLAGS. MIPS DSP ASE is off by default now (as it should be) Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Jan 9 17:16:19 2010 (r201902) +++ head/sys/conf/kern.mk Sat Jan 9 17:21:36 2010 (r201903) @@ -86,11 +86,10 @@ INLINE_LIMIT?= 15000 .endif # -# For MIPS we also tell gcc to use floating point emulation and -# disable MIPS DSP ASE Instruction set. +# For MIPS we also tell gcc to use floating point emulation # .if ${MACHINE_ARCH} == "mips" -CFLAGS+= -msoft-float -mno-dsp +CFLAGS+= -msoft-float INLINE_LIMIT?= 8000 .endif From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 17:40:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91F0D106568B; Sat, 9 Jan 2010 17:40:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4328FC17; Sat, 9 Jan 2010 17:40:09 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 3191D41C67E; Sat, 9 Jan 2010 18:40:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id WaH4QUA6xe9R; Sat, 9 Jan 2010 18:40:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 76FCE41C679; Sat, 9 Jan 2010 18:40:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 579114448EC; Sat, 9 Jan 2010 17:36:32 +0000 (UTC) Date: Sat, 9 Jan 2010 17:36:32 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: "M. Warner Losh" In-Reply-To: <20100109.100512.623571555980925615.imp@bsdimp.com> Message-ID: <20100109173314.V50938@maildrop.int.zabbadoz.net> References: <201001081901.o08J1pjc062909@svn.freebsd.org> <20100110.001429.173527971.nyan@FreeBSD.org> <20100109.100512.623571555980925615.imp@bsdimp.com> X-OpenPGP-Key: 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, nyan@freebsd.org Subject: Re: svn commit: r201815 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 17:40:09 -0000 On Sat, 9 Jan 2010, M. Warner Losh wrote: > In message: <20100110.001429.173527971.nyan@FreeBSD.org> > TAKAHASHI Yoshihiro writes: > : In article <201001081901.o08J1pjc062909@svn.freebsd.org> > : "Bjoern A. Zeeb" writes: > : > : > To avoid hardcoding further kernel configuration names for > : > make universe, split the logic into two parts: > : > - 1st to build worlds and generate kernel configs like LINT. > : > - 2nd to build kernels for a given TARGET architecture correctly > : > finding all newly generated configs, not knowing anything about > : > LINT anymore. (*) > : > : > +universe_kernels: universe_kernconfs > : > +BUILD_ARCH!= uname -p > : > : Should this be "uname -m"? > : > : > : > +TARGET?= ${BUILD_ARCH} > : > +KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ > : > + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ > : > + ! -name DEFAULTS ! -name NOTES > > Yes. Also, the name BUILD_ARCH is misleading, since it corresponds to > MACHINE, not to MACHINE_ARCH. it is clear that it is used in the > MACHINE context, not the MACHINE_ARCH context. > > These two are often confused, but many of the embedded platforms have > added to the confusion and it is unclear where the sharp dividing line > should be here anymore. It used to be separate boot environment, but > even that has gotten fuzzy for architectures like mips and arm that > boot with a huge variety of boot loaders... I guess the intial problem I had it from was introduced in r54311 to Makefile.inc1, which nowadays reads like: BUILD_ARCH!= uname -p So, the suggested correction would be: MACHINE!= uname -m I wonder if I should use XMACHINE but that usually means "cross"(building). I could use _MACHINE!= to not confuse it with MACHINE from Makefile.inc1? /bz -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 17:56:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55E53106566B; Sat, 9 Jan 2010 17:56:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BE788FC13; Sat, 9 Jan 2010 17:56:26 +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 o09HuQDt072662; Sat, 9 Jan 2010 17:56:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09HuQvK072661; Sat, 9 Jan 2010 17:56:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091756.o09HuQvK072661@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 17:56: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: r201905 - head/sys/mips/sibyte X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 17:56:26 -0000 Author: imp Date: Sat Jan 9 17:56:25 2010 New Revision: 201905 URL: http://svn.freebsd.org/changeset/base/201905 Log: Merge from projects/mips to head by hand: Copy the files for the sibyte support (except files in sys/conf and sys/mips/conf). This targets the Broadcom SWARM board (bcm91250) and the SB-1 core in the BCM1250 SoC. This work was done by Neel Natu. Added: - copied from r201903, projects/mips/sys/mips/sibyte/ Directory Properties: head/sys/mips/sibyte/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:02:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABBD91065694; Sat, 9 Jan 2010 18:02:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 821678FC1F; Sat, 9 Jan 2010 18:02:31 +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 o09I2VMn074073; Sat, 9 Jan 2010 18:02:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09I2VHG074072; Sat, 9 Jan 2010 18:02:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091802.o09I2VHG074072@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:02: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: r201906 - head/sys/mips/atheros X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:02:31 -0000 Author: imp Date: Sat Jan 9 18:02:31 2010 New Revision: 201906 URL: http://svn.freebsd.org/changeset/base/201906 Log: Merge from projects/mips to head by hand: Merge support files for the Atheros AR71xx (and soon AR9xxx) processors, except files from sys/conf and sys/mips/conf. This work was done primarily by Olecksandr Tymoshenko and works on the RouterStation and RouterStation PRO. Other AR71xx-based boards have been reported as working as well (RouterBoard, for example). Added: - copied from r201905, projects/mips/sys/mips/atheros/ Directory Properties: head/sys/mips/atheros/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:07:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6DFD1065679; Sat, 9 Jan 2010 18:07:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 965BE8FC08; Sat, 9 Jan 2010 18:07:10 +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 o09I7At6075175; Sat, 9 Jan 2010 18:07:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09I7A0u075173; Sat, 9 Jan 2010 18:07:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001091807.o09I7A0u075173@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 9 Jan 2010 18:07: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: r201907 - head/sys/dev/cxgb/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:07:10 -0000 Author: np Date: Sat Jan 9 18:07:10 2010 New Revision: 201907 URL: http://svn.freebsd.org/changeset/base/201907 Log: Extra parantheses to keep certain compilers happy. Submitted by: trasz@ Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Sat Jan 9 18:02:31 2010 (r201906) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Sat Jan 9 18:07:10 2010 (r201907) @@ -4443,7 +4443,7 @@ int __devinit t3_prep_adapter(adapter_t adapter->params.info = ai; adapter->params.nports = ai->nports0 + ai->nports1; - adapter->params.chan_map = !!ai->nports0 | (!!ai->nports1 << 1); + adapter->params.chan_map = (!!ai->nports0) | (!!ai->nports1 << 1); adapter->params.rev = t3_read_reg(adapter, A_PL_REV); /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:08:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48E4D106568B; Sat, 9 Jan 2010 18:08:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F35E8FC14; Sat, 9 Jan 2010 18:08: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 o09I8WLo075511; Sat, 9 Jan 2010 18:08:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09I8WhB075509; Sat, 9 Jan 2010 18:08:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091808.o09I8WhB075509@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:08: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: r201908 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:08:32 -0000 Author: imp Date: Sat Jan 9 18:08:31 2010 New Revision: 201908 URL: http://svn.freebsd.org/changeset/base/201908 Log: Merge from pprojects/mips to head by hand. Copy over the SWARM config file. Added: - copied unchanged from r201907, projects/mips/sys/mips/conf/SWARM Directory Properties: head/sys/mips/conf/SWARM (props changed) Copied: head/sys/mips/conf/SWARM (from r201907, projects/mips/sys/mips/conf/SWARM) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/SWARM Sat Jan 9 18:08:31 2010 (r201908, copy of r201907, projects/mips/sys/mips/conf/SWARM) @@ -0,0 +1,81 @@ +# +# $Id: //depot/user/neelnatu/freebsd_sibyte/src/sys/mips/conf/SWARM#7 $ +# + +ident SWARM +options CPU_SB1 + +files "../sibyte/files.sibyte" +hints "SWARM.hints" + +options PCI_IOSPACE_ADDR=0xFC000000 +options PCI_IOSPACE_SIZE=0x02000000 + +# +# 32-bit kernel cannot deal with physical memory beyond 4GB +# XXX pmap assumes that all the memory can be mapped using KSEG0 +# +options MAXMEM=512*1024 + +options CFE +options CFE_CONSOLE +options CFE_ENV +options ALT_BREAK_TO_DEBUGGER + +# cfe loader expects kernel at 0x80001000 for mips32 w/o backwards +# offsets in the linked elf image (see ldscript hack) +# XXX can we conditionalize the linker stuff on options CFE? +options KERNVIRTADDR=0x80001000 + +makeoptions LDSCRIPT_NAME= ldscript.mips.cfe + +#cpu CPU_MIPS64 +#options ISA_MIPS64 +#makeoptions ARCH_FLAGS="-march=mips64 -mgp64 -mabi=o64" +cpu CPU_MIPS32 +options ISA_MIPS32 +makeoptions ARCH_FLAGS="-march=mips32" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="" + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# Debugging for use in -current +options INVARIANTS +options INVARIANT_SUPPORT +options WITNESS + +options FFS #Fast filesystem + +device pci +device miibus +device bge +device loop +device ether +device md +device random + +options USB_DEBUG +device usb +device ohci +device uhci +device ehci + +device umass + +device scbus +device da + +device ata +device atadisk +device atapicd +options ATA_STATIC_ID From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:09:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17FFD106568B; Sat, 9 Jan 2010 18:09:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 076A58FC16; Sat, 9 Jan 2010 18:09:31 +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 o09I9UrZ075791; Sat, 9 Jan 2010 18:09:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09I9UrN075789; Sat, 9 Jan 2010 18:09:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091809.o09I9UrN075789@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:09: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: r201909 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:09:31 -0000 Author: imp Date: Sat Jan 9 18:09:30 2010 New Revision: 201909 URL: http://svn.freebsd.org/changeset/base/201909 Log: Merge from projects/mips to head by hand. Copy over the SWARM.hints file. Added: - copied unchanged from r201908, projects/mips/sys/mips/conf/SWARM.hints Directory Properties: head/sys/mips/conf/SWARM.hints (props changed) Copied: head/sys/mips/conf/SWARM.hints (from r201908, projects/mips/sys/mips/conf/SWARM.hints) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/SWARM.hints Sat Jan 9 18:09:30 2010 (r201909, copy of r201908, projects/mips/sys/mips/conf/SWARM.hints) @@ -0,0 +1,17 @@ +# $FreeBSD$ +hint.zbbus.0.at="nexus0" +hint.zbpci.0.at="zbbus0" +hint.scd.0.at="zbbus0" + +# +# SWARM IDE interface is on the generic bus at chip select 4. +# The CS4 region is 64KB in size and starts at 0x100B0000. +# The IDE interrupt is wired to GPIO4 (intsrc 36 to the interrupt mapper) +# +hint.ata.0.at="zbbus0" +hint.ata.0.maddr=0x100B0000 +hint.ata.0.msize=0x10000 +hint.ata.0.irq=36 +#hint.ata.0.disabled=0 +#hint.ata.0.regoffset=0x1F0 +#hint.ata.0.regshift=5 From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:10:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C45EB1065697; Sat, 9 Jan 2010 18:10:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AE1D8FC19; Sat, 9 Jan 2010 18:10:46 +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 o09IAkJQ076144; Sat, 9 Jan 2010 18:10:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IAk14076142; Sat, 9 Jan 2010 18:10:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091810.o09IAk14076142@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:10: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: r201910 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:10:46 -0000 Author: imp Date: Sat Jan 9 18:10:46 2010 New Revision: 201910 URL: http://svn.freebsd.org/changeset/base/201910 Log: Merge from projects/mips to head by hand: Copy over the AR71XX config file. Added: - copied unchanged from r201909, projects/mips/sys/mips/conf/AR71XX Directory Properties: head/sys/mips/conf/AR71XX (props changed) Copied: head/sys/mips/conf/AR71XX (from r201909, projects/mips/sys/mips/conf/AR71XX) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AR71XX Sat Jan 9 18:10:46 2010 (r201910, copy of r201909, projects/mips/sys/mips/conf/AR71XX) @@ -0,0 +1,86 @@ +# +# $FreeBSD$ +# + +ident AR71XX +cpu CPU_MIPS4KC +options ISA_MIPS32 +makeoptions TARGET_BIG_ENDIAN +makeoptions KERNLOADADDR=0x80050000 +options HZ=1000 + +files "../atheros/files.ar71xx" +hints "AR71XX.hints" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="" + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# options NFS_LEGACYRPC +# Debugging for use in -current +# options INVARIANTS +# options INVARIANT_SUPPORT +# options WITNESS +# options WITNESS_SKIPSPIN +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories + + +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=arge0 +options BOOTP_COMPAT +options ROOTDEVNAME=\"nfs:192.168.10.1:/mnt/bsd\" + +device pci + +# Wireless NIC cards +options IEEE80211_DEBUG +options IEEE80211_SUPPORT_MESH +options IEEE80211_SUPPORT_TDMA +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support + +device ath # Atheros pci/cardbus NIC's +options ATH_DEBUG +device ath_hal +option AH_SUPPORT_AR5416 +device ath_rate_sample + +device mii +device arge + +# device usb +# options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order +# options USB_DEBUG +# device ehci + +device spibus +device ar71xx_spi +device mx25l +# device geom_redboot + +device ar71xx_wdog + +device uart + +device loop +device ether +device md +device bpf +device random +device if_bridge From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:11:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75AEE106568D; Sat, 9 Jan 2010 18:11:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64F138FC1D; Sat, 9 Jan 2010 18:11:45 +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 o09IBjUO076424; Sat, 9 Jan 2010 18:11:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IBjnv076422; Sat, 9 Jan 2010 18:11:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091811.o09IBjnv076422@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:11: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: r201911 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:11:45 -0000 Author: imp Date: Sat Jan 9 18:11:45 2010 New Revision: 201911 URL: http://svn.freebsd.org/changeset/base/201911 Log: Merge from projects/mips to head by hand: Copy over AR71XX.hints file. Added: - copied unchanged from r201910, projects/mips/sys/mips/conf/AR71XX.hints Directory Properties: head/sys/mips/conf/AR71XX.hints (props changed) Copied: head/sys/mips/conf/AR71XX.hints (from r201910, projects/mips/sys/mips/conf/AR71XX.hints) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AR71XX.hints Sat Jan 9 18:11:45 2010 (r201911, copy of r201910, projects/mips/sys/mips/conf/AR71XX.hints) @@ -0,0 +1,59 @@ +# $FreeBSD$ +hint.apb.0.at="nexus0" +hint.apb.0.irq=4 + +# uart0 +hint.uart.0.at="apb0" +# see atheros/uart_cpu_ar71xx.c why +3 +hint.uart.0.maddr=0x18020003 +hint.uart.0.msize=0x18 +hint.uart.0.irq=3 + +#ohci +hint.ohci.0.at="apb0" +hint.ohci.0.maddr=0x1c000000 +hint.ohci.0.msize=0x01000000 +hint.ohci.0.irq=6 + +#ehci +hint.ehci.0.at="nexus0" +hint.ehci.0.maddr=0x1b000000 +hint.ehci.0.msize=0x01000000 +hint.ehci.0.irq=1 + +# pci +hint.pcib.0.at="nexus0" +hint.pcib.0.irq=0 + +hint.arge.0.at="nexus0" +hint.arge.0.maddr=0x19000000 +hint.arge.0.msize=0x1000 +hint.arge.0.irq=2 +# PHY4 = 1 << 4 +hint.arge.0.phymask=0x10 +# Uncomment this hint for RS (not PRO) +# PHY20 = 1 << 20 +# hint.arge.0.phymask=0x100000 + +hint.arge.1.at="nexus0" +hint.arge.1.maddr=0x1a000000 +hint.arge.1.msize=0x1000 +hint.arge.1.irq=3 +# PHY1, PHY2, PHY3 +hint.arge.1.phymask=0x0e +# should be 100 for RS +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 +# Uncomment this hint for RS (not PRO) +# hint.arge.0.phymask=70000 + +# SPI flash +hint.spi.0.at="nexus0" +hint.spi.0.maddr=0x1f000000 +hint.spi.0.msize=0x10 + +hint.mx25l.0.at="spibus0" +hint.mx25l.0.cs=0 + +# Watchdog +hint.ar71xx_wdog.0.at="nexus0" From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:13:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF801065670; Sat, 9 Jan 2010 18:13:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4768FC16; Sat, 9 Jan 2010 18:13:14 +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 o09IDEbk076756; Sat, 9 Jan 2010 18:13:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IDEwP076755; Sat, 9 Jan 2010 18:13:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091813.o09IDEwP076755@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:13: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: r201912 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:13:14 -0000 Author: imp Date: Sat Jan 9 18:13:13 2010 New Revision: 201912 URL: http://svn.freebsd.org/changeset/base/201912 Log: Merge from projects/mips to head by hand: Copy over OCTEON1-32 file: the 32-bit variant of the octeon kernel config file. Added: - copied unchanged from r201911, projects/mips/sys/mips/conf/OCTEON1-32 Directory Properties: head/sys/mips/conf/OCTEON1-32 (props changed) Copied: head/sys/mips/conf/OCTEON1-32 (from r201911, projects/mips/sys/mips/conf/OCTEON1-32) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/OCTEON1-32 Sat Jan 9 18:13:13 2010 (r201912, copy of r201911, projects/mips/sys/mips/conf/OCTEON1-32) @@ -0,0 +1,92 @@ +# OCTEON1 -- Configuration kernel for all Octeon1 SoCs from Cavium Networks +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +machine mips +cpu CPU_MIPS4KC +ident OCTEON1 + +#makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" +#makeoptions LDSCRIPT_NAME= ldscript.mips.mips64 + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" +makeoptions TARGET_BIG_ENDIAN=defined +makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1.32 +#makeoptions TARGET_64BIT=defined + +options KERNVIRTADDR=0x80100000 +makeoptions KERNLOADADDR=0x80100000 +include "../octeon1/std.octeon1" + +hints "OCTEON1.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +#XXXimp: Need to make work with 64-bit too +#options ISA_MIPS64 +options ISA_MIPS32 + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +#options ROOTDEVNAME=\"ufs:ad0s1a\" # Original +options NO_SWAPPING + + +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories + + +# Debugging for use in -current +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +#XXXimp device genclock +device loop +device ether +device md +device uart +nodevice uart_ns8250 +device rgmii +#options VERBOSE_SYSINIT + + +# +# Use the following for Compact Flash file-system +device cf +options ROOTDEVNAME = \"ufs:cf0s2\" # Unmask if compact flash is needed as RFS + +# +# Use the following for RFS in mem-device +#options MD_ROOT +#options ROOTDEVNAME = \"ufs:md0\" + +#options MD_ROOT_SIZE = 21264 +#XXX: Bring up UP first, then generalize. +#options SMP From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:14:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C5E106568F; Sat, 9 Jan 2010 18:14:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7258A8FC1D; Sat, 9 Jan 2010 18:14: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 o09IERHd077055; Sat, 9 Jan 2010 18:14:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IEROb077054; Sat, 9 Jan 2010 18:14:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091814.o09IEROb077054@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:14: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: r201913 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:14:27 -0000 Author: imp Date: Sat Jan 9 18:14:27 2010 New Revision: 201913 URL: http://svn.freebsd.org/changeset/base/201913 Log: Merge from projects/mips to head by hand: Copy over OCTEON1.hints file. Added: - copied unchanged from r201912, projects/mips/sys/mips/conf/OCTEON1.hints Directory Properties: head/sys/mips/conf/OCTEON1.hints (props changed) Copied: head/sys/mips/conf/OCTEON1.hints (from r201912, projects/mips/sys/mips/conf/OCTEON1.hints) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/OCTEON1.hints Sat Jan 9 18:14:27 2010 (r201913, copy of r201912, projects/mips/sys/mips/conf/OCTEON1.hints) @@ -0,0 +1,13 @@ +# /* +# * This product includes software developed by the University of + +# * California, Berkeley and its contributors." +# */ +# device.hints +hw.uart.console="io:0x1" +hint.obio.0.at="nexus" +hint.obio.0.maddr="0x1" +hint.obio.0.flags="0x1" +hint.uart.0.at="obio" +hint.uart.0.maddr="0x1" +hint.uart.0.flags="0x1" From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:14:35 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D2FC106568B; Sat, 9 Jan 2010 18:14:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 411388FC14; Sat, 9 Jan 2010 18:14:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o09I79cD023114; Sat, 9 Jan 2010 11:07:09 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 09 Jan 2010 11:07:58 -0700 (MST) Message-Id: <20100109.110758.29593248145802975.imp@bsdimp.com> To: bz@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20100109173314.V50938@maildrop.int.zabbadoz.net> References: <20100110.001429.173527971.nyan@FreeBSD.org> <20100109.100512.623571555980925615.imp@bsdimp.com> <20100109173314.V50938@maildrop.int.zabbadoz.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) 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, nyan@FreeBSD.org Subject: Re: svn commit: r201815 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:14:35 -0000 In message: <20100109173314.V50938@maildrop.int.zabbadoz.net> "Bjoern A. Zeeb" writes: : On Sat, 9 Jan 2010, M. Warner Losh wrote: : : > In message: <20100110.001429.173527971.nyan@FreeBSD.org> : > TAKAHASHI Yoshihiro writes: : > : In article <201001081901.o08J1pjc062909@svn.freebsd.org> : > : "Bjoern A. Zeeb" writes: : > : : > : > To avoid hardcoding further kernel configuration names for : > : > make universe, split the logic into two parts: : > : > - 1st to build worlds and generate kernel configs like LINT. : > : > - 2nd to build kernels for a given TARGET architecture correctly : > : > finding all newly generated configs, not knowing anything about : > : > LINT anymore. (*) : > : : > : > +universe_kernels: universe_kernconfs : > : > +BUILD_ARCH!= uname -p : > : : > : Should this be "uname -m"? : > : : > : : > : > +TARGET?= ${BUILD_ARCH} : > : > +KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ : > : > + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ : > : > + ! -name DEFAULTS ! -name NOTES : > : > Yes. Also, the name BUILD_ARCH is misleading, since it corresponds to : > MACHINE, not to MACHINE_ARCH. it is clear that it is used in the : > MACHINE context, not the MACHINE_ARCH context. : > : > These two are often confused, but many of the embedded platforms have : > added to the confusion and it is unclear where the sharp dividing line : > should be here anymore. It used to be separate boot environment, but : > even that has gotten fuzzy for architectures like mips and arm that : > boot with a huge variety of boot loaders... : : I guess the intial problem I had it from was introduced in r54311 to : Makefile.inc1, which nowadays reads like: : : BUILD_ARCH!= uname -p : : : So, the suggested correction would be: : : MACHINE!= uname -m : : I wonder if I should use XMACHINE but that usually means : "cross"(building). I could use _MACHINE!= to not confuse it with : MACHINE from Makefile.inc1? XMACHINE might be best. MACHINE and MACHINE_ARCH are really magic and special and shouldn't ever be set (well, almost never). Warner From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:15:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DFD71065694; Sat, 9 Jan 2010 18:15:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D5528FC14; Sat, 9 Jan 2010 18:15:29 +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 o09IFTH7077338; Sat, 9 Jan 2010 18:15:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IFTgr077336; Sat, 9 Jan 2010 18:15:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091815.o09IFTgr077336@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:15: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: r201914 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:15:29 -0000 Author: imp Date: Sat Jan 9 18:15:28 2010 New Revision: 201914 URL: http://svn.freebsd.org/changeset/base/201914 Log: Merge from projects/mips to head by hand: Copy over the OCTEON1 kernel config file. This is the 64-bit version. Added: - copied unchanged from r201913, projects/mips/sys/mips/conf/OCTEON1 Directory Properties: head/sys/mips/conf/OCTEON1 (props changed) Copied: head/sys/mips/conf/OCTEON1 (from r201913, projects/mips/sys/mips/conf/OCTEON1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/OCTEON1 Sat Jan 9 18:15:28 2010 (r201914, copy of r201913, projects/mips/sys/mips/conf/OCTEON1) @@ -0,0 +1,90 @@ +# OCTEON1 -- Configuration kernel for all Octeon1 SoCs from Cavium Networks +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +machine mips +cpu CPU_MIPS4KC +ident OCTEON1 + +makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" +makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1.64 + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" +makeoptions TARGET_BIG_ENDIAN=defined +makeoptions TARGET_64BIT=defined +makeoptions KERNLOADADDR=0xffffffff80100000 + +options KERNVIRTADDR=0xffffffff80100000 +include "../octeon1/std.octeon1" + +hints "OCTEON1.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +#XXXimp: Need to make work with 64-bit too +options ISA_MIPS64 + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +#options ROOTDEVNAME=\"ufs:ad0s1a\" # Original +options NO_SWAPPING + + +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories + + +# Debugging for use in -current +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +#XXXimp device genclock +device loop +device ether +device md +device uart +nodevice uart_ns8250 +device rgmii +#options VERBOSE_SYSINIT + + +# +# Use the following for Compact Flash file-system +device cf +options ROOTDEVNAME = \"ufs:cf0s2\" # Unmask if compact flash is needed as RFS + +# +# Use the following for RFS in mem-device +#options MD_ROOT +#options ROOTDEVNAME = \"ufs:md0\" + +#options MD_ROOT_SIZE = 21264 +#XXX: Bring up UP first, then generalize. +#options SMP From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:17:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC712106566C; Sat, 9 Jan 2010 18:17:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B6138FC08; Sat, 9 Jan 2010 18:17:39 +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 o09IHdXa077871; Sat, 9 Jan 2010 18:17:39 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IHdW4077870; Sat, 9 Jan 2010 18:17:39 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091817.o09IHdW4077870@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:17: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: r201915 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:17:39 -0000 Author: imp Date: Sat Jan 9 18:17:39 2010 New Revision: 201915 URL: http://svn.freebsd.org/changeset/base/201915 Log: Merge from projects/mips to head by hand: Copy over XLR kernel config file. Added: - copied unchanged from r201914, projects/mips/sys/mips/conf/XLR Directory Properties: head/sys/mips/conf/XLR (props changed) Copied: head/sys/mips/conf/XLR (from r201914, projects/mips/sys/mips/conf/XLR) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/XLR Sat Jan 9 18:17:39 2010 (r201915, copy of r201914, projects/mips/sys/mips/conf/XLR) @@ -0,0 +1,160 @@ +#################################RMI_BSD##################################### +# Copyright (c) 2003-2009 RMI Corporation +# 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. +# 3. Neither the name of RMI Corporation, 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 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. +#################################RMI_BSD##################################### +# XLR -- Generic kernel configuration file for FreeBSD/mips +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +machine mips +cpu CPU_MIPS4KC +ident XLR + +makeoptions MODULES_OVERRIDE="" +makeoptions TARGET_BIG_ENDIAN +# + +options KERNVIRTADDR=0x80100000 +include "../rmi/std.xlr" + + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#profile 2 + +#options SCHED_ULE # ULE scheduler +#options VERBOSE_SYSINIT +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +#options FULL_PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +#options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options NFSCLIENT +options NFS_ROOT +# +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=rge0 +options BOOTP_COMPAT +options ROOTDEVNAME=\"nfs:10.1.1.15:/extra/nfsroot\" +# +#options MD_ROOT # MD is a potential root device +#options MD_ROOT_SIZE=21264 +#options MD_ROOT_SIZE=5120 +#options ROOTDEVNAME=\"ufs:md0\" +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options HZ=1000 +options PHYS_ADDR_64BIT +options NO_SWAPPING + +#Debugging options +options KTRACE # ktrace(1) support +options DDB +options KDB +options GDB +options ALT_BREAK_TO_DEBUGGER +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options KTR # ktr(4) and ktrdump(8) support +#options KTR_COMPILE=(KTR_LOCK|KTR_PROC|KTR_INTR|KTR_CALLOUT|KTR_UMA|KTR_SYSC|KTR_CRITICAL) +#options KTR_ENTRIES=131072 +#options MUTEX_DEBUG +#options MUTEX_PROFILING + +device pci +#device ata +#device atadisk +#options XLR_PERFMON # Enable XLR processor activity monitoring + +#device genclock +device uart + +# Pseudo +device loop +device random +device md +device mem +device pty +device bpf + +# Network +device miibus +device rge +device ether +device re +device msk + +device da +device scbus +#device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface (USB 2.0) +device usb # USB Bus (required) +#device udbp # USB Double Bulk Pipe devices +#device ugen # Generic +#device uhid # "Human Interface Devices" +device umass # Disks/Mass storage - Requires scbus and da + +#device cfi + +#i2c +# Not yet +#device ic +#device iic +#device iicbb +#device iicbus +#device xlr_rtc +#device xlr_temperature +#device xlr_eeprom + +#crypto +# Not yet +#device cryptodev +#device crypto +#device rmisec +options ISA_MIPS32 +makeoptions KERNLOADADDR=0x80100000 From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:19:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF1A2106566C; Sat, 9 Jan 2010 18:19:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE6DE8FC13; Sat, 9 Jan 2010 18:19:31 +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 o09IJVlC078303; Sat, 9 Jan 2010 18:19:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IJVRw078301; Sat, 9 Jan 2010 18:19:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091819.o09IJVRw078301@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:19: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: r201916 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:19:32 -0000 Author: imp Date: Sat Jan 9 18:19:31 2010 New Revision: 201916 URL: http://svn.freebsd.org/changeset/base/201916 Log: Merge from projects/mips to head by hand: Copy over MALTA64, the 64-bit varianat of the malta board... Added: - copied unchanged from r201915, projects/mips/sys/mips/conf/MALTA64 Directory Properties: head/sys/mips/conf/MALTA64 (props changed) Copied: head/sys/mips/conf/MALTA64 (from r201915, projects/mips/sys/mips/conf/MALTA64) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/MALTA64 Sat Jan 9 18:19:31 2010 (r201916, copy of r201915, projects/mips/sys/mips/conf/MALTA64) @@ -0,0 +1,72 @@ +# MALTA -- Kernel config for MALTA boards +# +# For more information on this file, please read the handbook section on +# Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD: projects/mips/sys/mips/conf/MALTA 192819 2009-05-26 17:01:12Z gonzo $ + +ident MALTA + +makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" +makeoptions MIPS_LITTLE_ENDIAN=defined +makeoptions TARGET_64BIT=t +makeoptions LDSCRIPT_NAME= ldscript.mips.mips64 + +options YAMON + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" + +options KERNVIRTADDR=0x80100000 +options TICK_USE_YAMON_FREQ=defined +#options TICK_USE_MALTA_RTC=defined + +include "../malta/std.malta" + +options ISA_MIPS64 + +hints "MALTA.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCLIENT #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCLIENT +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options ROOTDEVNAME=\"ufs:ad0s1a\" + + +# Debugging for use in -current +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +device loop +device ether +device le +device miibus +device md +device uart From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:29:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78E6B1065679; Sat, 9 Jan 2010 18:29:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F8538FC12; Sat, 9 Jan 2010 18:29:35 +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 o09ITZ4L080589; Sat, 9 Jan 2010 18:29:35 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09ITZ6l080588; Sat, 9 Jan 2010 18:29:35 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091829.o09ITZ6l080588@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:29: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: r201917 - head/sys/mips/rmi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:29:35 -0000 Author: imp Date: Sat Jan 9 18:29:35 2010 New Revision: 201917 URL: http://svn.freebsd.org/changeset/base/201917 Log: Merge from projects/mips to head by hand: Copy over the support files (except sys/conf and sys/mips/conf) for RMI XLR processor support. This port has been contributed by RMI and brought up to date by Randal Stewart (rrs@). This port is a work in progress, and there might still be significant changes. The port makes it to multi-user, but is still early beta. Added: - copied from r201916, projects/mips/sys/mips/rmi/ Directory Properties: head/sys/mips/rmi/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:51:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5BF8106566B; Sat, 9 Jan 2010 18:51:50 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A53088FC13; Sat, 9 Jan 2010 18:51:50 +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 o09Ipog8085467; Sat, 9 Jan 2010 18:51:50 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09IpoHu085465; Sat, 9 Jan 2010 18:51:50 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091851.o09IpoHu085465@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 18:51:50 +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: r201918 - head/kerberos5/usr.bin/kdestroy X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:51:50 -0000 Author: antoine Date: Sat Jan 9 18:51:50 2010 New Revision: 201918 URL: http://svn.freebsd.org/changeset/base/201918 Log: Fix a typo. MFC after: 1 month Modified: head/kerberos5/usr.bin/kdestroy/Makefile Modified: head/kerberos5/usr.bin/kdestroy/Makefile ============================================================================== --- head/kerberos5/usr.bin/kdestroy/Makefile Sat Jan 9 18:29:35 2010 (r201917) +++ head/kerberos5/usr.bin/kdestroy/Makefile Sat Jan 9 18:51:50 2010 (r201918) @@ -2,7 +2,7 @@ PROG= kdestroy CFLAGS+=-I${KRB5DIR}/lib/roken -DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509) ${LIBROKEN} ${LIBVERS} \ +DPADD= ${LIBKAFS5} ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} LDADD= -lkafs5 -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:53:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73B71065672; Sat, 9 Jan 2010 18:53:03 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D69F88FC08; Sat, 9 Jan 2010 18:53:03 +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 o09Ir3V0085763; Sat, 9 Jan 2010 18:53:03 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09Ir3Hx085761; Sat, 9 Jan 2010 18:53:03 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091853.o09Ir3Hx085761@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 18:53: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: r201919 - head/kerberos5/usr.bin/kpasswd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:53:04 -0000 Author: antoine Date: Sat Jan 9 18:53:03 2010 New Revision: 201919 URL: http://svn.freebsd.org/changeset/base/201919 Log: Fix a typo. MFC after: 1 month Modified: head/kerberos5/usr.bin/kpasswd/Makefile Modified: head/kerberos5/usr.bin/kpasswd/Makefile ============================================================================== --- head/kerberos5/usr.bin/kpasswd/Makefile Sat Jan 9 18:51:50 2010 (r201918) +++ head/kerberos5/usr.bin/kpasswd/Makefile Sat Jan 9 18:53:03 2010 (r201919) @@ -2,7 +2,7 @@ PROG= kpasswd CFLAGS+=-I${KRB5DIR}/lib/roken -DPADD= ${LIBKRB5} ${LIBHX509 ${LIBROKEN} ${LIBVERS} \ +DPADD= ${LIBKRB5} ${LIBHX509} ${LIBROKEN} ${LIBVERS} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} LDADD= -lkrb5 -lhx509 -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:55:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F07D8106568F; Sat, 9 Jan 2010 18:55:29 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E02F58FC16; Sat, 9 Jan 2010 18:55:29 +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 o09ItT9H086343; Sat, 9 Jan 2010 18:55:29 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09ItTh1086341; Sat, 9 Jan 2010 18:55:29 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091855.o09ItTh1086341@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 18:55: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: r201920 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:55:30 -0000 Author: antoine Date: Sat Jan 9 18:55:29 2010 New Revision: 201920 URL: http://svn.freebsd.org/changeset/base/201920 Log: libusb20 was renamed libusb several months ago. MFC after: 1 month Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sat Jan 9 18:53:03 2010 (r201919) +++ head/share/mk/bsd.libnames.mk Sat Jan 9 18:55:29 2010 (r201920) @@ -150,7 +150,7 @@ LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a -LIBUSB20?= ${DESTDIR}${LIBDIR}/libusb20.a +LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a LIBUUTIL?= ${DESTDIR}${LIBDIR}/libuutil.a From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:59:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622831065672; Sat, 9 Jan 2010 18:59:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5215E8FC0C; Sat, 9 Jan 2010 18:59:03 +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 o09Ix3sg087174; Sat, 9 Jan 2010 18:59:03 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09Ix3dm087173; Sat, 9 Jan 2010 18:59:03 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001091859.o09Ix3dm087173@svn.freebsd.org> From: Warner Losh Date: Sat, 9 Jan 2010 18:59: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: r201921 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:59:03 -0000 Author: imp Date: Sat Jan 9 18:59:03 2010 New Revision: 201921 URL: http://svn.freebsd.org/changeset/base/201921 Log: Merge from projects/mips to head by hand: Copy the support files for the Octeon 1 CPU from sys/mips/octeon1 on the projects/mips side to sys/mips/cavium on the head side to conform to the other vendor code. This code was contributed by Cavium to the project and forward ported by Warner Losh, with some additional code from Randal Stewart. # I'll fix the building problems the move creates in a future commit. Added: - copied from r201919, projects/mips/sys/mips/octeon1/ Directory Properties: head/sys/mips/cavium/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 18:59:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B71051065676; Sat, 9 Jan 2010 18:59:03 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A70278FC14; Sat, 9 Jan 2010 18:59:03 +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 o09Ix3if087189; Sat, 9 Jan 2010 18:59:03 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09Ix31D087187; Sat, 9 Jan 2010 18:59:03 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091859.o09Ix31D087187@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 18:59: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: r201922 - head/usr.sbin/usbconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 18:59:03 -0000 Author: antoine Date: Sat Jan 9 18:59:03 2010 New Revision: 201922 URL: http://svn.freebsd.org/changeset/base/201922 Log: Add missing library dependency. MFC after: 1 month Modified: head/usr.sbin/usbconfig/Makefile Modified: head/usr.sbin/usbconfig/Makefile ============================================================================== --- head/usr.sbin/usbconfig/Makefile Sat Jan 9 18:59:03 2010 (r201921) +++ head/usr.sbin/usbconfig/Makefile Sat Jan 9 18:59:03 2010 (r201922) @@ -4,6 +4,7 @@ PROG= usbconfig MAN= usbconfig.8 SRCS= usbconfig.c dump.c +DPADD+= ${LIBUSB} LDADD+= -lusb .include From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:02:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B9A1065670; Sat, 9 Jan 2010 19:02:33 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C64F18FC17; Sat, 9 Jan 2010 19:02:33 +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 o09J2Xn1088002; Sat, 9 Jan 2010 19:02:33 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09J2Xfh088000; Sat, 9 Jan 2010 19:02:33 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091902.o09J2Xfh088000@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:02: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: r201923 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:02:33 -0000 Author: antoine Date: Sat Jan 9 19:02:33 2010 New Revision: 201923 URL: http://svn.freebsd.org/changeset/base/201923 Log: Add files to remove when MK_ACCT=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 18:59:03 2010 (r201922) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:02:33 2010 (r201923) @@ -5,6 +5,17 @@ # the check-old and delete-old* targets. # +.if ${MK_ACCT} == no +OLD_FILES+=etc/periodic/daily/310.accounting +OLD_FILES+=etc/periodic/monthly/200.accounting +OLD_FILES+=usr/sbin/ac +OLD_FILES+=usr/sbin/accton +OLD_FILES+=usr/sbin/sa +OLD_FILES+=usr/share/man/man8/ac.8.gz +OLD_FILES+=usr/share/man/man8/accton.8.gz +OLD_FILES+=usr/share/man/man8/sa.8.gz +.endif + .if ${MK_ACPI} == no OLD_FILES+=usr/sbin/acpiconf OLD_FILES+=usr/sbin/acpidb From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:03:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 483D9106566C; Sat, 9 Jan 2010 19:03: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 384A88FC17; Sat, 9 Jan 2010 19:03:49 +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 o09J3nPI088306; Sat, 9 Jan 2010 19:03:49 GMT (envelope-from fjoe@svn.freebsd.org) Received: (from fjoe@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09J3ngu088304; Sat, 9 Jan 2010 19:03:49 GMT (envelope-from fjoe@svn.freebsd.org) Message-Id: <201001091903.o09J3ngu088304@svn.freebsd.org> From: Max Khon Date: Sat, 9 Jan 2010 19:03: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: r201924 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:03:49 -0000 Author: fjoe Date: Sat Jan 9 19:03:48 2010 New Revision: 201924 URL: http://svn.freebsd.org/changeset/base/201924 Log: Send link state change control messages to "orphans" hook as well. MFC after: 1 week Modified: head/sys/netgraph/ng_ether.c Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Sat Jan 9 19:02:33 2010 (r201923) +++ head/sys/netgraph/ng_ether.c Sat Jan 9 19:03:48 2010 (r201924) @@ -359,9 +359,6 @@ ng_ether_link_state(struct ifnet *ifp, i struct ng_mesg *msg; int cmd, dummy_error = 0; - if (priv->lower == NULL) - return; - if (state == LINK_STATE_UP) cmd = NGM_LINK_IS_UP; else if (state == LINK_STATE_DOWN) @@ -369,9 +366,16 @@ ng_ether_link_state(struct ifnet *ifp, i else return; - NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); - if (msg != NULL) - NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0); + if (priv->lower != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->lower, 0); + } + if (priv->orphan != NULL) { + NG_MKMESSAGE(msg, NGM_FLOW_COOKIE, cmd, 0, M_NOWAIT); + if (msg != NULL) + NG_SEND_MSG_HOOK(dummy_error, node, msg, priv->orphan, 0); + } } /****************************************************************** From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:04:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790A61065697; Sat, 9 Jan 2010 19:04:38 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B468FC0C; Sat, 9 Jan 2010 19:04:38 +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 o09J4cTM088534; Sat, 9 Jan 2010 19:04:38 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09J4cb0088532; Sat, 9 Jan 2010 19:04:38 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091904.o09J4cb0088532@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:04: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: r201925 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:04:38 -0000 Author: antoine Date: Sat Jan 9 19:04:38 2010 New Revision: 201925 URL: http://svn.freebsd.org/changeset/base/201925 Log: Add files to remove when MK_AMD=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:03:48 2010 (r201924) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:04:38 2010 (r201925) @@ -27,6 +27,29 @@ OLD_FILES+=usr/share/man/man8/acpidump.8 OLD_FILES+=usr/share/man/man8/iasl.8.gz .endif +.if ${MK_AMD} == no +OLD_FILES+=etc/amd.map +OLD_FILES+=usr/bin/pawd +OLD_FILES+=usr/sbin/amd +OLD_FILES+=usr/sbin/amq +OLD_FILES+=usr/sbin/fixmount +OLD_FILES+=usr/sbin/fsinfo +OLD_FILES+=usr/sbin/hlfsd +OLD_FILES+=usr/sbin/mk-amd-map +OLD_FILES+=usr/sbin/wire-test +OLD_FILES+=usr/share/examples/etc/amd.map +OLD_FILES+=usr/share/info/am-utils.info.gz +OLD_FILES+=usr/share/man/man1/pawd.1.gz +OLD_FILES+=usr/share/man/man5/amd.conf.5.gz +OLD_FILES+=usr/share/man/man8/amd.8.gz +OLD_FILES+=usr/share/man/man8/amq.8.gz +OLD_FILES+=usr/share/man/man8/fixmount.8.gz +OLD_FILES+=usr/share/man/man8/fsinfo.8.gz +OLD_FILES+=usr/share/man/man8/hlfsd.8.gz +OLD_FILES+=usr/share/man/man8/mk-amd-map.8.gz +OLD_FILES+=usr/share/man/man8/wire-test.8.gz +.endif + #.if ${MK_ATM} == no # to be filled in #.endif From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:07:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12E9A1065670; Sat, 9 Jan 2010 19:07:05 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02D268FC16; Sat, 9 Jan 2010 19:07: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 o09J74MI089111; Sat, 9 Jan 2010 19:07:04 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09J74gs089109; Sat, 9 Jan 2010 19:07:04 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091907.o09J74gs089109@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:07: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: r201926 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:07:05 -0000 Author: antoine Date: Sat Jan 9 19:07:04 2010 New Revision: 201926 URL: http://svn.freebsd.org/changeset/base/201926 Log: Add files to remove when MK_APM=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:04:38 2010 (r201925) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:07:04 2010 (r201926) @@ -50,6 +50,14 @@ OLD_FILES+=usr/share/man/man8/mk-amd-map OLD_FILES+=usr/share/man/man8/wire-test.8.gz .endif +.if ${MK_APM} == no +OLD_FILES+=etc/apmd.conf +OLD_FILES+=usr/sbin/apm +OLD_FILES+=usr/share/examples/etc/apmd.conf +OLD_FILES+=usr/share/man/man8/amd64/apm.8.gz +OLD_FILES+=usr/share/man/man8/amd64/apmconf.8.gz +.endif + #.if ${MK_ATM} == no # to be filled in #.endif From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:09:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C03C106566B; Sat, 9 Jan 2010 19:09:16 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B85A8FC0C; Sat, 9 Jan 2010 19:09:16 +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 o09J9GsR089636; Sat, 9 Jan 2010 19:09:16 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09J9GYt089634; Sat, 9 Jan 2010 19:09:16 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091909.o09J9GYt089634@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:09: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: r201927 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:09:16 -0000 Author: antoine Date: Sat Jan 9 19:09:16 2010 New Revision: 201927 URL: http://svn.freebsd.org/changeset/base/201927 Log: Add files to remove when MK_AT=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:07:04 2010 (r201926) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:09:16 2010 (r201927) @@ -58,6 +58,19 @@ OLD_FILES+=usr/share/man/man8/amd64/apm. OLD_FILES+=usr/share/man/man8/amd64/apmconf.8.gz .endif +.if ${MK_AT} == no +OLD_FILES+=usr/bin/at +OLD_FILES+=usr/bin/atq +OLD_FILES+=usr/bin/atrm +OLD_FILES+=usr/bin/batch +OLD_FILES+=usr/libexec/atrun +OLD_FILES+=usr/share/man/man1/at.1.gz +OLD_FILES+=usr/share/man/man1/atq.1.gz +OLD_FILES+=usr/share/man/man1/atrm.1.gz +OLD_FILES+=usr/share/man/man1/batch.1.gz +OLD_FILES+=usr/share/man/man8/atrun.8.gz +.endif + #.if ${MK_ATM} == no # to be filled in #.endif From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:12:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5606A106566C; Sat, 9 Jan 2010 19:12:33 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 457308FC14; Sat, 9 Jan 2010 19:12:33 +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 o09JCXFH090390; Sat, 9 Jan 2010 19:12:33 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09JCXr2090388; Sat, 9 Jan 2010 19:12:33 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091912.o09JCXr2090388@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:12: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: r201928 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:12:33 -0000 Author: antoine Date: Sat Jan 9 19:12:33 2010 New Revision: 201928 URL: http://svn.freebsd.org/changeset/base/201928 Log: Add files to remove when MK_ATM=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:09:16 2010 (r201927) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:12:33 2010 (r201928) @@ -71,9 +71,58 @@ OLD_FILES+=usr/share/man/man1/batch.1.gz OLD_FILES+=usr/share/man/man8/atrun.8.gz .endif -#.if ${MK_ATM} == no -# to be filled in -#.endif +.if ${MK_ATM} == no +OLD_FILES+=rescue/atmconfig +OLD_FILES+=sbin/atmconfig +OLD_FILES+=usr/bin/sscop +OLD_FILES+=usr/include/bsnmp/snmp_atm.h +OLD_FILES+=usr/include/netnatm/addr.h +OLD_FILES+=usr/include/netnatm/api/atmapi.h +OLD_FILES+=usr/include/netnatm/api/ccatm.h +OLD_FILES+=usr/include/netnatm/api/unisap.h +OLD_FILES+=usr/include/netnatm/msg/uni_config.h +OLD_FILES+=usr/include/netnatm/msg/uni_hdr.h +OLD_FILES+=usr/include/netnatm/msg/uni_ie.h +OLD_FILES+=usr/include/netnatm/msg/uni_msg.h +OLD_FILES+=usr/include/netnatm/msg/unimsglib.h +OLD_FILES+=usr/include/netnatm/msg/uniprint.h +OLD_FILES+=usr/include/netnatm/msg/unistruct.h +OLD_FILES+=usr/include/netnatm/saal/sscfu.h +OLD_FILES+=usr/include/netnatm/saal/sscfudef.h +OLD_FILES+=usr/include/netnatm/saal/sscop.h +OLD_FILES+=usr/include/netnatm/saal/sscopdef.h +OLD_FILES+=usr/include/netnatm/sig/uni.h +OLD_FILES+=usr/include/netnatm/sig/unidef.h +OLD_FILES+=usr/include/netnatm/sig/unisig.h +OLD_FILES+=usr/include/netnatm/unimsg.h +OLD_FILES+=usr/lib/libngatm.a +OLD_FILES+=usr/lib/libngatm.so +OLD_LIBS+=usr/lib/libngatm.so.4 +OLD_FILES+=usr/lib/libngatm_p.a +OLD_FILES+=usr/lib/snmp_atm.so +OLD_LIBS+=usr/lib/snmp_atm.so.6 +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/libngatm.a +OLD_FILES+=usr/lib32/libngatm.so +OLD_LIBS+=usr/lib32/libngatm.so.4 +OLD_FILES+=usr/lib32/libngatm_p.a +.endif +OLD_FILES+=usr/share/doc/atm/atmconfig.help +OLD_FILES+=usr/share/doc/atm/atmconfig_device.help +OLD_FILES+=usr/share/man/man1/sscop.1.gz +OLD_FILES+=usr/share/man/man3/libngatm.3.gz +OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz +OLD_FILES+=usr/share/man/man3/uniaddr.3.gz +OLD_FILES+=usr/share/man/man3/unifunc.3.gz +OLD_FILES+=usr/share/man/man3/unimsg.3.gz +OLD_FILES+=usr/share/man/man3/unisap.3.gz +OLD_FILES+=usr/share/man/man3/unistruct.3.gz +OLD_FILES+=usr/share/man/man8/atmconfig.8.gz +OLD_FILES+=usr/share/snmp/defs/atm_freebsd.def +OLD_FILES+=usr/share/snmp/defs/atm_tree.def +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM-FREEBSD-MIB.txt +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-ATM.txt +.endif .if ${MK_AUDIT} == no OLD_FILES+=usr/sbin/audit From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:13:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C01F51065700; Sat, 9 Jan 2010 19:13:56 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFE058FC16; Sat, 9 Jan 2010 19:13:56 +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 o09JDuYI090754; Sat, 9 Jan 2010 19:13:56 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09JDueE090752; Sat, 9 Jan 2010 19:13:56 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091913.o09JDueE090752@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:13:56 +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: r201929 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:13:56 -0000 Author: antoine Date: Sat Jan 9 19:13:56 2010 New Revision: 201929 URL: http://svn.freebsd.org/changeset/base/201929 Log: Add files to remove when MK_AUTHPF=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:12:33 2010 (r201928) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:13:56 2010 (r201929) @@ -135,9 +135,10 @@ OLD_FILES+=usr/share/man/man8/audit.8.gz OLD_FILES+=usr/share/man/man8/auditd.8.gz .endif -#.if ${MK_AUTHPF} == no -# to be filled in -#.endif +.if ${MK_AUTHPF} == no +OLD_FILES+=usr/sbin/authpf +OLD_FILES+=usr/share/man/man8/authpf.8.gz +.endif .if ${MK_BIND} == no OLD_FILES+=usr/bin/dig From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:16:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C9451065672; Sat, 9 Jan 2010 19:16:28 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CF838FC16; Sat, 9 Jan 2010 19:16:28 +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 o09JGSjA091327; Sat, 9 Jan 2010 19:16:28 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09JGRwd091325; Sat, 9 Jan 2010 19:16:27 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001091916.o09JGRwd091325@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 9 Jan 2010 19:16: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: r201930 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:16:28 -0000 Author: ume Date: Sat Jan 9 19:16:27 2010 New Revision: 201930 URL: http://svn.freebsd.org/changeset/base/201930 Log: The client type rule allows DHCP, implicitly. Since DHCPv6 uses link-local address unlike with DHCP, we need one more rule to allow the DHCPv6. Reported by: David Horn Modified: head/etc/rc.firewall Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Sat Jan 9 19:13:56 2010 (r201929) +++ head/etc/rc.firewall Sat Jan 9 19:16:27 2010 (r201930) @@ -220,6 +220,8 @@ case ${firewall_type} in # Allow any link-local multicast traffic ${fwcmd} add pass all from fe80::/10 to ff02::/16 ${fwcmd} add pass all from ${net6} to ff02::/16 + # Allow DHCPv6 + ${fwcmd} add pass udp from fe80::/10 to me6 546 fi # Allow TCP through if setup succeeded From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 19:52:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9416A106566B; Sat, 9 Jan 2010 19:52:42 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82B2D8FC0C; Sat, 9 Jan 2010 19:52:42 +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 o09JqgXe099347; Sat, 9 Jan 2010 19:52:42 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09Jqgvu099345; Sat, 9 Jan 2010 19:52:42 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001091952.o09Jqgvu099345@svn.freebsd.org> From: Antoine Brodin Date: Sat, 9 Jan 2010 19:52:42 +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: r201931 - head/tools/build/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 19:52:42 -0000 Author: antoine Date: Sat Jan 9 19:52:42 2010 New Revision: 201931 URL: http://svn.freebsd.org/changeset/base/201931 Log: Update files to remove when MK_BLUETOOTH=no. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:16:27 2010 (r201930) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 9 19:52:42 2010 (r201931) @@ -338,33 +338,50 @@ OLD_DIRS+=var/named/etc/namedb/dynamic #.endif .if ${MK_BLUETOOTH} == no +OLD_FILES+=etc/bluetooth/hcsecd.conf +OLD_FILES+=etc/bluetooth/hosts +OLD_FILES+=etc/bluetooth/protocols OLD_FILES+=usr/bin/bthost OLD_FILES+=usr/bin/btsockstat OLD_FILES+=usr/bin/rfcomm_sppd +OLD_FILES+=usr/include/bluetooth.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_bluetooth.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_bt3c.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_btsocket.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_btsocket_hci_raw.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_btsocket_l2cap.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_btsocket_rfcomm.h +OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_btsocket_sco.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_h4.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_hci.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_l2cap.h OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_ubt.h OLD_DIRS+=usr/include/netgraph/bluetooth/include OLD_DIRS+=usr/include/netgraph/bluetooth -OLD_FILES+=usr/include/bluetooth.h OLD_FILES+=usr/include/sdp.h OLD_FILES+=usr/lib/libbluetooth.a -OLD_FILES+=usr/lib/libbluetooth_p.a -OLD_LIBS+=usr/lib/libbluetooth.so.2 OLD_FILES+=usr/lib/libbluetooth.so +OLD_LIBS+=usr/lib/libbluetooth.so.4 +OLD_FILES+=usr/lib/libbluetooth_p.a OLD_FILES+=usr/lib/libsdp.a -OLD_FILES+=usr/lib/libsdp_p.a -OLD_LIBS+=usr/lib/libsdp.so.2 OLD_FILES+=usr/lib/libsdp.so +OLD_LIBS+=usr/lib/libsdp.so.4 +OLD_FILES+=usr/lib/libsdp_p.a +.if ${TARGET_ARCH} == "amd64" +OLD_FILES+=usr/lib32/libbluetooth.a +OLD_FILES+=usr/lib32/libbluetooth.so +OLD_LIBS+=usr/lib32/libbluetooth.so.4 +OLD_FILES+=usr/lib32/libbluetooth_p.a +OLD_FILES+=usr/lib32/libsdp.a +OLD_FILES+=usr/lib32/libsdp.so +OLD_LIBS+=usr/lib32/libsdp.so.4 +OLD_FILES+=usr/lib32/libsdp_p.a +.endif OLD_FILES+=usr/sbin/bcmfw OLD_FILES+=usr/sbin/bt3cfw +OLD_FILES+=usr/sbin/bthidcontrol +OLD_FILES+=usr/sbin/bthidd +OLD_FILES+=usr/sbin/btpand OLD_FILES+=usr/sbin/hccontrol OLD_FILES+=usr/sbin/hcsecd OLD_FILES+=usr/sbin/hcseriald @@ -376,45 +393,67 @@ OLD_FILES+=usr/sbin/sdpd OLD_FILES+=usr/share/man/man1/bthost.1.gz OLD_FILES+=usr/share/man/man1/btsockstat.1.gz OLD_FILES+=usr/share/man/man1/rfcomm_sppd.1.gz +OLD_FILES+=usr/share/man/man3/SDP_GET128.3.gz +OLD_FILES+=usr/share/man/man3/SDP_GET16.3.gz +OLD_FILES+=usr/share/man/man3/SDP_GET32.3.gz +OLD_FILES+=usr/share/man/man3/SDP_GET64.3.gz +OLD_FILES+=usr/share/man/man3/SDP_GET8.3.gz +OLD_FILES+=usr/share/man/man3/SDP_PUT128.3.gz +OLD_FILES+=usr/share/man/man3/SDP_PUT16.3.gz +OLD_FILES+=usr/share/man/man3/SDP_PUT32.3.gz +OLD_FILES+=usr/share/man/man3/SDP_PUT64.3.gz +OLD_FILES+=usr/share/man/man3/SDP_PUT8.3.gz +OLD_FILES+=usr/share/man/man3/bdaddr_any.3.gz +OLD_FILES+=usr/share/man/man3/bdaddr_copy.3.gz +OLD_FILES+=usr/share/man/man3/bdaddr_same.3.gz OLD_FILES+=usr/share/man/man3/bluetooth.3.gz -OLD_FILES+=usr/share/man/man3/bt_gethostbyname.3.gz +OLD_FILES+=usr/share/man/man3/bt_aton.3.gz +OLD_FILES+=usr/share/man/man3/bt_devaddr.3.gz +OLD_FILES+=usr/share/man/man3/bt_devclose.3.gz +OLD_FILES+=usr/share/man/man3/bt_devenum.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter_evt_clr.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter_evt_set.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter_evt_tst.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter_pkt_clr.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter_pkt_set.3.gz +OLD_FILES+=usr/share/man/man3/bt_devfilter_pkt_tst.3.gz +OLD_FILES+=usr/share/man/man3/bt_devinfo.3.gz +OLD_FILES+=usr/share/man/man3/bt_devinquiry.3.gz +OLD_FILES+=usr/share/man/man3/bt_devname.3.gz +OLD_FILES+=usr/share/man/man3/bt_devopen.3.gz +OLD_FILES+=usr/share/man/man3/bt_devreq.3.gz +OLD_FILES+=usr/share/man/man3/bt_devsend.3.gz +OLD_FILES+=usr/share/man/man3/bt_endhostent.3.gz +OLD_FILES+=usr/share/man/man3/bt_endprotoent.3.gz OLD_FILES+=usr/share/man/man3/bt_gethostbyaddr.3.gz +OLD_FILES+=usr/share/man/man3/bt_gethostbyname.3.gz OLD_FILES+=usr/share/man/man3/bt_gethostent.3.gz -OLD_FILES+=usr/share/man/man3/bt_sethostent.3.gz -OLD_FILES+=usr/share/man/man3/bt_endhostent.3.gz OLD_FILES+=usr/share/man/man3/bt_getprotobyname.3.gz OLD_FILES+=usr/share/man/man3/bt_getprotobynumber.3.gz OLD_FILES+=usr/share/man/man3/bt_getprotoent.3.gz -OLD_FILES+=usr/share/man/man3/bt_setprotoent.3.gz -OLD_FILES+=usr/share/man/man3/bt_endprotoent.3.gz OLD_FILES+=usr/share/man/man3/bt_ntoa.3.gz -OLD_FILES+=usr/share/man/man3/bt_aton.3.gz +OLD_FILES+=usr/share/man/man3/bt_sethostent.3.gz +OLD_FILES+=usr/share/man/man3/bt_setprotoent.3.gz OLD_FILES+=usr/share/man/man3/sdp.3.gz -OLD_FILES+=usr/share/man/man3/SDP_GET8.3.gz -OLD_FILES+=usr/share/man/man3/SDP_GET16.3.gz -OLD_FILES+=usr/share/man/man3/SDP_GET32.3.gz -OLD_FILES+=usr/share/man/man3/SDP_GET64.3.gz -OLD_FILES+=usr/share/man/man3/SDP_GET128.3.gz -OLD_FILES+=usr/share/man/man3/SDP_PUT8.3.gz -OLD_FILES+=usr/share/man/man3/SDP_PUT16.3.gz -OLD_FILES+=usr/share/man/man3/SDP_PUT32.3.gz -OLD_FILES+=usr/share/man/man3/SDP_PUT64.3.gz -OLD_FILES+=usr/share/man/man3/SDP_PUT128.3.gz -OLD_FILES+=usr/share/man/man3/sdp_open.3.gz -OLD_FILES+=usr/share/man/man3/sdp_open_local.3.gz +OLD_FILES+=usr/share/man/man3/sdp_attr2desc.3.gz +OLD_FILES+=usr/share/man/man3/sdp_change_service.3.gz OLD_FILES+=usr/share/man/man3/sdp_close.3.gz OLD_FILES+=usr/share/man/man3/sdp_error.3.gz -OLD_FILES+=usr/share/man/man3/sdp_search.3.gz -OLD_FILES+=usr/share/man/man3/sdp_attr2desc.3.gz -OLD_FILES+=usr/share/man/man3/sdp_uuid2desc.3.gz +OLD_FILES+=usr/share/man/man3/sdp_open.3.gz +OLD_FILES+=usr/share/man/man3/sdp_open_local.3.gz OLD_FILES+=usr/share/man/man3/sdp_register_service.3.gz +OLD_FILES+=usr/share/man/man3/sdp_search.3.gz OLD_FILES+=usr/share/man/man3/sdp_unregister_service.3.gz -OLD_FILES+=usr/share/man/man3/sdp_change_service.3.gz +OLD_FILES+=usr/share/man/man3/sdp_uuid2desc.3.gz OLD_FILES+=usr/share/man/man5/hcsecd.conf.5.gz OLD_FILES+=usr/share/man/man8/bcmfw.8.gz OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz -OLD_FILES+=usr/share/man/man8/hcsecd.8.gz +OLD_FILES+=usr/share/man/man8/bthidcontrol.8.gz +OLD_FILES+=usr/share/man/man8/bthidd.8.gz +OLD_FILES+=usr/share/man/man8/btpand.8.gz OLD_FILES+=usr/share/man/man8/hccontrol.8.gz +OLD_FILES+=usr/share/man/man8/hcsecd.8.gz OLD_FILES+=usr/share/man/man8/hcseriald.8.gz OLD_FILES+=usr/share/man/man8/l2control.8.gz OLD_FILES+=usr/share/man/man8/l2ping.8.gz From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 21:23:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89A8D106566C; Sat, 9 Jan 2010 21:23:39 +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 78BFE8FC13; Sat, 9 Jan 2010 21:23:39 +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 o09LNd95019547; Sat, 9 Jan 2010 21:23:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09LNdt3019544; Sat, 9 Jan 2010 21:23:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001092123.o09LNdt3019544@svn.freebsd.org> From: Marius Strobl Date: Sat, 9 Jan 2010 21:23: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: r201932 - in head/sys/boot: common sparc64/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 21:23:39 -0000 Author: marius Date: Sat Jan 9 21:23:39 2010 New Revision: 201932 URL: http://svn.freebsd.org/changeset/base/201932 Log: - Add code allowing a network device to only be open and closed once by keeping it opened after the first open and closing it via the cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to avoid the open-close-dance on every file access which with firmware that for example performs an auto-negotiation on every open causes netbooting to take horribly long. Basically the behavior with this knob enabled resembles the one employed between r60506 and r177108 (and for sparc64 also again since r182919) with the addition that the network device now is closed eventually before entering the kernel and before rebooting. Actually I think this should be the desired MI behavior, however the U-Boot loader actually requires net_close() to be called after every transaction in order for some local shutdown operations to be performed (and which I think thus will break on concurrent opens, i.e. when netdev_opens is > 1, like the loader does at least for disks when LOADER_GZIP_SUPPORT is enabled). - Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially increased netdev_opens for sparc64 in order to keep the network device opened forever, as at least some firmware versions require the network device to be closed eventually before entering the kernel or otherwise will DMA received packets to stale memory. The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be set as well for the same reasons. Modified: head/sys/boot/common/dev_net.c head/sys/boot/sparc64/loader/Makefile Modified: head/sys/boot/common/dev_net.c ============================================================================== --- head/sys/boot/common/dev_net.c Sat Jan 9 19:52:42 2010 (r201931) +++ head/sys/boot/common/dev_net.c Sat Jan 9 21:23:39 2010 (r201932) @@ -71,12 +71,14 @@ __FBSDID("$FreeBSD$"); int debug = 0; #endif +static char *netdev_name; static int netdev_sock = -1; static int netdev_opens; static int net_init(void); static int net_open(struct open_file *, ...); static int net_close(struct open_file *); +static void net_cleanup(void); static int net_strategy(); static void net_print(int); @@ -90,7 +92,8 @@ struct devsw netdev = { net_open, net_close, noioctl, - net_print + net_print, + net_cleanup }; static int @@ -116,6 +119,12 @@ net_open(struct open_file *f, ...) devname = va_arg(args, char*); va_end(args); +#ifdef NETIF_OPEN_CLOSE_ONCE + /* Before opening another interface, close the previous one first. */ + if (netdev_sock >= 0 && strcmp(devname, netdev_name) != 0) + net_cleanup(); +#endif + /* On first open, do netif open, mount, etc. */ if (netdev_opens == 0) { /* Find network interface. */ @@ -125,6 +134,7 @@ net_open(struct open_file *f, ...) printf("net_open: netif_open() failed\n"); return (ENXIO); } + netdev_name = strdup(devname); #ifdef NETIF_DEBUG if (debug) printf("net_open: netif_open() succeeded\n"); @@ -135,14 +145,12 @@ net_open(struct open_file *f, ...) error = net_getparams(netdev_sock); if (error) { /* getparams makes its own noise */ + free(netdev_name); netif_close(netdev_sock); netdev_sock = -1; return (error); } } -#if defined(__sparc64__) - netdev_opens++; -#endif } netdev_opens++; f->f_devdata = &netdev_sock; @@ -152,30 +160,46 @@ net_open(struct open_file *f, ...) static int net_close(struct open_file *f) { + #ifdef NETIF_DEBUG if (debug) printf("net_close: opens=%d\n", netdev_opens); #endif - /* On last close, do netif close, etc. */ f->f_devdata = NULL; + +#ifndef NETIF_OPEN_CLOSE_ONCE /* Extra close call? */ if (netdev_opens <= 0) return (0); netdev_opens--; /* Not last close? */ if (netdev_opens > 0) - return(0); - rootip.s_addr = 0; + return (0); + /* On last close, do netif close, etc. */ +#ifdef NETIF_DEBUG + if (debug) + printf("net_close: calling net_cleanup()\n"); +#endif + net_cleanup(); +#endif + return (0); +} + +static void +net_cleanup(void) +{ + if (netdev_sock >= 0) { #ifdef NETIF_DEBUG if (debug) - printf("net_close: calling netif_close()\n"); + printf("net_cleanup: calling netif_close()\n"); #endif + rootip.s_addr = 0; + free(netdev_name); netif_close(netdev_sock); netdev_sock = -1; } - return (0); } static int Modified: head/sys/boot/sparc64/loader/Makefile ============================================================================== --- head/sys/boot/sparc64/loader/Makefile Sat Jan 9 19:52:42 2010 (r201931) +++ head/sys/boot/sparc64/loader/Makefile Sat Jan 9 21:23:39 2010 (r201932) @@ -51,11 +51,15 @@ CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../.. LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif -# Always add MI sources +# Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. +# Avoid the open-close-dance for every file access as some firmwares perform +# an auto-negotiation on every open of the network interface and thus causes +# netbooting to take horribly long. +CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE CLEANFILES+= vers.c loader.help From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 22:09:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62A691065670; Sat, 9 Jan 2010 22:09:10 +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 51F5C8FC0A; Sat, 9 Jan 2010 22:09:10 +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 o09M9AF2029555; Sat, 9 Jan 2010 22:09:10 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09M9AKi029553; Sat, 9 Jan 2010 22:09:10 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001092209.o09M9AKi029553@svn.freebsd.org> From: Alan Cox Date: Sat, 9 Jan 2010 22:09: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: r201934 - head/sys/i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 22:09:10 -0000 Author: alc Date: Sat Jan 9 22:09:10 2010 New Revision: 201934 URL: http://svn.freebsd.org/changeset/base/201934 Log: Long ago, in r120654, the rounding of KERNend and physfree in locore was changed from a small page boundary to a large page boundary. As a consequence pmap_kmem_choose() became a pointless waste of address space. Eliminate it. Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 9 21:57:41 2010 (r201933) +++ head/sys/i386/i386/pmap.c Sat Jan 9 22:09:10 2010 (r201934) @@ -317,7 +317,6 @@ static int _pmap_unwire_pte_hold(pmap_t static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *); -static vm_offset_t pmap_kmem_choose(vm_offset_t addr); #ifdef PAE static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); #endif @@ -334,24 +333,6 @@ CTASSERT(1 << PTESHIFT == sizeof(pt_entr CTASSERT(KERNBASE % (1 << 24) == 0); /* - * Move the kernel virtual free pointer to the next - * 4MB. This is used to help improve performance - * by using a large (4MB) page for much of the kernel - * (.text, .data, .bss) - */ -static vm_offset_t -pmap_kmem_choose(vm_offset_t addr) -{ - vm_offset_t newaddr = addr; - -#ifndef DISABLE_PSE - if (cpu_feature & CPUID_PSE) - newaddr = (addr + PDRMASK) & ~PDRMASK; -#endif - return newaddr; -} - -/* * Bootstrap the system enough to run with virtual memory. * * On the i386 this is called after mapping has already been enabled @@ -378,7 +359,6 @@ pmap_bootstrap(vm_paddr_t firstaddr) * in this calculation. */ virtual_avail = (vm_offset_t) KERNBASE + firstaddr; - virtual_avail = pmap_kmem_choose(virtual_avail); virtual_end = VM_MAX_KERNEL_ADDRESS; From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 22:33:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1CDE1065670; Sat, 9 Jan 2010 22:33:34 +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 C72F08FC12; Sat, 9 Jan 2010 22:33:34 +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 o09MXYbp035078; Sat, 9 Jan 2010 22:33:34 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09MXY5K035076; Sat, 9 Jan 2010 22:33:34 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001092233.o09MXY5K035076@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 9 Jan 2010 22:33: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: r201937 - head/lib/libstand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 22:33:35 -0000 Author: marcel Date: Sat Jan 9 22:33:34 2010 New Revision: 201937 URL: http://svn.freebsd.org/changeset/base/201937 Log: Implement the fo_readdir method. This does not support long file names. Obtained from: Juniper Networks, Inc. MFC after: 1 week Modified: head/lib/libstand/dosfs.c Modified: head/lib/libstand/dosfs.c ============================================================================== --- head/lib/libstand/dosfs.c Sat Jan 9 22:31:11 2010 (r201936) +++ head/lib/libstand/dosfs.c Sat Jan 9 22:33:34 2010 (r201937) @@ -47,6 +47,7 @@ static int dos_close(struct open_file *f static int dos_read(struct open_file *fd, void *buf, size_t size, size_t *resid); static off_t dos_seek(struct open_file *fd, off_t offset, int whence); static int dos_stat(struct open_file *fd, struct stat *sb); +static int dos_readdir(struct open_file *fd, struct dirent *d); struct fs_ops dosfs_fsops = { "dosfs", @@ -56,7 +57,7 @@ struct fs_ops dosfs_fsops = { null_write, dos_seek, dos_stat, - null_readdir + dos_readdir }; #define SECSIZ 512 /* sector size */ @@ -354,6 +355,72 @@ dos_stat(struct open_file *fd, struct st return (0); } +static int +dos_readdir(struct open_file *fd, struct dirent *d) +{ + DOS_FILE *f = (DOS_FILE *)fd->f_fsdata; + u_char fn[261]; + DOS_DIR dd; + size_t res; + u_int chk, i, x, xdn; + int err; + + x = chk = 0; + while (1) { + xdn = x; + x = 0; + err = dos_read(fd, &dd, sizeof(dd), &res); + if (err) + return (err); + if (res == sizeof(dd)) + return (ENOENT); + if (dd.de.name[0] == 0) + return (ENOENT); + + /* Skip deleted entries */ + if (dd.de.name[0] == 0xe5) + continue; + + /* Skip volume labels */ + if (dd.de.attr & FA_LABEL) + continue; + + if ((dd.de.attr & FA_MASK) == FA_XDE) { + if (dd.xde.seq & 0x40) + chk = dd.xde.chk; + else if (dd.xde.seq != xdn - 1 || dd.xde.chk != chk) + continue; + x = dd.xde.seq & ~0x40; + if (x < 1 || x > 20) { + x = 0; + continue; + } + cp_xdnm(fn, &dd.xde); + } else { + if (xdn == 1) { + x = 0; + for (i = 0; i < 11; i++) { + x = ((x & 1) << 7) | (x >> 1); + x += dd.de.name[i]; + x &= 0xff; + } + if (x == chk) + break; + } else { + cp_sfn(fn, &dd.de); + break; + } + x = 0; + } + } + + d->d_fileno = dd.de.clus[1] << 8 + dd.de.clus[0]; + d->d_reclen = sizeof(*d); + d->d_type = (dd.de.attr & FA_DIR) ? DT_DIR : DT_REG; + memcpy(d->d_name, fn, sizeof(d->d_name)); + return(0); +} + /* * Parse DOS boot sector */ From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 22:45:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87612106566C; Sat, 9 Jan 2010 22:45:06 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0268FC08; Sat, 9 Jan 2010 22:45:06 +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 o09Mj6WV037685; Sat, 9 Jan 2010 22:45:06 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09Mj6kF037684; Sat, 9 Jan 2010 22:45:06 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001092245.o09Mj6kF037684@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 9 Jan 2010 22:45: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: r201939 - head/contrib/one-true-awk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 22:45:06 -0000 Author: ru Date: Sat Jan 9 22:45:06 2010 New Revision: 201939 URL: http://svn.freebsd.org/changeset/base/201939 Log: Bootstrap merge history. Modified: Directory Properties: head/contrib/one-true-awk/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 22:47:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F12F106566B; Sat, 9 Jan 2010 22:47:41 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 351F58FC18; Sat, 9 Jan 2010 22:47:41 +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 o09MlfVQ038275; Sat, 9 Jan 2010 22:47:41 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09MlfoL038274; Sat, 9 Jan 2010 22:47:41 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001092247.o09MlfoL038274@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 9 Jan 2010 22:47: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: r201940 - head/contrib/one-true-awk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 22:47:41 -0000 Author: ru Date: Sat Jan 9 22:47:40 2010 New Revision: 201940 URL: http://svn.freebsd.org/changeset/base/201940 Log: Clean up import. Deleted: head/contrib/one-true-awk/mac.code From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 22:54:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 134C9106568F; Sat, 9 Jan 2010 22:54:30 +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 F41CD8FC08; Sat, 9 Jan 2010 22:54:29 +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 o09MsTYR039782; Sat, 9 Jan 2010 22:54:29 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09MsTYj039775; Sat, 9 Jan 2010 22:54:29 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001092254.o09MsTYj039775@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 9 Jan 2010 22:54: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: r201941 - in head/sys/boot: common efi/include efi/libefi ia64/efi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 22:54:30 -0000 Author: marcel Date: Sat Jan 9 22:54:29 2010 New Revision: 201941 URL: http://svn.freebsd.org/changeset/base/201941 Log: Remove file system support based on the simple file system protocol as this only allows us to access file systems that EFI knows about. With a loader that can only use EFI-supported file systems, we're forced to put /boot on the EFI system partition. This is suboptimal in the following ways: 1. With /boot a symlink to /efi/boot, mergemaster complains about the mismatch and there's no quick solution. 2. The EFI loader can only boot a single version of FreeBSD. There's no way to install multiple versions of FreeBSD and select one at the loader prompt. 3. ZFS maintains /boot/zfs/zpool.cache and with /boot a symlink we end up with the file on a MSDOS file system. ZFS does not have proper handling of file systems that are under Giant. Implement a disk device based on the block I/O protocol instead and pull in file system code from libstand. The disk devices are really the partitions that EFI knows about. This change is backward compatible. MFC after: 1 week Added: head/sys/boot/efi/libefi/efipart.c (contents, props changed) Deleted: head/sys/boot/efi/libefi/efifs.c Modified: head/sys/boot/common/bootstrap.h head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/Makefile head/sys/boot/ia64/efi/conf.c head/sys/boot/ia64/efi/version Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Sat Jan 9 22:47:40 2010 (r201940) +++ head/sys/boot/common/bootstrap.h Sat Jan 9 22:54:29 2010 (r201941) @@ -45,6 +45,7 @@ struct devdesc #define DEVT_CD 3 #define DEVT_ZFS 4 int d_unit; + void *d_opendata; }; /* Commands and return values; nonzero return sets command_errmsg != NULL */ Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Sat Jan 9 22:47:40 2010 (r201940) +++ head/sys/boot/efi/include/efilib.h Sat Jan 9 22:54:29 2010 (r201941) @@ -34,9 +34,7 @@ extern EFI_SYSTEM_TABLE *ST; extern EFI_BOOT_SERVICES *BS; extern EFI_RUNTIME_SERVICES *RS; -extern struct devsw efifs_dev; -extern struct fs_ops efifs_fsops; - +extern struct devsw efipart_dev; extern struct devsw efinet_dev; extern struct netif_driver efinetif; Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Sat Jan 9 22:47:40 2010 (r201940) +++ head/sys/boot/efi/libefi/Makefile Sat Jan 9 22:54:29 2010 (r201941) @@ -3,8 +3,8 @@ LIB= efi INTERNALLIB= -SRCS= delay.c efi_console.c efifs.c efinet.c errno.c handles.c libefi.c \ - time.c +SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ + libefi.c time.c CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH:S/amd64/i386/} Added: head/sys/boot/efi/libefi/efipart.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/libefi/efipart.c Sat Jan 9 22:54:29 2010 (r201941) @@ -0,0 +1,265 @@ +/*- + * Copyright (c) 2010 Marcel Moolenaar + * 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 + +#include +#include +#include + +static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; + +static int efipart_init(void); +static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); +static int efipart_open(struct open_file *, ...); +static int efipart_close(struct open_file *); +static void efipart_print(int); + +struct devsw efipart_dev = { + .dv_name = "part", + .dv_type = DEVT_DISK, + .dv_init = efipart_init, + .dv_strategy = efipart_strategy, + .dv_open = efipart_open, + .dv_close = efipart_close, + .dv_ioctl = noioctl, + .dv_print = efipart_print, + .dv_cleanup = NULL +}; + +static int +efipart_init(void) +{ + EFI_BLOCK_IO *blkio; + EFI_HANDLE *hin, *hout; + EFI_STATUS status; + UINTN sz; + u_int n, nin, nout; + int err; + + sz = 0; + status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); + if (status == EFI_BUFFER_TOO_SMALL) { + hin = (EFI_HANDLE *)malloc(sz * 2); + status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, + hin); + if (EFI_ERROR(status)) + free(hin); + } + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + + /* Filter handles to only include FreeBSD partitions. */ + nin = sz / sizeof(EFI_HANDLE); + hout = hin + nin; + nout = 0; + + for (n = 0; n < nin; n++) { + status = BS->HandleProtocol(hin[n], &blkio_guid, &blkio); + if (EFI_ERROR(status)) + continue; + if (!blkio->Media->LogicalPartition) + continue; + hout[nout] = hin[n]; + nout++; + } + + err = efi_register_handles(&efipart_dev, hout, nout); + free(hin); + return (err); +} + +static void +efipart_print(int verbose) +{ + char line[80]; + EFI_BLOCK_IO *blkio; + EFI_HANDLE h; + EFI_STATUS status; + u_int unit; + + for (unit = 0, h = efi_find_handle(&efipart_dev, 0); + h != NULL; h = efi_find_handle(&efipart_dev, ++unit)) { + sprintf(line, " %s%d:", efipart_dev.dv_name, unit); + pager_output(line); + + status = BS->HandleProtocol(h, &blkio_guid, &blkio); + if (!EFI_ERROR(status)) { + sprintf(line, " %llu blocks", + (unsigned long long)(blkio->Media->LastBlock + 1)); + pager_output(line); + if (blkio->Media->RemovableMedia) + pager_output(" (removable)"); + } + pager_output("\n"); + } +} + +static int +efipart_open(struct open_file *f, ...) +{ + va_list args; + struct devdesc *dev; + EFI_BLOCK_IO *blkio; + EFI_HANDLE h; + EFI_STATUS status; + + va_start(args, f); + dev = va_arg(args, struct devdesc*); + va_end(args); + + h = efi_find_handle(&efipart_dev, dev->d_unit); + if (h == NULL) + return (EINVAL); + + status = BS->HandleProtocol(h, &blkio_guid, &blkio); + if (EFI_ERROR(status)) + return (efi_status_to_errno(status)); + + if (!blkio->Media->MediaPresent) + return (EAGAIN); + + dev->d_opendata = blkio; + return (0); +} + +static int +efipart_close(struct open_file *f) +{ + struct devdesc *dev; + + dev = (struct devdesc *)(f->f_devdata); + if (dev->d_opendata == NULL) + return (EINVAL); + + dev->d_opendata = NULL; + return (0); +} + +/* + * efipart_readwrite() + * Internal equivalent of efipart_strategy(), which operates on the + * media-native block size. This function expects all I/O requests + * to be within the media size and returns an error if such is not + * the case. + */ +static int +efipart_readwrite(EFI_BLOCK_IO *blkio, int rw, daddr_t blk, daddr_t nblks, + char *buf) +{ + EFI_STATUS status; + + if (blkio == NULL) + return (ENXIO); + if (blk < 0 || blk > blkio->Media->LastBlock) + return (EIO); + if ((blk + nblks - 1) > blkio->Media->LastBlock) + return (EIO); + + switch (rw) { + case F_READ: + status = blkio->ReadBlocks(blkio, blkio->Media->MediaId, blk, + nblks * blkio->Media->BlockSize, buf); + break; + case F_WRITE: + if (blkio->Media->ReadOnly) + return (EROFS); + status = blkio->WriteBlocks(blkio, blkio->Media->MediaId, blk, + nblks * blkio->Media->BlockSize, buf); + break; + default: + return (ENOSYS); + } + + if (EFI_ERROR(status)) + printf("%s: rw=%d, status=%lu\n", __func__, rw, status); + return (efi_status_to_errno(status)); +} + +static int +efipart_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, + size_t *rsize) +{ + struct devdesc *dev = (struct devdesc *)devdata; + EFI_BLOCK_IO *blkio; + off_t off; + char *blkbuf; + size_t blkoff, blksz; + int error; + + if (dev == NULL || blk < 0) + return (EINVAL); + + blkio = dev->d_opendata; + if (blkio == NULL) + return (ENXIO); + + if (size == 0 || (size % 512) != 0) + return (EIO); + + if (rsize != NULL) + *rsize = size; + + if (blkio->Media->BlockSize == 512) + return (efipart_readwrite(blkio, rw, blk, size / 512, buf)); + + /* + * The block size of the media is not 512B per sector. + */ + blkbuf = malloc(blkio->Media->BlockSize); + if (blkbuf == NULL) + return (ENOMEM); + + error = 0; + off = blk * 512; + blk = off / blkio->Media->BlockSize; + blkoff = off % blkio->Media->BlockSize; + blksz = blkio->Media->BlockSize - blkoff; + while (size > 0) { + error = efipart_readwrite(blkio, rw, blk, 1, blkbuf); + if (error) + break; + if (size < blksz) + blksz = size; + bcopy(blkbuf + blkoff, buf, blksz); + buf += blksz; + size -= blksz; + blk++; + blkoff = 0; + blksz = blkio->Media->BlockSize; + } + + free(blkbuf); + return (error); +} Modified: head/sys/boot/ia64/efi/conf.c ============================================================================== --- head/sys/boot/ia64/efi/conf.c Sat Jan 9 22:47:40 2010 (r201940) +++ head/sys/boot/ia64/efi/conf.c Sat Jan 9 22:54:29 2010 (r201941) @@ -49,15 +49,16 @@ __FBSDID("$FreeBSD$"); /* Exported for libstand */ struct devsw *devsw[] = { - &efifs_dev, + &efipart_dev, &efinet_dev, NULL }; struct fs_ops *file_system[] = { - &efifs_fsops, - &nfs_fsops, + &dosfs_fsops, &ufs_fsops, + &cd9660_fsops, + &nfs_fsops, &gzipfs_fsops, NULL }; Modified: head/sys/boot/ia64/efi/version ============================================================================== --- head/sys/boot/ia64/efi/version Sat Jan 9 22:47:40 2010 (r201940) +++ head/sys/boot/ia64/efi/version Sat Jan 9 22:54:29 2010 (r201941) @@ -3,6 +3,9 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +2.0: Provide devices based on the block I/O protocol, rather than the + simple file services protocol. Use the FreeBSD file system code + on top of those devices to access files. 1.2: Restructured. Has some user visible differences. 1.1: Pass the HCDP table address to the kernel via bootinfo if one is present in the EFI system table. From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:19:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 795C3106577F; Sat, 9 Jan 2010 23:19:01 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 672B68FC21; Sat, 9 Jan 2010 23:19:01 +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 o09NJ15P045635; Sat, 9 Jan 2010 23:19:01 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NJ1c8045624; Sat, 9 Jan 2010 23:19:01 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001092319.o09NJ1c8045624@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 9 Jan 2010 23:19: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: r201951 - in head: contrib/one-true-awk usr.bin/awk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:19:01 -0000 Author: ru Date: Sat Jan 9 23:19:01 2010 New Revision: 201951 URL: http://svn.freebsd.org/changeset/base/201951 Log: Update to a 26-Nov-2009 release. Modified: head/contrib/one-true-awk/FIXES head/contrib/one-true-awk/b.c head/contrib/one-true-awk/lib.c head/contrib/one-true-awk/main.c head/contrib/one-true-awk/makefile head/contrib/one-true-awk/maketab.c head/contrib/one-true-awk/proctab.c head/contrib/one-true-awk/proto.h head/contrib/one-true-awk/run.c head/usr.bin/awk/main.c.diff Directory Properties: head/contrib/one-true-awk/ (props changed) Modified: head/contrib/one-true-awk/FIXES ============================================================================== --- head/contrib/one-true-awk/FIXES Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/FIXES Sat Jan 9 23:19:01 2010 (r201951) @@ -25,6 +25,23 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +Nov 26, 2009: + fixed a long-standing issue with when FS takes effect. a + change to FS is now noticed immediately for subsequent splits. + + changed the name getline() to awkgetline() to avoid yet another + name conflict somewhere. + +Feb 11, 2009: + temporarily for now defined HAS_ISBLANK, since that seems to + be the best way through the thicket. isblank arrived in C99, + but seems to be arriving at different systems at different + times. + +Oct 8, 2008: + fixed typo in b.c that set tmpvec wrongly. no one had ever + run into the problem, apparently. thanks to alistair crooks. + Oct 23, 2007: minor fix in lib.c: increase inputFS to 100, change malloc for fields to n+1. Modified: head/contrib/one-true-awk/b.c ============================================================================== --- head/contrib/one-true-awk/b.c Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/b.c Sat Jan 9 23:19:01 2010 (r201951) @@ -731,6 +731,7 @@ Node *unary(Node *np) * to nelson beebe for the suggestion; let's see if it works everywhere. */ +/* #define HAS_ISBLANK */ #ifndef HAS_ISBLANK int (isblank)(int c) @@ -876,7 +877,7 @@ int cgoto(fa *f, int s, int c) if (q[j] >= maxsetvec) { maxsetvec *= 4; setvec = (int *) realloc(setvec, maxsetvec * sizeof(int)); - tmpset = (int *) realloc(setvec, maxsetvec * sizeof(int)); + tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int)); if (setvec == 0 || tmpset == 0) overflo("cgoto overflow"); } Modified: head/contrib/one-true-awk/lib.c ============================================================================== --- head/contrib/one-true-awk/lib.c Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/lib.c Sat Jan 9 23:19:01 2010 (r201951) @@ -274,6 +274,7 @@ void fldbld(void) /* create fields from } fr = fields; i = 0; /* number of fields accumulated here */ + strcpy(inputFS, *FS); if (strlen(inputFS) > 1) { /* it's a regular expression */ i = refldbld(r, inputFS); } else if ((sep = *inputFS) == ' ') { /* default whitespace */ Modified: head/contrib/one-true-awk/main.c ============================================================================== --- head/contrib/one-true-awk/main.c Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/main.c Sat Jan 9 23:19:01 2010 (r201951) @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20070501"; +const char *version = "version 20091126"; #define DEBUG #include Modified: head/contrib/one-true-awk/makefile ============================================================================== --- head/contrib/one-true-awk/makefile Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/makefile Sat Jan 9 23:19:01 2010 (r201951) @@ -31,7 +31,6 @@ CC = gcc -fprofile-arcs -ftest-coverage CC = gcc -Wall -g CC = cc CC = gcc -O4 -CC = gcc -Wall -g YACC = bison -y Modified: head/contrib/one-true-awk/maketab.c ============================================================================== --- head/contrib/one-true-awk/maketab.c Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/maketab.c Sat Jan 9 23:19:01 2010 (r201951) @@ -102,7 +102,7 @@ struct xx { CALL, "call", "call" }, { ARG, "arg", "arg" }, { VARNF, "getnf", "NF" }, - { GETLINE, "getline", "getline" }, + { GETLINE, "awkgetline", "getline" }, { 0, "", "" }, }; Modified: head/contrib/one-true-awk/proctab.c ============================================================================== --- head/contrib/one-true-awk/proctab.c Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/proctab.c Sat Jan 9 23:19:01 2010 (r201951) @@ -180,7 +180,7 @@ Cell *(*proctab[93])(Node **, int) = { nullproc, /* NUMBER */ nullproc, /* STRING */ nullproc, /* REGEXPR */ - getline, /* GETLINE */ + awkgetline, /* GETLINE */ substr, /* SUBSTR */ split, /* SPLIT */ jump, /* RETURN */ Modified: head/contrib/one-true-awk/proto.h ============================================================================== --- head/contrib/one-true-awk/proto.h Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/proto.h Sat Jan 9 23:19:01 2010 (r201951) @@ -149,7 +149,7 @@ extern Cell *call(Node **, int); extern Cell *copycell(Cell *); extern Cell *arg(Node **, int); extern Cell *jump(Node **, int); -extern Cell *getline(Node **, int); +extern Cell *awkgetline(Node **, int); extern Cell *getnf(Node **, int); extern Cell *array(Node **, int); extern Cell *awkdelete(Node **, int); Modified: head/contrib/one-true-awk/run.c ============================================================================== --- head/contrib/one-true-awk/run.c Sat Jan 9 23:18:49 2010 (r201950) +++ head/contrib/one-true-awk/run.c Sat Jan 9 23:19:01 2010 (r201951) @@ -388,7 +388,7 @@ Cell *jump(Node **a, int n) /* break, co return 0; /* not reached */ } -Cell *getline(Node **a, int n) /* get next line from specific input */ +Cell *awkgetline(Node **a, int n) /* get next line from specific input */ { /* a[0] is variable, a[1] is operator, a[2] is filename */ Cell *r, *x; extern Cell **fldtab; @@ -1159,11 +1159,11 @@ Cell *cat(Node **a, int q) /* a[0] cat a x->sval, y->sval); strcpy(s, x->sval); strcpy(s+n1, y->sval); + tempfree(x); tempfree(y); z = gettemp(); z->sval = s; z->tval = STR; - tempfree(x); return(z); } Modified: head/usr.bin/awk/main.c.diff ============================================================================== --- head/usr.bin/awk/main.c.diff Sat Jan 9 23:18:49 2010 (r201950) +++ head/usr.bin/awk/main.c.diff Sat Jan 9 23:19:01 2010 (r201951) @@ -11,8 +11,8 @@ diff -u -p -r1.1.1.10 main.c THIS SOFTWARE. ****************************************************************/ --const char *version = "version 20070501"; -+const char *version = "version 20070501 (FreeBSD)"; +-const char *version = "version 20091126"; ++const char *version = "version 20091126 (FreeBSD)"; #define DEBUG #include From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:22:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ACD2106566B; Sat, 9 Jan 2010 23:22:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19C518FC15; Sat, 9 Jan 2010 23:22: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 o09NMVCb046509; Sat, 9 Jan 2010 23:22:31 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NMVSg046507; Sat, 9 Jan 2010 23:22:31 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001092322.o09NMVSg046507@svn.freebsd.org> From: Brooks Davis Date: Sat, 9 Jan 2010 23:22: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: r201953 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:22:32 -0000 Author: brooks Date: Sat Jan 9 23:22:31 2010 New Revision: 201953 URL: http://svn.freebsd.org/changeset/base/201953 Log: Correct the explination text for the kern.ngroups. It reflects the number of supplemental groups, not the total number of groups. MFC after: 3 days Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Sat Jan 9 23:19:38 2010 (r201952) +++ head/sys/kern/kern_mib.c Sat Jan 9 23:22:31 2010 (r201953) @@ -125,7 +125,8 @@ SYSCTL_INT(_kern, KERN_POSIX1, posix1ver 0, _POSIX_VERSION, "Version of POSIX attempting to comply to"); SYSCTL_INT(_kern, KERN_NGROUPS, ngroups, CTLFLAG_RD, - 0, NGROUPS_MAX, "Maximum number of groups a user can belong to"); + 0, NGROUPS_MAX, + "Maximum number of supplemental groups a user can belong to"); SYSCTL_INT(_kern, KERN_JOB_CONTROL, job_control, CTLFLAG_RD, 0, 1, "Whether job control is available"); From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:23:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3D31065670; Sat, 9 Jan 2010 23:23:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A1898FC1E; Sat, 9 Jan 2010 23:23:53 +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 o09NNrsQ046844; Sat, 9 Jan 2010 23:23:53 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NNrOC046842; Sat, 9 Jan 2010 23:23:53 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001092323.o09NNrOC046842@svn.freebsd.org> From: Brooks Davis Date: Sat, 9 Jan 2010 23:23: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: r201954 - head/sys/fs/procfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:23:53 -0000 Author: brooks Date: Sat Jan 9 23:23:52 2010 New Revision: 201954 URL: http://svn.freebsd.org/changeset/base/201954 Log: Update the comment on printing group membership to reflect that fact that each groupt the process is a member of is printed rather than an entry for each group the user could be a member of. MFC after: 3 days Modified: head/sys/fs/procfs/procfs_status.c Modified: head/sys/fs/procfs/procfs_status.c ============================================================================== --- head/sys/fs/procfs/procfs_status.c Sat Jan 9 23:22:31 2010 (r201953) +++ head/sys/fs/procfs/procfs_status.c Sat Jan 9 23:23:52 2010 (r201954) @@ -82,7 +82,7 @@ procfs_doprocstatus(PFS_FILL_ARGS) sid = sess->s_leader ? sess->s_leader->p_pid : 0; /* comm pid ppid pgid sid tty ctty,sldr start ut st wmsg - euid ruid rgid,egid,groups[1 .. NGROUPS] + euid ruid rgid,egid,groups[1 .. ngroups] */ pc = p->p_comm; From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:24:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 240551065672; Sat, 9 Jan 2010 23:24:50 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12F6F8FC1A; Sat, 9 Jan 2010 23:24:50 +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 o09NOnGe047078; Sat, 9 Jan 2010 23:24:49 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NOn2h047076; Sat, 9 Jan 2010 23:24:49 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001092324.o09NOn2h047076@svn.freebsd.org> From: Brooks Davis Date: Sat, 9 Jan 2010 23:24: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: r201955 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:24:50 -0000 Author: brooks Date: Sat Jan 9 23:24:49 2010 New Revision: 201955 URL: http://svn.freebsd.org/changeset/base/201955 Log: Improve the comment about CMGROUP_MAX. MFC after: 3 days Modified: head/sys/sys/socket.h Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Sat Jan 9 23:23:52 2010 (r201954) +++ head/sys/sys/socket.h Sat Jan 9 23:24:49 2010 (r201955) @@ -462,8 +462,8 @@ struct cmsghdr { #if __BSD_VISIBLE /* * While we may have more groups than this, the cmsgcred struct must - * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow - * this. + * be able to fit in an mbuf and we have historically supported a + * maximum of 16 groups. */ #define CMGROUP_MAX 16 From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:34:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16DA510656BE; Sat, 9 Jan 2010 23:34:46 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0536F8FC1E; Sat, 9 Jan 2010 23:34:46 +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 o09NYj2b049334; Sat, 9 Jan 2010 23:34:45 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NYjuN049330; Sat, 9 Jan 2010 23:34:45 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001092334.o09NYjuN049330@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 9 Jan 2010 23:34: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: r201957 - head/usr.bin/awk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:34:46 -0000 Author: ru Date: Sat Jan 9 23:34:45 2010 New Revision: 201957 URL: http://svn.freebsd.org/changeset/base/201957 Log: Regen diffs. Modified: head/usr.bin/awk/b.c.diff head/usr.bin/awk/main.c.diff head/usr.bin/awk/run.c.diff Modified: head/usr.bin/awk/b.c.diff ============================================================================== --- head/usr.bin/awk/b.c.diff Sat Jan 9 23:34:40 2010 (r201956) +++ head/usr.bin/awk/b.c.diff Sat Jan 9 23:34:45 2010 (r201957) @@ -2,12 +2,9 @@ $FreeBSD$ Index: b.c =================================================================== -RCS file: /home/ncvs/src/contrib/one-true-awk/b.c,v -retrieving revision 1.1.1.8 -diff -u -p -r1.1.1.8 b.c ---- b.c 16 May 2005 19:11:31 -0000 1.1.1.8 -+++ b.c 16 May 2005 19:12:40 -0000 -@@ -282,9 +282,21 @@ int quoted(char **pp) /* pick up next th +--- b.c (revision 201951) ++++ b.c (working copy) +@@ -285,9 +285,21 @@ int quoted(char **pp) /* pick up next thing after return c; } @@ -29,10 +26,10 @@ diff -u -p -r1.1.1.8 b.c uschar *p = (uschar *) argp; uschar *op, *bp; static uschar *buf = 0; -@@ -303,15 +315,18 @@ char *cclenter(const char *argp) /* add +@@ -306,15 +318,18 @@ char *cclenter(const char *argp) /* add a characte c2 = *p++; if (c2 == '\\') - c2 = quoted((char **) &p); + c2 = quoted((char **) &p); - if (c > c2) { /* empty; ignore */ + if (collate_range_cmp(c, c2) > 0) { bp--; @@ -44,8 +41,8 @@ diff -u -p -r1.1.1.8 b.c + if ((collate_range_cmp(c, j) > 0) || + collate_range_cmp(j, c2) > 0) + continue; - if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 100, (char **) &bp, "cclenter1")) - FATAL("out of space for character class [%.10s...] 2", p); + if (!adjbuf((char **) &buf, &bufsz, bp-buf+2, 100, (char **) &bp, "cclenter1")) + FATAL("out of space for character class [%.10s...] 2", p); - *bp++ = ++c; + *bp++ = j; i++; Modified: head/usr.bin/awk/main.c.diff ============================================================================== --- head/usr.bin/awk/main.c.diff Sat Jan 9 23:34:40 2010 (r201956) +++ head/usr.bin/awk/main.c.diff Sat Jan 9 23:34:45 2010 (r201957) @@ -2,12 +2,9 @@ $FreeBSD$ Index: main.c =================================================================== -RCS file: /home/ncvs/src/contrib/one-true-awk/main.c,v -retrieving revision 1.1.1.10 -diff -u -p -r1.1.1.10 main.c ---- main.c 16 May 2005 19:11:31 -0000 1.1.1.10 -+++ main.c 15 Sep 2006 13:21:30 -0000 -@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE +--- main.c (revision 201951) ++++ main.c (working copy) +@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PE THIS SOFTWARE. ****************************************************************/ @@ -24,7 +21,7 @@ diff -u -p -r1.1.1.10 main.c setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */ cmdname = argv[0]; if (argc == 1) { -@@ -79,13 +80,18 @@ int main(int argc, char *argv[]) +@@ -86,13 +87,18 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ @@ -50,7 +47,7 @@ diff -u -p -r1.1.1.10 main.c break; case 'F': /* set field separator */ if (argv[1][2] != 0) { /* arg is -Fsomething */ -@@ -104,8 +110,14 @@ int main(int argc, char *argv[]) +@@ -111,8 +117,14 @@ int main(int argc, char *argv[]) WARNING("field separator FS is empty"); break; case 'v': /* -v a=1 to be done NOW. one -v for each */ @@ -65,5 +62,5 @@ diff -u -p -r1.1.1.10 main.c + setclvar(argv[1]); + } break; - case 'm': /* more memory: -mr=record, -mf=fields */ - /* no longer supported */ + case 'd': + dbg = atoi(&argv[1][2]); Modified: head/usr.bin/awk/run.c.diff ============================================================================== --- head/usr.bin/awk/run.c.diff Sat Jan 9 23:34:40 2010 (r201956) +++ head/usr.bin/awk/run.c.diff Sat Jan 9 23:34:45 2010 (r201957) @@ -2,12 +2,9 @@ $FreeBSD$ Index: run.c =================================================================== -RCS file: /home/ncvs/src/contrib/one-true-awk/run.c,v -retrieving revision 1.1.1.8 -diff -u -p -r1.1.1.8 run.c ---- run.c 16 May 2005 19:11:35 -0000 1.1.1.8 -+++ run.c 16 May 2005 19:12:47 -0000 -@@ -651,7 +651,7 @@ Cell *relop(Node **a, int n) /* a[0 < a[ +--- run.c (revision 201951) ++++ run.c (working copy) +@@ -653,7 +653,7 @@ Cell *relop(Node **a, int n) /* a[0 < a[1], etc. * j = x->fval - y->fval; i = j<0? -1: (j>0? 1: 0); } else { From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:36:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11A12106568F; Sat, 9 Jan 2010 23:36:52 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 007B18FC20; Sat, 9 Jan 2010 23:36:52 +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 o09Naph9049872; Sat, 9 Jan 2010 23:36:51 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NapP4049870; Sat, 9 Jan 2010 23:36:51 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001092336.o09NapP4049870@svn.freebsd.org> From: Brooks Davis Date: Sat, 9 Jan 2010 23:36: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: r201959 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:36:52 -0000 Author: brooks Date: Sat Jan 9 23:36:51 2010 New Revision: 201959 URL: http://svn.freebsd.org/changeset/base/201959 Log: Use the correct types to store uids and gids in the credential cache. Modified: head/lib/libc/rpc/svc_auth_des.c Modified: head/lib/libc/rpc/svc_auth_des.c ============================================================================== --- head/lib/libc/rpc/svc_auth_des.c Sat Jan 9 23:36:15 2010 (r201958) +++ head/lib/libc/rpc/svc_auth_des.c Sat Jan 9 23:36:51 2010 (r201959) @@ -449,10 +449,10 @@ cache_spot(key, name, timestamp) #define INVALID -1 /* grouplen, if cache entry is invalid */ struct bsdcred { - short uid; /* cached uid */ - short gid; /* cached gid */ - short grouplen; /* length of cached groups */ - short groups[NGROUPS]; /* cached groups */ + uid_t uid; /* cached uid */ + gid_t gid; /* cached gid */ + int grouplen; /* length of cached groups */ + gid_t groups[NGRPS]; /* cached groups */ }; /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 9 23:37:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE7C106568D; Sat, 9 Jan 2010 23:37:29 +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 B9FE18FC1A; Sat, 9 Jan 2010 23:37:29 +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 o09NbTat050044; Sat, 9 Jan 2010 23:37:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o09NbTtd050042; Sat, 9 Jan 2010 23:37:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001092337.o09NbTtd050042@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 9 Jan 2010 23:37: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: r201960 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 23:37:29 -0000 Author: bz Date: Sat Jan 9 23:37:29 2010 New Revision: 201960 URL: http://svn.freebsd.org/changeset/base/201960 Log: Use uname -m [1] and rename BUILD_ARCH to XMACHINE[2]. Submitted by: nyan[1], imp[2] MFC after: 27 days X-MFC with: r201815 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Jan 9 23:36:51 2010 (r201959) +++ head/Makefile Sat Jan 9 23:37:29 2010 (r201960) @@ -321,8 +321,8 @@ universe_${target}: @echo ">> ${target} completed on `LC_ALL=C date`" .endfor universe_kernels: universe_kernconfs -BUILD_ARCH!= uname -p -TARGET?= ${BUILD_ARCH} +XMACHINE!= uname -m +TARGET?= ${XMACHINE} KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \ find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name NOTES