CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Mon Mar 19 06:04:20 UTC 2012 Modified Files: src/sys/kern: kern_prot.c Log Message: No need take the address of an array (array) since an array is already a pointer. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/kern/kern_prot.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_prot.c diff -u src/sys/kern/kern_prot.c:1.113 src/sys/kern/kern_prot.c:1.114 --- src/sys/kern/kern_prot.c:1.113 Wed Apr 27 06:22:11 2011 +++ src/sys/kern/kern_prot.c Mon Mar 19 06:04:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_prot.c,v 1.113 2011/04/27 06:22:11 martin Exp $ */ +/* $NetBSD: kern_prot.c,v 1.114 2012/03/19 06:04:19 matt Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993 @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_prot.c,v 1.113 2011/04/27 06:22:11 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_prot.c,v 1.114 2012/03/19 06:04:19 matt Exp $); #include opt_compat_43.h @@ -609,7 +609,7 @@ sys___setlogin(struct lwp *l, const stru if ((error = kauth_authorize_process(l-l_cred, KAUTH_PROCESS_SETID, p, NULL, NULL, NULL)) != 0) return (error); - error = copyinstr(SCARG(uap, namebuf), newname, sizeof newname, NULL); + error = copyinstr(SCARG(uap, namebuf), newname, sizeof newname, NULL); if (error != 0) return (error == ENAMETOOLONG ? EINVAL : error);
CVS commit: src
Module Name:src Committed By: bsh Date: Mon Mar 19 06:08:51 UTC 2012 Modified Files: src: UPDATING Log Message: add note about SYMTAB_SPACE. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.235 src/UPDATING:1.236 --- src/UPDATING:1.235 Wed Feb 15 23:32:27 2012 +++ src/UPDATING Mon Mar 19 06:08:51 2012 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.235 2012/02/15 23:32:27 joerg Exp $ +$NetBSD: UPDATING,v 1.236 2012/03/19 06:08:51 bsh Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -16,6 +16,13 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ +20120319: + sys/conf/Makefile.kern.inc has been modified to adjust the + size of db_symtab automatically. You need to update dbsym in + your $TOOLDIR to build kernels with options SYMTAB_SPACE. If + you don't want this behavior, add AUTO_SYMTAB_SPACE=no to your + mk.conf. + 20120216: Default for MKCATPAGES changed to NO. Update builds will fail unless DESTDIR is cleaned manually. If you built between 20120207
CVS commit: src/tests/usr.bin/sed
Module Name:src Committed By: jruoho Date: Mon Mar 19 06:21:53 UTC 2012 Modified Files: src/tests/usr.bin/sed: t_sed.sh Log Message: Add a case also for (fixed) PR bin/42261. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/sed/t_sed.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/sed/t_sed.sh diff -u src/tests/usr.bin/sed/t_sed.sh:1.2 src/tests/usr.bin/sed/t_sed.sh:1.3 --- src/tests/usr.bin/sed/t_sed.sh:1.2 Sun Mar 18 15:35:27 2012 +++ src/tests/usr.bin/sed/t_sed.sh Mon Mar 19 06:21:53 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_sed.sh,v 1.2 2012/03/18 15:35:27 dholland Exp $ +# $NetBSD: t_sed.sh,v 1.3 2012/03/19 06:21:53 jruoho Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,8 +36,6 @@ emptybackref_head() { emptybackref_body() { - atf_check -o inline:foobar\n -x echo foobar - atf_check -o inline:foo1bar1\n \ -x echo foo1bar1 | sed -ne '/foo\(.*\)bar\1/p' @@ -47,6 +45,21 @@ emptybackref_body() { -x echo foobar | sed -ne '/foo\(.*\)bar\1/p' } +atf_test_case longlines +longlines_head() { + atf_set descr Test that sed(1) handles \ + long lines correctly (PR bin/42261) +} + +longlines_body() { + + str=$(awk 'BEGIN {while(x2043){printf x;x++}}') + echo $str input + + atf_check -o save:output -x echo x | sed s,x,${str},g + atf_check -s exit:0 -o empty -e empty -x diff input output +} + atf_test_case rangeselection rangeselection_head() { atf_set descr Test that sed(1) handles \ @@ -96,5 +109,6 @@ rangeselection_body() { atf_init_test_cases() { atf_add_test_case emptybackref + atf_add_test_case longlines atf_add_test_case rangeselection }
CVS commit: src/doc
Module Name:src Committed By: bsh Date: Mon Mar 19 06:29:38 UTC 2012 Modified Files: src/doc: CHANGES Log Message: add option -p to dbsym(8) To generate a diff of this commit: cvs rdiff -u -r1.1684 -r1.1685 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1684 src/doc/CHANGES:1.1685 --- src/doc/CHANGES:1.1684 Sat Mar 10 16:56:33 2012 +++ src/doc/CHANGES Mon Mar 19 06:29:37 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1684 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1685 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -30,3 +30,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0: pkg_add(1): imported 20120221 version from pkgsrc [wiz 20120221] file(1): upgraded to 5.11 [christos 20120222] evbmips: Add support for Lemote Yeeloong Notebook. [nonaka 20120302] + dbsym(8): Add option -p [bsh 20120319]
CVS commit: src/tests/usr.sbin/mtree
Module Name:src Committed By: jruoho Date: Mon Mar 19 06:39:22 UTC 2012 Modified Files: src/tests/usr.sbin/mtree: t_mtree.sh Log Message: Add a case for PR bin/41061. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/mtree/t_mtree.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/mtree/t_mtree.sh diff -u src/tests/usr.sbin/mtree/t_mtree.sh:1.2 src/tests/usr.sbin/mtree/t_mtree.sh:1.3 --- src/tests/usr.sbin/mtree/t_mtree.sh:1.2 Sun Mar 18 11:50:55 2012 +++ src/tests/usr.sbin/mtree/t_mtree.sh Mon Mar 19 06:39:22 2012 @@ -1,6 +1,6 @@ -# $NetBSD: t_mtree.sh,v 1.2 2012/03/18 11:50:55 jruoho Exp $ +# $NetBSD: t_mtree.sh,v 1.3 2012/03/19 06:39:22 jruoho Exp $ # -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009, 2012 The NetBSD Foundation, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ create_head() { atf_set descr Create a specfile describing a directory tree } + create_setup() { # create some directories @@ -73,6 +74,7 @@ create_setup() # dangling symlink ln -s nonexistent create/top.dangling } + create_body() { create_setup @@ -89,6 +91,7 @@ check_head() { atf_set descr Check a directory tree against a specfile } + check_body() { # we use the same directory tree and specfile as in the create test @@ -105,6 +108,7 @@ convert_C_head() { atf_set descr Convert a specfile to mtree -C format, unsorted } + convert_C_body() { mtree -C -K all $(atf_get_srcdir)/d_convert.in output @@ -116,6 +120,7 @@ convert_C_S_head() { atf_set descr Convert a specfile to mtree -C format, sorted } + convert_C_S_body() { mtree -C -S -K all $(atf_get_srcdir)/d_convert.in output @@ -127,6 +132,7 @@ convert_D_head() { atf_set descr Convert a specfile to mtree -D format, unsorted } + convert_D_body() { mtree -D -K all $(atf_get_srcdir)/d_convert.in output @@ -138,17 +144,42 @@ convert_D_S_head() { atf_set descr Convert a specfile to mtree -D format, sorted } + convert_D_S_body() { mtree -D -S -K all $(atf_get_srcdir)/d_convert.in output h_check $(atf_get_srcdir)/d_convert_D_S.out output } +atf_test_case ignore +ignore_head() +{ + atf_set descr Test that -d ignores symlinks (PR bin/41061) +} + +ignore_body() +{ + mkdir newdir + mtree -c | mtree -Ck uid,gid,mode mtree.spec + ln -s newdir otherdir + + # This yields extra: otherdir even with -d. + # + atf_expect_fail PR bin/41061 + atf_check -s ignore -o empty -e empty -x mtree -d mtree.spec + + # Delete the symlink and re-verify. + # + rm otherdir + atf_check -s ignore -o empty -e empty -x mtree -d mtree.spec +} + atf_test_case merge merge_head() { atf_set descr Merge records of different type } + merge_body() { mtree -C -M -K all $(atf_get_srcdir)/d_merge.in output @@ -159,13 +190,14 @@ merge_body() } atf_test_case nonemptydir -nonemptydir_head() { +nonemptydir_head() +{ atf_set descr Test that new non-empty \ directories are recorded (PR bin/25693) } -nonemptydir_body() { - +nonemptydir_body() +{ mkdir testdir cd testdir @@ -191,6 +223,7 @@ atf_init_test_cases() atf_add_test_case convert_C_S atf_add_test_case convert_D atf_add_test_case convert_D_S + atf_add_test_case ignore atf_add_test_case merge atf_add_test_case nonemptydir }
CVS commit: src
Module Name:src Committed By: jruoho Date: Mon Mar 19 07:05:18 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/usr.bin: Makefile Added Files: src/tests/usr.bin/cmp: Makefile t_cmp.sh Log Message: Add regression tests for PR bin/2642 and PR bin/23836, both fixed long ago. To generate a diff of this commit: cvs rdiff -u -r1.450 -r1.451 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.66 -r1.67 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/cmp/Makefile \ src/tests/usr.bin/cmp/t_cmp.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.450 src/distrib/sets/lists/tests/mi:1.451 --- src/distrib/sets/lists/tests/mi:1.450 Sun Mar 18 15:32:23 2012 +++ src/distrib/sets/lists/tests/mi Mon Mar 19 07:05:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.450 2012/03/18 15:32:23 christos Exp $ +# $NetBSD: mi,v 1.451 2012/03/19 07:05:18 jruoho Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2806,6 +2806,9 @@ ./usr/tests/usr.bin/cctests-usr.bin-tests ./usr/tests/usr.bin/cc/Atffile tests-usr.bin-tests atf ./usr/tests/usr.bin/cc/t_hello tests-usr.bin-tests atf +./usr/tests/usr.bin/cmptests-usr.bin-tests +./usr/tests/usr.bin/cmp/Atffile tests-usr.bin-tests atf +./usr/tests/usr.bin/cmp/t_cmp tests-usr.bin-tests atf ./usr/tests/usr.bin/config tests-usr.bin-tests ./usr/tests/usr.bin/config/Atffile tests-usr.bin-tests atf ./usr/tests/usr.bin/config/Makefile.regress tests-usr.bin-tests atf Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.66 src/etc/mtree/NetBSD.dist.tests:1.67 --- src/etc/mtree/NetBSD.dist.tests:1.66 Sun Mar 18 12:40:43 2012 +++ src/etc/mtree/NetBSD.dist.tests Mon Mar 19 07:05:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.66 2012/03/18 12:40:43 jruoho Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.67 2012/03/19 07:05:18 jruoho Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -264,6 +264,7 @@ ./usr/tests/usr.bin/basename ./usr/tests/usr.bin/bzip2 ./usr/tests/usr.bin/cc +./usr/tests/usr.bin/cmp ./usr/tests/usr.bin/config ./usr/tests/usr.bin/config/support ./usr/tests/usr.bin/config/support/arch Index: src/tests/usr.bin/Makefile diff -u src/tests/usr.bin/Makefile:1.11 src/tests/usr.bin/Makefile:1.12 --- src/tests/usr.bin/Makefile:1.11 Sun Mar 18 12:40:42 2012 +++ src/tests/usr.bin/Makefile Mon Mar 19 07:05:18 2012 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.11 2012/03/18 12:40:42 jruoho Exp $ +# $NetBSD: Makefile,v 1.12 2012/03/19 07:05:18 jruoho Exp $ # .include bsd.own.mk TESTSDIR= ${TESTSBASE}/usr.bin -TESTS_SUBDIRS= awk basename bzip2 cc config cut \ +TESTS_SUBDIRS= awk basename bzip2 cc cmp config cut \ diff dirname find grep gzip id m4 make mkdep \ pr rump_server shmif_dumpbus sdiff sed sort unifdef xlint Added files: Index: src/tests/usr.bin/cmp/Makefile diff -u /dev/null src/tests/usr.bin/cmp/Makefile:1.1 --- /dev/null Mon Mar 19 07:05:19 2012 +++ src/tests/usr.bin/cmp/Makefile Mon Mar 19 07:05:18 2012 @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 2012/03/19 07:05:18 jruoho Exp $ + +.include bsd.own.mk + +TESTSDIR= ${TESTSBASE}/usr.bin/cmp +TESTS_SH= t_cmp + +.include bsd.test.mk Index: src/tests/usr.bin/cmp/t_cmp.sh diff -u /dev/null src/tests/usr.bin/cmp/t_cmp.sh:1.1 --- /dev/null Mon Mar 19 07:05:19 2012 +++ src/tests/usr.bin/cmp/t_cmp.sh Mon Mar 19 07:05:18 2012 @@ -0,0 +1,67 @@ +# $NetBSD: t_cmp.sh,v 1.1 2012/03/19 07:05:18 jruoho Exp $ +# +# Copyright (c) 2012 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Jukka Ruohonen. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
CVS commit: src/external/gpl3/binutils/usr.sbin/dbsym
Module Name:src Committed By: wiz Date: Mon Mar 19 09:13:33 UTC 2012 Modified Files: src/external/gpl3/binutils/usr.sbin/dbsym: dbsym.8 Log Message: New sentence, new line. Sort descriptions. Use simpler markup. Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 diff -u src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8:1.2 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8:1.3 --- src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8:1.2 Mon Mar 19 05:38:26 2012 +++ src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.8 Mon Mar 19 09:13:33 2012 @@ -1,6 +1,6 @@ -.\ $NetBSD: dbsym.8,v 1.2 2012/03/19 05:38:26 bsh Exp $ +.\ $NetBSD: dbsym.8,v 1.3 2012/03/19 09:13:33 wiz Exp $ .\ -.Dd November 9, 2001 +.Dd March 19, 2012 .Dt DBSYM 8 .Os .Sh NAME @@ -17,15 +17,16 @@ is used to copy the symbol table in a ne .Va db_symtab array (in the data section) so that the .Xr ddb 4 -kernel debugger can find the symbols. This program is only used +kernel debugger can find the symbols. +This program is only used on systems for which the boot program does not load the symbol table -into memory with the kernel. The space for these symbols is +into memory with the kernel. +The space for these symbols is reserved in the data segment using a config option like: -.Pp -.Li options SYMTAB_SPACE=72000 -.Pp +.Dl options SYMTAB_SPACE=72000 The size of the db_symtab array (the value of SYMTAB_SPACE) must be -at least as large as the kernel symbol table. If insufficient space +at least as large as the kernel symbol table. +If insufficient space is reserved, dbsym will refuse to copy the symbol table. .Pp To recognize kernel executable format, the @@ -33,13 +34,6 @@ To recognize kernel executable format, t flag specifies BFD name of kernel. .Pp If the -.Fl v -flag is given, -.Nm -will print out status information as -it is copying the symbol table. -.Pp -If the .Fl p flag is given, .Nm @@ -47,6 +41,13 @@ will report the size of the kernel symbo db_symtab space. Two values are printed out in a line separated by a space. .Pp +If the +.Fl v +flag is given, +.Nm +will print out status information as +it is copying the symbol table. +.Pp Note that debugging symbols are not useful to the .Xr ddb 4 kernel debugger, so to minimize the size of the kernel, one should @@ -56,10 +57,9 @@ flag) or use the .Xr strip 1 command to strip debugging symbols from the kernel before .Nm -is used to copy the symbol table. The command -.Pp -.Li strip -d netbsd -.Pp +is used to copy the symbol table. +The command +.Dl strip -d netbsd will strip out debugging symbols. .Sh SEE ALSO .Xr strip 1 ,
CVS commit: src/external/gpl3/binutils/usr.sbin/dbsym
Module Name:src Committed By: wiz Date: Mon Mar 19 09:14:15 UTC 2012 Modified Files: src/external/gpl3/binutils/usr.sbin/dbsym: dbsym.c Log Message: Sync usage with man page. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c diff -u src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c:1.2 src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c:1.3 --- src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c:1.2 Mon Mar 19 05:38:26 2012 +++ src/external/gpl3/binutils/usr.sbin/dbsym/dbsym.c Mon Mar 19 09:14:15 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dbsym.c,v 1.2 2012/03/19 05:38:26 bsh Exp $ */ +/* $NetBSD: dbsym.c,v 1.3 2012/03/19 09:14:15 wiz Exp $ */ /* * Copyright (c) 2001 Simon Burge (for Wasabi Systems) @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1996 Christopher G. Demetriou.\ Copyright 2001 Simon Burge.\ All rights reserved.); -__RCSID($NetBSD: dbsym.c,v 1.2 2012/03/19 05:38:26 bsh Exp $); +__RCSID($NetBSD: dbsym.c,v 1.3 2012/03/19 09:14:15 wiz Exp $); #endif /* not lint */ #include sys/param.h @@ -194,7 +194,7 @@ usage(void) const char **list; fprintf(stderr, - usage: %s [-b bfdname] [-v] kernel_file\n, + usage: %s [-pv] [-b bfdname] kernel\n, getprogname()); fprintf(stderr, supported targets:); for (list = bfd_target_list(); *list != NULL; list++)
CVS commit: src/lib/libc/sys
Module Name:src Committed By: plunky Date: Mon Mar 19 09:34:36 UTC 2012 Modified Files: src/lib/libc/sys: accept.2 Log Message: pselect-paccept for this page To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/accept.2 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/sys/accept.2 diff -u src/lib/libc/sys/accept.2:1.28 src/lib/libc/sys/accept.2:1.29 --- src/lib/libc/sys/accept.2:1.28 Mon Jun 27 08:21:07 2011 +++ src/lib/libc/sys/accept.2 Mon Mar 19 09:34:36 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: accept.2,v 1.28 2011/06/27 08:21:07 wiz Exp $ +.\ $NetBSD: accept.2,v 1.29 2012/03/19 09:34:36 plunky Exp $ .\ .\ Copyright (c) 1983, 1990, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)accept.2 8.2 (Berkeley) 12/11/93 .\ -.Dd June 2, 2011 +.Dd March 19, 2012 .Dt ACCEPT 2 .Os .Sh NAME @@ -228,6 +228,6 @@ The function appeared in .Bx 4.2 . The -.Fn pselect +.Fn paccept function is inspired from Linux and appeared in .Nx 6.0 .
CVS commit: src/bin/mt
Module Name:src Committed By: njoly Date: Mon Mar 19 10:48:20 UTC 2012 Modified Files: src/bin/mt: mt.1 Log Message: Adjust for mandoc output. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/bin/mt/mt.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/mt/mt.1 diff -u src/bin/mt/mt.1:1.35 src/bin/mt/mt.1:1.36 --- src/bin/mt/mt.1:1.35 Thu Apr 28 13:51:47 2011 +++ src/bin/mt/mt.1 Mon Mar 19 10:48:20 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: mt.1,v 1.35 2011/04/28 13:51:47 wiz Exp $ +.\ $NetBSD: mt.1,v 1.36 2012/03/19 10:48:20 njoly Exp $ .\ .\ Copyright (c) 1981, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -233,7 +233,7 @@ various tape media, some of which are li Note that many tape drive vendors also define model-specific codes. .Pp .Bl -column Code Format -compact -.It Em Code Format +.It Em Code Ta Em Format .It Li 0 Ta Device default .It Li 1 Ta 1/2 800 bpi .It Li 2 Ta 1/2 1600 bpi
CVS commit: src
Module Name:src Committed By: njoly Date: Mon Mar 19 11:16:37 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests Log Message: Adjust to unbreak mkdebug build. To generate a diff of this commit: cvs rdiff -u -r1.451 -r1.452 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.67 -r1.68 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.451 src/distrib/sets/lists/tests/mi:1.452 --- src/distrib/sets/lists/tests/mi:1.451 Mon Mar 19 07:05:18 2012 +++ src/distrib/sets/lists/tests/mi Mon Mar 19 11:16:36 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.451 2012/03/19 07:05:18 jruoho Exp $ +# $NetBSD: mi,v 1.452 2012/03/19 11:16:36 njoly Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -179,6 +179,9 @@ ./usr/libdata/debug/usr/tests/atf/units/t_text.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/atf/units/t_user.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/atf/units/t_utils.debug tests-obsolete obsolete +./usr/libdata/debug/usr/tests/bin tests-bin-debug +./usr/libdata/debug/usr/tests/bin/df tests-bin-debug +./usr/libdata/debug/usr/tests/bin/df/h_df.debugtests-bin-debug debug ./usr/libdata/debug/usr/tests/crypto tests-crypto-debug ./usr/libdata/debug/usr/tests/crypto/libcryptotests-crypto-debug ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_bftest.debug tests-crypto-debug debug,crypto @@ -786,8 +789,10 @@ ./usr/libdata/debug/usr/tests/syscall/t_truncate.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/syscall/t_umask.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/syscall/t_unlink.debug tests-obsolete obsolete -./usr/libdata/debug/usr/tests/usr.bin tests-sbin-tests -./usr/libdata/debug/usr/tests/usr.sbin tests-sbin-tests +./usr/libdata/debug/usr/tests/usr.bin tests-usr.bin-debug +./usr/libdata/debug/usr/tests/usr.bin/idtests-usr.bin-debug +./usr/libdata/debug/usr/tests/usr.bin/id/h_id.debug tests-usr.bin-debug debug +./usr/libdata/debug/usr/tests/usr.sbin tests-usr.sbin-debug ./usr/libdata/debug/usr/tests/util tests-obsolete obsolete ./usr/libdata/debug/usr/tests/util/df tests-obsolete obsolete ./usr/libdata/debug/usr/tests/util/df/h_df.debug tests-obsolete obsolete Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.67 src/etc/mtree/NetBSD.dist.tests:1.68 --- src/etc/mtree/NetBSD.dist.tests:1.67 Mon Mar 19 07:05:18 2012 +++ src/etc/mtree/NetBSD.dist.tests Mon Mar 19 11:16:37 2012 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.67 2012/03/19 07:05:18 jruoho Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.68 2012/03/19 11:16:37 njoly Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -10,6 +10,8 @@ ./usr/libdata/debug/usr/tests/atf/atf-run ./usr/libdata/debug/usr/tests/atf/formats ./usr/libdata/debug/usr/tests/atf/test-programs +./usr/libdata/debug/usr/tests/bin +./usr/libdata/debug/usr/tests/bin/df ./usr/libdata/debug/usr/tests/crypto ./usr/libdata/debug/usr/tests/crypto/libcrypto ./usr/libdata/debug/usr/tests/dev @@ -113,6 +115,7 @@ ./usr/libdata/debug/usr/tests/sbin ./usr/libdata/debug/usr/tests/sbin/resize_ffs ./usr/libdata/debug/usr/tests/usr.bin +./usr/libdata/debug/usr/tests/usr.bin/id ./usr/libdata/debug/usr/tests/usr.sbin ./usr/tests ./usr/tests/atf
CVS commit: src/tests/usr.bin/find
Module Name:src Committed By: jruoho Date: Mon Mar 19 12:58:41 UTC 2012 Modified Files: src/tests/usr.bin/find: t_find.sh Log Message: Remove check. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/find/t_find.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/find/t_find.sh diff -u src/tests/usr.bin/find/t_find.sh:1.5 src/tests/usr.bin/find/t_find.sh:1.6 --- src/tests/usr.bin/find/t_find.sh:1.5 Sun Mar 18 19:21:53 2012 +++ src/tests/usr.bin/find/t_find.sh Mon Mar 19 12:58:41 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_find.sh,v 1.5 2012/03/18 19:21:53 jruoho Exp $ +# $NetBSD: t_find.sh,v 1.6 2012/03/19 12:58:41 jruoho Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -40,15 +40,10 @@ emptyperm_body() { # The case assumes that at least some directories # in /var are unavailable for the user '_tests'. # + # TODO: Parse the output.file for actual verification. + # atf_check -s exit:1 -o save:output.file \ -e not-empty -x find /var -empty -type d - - # The case assumes that $dir is drwxrwx---. - # - dir=/var/quotas - - atf_check -s exit:1 -e inline:find: $dir: Permission denied\n \ - -x find $dir -empty -type d } atf_test_case exit
CVS commit: src/tests/usr.bin/awk
Module Name:src Committed By: jruoho Date: Mon Mar 19 13:07:23 UTC 2012 Modified Files: src/tests/usr.bin/awk: d_period.out Log Message: As noted by christos@ in rev. 1.4 to t_awk.sh, the period test has been broken all along. Fix expected output (tested on Linux, GNU awk 1.3.3). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/awk/d_period.out Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/awk/d_period.out diff -u src/tests/usr.bin/awk/d_period.out:1.2 src/tests/usr.bin/awk/d_period.out:1.3 --- src/tests/usr.bin/awk/d_period.out:1.2 Sat Mar 17 23:22:59 2012 +++ src/tests/usr.bin/awk/d_period.out Mon Mar 19 13:07:23 2012 @@ -1 +1 @@ -0.875 +0.625
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Mon Mar 19 16:20:58 UTC 2012 Modified Files: src/lib/libc/gen: nlist_ecoff.c Log Message: don't do arithmetic on void pointer. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/gen/nlist_ecoff.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/nlist_ecoff.c diff -u src/lib/libc/gen/nlist_ecoff.c:1.19 src/lib/libc/gen/nlist_ecoff.c:1.20 --- src/lib/libc/gen/nlist_ecoff.c:1.19 Sun Mar 18 10:34:28 2012 +++ src/lib/libc/gen/nlist_ecoff.c Mon Mar 19 12:20:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nlist_ecoff.c,v 1.19 2012/03/18 14:34:28 christos Exp $ */ +/* $NetBSD: nlist_ecoff.c,v 1.20 2012/03/19 16:20:58 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: nlist_ecoff.c,v 1.19 2012/03/18 14:34:28 christos Exp $); +__RCSID($NetBSD: nlist_ecoff.c,v 1.20 2012/03/19 16:20:58 christos Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -157,8 +157,8 @@ __fdnlist_ecoff(fd, list) if (*nlistname == '_') nlistname++; - symtabname = - mappedfile[extstroff + esyms[i].es_strindex]; + symtabname = (void *)((char *) + mappedfile + (extstroff + esyms[i].es_strindex)); if (!strcmp(symtabname, nlistname)) { /*
CVS commit: [netbsd-5] src/libexec/ld.elf_so/arch/mips
Module Name:src Committed By: bouyer Date: Mon Mar 19 18:46:00 UTC 2012 Modified Files: src/libexec/ld.elf_so/arch/mips [netbsd-5]: mips_reloc.c Log Message: Apply patch, requested by skrll in ticket #1724 libexec/ld.elf_so/arch/mips/mips_reloc.cpatch fix gcc uninitialized warning To generate a diff of this commit: cvs rdiff -u -r1.53.4.1 -r1.53.4.2 \ src/libexec/ld.elf_so/arch/mips/mips_reloc.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.elf_so/arch/mips/mips_reloc.c diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53.4.1 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53.4.2 --- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53.4.1 Sat Mar 17 18:28:26 2012 +++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c Mon Mar 19 18:46:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_reloc.c,v 1.53.4.1 2012/03/17 18:28:26 bouyer Exp $ */ +/* $NetBSD: mips_reloc.c,v 1.53.4.2 2012/03/19 18:46:00 bouyer Exp $ */ /* * Copyright 1997 Michael L. Hitch mhi...@montana.edu @@ -30,7 +30,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: mips_reloc.c,v 1.53.4.1 2012/03/17 18:28:26 bouyer Exp $); +__RCSID($NetBSD: mips_reloc.c,v 1.53.4.2 2012/03/19 18:46:00 bouyer Exp $); #endif /* not lint */ #include sys/types.h @@ -358,7 +358,7 @@ _rtld_bind(Elf_Word a0, Elf_Addr a1, Elf { Elf_Addr *got = (Elf_Addr *)(a2 - 0x7ff0); const Obj_Entry *obj = (Obj_Entry *)(got[1] 0x7fff); - Elf_Addr new_value; + Elf_Addr new_value = 0; /* XXX gcc */ int err; err = _rtld_relocate_plt_object(obj, a0, new_value);
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Mon Mar 19 18:46:36 UTC 2012 Modified Files: src/doc [netbsd-5]: CHANGES-5.2 Log Message: Adjust entry for 1724 To generate a diff of this commit: cvs rdiff -u -r1.1.2.151 -r1.1.2.152 src/doc/CHANGES-5.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.2 diff -u src/doc/CHANGES-5.2:1.1.2.151 src/doc/CHANGES-5.2:1.1.2.152 --- src/doc/CHANGES-5.2:1.1.2.151 Sun Mar 18 14:14:24 2012 +++ src/doc/CHANGES-5.2 Mon Mar 19 18:46:36 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2,v 1.1.2.151 2012/03/18 14:14:24 bouyer Exp $ +# $NetBSD: CHANGES-5.2,v 1.1.2.152 2012/03/19 18:46:36 bouyer Exp $ A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2 release: @@ -6119,6 +6119,7 @@ share/man/man3/dl_iterate_phdr.3 1.1 vi sys/sys/exec_elf.h1.106 via patch usr.bin/ldd/ldd.c1.15 via patch libexec/ld.elf_so/headers.c 1.37 via patch +libexec/ld.elf_so/arch/mips/mips_reloc.c patch PR/39240: Satoshi Suetake: Don't fail when attempting to resolve weak symbols when we are doing immediate binding, leave them alone
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: matt Date: Mon Mar 19 22:23:11 UTC 2012 Modified Files: src/lib/libc/arch/mips/gen: fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c fpsetsticky.c Log Message: Convert to C89 definitions. Cleanup up type usage. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/fpgetmask.c \ src/lib/libc/arch/mips/gen/fpgetround.c \ src/lib/libc/arch/mips/gen/fpgetsticky.c \ src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetround.c \ src/lib/libc/arch/mips/gen/fpsetsticky.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/arch/mips/gen/fpgetmask.c diff -u src/lib/libc/arch/mips/gen/fpgetmask.c:1.5 src/lib/libc/arch/mips/gen/fpgetmask.c:1.6 --- src/lib/libc/arch/mips/gen/fpgetmask.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpgetmask.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: fpgetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $); +__RCSID($NetBSD: fpgetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -19,9 +19,9 @@ __weak_alias(fpgetmask,_fpgetmask) #endif fp_except -fpgetmask() +fpgetmask(void) { - int x; + fp_except x; __asm(cfc1 %0,$31 : =r (x)); return (x 7) 0x1f; Index: src/lib/libc/arch/mips/gen/fpgetround.c diff -u src/lib/libc/arch/mips/gen/fpgetround.c:1.5 src/lib/libc/arch/mips/gen/fpgetround.c:1.6 --- src/lib/libc/arch/mips/gen/fpgetround.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpgetround.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: fpgetround.c,v 1.5 2005/12/24 23:10:08 perry Exp $); +__RCSID($NetBSD: fpgetround.c,v 1.6 2012/03/19 22:23:10 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -19,9 +19,9 @@ __weak_alias(fpgetround,_fpgetround) #endif fp_rnd -fpgetround() +fpgetround(void) { - int x; + fp_rnd x; __asm(cfc1 %0,$31 : =r (x)); return x 0x03; Index: src/lib/libc/arch/mips/gen/fpgetsticky.c diff -u src/lib/libc/arch/mips/gen/fpgetsticky.c:1.5 src/lib/libc/arch/mips/gen/fpgetsticky.c:1.6 --- src/lib/libc/arch/mips/gen/fpgetsticky.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpgetsticky.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: fpgetsticky.c,v 1.5 2005/12/24 23:10:08 perry Exp $); +__RCSID($NetBSD: fpgetsticky.c,v 1.6 2012/03/19 22:23:10 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -19,9 +19,9 @@ __weak_alias(fpgetsticky,_fpgetsticky) #endif fp_except -fpgetsticky() +fpgetsticky(void) { - int x; + fp_except x; __asm(cfc1 %0,$31 : =r (x)); return (x 2) 0x1f; Index: src/lib/libc/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.5 src/lib/libc/arch/mips/gen/fpsetmask.c:1.6 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: fpsetmask.c,v 1.5 2005/12/24 23:10:08 perry Exp $); +__RCSID($NetBSD: fpsetmask.c,v 1.6 2012/03/19 22:23:10 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -19,16 +19,14 @@ __weak_alias(fpsetmask,_fpsetmask) #endif fp_except -fpsetmask(mask) - fp_except mask; +fpsetmask(fp_except mask) { fp_except old; fp_except new; __asm(cfc1 %0,$31 : =r (old)); - new = old; - new = ~(0x1f 7); + new = old ~(0x1f 7); new |= ((mask 0x1f) 7); __asm(ctc1 %0,$31 : : r (new)); Index: src/lib/libc/arch/mips/gen/fpsetround.c diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.5 src/lib/libc/arch/mips/gen/fpsetround.c:1.6 --- src/lib/libc/arch/mips/gen/fpsetround.c:1.5 Sat Dec 24 23:10:08 2005 +++ src/lib/libc/arch/mips/gen/fpsetround.c Mon Mar 19 22:23:10 2012 @@ -1,4 +1,4
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Mon Mar 19 22:24:07 UTC 2012 Modified Files: src/sys/arch/mips/include: ieeefp.h Log Message: Use unsigned int instead of int fo the fp* typedefs. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/include/ieeefp.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/mips/include/ieeefp.h diff -u src/sys/arch/mips/include/ieeefp.h:1.6 src/sys/arch/mips/include/ieeefp.h:1.7 --- src/sys/arch/mips/include/ieeefp.h:1.6 Thu Jan 27 13:42:09 2011 +++ src/sys/arch/mips/include/ieeefp.h Mon Mar 19 22:24:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.6 2011/01/27 13:42:09 tsutsui Exp $ */ +/* $NetBSD: ieeefp.h,v 1.7 2012/03/19 22:24:07 matt Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -12,8 +12,8 @@ #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) -typedef int fenv_t; -typedef int fexcept_t; +typedef unsigned int fenv_t; +typedef unsigned int fexcept_t; #define FE_INEXACT 0x01 /* imprecise (loss of precision) */ #define FE_UNDERFLOW 0x02 /* underflow exception */ @@ -30,7 +30,7 @@ typedef int fexcept_t; #if !defined(_ISOC99_SOURCE) -typedef int fp_except; +typedef unsigned int fp_except; #define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ #define FP_X_UFL FE_UNDERFLOW /* underflow exception */ #define FP_X_OFL FE_OVERFLOW /* overflow exception */
CVS commit: src/lib/libc
Module Name:src Committed By: matt Date: Mon Mar 19 22:32:16 UTC 2012 Modified Files: src/lib/libc: Makefile.inc Log Message: Move -D_DIAGNOSTIC to a separate line (makes it easier to comment out). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/Makefile.inc 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/Makefile.inc diff -u src/lib/libc/Makefile.inc:1.12 src/lib/libc/Makefile.inc:1.13 --- src/lib/libc/Makefile.inc:1.12 Sat Mar 17 18:00:50 2012 +++ src/lib/libc/Makefile.inc Mon Mar 19 22:32:16 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.12 2012/03/17 18:00:50 christos Exp $ +# $NetBSD: Makefile.inc,v 1.13 2012/03/19 22:32:16 matt Exp $ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # # All library objects contain sccsid strings by default; they may be @@ -24,7 +24,8 @@ USE_SHLIBDIR= yes .include bsd.own.mk WARNS=4 -CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -D_DIAGNOSTIC +CPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT +CPPFLAGS+= -D_DIAGNOSTIC .if (${USE_HESIOD} != no) CPPFLAGS+= -DHESIOD
CVS commit: [netbsd-6] src/sys/dev
Module Name:src Committed By: riz Date: Mon Mar 19 23:14:00 UTC 2012 Modified Files: src/sys/dev/ic [netbsd-6]: ncr53c9x.c ninjascsi32.c src/sys/dev/scsipi [netbsd-6]: scsiconf.c src/sys/dev/usb [netbsd-6]: uhub.c Log Message: Pull up following revision(s) (requested by mrg in ticket #125): sys/dev/scsipi/scsiconf.c: revision 1.263 sys/dev/scsipi/scsiconf.c: revision 1.264 sys/dev/ic/ncr53c9x.c: revision 1.144 sys/dev/ic/ninjascsi32.c: revision 1.22 sys/dev/usb/uhub.c: revision 1.117 take the kernel lock in functions called from attach*(). scsidevdetached ioctl path enters scsipi code without kernel lock and this upsets the newer kasserts. take kernel lock here. take the kernel lock a few more places when doing detach, to avoid triggering KERNEL_LOCK_P() asserts in both scsi and usb code. with this and other recent fixes i can now drvctl -d ehci0. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.143.8.1 src/sys/dev/ic/ncr53c9x.c cvs rdiff -u -r1.21 -r1.21.14.1 src/sys/dev/ic/ninjascsi32.c cvs rdiff -u -r1.262 -r1.262.10.1 src/sys/dev/scsipi/scsiconf.c cvs rdiff -u -r1.114 -r1.114.10.1 src/sys/dev/usb/uhub.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/ncr53c9x.c diff -u src/sys/dev/ic/ncr53c9x.c:1.143 src/sys/dev/ic/ncr53c9x.c:1.143.8.1 --- src/sys/dev/ic/ncr53c9x.c:1.143 Sun Jul 31 18:39:00 2011 +++ src/sys/dev/ic/ncr53c9x.c Mon Mar 19 23:13:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.143.8.1 2012/03/19 23:13:59 riz Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: ncr53c9x.c,v 1.143.8.1 2012/03/19 23:13:59 riz Exp $); #include sys/param.h #include sys/systm.h @@ -530,6 +530,9 @@ ncr53c9x_init(struct ncr53c9x_softc *sc, sc-sc_msgpriq = sc-sc_msgout = sc-sc_msgoutq = 0; sc-sc_phase = sc-sc_prevphase = INVALID_PHASE; + /* XXXSMP scsipi */ + KERNEL_LOCK(1, curlwp); + for (r = 0; r sc-sc_ntarg; r++) { struct ncr53c9x_tinfo *ti = sc-sc_tinfo[r]; /* XXX - config flags per target: low bits: no reselect; high bits: no synch */ @@ -559,6 +562,9 @@ ncr53c9x_init(struct ncr53c9x_softc *sc, /* Notify upper layer */ scsipi_async_event(sc-sc_channel, ASYNC_EVENT_RESET, NULL); + + /* XXXSMP scsipi */ + KERNEL_UNLOCK_ONE(curlwp); } /* Index: src/sys/dev/ic/ninjascsi32.c diff -u src/sys/dev/ic/ninjascsi32.c:1.21 src/sys/dev/ic/ninjascsi32.c:1.21.14.1 --- src/sys/dev/ic/ninjascsi32.c:1.21 Sat Nov 13 13:52:01 2010 +++ src/sys/dev/ic/ninjascsi32.c Mon Mar 19 23:13:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ninjascsi32.c,v 1.21 2010/11/13 13:52:01 uebayasi Exp $ */ +/* $NetBSD: ninjascsi32.c,v 1.21.14.1 2012/03/19 23:13:59 riz Exp $ */ /*- * Copyright (c) 2004, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ninjascsi32.c,v 1.21 2010/11/13 13:52:01 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: ninjascsi32.c,v 1.21.14.1 2012/03/19 23:13:59 riz Exp $); #include sys/param.h #include sys/systm.h @@ -1399,9 +1399,13 @@ njsc32_reset_bus(struct njsc32_softc *sc /* initialize target structure */ njsc32_init_targets(sc); + /* XXXSMP scsipi */ + KERNEL_LOCK(1, curlwp); s = splbio(); scsipi_async_event(sc-sc_channel, ASYNC_EVENT_RESET, NULL); splx(s); + /* XXXSMP scsipi */ + KERNEL_UNLOCK_ONE(curlwp); /* release SCSI bus reset */ njsc32_write_1(sc, NJSC32_REG_SCSI_BUS_CONTROL, 0); Index: src/sys/dev/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.262 src/sys/dev/scsipi/scsiconf.c:1.262.10.1 --- src/sys/dev/scsipi/scsiconf.c:1.262 Tue Apr 26 07:41:18 2011 +++ src/sys/dev/scsipi/scsiconf.c Mon Mar 19 23:13:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.262 2011/04/26 07:41:18 hannken Exp $ */ +/* $NetBSD: scsiconf.c,v 1.262.10.1 2012/03/19 23:13:59 riz Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: scsiconf.c,v 1.262 2011/04/26 07:41:18 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: scsiconf.c,v 1.262.10.1 2012/03/19 23:13:59 riz Exp $); #include sys/param.h #include sys/systm.h @@ -256,11 +256,18 @@ scsibusdetach(device_t self, int flags) struct scsipi_xfer *xs; int error; + /* XXXSMP scsipi */ + KERNEL_LOCK(1, curlwp); + /* * Detach all of the periphs. */ - if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) + if ((error = scsipi_target_detach(chan, -1, -1, flags)) != 0) { + /* XXXSMP scsipi */ + KERNEL_UNLOCK_ONE(curlwp); + return error; + } pmf_device_deregister(self); @@ -290,6 +297,10 @@ scsibusdetach(device_t
CVS commit: [netbsd-6] src/sys/arch/sparc/sparc
Module Name:src Committed By: riz Date: Mon Mar 19 23:21:23 UTC 2012 Modified Files: src/sys/arch/sparc/sparc [netbsd-6]: cpu.c Log Message: Pull up following revision(s) (requested by mrg in ticket #127): sys/arch/sparc/sparc/cpu.c: revision 1.235 move IPI debugging all inside DEBUG, but disable it by default. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.234.8.1 src/sys/arch/sparc/sparc/cpu.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/sparc/cpu.c diff -u src/sys/arch/sparc/sparc/cpu.c:1.234 src/sys/arch/sparc/sparc/cpu.c:1.234.8.1 --- src/sys/arch/sparc/sparc/cpu.c:1.234 Mon Aug 15 02:19:44 2011 +++ src/sys/arch/sparc/sparc/cpu.c Mon Mar 19 23:21:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.234 2011/08/15 02:19:44 mrg Exp $ */ +/* $NetBSD: cpu.c,v 1.234.8.1 2012/03/19 23:21:23 riz Exp $ */ /* * Copyright (c) 1996 @@ -52,7 +52,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.234 2011/08/15 02:19:44 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.234.8.1 2012/03/19 23:21:23 riz Exp $); #include opt_multiprocessor.h #include opt_lockdebug.h @@ -92,6 +92,15 @@ __KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.23 #include sparc/sparc/cpuunitvar.h #endif +#ifdef DEBUG +#ifndef DEBUG_XCALL +#define DEBUG_XCALL 0 +#endif +int debug_xcall = DEBUG_XCALL; +#else +#define debug_xcall 0 +#endif + struct cpu_softc { device_t sc_dev; struct cpu_info *sc_cpuinfo; @@ -671,14 +680,20 @@ xcall(xcall_func_t func, xcall_trap_t tr if (cold || pil = IPL_SCHED) mutex_spin_enter(xpmsg_mutex); else { -#ifdef DEBUG - u_int pc; + /* + * Warn about xcall at high IPL. + * + * XXX This is probably bogus (logging at high IPL), + * XXX so we don't do it by default. + */ + if (debug_xcall (void *)func != sparc_noop) { + u_int pc; + + __asm(mov %%i7, %0 : =r (pc) : ); + printf_nolog(%d: xcall %p at lvl %u from 0x%x\n, + cpu_number(), func, pil, pc); + } - /* warn about xcall at high IPL */ - __asm(mov %%i7, %0 : =r (pc) : ); - printf_nolog(%d: xcall at lvl %u from 0x%x\n, - cpu_number(), pil, pc); -#endif while (mutex_tryenter(xpmsg_mutex) == 0) { cpuinfo.ci_xpmsg_mutex_fail.ev_count++; if (cpuinfo.msg.tag) { @@ -724,12 +739,13 @@ xcall(xcall_func_t func, xcall_trap_t tr * this in the process). */ done = is_noop; - i = 10; /* time-out, not too long, but still an _AGE_ */ + i = 100; /* time-out, not too long, but still an _AGE_ */ while (!done) { if (--i 0) { wrsz = snprintf(bufp, bufsz, - xcall(cpu%d,%p): couldn't ping cpus:, - cpu_number(), func); + xcall(cpu%d,%p) from %p: couldn't ping cpus:, + cpu_number(), fasttrap ? trap : func, + __builtin_return_address(0)); bufsz -= wrsz; bufp += wrsz; } @@ -755,33 +771,30 @@ xcall(xcall_func_t func, xcall_trap_t tr } } } - if (i 0) - printf_nolog(%s\n, errbuf); - mutex_spin_exit(xpmsg_mutex); -#if 0 - if (!timeout) + if (i = 0 || debug_xcall == 0) { + if (i 0) + printf_nolog(%s\n, errbuf); + mutex_spin_exit(xpmsg_mutex); return; + } /* - * Let's make this a hard panic for now, and figure out why it happens. + * Let's make this a hard panic for now, and figure out why it + * happens. * - * We call mp_pause_cpus() so we can capture their state *now* as opposed - * to after we've written all the below to the console. + * We call mp_pause_cpus() so we can capture their state *now* + * as opposed to after we've written all the below to the console. */ #ifdef DDB mp_pause_cpus_ddb(); #else mp_pause_cpus(); #endif - printf_nolog(xcall(cpu%d,%p) from %p: couldn't ping cpus:, - cpu_number(), fasttrap ? trap : func, __builtin_return_address(0)); - for (CPU_INFO_FOREACH(n, cpi)) - if ((failed_cpuset (1 n)) == 0) - printf_nolog( cpu%d, cpi-ci_cpuid); - printf_nolog(%s\n, i == 1000 ? [hard 10M timeout] : ); + printf_nolog(%s\n, errbuf); + mutex_spin_exit(xpmsg_mutex); + panic(failed to ping cpus); -#endif } /*
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: riz Date: Mon Mar 19 23:23:11 UTC 2012 Modified Files: src/sys/kern [netbsd-6]: tty.c Log Message: Pull up following revision(s) (requested by dholland in ticket #128): sys/kern/tty.c: revision 1.250 PR/41673: Stathis Kamperis: tcsetpgrp returns EINVAL, but should return EPERM. To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.249.8.1 src/sys/kern/tty.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/tty.c diff -u src/sys/kern/tty.c:1.249 src/sys/kern/tty.c:1.249.8.1 --- src/sys/kern/tty.c:1.249 Fri Oct 21 02:08:09 2011 +++ src/sys/kern/tty.c Mon Mar 19 23:23:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.249 2011/10/21 02:08:09 christos Exp $ */ +/* $NetBSD: tty.c,v 1.249.8.1 2012/03/19 23:23:10 riz Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tty.c,v 1.249 2011/10/21 02:08:09 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tty.c,v 1.249.8.1 2012/03/19 23:23:10 riz Exp $); #include sys/param.h #include sys/systm.h @@ -1271,7 +1271,7 @@ ttioctl(struct tty *tp, u_long cmd, void mutex_exit(proc_lock); break; case FIOSETOWN: { /* set pgrp of tty */ - pid_t pgid = *(int *)data; + pid_t pgid = *(pid_t *)data; struct pgrp *pgrp; mutex_enter(proc_lock); @@ -1308,18 +1308,18 @@ ttioctl(struct tty *tp, u_long cmd, void } case TIOCSPGRP: { /* set pgrp of tty */ struct pgrp *pgrp; + pid_t pgid = *(pid_t *)data; + + if (pgid == NO_PGID) + return EINVAL; mutex_enter(proc_lock); if (!isctty(p, tp)) { mutex_exit(proc_lock); return (ENOTTY); } - pgrp = pgrp_find(*(pid_t *)data); - if (pgrp == NULL) { - mutex_exit(proc_lock); - return (EINVAL); - } - if (pgrp-pg_session != p-p_session) { + pgrp = pgrp_find(pgid); + if (pgrp == NULL || pgrp-pg_session != p-p_session) { mutex_exit(proc_lock); return (EPERM); }
CVS commit: [netbsd-6] src/lib/libc/gen
Module Name:src Committed By: riz Date: Mon Mar 19 23:24:58 UTC 2012 Modified Files: src/lib/libc/gen [netbsd-6]: humanize_number.c Log Message: Pull up following revision(s) (requested by dholland in ticket #129): lib/libc/gen/humanize_number.c: revision 1.16 PR/44097: Yamamoto Takashi: Prevent overflow. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.14.24.1 src/lib/libc/gen/humanize_number.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/humanize_number.c diff -u src/lib/libc/gen/humanize_number.c:1.14 src/lib/libc/gen/humanize_number.c:1.14.24.1 --- src/lib/libc/gen/humanize_number.c:1.14 Mon Apr 28 20:22:59 2008 +++ src/lib/libc/gen/humanize_number.c Mon Mar 19 23:24:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: humanize_number.c,v 1.14 2008/04/28 20:22:59 martin Exp $ */ +/* $NetBSD: humanize_number.c,v 1.14.24.1 2012/03/19 23:24:58 riz Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: humanize_number.c,v 1.14 2008/04/28 20:22:59 martin Exp $); +__RCSID($NetBSD: humanize_number.c,v 1.14.24.1 2012/03/19 23:24:58 riz Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -49,7 +49,7 @@ humanize_number(char *buf, size_t len, i { const char *prefixes, *sep; int b, i, r, maxscale, s1, s2, sign; - int64_t divisor, max; + int64_t divisor, max, post = 1; size_t baselen; _DIAGASSERT(buf != NULL); @@ -89,12 +89,23 @@ humanize_number(char *buf, size_t len, i buf[0] = '\0'; if (bytes 0) { sign = -1; - bytes *= -100; baselen = 3; /* sign, digit, prefix */ + if (-bytes INT64_MAX / 100) + bytes *= -100; + else { + bytes = -bytes; + post = 100; + baselen += 2; + } } else { sign = 1; - bytes *= 100; baselen = 2; /* digit, prefix */ + if (bytes INT64_MAX / 100) + bytes *= 100; + else { + post = 100; + baselen += 2; + } } if (flags HN_NOSPACE) sep = ; @@ -126,6 +137,7 @@ humanize_number(char *buf, size_t len, i } else for (i = 0; i scale i maxscale; i++) bytes /= divisor; + bytes *= post; /* If a value = 9.9 after rounding and ... */ if (bytes 995 i 0 flags HN_DECIMAL) {
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Mon Mar 19 23:25:45 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: Tickets 125, 127-129. To generate a diff of this commit: cvs rdiff -u -r1.1.2.56 -r1.1.2.57 src/doc/CHANGES-6.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-6.0 diff -u src/doc/CHANGES-6.0:1.1.2.56 src/doc/CHANGES-6.0:1.1.2.57 --- src/doc/CHANGES-6.0:1.1.2.56 Sat Mar 17 19:52:08 2012 +++ src/doc/CHANGES-6.0 Mon Mar 19 23:25:45 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0,v 1.1.2.56 2012/03/17 19:52:08 bouyer Exp $ +# $NetBSD: CHANGES-6.0,v 1.1.2.57 2012/03/19 23:25:45 riz Exp $ A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 until the 6.0 release: @@ -1391,3 +1391,28 @@ sys/netinet/tcp_usrreq.c 1.163 PR/46077: M. Nunberg: Stat should not fial on connecting socket. [jruoho, ticket #124] +sys/dev/ic/ncr53c9x.c1.144 +sys/dev/ic/ninjascsi32.c 1.22 +sys/dev/scsipi/scsiconf.c 1.263-1.264 +sys/dev/usb/uhub.c1.117 + + Fix detaching ehci(4) with drvctl -d and some reboot issues. + [mrg, ticket #125] + +sys/arch/sparc/sparc/cpu.c 1.235 + + Avoid some spurious console messages, which can lead to weird + failures. + [mrg, ticket #127] + +sys/kern/tty.c 1.250 + + PR/41673: Stathis Kamperis: tcsetpgrp returns EINVAL, + but should return EPERM. + [dholland, ticket #128] + +lib/libc/gen/humanize_number.c 1.16 via patch + + PR/44097: Yamamoto Takashi: Prevent overflow. + [dholland, ticket #129] +
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Mar 20 00:03:12 UTC 2012 Modified Files: src/lib/libc/gen: nlist_ecoff.c Log Message: - sprinkle CONSTCOND - back to char * to simplify code, requested by gimpy To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/nlist_ecoff.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/nlist_ecoff.c diff -u src/lib/libc/gen/nlist_ecoff.c:1.20 src/lib/libc/gen/nlist_ecoff.c:1.21 --- src/lib/libc/gen/nlist_ecoff.c:1.20 Mon Mar 19 12:20:58 2012 +++ src/lib/libc/gen/nlist_ecoff.c Mon Mar 19 20:03:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nlist_ecoff.c,v 1.20 2012/03/19 16:20:58 christos Exp $ */ +/* $NetBSD: nlist_ecoff.c,v 1.21 2012/03/20 00:03:12 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: nlist_ecoff.c,v 1.20 2012/03/19 16:20:58 christos Exp $); +__RCSID($NetBSD: nlist_ecoff.c,v 1.21 2012/03/20 00:03:12 christos Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -58,19 +58,18 @@ __RCSID($NetBSD: nlist_ecoff.c,v 1.20 2 #endif #ifdef NLIST_ECOFF -#define check(off, size) ((off 0) || (off + size mappedsize)) +#define check(off, size) \ + (/*CONSTCOND*/(off 0) || (off + size mappedsize)) int -__fdnlist_ecoff(fd, list) - int fd; - struct nlist *list; +__fdnlist_ecoff(int fd, struct nlist *list) { struct nlist *p; struct ecoff_exechdr *exechdrp; struct ecoff_symhdr *symhdrp; struct ecoff_extsym *esyms; struct stat st; - void *mappedfile; + char *mappedfile; size_t mappedsize; u_long symhdroff, extstroff; u_int symhdrsize; @@ -122,12 +121,12 @@ __fdnlist_ecoff(fd, list) if ((symhdroff + sizeof *symhdrp) mappedsize || sizeof *symhdrp != symhdrsize) goto unmap; - symhdrp = (void *)((char *)mappedfile + symhdroff); + symhdrp = (void *)mappedfile[symhdroff]; nesyms = symhdrp-esymMax; if (check(symhdrp-cbExtOffset, nesyms * sizeof *esyms)) goto unmap; - esyms = (void *)((char *)mappedfile + symhdrp-cbExtOffset); + esyms = (void *)mappedfile[symhdrp-cbExtOffset]; extstroff = symhdrp-cbSsExtOffset; /* @@ -157,8 +156,8 @@ __fdnlist_ecoff(fd, list) if (*nlistname == '_') nlistname++; - symtabname = (void *)((char *) - mappedfile + (extstroff + esyms[i].es_strindex)); + symtabname = (void *)mappedfile[extstroff + + esyms[i].es_strindex]; if (!strcmp(symtabname, nlistname)) { /*
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Tue Mar 20 00:16:35 UTC 2012 Modified Files: src/lib/libc/gen: nlist_ecoff.c Log Message: cast to size_t To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/gen/nlist_ecoff.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/nlist_ecoff.c diff -u src/lib/libc/gen/nlist_ecoff.c:1.21 src/lib/libc/gen/nlist_ecoff.c:1.22 --- src/lib/libc/gen/nlist_ecoff.c:1.21 Mon Mar 19 20:03:12 2012 +++ src/lib/libc/gen/nlist_ecoff.c Mon Mar 19 20:16:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nlist_ecoff.c,v 1.21 2012/03/20 00:03:12 christos Exp $ */ +/* $NetBSD: nlist_ecoff.c,v 1.22 2012/03/20 00:16:35 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: nlist_ecoff.c,v 1.21 2012/03/20 00:03:12 christos Exp $); +__RCSID($NetBSD: nlist_ecoff.c,v 1.22 2012/03/20 00:16:35 christos Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -59,7 +59,7 @@ __RCSID($NetBSD: nlist_ecoff.c,v 1.21 2 #ifdef NLIST_ECOFF #define check(off, size) \ - (/*CONSTCOND*/(off 0) || (off + size mappedsize)) + (/*CONSTCOND*/(off 0) || ((size_t)(off + size) mappedsize)) int __fdnlist_ecoff(int fd, struct nlist *list)
CVS commit: src/lib/libc/gen
Module Name:src Committed By: matt Date: Tue Mar 20 00:31:24 UTC 2012 Modified Files: src/lib/libc/gen: nlist_ecoff.c Log Message: Simplify a bit and constify as well. Since the file is mapped read-only, use const references to access its data. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/gen/nlist_ecoff.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/nlist_ecoff.c diff -u src/lib/libc/gen/nlist_ecoff.c:1.22 src/lib/libc/gen/nlist_ecoff.c:1.23 --- src/lib/libc/gen/nlist_ecoff.c:1.22 Tue Mar 20 00:16:35 2012 +++ src/lib/libc/gen/nlist_ecoff.c Tue Mar 20 00:31:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nlist_ecoff.c,v 1.22 2012/03/20 00:16:35 christos Exp $ */ +/* $NetBSD: nlist_ecoff.c,v 1.23 2012/03/20 00:31:24 matt Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -36,7 +36,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: nlist_ecoff.c,v 1.22 2012/03/20 00:16:35 christos Exp $); +__RCSID($NetBSD: nlist_ecoff.c,v 1.23 2012/03/20 00:31:24 matt Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -59,17 +59,17 @@ __RCSID($NetBSD: nlist_ecoff.c,v 1.22 2 #ifdef NLIST_ECOFF #define check(off, size) \ - (/*CONSTCOND*/(off 0) || ((size_t)(off + size) mappedsize)) + ((size_t)off = mappedsize || (size_t)(off + size) mappedsize) int __fdnlist_ecoff(int fd, struct nlist *list) { struct nlist *p; - struct ecoff_exechdr *exechdrp; - struct ecoff_symhdr *symhdrp; - struct ecoff_extsym *esyms; + const struct ecoff_exechdr *exechdrp; + const struct ecoff_symhdr *symhdrp; + const struct ecoff_extsym *esyms; struct stat st; - char *mappedfile; + const char *mappedfile; size_t mappedsize; u_long symhdroff, extstroff; u_int symhdrsize; @@ -107,7 +107,7 @@ __fdnlist_ecoff(int fd, struct nlist *li */ if (check(0, sizeof *exechdrp)) goto unmap; - exechdrp = mappedfile; + exechdrp = (const void *)mappedfile; if (ECOFF_BADMAG(exechdrp)) goto unmap; @@ -121,12 +121,12 @@ __fdnlist_ecoff(int fd, struct nlist *li if ((symhdroff + sizeof *symhdrp) mappedsize || sizeof *symhdrp != symhdrsize) goto unmap; - symhdrp = (void *)mappedfile[symhdroff]; + symhdrp = (const void *)mappedfile[symhdroff]; nesyms = symhdrp-esymMax; if (check(symhdrp-cbExtOffset, nesyms * sizeof *esyms)) goto unmap; - esyms = (void *)mappedfile[symhdrp-cbExtOffset]; + esyms = (const void *)mappedfile[symhdrp-cbExtOffset]; extstroff = symhdrp-cbSsExtOffset; /* @@ -149,15 +149,15 @@ __fdnlist_ecoff(int fd, struct nlist *li for (i = 0; i nesyms; i++) { for (p = list; !ISLAST(p); p++) { const char *nlistname; - char *symtabname; + const char *symtabname; /* This may be incorrect */ nlistname = N_NAME(p); if (*nlistname == '_') nlistname++; - symtabname = (void *)mappedfile[extstroff - + esyms[i].es_strindex]; + symtabname = + mappedfile[extstroff + esyms[i].es_strindex]; if (!strcmp(symtabname, nlistname)) { /* @@ -178,7 +178,7 @@ __fdnlist_ecoff(int fd, struct nlist *li done: rv = nent; unmap: - munmap(mappedfile, mappedsize); + munmap(__UNCONST(mappedfile), mappedsize); out: return rv; }
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Tue Mar 20 01:42:59 UTC 2012 Modified Files: src/lib/libc/stdio: stdio.c Log Message: ansi prototype To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdio/stdio.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/stdio/stdio.c diff -u src/lib/libc/stdio/stdio.c:1.19 src/lib/libc/stdio/stdio.c:1.20 --- src/lib/libc/stdio/stdio.c:1.19 Thu Mar 15 14:22:30 2012 +++ src/lib/libc/stdio/stdio.c Mon Mar 19 21:42:59 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: stdio.c,v 1.19 2012/03/15 18:22:30 christos Exp $ */ +/* $NetBSD: stdio.c,v 1.20 2012/03/20 01:42:59 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)stdio.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: stdio.c,v 1.19 2012/03/15 18:22:30 christos Exp $); +__RCSID($NetBSD: stdio.c,v 1.20 2012/03/20 01:42:59 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -108,8 +108,7 @@ __sseek(void *cookie, off_t offset, int } int -__sclose(cookie) - void *cookie; +__sclose(void *cookie) { _DIAGASSERT(cookie != NULL);
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: jruoho Date: Tue Mar 20 05:21:45 UTC 2012 Modified Files: src/tests/fs/vfs: t_io.c Log Message: Remove xfail. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/fs/vfs/t_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/vfs/t_io.c diff -u src/tests/fs/vfs/t_io.c:1.8 src/tests/fs/vfs/t_io.c:1.9 --- src/tests/fs/vfs/t_io.c:1.8 Sun Feb 27 15:16:31 2011 +++ src/tests/fs/vfs/t_io.c Tue Mar 20 05:21:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_io.c,v 1.8 2011/02/27 15:16:31 njoly Exp $ */ +/* $NetBSD: t_io.c,v 1.9 2012/03/20 05:21:45 jruoho Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -88,8 +88,6 @@ extendbody(const atf_tc_t *tc, off_t see O_CREAT | O_RDWR | (seekcnt ? O_APPEND : 0))); RL(rump_sys_ftruncate(fd, seekcnt)); RL(rump_sys_fstat(fd, sb)); - if (FSTYPE_SYSVBFS(tc) seekcnt) - atf_tc_expect_fail(PR kern/44307); ATF_REQUIRE_EQ(sb.st_size, seekcnt); atf_tc_expect_pass(); @@ -174,7 +172,7 @@ shrinkfile(const atf_tc_t *tc, const cha ATF_TC_FSAPPLY(holywrite, create a sparse file and fill hole); ATF_TC_FSAPPLY(extendfile, check that extending a file works); ATF_TC_FSAPPLY(extendfile_append, check that extending a file works - with a append-only fd); + with a append-only fd (PR kern/44307)); ATF_TC_FSAPPLY(overwrite512, write a 512 byte file twice); ATF_TC_FSAPPLY(overwrite64k, write a 64k byte file twice); ATF_TC_FSAPPLY(overwrite_trunc, write 64k + truncate + rewrite);
CVS commit: src/tests/modules
Module Name:src Committed By: jruoho Date: Tue Mar 20 05:50:11 UTC 2012 Modified Files: src/tests/modules: t_abi_uvm.sh t_modload.sh Log Message: Skip Xen. XXX: There should be a reliable way to detect MODULAR. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/modules/t_abi_uvm.sh cvs rdiff -u -r1.9 -r1.10 src/tests/modules/t_modload.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/modules/t_abi_uvm.sh diff -u src/tests/modules/t_abi_uvm.sh:1.1 src/tests/modules/t_abi_uvm.sh:1.2 --- src/tests/modules/t_abi_uvm.sh:1.1 Fri Feb 17 22:36:50 2012 +++ src/tests/modules/t_abi_uvm.sh Tue Mar 20 05:50:11 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_abi_uvm.sh,v 1.1 2012/02/17 22:36:50 jmmv Exp $ +# $NetBSD: t_abi_uvm.sh,v 1.2 2012/03/20 05:50:11 jruoho Exp $ # # Copyright (c) 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -31,6 +31,15 @@ PAGE_SIZE_head() { atf_set require.user root } PAGE_SIZE_body() { + + # XXX: There should be a reliable way to detect MODULAR. + # + sysctl machdep.xen /dev/null 21 + + if [ $? -eq 0 ]; then + atf_skip host does not support modules + fi + if modload $(atf_get_srcdir)/k_uvm/k_uvm.kmod; then : else Index: src/tests/modules/t_modload.sh diff -u src/tests/modules/t_modload.sh:1.9 src/tests/modules/t_modload.sh:1.10 --- src/tests/modules/t_modload.sh:1.9 Thu Mar 24 21:52:51 2011 +++ src/tests/modules/t_modload.sh Tue Mar 20 05:50:11 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_modload.sh,v 1.9 2011/03/24 21:52:51 jmmv Exp $ +# $NetBSD: t_modload.sh,v 1.10 2012/03/20 05:50:11 jruoho Exp $ # # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,6 +36,15 @@ plain_head() { atf_set require.user root } plain_body() { + + # XXX: There should be a reliable way to detect MODULAR. + # + sysctl machdep.xen /dev/null 21 + + if [ $? -eq 0 ]; then + atf_skip host does not support modules + fi + cat experr EOF modload: No such file or directory EOF @@ -99,6 +108,15 @@ iflag_head() { atf_set require.user root } iflag_body() { + + # XXX: There should be a reliable way to detect MODULAR. + # + sysctl machdep.xen /dev/null 21 + + if [ $? -eq 0 ]; then + atf_skip host does not support modules + fi + echo Checking error conditions atf_check -s eq:1 -o empty -e save:stderr modload -i foo \ @@ -143,6 +161,15 @@ sflag_head() { atf_set require.user root } sflag_body() { + + # XXX: There should be a reliable way to detect MODULAR. + # + sysctl machdep.xen /dev/null 21 + + if [ $? -eq 0 ]; then + atf_skip host does not support modules + fi + echo Checking error conditions atf_check -s eq:1 -o empty -e save:stderr modload -s foo \