CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Sat Apr 14 06:04:35 UTC 2012 Modified Files: src/sys/arch/hp700/dev: ssio.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/dev/ssio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/dev/ssio.c diff -u src/sys/arch/hp700/dev/ssio.c:1.2 src/sys/arch/hp700/dev/ssio.c:1.3 --- src/sys/arch/hp700/dev/ssio.c:1.2 Fri Jul 1 18:33:09 2011 +++ src/sys/arch/hp700/dev/ssio.c Sat Apr 14 06:04:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ssio.c,v 1.2 2011/07/01 18:33:09 dyoung Exp $ */ +/* $NetBSD: ssio.c,v 1.3 2012/04/14 06:04:34 skrll Exp $ */ /* $OpenBSD: ssio.c,v 1.7 2009/03/08 22:19:04 miod Exp $ */ @@ -160,8 +160,8 @@ ssio_match(device_t parent, cfdata_t mat if (PCI_VENDOR(pa-pa_id) != PCI_VENDOR_NS) return 0; -if (PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_NS_PC87560) -return 1; + if (PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_NS_PC87560) + return 1; return 0; } @@ -204,10 +204,10 @@ ssio_attach(device_t parent, device_t se sc-sc_ih = pci_intr_establish(pa-pa_pc, ih, IPL_TTY, ssio_intr, sc); if (sc-sc_ih == NULL) { -aprint_error_dev(self, could not establish interrupt); -if (intrstr != NULL) -aprint_error( at %s, intrstr); -aprint_error(\n); + aprint_error_dev(self, could not establish interrupt); + if (intrstr != NULL) + aprint_error( at %s, intrstr); + aprint_error(\n); goto unmap_ic2; } aprint_normal_dev(self, interrupting at %s\n, intrstr); @@ -324,7 +324,7 @@ ssio_intr(void *v) irq = bus_space_read_1(sc-sc_iot, sc-sc_ic1h, 0); irq = 0x07; - if (irq == 7) { + if (irq == 7) { bus_space_write_1(sc-sc_iot, sc-sc_ic1h, 0, 0x0b); isr = bus_space_read_1(sc-sc_iot, sc-sc_ic1h, 0); if ((isr 0x80) == 0)
CVS commit: src/lib/libc/gen
Module Name:src Committed By: wiz Date: Sat Apr 14 10:34:29 UTC 2012 Modified Files: src/lib/libc/gen: getpass.3 Log Message: Wording. Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/gen/getpass.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/getpass.3 diff -u src/lib/libc/gen/getpass.3:1.21 src/lib/libc/gen/getpass.3:1.22 --- src/lib/libc/gen/getpass.3:1.21 Sat Apr 14 02:01:12 2012 +++ src/lib/libc/gen/getpass.3 Sat Apr 14 10:34:29 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: getpass.3,v 1.21 2012/04/14 02:01:12 christos Exp $ +.\ $NetBSD: getpass.3,v 1.22 2012/04/14 10:34:29 wiz Exp $ .\ .\ Copyright (c) 1989, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -85,9 +85,9 @@ function allows one to specify the three .Dv stdin , .Dv stdout , and -.Dv stderr +.Dv stderr in the -.Fa fd +.Fa fd argument, or if .Fa fd is @@ -129,9 +129,9 @@ Echoes a newline if successful. .It Dv GETPASS_7BIT Mask the high bit for each entered character. .It Dv GETPASS_FORCE_LOWER -Lowcase each entered character. +Lowercase each entered character. .It Dv GETPASS_FORCE_UPPER -Upcase each entered character. +Uppercase each entered character. .El .Pp Finally if the
CVS commit: src/sys/arch/hp700/dev
Module Name:src Committed By: skrll Date: Sat Apr 14 10:43:19 UTC 2012 Modified Files: src/sys/arch/hp700/dev: apic.c Log Message: Sync with the following OpenBSD changes, but do the shared interrupt reporting differently. Each cpu and device interrupt gets its own counter. revision 1.14 Fix counting of interrupts for devices that attach to elroy(4). Shared interrupts would be counted double, once for the interrupting device and once for the device at the head of the chain. The handlers would run properly though. Avoid this by giving each device its own interrupt counter instead of using the counter provided by the generic interrupt handling code for the head of the chain. revision 1.13 Stop calling shared interrupt handlers as soon as one of them return 1 (positive interrupt was for me), like we do on other architectures. This is done here, at the elroy(4) driver level, since this is where shared PCI interrupts are handled. We could do something similar for dino(4) but this optimization is probably not very relevant there. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp700/dev/apic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp700/dev/apic.c diff -u src/sys/arch/hp700/dev/apic.c:1.13 src/sys/arch/hp700/dev/apic.c:1.14 --- src/sys/arch/hp700/dev/apic.c:1.13 Tue Apr 3 12:07:26 2012 +++ src/sys/arch/hp700/dev/apic.c Sat Apr 14 10:43:19 2012 @@ -1,6 +1,6 @@ -/* $NetBSD: apic.c,v 1.13 2012/04/03 12:07:26 skrll Exp $ */ +/* $NetBSD: apic.c,v 1.14 2012/04/14 10:43:19 skrll Exp $ */ -/* $OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $ */ +/* $OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -178,53 +178,61 @@ apic_intr_establish(void *v, pci_intr_ha if (aiv == NULL) return NULL; + cnt = malloc(sizeof(struct evcnt), M_DEVBUF, M_NOWAIT); + if (cnt == NULL) { + free(aiv, M_DEVBUF); + return NULL; + } + aiv-sc = sc; aiv-ih = ih; aiv-handler = handler; aiv-arg = arg; aiv-next = NULL; - aiv-cnt = NULL; - if (apic_intr_list[irq]) { - cnt = malloc(sizeof(struct evcnt), M_DEVBUF, M_NOWAIT); - if (cnt == NULL) { + aiv-cnt = cnt; + + biv = apic_intr_list[irq]; + if (biv == NULL) { + iv = hp700_intr_establish(pri, apic_intr, aiv, ir_cpu, irq); + if (iv == NULL) { free(aiv, M_DEVBUF); + free(cnt, M_DEVBUF); + return NULL; } + } + + snprintf(aiv-aiv_name, sizeof(aiv-aiv_name), line %d irq %d, + line, irq); - snprintf(aiv-aiv_name, sizeof(aiv-aiv_name), line %d irq %d, - line, irq); + evcnt_attach_dynamic(cnt, EVCNT_TYPE_INTR, NULL, + device_xname(sc-sc_dv), aiv-aiv_name); - evcnt_attach_dynamic(cnt, EVCNT_TYPE_INTR, NULL, - device_xname(sc-sc_dv), aiv-aiv_name); - biv = apic_intr_list[irq]; + if (biv) { while (biv-next) biv = biv-next; biv-next = aiv; - aiv-cnt = cnt; return arg; } - iv = hp700_intr_establish(pri, apic_intr, aiv, ir_cpu, irq); - if (iv) { - ent0 = (31 - irq) APIC_ENT0_VEC; - ent0 |= apic_get_int_ent0(sc, line); + ent0 = (31 - irq) APIC_ENT0_VEC; + ent0 |= apic_get_int_ent0(sc, line); #if 0 - if (cold) { - sc-sc_imr |= (1 irq); - ent0 |= APIC_ENT0_MASK; - } + if (cold) { + sc-sc_imr |= (1 irq); + ent0 |= APIC_ENT0_MASK; + } #endif - apic_write(sc-sc_regs, APIC_ENT0(line), APIC_ENT0_MASK); - apic_write(sc-sc_regs, APIC_ENT1(line), - ((hpa 0x0ff0) 4) | ((hpa 0x000ff000) 12)); - apic_write(sc-sc_regs, APIC_ENT0(line), ent0); - - /* Signal EOI. */ - elroy_write32(r-apic_eoi, - htole32((31 - irq) APIC_ENT0_VEC)); + apic_write(sc-sc_regs, APIC_ENT0(line), APIC_ENT0_MASK); + apic_write(sc-sc_regs, APIC_ENT1(line), + ((hpa 0x0ff0) 4) | ((hpa 0x000ff000) 12)); + apic_write(sc-sc_regs, APIC_ENT0(line), ent0); - apic_intr_list[irq] = aiv; - } + /* Signal EOI. */ + elroy_write32(r-apic_eoi, + htole32((31 - irq) APIC_ENT0_VEC)); + + apic_intr_list[irq] = aiv; return (arg); } @@ -244,11 +252,11 @@ apic_intr(void *v) int claimed = 0; while (iv) { - if (iv-handler(iv-arg)) { - if (iv-cnt) -iv-cnt-ev_count++; - claimed = 1; - } + claimed = iv-handler(iv-arg); + if (claimed iv-cnt) + iv-cnt-ev_count++; + if (claimed) + break; iv = iv-next; } /* Signal EOI. */
CVS commit: src
Module Name:src Committed By: jruoho Date: Sat Apr 14 12:21:46 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/usr.sbin: Makefile Added Files: src/tests/usr.sbin/tcpdump: Makefile t_tcpdump.sh Log Message: Add a test case for PR kern/46328 (tested naively with tcpdump(8)). To generate a diff of this commit: cvs rdiff -u -r1.463 -r1.464 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.73 -r1.74 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.sbin/tcpdump/Makefile \ src/tests/usr.sbin/tcpdump/t_tcpdump.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.463 src/distrib/sets/lists/tests/mi:1.464 --- src/distrib/sets/lists/tests/mi:1.463 Tue Apr 10 02:39:34 2012 +++ src/distrib/sets/lists/tests/mi Sat Apr 14 12:21:45 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.463 2012/04/10 02:39:34 jruoho Exp $ +# $NetBSD: mi,v 1.464 2012/04/14 12:21:45 jruoho Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3240,6 +3240,9 @@ ./usr/tests/usr.sbin/mtree/d_merge_C_M.out tests-usr.sbin-tests atf ./usr/tests/usr.sbin/mtree/d_merge_C_M_S.out tests-usr.sbin-tests atf ./usr/tests/usr.sbin/mtree/t_mtree tests-usr.sbin-tests atf +./usr/tests/usr.sbin/tcpdump tests-usr.sbin-tests +./usr/tests/usr.sbin/tcpdump/Atffile tests-usr.sbin-tests atf +./usr/tests/usr.sbin/tcpdump/t_tcpdump tests-usr.sbin-tests atf ./usr/tests/usr.sbin/traceroute tests-usr.sbin-tests ./usr/tests/usr.sbin/traceroute/Atffile tests-usr.sbin-tests atf ./usr/tests/usr.sbin/traceroute/t_traceroute tests-usr.sbin-tests atf Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.73 src/etc/mtree/NetBSD.dist.tests:1.74 --- src/etc/mtree/NetBSD.dist.tests:1.73 Sat Apr 14 02:48:44 2012 +++ src/etc/mtree/NetBSD.dist.tests Sat Apr 14 12:21:46 2012 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.73 2012/04/14 02:48:44 pgoyette Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.74 2012/04/14 12:21:46 jruoho Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -298,4 +298,5 @@ ./usr/tests/usr.bin/xlint/lint1 ./usr/tests/usr.sbin ./usr/tests/usr.sbin/mtree +./usr/tests/usr.sbin/tcpdump ./usr/tests/usr.sbin/traceroute Index: src/tests/usr.sbin/Makefile diff -u src/tests/usr.sbin/Makefile:1.2 src/tests/usr.sbin/Makefile:1.3 --- src/tests/usr.sbin/Makefile:1.2 Sat Mar 17 16:33:16 2012 +++ src/tests/usr.sbin/Makefile Sat Apr 14 12:21:45 2012 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2012/03/17 16:33:16 jruoho Exp $ +# $NetBSD: Makefile,v 1.3 2012/04/14 12:21:45 jruoho Exp $ .include bsd.own.mk TESTSDIR= ${TESTSBASE}/usr.sbin -TESTS_SUBDIRS+= mtree traceroute +TESTS_SUBDIRS+= mtree tcpdump traceroute .include bsd.test.mk Added files: Index: src/tests/usr.sbin/tcpdump/Makefile diff -u /dev/null src/tests/usr.sbin/tcpdump/Makefile:1.1 --- /dev/null Sat Apr 14 12:21:46 2012 +++ src/tests/usr.sbin/tcpdump/Makefile Sat Apr 14 12:21:45 2012 @@ -0,0 +1,9 @@ +# $NetBS$ + +.include bsd.own.mk + +TESTSDIR= ${TESTSBASE}/usr.sbin/tcpdump + +TESTS_SH= t_tcpdump + +.include bsd.test.mk Index: src/tests/usr.sbin/tcpdump/t_tcpdump.sh diff -u /dev/null src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.1 --- /dev/null Sat Apr 14 12:21:46 2012 +++ src/tests/usr.sbin/tcpdump/t_tcpdump.sh Sat Apr 14 12:21:45 2012 @@ -0,0 +1,59 @@ +# $NetBSD: t_tcpdump.sh,v 1.1 2012/04/14 12:21:45 jruoho Exp $ +# +# Copyright (c) 2012 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jukka Ruohonen. +# +# 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,
CVS commit: src/tests/usr.sbin/tcpdump
Module Name:src Committed By: jruoho Date: Sat Apr 14 12:43:06 UTC 2012 Modified Files: src/tests/usr.sbin/tcpdump: Makefile Log Message: Fix RCS string. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.sbin/tcpdump/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/tcpdump/Makefile diff -u src/tests/usr.sbin/tcpdump/Makefile:1.1 src/tests/usr.sbin/tcpdump/Makefile:1.2 --- src/tests/usr.sbin/tcpdump/Makefile:1.1 Sat Apr 14 12:21:45 2012 +++ src/tests/usr.sbin/tcpdump/Makefile Sat Apr 14 12:43:05 2012 @@ -1,4 +1,4 @@ -# $NetBS$ +# $NetBSD: Makefile,v 1.2 2012/04/14 12:43:05 jruoho Exp $ .include bsd.own.mk
CVS commit: src/external/bsd/llvm
Module Name:src Committed By: joerg Date: Sat Apr 14 15:11:18 UTC 2012 Modified Files: src/external/bsd/llvm: Makefile.inc src/external/bsd/llvm/lib: Makefile src/external/bsd/llvm/lib/libLLVMSupport: Makefile src/external/bsd/llvm/lib/libLLVMTarget: Makefile src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers: Makefile Added Files: src/external/bsd/llvm/lib/libclangTooling: Makefile Log Message: Update LLVM/Clang to r154578. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/external/bsd/llvm/Makefile.inc cvs rdiff -u -r1.20 -r1.21 src/external/bsd/llvm/lib/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/bsd/llvm/lib/libLLVMSupport/Makefile cvs rdiff -u -r1.7 -r1.8 src/external/bsd/llvm/lib/libLLVMTarget/Makefile cvs rdiff -u -r1.12 -r1.13 \ src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile cvs rdiff -u -r0 -r1.4 src/external/bsd/llvm/lib/libclangTooling/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/llvm/Makefile.inc diff -u src/external/bsd/llvm/Makefile.inc:1.32 src/external/bsd/llvm/Makefile.inc:1.33 --- src/external/bsd/llvm/Makefile.inc:1.32 Wed Apr 4 10:42:00 2012 +++ src/external/bsd/llvm/Makefile.inc Sat Apr 14 15:11:17 2012 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.32 2012/04/04 10:42:00 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.33 2012/04/14 15:11:17 joerg Exp $ .if !defined(LLVM_TOPLEVEL_MK) LLVM_TOPLEVEL_MK= .include bsd.own.mk -LLVM_REVISION= 153935 -CLANG_REVISION= 153935 +LLVM_REVISION= 154578 +CLANG_REVISION= 154578 LLVM_SRCDIR:= ${.PARSEDIR}/dist/llvm CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang Index: src/external/bsd/llvm/lib/Makefile diff -u src/external/bsd/llvm/lib/Makefile:1.20 src/external/bsd/llvm/lib/Makefile:1.21 --- src/external/bsd/llvm/lib/Makefile:1.20 Wed Apr 4 10:42:01 2012 +++ src/external/bsd/llvm/lib/Makefile Sat Apr 14 15:11:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2012/04/04 10:42:01 joerg Exp $ +# $NetBSD: Makefile,v 1.21 2012/04/14 15:11:18 joerg Exp $ .include bsd.own.mk @@ -101,4 +101,9 @@ SUBDIR+= \ .WAIT \ libclangStaticAnalyzerFrontend +.if ${NO_LLVM_DEVELOPER:Uno} == no ${LLVM_DEVELOPER:U} == yes +SUBDIR+= \ + libclangTooling +.endif + .include bsd.subdir.mk Index: src/external/bsd/llvm/lib/libLLVMSupport/Makefile diff -u src/external/bsd/llvm/lib/libLLVMSupport/Makefile:1.10 src/external/bsd/llvm/lib/libLLVMSupport/Makefile:1.11 --- src/external/bsd/llvm/lib/libLLVMSupport/Makefile:1.10 Wed Apr 4 10:42:03 2012 +++ src/external/bsd/llvm/lib/libLLVMSupport/Makefile Sat Apr 14 15:11:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2012/04/04 10:42:03 joerg Exp $ +# $NetBSD: Makefile,v 1.11 2012/04/14 15:11:18 joerg Exp $ LIB= LLVMSupport @@ -58,6 +58,7 @@ SRCS+= APFloat.cpp \ ToolOutputFile.cpp \ Triple.cpp \ Twine.cpp \ + YAMLParser.cpp \ raw_os_ostream.cpp \ raw_ostream.cpp \ regcomp.c \ Index: src/external/bsd/llvm/lib/libLLVMTarget/Makefile diff -u src/external/bsd/llvm/lib/libLLVMTarget/Makefile:1.7 src/external/bsd/llvm/lib/libLLVMTarget/Makefile:1.8 --- src/external/bsd/llvm/lib/libLLVMTarget/Makefile:1.7 Wed Jan 11 23:24:48 2012 +++ src/external/bsd/llvm/lib/libLLVMTarget/Makefile Sat Apr 14 15:11:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2012/01/11 23:24:48 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2012/04/14 15:11:18 joerg Exp $ LIB= LLVMTarget @@ -16,6 +16,7 @@ SRCS+= Mangler.cpp \ TargetLibraryInfo.cpp \ TargetLoweringObjectFile.cpp \ TargetMachine.cpp \ + TargetMachineC.cpp \ TargetRegisterInfo.cpp \ TargetSubtargetInfo.cpp Index: src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile diff -u src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.12 src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.13 --- src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.12 Tue Feb 28 17:09:31 2012 +++ src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile Sat Apr 14 15:11:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2012/02/28 17:09:31 joerg Exp $ +# $NetBSD: Makefile,v 1.13 2012/04/14 15:11:18 joerg Exp $ LIB= clangStaticAnalyzerCheckers @@ -26,6 +26,7 @@ SRCS+= AdjustedReturnValueChecker.cpp \ CheckSizeofPointer.cpp \ CheckerDocumentation.cpp \ ChrootChecker.cpp \ + CommonBugCategories.cpp \ DeadStoresChecker.cpp \ DebugCheckers.cpp \ DereferenceChecker.cpp \ Added files: Index: src/external/bsd/llvm/lib/libclangTooling/Makefile diff -u /dev/null src/external/bsd/llvm/lib/libclangTooling/Makefile:1.4 --- /dev/null Sat Apr 14 15:11:18 2012 +++ src/external/bsd/llvm/lib/libclangTooling/Makefile Sat Apr 14 15:11:18 2012 @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.4 2012/04/14 15:11:18 joerg Exp $ + +LIB= clangTooling + +.include bsd.init.mk + +.PATH:
CVS commit: src/tests/usr.sbin/tcpdump
Module Name:src Committed By: jruoho Date: Sat Apr 14 15:13:58 UTC 2012 Modified Files: src/tests/usr.sbin/tcpdump: t_tcpdump.sh Log Message: Add few more NICs. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.sbin/tcpdump/t_tcpdump.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/tcpdump/t_tcpdump.sh diff -u src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.1 src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.2 --- src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.1 Sat Apr 14 12:21:45 2012 +++ src/tests/usr.sbin/tcpdump/t_tcpdump.sh Sat Apr 14 15:13:57 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_tcpdump.sh,v 1.1 2012/04/14 12:21:45 jruoho Exp $ +# $NetBSD: t_tcpdump.sh,v 1.2 2012/04/14 15:13:57 jruoho Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,7 +41,7 @@ promiscuous_head() { promiscuous_body() { - ifs=lo0 age0 ath0 bge0 re0 sk0 iwn0 wm0 wpi0 + ifs=lo0 age0 ath0 bge0 dge0 re0 rtk0 sip0 sk0 iwn0 vr0 wm0 wpi0 for i in $ifs; do
CVS commit: src/external/bsd/openpam/dist/lib
Module Name:src Committed By: christos Date: Sat Apr 14 15:14:08 UTC 2012 Modified Files: src/external/bsd/openpam/dist/lib: openpam_ttyconv.c Log Message: use a function constant instead of NetBSD To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/openpam/dist/lib/openpam_ttyconv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/openpam/dist/lib/openpam_ttyconv.c diff -u src/external/bsd/openpam/dist/lib/openpam_ttyconv.c:1.5 src/external/bsd/openpam/dist/lib/openpam_ttyconv.c:1.6 --- src/external/bsd/openpam/dist/lib/openpam_ttyconv.c:1.5 Fri Apr 13 12:36:37 2012 +++ src/external/bsd/openpam/dist/lib/openpam_ttyconv.c Sat Apr 14 11:14:08 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: openpam_ttyconv.c,v 1.5 2012/04/13 16:36:37 christos Exp $ */ +/* $NetBSD: openpam_ttyconv.c,v 1.6 2012/04/14 15:14:08 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -60,7 +60,7 @@ int openpam_ttyconv_timeout = 0; -#ifdef __NetBSD__ +#ifdef GETPASS_ECHO static char * xprompt(const char *msg, FILE *infp, FILE *outfp, FILE *errfp, int fl) {
CVS commit: src/sys/rump/net/lib/libnet
Module Name:src Committed By: rmind Date: Sat Apr 14 18:26:31 UTC 2012 Modified Files: src/sys/rump/net/lib/libnet: Makefile Log Message: rumpnet_net: add pfil.c To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/rump/net/lib/libnet/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libnet/Makefile diff -u src/sys/rump/net/lib/libnet/Makefile:1.13 src/sys/rump/net/lib/libnet/Makefile:1.14 --- src/sys/rump/net/lib/libnet/Makefile:1.13 Sat Sep 24 21:11:23 2011 +++ src/sys/rump/net/lib/libnet/Makefile Sat Apr 14 18:26:31 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2011/09/24 21:11:23 christos Exp $ +# $NetBSD: Makefile,v 1.14 2012/04/14 18:26:31 rmind Exp $ # .PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../compat/common @@ -8,7 +8,7 @@ LIB= rumpnet_net # iffy stuff SRCS= if.c if_loop.c route.c rtbl.c rtsock.c rtsock_50.c raw_usrreq.c \ raw_cb.c if_media.c link_proto.c net_stats.c if_ethersubr.c rfc6056.c -SRCS+= if_43.c uipc_syscalls_50.c +SRCS+= if_43.c pfil.c uipc_syscalls_50.c SRCS+= component.c CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt
CVS commit: src/sys
Module Name:src Committed By: rmind Date: Sat Apr 14 19:01:22 UTC 2012 Modified Files: src/sys/net/npf: npf.h npf_impl.h npf_mbuf.c npf_ncode.h src/sys/rump/dev/lib/libnpf: Makefile Log Message: Update rumpdev_npf; use WARNS=4. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf.h cvs rdiff -u -r1.12 -r1.13 src/sys/net/npf/npf_impl.h cvs rdiff -u -r1.6 -r1.7 src/sys/net/npf/npf_mbuf.c \ src/sys/net/npf/npf_ncode.h cvs rdiff -u -r1.1 -r1.2 src/sys/rump/dev/lib/libnpf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf.h diff -u src/sys/net/npf/npf.h:1.15 src/sys/net/npf/npf.h:1.16 --- src/sys/net/npf/npf.h:1.15 Sun Mar 11 18:27:59 2012 +++ src/sys/net/npf/npf.h Sat Apr 14 19:01:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf.h,v 1.15 2012/03/11 18:27:59 rmind Exp $ */ +/* $NetBSD: npf.h,v 1.16 2012/04/14 19:01:21 rmind Exp $ */ /*- * Copyright (c) 2009-2011 The NetBSD Foundation, Inc. @@ -45,10 +45,6 @@ #include netinet/in_systm.h #include netinet/in.h -#ifdef _NPF_TESTING -#include testing.h -#endif - #define NPF_VERSION 4 /* @@ -62,7 +58,7 @@ typedef uint8_t npf_netmask_t; #define NPF_MAX_NETMASK (128) #define NPF_NO_NETMASK ((npf_netmask_t)~0) -#if defined(_KERNEL) || defined(_NPF_TESTING) +#if defined(_KERNEL) /* Network buffer. */ typedef void nbuf_t; Index: src/sys/net/npf/npf_impl.h diff -u src/sys/net/npf/npf_impl.h:1.12 src/sys/net/npf/npf_impl.h:1.13 --- src/sys/net/npf/npf_impl.h:1.12 Sun Mar 11 18:27:59 2012 +++ src/sys/net/npf/npf_impl.h Sat Apr 14 19:01:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_impl.h,v 1.12 2012/03/11 18:27:59 rmind Exp $ */ +/* $NetBSD: npf_impl.h,v 1.13 2012/04/14 19:01:21 rmind Exp $ */ /*- * Copyright (c) 2009-2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #ifndef _NPF_IMPL_H_ #define _NPF_IMPL_H_ -#if !defined(_KERNEL) !defined(_NPF_TESTING) +#if !defined(_KERNEL) #error Kernel-level header only #endif @@ -51,10 +51,6 @@ #include npf.h #include npf_ncode.h -#ifdef _NPF_TESTING -#include testing.h -#endif - #ifdef _NPF_DEBUG #define NPF_PRINTF(x) printf x #else Index: src/sys/net/npf/npf_mbuf.c diff -u src/sys/net/npf/npf_mbuf.c:1.6 src/sys/net/npf/npf_mbuf.c:1.7 --- src/sys/net/npf/npf_mbuf.c:1.6 Tue Jan 18 20:33:46 2011 +++ src/sys/net/npf/npf_mbuf.c Sat Apr 14 19:01:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_mbuf.c,v 1.6 2011/01/18 20:33:46 rmind Exp $ */ +/* $NetBSD: npf_mbuf.c,v 1.7 2012/04/14 19:01:21 rmind Exp $ */ /*- * Copyright (c) 2009-2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npf_mbuf.c,v 1.6 2011/01/18 20:33:46 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: npf_mbuf.c,v 1.7 2012/04/14 19:01:21 rmind Exp $); #include sys/param.h #include sys/mbuf.h @@ -117,7 +117,7 @@ nbuf_rw_datum(const int wr, struct mbuf /* Current offset in mbuf. */ off = (uintptr_t)n_ptr - mtod(m, uintptr_t); - KASSERT(off m-m_len); + KASSERT(off (u_int)m-m_len); wmark = m-m_len; /* Is datum overlapping? */ @@ -153,7 +153,7 @@ nbuf_rw_datum(const int wr, struct mbuf off = 0; } KASSERT(n_ptr == d || mtod(m, uint8_t *) == d); - KASSERT(len = m-m_len); + KASSERT(len = (u_int)m-m_len); /* Non-overlapping case: fetch the actual data. */ if (wr == NBUF_DATA_WRITE) { Index: src/sys/net/npf/npf_ncode.h diff -u src/sys/net/npf/npf_ncode.h:1.6 src/sys/net/npf/npf_ncode.h:1.7 --- src/sys/net/npf/npf_ncode.h:1.6 Sat Mar 10 22:22:38 2012 +++ src/sys/net/npf/npf_ncode.h Sat Apr 14 19:01:21 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ncode.h,v 1.6 2012/03/10 22:22:38 christos Exp $ */ +/* $NetBSD: npf_ncode.h,v 1.7 2012/04/14 19:01:21 rmind Exp $ */ /*- * Copyright (c) 2009-2010 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include npf.h -#if defined(_KERNEL) || defined(_NPF_TESTING) +#if defined(_KERNEL) /* * N-code processing, validation building. */ Index: src/sys/rump/dev/lib/libnpf/Makefile diff -u src/sys/rump/dev/lib/libnpf/Makefile:1.1 src/sys/rump/dev/lib/libnpf/Makefile:1.2 --- src/sys/rump/dev/lib/libnpf/Makefile:1.1 Thu Oct 14 22:39:30 2010 +++ src/sys/rump/dev/lib/libnpf/Makefile Sat Apr 14 19:01:22 2012 @@ -1,16 +1,21 @@ -# $NetBSD: Makefile,v 1.1 2010/10/14 22:39:30 haad Exp $ +# $NetBSD: Makefile,v 1.2 2012/04/14 19:01:22 rmind Exp $ +# +# Public Domain. # .PATH: ${.CURDIR}/../../../../net/npf LIB= rumpdev_npf -SRCS= npf.c npf_ctl.c npf_handler.c npf_instr.c npf_mbuf.c -SRCS+= npf_processor.c npf_ruleset.c npf_tableset.c npf_inet.c -SRCS+= npf_session.c npf_nat.c npf_alg.c +SRCS= npf.c npf_alg.c npf_ctl.c npf_handler.c +SRCS+= npf_inet.c npf_instr.c npf_log.c npf_mbuf.c npf_nat.c +SRCS+= npf_processor.c npf_ruleset.c npf_rproc.c npf_sendpkt.c +SRCS+= npf_session.c npf_state.c npf_state_tcp.c npf_tableset.c SRCS+= component.c +WARNS= 4 +
CVS commit: src/usr.sbin/npf/npftest
Module Name:src Committed By: rmind Date: Sat Apr 14 21:57:29 UTC 2012 Added Files: src/usr.sbin/npf/npftest: Makefile npftest.c npftest.h src/usr.sbin/npf/npftest/libnpftest: Makefile npf_mbuf_subr.c npf_nbuf_test.c npf_processor_test.c npf_table_test.c npf_test.h Log Message: Add initial NPF regression tests integrated with RUMP framework (running the kernel part of NPF in userland). Other tests will be added once converted to RUMP framework. All tests are in the public domain. Some Makefile fixes from christos@. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.sbin/npf/npftest/Makefile \ src/usr.sbin/npf/npftest/npftest.c src/usr.sbin/npf/npftest/npftest.h cvs rdiff -u -r0 -r1.1 src/usr.sbin/npf/npftest/libnpftest/Makefile \ src/usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c \ src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c \ src/usr.sbin/npf/npftest/libnpftest/npf_processor_test.c \ src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c \ src/usr.sbin/npf/npftest/libnpftest/npf_test.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.sbin/npf/npftest/Makefile diff -u /dev/null src/usr.sbin/npf/npftest/Makefile:1.1 --- /dev/null Sat Apr 14 21:57:30 2012 +++ src/usr.sbin/npf/npftest/Makefile Sat Apr 14 21:57:29 2012 @@ -0,0 +1,27 @@ +# $NetBSD: Makefile,v 1.1 2012/04/14 21:57:29 rmind Exp $ +# +# Public Domain +# + +PROG= npftest + +SRCS= npftest.c +CPPFLAGS+= -I${.CURDIR} + +LIBNPFTEST!= cd ${.CURDIR}/libnpftest ${MAKE} -V .OBJDIR +DPADD+= ${LIBNPFTEST}/libnpftest.a +LDADD+= -L${LIBNPFTEST} -lnpftest + +LDADD+= -lrump -lrumpvfs -lrumpnet -lrump -lrumpnet_net +LDADD+= -lrumpnet_virtif -lrumpdev_npf -lpthread + +WARNS= 4 +NOMAN= # no man page +NOLINT= # disabled (note: deliberately) + +SUBDIR+= libnpftest + +${LIBNPFTEST}/libnpftest.a: all-libnpftest + +.include bsd.subdir.mk +.include bsd.prog.mk Index: src/usr.sbin/npf/npftest/npftest.c diff -u /dev/null src/usr.sbin/npf/npftest/npftest.c:1.1 --- /dev/null Sat Apr 14 21:57:30 2012 +++ src/usr.sbin/npf/npftest/npftest.c Sat Apr 14 21:57:29 2012 @@ -0,0 +1,87 @@ +/* $NetBSD: npftest.c,v 1.1 2012/04/14 21:57:29 rmind Exp $ */ + +/* + * NPF testing framework. + * + * Public Domain. + */ + +#include stdio.h +#include stdlib.h +#include stdbool.h +#include unistd.h +#include assert.h + +#include rump/rump.h + +#include npftest.h + +static bool benchmark, verbose, quiet; + +static void +usage(void) +{ + printf(%s: [ -b ] [ -v ]\n, getprogname()); + exit(EXIT_SUCCESS); +} + +static void +result(const char *test, bool ok) +{ + if (!quiet) { + printf(NPF %-10s\t%s\n, test, ok ? OK : fail); + } + if (verbose) { + puts(-); + } + if (!ok) { + exit(EXIT_FAILURE); + } +} + +int +main(int argc, char **argv) +{ + bool ok; + int ch; + + benchmark = false; + verbose = false; + quiet = false; + + while ((ch = getopt(argc, argv, bqv)) != -1) { + switch (ch) { + case 'b': + benchmark = true; + break; + case 'q': + quiet = true; + break; + case 'v': + verbose = true; + break; + default: + usage(); + } + } + + /* XXX rn_init */ + extern int rumpns_max_keylen; + rumpns_max_keylen = 1; + + rump_init(); + rump_schedule(); + + ok = rumpns_npf_nbuf_test(verbose); + result(nbuf, ok); + + ok = rumpns_npf_processor_test(verbose); + result(processor, ok); + + ok = rumpns_npf_table_test(verbose); + result(table, ok); + + rump_unschedule(); + + return EXIT_SUCCESS; +} Index: src/usr.sbin/npf/npftest/npftest.h diff -u /dev/null src/usr.sbin/npf/npftest/npftest.h:1.1 --- /dev/null Sat Apr 14 21:57:30 2012 +++ src/usr.sbin/npf/npftest/npftest.h Sat Apr 14 21:57:29 2012 @@ -0,0 +1,16 @@ +/* $NetBSD: npftest.h,v 1.1 2012/04/14 21:57:29 rmind Exp $ */ + +/* + * Public Domain. + */ + +#ifndef _NPF_TEST_H_ +#define _NPF_TEST_H_ + +#include stdbool.h + +bool rumpns_npf_nbuf_test(bool); +bool rumpns_npf_processor_test(bool); +bool rumpns_npf_table_test(bool); + +#endif Index: src/usr.sbin/npf/npftest/libnpftest/Makefile diff -u /dev/null src/usr.sbin/npf/npftest/libnpftest/Makefile:1.1 --- /dev/null Sat Apr 14 21:57:30 2012 +++ src/usr.sbin/npf/npftest/libnpftest/Makefile Sat Apr 14 21:57:29 2012 @@ -0,0 +1,24 @@ +# $NetBSD: Makefile,v 1.1 2012/04/14 21:57:29 rmind Exp $ +# +# Public Domain +# + +RUMPTOP= ${.CURDIR}/../../../../sys/rump + +LIB= npftest +LIBISPRIVATE= yes + +SRCS+= npf_mbuf_subr.c + +SRCS+= npf_nbuf_test.c +SRCS+= npf_processor_test.c +SRCS+= npf_table_test.c + +CPPFLAGS+= -I${.CURDIR}/../../../../sys/net/npf +CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern + +WARNS= 4 + +.include ${RUMPTOP}/Makefile.rump +.include bsd.lib.mk +.include bsd.klinks.mk Index: src/usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c diff -u /dev/null src/usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c:1.1 --- /dev/null Sat Apr 14 21:57:30 2012 +++
CVS commit: [jmcneill-usbmp] src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat Apr 14 23:11:02 UTC 2012 Modified Files: src/sys/dev/usb [jmcneill-usbmp]: TODO.usbmp Log Message: note that: - umodem works - checking uhid is a merge issue - testing ugen, ulpt and a couple of network devices is a merge issue - ehci issues are done To generate a diff of this commit: cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/dev/usb/TODO.usbmp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/TODO.usbmp diff -u src/sys/dev/usb/TODO.usbmp:1.1.2.10 src/sys/dev/usb/TODO.usbmp:1.1.2.11 --- src/sys/dev/usb/TODO.usbmp:1.1.2.10 Fri Apr 6 08:22:28 2012 +++ src/sys/dev/usb/TODO.usbmp Sat Apr 14 23:11:02 2012 @@ -1,9 +1,12 @@ -$NetBSD: TODO.usbmp,v 1.1.2.10 2012/04/06 08:22:28 mrg Exp $ +$NetBSD: TODO.usbmp,v 1.1.2.11 2012/04/14 23:11:02 mrg Exp $ the majority of the USB MP device interface is documented in usbdivar.h. +flesh out most of usbdi(9). + + host controllers needing to be ported: - dev/ic/slhci.c - arch/mips/adm5120/dev/ahci.c @@ -20,11 +23,6 @@ add lots more asserts usb_event_thread() startup should use something to sync companions -ehci issues: - - ehci_idone() has gone from splhigh() to splusb(). OK? - - ehci_suspend() no longer has splhardusb() across the whole function - - wake/wakeup conversion: - usb_detach_waitold/wakeupold() - usb_detach_wait/broadcast() - drivers: @@ -57,6 +55,7 @@ convert uhidev users to MPSAFE: uhid(4) - needs some locking here (not completely tested changes) + - MERGE ISSUE ukbd(4) ums(4) @@ -123,7 +122,7 @@ driver testing: STATUS - ucycom - uep - udl - - ulpt attaches ok + - ulpt attaches ok, MERGE ISSUE - uhso working (must take kernel lock for scsipi) - umass working (must take kernel lock for scsipi) - uaudio working @@ -155,7 +154,7 @@ driver testing: STATUS - utoppy - uyap - udsbr - - ugen + - ugen MERGE ISSUE - pseye - uvideo - auvitek ? (must take kernel lock for scsipi) @@ -164,7 +163,7 @@ driver testing: STATUS - aubtfwl - u3ginit ucom attachments: - - umodem + - umodem working - uark - ubsa - uchcom @@ -179,3 +178,6 @@ ucom attachments: - ukyopon - u3g - ugensa + + +test two metwork cards. MERGE ISSUE
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: christos Date: Sun Apr 15 00:34:09 UTC 2012 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Fix check_mcontext for PK_32 binaries. Makes gdb work for i386 binaries on amd64. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.180 src/sys/arch/amd64/amd64/machdep.c:1.181 --- src/sys/arch/amd64/amd64/machdep.c:1.180 Sat Mar 3 18:43:17 2012 +++ src/sys/arch/amd64/amd64/machdep.c Sat Apr 14 20:34:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.180 2012/03/03 23:43:17 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.181 2012/04/15 00:34:09 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.180 2012/03/03 23:43:17 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.181 2012/04/15 00:34:09 christos Exp $); /* #define XENDEBUG_LOW */ @@ -2071,6 +2071,7 @@ check_mcontext(struct lwp *l, const mcon uint16_t sel; int error; struct pmap *pmap = l-l_proc-p_vmspace-vm_map.pmap; + struct proc *p = l-l_proc; gr = mcp-__gregs; @@ -2104,33 +2105,42 @@ check_mcontext(struct lwp *l, const mcon return error; #endif } else { +#define VUD(sel) \ +((p-p_flag PK_32) ? VALID_USER_DSEL32(sel) : VALID_USER_DSEL(sel)) sel = gr[_REG_ES] 0x; - if (sel != 0 !VALID_USER_DSEL(sel)) + if (sel != 0 !VUD(sel)) return EINVAL; +/* XXX: Shouldn't this be FSEL32? */ +#define VUF(sel) \ +((p-p_flag PK_32) ? VALID_USER_DSEL32(sel) : VALID_USER_DSEL(sel)) sel = gr[_REG_FS] 0x; - if (sel != 0 !VALID_USER_DSEL(sel)) + if (sel != 0 !VUF(sel)) return EINVAL; +#define VUG(sel) \ +((p-p_flag PK_32) ? VALID_USER_GSEL32(sel) : VALID_USER_DSEL(sel)) sel = gr[_REG_GS] 0x; - if (sel != 0 !VALID_USER_DSEL(sel)) + if (sel != 0 !VUG(sel)) return EINVAL; sel = gr[_REG_DS] 0x; - if (!VALID_USER_DSEL(sel)) + if (!VUD(sel)) return EINVAL; #ifndef XEN sel = gr[_REG_SS] 0x; - if (!VALID_USER_DSEL(sel)) + if (!VUD(sel)) return EINVAL; #endif } #ifndef XEN +#define VUC(sel) \ +((p-p_flag PK_32) ? VALID_USER_CSEL32(sel) : VALID_USER_CSEL(sel)) sel = gr[_REG_CS] 0x; - if (!VALID_USER_CSEL(sel)) + if (!VUC(sel)) return EINVAL; #endif
CVS commit: src/tests/usr.sbin/tcpdump
Module Name:src Committed By: christos Date: Sun Apr 15 03:05:57 UTC 2012 Modified Files: src/tests/usr.sbin/tcpdump: t_tcpdump.sh Log Message: simplify To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/tcpdump/t_tcpdump.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/tcpdump/t_tcpdump.sh diff -u src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.2 src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.3 --- src/tests/usr.sbin/tcpdump/t_tcpdump.sh:1.2 Sat Apr 14 11:13:57 2012 +++ src/tests/usr.sbin/tcpdump/t_tcpdump.sh Sat Apr 14 23:05:57 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_tcpdump.sh,v 1.2 2012/04/14 15:13:57 jruoho Exp $ +# $NetBSD: t_tcpdump.sh,v 1.3 2012/04/15 03:05:57 christos Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,16 +41,9 @@ promiscuous_head() { promiscuous_body() { - ifs=lo0 age0 ath0 bge0 dge0 re0 rtk0 sip0 sk0 iwn0 vr0 wm0 wpi0 - - for i in $ifs; do - - ifconfig $i /dev/null 21 - - if [ $? -eq 0 ]; then - echo Testing $i - prom $i - fi + for i in $(ifconfig -l); do + echo Testing $i + prom $i done }