CVS commit: src/usr.bin/gzip
Module Name:src Committed By: mrg Date: Wed Apr 1 08:15:37 UTC 2009 Modified Files: src/usr.bin/gzip: gzip.1 Log Message: note that -n also stops the timestamp from being output. bump date. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/gzip/gzip.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/gzip/gzip.1 diff -u src/usr.bin/gzip/gzip.1:1.19 src/usr.bin/gzip/gzip.1:1.20 --- src/usr.bin/gzip/gzip.1:1.19 Thu May 29 14:51:27 2008 +++ src/usr.bin/gzip/gzip.1 Wed Apr 1 08:15:37 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $ +.\ $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $ .\ .\ Copyright (c) 1997, 2003, 2004 Matthew R. Green .\ All rights reserved. @@ -24,7 +24,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd April 27, 2004 +.Dd April 1, 2009 .Dt GZIP 1 .Os .Sh NAME @@ -138,8 +138,8 @@ This option causes the stored filename in the input file to be used as the output file. .It Fl n , -no-name -This option stops the filename from being stored in the output -file. +This option stops the filename and timestamp from being stored in +the output file. .It Fl q , -quiet With this option, no warnings or errors are printed. .It Fl r , -recursive
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Wed Apr 1 08:55:45 UTC 2009 Modified Files: src/share/man/man9: byteorder.9 Log Message: Use .An and .Aq for formatting in the AUTHORS section. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/byteorder.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/byteorder.9 diff -u src/share/man/man9/byteorder.9:1.1 src/share/man/man9/byteorder.9:1.2 --- src/share/man/man9/byteorder.9:1.1 Tue Mar 31 16:12:00 2009 +++ src/share/man/man9/byteorder.9 Wed Apr 1 08:55:45 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: byteorder.9,v 1.1 2009/03/31 16:12:00 tsutsui Exp $ +.\ $NetBSD: byteorder.9,v 1.2 2009/04/01 08:55:45 wiz Exp $ .\ .\ Copyright (c) 2002 Mike Barcroft m...@freebsd.org .\ All rights reserved. @@ -197,4 +197,5 @@ .Xr uuidgen 2 support. .Sh AUTHORS -This manual page was written by Mike Barcroft m...@freebsd.org. +This manual page was written by +.An Mike Barcroft Aq m...@freebsd.org .
CVS commit: src/lib/libedit
Module Name:src Committed By: wiz Date: Wed Apr 1 08:58:48 UTC 2009 Modified Files: src/lib/libedit: editline.3 Log Message: Readability improvement. Whitespace nits. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/lib/libedit/editline.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/libedit/editline.3 diff -u src/lib/libedit/editline.3:1.65 src/lib/libedit/editline.3:1.66 --- src/lib/libedit/editline.3:1.65 Tue Mar 31 17:38:27 2009 +++ src/lib/libedit/editline.3 Wed Apr 1 08:58:47 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: editline.3,v 1.65 2009/03/31 17:38:27 christos Exp $ +.\ $NetBSD: editline.3,v 1.66 2009/04/01 08:58:47 wiz Exp $ .\ .\ Copyright (c) 1997-2003 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -218,15 +218,16 @@ .Fa op are supported, along with the required argument list: .Bl -tag -width 4n -.It Dv EL_PROMPT , Fa char *(*f)(EditLine *), Fa char c +.It Dv EL_PROMPT , Fa char *(*f)(EditLine *) , Fa char c Define prompt printing function as .Fa f , which is to return a string that contains the prompt. -The +The .Fa c argument indicates the start/stop literal prompt character. .Pp -If a start/stop literal character is found in the prompt, itself +If a start/stop literal character is found in the prompt, the +character itself is not printed, but characters after it are printed directly to the terminal without affecting the state of the current line. A subsequent second start/stop literal character ends this behavior.
CVS commit: src/lib/libpthread
Module Name:src Committed By: drochner Date: Wed Apr 1 10:13:24 UTC 2009 Modified Files: src/lib/libpthread: pthread.c Log Message: Fix the comparision function used by the red-black tree global thread list implementation: -don't return a difference, this can overflow -don't try to substract typed pointers which don't belong to the same object, this gives undefined results This fixes instabilities of programs which use more than a handful of threads, eg spuriously failing pthread_join(). To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/lib/libpthread/pthread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.108 src/lib/libpthread/pthread.c:1.109 --- src/lib/libpthread/pthread.c:1.108 Mon Mar 30 21:32:51 2009 +++ src/lib/libpthread/pthread.c Wed Apr 1 10:13:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.108 2009/03/30 21:32:51 ad Exp $ */ +/* $NetBSD: pthread.c,v 1.109 2009/04/01 10:13:24 drochner Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: pthread.c,v 1.108 2009/03/30 21:32:51 ad Exp $); +__RCSID($NetBSD: pthread.c,v 1.109 2009/04/01 10:13:24 drochner Exp $); #define __EXPOSE_STACK 1 @@ -1275,7 +1275,13 @@ static int pthread__cmp(struct __pthread_st *a, struct __pthread_st *b) { - return b - a; + + if ((uintptr_t)a (uintptr_t)b) + return (-1); + else if (a == b) + return 0; + else + return 1; } RB_GENERATE_STATIC(__pthread__alltree, __pthread_st, pt_alltree, pthread__cmp) #endif
CVS commit: src/sys/sys
Module Name:src Committed By: lukem Date: Wed Apr 1 10:17:04 UTC 2009 Modified Files: src/sys/sys: bootblock.h Log Message: fix sign-compare issue To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/sys/bootblock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/bootblock.h diff -u src/sys/sys/bootblock.h:1.45 src/sys/sys/bootblock.h:1.46 --- src/sys/sys/bootblock.h:1.45 Mon Apr 28 20:24:10 2008 +++ src/sys/sys/bootblock.h Wed Apr 1 10:17:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bootblock.h,v 1.45 2008/04/28 20:24:10 martin Exp $ */ +/* $NetBSD: bootblock.h,v 1.46 2009/04/01 10:17:04 lukem Exp $ */ /*- * Copyright (c) 2002-2004 The NetBSD Foundation, Inc. @@ -787,7 +787,7 @@ do {\ const struct alpha_boot_block *_bb = (bb); \ uint64_t _cksum; \ - int _i; \ + size_t _i; \ \ _cksum = 0; \ for (_i = 0; \
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: reinoud Date: Wed Apr 1 12:19:04 UTC 2009 Modified Files: src/sys/dev/scsipi: cd.c scsipi_cd.h Log Message: Implement MMC_TRACKINFO_DATA and MMC_TRACKINFO_AUDIO detection for cdrom and dvdrom devices. These two compatibility codes were forgotten when those were introduced. To generate a diff of this commit: cvs rdiff -u -r1.290 -r1.291 src/sys/dev/scsipi/cd.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/scsipi/scsipi_cd.h 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/scsipi/cd.c diff -u src/sys/dev/scsipi/cd.c:1.290 src/sys/dev/scsipi/cd.c:1.291 --- src/sys/dev/scsipi/cd.c:1.290 Wed Mar 18 16:00:20 2009 +++ src/sys/dev/scsipi/cd.c Wed Apr 1 12:19:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.290 2009/03/18 16:00:20 cegger Exp $ */ +/* $NetBSD: cd.c,v 1.291 2009/04/01 12:19:04 reinoud Exp $ */ /*- * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation, @@ -50,7 +50,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cd.c,v 1.290 2009/03/18 16:00:20 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: cd.c,v 1.291 2009/04/01 12:19:04 reinoud Exp $); #include rnd.h @@ -3181,7 +3181,7 @@ const uint32_t buffer_size = 4 * 1024; /* worst case TOC estimate */ uint8_t *buffer; uint8_t track_sessionnr, last_tracknr, sessionnr, adr, tno, point; - uint8_t tmin, tsec, tframe, pmin, psec, pframe; + uint8_t control, tmin, tsec, tframe, pmin, psec, pframe; int size, req_size; int error, flags; @@ -3225,6 +3225,7 @@ /* read in complete raw toc */ req_size = _2btol(toc_hdr-length); + req_size = 2*((req_size + 1) / 2); /* for ATAPI */ _lto2b(req_size, gtoc_cmd.data_len); error = scsipi_command(periph, @@ -3255,6 +3256,7 @@ tno = rawtoc-tno; sessionnr = rawtoc-sessionnr; adr = rawtoc-adrcontrol 4; + control = rawtoc-adrcontrol 0xf; point = rawtoc-point; tmin = rawtoc-min; tsec = rawtoc-sec; @@ -3292,6 +3294,14 @@ } } + if ((control (32)) == 4) /* 01xxb */ + flags |= MMC_TRACKINFO_DATA; + if ((control (12)) == 0) { /* x0xxb */ + flags |= MMC_TRACKINFO_AUDIO; + if (control 1) /* xxx1b */ +flags |= MMC_TRACKINFO_PRE_EMPH; + } + rawtoc++; size -= sizeof(struct scsipi_toc_rawtoc); } @@ -3351,7 +3361,7 @@ uint32_t lba, lead_out; const uint32_t buffer_size = 4 * 1024; /* worst case TOC estimate */ uint8_t *buffer; - uint8_t last_tracknr; + uint8_t control, last_tracknr; int size, req_size; int error, flags; @@ -3417,12 +3427,15 @@ track_start = 0; track_size = 0; lead_out = 0; + flags= 0; size = req_size - sizeof(struct scsipi_toc_header) + 1; while (size 0) { /* remember, DVD-ROM: tracknr == sessionnr */ lba = _4btol(toc-msf_lba); tracknr = toc-tracknr; + control = toc-adrcontrol 0xf; + if (trackinfo-tracknr == tracknr) { track_start = lba; } @@ -3433,6 +3446,17 @@ if (tracknr == 0xAA) { lead_out = lba; } + + if ((control (32)) == 4) /* 01xxb */ + flags |= MMC_TRACKINFO_DATA; + if ((control (12)) == 0) { /* x0xxb */ + flags |= MMC_TRACKINFO_AUDIO; + if (control (13)) /* 10xxb */ +flags |= MMC_TRACKINFO_AUDIO_4CHAN; + if (control 1) /* xxx1b */ +flags |= MMC_TRACKINFO_PRE_EMPH; + } + toc++; size -= sizeof(struct scsipi_toc_formatted); } @@ -3446,7 +3470,7 @@ trackinfo-track_mode = 0; /* unknown */ trackinfo-data_mode = 8; /* 2048 bytes mode1 */ - trackinfo-flags = 0; + trackinfo-flags = flags; trackinfo-track_start = track_start; trackinfo-next_writable = 0; trackinfo-free_blocks = 0; Index: src/sys/dev/scsipi/scsipi_cd.h diff -u src/sys/dev/scsipi/scsipi_cd.h:1.20 src/sys/dev/scsipi/scsipi_cd.h:1.21 --- src/sys/dev/scsipi/scsipi_cd.h:1.20 Mon Sep 8 23:36:54 2008 +++ src/sys/dev/scsipi/scsipi_cd.h Wed Apr 1 12:19:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_cd.h,v 1.20 2008/09/08 23:36:54 gmcgarry Exp $ */ +/* $NetBSD: scsipi_cd.h,v 1.21 2009/04/01 12:19:04 reinoud Exp $ */ /* * Written by Julian Elischer (jul...@tfs.com) @@ -115,7 +115,7 @@ /* read TOC form 0 result entries */ struct scsipi_toc_formatted { uint8_t unused1; - uint8_t adrcontol; + uint8_t adrcontrol; uint8_t tracknr; uint8_t unused2; uint8_t msf_lba[4]; /* union msf_lba from cdio.h */
CVS commit: src/etc
Module Name:src Committed By: martin Date: Wed Apr 1 16:20:55 UTC 2009 Modified Files: src/etc: sysctl.conf Log Message: Use the new ?= operator to set the on_panic value for the optional ddb hierachie. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/etc/sysctl.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/sysctl.conf diff -u src/etc/sysctl.conf:1.6 src/etc/sysctl.conf:1.7 --- src/etc/sysctl.conf:1.6 Wed Mar 11 23:22:57 2009 +++ src/etc/sysctl.conf Wed Apr 1 16:20:55 2009 @@ -1,6 +1,6 @@ #!/sbin/sysctl -f # -# $NetBSD: sysctl.conf,v 1.6 2009/03/11 23:22:57 martin Exp $ +# $NetBSD: sysctl.conf,v 1.7 2009/04/01 16:20:55 martin Exp $ # # sysctl(8) variables to set at boot time. @@ -10,7 +10,7 @@ # at the db prompt. # If you understand the implication and want to change the behaviour before # /etc/rc.d/sysctl is run, use the kernel option DDB_ONPANIC, see options(4). -ddb.onpanic=0 +ddb.onpanic?=0 # Default core name template: #kern.defcorename=%n.core
CVS commit: src/share/mk
Module Name:src Committed By: perry Date: Wed Apr 1 17:47:39 UTC 2009 Modified Files: src/share/mk: bsd.lib.mk Log Message: Add a _ARRANFL for the flags for invoking ar as ranlib. Will be used only for Makefile.rump for now. To generate a diff of this commit: cvs rdiff -u -r1.296 -r1.297 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.296 src/share/mk/bsd.lib.mk:1.297 --- src/share/mk/bsd.lib.mk:1.296 Fri Mar 13 16:23:31 2009 +++ src/share/mk/bsd.lib.mk Wed Apr 1 17:47:39 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.296 2009/03/13 16:23:31 perry Exp $ +# $NetBSD: bsd.lib.mk,v 1.297 2009/04/01 17:47:39 perry Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include bsd.init.mk @@ -442,9 +442,11 @@ .if ${MKARZERO} == yes _ARFL=crsD +_ARRANFL=sD _INSTRANLIB= .else _ARFL=crs +_ARRANFL=s _INSTRANLIB=${empty(PRESERVE):?-a ${RANLIB} -t:} .endif
CVS commit: src/sys/rump
Module Name:src Committed By: perry Date: Wed Apr 1 17:51:12 UTC 2009 Modified Files: src/sys/rump: Makefile.rump Log Message: More reproducible build fixes: 1) invoke objcopy with --preserve-dates or it will update all the dates in the .a file to the present date. 2) add an invocation of ar-as-ranlib or the object file index ends up with the date in it. (it might also end up with an incorrect index.) To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/rump/Makefile.rump 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/Makefile.rump diff -u src/sys/rump/Makefile.rump:1.35 src/sys/rump/Makefile.rump:1.36 --- src/sys/rump/Makefile.rump:1.35 Sat Mar 21 04:59:08 2009 +++ src/sys/rump/Makefile.rump Wed Apr 1 17:51:12 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rump,v 1.35 2009/03/21 04:59:08 pooka Exp $ +# $NetBSD: Makefile.rump,v 1.36 2009/04/01 17:51:12 perry Exp $ # WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet @@ -61,5 +61,6 @@ $$NF!~/^(rump|RUMP|__|_GLOBAL_OFFSET_TABLE'${_SYMQUIRK}')/ \ {printf %s rumpns_%s\n, $$NF, $$NF}' \ | sort | uniq renametab.${.TARGET} - ${OBJCOPY} --redefine-syms renametab.${.TARGET} ${.TARGET} + ${OBJCOPY} --preserve-dates --redefine-syms renametab.${.TARGET} ${.TARGET} rm -f renametab.${.TARGET} + ${AR} ${_ARRANFL} ${.TARGET}
CVS commit: src/lib/libcurses
Module Name:src Committed By: cube Date: Wed Apr 1 20:59:15 UTC 2009 Modified Files: src/lib/libcurses: curses.h keypad.c Log Message: Make keypad return an int instead of nothing, as the SUS and even curses_input(3) [!] say it should. OK'd j...@. ABI lawyers say this doesn't need major bump. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/lib/libcurses/curses.h cvs rdiff -u -r1.10 -r1.11 src/lib/libcurses/keypad.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/curses.h diff -u src/lib/libcurses/curses.h:1.93 src/lib/libcurses/curses.h:1.94 --- src/lib/libcurses/curses.h:1.93 Mon Apr 14 20:40:54 2008 +++ src/lib/libcurses/curses.h Wed Apr 1 20:59:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: curses.h,v 1.93 2008/04/14 20:40:54 jdc Exp $ */ +/* $NetBSD: curses.h,v 1.94 2009/04/01 20:59:15 cube Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -665,7 +665,7 @@ bool is_linetouched(WINDOW *, int); bool is_wintouched(WINDOW *); int keyok(int, bool); -void keypad(WINDOW *, bool); +int keypad(WINDOW *, bool); char *keyname(int); char killchar(void); int leaveok(WINDOW *, bool); Index: src/lib/libcurses/keypad.c diff -u src/lib/libcurses/keypad.c:1.10 src/lib/libcurses/keypad.c:1.11 --- src/lib/libcurses/keypad.c:1.10 Sun Jan 21 13:25:36 2007 +++ src/lib/libcurses/keypad.c Wed Apr 1 20:59:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: keypad.c,v 1.10 2007/01/21 13:25:36 jdc Exp $ */ +/* $NetBSD: keypad.c,v 1.11 2009/04/01 20:59:15 cube Exp $ */ /*- * Copyright (c) 1998-1999 Brett Lymn (bl...@baea.com.au, brett_l...@yahoo.com) @@ -28,7 +28,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: keypad.c,v 1.10 2007/01/21 13:25:36 jdc Exp $); +__RCSID($NetBSD: keypad.c,v 1.11 2009/04/01 20:59:15 cube Exp $); #endif/* not lint */ #include curses.h @@ -39,7 +39,7 @@ * Turn on and off interpretation of function/keypad keys in the * given window. */ -void +int keypad(WINDOW *win, bool bf) { #ifdef DEBUG @@ -54,4 +54,6 @@ } } else win-flags = ~__KEYPAD; + + return OK; }
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Wed Apr 1 21:03:04 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: kern_exec.c Log Message: Pull up following revision(s) (requested by christos in ticket #573): sys/kern/kern_exec.c: revision 1.286 don't enforce maxproc resource limits for root. To generate a diff of this commit: cvs rdiff -u -r1.280.4.2 -r1.280.4.3 src/sys/kern/kern_exec.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/kern/kern_exec.c diff -u src/sys/kern/kern_exec.c:1.280.4.2 src/sys/kern/kern_exec.c:1.280.4.3 --- src/sys/kern/kern_exec.c:1.280.4.2 Wed Apr 1 00:25:22 2009 +++ src/sys/kern/kern_exec.c Wed Apr 1 21:03:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.280.4.2 2009/04/01 00:25:22 snj Exp $ */ +/* $NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.280.4.2 2009/04/01 00:25:22 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $); #include opt_ktrace.h #include opt_syscall_debug.h @@ -498,6 +498,7 @@ ksiginfoq_t kq; char *pathbuf; size_t pathbuflen; + uid_t uid; p = l-l_proc; @@ -517,9 +518,8 @@ * to call exec in order to do something useful. */ - if ((p-p_flag PK_SUGID) - chgproccnt(kauth_cred_getuid(l-l_cred), 0) - p-p_rlimit[RLIMIT_NPROC].rlim_cur) + if ((p-p_flag PK_SUGID) (uid = kauth_cred_getuid(l-l_cred)) != 0 + chgproccnt(uid, 0) p-p_rlimit[RLIMIT_NPROC].rlim_cur) return EAGAIN; oldlwpflags = l-l_flag (LW_SA | LW_SA_UPCALL);
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Wed Apr 1 21:15:23 UTC 2009 Modified Files: src/sys/compat/sys: shm.h Log Message: cast segsz to int. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/shm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/shm.h diff -u src/sys/compat/sys/shm.h:1.6 src/sys/compat/sys/shm.h:1.7 --- src/sys/compat/sys/shm.h:1.6 Mon Jan 19 14:39:41 2009 +++ src/sys/compat/sys/shm.h Wed Apr 1 17:15:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shm.h,v 1.6 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: shm.h,v 1.7 2009/04/01 21:15:23 christos Exp $ */ /* * Copyright (c) 1994 Adam Glass @@ -115,7 +115,7 @@ #define CVT(x) oshmbuf-x = shmbuf-x #define CVTI(x) oshmbuf-x = (int)shmbuf-x - CVT(shm_segsz); + CVTI(shm_segsz); CVT(shm_lpid); CVT(shm_cpid); CVT(shm_nattch);
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: drochner Date: Wed Apr 1 21:15:46 UTC 2009 Modified Files: src/sys/arch/x86/include: via_padlock.h Log Message: sort out what is needed for crash(8) and what not, should fix recent build errors To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/include/via_padlock.h 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/x86/include/via_padlock.h diff -u src/sys/arch/x86/include/via_padlock.h:1.4 src/sys/arch/x86/include/via_padlock.h:1.5 --- src/sys/arch/x86/include/via_padlock.h:1.4 Wed Apr 1 03:56:54 2009 +++ src/sys/arch/x86/include/via_padlock.h Wed Apr 1 21:15:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: via_padlock.h,v 1.4 2009/04/01 03:56:54 tls Exp $ */ +/* $NetBSD: via_padlock.h,v 1.5 2009/04/01 21:15:45 drochner Exp $ */ /*- * Copyright (c) 2003 Jason Wright @@ -21,7 +21,7 @@ #ifndef _X86_VIA_PADLOCK_H_ #define _X86_VIA_PADLOCK_H_ -#if defined(_KERNEL) || defined(_KMEMUSER) +#if defined(_KERNEL) #include sys/rnd.h #include sys/callout.h @@ -72,6 +72,11 @@ #define VIAC3_RNG_BUFSIZ 16 +voidvia_padlock_attach(void); + +#endif /* _KERNEL */ + +#if defined(_KERNEL) || defined(_KMEMUSER) struct cpu_info; struct via_padlock { @@ -79,7 +84,5 @@ int vp_freq; }; -void via_padlock_attach(void); - #endif /* _KERNEL || _KMEMUSER */ #endif /* _X86_VIA_PADLOCK_H_ */
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Wed Apr 1 21:25:35 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: sys_sig.c Log Message: Pull up following revision(s) (requested by rmind in ticket #632): sys/kern/sys_sig.c: revision 1.22 PR/41094: Matteo Beccati: sigtimedwait returns EAGAIN instead of EINVAL if timeout is invalid To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/kern/sys_sig.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/kern/sys_sig.c diff -u src/sys/kern/sys_sig.c:1.17 src/sys/kern/sys_sig.c:1.17.4.1 --- src/sys/kern/sys_sig.c:1.17 Wed Oct 15 06:51:20 2008 +++ src/sys/kern/sys_sig.c Wed Apr 1 21:25:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sig.c,v 1.17 2008/10/15 06:51:20 wrstuden Exp $ */ +/* $NetBSD: sys_sig.c,v 1.17.4.1 2009/04/01 21:25:35 snj Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.17 2008/10/15 06:51:20 wrstuden Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.17.4.1 2009/04/01 21:25:35 snj Exp $); #include opt_ptrace.h #include opt_compat_netbsd.h @@ -640,7 +640,7 @@ if (timo == 0 ts.tv_sec == 0 ts.tv_nsec 0) timo = 1; if (timo = 0) - return (EAGAIN); + return EINVAL; /* * Remember current uptime, it would be used in
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Wed Apr 1 21:29:14 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c Log Message: Pull up following revision(s) (requested by macallan in ticket #634): external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.7 oops, forgot to initialize the clipping register on init To generate a diff of this commit: cvs rdiff -u -r1.3.2.7 -r1.3.2.8 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.8 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7 Wed Apr 1 03:18:07 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Wed Apr 1 21:29:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.3.2.7 2009/04/01 03:18:07 snj Exp $ */ +/* $NetBSD: crime_accel.c,v 1.3.2.8 2009/04/01 21:29:14 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -1934,6 +1934,8 @@ /* Sync */ pXAAInfo-Sync = CrimeSync; + CrimeDisableClipping(pScrn); + /* Screen-to-screen copy */ pXAAInfo-ScreenToScreenCopyFlags = NO_TRANSPARENCY; pXAAInfo-SetupForScreenToScreenCopy = CrimeSetupForScreenToScreenCopy;
CVS commit: [netbsd-5] src/games/trek
Module Name:src Committed By: snj Date: Wed Apr 1 21:41:49 UTC 2009 Modified Files: src/games/trek [netbsd-5]: help.c kill.c schedule.c setup.c trek.h Log Message: Pull up following revision(s) (requested by christos in ticket #637): games/trek/help.c: revision 1.9 games/trek/kill.c: revision 1.8 games/trek/schedule.c: revision 1.7 games/trek/setup.c: revision 1.10 games/trek/trek.h: revision 1.12 Avoid hardcoded too large constant that caused FPE on the vax. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.10.1 src/games/trek/help.c cvs rdiff -u -r1.7 -r1.7.38.1 src/games/trek/kill.c cvs rdiff -u -r1.6 -r1.6.26.1 src/games/trek/schedule.c cvs rdiff -u -r1.8 -r1.8.38.1 src/games/trek/setup.c cvs rdiff -u -r1.11 -r1.11.32.1 src/games/trek/trek.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/trek/help.c diff -u src/games/trek/help.c:1.8 src/games/trek/help.c:1.8.10.1 --- src/games/trek/help.c:1.8 Sat Dec 15 19:44:44 2007 +++ src/games/trek/help.c Wed Apr 1 21:41:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: help.c,v 1.8 2007/12/15 19:44:44 perry Exp $ */ +/* $NetBSD: help.c,v 1.8.10.1 2009/04/01 21:41:49 snj Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,13 +34,14 @@ #if 0 static char sccsid[] = @(#)help.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: help.c,v 1.8 2007/12/15 19:44:44 perry Exp $); +__RCSID($NetBSD: help.c,v 1.8.10.1 2009/04/01 21:41:49 snj Exp $); #endif #endif /* not lint */ #include stdio.h #include math.h #include unistd.h +#include limits.h #include trek.h /* @@ -96,7 +97,7 @@ Game.helps += 1; /* find the closest base */ - dist = 1e50; + dist = TOOLARGE; if (Quad[Ship.quadx][Ship.quady].bases = 0) { /* there isn't one in this quadrant */ Index: src/games/trek/kill.c diff -u src/games/trek/kill.c:1.7 src/games/trek/kill.c:1.7.38.1 --- src/games/trek/kill.c:1.7 Thu Aug 7 09:37:52 2003 +++ src/games/trek/kill.c Wed Apr 1 21:41:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kill.c,v 1.7 2003/08/07 09:37:52 agc Exp $ */ +/* $NetBSD: kill.c,v 1.7.38.1 2009/04/01 21:41:49 snj Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,11 +34,12 @@ #if 0 static char sccsid[] = @(#)kill.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: kill.c,v 1.7 2003/08/07 09:37:52 agc Exp $); +__RCSID($NetBSD: kill.c,v 1.7.38.1 2009/04/01 21:41:49 snj Exp $); #endif #endif /* not lint */ #include stdio.h +#include limits.h #include trek.h /* @@ -138,7 +139,7 @@ printf( quadrant %d,%d has been destroyed\n, qx, qy); } else - schedule(E_KATSB | E_GHOST, 1e50, qx, qy, 0); + schedule(E_KATSB | E_GHOST, TOOLARGE, qx, qy, 0); } } Index: src/games/trek/schedule.c diff -u src/games/trek/schedule.c:1.6 src/games/trek/schedule.c:1.6.26.1 --- src/games/trek/schedule.c:1.6 Sun Mar 19 00:56:12 2006 +++ src/games/trek/schedule.c Wed Apr 1 21:41:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: schedule.c,v 1.6 2006/03/19 00:56:12 christos Exp $ */ +/* $NetBSD: schedule.c,v 1.6.26.1 2009/04/01 21:41:49 snj Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,13 +34,14 @@ #if 0 static char sccsid[] = @(#)schedule.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: schedule.c,v 1.6 2006/03/19 00:56:12 christos Exp $); +__RCSID($NetBSD: schedule.c,v 1.6.26.1 2009/04/01 21:41:49 snj Exp $); #endif #endif /* not lint */ #include stdio.h #include math.h #include err.h +#include limits.h #include trek.h /* @@ -135,7 +136,7 @@ e-evcode, e-date, e-x, e-y, e-systemname); # endif Now.eventptr[e-evcode E_EVENT] = 0; - e-date = 1e50; + e-date = TOOLARGE; e-evcode = 0; return; } Index: src/games/trek/setup.c diff -u src/games/trek/setup.c:1.8 src/games/trek/setup.c:1.8.38.1 --- src/games/trek/setup.c:1.8 Thu Aug 7 09:37:54 2003 +++ src/games/trek/setup.c Wed Apr 1 21:41:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: setup.c,v 1.8 2003/08/07 09:37:54 agc Exp $ */ +/* $NetBSD: setup.c,v 1.8.38.1 2009/04/01 21:41:49 snj Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)setup.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: setup.c,v 1.8 2003/08/07 09:37:54 agc Exp $); +__RCSID($NetBSD: setup.c,v 1.8.38.1 2009/04/01 21:41:49 snj Exp $); #endif #endif /* not lint */ @@ -44,6 +44,7 @@ #include unistd.h #include stdlib.h #include err.h +#include limits.h #include trek.h #include getpar.h @@ -211,7 +212,7 @@ for (i = 0; i MAXEVENTS; i++) { e = Event[i]; - e-date = 1e50; + e-date = TOOLARGE; e-evcode = 0; } xsched(E_SNOVA, 1, 0, 0, 0); Index: src/games/trek/trek.h diff -u src/games/trek/trek.h:1.11 src/games/trek/trek.h:1.11.32.1 --- src/games/trek/trek.h:1.11 Tue Feb 15 12:54:50 2005 +++ src/games/trek/trek.h Wed Apr 1 21:41:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: trek.h,v 1.11 2005/02/15 12:54:50 jsm Exp $ */ +/* $NetBSD: trek.h,v 1.11.32.1
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Wed Apr 1 21:43:53 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: sys_sig.c Log Message: Pull up following revision(s) (requested by christos in ticket #638): sys/kern/sys_sig.c: revision 1.23 - use itimespecfix to detect invalid timespecs - use tstohz instead of mstohz to prevent overflow. To generate a diff of this commit: cvs rdiff -u -r1.17.4.1 -r1.17.4.2 src/sys/kern/sys_sig.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/kern/sys_sig.c diff -u src/sys/kern/sys_sig.c:1.17.4.1 src/sys/kern/sys_sig.c:1.17.4.2 --- src/sys/kern/sys_sig.c:1.17.4.1 Wed Apr 1 21:25:35 2009 +++ src/sys/kern/sys_sig.c Wed Apr 1 21:43:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sig.c,v 1.17.4.1 2009/04/01 21:25:35 snj Exp $ */ +/* $NetBSD: sys_sig.c,v 1.17.4.2 2009/04/01 21:43:53 snj Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.17.4.1 2009/04/01 21:25:35 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_sig.c,v 1.17.4.2 2009/04/01 21:43:53 snj Exp $); #include opt_ptrace.h #include opt_compat_netbsd.h @@ -630,17 +630,16 @@ * Calculate timeout, if it was specified. */ if (SCARG(uap, timeout)) { - uint64_t ms; + error = (*fetch_timeout)(SCARG(uap, timeout), ts, sizeof(ts)); + if (error) + return error; - if ((error = (*fetch_timeout)(SCARG(uap, timeout), ts, sizeof(ts - return (error); + if ((error = itimespecfix(ts)) != 0) + return error; - ms = (ts.tv_sec * 1000) + (ts.tv_nsec / 100); - timo = mstohz(ms); - if (timo == 0 ts.tv_sec == 0 ts.tv_nsec 0) - timo = 1; - if (timo = 0) - return EINVAL; + timo = tstohz(ts); + if (timo == 0 ts.tv_sec == 0 ts.tv_nsec != 0) + timo++; /* * Remember current uptime, it would be used in
CVS commit: [netbsd-5] src/etc
Module Name:src Committed By: snj Date: Wed Apr 1 21:46:18 UTC 2009 Modified Files: src/etc [netbsd-5]: sysctl.conf Log Message: Pull up following revision(s) (requested by martin in ticket #639): etc/sysctl.conf: revision 1.7 Use the new ?= operator to set the on_panic value for the optional ddb hierachie. To generate a diff of this commit: cvs rdiff -u -r1.5.40.2 -r1.5.40.3 src/etc/sysctl.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/sysctl.conf diff -u src/etc/sysctl.conf:1.5.40.2 src/etc/sysctl.conf:1.5.40.3 --- src/etc/sysctl.conf:1.5.40.2 Thu Mar 12 23:26:22 2009 +++ src/etc/sysctl.conf Wed Apr 1 21:46:18 2009 @@ -1,6 +1,6 @@ #!/sbin/sysctl -f # -# $NetBSD: sysctl.conf,v 1.5.40.2 2009/03/12 23:26:22 snj Exp $ +# $NetBSD: sysctl.conf,v 1.5.40.3 2009/04/01 21:46:18 snj Exp $ # # sysctl(8) variables to set at boot time. @@ -22,7 +22,7 @@ # at the db prompt. # If you understand the implication and want to change the behaviour before # /etc/rc.d/sysctl is run, use the kernel option DDB_ONPANIC, see options(4). -ddb.onpanic=0 +ddb.onpanic?=0 # Default core name template: #kern.defcorename=%n.core
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Wed Apr 1 21:56:51 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: kern_sig.c Log Message: Pull up following revision(s) (requested by drochner in ticket #640): sys/kern/kern_sig.c: revision 1.296 In sigput(), save the siginfo no matter whether SA_SIGINFO is set or not. There are also sigtimedwait(2) et al. to catch signals without invoking a signal handler. Fixes PR kern/41076 by Matteo Beccati (the first test case, where the signal is sent before sigwaitinfo(2) gets called). To generate a diff of this commit: cvs rdiff -u -r1.289.4.4 -r1.289.4.5 src/sys/kern/kern_sig.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/kern/kern_sig.c diff -u src/sys/kern/kern_sig.c:1.289.4.4 src/sys/kern/kern_sig.c:1.289.4.5 --- src/sys/kern/kern_sig.c:1.289.4.4 Tue Mar 31 23:41:23 2009 +++ src/sys/kern/kern_sig.c Wed Apr 1 21:56:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.289.4.4 2009/03/31 23:41:23 snj Exp $ */ +/* $NetBSD: kern_sig.c,v 1.289.4.5 2009/04/01 21:56:50 snj Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_sig.c,v 1.289.4.4 2009/03/31 23:41:23 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_sig.c,v 1.289.4.5 2009/04/01 21:56:50 snj Exp $); #include opt_ptrace.h #include opt_compat_sunos.h @@ -543,14 +543,12 @@ /* * sigput: * - * Append a new ksiginfo element to the list of pending ksiginfo's, if - * we need to (e.g. SA_SIGINFO was requested). + * Append a new ksiginfo element to the list of pending ksiginfo's. */ static void sigput(sigpend_t *sp, struct proc *p, ksiginfo_t *ksi) { ksiginfo_t *kp; - struct sigaction *sa = SIGACTION_PS(p-p_sigacts, ksi-ksi_signo); KASSERT(mutex_owned(p-p_lock)); KASSERT((ksi-ksi_flags KSI_QUEUED) == 0); @@ -558,11 +556,9 @@ sigaddset(sp-sp_set, ksi-ksi_signo); /* - * If there is no siginfo, or is not required (and we don't add - * it for the benefit of ktrace, we are done). + * If there is no siginfo, we are done. */ - if (KSI_EMPTY_P(ksi) || - (!KTRPOINT(p, KTR_PSIG) (sa-sa_flags SA_SIGINFO) == 0)) + if (KSI_EMPTY_P(ksi)) return; KASSERT((ksi-ksi_flags KSI_FROMPOOL) != 0);
CVS commit: [netbsd-5] src/etc
Module Name:src Committed By: snj Date: Wed Apr 1 22:08:37 UTC 2009 Modified Files: src/etc [netbsd-5]: sysctl.conf Log Message: Apply patch (requested by martin in ticket #643): Use ?= to set kern.no_sa_support to avoid warnings. To generate a diff of this commit: cvs rdiff -u -r1.5.40.3 -r1.5.40.4 src/etc/sysctl.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/sysctl.conf diff -u src/etc/sysctl.conf:1.5.40.3 src/etc/sysctl.conf:1.5.40.4 --- src/etc/sysctl.conf:1.5.40.3 Wed Apr 1 21:46:18 2009 +++ src/etc/sysctl.conf Wed Apr 1 22:08:37 2009 @@ -1,6 +1,6 @@ #!/sbin/sysctl -f # -# $NetBSD: sysctl.conf,v 1.5.40.3 2009/04/01 21:46:18 snj Exp $ +# $NetBSD: sysctl.conf,v 1.5.40.4 2009/04/01 22:08:37 snj Exp $ # # sysctl(8) variables to set at boot time. @@ -14,7 +14,7 @@ # to 0 - THIS IS CONSIDERED A SECURITY RISK - VERY LIKELY ANY LOCAL USER WILL # BE ABLE TO CRASH YOUR SYSTEM - USE AT YOUR OWN RISK! # -kern.no_sa_support=1 +kern.no_sa_support?=1 # Default on panic: dump core and reboot. See savecore(8) for information. # Switch this to 1 if you want to enter the kernel debugger on crashes
CVS commit: [netbsd-5] src/usr.sbin/postinstall
Module Name:src Committed By: snj Date: Wed Apr 1 22:21:51 UTC 2009 Modified Files: src/usr.sbin/postinstall [netbsd-5]: postinstall Log Message: Apply patch (requested by martin in ticket #642): Make ddb.onpanic and kern.no_sa_support acceptable even if commented out. To generate a diff of this commit: cvs rdiff -u -r1.76.2.11 -r1.76.2.12 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.76.2.11 src/usr.sbin/postinstall/postinstall:1.76.2.12 --- src/usr.sbin/postinstall/postinstall:1.76.2.11 Sat Mar 28 18:57:10 2009 +++ src/usr.sbin/postinstall/postinstall Wed Apr 1 22:21:50 2009 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.76.2.11 2009/03/28 18:57:10 snj Exp $ +# $NetBSD: postinstall,v 1.76.2.12 2009/04/01 22:21:50 snj Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -667,7 +667,7 @@ { [ -n $1 ] || err 3 USAGE: do_ddbonpanic fix|check - if ${GREP} -E '^[[:space:]]*ddb\.onpanic[[:space:]]*=[[:space:]]*[[:digit:]]+' \ + if ${GREP} -E '^#*[[:space:]]*ddb\.onpanic[[:space:]]*=[[:space:]]*[[:digit:]]+' \ ${DEST_DIR}/etc/sysctl.conf /dev/null 21 then result=0 @@ -884,7 +884,7 @@ { [ -n $1 ] || err 3 USAGE: do_nosa fix|check - if ${GREP} -E '^[[:space:]]*kern\.no_sa_support[[:space:]]*=[[:space:]]*[[:digit:]]+' \ + if ${GREP} -E '^#*[[:space:]]*kern\.no_sa_support[[:space:]]*=[[:space:]]*[[:digit:]]+' \ ${DEST_DIR}/etc/sysctl.conf /dev/null 21 then result=0
CVS commit: [netbsd-5] src/sys/sys
Module Name:src Committed By: snj Date: Wed Apr 1 22:30:55 UTC 2009 Modified Files: src/sys/sys [netbsd-5]: siginfo.h Log Message: Pull up following revision(s) (requested by rmind in ticket #631): sys/sys/siginfo.h: revision 1.18 fix typo for POLL_HUP. Noted by yamt. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.10.1 src/sys/sys/siginfo.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/siginfo.h diff -u src/sys/sys/siginfo.h:1.17 src/sys/sys/siginfo.h:1.17.10.1 --- src/sys/sys/siginfo.h:1.17 Mon Apr 28 20:24:11 2008 +++ src/sys/sys/siginfo.h Wed Apr 1 22:30:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: siginfo.h,v 1.17 2008/04/28 20:24:11 martin Exp $ */ +/* $NetBSD: siginfo.h,v 1.17.10.1 2009/04/01 22:30:55 snj Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -220,7 +220,7 @@ #define POLL_MSG 3 /* Input message available */ #define POLL_ERR 4 /* I/O Error*/ #define POLL_PRI 5 /* High priority input available */ -#define POLL_HUP 4 /* Device disconnected */ +#define POLL_HUP 6 /* Device disconnected */ /** si_code */
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Wed Apr 1 22:33:20 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.0 Log Message: Update for latest batch of tickets. To generate a diff of this commit: cvs rdiff -u -r1.1.2.123 -r1.1.2.124 src/doc/CHANGES-5.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0 diff -u src/doc/CHANGES-5.0:1.1.2.123 src/doc/CHANGES-5.0:1.1.2.124 --- src/doc/CHANGES-5.0:1.1.2.123 Wed Apr 1 03:23:17 2009 +++ src/doc/CHANGES-5.0 Wed Apr 1 22:33:20 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0,v 1.1.2.123 2009/04/01 03:23:17 snj Exp $ +# $NetBSD: CHANGES-5.0,v 1.1.2.124 2009/04/01 22:33:20 snj Exp $ A complete list of changes from the initial NetBSD 5.0 branch on October 2008 until the 5.0 release: @@ -5572,3 +5572,71 @@ Implement pattern fills. [macallan, ticket #626] +sys/kern/kern_exec.c1.286 via patch + + Don't enforce maxproc resource limits for root. + [christos, ticket #573] + +sys/kern/sys_sig.c1.22 + + Return EINVAL instead of EAGAIN if timeout is invalid. + Fixes PR/41094. + [rmind, ticket #632] + +xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c 1.7 + + Initialize the clipping register on init. + [macallan, ticket #634] + +sbin/sysctl/sysctl.81.160 +sbin/sysctl/sysctl.c1.129 + + Don't print an error with sysctl -w name?=value if name does + not exist. + [christos, ticket #635] + +games/trek/help.c1.9 +games/trek/kill.c1.8 +games/trek/schedule.c1.7 +games/trek/setup.c1.10 +games/trek/trek.h1.12 + + Avoid hardcoded too large constant that caused FPE on vax. + [christos, ticket #637] + +sys/kern/sys_sig.c1.23 + + - use itimespecfix to detect invalid timespecs + - use tstohz instead of mstohz to prevent overflow. + [christos, ticket #638] + +etc/sysctl.conf 1.7 + + Use the new ?= operator to set the on_panic value for the + optional ddb hierarchy. + [martin, ticket #639] + +sys/kern/kern_sig.c1.296 via patch + + In sigput(), save the siginfo no matter whether SA_SIGINFO is + set or not. There are also sigtimedwait(2) et al. to catch + signals without invoking a signal handler. + Addresses PR kern/41076. + [drochner, ticket #640] + +etc/sysctl patch + + Use ?= to set kern.no_sa_support to avoid warnings. + [martin, ticket #643] + +usr.sbin/postinstall/postinstall patch + + Make ddb.onpanic and kern.no_sa_support acceptable even if + commented out. + [martin, ticket #642] + +sys/sys/siginfo.h1.18 + + Fix typo for POLL_HUP. + [rmind, ticket #631] +
CVS commit: src/sys/net
Module Name:src Committed By: darran Date: Wed Apr 1 22:56:59 UTC 2009 Modified Files: src/sys/net: if_vlan.c Log Message: Also inherit the parent's TCP segmentation offload capability. Note the vlan interface does not see updates to the parents capabilities so if, for example, TSO is on in both, then turned off in the parent it will remain on in the vlan interface. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/net/if_vlan.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/net/if_vlan.c diff -u src/sys/net/if_vlan.c:1.62 src/sys/net/if_vlan.c:1.63 --- src/sys/net/if_vlan.c:1.62 Wed Dec 17 20:51:37 2008 +++ src/sys/net/if_vlan.c Wed Apr 1 22:56:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vlan.c,v 1.62 2008/12/17 20:51:37 cegger Exp $ */ +/* $NetBSD: if_vlan.c,v 1.63 2009/04/01 22:56:59 darran Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.62 2008/12/17 20:51:37 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.63 2009/04/01 22:56:59 darran Exp $); #include opt_inet.h #include bpfilter.h @@ -316,11 +316,13 @@ /* * If the parent interface can do hardware-assisted * VLAN encapsulation, then propagate its hardware- - * assisted checksumming flags. + * assisted checksumming flags and tcp segmentation + * offload. */ if (ec-ec_capabilities ETHERCAP_VLAN_HWTAGGING) ifp-if_capabilities = p-if_capabilities - (IFCAP_CSUM_IPv4_Tx|IFCAP_CSUM_IPv4_Rx| + (IFCAP_TSOv4 | + IFCAP_CSUM_IPv4_Tx|IFCAP_CSUM_IPv4_Rx| IFCAP_CSUM_TCPv4_Tx|IFCAP_CSUM_TCPv4_Rx| IFCAP_CSUM_UDPv4_Tx|IFCAP_CSUM_UDPv4_Rx| IFCAP_CSUM_TCPv6_Tx|IFCAP_CSUM_TCPv6_Rx|
CVS commit: src/sys
Module Name:src Committed By: dyoung Date: Thu Apr 2 00:09:34 UTC 2009 Modified Files: src/sys/arch/i386/isa: npx_isa.c src/sys/arch/i386/pci: elan520.c src/sys/arch/x86/include: pic.h src/sys/arch/x86/pci: pcib.c src/sys/dev/ata: ata.c wd.c src/sys/dev/cardbus: cardbus.c cardslot.c if_atw_cardbus.c src/sys/dev/gpio: gpio.c src/sys/dev/isa: com_isa.c wdc_isa.c src/sys/dev/mii: nsphyter.c src/sys/dev/pci: if_sip.c pccbb.c pci.c ppb.c src/sys/dev/pcmcia: pcmcia.c src/sys/kern: kern_pmf.c subr_autoconf.c src/sys/sys: device.h pmf.h Log Message: During shutdown, detach devices in an orderly fashion. Call the detach routine for every device in the device tree, starting with the leaves and moving toward the root, expecting that each (pseudo-)device driver will use the opportunity to gracefully commit outstandings transactions to the underlying (pseudo-)device and to relinquish control of the hardware to the system BIOS. Detaching devices is not suitable for every shutdown: in an emergency, or if the system state is inconsistent, we should resort to a fast, simple shutdown that uses only the pmf(9) shutdown hooks and the (deprecated) shutdownhooks. For now, if the flag RB_NOSYNC is set in boothowto, opt for the fast, simple shutdown. Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence that it is safe to detach a device during shutdown. Introduce macros CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf attachments with default device flags. Add DVF_DETACH_SHUTDOWN to configuration attachments for atabus(4), atw(4) at cardbus(4), cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4), elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4), pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4). Add a device-detachment reason flag, DETACH_SHUTDOWN, that tells the autoconf code and a device driver that the reason for detachment is system shutdown. Add a sysctl, kern.detachall, that tells the system to try to detach every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN flag. The default for kern.detachall is 0. SET IT TO 1, PLEASE, TO HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN. This is a work in progress. In future work, I aim to treat pseudo-devices more thoroughly, and to gracefully tear down a stack of (pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and raid(4) instances at shutdown. Also commit some changes that are not easily untangled from the rest: (1) begin to simplify device_t locking: rename struct pmf_private to device_lock, and incorporate device_lock into struct device. (2) #include sys/device.h in sys/pmf.h in order to get some definitions that it needs. Stop unnecessarily #including sys/device.h in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases building. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/isa/npx_isa.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/i386/pci/elan520.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/pic.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x86/pci/pcib.c cvs rdiff -u -r1.102 -r1.103 src/sys/dev/ata/ata.c cvs rdiff -u -r1.370 -r1.371 src/sys/dev/ata/wd.c cvs rdiff -u -r1.95 -r1.96 src/sys/dev/cardbus/cardbus.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/cardbus/cardslot.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/cardbus/if_atw_cardbus.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/gpio/gpio.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/isa/com_isa.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/isa/wdc_isa.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/mii/nsphyter.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/pci/if_sip.c cvs rdiff -u -r1.184 -r1.185 src/sys/dev/pci/pccbb.c cvs rdiff -u -r1.121 -r1.122 src/sys/dev/pci/pci.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/ppb.c cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pcmcia/pcmcia.c cvs rdiff -u -r1.21 -r1.22 src/sys/kern/kern_pmf.c cvs rdiff -u -r1.173 -r1.174 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.116 -r1.117 src/sys/sys/device.h cvs rdiff -u -r1.14 -r1.15 src/sys/sys/pmf.h 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/i386/isa/npx_isa.c diff -u src/sys/arch/i386/isa/npx_isa.c:1.19 src/sys/arch/i386/isa/npx_isa.c:1.20 --- src/sys/arch/i386/isa/npx_isa.c:1.19 Fri Apr 11 20:42:34 2008 +++ src/sys/arch/i386/isa/npx_isa.c Thu Apr 2 00:09:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: npx_isa.c,v 1.19 2008/04/11 20:42:34 cegger Exp $ */ +/* $NetBSD: npx_isa.c,v 1.20 2009/04/02 00:09:32 dyoung Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npx_isa.c,v 1.19 2008/04/11 20:42:34 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: npx_isa.c,v 1.20 2009/04/02 00:09:32 dyoung Exp $);
CVS commit: src
Module Name:src Committed By: enami Date: Thu Apr 2 00:19:03 UTC 2009 Modified Files: src/common/lib/libc/arch/i386/atomic: atomic.S src/sys/arch/amd64/amd64: spl.S src/sys/arch/x86/x86: patch.c Log Message: So that profile kernel runs again, - Adjust the size of functions used to patch. - Fix the jump offset of mcount call when patching functions. Approved by Andrew Doran. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/common/lib/libc/arch/i386/atomic/atomic.S cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amd64/amd64/spl.S cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/x86/patch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/i386/atomic/atomic.S diff -u src/common/lib/libc/arch/i386/atomic/atomic.S:1.16 src/common/lib/libc/arch/i386/atomic/atomic.S:1.17 --- src/common/lib/libc/arch/i386/atomic/atomic.S:1.16 Mon Jan 12 02:53:29 2009 +++ src/common/lib/libc/arch/i386/atomic/atomic.S Thu Apr 2 00:19:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.S,v 1.16 2009/01/12 02:53:29 pooka Exp $ */ +/* $NetBSD: atomic.S,v 1.17 2009/04/02 00:19:02 enami Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -212,7 +212,11 @@ popl %ebx popl %edi ret +#ifdef GPROF + .space 16, 0x90 +#else .space 32, 0x90 +#endif ENDLABEL(_atomic_cas_cx8_end) ENTRY(sse2_lfence) Index: src/sys/arch/amd64/amd64/spl.S diff -u src/sys/arch/amd64/amd64/spl.S:1.20 src/sys/arch/amd64/amd64/spl.S:1.21 --- src/sys/arch/amd64/amd64/spl.S:1.20 Tue Jul 1 18:49:20 2008 +++ src/sys/arch/amd64/amd64/spl.S Thu Apr 2 00:19:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: spl.S,v 1.20 2008/07/01 18:49:20 bouyer Exp $ */ +/* $NetBSD: spl.S,v 1.21 2009/04/02 00:19:02 enami Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -209,6 +209,10 @@ nop nop .align 16 +#ifdef GPROF + nop + .align 16 +#endif LABEL(spllower_end) #endif /* !XEN */ Index: src/sys/arch/x86/x86/patch.c diff -u src/sys/arch/x86/x86/patch.c:1.16 src/sys/arch/x86/x86/patch.c:1.17 --- src/sys/arch/x86/x86/patch.c:1.16 Tue Feb 17 21:20:49 2009 +++ src/sys/arch/x86/x86/patch.c Thu Apr 2 00:19:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: patch.c,v 1.16 2009/02/17 21:20:49 ad Exp $ */ +/* $NetBSD: patch.c,v 1.17 2009/04/02 00:19:03 enami Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: patch.c,v 1.16 2009/02/17 21:20:49 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: patch.c,v 1.17 2009/04/02 00:19:03 enami Exp $); #include opt_lockdebug.h @@ -83,29 +83,44 @@ #define X86_DS 0x3e #define X86_GROUP_0F 0x0f +static void +adjust_jumpoff(uint8_t *ptr, void *from_s, void *to_s) +{ + + /* Branch hints */ + if (ptr[0] == X86_CS || ptr[0] == X86_DS) + ptr++; + /* Conditional jumps */ + if (ptr[0] == X86_GROUP_0F) + ptr++; + /* 4-byte relative jump or call */ + *(uint32_t *)(ptr + 1 - (uintptr_t)from_s + (uintptr_t)to_s) += + ((uint32_t)(uintptr_t)from_s - (uint32_t)(uintptr_t)to_s); +} + static void __unused patchfunc(void *from_s, void *from_e, void *to_s, void *to_e, void *pcrel) { - uint8_t *ptr; if ((uintptr_t)from_e - (uintptr_t)from_s != (uintptr_t)to_e - (uintptr_t)to_s) panic(patchfunc: sizes do not match (from=%p), from_s); memcpy(to_s, from_s, (uintptr_t)to_e - (uintptr_t)to_s); - if (pcrel != NULL) { - ptr = pcrel; - /* Branch hints */ - if (ptr[0] == X86_CS || ptr[0] == X86_DS) - ptr++; - /* Conditional jumps */ - if (ptr[0] == X86_GROUP_0F) - ptr++; - /* 4-byte relative jump or call */ - *(uint32_t *)(ptr + 1 - (uintptr_t)from_s + (uintptr_t)to_s) += - ((uint32_t)(uintptr_t)from_s - (uint32_t)(uintptr_t)to_s); - } + if (pcrel != NULL) + adjust_jumpoff(pcrel, from_s, to_s); + +#ifdef GPROF +#ifdef i386 +#define MCOUNT_CALL_OFFSET 3 +#endif +#ifdef __x86_64__ +#define MCOUNT_CALL_OFFSET 5 +#endif + /* Patch mcount call offset */ + adjust_jumpoff((uint8_t *)from_s + MCOUNT_CALL_OFFSET, from_s, to_s); +#endif } static inline void __unused
CVS commit: src/sys/dev/if_ndis
Module Name:src Committed By: dyoung Date: Thu Apr 2 00:39:37 UTC 2009 Modified Files: src/sys/dev/if_ndis: if_ndis.c Log Message: I find myself making a lot of changes in this code to keep it compiling and (let us hope) working in the 21st century, so I have put it through unifdef -D__NetBSD__ -U__FreeBSD__ so that it is less of a chore to read and to maintain. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/if_ndis/if_ndis.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/dev/if_ndis/if_ndis.c diff -u src/sys/dev/if_ndis/if_ndis.c:1.24 src/sys/dev/if_ndis/if_ndis.c:1.25 --- src/sys/dev/if_ndis/if_ndis.c:1.24 Wed Mar 18 17:06:49 2009 +++ src/sys/dev/if_ndis/if_ndis.c Thu Apr 2 00:39:37 2009 @@ -35,12 +35,9 @@ __FBSDID($FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.69.2.6 2005/03/31 04:24:36 wpaul Exp $); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, $NetBSD: if_ndis.c,v 1.24 2009/03/18 17:06:49 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: if_ndis.c,v 1.25 2009/04/02 00:39:37 dyoung Exp $); #endif -#ifdef __FreeBSD__ -#include opt_bdg.h -#endif #include sys/param.h #include sys/systm.h @@ -51,30 +48,18 @@ #include sys/socket.h #include sys/queue.h -#ifdef __NetBSD__ #include sys/device.h #include sys/kauth.h -#endif -#ifdef __FreeBSD__ -#include sys/module.h -#else /* __NetBSD__ */ #include sys/module.h -#endif #include sys/proc.h -#if __FreeBSD_version 502113 #include sys/sysctl.h -#endif #include net/if.h #include net/if_arp.h -#ifdef __FreeBSD__ -#include net/ethernet.h -#else #include net/if_ether.h -#endif #include net/if_dl.h #include net/if_media.h @@ -82,33 +67,18 @@ #include net/bpf.h -#ifdef __FreeBSD__ -#include machine/bus_memio.h -#include machine/bus_pio.h -#include machine/resource.h -#endif #include sys/bus.h -#ifdef __FreeBSD__ -#include sys/bus.h -#include sys/rman.h -#endif #include net80211/ieee80211_var.h #include net80211/ieee80211_ioctl.h -#ifdef __FreeBSD__ -#include dev/wi/if_wavelan_ieee.h -#else /* __NetBSD__ */ #include dev/ic/wi_ieee.h -#endif #include dev/pci/pcireg.h #include dev/pci/pcivar.h -#ifdef __NetBSD__ #include dev/pci/pcidevs.h -#endif #include compat/ndis/pe_var.h #include compat/ndis/resource_var.h @@ -116,9 +86,7 @@ #include compat/ndis/hal_var.h #include compat/ndis/ndis_var.h #include compat/ndis/cfg_var.h -#ifdef __NetBSD__ #include compat/ndis/nbcompat.h -#endif #include dev/if_ndis/if_ndisvar.h #define NDIS_IMAGE @@ -126,25 +94,13 @@ #include ndis_driver_data.h -#ifdef __FreeBSD__ -int ndis_attach (device_t); -#else /* __NetBSD__ */ void ndis_attach (void *); -#endif -#ifdef __FreeBSD__ -int ndis_detach (device_t); -#else /* __NetBSD__ */ int ndis_detach (device_t, int); -#endif int ndis_suspend (device_t); int ndis_resume (device_t); void ndis_shutdown (device_t); -#ifdef __FreeBSD__ -int ndisdrv_modevent (module_t, int, void *); -#else /* __NetBSD__ */ int ndisdrv_modevent (struct lkm_table *lkmtp, int cmd); -#endif /* I moved these to if_ndisvar.h */ /* @@ -164,11 +120,7 @@ static funcptr ndis_linksts_wrap; static funcptr ndis_linksts_done_wrap; -#ifdef __FreeBSD__ -static void ndis_intr (void *); -#else /* __NetBSD__ */ int ndis_intr(void *); -#endif static void ndis_tick (void *); static void ndis_ticktask (void *); static void ndis_start (struct ifnet *); @@ -176,11 +128,7 @@ static int ndis_ioctl (struct ifnet *, u_long, void *); static int ndis_wi_ioctl_get (struct ifnet *, u_long, void *); static int ndis_wi_ioctl_set (struct ifnet *, u_long, void *); -#ifdef __FreeBSD__ -static void ndis_init (void *); -#else /* __NetBSD__ */ static int ndis_init (struct ifnet *); -#endif static void ndis_stop (struct ndis_softc *); static void ndis_watchdog (struct ifnet *); static int ndis_ifmedia_upd (struct ifnet *); @@ -195,12 +143,7 @@ static void ndis_setmulti (struct ndis_softc *); static void ndis_map_sclist (void *, bus_dma_segment_t *, int, bus_size_t, int); -#ifdef __NetBSD__ -static int ndisdrv_loaded = 0; -#endif /* __NetBSD__ */ -#ifdef __FreeBSD__ static int ndisdrv_loaded = 0; -#endif /* * This routine should call windrv_load() once for each driver @@ -209,16 +152,9 @@ * saved in our driver database. */ int -#ifdef __FreeBSD__ -ndisdrv_modevent(mod, cmd, arg) - module_t mod; - int cmd; - void *arg; -#else ndisdrv_modevent(mod, cmd) module_t mod; int cmd; -#endif { int error = 0; @@ -248,14 +184,6 @@ windrv_unwrap(ndis_linksts_done_wrap); break; /* TODO: Do we need a LKM_E_STAT for NetBSD? */ -#ifdef __FreeBSD__ - case MOD_SHUTDOWN: - windrv_unwrap(ndis_rxeof_wrap); - windrv_unwrap(ndis_txeof_wrap); - windrv_unwrap(ndis_linksts_wrap); - windrv_unwrap(ndis_linksts_done_wrap); - break; -#endif /* __FreeBSD__ */ default: error =
CVS commit: src/sys/dev/ic
Module Name:src Committed By: dyoung Date: Thu Apr 2 00:57:20 UTC 2009 Modified Files: src/sys/dev/ic: rtw.c Log Message: Add the WEP capability to our net80211 capability flags, since we do sort of support hardware WEP. Only change the WEP key index in a Tx descriptor from 0 if the type of our transmit key is _WEP, not _TKIP: i.e., only if we're really doing WEP crypto in the hardware. Ignore a watchdog timeout on any Tx ring if we can collect some packets from that ring. Restart both the receiver and the transmitter when a watchdog timeout occurs instead of restarting only the transmitter. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/dev/ic/rtw.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/dev/ic/rtw.c diff -u src/sys/dev/ic/rtw.c:1.106 src/sys/dev/ic/rtw.c:1.107 --- src/sys/dev/ic/rtw.c:1.106 Wed Nov 12 12:36:11 2008 +++ src/sys/dev/ic/rtw.c Thu Apr 2 00:57:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rtw.c,v 1.106 2008/11/12 12:36:11 ad Exp $ */ +/* $NetBSD: rtw.c,v 1.107 2009/04/02 00:57:20 dyoung Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 David Young. All rights * reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rtw.c,v 1.106 2008/11/12 12:36:11 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: rtw.c,v 1.107 2009/04/02 00:57:20 dyoung Exp $); #include bpfilter.h @@ -1422,7 +1422,11 @@ /* XXX reference source does not enable MULRW */ /* enable PCI Read/Write Multiple */ +#if 1 cr |= RTW_CR_MULRW; +#else + cr = ~RTW_CR_MULRW; +#endif /* The receive engine will always start at RDSAR. */ if (enable (flags ~cr RTW_CR_RE)) { @@ -1766,10 +1770,11 @@ } /* Collect transmitted packets. */ -static void +static bool rtw_collect_txring(struct rtw_softc *sc, struct rtw_txsoft_blk *tsb, struct rtw_txdesc_blk *tdb, int force) { + bool collected = false; int ndesc; struct rtw_txsoft *ts; @@ -1822,6 +1827,8 @@ break; } + collected = true; + rtw_collect_txpkt(sc, tdb, ts, ndesc); SIMPLEQ_REMOVE_HEAD(tsb-tsb_dirtyq, ts_q); SIMPLEQ_INSERT_TAIL(tsb-tsb_freeq, ts, ts_q); @@ -1831,6 +1838,8 @@ if (ts == NULL) tsb-tsb_tx_timer = 0; rtw_reset_oactive(sc); + + return collected; } static void @@ -3340,7 +3349,8 @@ * seem to care, since we don't activate h/w Tx * encryption. */ - if (k != NULL) { + if (k != NULL + k-wk_cipher-ic_cipher == IEEE80211_CIPHER_WEP) { ctl0 |= __SHIFTIN(k-wk_keyix, RTW_TXCTL0_KEYID_MASK) RTW_TXCTL0_KEYID_MASK; } @@ -3510,6 +3520,9 @@ else if (--tsb-tsb_tx_timer == 0) { if (SIMPLEQ_EMPTY(tsb-tsb_dirtyq)) continue; + else if (rtw_collect_txring(sc, tsb, + sc-sc_txdesc_blk[pri], 0)) +continue; printf(%s: transmit timeout, priority %d\n, ifp-if_xname, pri); ifp-if_oerrors++; @@ -3526,9 +3539,9 @@ * TBD Stop/restart just the broken rings? */ rtw_idle(sc-sc_regs); - rtw_io_enable(sc, RTW_CR_TE, 0); + rtw_io_enable(sc, RTW_CR_RE | RTW_CR_TE, 0); rtw_txdescs_reset(sc); - rtw_io_enable(sc, RTW_CR_TE, 1); + rtw_io_enable(sc, RTW_CR_RE | RTW_CR_TE, 1); rtw_start(ifp); } ieee80211_watchdog(sc-sc_ic); @@ -3761,7 +3774,7 @@ ic-ic_phytype = IEEE80211_T_DS; ic-ic_opmode = IEEE80211_M_STA; ic-ic_caps = IEEE80211_C_PMGT | IEEE80211_C_IBSS | - IEEE80211_C_HOSTAP | IEEE80211_C_MONITOR; + IEEE80211_C_HOSTAP | IEEE80211_C_MONITOR | IEEE80211_C_WEP; nrate = 0; ic-ic_sup_rates[IEEE80211_MODE_11B].rs_rates[nrate++] =
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dyoung Date: Thu Apr 2 01:06:49 UTC 2009 Modified Files: src/sys/dev/pci: azalia.c Log Message: Cosmetic changes, only, to clarify and to save a couple of lines: return a constant, 0, instead of returning ret when it is always 0. Wait to initialize ret until we really need to. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/azalia.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/dev/pci/azalia.c diff -u src/sys/dev/pci/azalia.c:1.67 src/sys/dev/pci/azalia.c:1.68 --- src/sys/dev/pci/azalia.c:1.67 Wed Feb 25 15:46:34 2009 +++ src/sys/dev/pci/azalia.c Thu Apr 2 01:06:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: azalia.c,v 1.67 2009/02/25 15:46:34 jmcneill Exp $ */ +/* $NetBSD: azalia.c,v 1.68 2009/04/02 01:06:49 dyoung Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: azalia.c,v 1.67 2009/02/25 15:46:34 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: azalia.c,v 1.68 2009/04/02 01:06:49 dyoung Exp $); #include sys/param.h #include sys/device.h @@ -459,17 +459,15 @@ uint8_t rirbsts; az = v; - ret = 0; if (!device_has_power(az-dev)) return 0; - intsts = AZ_READ_4(az, INTSTS); - if (intsts == 0) - return ret; + if ((intsts = AZ_READ_4(az, INTSTS)) == 0) + return 0; - ret += azalia_stream_intr(az-pstream, intsts); - ret += azalia_stream_intr(az-rstream, intsts); + ret = azalia_stream_intr(az-pstream, intsts) + + azalia_stream_intr(az-rstream, intsts); rirbsts = AZ_READ_1(az, RIRBSTS); if (rirbsts (HDA_RIRBSTS_RIRBOIS | HDA_RIRBSTS_RINTFL)) {