CVS commit: src/sys/compat/m68k4k
Module Name:src Committed By: cegger Date: Mon Aug 17 06:00:05 UTC 2009 Modified Files: src/sys/compat/m68k4k: m68k4k_exec.c Log Message: buildfix: #include To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/compat/m68k4k/m68k4k_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/compat/m68k4k/m68k4k_exec.c diff -u src/sys/compat/m68k4k/m68k4k_exec.c:1.21 src/sys/compat/m68k4k/m68k4k_exec.c:1.22 --- src/sys/compat/m68k4k/m68k4k_exec.c:1.21 Fri Nov 21 19:55:38 2008 +++ src/sys/compat/m68k4k/m68k4k_exec.c Mon Aug 17 06:00:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: m68k4k_exec.c,v 1.21 2008/11/21 19:55:38 he Exp $ */ +/* $NetBSD: m68k4k_exec.c,v 1.22 2009/08/17 06:00:05 cegger Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: m68k4k_exec.c,v 1.21 2008/11/21 19:55:38 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: m68k4k_exec.c,v 1.22 2009/08/17 06:00:05 cegger Exp $"); #if !defined(__m68k__) #error YOU GOTTA BE KIDDING! @@ -54,6 +54,7 @@ #include #include #include +#include #include #include
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: bouyer Date: Sun Aug 16 22:42:16 UTC 2009 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 Log Message: ticket 915 To generate a diff of this commit: cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-5.0.2 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.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.5 src/doc/CHANGES-5.0.2:1.1.2.6 --- src/doc/CHANGES-5.0.2:1.1.2.5 Sun Aug 16 00:21:49 2009 +++ src/doc/CHANGES-5.0.2 Sun Aug 16 22:42:16 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.5 2009/08/16 00:21:49 snj Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.6 2009/08/16 22:42:16 bouyer Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -146,3 +146,10 @@ period to the register. [bouyer, ticket #912] +lib/libc/gen/fts.c1.38 + + Avoid possible integer overflow on really deep dirs, + and subsequent collateral damage. + Received from OpenBSD via US-CERT as VU #590371. + [christos, ticket #915] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sun Aug 16 22:41:56 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: ticket 915 To generate a diff of this commit: cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-5.1 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.1 diff -u src/doc/CHANGES-5.1:1.1.2.60 src/doc/CHANGES-5.1:1.1.2.61 --- src/doc/CHANGES-5.1:1.1.2.60 Sun Aug 16 00:22:12 2009 +++ src/doc/CHANGES-5.1 Sun Aug 16 22:41:55 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.60 2009/08/16 00:22:12 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.61 2009/08/16 22:41:55 bouyer Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -2212,3 +2212,10 @@ period to the register. [bouyer, ticket #912] +lib/libc/gen/fts.c1.38 + + Avoid possible integer overflow on really deep dirs, + and subsequent collateral damage. + Received from OpenBSD via US-CERT as VU #590371. + [christos, ticket #915] +
CVS commit: [netbsd-5] src/lib/libc/gen
Module Name:src Committed By: bouyer Date: Sun Aug 16 22:41:23 UTC 2009 Modified Files: src/lib/libc/gen [netbsd-5]: fts.c Log Message: Pull up following revision(s) (requested by christos in ticket #915): lib/libc/gen/fts.c: revision 1.38 Avoid possible integer overflow and subsequent collateral damage. Received from OpenBSD via US-CERT as VU #590371. Original OpenBSD commit log: revision 1.42 date: 2009/02/11 13:24:05; author: otto; state: Exp; lines: +9 -1 Avoid level going negative on deep (i mean really deep) dirs. Reported by Maksymilian Arciemowicz. ok kettenis@ millert@ To generate a diff of this commit: cvs rdiff -u -r1.34.4.1 -r1.34.4.2 src/lib/libc/gen/fts.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/libc/gen/fts.c diff -u src/lib/libc/gen/fts.c:1.34.4.1 src/lib/libc/gen/fts.c:1.34.4.2 --- src/lib/libc/gen/fts.c:1.34.4.1 Thu Jan 8 22:00:34 2009 +++ src/lib/libc/gen/fts.c Sun Aug 16 22:41:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fts.c,v 1.34.4.1 2009/01/08 22:00:34 snj Exp $ */ +/* $NetBSD: fts.c,v 1.34.4.2 2009/08/16 22:41:23 bouyer Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -__RCSID("$NetBSD: fts.c,v 1.34.4.1 2009/01/08 22:00:34 snj Exp $"); +__RCSID("$NetBSD: fts.c,v 1.34.4.2 2009/08/16 22:41:23 bouyer Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -726,6 +726,14 @@ len++; maxlen = sp->fts_pathlen - len; + if (cur->fts_level == SHRT_MAX) { + (void)closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + errno = ENAMETOOLONG; + return (NULL); + } + level = cur->fts_level + 1; /* Read the directory, attaching each entry to the `link' pointer. */
CVS commit: [netbsd-5-0] src/lib/libc/gen
Module Name:src Committed By: bouyer Date: Sun Aug 16 22:41:17 UTC 2009 Modified Files: src/lib/libc/gen [netbsd-5-0]: fts.c Log Message: Pull up following revision(s) (requested by christos in ticket #915): lib/libc/gen/fts.c: revision 1.38 Avoid possible integer overflow and subsequent collateral damage. Received from OpenBSD via US-CERT as VU #590371. Original OpenBSD commit log: revision 1.42 date: 2009/02/11 13:24:05; author: otto; state: Exp; lines: +9 -1 Avoid level going negative on deep (i mean really deep) dirs. Reported by Maksymilian Arciemowicz. ok kettenis@ millert@ To generate a diff of this commit: cvs rdiff -u -r1.34.4.1 -r1.34.4.1.2.1 src/lib/libc/gen/fts.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/libc/gen/fts.c diff -u src/lib/libc/gen/fts.c:1.34.4.1 src/lib/libc/gen/fts.c:1.34.4.1.2.1 --- src/lib/libc/gen/fts.c:1.34.4.1 Thu Jan 8 22:00:34 2009 +++ src/lib/libc/gen/fts.c Sun Aug 16 22:41:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fts.c,v 1.34.4.1 2009/01/08 22:00:34 snj Exp $ */ +/* $NetBSD: fts.c,v 1.34.4.1.2.1 2009/08/16 22:41:16 bouyer Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -__RCSID("$NetBSD: fts.c,v 1.34.4.1 2009/01/08 22:00:34 snj Exp $"); +__RCSID("$NetBSD: fts.c,v 1.34.4.1.2.1 2009/08/16 22:41:16 bouyer Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -726,6 +726,14 @@ len++; maxlen = sp->fts_pathlen - len; + if (cur->fts_level == SHRT_MAX) { + (void)closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + errno = ENAMETOOLONG; + return (NULL); + } + level = cur->fts_level + 1; /* Read the directory, attaching each entry to the `link' pointer. */
CVS commit: src/sys/arch/acorn32/acorn32
Module Name:src Committed By: cegger Date: Sun Aug 16 22:06:13 UTC 2009 Modified Files: src/sys/arch/acorn32/acorn32: rpc_machdep.c Log Message: buildfix: #include To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/acorn32/acorn32/rpc_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/acorn32/acorn32/rpc_machdep.c diff -u src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.76 src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.77 --- src/sys/arch/acorn32/acorn32/rpc_machdep.c:1.76 Tue Aug 11 17:04:14 2009 +++ src/sys/arch/acorn32/acorn32/rpc_machdep.c Sun Aug 16 22:06:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_machdep.c,v 1.76 2009/08/11 17:04:14 matt Exp $ */ +/* $NetBSD: rpc_machdep.c,v 1.77 2009/08/16 22:06:12 cegger Exp $ */ /* * Copyright (c) 2000-2002 Reinoud Zandijk. @@ -55,7 +55,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.76 2009/08/11 17:04:14 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.77 2009/08/16 22:06:12 cegger Exp $"); #include #include @@ -63,6 +63,7 @@ #include #include #include +#include #include #include
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sun Aug 16 20:28:19 UTC 2009 Modified Files: src/sys/kern: init_sysctl.c Log Message: provide compatibility for the older variant of kern.consdev, which used a 32 bit dev_t. Reported by mrg. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/kern/init_sysctl.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/init_sysctl.c diff -u src/sys/kern/init_sysctl.c:1.164 src/sys/kern/init_sysctl.c:1.165 --- src/sys/kern/init_sysctl.c:1.164 Sun May 24 17:41:26 2009 +++ src/sys/kern/init_sysctl.c Sun Aug 16 16:28:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.164 2009/05/24 21:41:26 ad Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.165 2009/08/16 20:28:19 christos Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.164 2009/05/24 21:41:26 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.165 2009/08/16 20:28:19 christos Exp $"); #include "opt_sysv.h" #include "opt_compat_netbsd32.h" @@ -2865,6 +2865,7 @@ sysctl_consdev(SYSCTLFN_ARGS) { dev_t consdev; + uint32_t oconsdev; struct sysctlnode node; if (cn_tab != NULL) @@ -2872,8 +2873,19 @@ else consdev = NODEV; node = *rnode; - node.sysctl_data = &consdev; - node.sysctl_size = sizeof(consdev); + switch (*oldlenp) { + case sizeof(consdev): + node.sysctl_data = &consdev; + node.sysctl_size = sizeof(consdev); + break; + case sizeof(oconsdev): + oconsdev = (uint32_t)consdev; + node.sysctl_data = &oconsdev; + node.sysctl_size = sizeof(oconsdev); + break; + default: + return EINVAL; + } return (sysctl_lookup(SYSCTLFN_CALL(&node))); }
CVS commit: src/usr.bin/sort
Module Name:src Committed By: dsl Date: Sun Aug 16 20:02:04 UTC 2009 Modified Files: src/usr.bin/sort: append.c fsort.c Log Message: 'depth' is used for the number of bytes into the key that the pointers reference, when we want to find the record header put the larger value into 'hdr_off' to avoid any confusion that the code might be changing 'depth'! There is now no need to save the original value as 'odepth' in append.c. All an a vague attempt to make this code slightly readable. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/sort/append.c cvs rdiff -u -r1.35 -r1.36 src/usr.bin/sort/fsort.c 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/sort/append.c diff -u src/usr.bin/sort/append.c:1.16 src/usr.bin/sort/append.c:1.17 --- src/usr.bin/sort/append.c:1.16 Sun Aug 16 19:53:43 2009 +++ src/usr.bin/sort/append.c Sun Aug 16 20:02:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: append.c,v 1.16 2009/08/16 19:53:43 dsl Exp $ */ +/* $NetBSD: append.c,v 1.17 2009/08/16 20:02:04 dsl Exp $ */ /*- * Copyright (c) 2000-2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #include "sort.h" #ifndef lint -__RCSID("$NetBSD: append.c,v 1.16 2009/08/16 19:53:43 dsl Exp $"); +__RCSID("$NetBSD: append.c,v 1.17 2009/08/16 20:02:04 dsl Exp $"); __SCCSID("@(#)append.c 8.1 (Berkeley) 6/6/93"); #endif /* not lint */ @@ -74,7 +74,7 @@ #define OUTPUT { \ if ((n = cpos - ppos) > 1) { \ for (; ppos < cpos; ++ppos)\ - *ppos -= odepth;\ + *ppos -= depth;\ ppos -= n; \ if (stable_sort) \ sradixsort(ppos, n, wts1, REC_D); \ @@ -95,7 +95,8 @@ struct field *ftbl) { u_char *wts, *wts1; - int n, odepth = depth; + int n; + int hdr_off; const u_char **cpos, **ppos, **lastkey; const u_char *cend, *pend, *start; const struct recheader *crec, *prec; @@ -110,14 +111,14 @@ wts1 = ascii; } lastkey = keylist + nelem; - depth += REC_DATA_OFFSET; + hdr_off = REC_DATA_OFFSET + depth; if (SINGL_FLD && (UNIQUE || wts1 != wts)) { ppos = keylist; - prec = (const RECHEADER *) (*ppos - depth); + prec = (const RECHEADER *) (*ppos - hdr_off); if (UNIQUE) put(prec, fp); for (cpos = &keylist[1]; cpos < lastkey; cpos++) { - crec = (const RECHEADER *) (*cpos - depth); + crec = (const RECHEADER *) (*cpos - hdr_off); if (crec->length == prec->length) { /* * Set pend and cend so that trailing NUL and @@ -150,10 +151,10 @@ if (!UNIQUE) { OUTPUT; } } else if (UNIQUE) { ppos = keylist; - prec = (const RECHEADER *) (*ppos - depth); + prec = (const RECHEADER *) (*ppos - hdr_off); put(prec, fp); for (cpos = &keylist[1]; cpos < lastkey; cpos++) { - crec = (const RECHEADER *) (*cpos - depth); + crec = (const RECHEADER *) (*cpos - hdr_off); if (crec->offset == prec->offset) { /* * Set pend and cend so that trailing NUL and @@ -178,7 +179,7 @@ } } } else for (cpos = keylist; cpos < lastkey; cpos++) { - crec = (const RECHEADER *) (*cpos - depth); + crec = (const RECHEADER *) (*cpos - hdr_off); put(crec, fp); } } Index: src/usr.bin/sort/fsort.c diff -u src/usr.bin/sort/fsort.c:1.35 src/usr.bin/sort/fsort.c:1.36 --- src/usr.bin/sort/fsort.c:1.35 Sun Aug 16 19:53:43 2009 +++ src/usr.bin/sort/fsort.c Sun Aug 16 20:02:04 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fsort.c,v 1.35 2009/08/16 19:53:43 dsl Exp $ */ +/* $NetBSD: fsort.c,v 1.36 2009/08/16 20:02:04 dsl Exp $ */ /*- * Copyright (c) 2000-2003 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ #include "fsort.h" #ifndef lint -__RCSID("$NetBSD: fsort.c,v 1.35 2009/08/16 19:53:43 dsl Exp $"); +__RCSID("$NetBSD: fsort.c,v 1.36 2009/08/16 20:02:04 dsl Exp $"); __SCCSID("@(#)fsort.c 8.1 (Berkeley) 6/6/93"); #endif /* not lint */ @@ -341,15 +341,16 @@ static int histo[256]; int *hp; int c; + int hdr_off; const u_char **an, *t, **aj; const u_char **ak, *r; memset(tsizes, 0, sizeof(tsizes)); - depth += REC_DATA_OFFSET; + hdr_off = REC_DATA_OFFSET + depth; an = &a[n]; for (ak = a; ak < an; ak++) { histo[c = tr[**ak]]++; - tsizes[c] += ((const RECHEADER *) (*ak -= depth))->length; + tsizes[c] += ((const RECHEADER *) (*ak -= hdr_off))->length; } bin[0] = a; @@ -362,7 +363,7 @@ continue; } for (aj = a; aj < an; *aj = r, aj = bin[c + 1]) - for (r = *aj; aj < (ak = --top[c = tr[r[depth]]]) ;) + for (r = *aj; aj < (ak = --top[c = tr[r[hdr_off]]]) ;) swap(*ak, r, t); for (ak = a, c = 0; c < 256; c++) {
CVS commit: src/usr.bin/sort
Module Name:src Committed By: dsl Date: Sun Aug 16 19:53:43 UTC 2009 Modified Files: src/usr.bin/sort: append.c files.c fsort.c msort.c sort.h Log Message: Replace all uses of sizeof(TRECHEADER) with REC_DATA_OFFSET - which is defined as offsetof(RECHEADER, data). Delete TRECHEADER. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/sort/append.c cvs rdiff -u -r1.32 -r1.33 src/usr.bin/sort/files.c cvs rdiff -u -r1.34 -r1.35 src/usr.bin/sort/fsort.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/sort/msort.c cvs rdiff -u -r1.21 -r1.22 src/usr.bin/sort/sort.h 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/sort/append.c diff -u src/usr.bin/sort/append.c:1.15 src/usr.bin/sort/append.c:1.16 --- src/usr.bin/sort/append.c:1.15 Sat Aug 15 09:48:46 2009 +++ src/usr.bin/sort/append.c Sun Aug 16 19:53:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: append.c,v 1.15 2009/08/15 09:48:46 dsl Exp $ */ +/* $NetBSD: append.c,v 1.16 2009/08/16 19:53:43 dsl Exp $ */ /*- * Copyright (c) 2000-2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ #include "sort.h" #ifndef lint -__RCSID("$NetBSD: append.c,v 1.15 2009/08/15 09:48:46 dsl Exp $"); +__RCSID("$NetBSD: append.c,v 1.16 2009/08/16 19:53:43 dsl Exp $"); __SCCSID("@(#)append.c 8.1 (Berkeley) 6/6/93"); #endif /* not lint */ @@ -81,7 +81,7 @@ else \ radixsort(ppos, n, wts1, REC_D); \ for (; ppos < cpos; ppos++) {\ - prec = (const RECHEADER *) (*ppos - sizeof(TRECHEADER));\ + prec = (const RECHEADER *) (*ppos - REC_DATA_OFFSET);\ put(prec, fp); \ } \ } else put(prec, fp); \ @@ -110,7 +110,7 @@ wts1 = ascii; } lastkey = keylist + nelem; - depth += sizeof(TRECHEADER); + depth += REC_DATA_OFFSET; if (SINGL_FLD && (UNIQUE || wts1 != wts)) { ppos = keylist; prec = (const RECHEADER *) (*ppos - depth); Index: src/usr.bin/sort/files.c diff -u src/usr.bin/sort/files.c:1.32 src/usr.bin/sort/files.c:1.33 --- src/usr.bin/sort/files.c:1.32 Sat Aug 15 18:40:01 2009 +++ src/usr.bin/sort/files.c Sun Aug 16 19:53:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: files.c,v 1.32 2009/08/15 18:40:01 dsl Exp $ */ +/* $NetBSD: files.c,v 1.33 2009/08/16 19:53:43 dsl Exp $ */ /*- * Copyright (c) 2000-2003 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include "fsort.h" #ifndef lint -__RCSID("$NetBSD: files.c,v 1.32 2009/08/15 18:40:01 dsl Exp $"); +__RCSID("$NetBSD: files.c,v 1.33 2009/08/16 19:53:43 dsl Exp $"); __SCCSID("@(#)files.c 8.1 (Berkeley) 6/6/93"); #endif /* not lint */ @@ -124,17 +124,17 @@ } } } - if ((u_char *) pos > end - sizeof(TRECHEADER)) + if ((u_char *) pos > end - REC_DATA_OFFSET) return (BUFFEND); - fread(pos, sizeof(TRECHEADER), 1, fp); + fread(pos, REC_DATA_OFFSET, 1, fp); if (end - pos->data < (ptrdiff_t)pos->length) { - hp = ((u_char *)pos) + sizeof(TRECHEADER); - for (i = sizeof(TRECHEADER); i ; i--) + hp = ((u_char *)pos) + REC_DATA_OFFSET; + for (i = REC_DATA_OFFSET; i ; i--) ungetc(*--hp, fp); return (BUFFEND); } fread(pos->data, pos->length, 1, fp); - nleft -= pos->length + sizeof(TRECHEADER); + nleft -= pos->length + REC_DATA_OFFSET; if (nleft == 0 && binno == fstack[infl0].maxb) fclose(fp); return (0); @@ -338,7 +338,7 @@ void putrec(const RECHEADER *rec, FILE *fp) { - EWRITE(rec, 1, rec->length + sizeof(TRECHEADER), fp); + EWRITE(rec, 1, rec->length + REC_DATA_OFFSET, fp); } /* @@ -361,15 +361,15 @@ FILE *fp; fp = fstack[flno].fp; - if ((u_char *) rec > end - sizeof(TRECHEADER)) + if ((u_char *) rec > end - REC_DATA_OFFSET) return (BUFFEND); - if (!fread(rec, 1, sizeof(TRECHEADER), fp)) { + if (!fread(rec, 1, REC_DATA_OFFSET, fp)) { fclose(fp); fstack[flno].fp = 0; return (EOF); } if (end - rec->data < (ptrdiff_t)rec->length) { - for (i = sizeof(TRECHEADER) - 1; i >= 0; i--) + for (i = REC_DATA_OFFSET - 1; i >= 0; i--) ungetc(*((char *) rec + i), fp); return (BUFFEND); } Index: src/usr.bin/sort/fsort.c diff -u src/usr.bin/sort/fsort.c:1.34 src/usr.bin/sort/fsort.c:1.35 --- src/usr.bin/sort/fsort.c:1.34 Sat Aug 15 16:50:29 2009 +++ src/usr.bin/sort/fsort.c Sun Aug 16 19:53:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fsort.c,v 1.34 2009/08/15 16:50:29 dsl Exp $ */ +/* $NetBSD: fsort.c,v 1.35 2009/08/16 19:53:43 dsl Exp $ */ /*- * Copyright (c) 2000-2003 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ #include "fsort.h" #ifndef lint -__RCSID("$NetBSD: fsort.c,v 1.34 2009/08/15 16:50:29 dsl Exp $"); +__RCSID("$NetBSD: fsort.c,v 1.35 2009/08/16 19:53:43 dsl Exp $"); __SCCSID("@(#)fsort.c 8.1 (Berkeley) 6/6/93"); #endif /* not lint */ @@ -163,7 +163,7 @@ break; } crec =(RECHEADER *)((char *) crec + -SALIGN(crec->length) + sizeof(TRECHEADER)); +SALIGN(crec->length) + REC_DATA_OFFSET); } if (c == BUFFEND && nelem < MAXNUM @@ -345,7 +345,7 @@
CVS commit: src
Module Name:src Committed By: christos Date: Sun Aug 16 19:33:39 UTC 2009 Modified Files: src/distrib/sets/lists/base: md.amd64 md.sparc64 shl.mi src/include: fts.h src/lib/libc: shlib_version src/lib/libc/compat/gen: Makefile.inc src/lib/libc/gen: fts.c Added Files: src/lib/libc/compat/gen: compat___fts50.c Log Message: Version fts one more time! This is the most versioned API ever... Bump fts_level from short to int to avoid a potential DoS. >From Maksymilian Arciemowicz To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.56 -r1.57 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.484 -r1.485 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.18 -r1.19 src/include/fts.h cvs rdiff -u -r1.213 -r1.214 src/lib/libc/shlib_version cvs rdiff -u -r1.11 -r1.12 src/lib/libc/compat/gen/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/gen/compat___fts50.c cvs rdiff -u -r1.38 -r1.39 src/lib/libc/gen/fts.c 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/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.62 src/distrib/sets/lists/base/md.amd64:1.63 --- src/distrib/sets/lists/base/md.amd64:1.62 Mon Aug 3 11:59:41 2009 +++ src/distrib/sets/lists/base/md.amd64 Sun Aug 16 15:33:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.62 2009/08/03 15:59:41 plunky Exp $ +# $NetBSD: md.amd64,v 1.63 2009/08/16 19:33:38 christos Exp $ ./dev/lms0 base-obsolete obsolete ./dev/mms0 base-obsolete obsolete ./libexec/ld.elf_so-i386 base-sys-shlib compat,pic @@ -64,7 +64,7 @@ ./usr/lib/i386/libbz2.so.1 base-compat-shlib compat,pic ./usr/lib/i386/libbz2.so.1.1 base-compat-shlib compat,pic ./usr/lib/i386/libc.so.12 base-compat-shlib compat,pic -./usr/lib/i386/libc.so.12.169 base-compat-shlib compat,pic +./usr/lib/i386/libc.so.12.170 base-compat-shlib compat,pic ./usr/lib/i386/libcom_err.so.6 base-compat-shlib compat,pic,kerberos ./usr/lib/i386/libcom_err.so.6.0 base-compat-shlib compat,pic,kerberos ./usr/lib/i386/libcrypt.so.1 base-compat-shlib compat,pic Index: src/distrib/sets/lists/base/md.sparc64 diff -u src/distrib/sets/lists/base/md.sparc64:1.56 src/distrib/sets/lists/base/md.sparc64:1.57 --- src/distrib/sets/lists/base/md.sparc64:1.56 Mon Aug 3 11:59:41 2009 +++ src/distrib/sets/lists/base/md.sparc64 Sun Aug 16 15:33:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc64,v 1.56 2009/08/03 15:59:41 plunky Exp $ +# $NetBSD: md.sparc64,v 1.57 2009/08/16 19:33:38 christos Exp $ ./libexec/ld.elf_so-sparc base-sysutil-bin compat,pic ./sbin/edlabel base-sysutil-root ./usr/bin/fdformatbase-util-bin @@ -63,7 +63,7 @@ ./usr/lib/sparc/libbz2.so.1 base-compat-shlib compat,pic ./usr/lib/sparc/libbz2.so.1.1 base-compat-shlib compat,pic ./usr/lib/sparc/libc.so.12 base-compat-shlib compat,pic -./usr/lib/sparc/libc.so.12.169 base-compat-shlib compat,pic +./usr/lib/sparc/libc.so.12.170 base-compat-shlib compat,pic ./usr/lib/sparc/libcom_err.so.6 base-compat-shlib compat,pic ./usr/lib/sparc/libcom_err.so.6.0 base-compat-shlib compat,pic ./usr/lib/sparc/libcrypt.so.1 base-compat-shlib compat,pic Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.484 src/distrib/sets/lists/base/shl.mi:1.485 --- src/distrib/sets/lists/base/shl.mi:1.484 Mon Aug 3 11:59:41 2009 +++ src/distrib/sets/lists/base/shl.mi Sun Aug 16 15:33:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.484 2009/08/03 15:59:41 plunky Exp $ +# $NetBSD: shl.mi,v 1.485 2009/08/16 19:33:38 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -13,7 +13,7 @@ # # Note: libtermcap and libtermlib are hardlinked and share the same version. # -./lib/libc.so.12.169base-sys-shlib dynamicroot +./lib/libc.so.12.170base-sys-shlib dynamicroot ./lib/libcrypt.so.1.0base-sys-shlib dynamicroot ./lib/libcrypto.so.6.0base-crypto-shlib crypto,dynamicroot ./lib/libdevmapper.so.1.0 base-lvm-shlib lvm,dynamicroot @@ -60,7 +60,7 @@ ./usr/lib/libbluetooth.so.4.2 base-sys-shlib ./usr/lib/libbsdmalloc.so.0.0 base-sys-shlib ./usr/lib/libbz2.so.1.1base-sys-shlib -./usr/lib/libc.so.12.169 base-sys-shlib +./usr/lib/libc.so.12.170 base-sys-shlib ./usr/lib/libcom_err.so.6.0 base-krb5-shlib kerberos ./usr/lib/libcrypt.so.1.0 base-sys-shlib ./usr/lib/libcrypto.so.6.0 base-crypto-shlib crypto Index: src/include/fts.h diff -u src/include/fts.h:1.18 src/include/fts.h:1.19 --- src/include/fts.h:1.18 Sat Jan 10 22:04:12 2009 +++ src/include/fts.h Sun Aug 16 15:33:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fts.h,v 1.18 2009/01/11 03:04:12 christos Exp $ */ +/* $NetBSD: fts.h,v 1.19 2009/08/16 19:33:38 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -
CVS commit: src/sys/arch/sparc/conf
Module Name:src Committed By: uwe Date: Sun Aug 16 19:12:55 UTC 2009 Modified Files: src/sys/arch/sparc/conf: MRCOFFEE Log Message: options COMPAT_50 To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/conf/MRCOFFEE 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/sparc/conf/MRCOFFEE diff -u src/sys/arch/sparc/conf/MRCOFFEE:1.29 src/sys/arch/sparc/conf/MRCOFFEE:1.30 --- src/sys/arch/sparc/conf/MRCOFFEE:1.29 Sun Aug 16 00:24:59 2009 +++ src/sys/arch/sparc/conf/MRCOFFEE Sun Aug 16 19:12:55 2009 @@ -1,4 +1,4 @@ -# $NetBSD: MRCOFFEE,v 1.29 2009/08/16 00:24:59 macallan Exp $ +# $NetBSD: MRCOFFEE,v 1.30 2009/08/16 19:12:55 uwe Exp $ # From: NetBSD: GENERIC,v 1.197 2006/12/04 23:43:35 elad Exp # # Mr.Coffee (JavaStation 1) machine description file @@ -12,7 +12,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "MRCOFFEE-$Revision: 1.29 $" +#ident "MRCOFFEE-$Revision: 1.30 $" maxusers 32 @@ -161,6 +161,7 @@ options COMPAT_20 # NetBSD 2.0 binary compatibility options COMPAT_30 # NetBSD 3.0 binary compatibility options COMPAT_40 # NetBSD 4.0 binary compatibility +options COMPAT_50 # NetBSD 5.0 binary compatibility options COMPAT_SUNOS # SunOS 4.x binary compatibility options COMPAT_SVR4 # SunOS 5.x binary compatibility options COMPAT_BSDPTY # /dev/[pt]ty?? ptys.
CVS commit: src/usr.bin/ldd
Module Name:src Committed By: martin Date: Sun Aug 16 18:43:08 UTC 2009 Modified Files: src/usr.bin/ldd: ldd_aout.c Log Message: More missing To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/ldd/ldd_aout.c 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/ldd/ldd_aout.c diff -u src/usr.bin/ldd/ldd_aout.c:1.3 src/usr.bin/ldd/ldd_aout.c:1.4 --- src/usr.bin/ldd/ldd_aout.c:1.3 Tue Feb 3 03:01:02 2009 +++ src/usr.bin/ldd/ldd_aout.c Sun Aug 16 18:43:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ldd_aout.c,v 1.3 2009/02/03 03:01:02 mrg Exp $ */ +/* $NetBSD: ldd_aout.c,v 1.4 2009/08/16 18:43:08 martin Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -31,11 +31,12 @@ #include #ifndef lint -__RCSID("$NetBSD: ldd_aout.c,v 1.3 2009/02/03 03:01:02 mrg Exp $"); +__RCSID("$NetBSD: ldd_aout.c,v 1.4 2009/08/16 18:43:08 martin Exp $"); #endif /* not lint */ #include #include +#include #include #include
CVS commit: src/usr.bin/crunch/crunchide
Module Name:src Committed By: martin Date: Sun Aug 16 18:15:28 UTC 2009 Modified Files: src/usr.bin/crunch/crunchide: exec_aout.c Log Message: More missing includes To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/crunch/crunchide/exec_aout.c 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/crunch/crunchide/exec_aout.c diff -u src/usr.bin/crunch/crunchide/exec_aout.c:1.10 src/usr.bin/crunch/crunchide/exec_aout.c:1.11 --- src/usr.bin/crunch/crunchide/exec_aout.c:1.10 Wed Apr 15 02:07:20 2009 +++ src/usr.bin/crunch/crunchide/exec_aout.c Sun Aug 16 18:15:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_aout.c,v 1.10 2009/04/15 02:07:20 dogcow Exp $ */ +/* $NetBSD: exec_aout.c,v 1.11 2009/08/16 18:15:28 martin Exp $ */ /* * Copyright (c) 1997 Christopher G. Demetriou. All rights reserved. @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec_aout.c,v 1.10 2009/04/15 02:07:20 dogcow Exp $"); +__RCSID("$NetBSD: exec_aout.c,v 1.11 2009/08/16 18:15:28 martin Exp $"); #endif #include @@ -39,7 +39,8 @@ #include #include #include -#include +#include +#include #include "extern.h"
CVS commit: src
Module Name:src Committed By: martin Date: Sun Aug 16 18:01:49 UTC 2009 Modified Files: src/libexec/ld.aout_so: shlib.c src/sbin/ldconfig: ldconfig.c Log Message: Add includes To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/libexec/ld.aout_so/shlib.c cvs rdiff -u -r1.45 -r1.46 src/sbin/ldconfig/ldconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.aout_so/shlib.c diff -u src/libexec/ld.aout_so/shlib.c:1.22 src/libexec/ld.aout_so/shlib.c:1.23 --- src/libexec/ld.aout_so/shlib.c:1.22 Mon Apr 28 20:23:03 2008 +++ src/libexec/ld.aout_so/shlib.c Sun Aug 16 18:01:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shlib.c,v 1.22 2008/04/28 20:23:03 martin Exp $ */ +/* $NetBSD: shlib.c,v 1.23 2009/08/16 18:01:49 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include Index: src/sbin/ldconfig/ldconfig.c diff -u src/sbin/ldconfig/ldconfig.c:1.45 src/sbin/ldconfig/ldconfig.c:1.46 --- src/sbin/ldconfig/ldconfig.c:1.45 Tue Mar 17 00:52:47 2009 +++ src/sbin/ldconfig/ldconfig.c Sun Aug 16 18:01:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ldconfig.c,v 1.45 2009/03/17 00:52:47 lukem Exp $ */ +/* $NetBSD: ldconfig.c,v 1.46 2009/08/16 18:01:49 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ldconfig.c,v 1.45 2009/03/17 00:52:47 lukem Exp $"); +__RCSID("$NetBSD: ldconfig.c,v 1.46 2009/08/16 18:01:49 martin Exp $"); #endif @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include
CVS commit: src/gnu/lib/crtstuff4/arch
Module Name:src Committed By: skrll Date: Sun Aug 16 17:36:26 UTC 2009 Modified Files: src/gnu/lib/crtstuff4/arch: x86_64.mk Log Message: Re-run mknative for crtstuff. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/gnu/lib/crtstuff4/arch/x86_64.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/lib/crtstuff4/arch/x86_64.mk diff -u src/gnu/lib/crtstuff4/arch/x86_64.mk:1.3 src/gnu/lib/crtstuff4/arch/x86_64.mk:1.4 --- src/gnu/lib/crtstuff4/arch/x86_64.mk:1.3 Mon Feb 26 11:57:52 2007 +++ src/gnu/lib/crtstuff4/arch/x86_64.mk Sun Aug 16 17:36:26 2009 @@ -1,10 +1,10 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.22 2006/06/25 03:06:15 mrg Exp +# Generated from: NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp # Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp # G_INCLUDES=-I. -I. -I${GNUHOSTDIST}/gcc -I${GNUHOSTDIST}/gcc/. -I${GNUHOSTDIST}/gcc/../include -I${GNUHOSTDIST}/gcc/../libcpp/include G_CRTSTUFF_CFLAGS=-O2 -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I${GNUHOSTDIST}/gcc -I${GNUHOSTDIST}/gcc/. -I${GNUHOSTDIST}/gcc/../include -I${GNUHOSTDIST}/gcc/../libcpp/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -G_CRTSTUFF_T_CFLAGS=-fPIC +G_CRTSTUFF_T_CFLAGS=-fPIC -fno-omit-frame-pointer -fno-asynchronous-unwind-tables G_tm_defines=NETBSD_ENABLE_PTHREADS G_xm_file= G_xm_defines=
CVS commit: src/gnu/dist/gcc4/gcc/config/i386
Module Name:src Committed By: skrll Date: Sun Aug 16 17:33:14 UTC 2009 Modified Files: src/gnu/dist/gcc4/gcc/config/i386: t-netbsd64 Log Message: Use += in previous so the flags from config/t-netbsd aren't lost. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64 diff -u src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.2 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.3 --- src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.2 Sun Aug 16 13:16:52 2009 +++ src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64 Sun Aug 16 17:33:14 2009 @@ -12,4 +12,4 @@ # crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, # because then __FRAME_END__ might not be the last thing in .eh_frame # section. -CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables +CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
CVS commit: src
Module Name:src Committed By: pgoyette Date: Sun Aug 16 17:12:48 UTC 2009 Modified Files: src/distrib/utils/sysinst: aout2elf.c src/include: a.out.h src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: Repair more fallout from the exec_aout.h change. No guarantee that these are the "right" things to do, but they do allow building of port-amd64 again. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/sysinst/aout2elf.c cvs rdiff -u -r1.19 -r1.20 src/include/a.out.h cvs rdiff -u -r1.57 -r1.58 src/sys/arch/amd64/amd64/netbsd32_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/distrib/utils/sysinst/aout2elf.c diff -u src/distrib/utils/sysinst/aout2elf.c:1.13 src/distrib/utils/sysinst/aout2elf.c:1.14 --- src/distrib/utils/sysinst/aout2elf.c:1.13 Tue Jul 18 12:05:03 2006 +++ src/distrib/utils/sysinst/aout2elf.c Sun Aug 16 17:12:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: aout2elf.c,v 1.13 2006/07/18 12:05:03 jnemeth Exp $ +/* $NetBSD: aout2elf.c,v 1.14 2009/08/16 17:12:48 pgoyette Exp $ * * Copyright 1997 Piermont Information Systems Inc. * All rights reserved. @@ -39,6 +39,7 @@ #include #include +#include #include #include #include Index: src/include/a.out.h diff -u src/include/a.out.h:1.19 src/include/a.out.h:1.20 --- src/include/a.out.h:1.19 Wed Dec 10 12:06:25 2003 +++ src/include/a.out.h Sun Aug 16 17:12:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: a.out.h,v 1.19 2003/12/10 12:06:25 agc Exp $ */ +/* $NetBSD: a.out.h,v 1.20 2009/08/16 17:12:47 pgoyette Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -60,7 +60,7 @@ #ifndef _AOUT_H_ #define _AOUT_H_ -#include +#include #define _AOUT_INCLUDE_ #include Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.57 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.58 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.57 Thu Dec 18 15:42:33 2008 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Sun Aug 16 17:12:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.57 2008/12/18 15:42:33 cegger Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.58 2009/08/16 17:12:47 pgoyette Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.57 2008/12/18 15:42:33 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.58 2009/08/16 17:12:47 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -48,6 +48,7 @@ #include #include +#include #include #include #include
CVS commit: src/sys/compat/freebsd
Module Name:src Committed By: martin Date: Sun Aug 16 15:41:51 UTC 2009 Modified Files: src/sys/compat/freebsd: freebsd_mod.c Log Message: Add missing include To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/freebsd/freebsd_mod.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/compat/freebsd/freebsd_mod.c diff -u src/sys/compat/freebsd/freebsd_mod.c:1.1 src/sys/compat/freebsd/freebsd_mod.c:1.2 --- src/sys/compat/freebsd/freebsd_mod.c:1.1 Wed Nov 19 18:36:02 2008 +++ src/sys/compat/freebsd/freebsd_mod.c Sun Aug 16 15:41:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_mod.c,v 1.1 2008/11/19 18:36:02 ad Exp $ */ +/* $NetBSD: freebsd_mod.c,v 1.2 2009/08/16 15:41:51 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: freebsd_mod.c,v 1.1 2008/11/19 18:36:02 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: freebsd_mod.c,v 1.2 2009/08/16 15:41:51 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -40,6 +40,7 @@ #include #include #include +#include #include #include
CVS commit: src/sys/compat/freebsd
Module Name:src Committed By: martin Date: Sun Aug 16 15:39:30 UTC 2009 Modified Files: src/sys/compat/freebsd: freebsd_exec_aout.c Log Message: Include for a.out specific defines. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/compat/freebsd/freebsd_exec_aout.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/compat/freebsd/freebsd_exec_aout.c diff -u src/sys/compat/freebsd/freebsd_exec_aout.c:1.8 src/sys/compat/freebsd/freebsd_exec_aout.c:1.9 --- src/sys/compat/freebsd/freebsd_exec_aout.c:1.8 Sat Dec 8 18:35:58 2007 +++ src/sys/compat/freebsd/freebsd_exec_aout.c Sun Aug 16 15:39:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_exec_aout.c,v 1.8 2007/12/08 18:35:58 dsl Exp $ */ +/* $NetBSD: freebsd_exec_aout.c,v 1.9 2009/08/16 15:39:30 martin Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -31,12 +31,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_aout.c,v 1.8 2007/12/08 18:35:58 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_aout.c,v 1.9 2009/08/16 15:39:30 martin Exp $"); #include #include #include #include +#include #ifndef EXEC_AOUT #define EXEC_AOUT /* to get a.out specific stuff */
CVS commit: src/sys
Module Name:src Committed By: manu Date: Sun Aug 16 15:35:53 UTC 2009 Modified Files: src/sys/arch/xen/conf: files.xen src/sys/compat/darwin: darwin_exec.c darwin_ioframebuffer.c Log Message: Build COMPAT_DARWIN and COMPAT_MACH as a Xen domU too To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/arch/xen/conf/files.xen cvs rdiff -u -r1.58 -r1.59 src/sys/compat/darwin/darwin_exec.c cvs rdiff -u -r1.42 -r1.43 src/sys/compat/darwin/darwin_ioframebuffer.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/xen/conf/files.xen diff -u src/sys/arch/xen/conf/files.xen:1.103 src/sys/arch/xen/conf/files.xen:1.104 --- src/sys/arch/xen/conf/files.xen:1.103 Wed Aug 5 20:15:37 2009 +++ src/sys/arch/xen/conf/files.xen Sun Aug 16 15:35:52 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.xen,v 1.103 2009/08/05 20:15:37 jym Exp $ +# $NetBSD: files.xen,v 1.104 2009/08/16 15:35:52 manu Exp $ # NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp # NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp @@ -322,6 +322,7 @@ file arch/i386/i386/mach_machdep.c compat_mach | compat_darwin file arch/i386/i386/mach_sigcode.S compat_mach | compat_darwin file arch/i386/i386/mach_syscall.c compat_mach | compat_darwin +filearch/i386/i386/darwin_commpage_machdep.S compat_darwin file arch/i386/i386/macho_machdep.c exec_macho # DARWIN binary compatibility (COMPAT_DARWIN) Index: src/sys/compat/darwin/darwin_exec.c diff -u src/sys/compat/darwin/darwin_exec.c:1.58 src/sys/compat/darwin/darwin_exec.c:1.59 --- src/sys/compat/darwin/darwin_exec.c:1.58 Tue Mar 31 06:03:31 2009 +++ src/sys/compat/darwin/darwin_exec.c Sun Aug 16 15:35:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $ */ +/* $NetBSD: darwin_exec.c,v 1.59 2009/08/16 15:35:52 manu Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -31,9 +31,10 @@ #include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.59 2009/08/16 15:35:52 manu Exp $"); #include "opt_syscall_debug.h" +#include "wsdisplay.h" #include #include @@ -69,8 +70,10 @@ #include +#if defined(NWSDISPLAY) && NWSDISPLAY > 0 /* Redefined from sys/dev/wscons/wsdisplay.c */ extern const struct cdevsw wsdisplay_cdevsw; +#endif static void darwin_e_proc_exec(struct proc *, struct exec_package *); static void darwin_e_proc_fork(struct proc *, struct proc *, int); @@ -308,7 +311,6 @@ darwin_e_proc_exit(struct proc *p) { struct darwin_emuldata *ded; - int error, mode; struct lwp *l; ded = p->p_emuldata; @@ -332,10 +334,13 @@ wakeup(ded->ded_hidsystem_finished); } +#if defined(NWSDISPLAY) && NWSDISPLAY > 0 /* * Restore text mode and black and white colormap */ if (ded->ded_wsdev != NODEV) { + int error, mode; + mode = WSDISPLAYIO_MODE_EMUL; error = (*wsdisplay_cdevsw.d_ioctl)(ded->ded_wsdev, WSDISPLAYIO_SMODE, (void *)&mode, 0, l); @@ -381,9 +386,9 @@ printf("Cannot revert colormap (error %d)\n", error); #endif } -#endif - +#endif /* 0 */ } +#endif /* defined(NWSDISPLAY) && NWSDISPLAY > 0 */ /* * Cleanup mach_emuldata part of darwin_emuldata Index: src/sys/compat/darwin/darwin_ioframebuffer.c diff -u src/sys/compat/darwin/darwin_ioframebuffer.c:1.42 src/sys/compat/darwin/darwin_ioframebuffer.c:1.43 --- src/sys/compat/darwin/darwin_ioframebuffer.c:1.42 Sat Mar 14 21:04:18 2009 +++ src/sys/compat/darwin/darwin_ioframebuffer.c Sun Aug 16 15:35:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_ioframebuffer.c,v 1.42 2009/03/14 21:04:18 dsl Exp $ */ +/* $NetBSD: darwin_ioframebuffer.c,v 1.43 2009/08/16 15:35:52 manu Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.42 2009/03/14 21:04:18 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.43 2009/08/16 15:35:52 manu Exp $"); #include #include @@ -72,6 +72,7 @@ #include #include "ioconf.h" +#include "wsdisplay.h" /* Redefined from sys/dev/wscons/wsdisplay.c */ extern const struct cdevsw wsdisplay_cdevsw; @@ -803,6 +804,7 @@ static int darwin_findscreen(dev_t *dev, int unit, int screen) { +#if defined(NWSDISPLAY) && NWSDISPLAY > 0 struct device *dv; struct wsdisplay_softc *sc; int major, minor; @@ -820,6 +822,9 @@ #ifdef DEBUG_DARWIN printf("ioframebuffer uses major = %d, minor = %d\n", major, minor); -#endif +#endif /* DEBUG_DARWIN */ return 0; +#else /* defined(NWSDISPLAY) && NWSDISPLAY > 0 */ + return ENODEV; +#endif /* defined(NWSDISPLAY) && NWSDISPLAY > 0 */ }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: tron Date: Sun Aug 16 14:18:49 UTC 2009 Modified Files: src/sys/dev/usb: if_cdce.c Log Message: Add support for the Openmoko Freerunner to cdce(4) ported from FreeBSD. The patch was supplied by Pierre Pronchery in PR kern/40049. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_cdce.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/usb/if_cdce.c diff -u src/sys/dev/usb/if_cdce.c:1.21 src/sys/dev/usb/if_cdce.c:1.22 --- src/sys/dev/usb/if_cdce.c:1.21 Sat Apr 18 14:58:04 2009 +++ src/sys/dev/usb/if_cdce.c Sun Aug 16 14:18:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cdce.c,v 1.21 2009/04/18 14:58:04 tsutsui Exp $ */ +/* $NetBSD: if_cdce.c,v 1.22 2009/08/16 14:18:49 tron Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.21 2009/04/18 14:58:04 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.22 2009/08/16 14:18:49 tron Exp $"); #include "bpfilter.h" #ifdef __NetBSD__ #include "opt_inet.h" @@ -154,8 +154,9 @@ usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; const usb_cdc_union_descriptor_t *ud; + usb_config_descriptor_t *cd; int data_ifcno; - int i; + int i, j, numalts; u_char eaddr[ETHER_ADDR_LEN]; const usb_cdc_ethernet_descriptor_t *ue; char eaddr_str[USB_MAX_ENCODED_STRING_LEN]; @@ -202,29 +203,61 @@ USB_ATTACH_ERROR_RETURN; } - /* Find endpoints. */ + /* + * + * The Data Class interface of a networking device shall have a minimum + * of two interface settings. The first setting (the default interface + * setting) includes no endpoints and therefore no networking traffic is + * exchanged whenever the default interface setting is selected. One or + * more additional interface settings are used for normal operation, and + * therefore each includes a pair of endpoints (one IN, and one OUT) to + * exchange network traffic. Select an alternate interface setting to + * initialize the network aspects of the device and to enable the + * exchange of network traffic. + * + * + * Some devices, most notably cable modems, include interface settings + * that have no IN or OUT endpoint, therefore loop through the list of all + * available interface settings looking for one with both IN and OUT + * endpoints. + */ id = usbd_get_interface_descriptor(sc->cdce_data_iface); - sc->cdce_bulkin_no = sc->cdce_bulkout_no = -1; - for (i = 0; i < id->bNumEndpoints; i++) { - ed = usbd_interface2endpoint_descriptor(sc->cdce_data_iface, i); - if (!ed) { - aprint_error_dev(self, - "could not read endpoint descriptor\n"); + cd = usbd_get_config_descriptor(sc->cdce_udev); + numalts = usbd_get_no_alts(cd, id->bInterfaceNumber); + + for (j = 0; j < numalts; j++) { + if (usbd_set_interface(sc->cdce_data_iface, j)) { + aprint_error_dev(sc->cdce_dev, + "setting alternate interface failed\n"); USB_ATTACH_ERROR_RETURN; } - if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - sc->cdce_bulkin_no = ed->bEndpointAddress; - } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - sc->cdce_bulkout_no = ed->bEndpointAddress; - } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { - /* XXX: CDC spec defines an interrupt pipe, but it is not - * needed for simple host-to-host applications. */ - } else { - aprint_error_dev(self, "unexpected endpoint\n"); + /* Find endpoints. */ + id = usbd_get_interface_descriptor(sc->cdce_data_iface); + sc->cdce_bulkin_no = sc->cdce_bulkout_no = -1; + for (i = 0; i < id->bNumEndpoints; i++) { + ed = usbd_interface2endpoint_descriptor(sc->cdce_data_iface, i); + if (!ed) { +aprint_error_dev(self, + "could not read endpoint descriptor\n"); +USB_ATTACH_ERROR_RETURN; + } + if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { +sc->cdce_bulkin_no = ed->bEndpointAddress; + } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { +sc->cdce_bulkout_no = ed->bEndpointAddress; + } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && + UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { +/* XXX: CDC spec defines an interrupt pipe, but it is not + * needed for simple host-to-host applications. */ + } else { +aprint_error_dev(self, "unexpected endpoint\n"); + } } + /* If we found something, try and use it... */ + if ((sc->cdce_bulkin_no != -1) && (sc->cdce_bulkout_no != -1)) + break; } if (sc->cdce_bulkin_no == -1) {
CVS commit: xsrc/external/mit/libXt/dist/src
Module Name:xsrc Committed By: christos Date: Sun Aug 16 14:16:33 UTC 2009 Modified Files: xsrc/external/mit/libXt/dist/src: TMparse.c Log Message: Fix DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/libXt/dist/src/TMparse.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/libXt/dist/src/TMparse.c diff -u xsrc/external/mit/libXt/dist/src/TMparse.c:1.1.1.2 xsrc/external/mit/libXt/dist/src/TMparse.c:1.2 --- xsrc/external/mit/libXt/dist/src/TMparse.c:1.1.1.2 Wed Jul 8 22:00:18 2009 +++ xsrc/external/mit/libXt/dist/src/TMparse.c Sun Aug 16 10:16:33 2009 @@ -364,8 +364,8 @@ #ifdef DEBUG # ifdef notdef {"Timer", NULLQUARK, _XtTimerEventType,ParseNone, NULL}, -# endif /* notdef */ {"EventTimer", NULLQUARK, _XtEventTimerEventType,ParseNone,NULL}, +# endif /* notdef */ #endif /* DEBUG */ /* Event Name, Quark, Event Type, Detail Parser, Closure */
CVS commit: src/sys
Module Name:src Committed By: skrll Date: Sun Aug 16 14:06:36 UTC 2009 Modified Files: src/sys/arch/sparc/include: pmap.h src/sys/arch/sparc/sparc: pmap.c src/sys/rump/librump/rumpkern: pmap_stub.c Log Message: s/int/u_int/ for flags in pmap_enter and deal with this in rump. Hi cegger. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/arch/sparc/include/pmap.h cvs rdiff -u -r1.332 -r1.333 src/sys/arch/sparc/sparc/pmap.c cvs rdiff -u -r1.18 -r1.19 src/sys/rump/librump/rumpkern/pmap_stub.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/sparc/include/pmap.h diff -u src/sys/arch/sparc/include/pmap.h:1.84 src/sys/arch/sparc/include/pmap.h:1.85 --- src/sys/arch/sparc/include/pmap.h:1.84 Tue Dec 9 20:45:45 2008 +++ src/sys/arch/sparc/include/pmap.h Sun Aug 16 14:06:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.84 2008/12/09 20:45:45 pooka Exp $ */ +/* $NetBSD: pmap.h,v 1.85 2009/08/16 14:06:36 skrll Exp $ */ /* * Copyright (c) 1996 @@ -280,7 +280,7 @@ bool pmap_clear_modify4_4c(struct vm_page *); bool pmap_clear_reference4_4c(struct vm_page *); void pmap_copy_page4_4c(paddr_t, paddr_t); -int pmap_enter4_4c(pmap_t, vaddr_t, paddr_t, vm_prot_t, int); +int pmap_enter4_4c(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); bool pmap_extract4_4c(pmap_t, vaddr_t, paddr_t *); bool pmap_is_modified4_4c(struct vm_page *); bool pmap_is_referenced4_4c(struct vm_page *); @@ -300,7 +300,7 @@ void pmap_copy_page4m(paddr_t, paddr_t); void pmap_copy_page_viking_mxcc(paddr_t, paddr_t); void pmap_copy_page_hypersparc(paddr_t, paddr_t); -int pmap_enter4m(pmap_t, vaddr_t, paddr_t, vm_prot_t, int); +int pmap_enter4m(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); bool pmap_extract4m(pmap_t, vaddr_t, paddr_t *); bool pmap_is_modified4m(struct vm_page *); bool pmap_is_referenced4m(struct vm_page *); @@ -346,7 +346,7 @@ extern bool (*pmap_clear_modify_p)(struct vm_page *); extern bool (*pmap_clear_reference_p)(struct vm_page *); -extern int (*pmap_enter_p)(pmap_t, vaddr_t, paddr_t, vm_prot_t, int); +extern int (*pmap_enter_p)(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); extern bool (*pmap_extract_p)(pmap_t, vaddr_t, paddr_t *); extern bool (*pmap_is_modified_p)(struct vm_page *); extern bool (*pmap_is_referenced_p)(struct vm_page *); Index: src/sys/arch/sparc/sparc/pmap.c diff -u src/sys/arch/sparc/sparc/pmap.c:1.332 src/sys/arch/sparc/sparc/pmap.c:1.333 --- src/sys/arch/sparc/sparc/pmap.c:1.332 Sat Aug 15 23:45:00 2009 +++ src/sys/arch/sparc/sparc/pmap.c Sun Aug 16 14:06:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.332 2009/08/15 23:45:00 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.333 2009/08/16 14:06:36 skrll Exp $ */ /* * Copyright (c) 1996 @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.332 2009/08/15 23:45:00 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.333 2009/08/16 14:06:36 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -569,7 +569,7 @@ /* from pmap.h: */ bool (*pmap_clear_modify_p)(struct vm_page *); bool (*pmap_clear_reference_p)(struct vm_page *); -int (*pmap_enter_p)(pmap_t, vaddr_t, paddr_t, vm_prot_t, int); +int (*pmap_enter_p)(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); bool (*pmap_extract_p)(pmap_t, vaddr_t, paddr_t *); bool (*pmap_is_modified_p)(struct vm_page *); bool (*pmap_is_referenced_p)(struct vm_page *); @@ -5532,7 +5532,7 @@ int pmap_enter4_4c(struct pmap *pm, vaddr_t va, paddr_t pa, - vm_prot_t prot, int flags) + vm_prot_t prot, u_int flags) { struct vm_page *pg; int pteproto, ctx; @@ -6137,7 +6137,7 @@ int pmap_enter4m(struct pmap *pm, vaddr_t va, paddr_t pa, - vm_prot_t prot, int flags) + vm_prot_t prot, u_int flags) { struct vm_page *pg; int pteproto; Index: src/sys/rump/librump/rumpkern/pmap_stub.c diff -u src/sys/rump/librump/rumpkern/pmap_stub.c:1.18 src/sys/rump/librump/rumpkern/pmap_stub.c:1.19 --- src/sys/rump/librump/rumpkern/pmap_stub.c:1.18 Sun Aug 16 14:02:08 2009 +++ src/sys/rump/librump/rumpkern/pmap_stub.c Sun Aug 16 14:06:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_stub.c,v 1.18 2009/08/16 14:02:08 skrll Exp $ */ +/* $NetBSD: pmap_stub.c,v 1.19 2009/08/16 14:06:36 skrll Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_stub.c,v 1.18 2009/08/16 14:02:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_stub.c,v 1.19 2009/08/16 14:06:36 skrll Exp $"); #include @@ -52,6 +52,7 @@ #undef pmap_kremove #undef pmap_page_protect #undef pmap_extract +#undef pmap_enter bool pmap_is_modified(struct vm_page *); bool pmap_clear_modify(struct vm_page *); @@ -59,6 +60,7 @@ void pmap_kremove(vaddr_t, vsize_t); void pmap_page_protect(struct vm_page *, vm_prot_t); bool pmap_extract(pmap_t, vaddr_
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: skrll Date: Sun Aug 16 14:02:08 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: pmap_stub.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/rump/librump/rumpkern/pmap_stub.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/rump/librump/rumpkern/pmap_stub.c diff -u src/sys/rump/librump/rumpkern/pmap_stub.c:1.17 src/sys/rump/librump/rumpkern/pmap_stub.c:1.18 --- src/sys/rump/librump/rumpkern/pmap_stub.c:1.17 Mon Aug 10 12:04:17 2009 +++ src/sys/rump/librump/rumpkern/pmap_stub.c Sun Aug 16 14:02:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_stub.c,v 1.17 2009/08/10 12:04:17 martin Exp $ */ +/* $NetBSD: pmap_stub.c,v 1.18 2009/08/16 14:02:08 skrll Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_stub.c,v 1.17 2009/08/10 12:04:17 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_stub.c,v 1.18 2009/08/16 14:02:08 skrll Exp $"); #include @@ -58,7 +58,7 @@ void pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t); void pmap_kremove(vaddr_t, vsize_t); void pmap_page_protect(struct vm_page *, vm_prot_t); -bool pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *); +bool pmap_extract(pmap_t, vaddr_t, paddr_t *); #endif #if !defined(pmap_is_modified) && !defined(__vax__)
CVS commit: src/sbin/fsck_ext2fs
Module Name:src Committed By: tron Date: Sun Aug 16 13:50:54 UTC 2009 Modified Files: src/sbin/fsck_ext2fs: main.c Log Message: Ignore the "-P" option as intended to make this work with e.g. "fsck_flags=-pP" in "/etc/rc.conf". Patch supplied by Pierre Pronchery in PR bin/41490. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sbin/fsck_ext2fs/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ext2fs/main.c diff -u src/sbin/fsck_ext2fs/main.c:1.32 src/sbin/fsck_ext2fs/main.c:1.33 --- src/sbin/fsck_ext2fs/main.c:1.32 Sun Oct 12 20:49:43 2008 +++ src/sbin/fsck_ext2fs/main.c Sun Aug 16 13:50:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.32 2008/10/12 20:49:43 wiz Exp $ */ +/* $NetBSD: main.c,v 1.33 2009/08/16 13:50:54 tron Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -68,7 +68,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94"; #else -__RCSID("$NetBSD: main.c,v 1.32 2008/10/12 20:49:43 wiz Exp $"); +__RCSID("$NetBSD: main.c,v 1.33 2009/08/16 13:50:54 tron Exp $"); #endif #endif /* not lint */ @@ -107,7 +107,7 @@ sync(); skipclean = 1; - while ((ch = getopt(argc, argv, "b:dfm:npqUy")) != -1) { + while ((ch = getopt(argc, argv, "b:dfm:npPqUy")) != -1) { switch (ch) { case 'b': skipclean = 0;
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: matt Date: Sun Aug 16 13:26:16 UTC 2009 Modified Files: src/sys/lib/libsa: exec.c loadfile_aout.c Log Message: Change include of to since these files want the a.out stuff. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/lib/libsa/exec.c cvs rdiff -u -r1.13 -r1.14 src/sys/lib/libsa/loadfile_aout.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/lib/libsa/exec.c diff -u src/sys/lib/libsa/exec.c:1.26 src/sys/lib/libsa/exec.c:1.27 --- src/sys/lib/libsa/exec.c:1.26 Tue Mar 25 21:23:50 2008 +++ src/sys/lib/libsa/exec.c Sun Aug 16 13:26:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.26 2008/03/25 21:23:50 christos Exp $ */ +/* $NetBSD: exec.c,v 1.27 2009/08/16 13:26:16 matt Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993 @@ -38,7 +38,7 @@ #ifndef INSECURE #include #endif -#include +#include #ifdef _STANDALONE #include #else Index: src/sys/lib/libsa/loadfile_aout.c diff -u src/sys/lib/libsa/loadfile_aout.c:1.13 src/sys/lib/libsa/loadfile_aout.c:1.14 --- src/sys/lib/libsa/loadfile_aout.c:1.13 Mon Apr 28 20:24:06 2008 +++ src/sys/lib/libsa/loadfile_aout.c Sun Aug 16 13:26:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_aout.c,v 1.13 2008/04/28 20:24:06 martin Exp $ */ +/* $NetBSD: loadfile_aout.c,v 1.14 2009/08/16 13:26:16 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ #endif #include -#include +#include #include "loadfile.h"
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Aug 16 13:20:40 UTC 2009 Modified Files: src/sys/dev/usb: usbdi.h usbdi_util.c Log Message: Use a separately defined USBD_CONFIG_TIMEOUT when requesting a device descriptor. I have a USB ATA device that spins up it's (removable) hard disk and only returns the real descriptor if the disk is present - this takes too long with the default 5 seconds timeout, so we were unable to properly attach this device. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/usbdi.h cvs rdiff -u -r1.51 -r1.52 src/sys/dev/usb/usbdi_util.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/usb/usbdi.h diff -u src/sys/dev/usb/usbdi.h:1.77 src/sys/dev/usb/usbdi.h:1.78 --- src/sys/dev/usb/usbdi.h:1.77 Fri Dec 12 05:35:11 2008 +++ src/sys/dev/usb/usbdi.h Sun Aug 16 13:20:40 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.h,v 1.77 2008/12/12 05:35:11 jmorse Exp $ */ +/* $NetBSD: usbdi.h,v 1.78 2009/08/16 13:20:40 martin Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */ /* @@ -83,6 +83,7 @@ #define USBD_NO_TIMEOUT 0 #define USBD_DEFAULT_TIMEOUT 5000 /* ms = 5 s */ +#define USBD_CONFIG_TIMEOUT (3*USBD_DEFAULT_TIMEOUT) #if defined(__FreeBSD__) #define USB_CDEV_MAJOR 108 Index: src/sys/dev/usb/usbdi_util.c diff -u src/sys/dev/usb/usbdi_util.c:1.51 src/sys/dev/usb/usbdi_util.c:1.52 --- src/sys/dev/usb/usbdi_util.c:1.51 Mon May 26 18:00:33 2008 +++ src/sys/dev/usb/usbdi_util.c Sun Aug 16 13:20:40 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.51 2008/05/26 18:00:33 drochner Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.52 2009/08/16 13:20:40 martin Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.51 2008/05/26 18:00:33 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.52 2009/08/16 13:20:40 martin Exp $"); #include #include @@ -68,7 +68,8 @@ USETW2(req.wValue, type, index); USETW(req.wIndex, 0); USETW(req.wLength, len); - return (usbd_do_request(dev, &req, desc)); + return (usbd_do_request_flags(dev, &req, desc, 0, 0, + USBD_CONFIG_TIMEOUT)); } usbd_status
CVS commit: src/gnu/dist/gcc4/gcc/config/i386
Module Name:src Committed By: matt Date: Sun Aug 16 13:16:53 UTC 2009 Modified Files: src/gnu/dist/gcc4/gcc/config/i386: t-netbsd64 Log Message: Pull in a hunk from t-linux64 for compile flags for CRTSTUFF To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64 diff -u src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.1 src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.2 --- src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64:1.1 Sat Oct 11 05:03:43 2008 +++ src/gnu/dist/gcc4/gcc/config/i386/t-netbsd64 Sun Aug 16 13:16:52 2009 @@ -7,3 +7,9 @@ LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib + +# The pushl in CTOR initialization interferes with frame pointer elimination. +# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, +# because then __FRAME_END__ might not be the last thing in .eh_frame +# section. +CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
CVS commit: src/sys/dev/usb
Module Name:src Committed By: martin Date: Sun Aug 16 13:06:32 UTC 2009 Modified Files: src/sys/dev/usb: usb_subr.c Log Message: If we are attaching a high speed device, request a full size descriptor block - we know the device will be able to handle it already. This fixes a strange failure mode when attaching a (apparently non standard conformant) USB ATA device I have, and *should* not cause any harm. Apparently the device in question answered with the full descriptor despite our short request - a failure mode not handled gracefully, leading to a port reset. From Jeremy Morse. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/dev/usb/usb_subr.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/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.162 src/sys/dev/usb/usb_subr.c:1.163 --- src/sys/dev/usb/usb_subr.c:1.162 Mon Aug 18 18:03:21 2008 +++ src/sys/dev/usb/usb_subr.c Sun Aug 16 13:06:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.162 2008/08/18 18:03:21 kent Exp $ */ +/* $NetBSD: usb_subr.c,v 1.163 2009/08/16 13:06:32 martin Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.162 2008/08/18 18:03:21 kent Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.163 2009/08/16 13:06:32 martin Exp $"); #include "opt_compat_netbsd.h" #include "opt_usbverbose.h" @@ -1059,7 +1059,10 @@ dev->def_ep_desc.bDescriptorType = UDESC_ENDPOINT; dev->def_ep_desc.bEndpointAddress = USB_CONTROL_ENDPOINT; dev->def_ep_desc.bmAttributes = UE_CONTROL; - USETW(dev->def_ep_desc.wMaxPacketSize, USB_MAX_IPACKET); + if (speed == USB_SPEED_HIGH) + USETW(dev->def_ep_desc.wMaxPacketSize, 64); + else + USETW(dev->def_ep_desc.wMaxPacketSize, USB_MAX_IPACKET); dev->def_ep_desc.bInterval = 0; dev->quirks = &usbd_no_quirk; @@ -1105,7 +1108,11 @@ /* Try a few times in case the device is slow (i.e. outside specs.) */ for (i = 0; i < 10; i++) { /* Get the first 8 bytes of the device descriptor. */ - err = usbd_get_desc(dev, UDESC_DEVICE, 0, USB_MAX_IPACKET, dd); + err = usbd_get_desc(dev, UDESC_DEVICE, 0, + (speed == USB_SPEED_HIGH) ? USB_DEVICE_DESCRIPTOR_SIZE + : USB_MAX_IPACKET, + dd); + if (!err) break; usbd_delay_ms(dev, 200);
CVS commit: src/sys/uvm
Module Name:src Committed By: yamt Date: Sun Aug 16 11:06:37 UTC 2009 Modified Files: src/sys/uvm: uvm_amap.c Log Message: assertions To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c diff -u src/sys/uvm/uvm_amap.c:1.86 src/sys/uvm/uvm_amap.c:1.87 --- src/sys/uvm/uvm_amap.c:1.86 Sat Mar 28 21:45:55 2009 +++ src/sys/uvm/uvm_amap.c Sun Aug 16 11:06:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_amap.c,v 1.86 2009/03/28 21:45:55 rmind Exp $ */ +/* $NetBSD: uvm_amap.c,v 1.87 2009/08/16 11:06:37 yamt Exp $ */ /* * @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.86 2009/03/28 21:45:55 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.87 2009/08/16 11:06:37 yamt Exp $"); #include "opt_uvmhist.h" @@ -1381,6 +1381,7 @@ struct vm_anon * amap_lookup(struct vm_aref *aref, vaddr_t offset) { + struct vm_anon *an; int slot; struct vm_amap *amap = aref->ar_amap; UVMHIST_FUNC("amap_lookup"); UVMHIST_CALLED(maphist); @@ -1392,7 +1393,9 @@ UVMHIST_LOG(maphist, "<- done (amap=0x%x, offset=0x%x, result=0x%x)", amap, offset, amap->am_anon[slot], 0); - return(amap->am_anon[slot]); + an = amap->am_anon[slot]; + KASSERT(an == NULL || an->an_ref != 0); + return an; } /* @@ -1407,6 +1410,9 @@ { int slot; struct vm_amap *amap = aref->ar_amap; +#if defined(DIAGNOSTIC) + int i; +#endif /* defined(DIAGNOSTIC) */ UVMHIST_FUNC("amap_lookups"); UVMHIST_CALLED(maphist); KASSERT(mutex_owned(&amap->am_l)); @@ -1419,6 +1425,15 @@ KASSERT((slot + (npages - 1)) < amap->am_nslot); memcpy(anons, &amap->am_anon[slot], npages * sizeof(struct vm_anon *)); +#if defined(DIAGNOSTIC) + for (i = 0; i < npages; i++) { + struct vm_anon * const an = anons[i]; + + if (an != NULL && an->an_ref == 0) { + panic("%s: ref=0 anon", __func__); + } + } +#endif /* defined(DIAGNOSTIC) */ UVMHIST_LOG(maphist, "<- done", 0, 0, 0, 0); return; }
CVS commit: src/sys/arch
Module Name:src Committed By: yamt Date: Sun Aug 16 11:04:48 UTC 2009 Modified Files: src/sys/arch/amd64/amd64: procfs_machdep.c src/sys/arch/i386/i386: procfs_machdep.c Log Message: reduce differences between x86 ports. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/amd64/procfs_machdep.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/i386/i386/procfs_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/procfs_machdep.c diff -u src/sys/arch/amd64/amd64/procfs_machdep.c:1.11 src/sys/arch/amd64/amd64/procfs_machdep.c:1.12 --- src/sys/arch/amd64/amd64/procfs_machdep.c:1.11 Wed Jun 11 21:47:46 2008 +++ src/sys/arch/amd64/amd64/procfs_machdep.c Sun Aug 16 11:04:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.11 2008/06/11 21:47:46 njoly Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.11 2008/06/11 21:47:46 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.12 2009/08/16 11:04:48 yamt Exp $"); #include #include @@ -201,7 +201,7 @@ freq = (ci->ci_data.cpu_cc_freq + 4999) / 100; fraq = ((ci->ci_data.cpu_cc_freq + 4999) / 1) % 100; - l = snprintf(p, left, "cpu MHz\t\t: %ld.%ld\n", + l = snprintf(p, left, "cpu MHz\t\t: %" PRIu64 ".%" PRIu64 "\n", freq, fraq); } else l = snprintf(p, left, "cpu MHz\t\t: unknown\n"); Index: src/sys/arch/i386/i386/procfs_machdep.c diff -u src/sys/arch/i386/i386/procfs_machdep.c:1.31 src/sys/arch/i386/i386/procfs_machdep.c:1.32 --- src/sys/arch/i386/i386/procfs_machdep.c:1.31 Wed Jun 11 21:47:46 2008 +++ src/sys/arch/i386/i386/procfs_machdep.c Sun Aug 16 11:04:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_machdep.c,v 1.31 2008/06/11 21:47:46 njoly Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.32 2009/08/16 11:04:48 yamt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.31 2008/06/11 21:47:46 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.32 2009/08/16 11:04:48 yamt Exp $"); #include #include @@ -162,7 +162,7 @@ freq = (ci->ci_data.cpu_cc_freq + 4999) / 100; fraq = ((ci->ci_data.cpu_cc_freq + 4999) / 1) % 100; - l = snprintf(p, left, "cpu MHz\t\t: %qd.%qd\n", + l = snprintf(p, left, "cpu MHz\t\t: %" PRIu64 ".%" PRIu64 "\n", freq, fraq); } else l = snprintf(p, left, "cpu MHz\t\t: unknown\n");
CVS commit: src/sys/dev/dm
Module Name:src Committed By: yamt Date: Sun Aug 16 11:02:41 UTC 2009 Modified Files: src/sys/dev/dm: dm_target.c Log Message: fix a comment typo. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/dm/dm_target.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/dm/dm_target.c diff -u src/sys/dev/dm/dm_target.c:1.9 src/sys/dev/dm/dm_target.c:1.10 --- src/sys/dev/dm/dm_target.c:1.9 Fri Feb 20 11:14:11 2009 +++ src/sys/dev/dm/dm_target.c Sun Aug 16 11:02:40 2009 @@ -1,4 +1,4 @@ -/*$NetBSD: dm_target.c,v 1.9 2009/02/20 11:14:11 haad Exp $ */ +/*$NetBSD: dm_target.c,v 1.10 2009/08/16 11:02:40 yamt Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ kmutex_t dm_target_mutex; /* - * Called indirectly from dm_table_load_ioct to mark target as used. + * Called indirectly from dm_table_load_ioctl to mark target as used. */ void dm_target_busy(dm_target_t *target)
CVS commit: src/sys/dev/dm
Module Name:src Committed By: yamt Date: Sun Aug 16 11:02:24 UTC 2009 Modified Files: src/sys/dev/dm: dm_target_linear.c Log Message: fix a comment typo. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/dm/dm_target_linear.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/dm/dm_target_linear.c diff -u src/sys/dev/dm/dm_target_linear.c:1.5 src/sys/dev/dm/dm_target_linear.c:1.6 --- src/sys/dev/dm/dm_target_linear.c:1.5 Fri Jun 5 19:56:40 2009 +++ src/sys/dev/dm/dm_target_linear.c Sun Aug 16 11:02:24 2009 @@ -1,4 +1,4 @@ -/*$NetBSD: dm_target_linear.c,v 1.5 2009/06/05 19:56:40 haad Exp $ */ +/*$NetBSD: dm_target_linear.c,v 1.6 2009/08/16 11:02:24 yamt Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ * Allocate target specific config data, and link them to table. * This function is called only when, flags is not READONLY and * therefore we can add things to pdev list. This should not a - * problem because this routine is called onyl from dm_table_load_ioctl. + * problem because this routine is called only from dm_table_load_ioctl. * @argv[0] is name, * @argv[1] is physical data offset. */
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Sun Aug 16 11:01:12 UTC 2009 Modified Files: src/sys/kern: kern_auth.c Log Message: kauth_cred_free: add an assertion. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/kern/kern_auth.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_auth.c diff -u src/sys/kern/kern_auth.c:1.62 src/sys/kern/kern_auth.c:1.63 --- src/sys/kern/kern_auth.c:1.62 Sun Apr 5 11:50:51 2009 +++ src/sys/kern/kern_auth.c Sun Aug 16 11:01:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_auth.c,v 1.62 2009/04/05 11:50:51 lukem Exp $ */ +/* $NetBSD: kern_auth.c,v 1.63 2009/08/16 11:01:12 yamt Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_auth.c,v 1.62 2009/04/05 11:50:51 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_auth.c,v 1.63 2009/08/16 11:01:12 yamt Exp $"); #include #include @@ -189,6 +189,7 @@ KASSERT(cred != NULL); KASSERT(cred->cr_refcnt > 0); + ASSERT_SLEEPABLE(); if (atomic_dec_uint_nv(&cred->cr_refcnt) > 0) return;
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Sun Aug 16 11:00:20 UTC 2009 Modified Files: src/sys/kern: kern_descrip.c Log Message: assertion To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/kern/kern_descrip.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_descrip.c diff -u src/sys/kern/kern_descrip.c:1.198 src/sys/kern/kern_descrip.c:1.199 --- src/sys/kern/kern_descrip.c:1.198 Tue Jun 30 20:32:49 2009 +++ src/sys/kern/kern_descrip.c Sun Aug 16 11:00:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.198 2009/06/30 20:32:49 martin Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.199 2009/08/16 11:00:20 yamt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.198 2009/06/30 20:32:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.199 2009/08/16 11:00:20 yamt Exp $"); #include #include @@ -1263,6 +1263,7 @@ #endif /* DIAGNOSTIC */ fdp->fd_refcnt = 1; + fd_checkmaps(fdp); return fdp; }
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Sun Aug 16 10:59:25 UTC 2009 Modified Files: src/sys/kern: subr_workqueue.c Log Message: struct lwp -> lwp_t for consistency To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/kern/subr_workqueue.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/subr_workqueue.c diff -u src/sys/kern/subr_workqueue.c:1.27 src/sys/kern/subr_workqueue.c:1.28 --- src/sys/kern/subr_workqueue.c:1.27 Fri Apr 3 19:34:19 2009 +++ src/sys/kern/subr_workqueue.c Sun Aug 16 10:59:25 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_workqueue.c,v 1.27 2009/04/03 19:34:19 ad Exp $ */ +/* $NetBSD: subr_workqueue.c,v 1.28 2009/08/16 10:59:25 yamt Exp $ */ /*- * Copyright (c)2002, 2005, 2006, 2007 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_workqueue.c,v 1.27 2009/04/03 19:34:19 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_workqueue.c,v 1.28 2009/08/16 10:59:25 yamt Exp $"); #include #include @@ -52,7 +52,7 @@ kmutex_t q_mutex; kcondvar_t q_cv; struct workqhead q_queue; - struct lwp *q_worker; + lwp_t *q_worker; }; struct workqueue {
CVS commit: src/sys/sys
Module Name:src Committed By: yamt Date: Sun Aug 16 10:57:17 UTC 2009 Modified Files: src/sys/sys: buf.h Log Message: g/c bio_ops. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/sys/buf.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/buf.h diff -u src/sys/sys/buf.h:1.112 src/sys/sys/buf.h:1.113 --- src/sys/sys/buf.h:1.112 Sun May 3 16:52:55 2009 +++ src/sys/sys/buf.h Sun Aug 16 10:57:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.112 2009/05/03 16:52:55 pooka Exp $ */ +/* $NetBSD: buf.h,v 1.113 2009/08/16 10:57:17 yamt Exp $ */ /*- * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc. @@ -84,23 +84,6 @@ #define NOLIST ((struct buf *)0x87654321) -/* - * These are currently used only by the soft dependency code, hence - * are stored once in a global variable. If other subsystems wanted - * to use these hooks, a pointer to a set of bio_ops could be added - * to each buffer. - */ -struct bio_ops { - void (*io_start)(struct buf *); - void (*io_complete)(struct buf *); - void (*io_deallocate)(struct buf *); - int (*io_fsync)(struct vnode *, int); - int (*io_sync)(struct mount *); - void (*io_movedeps)(struct buf *, struct buf *); - int (*io_countdeps)(struct buf *, int); - void (*io_pageiodone)(struct buf *); -}; - extern kmutex_t bufcache_lock; extern kmutex_t buffer_lock;
CVS commit: src/sys/sys
Module Name:src Committed By: yamt Date: Sun Aug 16 10:57:01 UTC 2009 Modified Files: src/sys/sys: rb.h Log Message: comments. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/sys/rb.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/rb.h diff -u src/sys/sys/rb.h:1.12 src/sys/sys/rb.h:1.13 --- src/sys/sys/rb.h:1.12 Tue Aug 5 04:12:09 2008 +++ src/sys/sys/rb.h Sun Aug 16 10:57:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rb.h,v 1.12 2008/08/05 04:12:09 matt Exp $ */ +/* $NetBSD: rb.h,v 1.13 2009/08/16 10:57:01 yamt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -122,6 +122,18 @@ #define RB_TAILQ_INSERT_AFTER(a, b, c, d) do { } while (/*CONSTCOND*/0) #endif /* RBDEBUG */ +/* + * rbto_compare_nodes_fn: + * return a positive value if the first node < the second node. + * return a negative value if the first node > the second node. + * return 0 if they are considered same. + * + * rbto_compare_key_fn: + * return a positive value if the node < the key. + * return a negative value if the node > the key. + * return 0 if they are considered same. + */ + typedef signed int (*const rbto_compare_nodes_fn)(const struct rb_node *, const struct rb_node *); typedef signed int (*const rbto_compare_key_fn)(const struct rb_node *,
CVS commit: src/sys/sys
Module Name:src Committed By: yamt Date: Sun Aug 16 10:51:21 UTC 2009 Modified Files: src/sys/sys: vnode.h Log Message: remove a stale comment. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 src/sys/sys/vnode.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/vnode.h diff -u src/sys/sys/vnode.h:1.208 src/sys/sys/vnode.h:1.209 --- src/sys/sys/vnode.h:1.208 Sat Jul 18 16:31:44 2009 +++ src/sys/sys/vnode.h Sun Aug 16 10:51:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vnode.h,v 1.208 2009/07/18 16:31:44 reinoud Exp $ */ +/* $NetBSD: vnode.h,v 1.209 2009/08/16 10:51:21 yamt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -217,8 +217,6 @@ #define VV_MPSAFE 0x0010 /* file system code is MP safe */ #define VV_LOCKSWORK 0x0020 /* FS supports locking discipline */ -/* XXXAD ALIASED should be covered by spec lock? */ - /* * The second set are locked by vp->v_interlock. */