CVS commit: src/include
Module Name:src Committed By: christos Date: Wed May 5 17:12:29 UTC 2010 Modified Files: src/include: netdb.h Log Message: PR/43258: Hauke Fath: remove duplicate setservent declaration To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/include/netdb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/netdb.h diff -u src/include/netdb.h:1.63 src/include/netdb.h:1.64 --- src/include/netdb.h:1.63 Sat Apr 24 20:54:45 2010 +++ src/include/netdb.h Wed May 5 13:12:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: netdb.h,v 1.63 2010/04/25 00:54:45 joerg Exp $ */ +/* $NetBSD: netdb.h,v 1.64 2010/05/05 17:12:29 christos Exp $ */ /* * ++Copyright++ 1980, 1983, 1988, 1993 @@ -337,9 +337,9 @@ #endif void setnetent(int); void setprotoent(int); +void setservent(int); #if (_POSIX_C_SOURCE - 0) = 200112L || (_XOPEN_SOURCE - 0) = 520 || \ defined(_NETBSD_SOURCE) -void setservent(int); int getaddrinfo(const char * __restrict, const char * __restrict, const struct addrinfo * __restrict, struct addrinfo ** __restrict); @@ -350,7 +350,6 @@ void freeaddrinfo(struct addrinfo *); const char *gai_strerror(int); #endif -void setservent(int); __END_DECLS #endif /* !_NETDB_H_ */
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Thu May 6 18:50:29 UTC 2010 Update of /cvsroot/src/external/bsd/cron/dist In directory ivanova.netbsd.org:/tmp/cvs-serv4779 Log Message: import cron 4.1 Status: Vendor Tag: ISC Release Tags: cron-4_1 N src/external/bsd/cron/dist/CONVERSION N src/external/bsd/cron/dist/CHANGES N src/external/bsd/cron/dist/FEATURES N src/external/bsd/cron/dist/INSTALL N src/external/bsd/cron/dist/MAIL N src/external/bsd/cron/dist/Makefile N src/external/bsd/cron/dist/README N src/external/bsd/cron/dist/THANKS N src/external/bsd/cron/dist/config.h N src/external/bsd/cron/dist/cron.8 N src/external/bsd/cron/dist/cron.c N src/external/bsd/cron/dist/cron.h N src/external/bsd/cron/dist/pathnames.h N src/external/bsd/cron/dist/crontab.1 N src/external/bsd/cron/dist/crontab.5 N src/external/bsd/cron/dist/crontab.c N src/external/bsd/cron/dist/database.c N src/external/bsd/cron/dist/do_command.c N src/external/bsd/cron/dist/entry.c N src/external/bsd/cron/dist/env.c N src/external/bsd/cron/dist/externs.h N src/external/bsd/cron/dist/funcs.h N src/external/bsd/cron/dist/globals.h N src/external/bsd/cron/dist/job.c N src/external/bsd/cron/dist/macros.h N src/external/bsd/cron/dist/misc.c N src/external/bsd/cron/dist/structs.h N src/external/bsd/cron/dist/popen.c N src/external/bsd/cron/dist/pw_dup.c N src/external/bsd/cron/dist/user.c No conflicts created by this import
CVS commit: src/include
Module Name:src Committed By: christos Date: Thu May 6 18:54:22 UTC 2010 Modified Files: src/include: bitstring.h Log Message: lint friendly To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/include/bitstring.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/bitstring.h diff -u src/include/bitstring.h:1.8 src/include/bitstring.h:1.9 --- src/include/bitstring.h:1.8 Sat Feb 5 23:38:18 2005 +++ src/include/bitstring.h Thu May 6 14:54:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bitstring.h,v 1.8 2005/02/06 04:38:18 perry Exp $ */ +/* $NetBSD: bitstring.h,v 1.9 2010/05/06 18:54:22 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -56,20 +56,20 @@ /* internal macros */ /* byte of the bitstring bit is in */ #define _bit_byte(bit) \ - ((bit) 3) + (uint32_t)((bit) 3) /* mask for the bit within its byte */ #define _bit_mask(bit) \ - (1 ((bit)0x7)) + (uint32_t)((1 (uint32_t)((bit)0x7))) /* external macros */ /* bytes in a bitstring of nbits bits */ #define bitstr_size(nbits) \ - (((nbits) + 7) 3) + (size_t)((uint32_t)((nbits) + 7) 3) /* allocate a bitstring */ #define bit_alloc(nbits) \ - (bitstr_t *)calloc((size_t)bitstr_size(nbits), sizeof(bitstr_t)) + calloc(bitstr_size(nbits), sizeof(bitstr_t)) /* allocate a bitstring on the stack */ #define bit_decl(name, nbits) \ @@ -77,15 +77,15 @@ /* is bit N of bitstring name set? */ #define bit_test(name, bit) \ - ((name)[_bit_byte(bit)] _bit_mask(bit)) + /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] _bit_mask(bit)) /* set bit N of bitstring name */ #define bit_set(name, bit) \ - ((name)[_bit_byte(bit)] |= _bit_mask(bit)) + /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] |= _bit_mask(bit)) /* clear bit N of bitstring name */ #define bit_clear(name, bit) \ - ((name)[_bit_byte(bit)] = ~_bit_mask(bit)) + /*LINTED bitwise on signed*/((name)[_bit_byte(bit)] = ~_bit_mask(bit)) /* clear bits start ... stop in bitstring */ #define bit_nclear(name, start, stop) do { \ @@ -94,8 +94,8 @@ while (_start = _stop) { \ bit_clear(_name, _start); \ _start++; \ - } \ -} while(0) + } \ +} while(/*CONSTCOND*/0) /* set bits start ... stop in bitstring */ #define bit_nset(name, start, stop) do { \ @@ -104,8 +104,8 @@ while (_start = _stop) { \ bit_set(_name, _start); \ _start++; \ - } \ -} while(0) + } \ +} while(/*CONSTCOND*/0) /* find first bit clear in name */ #define bit_ffc(name, nbits, value) do { \ @@ -117,7 +117,7 @@ break; \ } \ *(value) = _value; \ -} while(0) +} while(/*CONSTCOND*/0) /* find first bit set in name */ #define bit_ffs(name, nbits, value) do { \ @@ -129,6 +129,6 @@ break; \ } \ *(value) = _value; \ -} while(0) +} while(/*CONSTCOND*/0) #endif /* !_BITSTRING_H_ */
CVS commit: src/external/bsd/cron
Module Name:src Committed By: christos Date: Thu May 6 18:58:45 UTC 2010 Added Files: src/external/bsd/cron: Makefile src/external/bsd/cron/bin: Makefile Makefile.inc src/external/bsd/cron/bin/cron: Makefile src/external/bsd/cron/bin/crontab: Makefile Log Message: Add build glue. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/cron/Makefile cvs rdiff -u -r0 -r1.1 src/external/bsd/cron/bin/Makefile \ src/external/bsd/cron/bin/Makefile.inc cvs rdiff -u -r0 -r1.1 src/external/bsd/cron/bin/cron/Makefile cvs rdiff -u -r0 -r1.1 src/external/bsd/cron/bin/crontab/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/cron/Makefile diff -u /dev/null src/external/bsd/cron/Makefile:1.1 --- /dev/null Thu May 6 14:58:45 2010 +++ src/external/bsd/cron/Makefile Thu May 6 14:58:45 2010 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2010/05/06 18:58:45 christos Exp $ + +SUBDIR= bin + +.include bsd.subdir.mk Index: src/external/bsd/cron/bin/Makefile diff -u /dev/null src/external/bsd/cron/bin/Makefile:1.1 --- /dev/null Thu May 6 14:58:45 2010 +++ src/external/bsd/cron/bin/Makefile Thu May 6 14:58:45 2010 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2010/05/06 18:58:45 christos Exp $ + +SUBDIR= cron crontab + +.include bsd.subdir.mk Index: src/external/bsd/cron/bin/Makefile.inc diff -u /dev/null src/external/bsd/cron/bin/Makefile.inc:1.1 --- /dev/null Thu May 6 14:58:45 2010 +++ src/external/bsd/cron/bin/Makefile.inc Thu May 6 14:58:45 2010 @@ -0,0 +1,4 @@ +# $NetBSD: Makefile.inc,v 1.1 2010/05/06 18:58:45 christos Exp $ + +.PATH: ${.PARSEDIR}/../dist +WARNS?= 4 Index: src/external/bsd/cron/bin/cron/Makefile diff -u /dev/null src/external/bsd/cron/bin/cron/Makefile:1.1 --- /dev/null Thu May 6 14:58:45 2010 +++ src/external/bsd/cron/bin/cron/Makefile Thu May 6 14:58:45 2010 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2010/05/06 18:58:45 christos Exp $ + +BINDIR= /usr/sbin +PROG= cron +SRCS= cron.c database.c do_command.c entry.c env.c job.c \ + misc.c popen.c pw_dup.c user.c +CPPFLAGS+=-I${.CURDIR} -DLOGIN_CAP +LDADD+=-lutil +MAN= cron.8 + +.include bsd.prog.mk Index: src/external/bsd/cron/bin/crontab/Makefile diff -u /dev/null src/external/bsd/cron/bin/crontab/Makefile:1.1 --- /dev/null Thu May 6 14:58:45 2010 +++ src/external/bsd/cron/bin/crontab/Makefile Thu May 6 14:58:45 2010 @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2010/05/06 18:58:45 christos Exp $ + +.include bsd.own.mk + +USE_FORT?= yes # setuid +PROG= crontab +SRCS= crontab.c misc.c entry.c env.c pw_dup.c +CPPFLAGS+=-I${.CURDIR} -DDEBUGGING=1 +BINOWN =root +BINMODE=4555 +MAN= crontab.1 crontab.5 + +.include bsd.prog.mk
CVS commit: src/doc
Module Name:src Committed By: christos Date: Thu May 6 18:59:50 UTC 2010 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: mention cron To generate a diff of this commit: cvs rdiff -u -r1.760 -r1.761 src/doc/3RDPARTY cvs rdiff -u -r1.1391 -r1.1392 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/3RDPARTY diff -u src/doc/3RDPARTY:1.760 src/doc/3RDPARTY:1.761 --- src/doc/3RDPARTY:1.760 Wed Apr 28 16:34:37 2010 +++ src/doc/3RDPARTY Thu May 6 14:59:50 2010 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.760 2010/04/28 20:34:37 jruoho Exp $ +# $NetBSD: 3RDPARTY,v 1.761 2010/05/06 18:59:50 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -209,7 +209,7 @@ - src/lib/libc/iconv: iconv(3) Package: cron -Version: 3.0 +Version: 4.1 Current Vers: 4.1 Maintainer: Paul Vixie vi...@vix.com Archive Site: ftp://ftp.isc.org/isc/cron/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1391 src/doc/CHANGES:1.1392 --- src/doc/CHANGES:1.1391 Tue May 4 19:31:54 2010 +++ src/doc/CHANGES Thu May 6 14:59:50 2010 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1391 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1392 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -607,3 +607,4 @@ [phx 20100503] xen: Enable no-execute bit feature for i386pae and amd64 kernels. [jym 20100505] + cron: Import 4.1 from isc. [christos 20100506]
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Thu May 6 21:50:16 UTC 2010 Modified Files: src/external/bsd/cron/dist: cron.c Log Message: - change times to time_t - use the correct time in job_add - bring back CRON_TZ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/cron/dist/cron.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/cron.c diff -u src/external/bsd/cron/dist/cron.c:1.2 src/external/bsd/cron/dist/cron.c:1.3 --- src/external/bsd/cron/dist/cron.c:1.2 Thu May 6 14:53:17 2010 +++ src/external/bsd/cron/dist/cron.c Thu May 6 17:50:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cron.c,v 1.2 2010/05/06 18:53:17 christos Exp $ */ +/* $NetBSD: cron.c,v 1.3 2010/05/06 21:50:16 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = Id: cron.c,v 1.12 2004/01/23 18:56:42 vixie Exp; #else -__RCSID($NetBSD: cron.c,v 1.2 2010/05/06 18:53:17 christos Exp $); +__RCSID($NetBSD: cron.c,v 1.3 2010/05/06 21:50:16 christos Exp $); #endif #endif @@ -37,7 +37,7 @@ static void usage(void), run_reboot_jobs(cron_db *), - find_jobs(int, cron_db *, int, int), + find_jobs(time_t, cron_db *, int, int), set_time(int), cron_sleep(int), sigchld_handler(int), @@ -47,7 +47,7 @@ parse_args(int c, char *v[]); static volatile sig_atomic_t got_sighup, got_sigchld; -static int timeRunning, virtualTime, clockTime; +static time_t timeRunning, virtualTime, clockTime; static long GMToff; static void @@ -205,7 +205,7 @@ find_jobs(virtualTime, database, FALSE, TRUE); set_time(FALSE); -} while (virtualTime timeRunning +} while (virtualTime timeRunning clockTime == timeRunning); break; @@ -265,20 +265,32 @@ } static void -find_jobs(int vtime, cron_db *db, int doWild, int doNonWild) { +find_jobs(time_t vtime, cron_db *db, int doWild, int doNonWild) { time_t virtualSecond = vtime * SECONDS_PER_MINUTE; struct tm *tm = gmtime(virtualSecond); int minute, hour, dom, month, dow; user *u; entry *e; + char *orig_tz, *job_tz; - /* make 0-based values out of these so we can use them as indicies - */ - minute = tm-tm_min -FIRST_MINUTE; - hour = tm-tm_hour -FIRST_HOUR; - dom = tm-tm_mday -FIRST_DOM; - month = tm-tm_mon +1 /* 0..11 - 1..12 */ -FIRST_MONTH; - dow = tm-tm_wday -FIRST_DOW; +#define maketime(tz1, tz2) do { \ + char *t = tz1; \ + if (t != NULL *t != '\0') \ + setenv(TZ, t, 1); \ + else if ((tz2) != NULL) \ + setenv(TZ, (tz2), 1); \ + else \ + unsetenv(TZ); \ + tm = localtime(virtualSecond); \ + minute = tm-tm_min -FIRST_MINUTE; \ + hour = tm-tm_hour -FIRST_HOUR; \ + dom = tm-tm_mday -FIRST_DOM; \ + month = tm-tm_mon + 1 /* 0..11 - 1..12 */ -FIRST_MONTH; \ + dow = tm-tm_wday -FIRST_DOW; \ + } while (/*CONSTCOND*/0) + + orig_tz = getenv(TZ); + maketime(NULL, orig_tz); Debug(DSCH, ([%ld] tick(%d,%d,%d,%d,%d) %s %s\n, (long)getpid(), minute, hour, dom, month, dow, @@ -295,6 +307,8 @@ Debug(DSCH|DEXT, (user [%s:%ld:%ld:...] cmd=\%s\\n, e-pwd-pw_name, (long)e-pwd-pw_uid, (long)e-pwd-pw_gid, e-cmd)); + job_tz = env_get(CRON_TZ, e-envp); + maketime(job_tz, orig_tz); if (bit_test(e-minute, minute) bit_test(e-hour, hour) bit_test(e-month, month) @@ -306,7 +320,7 @@ if ((doNonWild !(e-flags (MIN_STAR|HR_STAR))) || (doWild (e-flags (MIN_STAR|HR_STAR - job_add(e, u, virtualSecond); + job_add(e, u, StartTime); } } } @@ -332,7 +346,7 @@ Debug(DSCH, ([%ld] GMToff=%ld\n, (long)getpid(), (long)GMToff)); } - clockTime = (int)((StartTime + GMToff) / (time_t)SECONDS_PER_MINUTE); + clockTime = (StartTime + GMToff) / (time_t)SECONDS_PER_MINUTE; } /*
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Thu May 6 22:38:14 UTC 2010 Modified Files: src/external/bsd/cron/dist: cron.c Log Message: remember to restore the original timezone. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/cron/dist/cron.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/cron.c diff -u src/external/bsd/cron/dist/cron.c:1.3 src/external/bsd/cron/dist/cron.c:1.4 --- src/external/bsd/cron/dist/cron.c:1.3 Thu May 6 17:50:16 2010 +++ src/external/bsd/cron/dist/cron.c Thu May 6 18:38:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cron.c,v 1.3 2010/05/06 21:50:16 christos Exp $ */ +/* $NetBSD: cron.c,v 1.4 2010/05/06 22:38:14 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = Id: cron.c,v 1.12 2004/01/23 18:56:42 vixie Exp; #else -__RCSID($NetBSD: cron.c,v 1.3 2010/05/06 21:50:16 christos Exp $); +__RCSID($NetBSD: cron.c,v 1.4 2010/05/06 22:38:14 christos Exp $); #endif #endif @@ -324,6 +324,10 @@ } } } + if (orig_tz != NULL) + setenv(TZ, orig_tz, 1); + else + unsetenv(TZ); } /*
CVS commit: src/external/bsd/cron
Module Name:src Committed By: christos Date: Thu May 6 23:19:56 UTC 2010 Added Files: src/external/bsd/cron: cron2netbsd Log Message: for posterity. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/cron/cron2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/cron/cron2netbsd diff -u /dev/null src/external/bsd/cron/cron2netbsd:1.1 --- /dev/null Thu May 6 19:19:56 2010 +++ src/external/bsd/cron/cron2netbsd Thu May 6 19:19:56 2010 @@ -0,0 +1,105 @@ +#! /bin/sh +# +# $NetBSD: cron2netbsd,v 1.1 2010/05/06 23:19:56 christos Exp $ +# +# Copyright (c) 2000 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# cron2netbsd: convert an cron source tree into a +# netbsd cron source tree, under src/external/bsd/cron, +# based on bind2netbsd by Bernd Ernesti and changes by Simon Burge +# +# Rough instructions for importing new cron release: +# +# $ cd /some/where/temporary +# $ tar xpfz /new/cron/release/tar/file +# $ sh /usr/src/external/bsd/cron/dist/cron2netbsd crondir `pwd` +# $ cd src/external/bsd/cron/dist +# $ cvs -d cvs.netbsd.org:/cvsroot import -m Import cron 4.1 src/external/bsd/cron/dist ISC cron-4_1 +# +# - check makefiles to see if any extra sources have been added. +# - update distrib/sets if necessary. + +if [ $# -ne 2 ]; then echo cron2netbsd src dest; exit 1; fi + +r=$1 +d=$2/src/external/bsd/cron/dist + +case $d in + /*) + ;; + *) + d=`/bin/pwd`/$d + ;; +esac + +case $r in + /*) + ;; + *) + r=`/bin/pwd`/$r + ;; +esac + +echo preparing directory $d +rm -rf $d +mkdir -p $d + +### Copy the files and directories +echo copying $r to $d +cd $r +pax -rw * $d + +echo removing unneeded directories and files + +### Remove unneeded files +cd $d +rm -f bitstring.h bitstring.3 putman.sh + +### Remove the $'s around RCS tags +find $d -type f -print | xargs egrep -l '\$(Id|Created|Header)' | while read f; do + sed -e 's/\$\(Id.*\) \$/\1/' \ + -e 's/\$\(Created.*\) \$/\1/' \ + -e 's/\$\(Header.*\) \$/\1/' \ + $f /tmp/cron1f$$ mv /tmp/cron1f$$ $f \ + echo removed \$RCS tag from $f +done + +echo cleaning up CVS residue. +( + cd $d + find . -type d -name CVS -print | xargs rm -r +) +echo done + +### Fixing file and directory permissions. +echo Fixing file/directory permissions. +( + cd $d + find . -type f -print | xargs chmod u+rw,go+r + find . -type d -print | xargs chmod u+rwx,go+rx +) +echo done + +exit 0
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Fri May 7 17:12:00 UTC 2010 Modified Files: src/external/bsd/cron/dist: cron.c Log Message: remove the +1 second. Otherwise jobs that are supposed to run at 10:00:00, run at 10:00:01 which is tolerable because cron has a 1 minute granularity, but confusing. This restores the old behavior with the new timing logic. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/cron/dist/cron.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/cron.c diff -u src/external/bsd/cron/dist/cron.c:1.4 src/external/bsd/cron/dist/cron.c:1.5 --- src/external/bsd/cron/dist/cron.c:1.4 Thu May 6 18:38:14 2010 +++ src/external/bsd/cron/dist/cron.c Fri May 7 13:12:00 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cron.c,v 1.4 2010/05/06 22:38:14 christos Exp $ */ +/* $NetBSD: cron.c,v 1.5 2010/05/07 17:12:00 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = Id: cron.c,v 1.12 2004/01/23 18:56:42 vixie Exp; #else -__RCSID($NetBSD: cron.c,v 1.4 2010/05/06 22:38:14 christos Exp $); +__RCSID($NetBSD: cron.c,v 1.5 2010/05/07 17:12:00 christos Exp $); #endif #endif @@ -362,7 +362,7 @@ int seconds_to_wait; t1 = time(NULL) + GMToff; - seconds_to_wait = (int)(target * SECONDS_PER_MINUTE - t1) + 1; + seconds_to_wait = (int)(target * SECONDS_PER_MINUTE - t1); Debug(DSCH, ([%ld] Target time=%lld, sec-to-wait=%d\n, (long)getpid(), (long long)target*SECONDS_PER_MINUTE, seconds_to_wait));
CVS commit: src
Module Name:src Committed By: christos Date: Fri May 7 17:35:32 UTC 2010 Modified Files: src/external/bsd: Makefile src/usr.bin: Makefile src/usr.sbin: Makefile Log Message: unhook old cron, hook new one. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/bsd/Makefile cvs rdiff -u -r1.185 -r1.186 src/usr.bin/Makefile cvs rdiff -u -r1.243 -r1.244 src/usr.sbin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/Makefile diff -u src/external/bsd/Makefile:1.21 src/external/bsd/Makefile:1.22 --- src/external/bsd/Makefile:1.21 Wed Feb 3 01:25:55 2010 +++ src/external/bsd/Makefile Fri May 7 13:35:32 2010 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.21 2010/02/03 06:25:55 tls Exp $ +# $NetBSD: Makefile,v 1.22 2010/05/07 17:35:32 christos Exp $ .include bsd.own.mk -SUBDIR+= am-utils bind dhcpcd fetch file flex libarchive libevent liblzf \ +SUBDIR+= am-utils bind cron dhcpcd fetch file flex libarchive libevent liblzf \ mdocml openresolv pkg_install top byacc .if (${MKATF} != no) Index: src/usr.bin/Makefile diff -u src/usr.bin/Makefile:1.185 src/usr.bin/Makefile:1.186 --- src/usr.bin/Makefile:1.185 Wed Feb 3 10:34:45 2010 +++ src/usr.bin/Makefile Fri May 7 13:35:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.185 2010/02/03 15:34:45 roy Exp $ +# $NetBSD: Makefile,v 1.186 2010/05/07 17:35:31 christos Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include bsd.own.mk @@ -7,7 +7,7 @@ banner basename biff bthset btkey btpin \ bzip2 bzip2recover cal calendar cap_mkdb cdplay \ checknr chflags chpass cksum cmp col colcrt colrm \ - column comm compress config crontab crunch csplit ctags cut \ + column comm compress config crunch csplit ctags cut \ deroff db dirname du \ eject elf2aout elf2ecoff env error expand extattr \ false fdformat fgen find finger fmt fold fpr from \ Index: src/usr.sbin/Makefile diff -u src/usr.sbin/Makefile:1.243 src/usr.sbin/Makefile:1.244 --- src/usr.sbin/Makefile:1.243 Sun Oct 11 04:57:54 2009 +++ src/usr.sbin/Makefile Fri May 7 13:35:32 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.243 2009/10/11 08:57:54 sborrill Exp $ +# $NetBSD: Makefile,v 1.244 2010/05/07 17:35:32 christos Exp $ # from: @(#)Makefile 5.20 (Berkeley) 6/12/93 .include bsd.own.mk SUBDIR= ac accton acpitools altq apm apmd arp bad144 bootp \ btattach btconfig btdevctl bthcid btpand catman \ - chown chroot chrtbl cnwctl cpuctl crash cron dev_mkdb \ + chown chroot chrtbl cnwctl cpuctl crash dev_mkdb \ dhcp diskpart dumpfs dumplfs edquota eeprom \ envstat eshconfig etcupdate extattrctl fssconfig fusermount fwctl \ gpioctl grfconfig grfinfo gspa hdaudioctl hilinfo ifwatchd inetd \
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Fri May 7 20:43:27 UTC 2010 Modified Files: src/external/bsd/cron/dist: config.h Log Message: bump crontab limit to 256K per the old manual page. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/cron/dist/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/config.h diff -u src/external/bsd/cron/dist/config.h:1.2 src/external/bsd/cron/dist/config.h:1.3 --- src/external/bsd/cron/dist/config.h:1.2 Thu May 6 14:53:17 2010 +++ src/external/bsd/cron/dist/config.h Fri May 7 16:43:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: config.h,v 1.2 2010/05/06 18:53:17 christos Exp $ */ +/* $NetBSD: config.h,v 1.3 2010/05/07 20:43:27 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -108,4 +108,4 @@ */ /*#define CRON_GROUP crontab */ -#define MAXTABSIZE_DEFAULT (1024*32) +#define MAXTABSIZE_DEFAULT (1024*256)
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Fri May 7 20:43:40 UTC 2010 Modified Files: src/external/bsd/cron/dist: crontab.1 Log Message: change to mandoc To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/cron/dist/crontab.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/crontab.1 diff -u src/external/bsd/cron/dist/crontab.1:1.2 src/external/bsd/cron/dist/crontab.1:1.3 --- src/external/bsd/cron/dist/crontab.1:1.2 Thu May 6 14:53:17 2010 +++ src/external/bsd/cron/dist/crontab.1 Fri May 7 16:43:40 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: crontab.1,v 1.2 2010/05/06 18:53:17 christos Exp $ +.\ $NetBSD: crontab.1,v 1.3 2010/05/07 20:43:40 christos Exp $ .\ .\/* Copyright 1988,1990,1993 by Paul Vixie .\ * All rights reserved @@ -21,94 +21,128 @@ .\ .\ Id: crontab.1,v 1.7 2004/01/23 19:03:32 vixie Exp .\ -.TH CRONTAB 1 29 December 1993 -.UC 4 -.SH NAME -crontab \- maintain crontab files for individual users (ISC Cron V4.1) -.SH SYNOPSIS -.B crontab -.RB [ -u -.IR user ] file -.br -.B crontab -.RB [ -u -.IR user ] -.RB [ -l | -r | -e ] -.SH DESCRIPTION -.I Crontab +.Dd May 6, 2010 +.Dt CRONTAB 1 +.Os +.Sh NAME +.Nm crontab +.Nd maintain crontab files for individual users (ISC Cron V4.1) +.Sh SYNOPSIS +.Nm +.Op Fl u Ar user +.Nm +.Op Fl l +.Op Fl r +.Op Fl e +.Sh DESCRIPTION +.Nm is the program used to install, deinstall or list the tables used to drive the -.IR cron (8) -daemon in ISC Cron. Each user can have their own crontab, and though -these are files in /var, they are not intended to be edited directly. -.PP +.Xr cron 8 +daemon in ISC Cron. +Each user can have their own crontab, and though +these are files in +.Pa /var/cron , +they are not intended to be edited directly. +.Pp If the -.I cron.allow +.Pa /var/cron/allow file exists, then you must be listed therein in order to be allowed to use -this command. If the -.I cron.allow +this command. +If the +.Pa /var/cron/allow file does not exist but the -.I cron.deny -file does exist, then you must \fBnot\fR be listed in the -.I cron.deny -file in order to use this command. If neither of these files exists, -only the super user will be allowed to use this command. -.PP +.Pa /var/cron/deny +file does exist, then you must not be listed in the +.Pa /var/cron/deny +file in order to use this command. +If neither of these files exists, depending on the compiled in settings, +only the super user will be allowed to use this command, +or everyone will be allowed to use this command. +On +.Nx +everyone is allowed to use this command. +.Pp The default maximum size for a crontab is 256 kilobytes, but this may be changed for all users on the system by putting the desired maximum size (in bytes) in the -.I maxtabsize +.Pa /var/cron/maxtabsize file. -.PP +.Pp If the -.I -u +.Fl u option is given, it specifies the name of the user whose crontab is to be tweaked. If this option is not given, -.I crontab -examines your crontab, i.e., the crontab of the person executing the -command. Note that -.IR su (1) +.Nm +examines +.Dq your +crontab, i.e., the crontab of the person executing the command. +Note that +.Xr su 1 can confuse -.I crontab +.Nm and that if you are running inside of -.IR su (1) +.Xr su 1 you should always use the -.I -u +.Fl u option for safety's sake. -.PP +.Pp The first form of this command is used to install a new crontab from some -named file or standard input if the pseudo-filename ``-'' is given. -.PP +named file or standard input if the pseudo-filename +.Dq - +is given. +.Pp The -.I -l +.Fl l option causes the current crontab to be displayed on standard output. -.PP +.Pp The -.I -r +.Fl r option causes the current crontab to be removed. -.PP +.Pp The -.I -e +.Fl e option is used to edit the current crontab using the editor specified by -the \s-1VISUAL\s+1 or \s-1EDITOR\s+1 environment variables. After you exit -from the editor, the modified crontab will be installed automatically. -.SH SEE ALSO -crontab(5), cron(8) -.SH FILES -.nf -/var/cron/allow -/var/cron/deny -/var/cron/maxtabsize -.fi -.SH STANDARDS +the +.Dv VISUAL +or +.Dv EDITOR +environment variables. +After you exit from the editor, the modified crontab will be installed +automatically. +.Sh SEE ALSO +.Xr crontab 5 , +.Xr cron 8 +.Sh FILES +.Bl -tag -width /var/cron/maxtabsize -compact +.It Pa /var/cron/allow +Optional list of users that are allowed to use +.Nm . +.It Pa /var/cron/deny +Optional list of users that are disallowed to use +.Nm . +.It Pa /var/cron/maxtabsize +Maximum size of +.Nm +.It Pa /var/cron/tabs/ +Directory containing the individual user crontab files, named after the user. +files. +Defaults to +.Dv 256 +kilobytes. +.El +.Sh STANDARDS The -.I crontab -command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax +.Nm +command conforms to +.St -p1003.2 .
CVS commit: src/external/bsd/cron/bin/crontab
Module Name:src Committed By: christos Date: Fri May 7 21:54:07 UTC 2010 Modified Files: src/external/bsd/cron/bin/crontab: Makefile Log Message: specify bindir To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/cron/bin/crontab/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/bin/crontab/Makefile diff -u src/external/bsd/cron/bin/crontab/Makefile:1.1 src/external/bsd/cron/bin/crontab/Makefile:1.2 --- src/external/bsd/cron/bin/crontab/Makefile:1.1 Thu May 6 14:58:45 2010 +++ src/external/bsd/cron/bin/crontab/Makefile Fri May 7 17:54:07 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2010/05/06 18:58:45 christos Exp $ +# $NetBSD: Makefile,v 1.2 2010/05/07 21:54:07 christos Exp $ .include bsd.own.mk @@ -8,6 +8,7 @@ CPPFLAGS+=-I${.CURDIR} -DDEBUGGING=1 BINOWN =root BINMODE=4555 +BINDIR=/usr/bin MAN= crontab.1 crontab.5 .include bsd.prog.mk
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Wed May 12 12:26:16 UTC 2010 Modified Files: src/sys/dev/pci: if_iwn.c pcidevs Log Message: Use device names from the OpenBSD iwn driver, adding and modifying device names as needed. From Sverre Froyen To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_iwn.c cvs rdiff -u -r1.1030 -r1.1031 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_iwn.c diff -u src/sys/dev/pci/if_iwn.c:1.44 src/sys/dev/pci/if_iwn.c:1.45 --- src/sys/dev/pci/if_iwn.c:1.44 Sat May 1 22:06:15 2010 +++ src/sys/dev/pci/if_iwn.c Wed May 12 08:26:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwn.c,v 1.44 2010/05/02 02:06:15 christos Exp $ */ +/* $NetBSD: if_iwn.c,v 1.45 2010/05/12 12:26:16 christos Exp $ */ /* $OpenBSD: if_iwn.c,v 1.88 2010/04/10 08:37:36 damien Exp $ */ /*- @@ -22,7 +22,7 @@ * adapters. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_iwn.c,v 1.44 2010/05/02 02:06:15 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_iwn.c,v 1.45 2010/05/12 12:26:16 christos Exp $); #define IWN_USE_RBUF /* Use local storage for RX */ #undef IWN_HWCRYPTO /* XXX does not even compile yet */ @@ -76,18 +76,6 @@ #include dev/pci/if_iwnvar.h static const pci_product_id_t iwn_devices[] = { -/* XXX From old NetBSD iwn driver (used by pcidevs) */ - PCI_PRODUCT_INTEL_PRO_WL_4965AGN_1, - PCI_PRODUCT_INTEL_PRO_WL_4965AGN_2, - PCI_PRODUCT_INTEL_PRO_WL_5100AGN_1, - PCI_PRODUCT_INTEL_PRO_WL_5100AGN_2, - PCI_PRODUCT_INTEL_PRO_WL_5300AGN_1, - PCI_PRODUCT_INTEL_PRO_WL_5300AGN_2, - PCI_PRODUCT_INTEL_PRO_WL_5350AGN_1, - PCI_PRODUCT_INTEL_PRO_WL_5350AGN_2, - PCI_PRODUCT_INTEL_WIFI_LINK_6000_3X3_2, -#if 0 -/* XXX From new OpenBSD iwn driver (not in pcidevs) */ PCI_PRODUCT_INTEL_WIFI_LINK_4965_1, PCI_PRODUCT_INTEL_WIFI_LINK_4965_2, PCI_PRODUCT_INTEL_WIFI_LINK_5100_1, @@ -101,13 +89,13 @@ PCI_PRODUCT_INTEL_WIFI_LINK_1000_1, PCI_PRODUCT_INTEL_WIFI_LINK_1000_2, PCI_PRODUCT_INTEL_WIFI_LINK_6000_3X3_1, + PCI_PRODUCT_INTEL_WIFI_LINK_6000_3X3_2, PCI_PRODUCT_INTEL_WIFI_LINK_6000_IPA_1, PCI_PRODUCT_INTEL_WIFI_LINK_6000_IPA_2, PCI_PRODUCT_INTEL_WIFI_LINK_6050_2X2_1, PCI_PRODUCT_INTEL_WIFI_LINK_6050_2X2_2, PCI_PRODUCT_INTEL_WIFI_LINK_6005_2X2_1, PCI_PRODUCT_INTEL_WIFI_LINK_6005_2X2_2, -#endif }; /* @@ -713,15 +701,12 @@ sc-limits = iwn6000_sensitivity_limits; sc-fwname = iwlwifi-6000-4.ucode; switch (pid) { -/* XXX not yet defined for NetBSD (not in pcidevs) */ -#ifdef PCI_PRODUCT_INTEL_WIFI_LINK_6000_IPA_1 case PCI_PRODUCT_INTEL_WIFI_LINK_6000_IPA_1: case PCI_PRODUCT_INTEL_WIFI_LINK_6000_IPA_2: sc-sc_flags |= IWN_FLAG_INTERNAL_PA; sc-txchainmask = IWN_ANT_BC; sc-rxchainmask = IWN_ANT_BC; break; -#endif default: sc-txchainmask = IWN_ANT_ABC; sc-rxchainmask = IWN_ANT_ABC; Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1030 src/sys/dev/pci/pcidevs:1.1031 --- src/sys/dev/pci/pcidevs:1.1030 Mon May 10 02:38:45 2010 +++ src/sys/dev/pci/pcidevs Wed May 12 08:26:16 2010 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1030 2010/05/10 06:38:45 matt Exp $ +$NetBSD: pcidevs,v 1.1031 2010/05/12 12:26:16 christos Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2230,6 +2230,12 @@ product INTEL PCMC 0x04a3 82434LX/NX PCI, Cache and Memory Controller (PCMC) product INTEL GDT_RAID1 0x0600 GDT RAID product INTEL GDT_RAID2 0x061f GDT RAID +product INTEL WIFI_LINK_6005_2X2_1 0x0082 Centrino Advanced-N 6205 +product INTEL WIFI_LINK_1000_1 0x0083 WiFi Link 1000 +product INTEL WIFI_LINK_1000_2 0x0084 WiFi Link 1000 +product INTEL WIFI_LINK_6005_2X2_2 0x0085 Centrino Advanced-N 6205 +product INTEL WIFI_LINK_6050_2X2_1 0x0087 Centrino Advanced-N 6250 +product INTEL WIFI_LINK_6050_2X2_2 0x0089 Centrino Advanced-N 6250 product INTEL 80960RM 0x0962 i960 RM PCI-PCI product INTEL 80960RN 0x0964 i960 RN PCI-PCI product INTEL 82542 0x1000 i82542 Gigabit Ethernet @@ -2784,15 +2790,20 @@ product INTEL PRO_WL_2915ABG_1 0x4223 PRO/Wireless LAN 2915ABG Mini-PCI Adapter product INTEL PRO_WL_2915ABG_2 0x4224 PRO/Wireless LAN 2915ABG Mini-PCI Adapter product INTEL PRO_WL_3945ABG_2 0x4227 PRO/Wireless LAN 3945ABG Mini-PCI Adapter -product INTEL PRO_WL_4965AGN_1 0x4229 PRO/Wireless LAN 4965AGN Mini-PCI Adapter -product INTEL PRO_WL_4965AGN_2 0x4230 PRO/Wireless LAN 4965AGN Mini-PCI Adapter -product INTEL PRO_WL_5100AGN_1 0x4232 Pro/Wireless LAN 5100AGN Mini-PCI Adapter -product INTEL PRO_WL_5300AGN_1 0x4235 Pro/Wireless LAN 5300AGN Mini-PCI Adapter -product INTEL PRO_WL_5300AGN_2 0x4236 Pro/Wireless LAN 5300AGN Mini-PCI Adapter -product INTEL PRO_WL_5100AGN_2 0x4237 Pro/Wireless LAN 5100AGN Mini-PCI Adapter -product INTEL WIFI_LINK_6000_3X3_2 0x4238 Pro/Wireless LAN 6300AGN Mini-PCI Adapter -product INTEL PRO_WL_5350AGN_1 0x423a Pro/Wireless LAN 5350AGN
CVS commit: src/sbin/route
Module Name:src Committed By: christos Date: Wed May 12 17:56:13 UTC 2010 Modified Files: src/sbin/route: keywords.c keywords.h route.8 route.c Log Message: PR/40455: Mihai Chelaru: Add noreject noblackhole options To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sbin/route/keywords.c cvs rdiff -u -r1.9 -r1.10 src/sbin/route/keywords.h cvs rdiff -u -r1.40 -r1.41 src/sbin/route/route.8 cvs rdiff -u -r1.119 -r1.120 src/sbin/route/route.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/route/keywords.c diff -u src/sbin/route/keywords.c:1.6 src/sbin/route/keywords.c:1.7 --- src/sbin/route/keywords.c:1.6 Sun Aug 6 13:44:56 2006 +++ src/sbin/route/keywords.c Wed May 12 13:56:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: keywords.c,v 1.6 2006/08/06 17:44:56 dyoung Exp $ */ +/* $NetBSD: keywords.c,v 1.7 2010/05/12 17:56:13 christos Exp $ */ /* WARNING! This file was generated by keywords.sh */ @@ -57,6 +57,8 @@ {xns, K_XNS}, {xresolve, K_XRESOLVE}, {flushall, K_FLUSHALL}, + {noblackhole, K_NOBLACKHOLE}, + {noreject, K_NOREJECT}, {0, 0} }; Index: src/sbin/route/keywords.h diff -u src/sbin/route/keywords.h:1.9 src/sbin/route/keywords.h:1.10 --- src/sbin/route/keywords.h:1.9 Sun Aug 6 13:44:56 2006 +++ src/sbin/route/keywords.h Wed May 12 13:56:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: keywords.h,v 1.9 2006/08/06 17:44:56 dyoung Exp $ */ +/* $NetBSD: keywords.h,v 1.10 2010/05/12 17:56:13 christos Exp $ */ /* WARNING! This file was generated by keywords.sh */ @@ -59,3 +59,5 @@ #define K_FLUSHALL 49 #define K_NOCLONED 50 #define K_NOCLONING 51 +#define K_NOBLACKHOLE 52 +#define K_NOREJECT 53 Index: src/sbin/route/route.8 diff -u src/sbin/route/route.8:1.40 src/sbin/route/route.8:1.41 --- src/sbin/route/route.8:1.40 Sun Aug 6 19:38:13 2006 +++ src/sbin/route/route.8 Wed May 12 13:56:13 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: route.8,v 1.40 2006/08/06 23:38:13 wiz Exp $ +.\ $NetBSD: route.8,v 1.41 2010/05/12 17:56:13 christos Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -267,19 +267,21 @@ These flags may be set (or sometimes cleared) by indicating the following corresponding modifiers: .Bd -literal --cloningRTF_CLONING- generates a new route on use --nocloning ~RTF_CLONING- stop generating new routes on use --cloned RTF_CLONED - cloned route generated by RTF_CLONING --nocloned ~RTF_CLONED - prevent removal with RTF_CLONING parent --xresolve RTF_XRESOLVE - emit mesg on use (for external lookup) --iface ~RTF_GATEWAY- destination is directly reachable --static RTF_STATIC - manually added route --nostatic ~RTF_STATIC - pretend route added by kernel or daemon --reject RTF_REJECT - emit an ICMP unreachable when matched --blackhole RTF_BLACKHOLE - silently discard pkts (during updates) --proto1 RTF_PROTO1 - set protocol specific routing flag #1 --proto2 RTF_PROTO2 - set protocol specific routing flag #2 --llinfo RTF_LLINFO - validly translates proto addr to link addr +-cloning RTF_CLONING- generates a new route on use +-nocloning ~RTF_CLONING- stop generating new routes on use +-cloned RTF_CLONED - cloned route generated by RTF_CLONING +-nocloned~RTF_CLONED - prevent removal with RTF_CLONING parent +-xresolve RTF_XRESOLVE - emit mesg on use (for external lookup) +-iface ~RTF_GATEWAY- destination is directly reachable +-static RTF_STATIC - manually added route +-nostatic~RTF_STATIC - pretend route added by kernel or daemon +-reject RTF_REJECT - emit an ICMP unreachable when matched +-noreject~RTF_REJECT - clear reject flag +-blackholeRTF_BLACKHOLE - silently discard pkts (during updates) +-noblackhole ~RTF_BLACKHOLE - clear blackhole flag +-proto1 RTF_PROTO1 - set protocol specific routing flag #1 +-proto2 RTF_PROTO2 - set protocol specific routing flag #2 +-llinfo RTF_LLINFO - validly translates proto addr to link addr .Ed .Pp The optional modifiers Index: src/sbin/route/route.c diff -u src/sbin/route/route.c:1.119 src/sbin/route/route.c:1.120 --- src/sbin/route/route.c:1.119 Sun Dec 28 15:12:31 2008 +++ src/sbin/route/route.c Wed May 12 13:56:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.119 2008/12/28 20:12:31 christos Exp $ */ +/* $NetBSD: route.c,v 1.120 2010/05/12 17:56:13 christos Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)route.c 8.6 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: route.c,v 1.119 2008/12/28 20:12:31 christos Exp $); +__RCSID($NetBSD: route.c,v 1.120 2010/05/12 17:56:13 christos Exp $); #endif #endif /* not lint */ @@ -843,9 +843,15 @@ case K_REJECT: flags |= RTF_REJECT; break; + case
CVS commit: src/external/bsd/top/dist/machine
Module Name:src Committed By: christos Date: Wed May 12 22:09:36 UTC 2010 Modified Files: src/external/bsd/top/dist/machine: m_netbsd.c Log Message: implement fullcmd mode. Now we need to modernize the machine specific code to handle displays 80 columns to make this work effectively. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/bsd/top/dist/machine/m_netbsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/top/dist/machine/m_netbsd.c diff -u src/external/bsd/top/dist/machine/m_netbsd.c:1.11 src/external/bsd/top/dist/machine/m_netbsd.c:1.12 --- src/external/bsd/top/dist/machine/m_netbsd.c:1.11 Wed Oct 21 17:11:57 2009 +++ src/external/bsd/top/dist/machine/m_netbsd.c Wed May 12 18:09:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: m_netbsd.c,v 1.11 2009/10/21 21:11:57 rmind Exp $ */ +/* $NetBSD: m_netbsd.c,v 1.12 2010/05/12 22:09:36 christos Exp $ */ /* * top - a top users display for Unix @@ -37,12 +37,12 @@ * Andrew Doran a...@netbsd.org * * - * $Id: m_netbsd.c,v 1.11 2009/10/21 21:11:57 rmind Exp $ + * $Id: m_netbsd.c,v 1.12 2010/05/12 22:09:36 christos Exp $ */ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: m_netbsd.c,v 1.11 2009/10/21 21:11:57 rmind Exp $); +__RCSID($NetBSD: m_netbsd.c,v 1.12 2010/05/12 22:09:36 christos Exp $); #endif #include sys/param.h @@ -70,14 +70,15 @@ #include loadavg.h #include username.h -static void percentages64 __P((int, int *, u_int64_t *, u_int64_t *, -u_int64_t *)); -static int get_cpunum __P((u_int64_t)); +static void percentages64(int, int *, u_int64_t *, u_int64_t *, +u_int64_t *); +static int get_cpunum(u_int64_t); /* get_process_info passes back a handle. This is what it looks like: */ struct handle { + struct process_select *sel; struct kinfo_proc2 **next_proc; /* points to next valid proc pointer */ int remaining; /* number of pointers remaining */ }; @@ -188,17 +189,17 @@ }; /* forward definitions for comparison functions */ -static int compare_cpu __P((struct proc **, struct proc **)); -static int compare_prio __P((struct proc **, struct proc **)); -static int compare_res __P((struct proc **, struct proc **)); -static int compare_size __P((struct proc **, struct proc **)); -static int compare_state __P((struct proc **, struct proc **)); -static int compare_time __P((struct proc **, struct proc **)); -static int compare_pid __P((struct proc **, struct proc **)); -static int compare_command __P((struct proc **, struct proc **)); -static int compare_username __P((struct proc **, struct proc **)); +static int compare_cpu(struct proc **, struct proc **); +static int compare_prio(struct proc **, struct proc **); +static int compare_res(struct proc **, struct proc **); +static int compare_size(struct proc **, struct proc **); +static int compare_state(struct proc **, struct proc **); +static int compare_time(struct proc **, struct proc **); +static int compare_pid(struct proc **, struct proc **); +static int compare_command(struct proc **, struct proc **); +static int compare_username(struct proc **, struct proc **); -int (*proc_compares[]) __P((struct proc **, struct proc **)) = { +int (*proc_compares[])(struct proc **, struct proc **) = { compare_cpu, compare_prio, compare_res, @@ -248,6 +249,57 @@ #define pagetok(size) ((size) pageshift) +/* + * Print swapped processes as pname and + * system processes as [pname] + */ +static const char * +get_pretty(const struct kinfo_proc2 *pp) +{ + if ((pp-p_flag P_SYSTEM) != 0) + return []; + if ((pp-p_flag P_INMEM) == 0) + return ; + return ; +} + +static const char * +get_command(const struct process_select *sel, struct kinfo_proc2 *pp) +{ + static char cmdbuf[128]; + const char *pretty; + char **argv; + if (pp == NULL) + return gone; + pretty = get_pretty(pp); + + if (sel-fullcmd == 0 || kd == NULL || (argv = kvm_getargv2(kd, pp, + sizeof(cmdbuf))) == NULL) { + if (pretty[0] != '\0' pp-p_comm[0] != pretty[0]) + snprintf(cmdbuf, sizeof(cmdbuf), %c%s%c, pretty[0], + printable(pp-p_comm), pretty[1]); + else + strlcpy(cmdbuf, printable(pp-p_comm), sizeof(cmdbuf)); + } else { + char *d = cmdbuf; + if (pretty[0] != '\0' argv[0][0] != pretty[0]) + *d++ = pretty[0]; + while (*argv) { + const char *s = printable(*argv++); + while (d cmdbuf + sizeof(cmdbuf) - 2 + (*d++ = *s++) != '\0') +continue; + if (d cmdbuf d cmdbuf + sizeof(cmdbuf) - 2 + d[-1] == '\0') +d[-1] = ' '; + } + if (pretty[0] != '\0' pretty[0] == cmdbuf[0]) + *d++ = pretty[1]; + *d++ = '\0'; + } + return cmdbuf; +} + static int get_cpunum(id) u_int64_t id; @@ -364,6 +416,7 @@ statics-swap_names = swapnames; statics-order_names = ordernames; statics-flags.threads = 1; + statics-flags.fullcmds = 1; mib[0] = CTL_KERN; mib[1] = KERN_BOOTTIME; @@ -637,6 +690,7 @@ /*
CVS commit: src/usr.sbin/traceroute6
Module Name:src Committed By: christos Date: Thu May 13 18:19:18 UTC 2010 Modified Files: src/usr.sbin/traceroute6: traceroute6.c Log Message: PR/19069: SUENAGA Hiroki: Original fix was defective because on big endian the expression is not truncated to 16 bits, thus sending to port 65536 makes the == 0 test fail and the packet ends up being sent. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/traceroute6/traceroute6.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.sbin/traceroute6/traceroute6.c diff -u src/usr.sbin/traceroute6/traceroute6.c:1.38 src/usr.sbin/traceroute6/traceroute6.c:1.39 --- src/usr.sbin/traceroute6/traceroute6.c:1.38 Mon Feb 16 15:36:11 2009 +++ src/usr.sbin/traceroute6/traceroute6.c Thu May 13 14:19:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: traceroute6.c,v 1.38 2009/02/16 20:36:11 is Exp $ */ +/* $NetBSD: traceroute6.c,v 1.39 2010/05/13 18:19:18 christos Exp $ */ /* $KAME: traceroute6.c,v 1.67 2004/01/25 03:24:39 itojun Exp $ */ /* @@ -75,7 +75,7 @@ #else #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: traceroute6.c,v 1.38 2009/02/16 20:36:11 is Exp $); +__RCSID($NetBSD: traceroute6.c,v 1.39 2010/05/13 18:19:18 christos Exp $); #endif #endif @@ -864,7 +864,7 @@ struct timeval t1, t2; (void) gettimeofday(t1, NULL); - if (!useicmp htons(port + seq + 1) == 0) + if (!useicmp htons((in_port_t)(port + seq + 1)) == 0) seq++; send_probe(++seq, hops); while ((cc = wait_for_reply(rcvsock, rcvmhdr))) {
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Thu May 13 22:40:14 UTC 2010 Modified Files: src/lib/libc/gen: syslog.c Log Message: PR/43300: Takahiro Kambe: LOG_PID and LOG_CONSOLE printed syslogp messages to the console/stderr since the syslogp conversion. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/lib/libc/gen/syslog.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/syslog.c diff -u src/lib/libc/gen/syslog.c:1.47 src/lib/libc/gen/syslog.c:1.48 --- src/lib/libc/gen/syslog.c:1.47 Sat Jan 10 21:46:27 2009 +++ src/lib/libc/gen/syslog.c Thu May 13 18:40:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: syslog.c,v 1.47 2009/01/11 02:46:27 christos Exp $ */ +/* $NetBSD: syslog.c,v 1.48 2010/05/13 22:40:14 christos Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)syslog.c 8.5 (Berkeley) 4/29/95; #else -__RCSID($NetBSD: syslog.c,v 1.47 2009/01/11 02:46:27 christos Exp $); +__RCSID($NetBSD: syslog.c,v 1.48 2010/05/13 22:40:14 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -224,6 +224,8 @@ vsyslogp_r(int pri, struct syslog_data *data, const char *msgid, const char *sdfmt, const char *msgfmt, va_list ap) { + static const char BRCOSP[] = ]: ; + static const char CRLF[] = \r\n; size_t cnt, prlen, tries; char ch, *p, *t; struct timeval tv; @@ -233,12 +235,12 @@ #define TBUF_LEN 2048 #define FMT_LEN 1024 #define MAXTRIES 10 - char *stdp = NULL; /* pacify gcc */ char tbuf[TBUF_LEN], fmt_cpy[FMT_LEN], fmt_cat[FMT_LEN] = ; - size_t tbuf_left, fmt_left; + size_t tbuf_left, fmt_left, msgsdlen; char *fmt = fmt_cat; int signal_safe = pri LOG_SIGNAL_SAFE; - int opened; + struct iovec iov[7]; /* prog + [ + pid + ]: + fmt + crlf */ + int opened, iovcnt; pri = ~LOG_SIGNAL_SAFE; @@ -306,19 +308,40 @@ prlen = snprintf_ss(p, tbuf_left, %s , hostname); DEC(); - if (data-log_stat LOG_PERROR) - stdp = p; if (data-log_tag == NULL) data-log_tag = getprogname(); prlen = snprintf_ss(p, tbuf_left, %s , data-log_tag ? data-log_tag : -); + if (data-log_stat (LOG_PERROR|LOG_CONS)) { + iovcnt = 0; + iov[iovcnt].iov_base = p; + iov[iovcnt].iov_len = prlen - 1; + iovcnt++; + } DEC(); - if (data-log_stat LOG_PID) + if (data-log_stat LOG_PID) { prlen = snprintf_ss(p, tbuf_left, %d , getpid()); - else + if (data-log_stat (LOG_PERROR|LOG_CONS)) { + iov[iovcnt].iov_base = __UNCONST([); + iov[iovcnt].iov_len = 1; + iovcnt++; + iov[iovcnt].iov_base = p; + iov[iovcnt].iov_len = prlen - 1; + iovcnt++; + iov[iovcnt].iov_base = __UNCONST(BRCOSP); + iov[iovcnt].iov_len = 3; + iovcnt++; + } + } else { prlen = snprintf_ss(p, tbuf_left, - ); + if (data-log_stat (LOG_PERROR|LOG_CONS)) { + iov[iovcnt].iov_base = __UNCONST(BRCOSP + 1); + iov[iovcnt].iov_len = 2; + iovcnt++; + } + } DEC(); /* @@ -335,6 +358,11 @@ } else strlcat(fmt_cat, -, FMT_LEN); + if (data-log_stat (LOG_PERROR|LOG_CONS)) + msgsdlen = strlen(fmt_cat) + 1; + else + msgsdlen = 0; /* XXX: GCC */ + if (msgfmt != NULL *msgfmt != '\0') { strlcat(fmt_cat, , FMT_LEN); strlcat(fmt_cat, msgfmt, FMT_LEN); @@ -376,18 +404,21 @@ prlen = vsnprintf_ss(p, tbuf_left, fmt_cpy, ap); else prlen = vsnprintf(p, tbuf_left, fmt_cpy, ap); + + if (data-log_stat (LOG_PERROR|LOG_CONS)) { + iov[iovcnt].iov_base = p + msgsdlen; + iov[iovcnt].iov_len = prlen - msgsdlen; + iovcnt++; + } + DEC(); cnt = p - tbuf; /* Output to stderr if requested. */ if (data-log_stat LOG_PERROR) { - struct iovec iov[2]; - - iov[0].iov_base = stdp; - iov[0].iov_len = cnt - (stdp - tbuf); - iov[1].iov_base = __UNCONST(\n); - iov[1].iov_len = 1; - (void)writev(STDERR_FILENO, iov, 2); + iov[iovcnt].iov_base = __UNCONST(CRLF + 1); + iov[iovcnt].iov_len = 1; + (void)writev(STDERR_FILENO, iov, iovcnt + 1); } /* Get connected, output the message to the local logger. */ @@ -422,14 +453,10 @@ * Make sure the error reported is the one from the syslogd failure. */ if (tries == MAXTRIES (data-log_stat LOG_CONS) - (fd = open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK, 0)) = 0 - (p = strchr(tbuf, '')) != NULL) { - struct iovec iov[2]; - iov[0].iov_base = ++p; - iov[0].iov_len = cnt - (p - tbuf); - iov[1].iov_base = __UNCONST(\r\n); - iov[1].iov_len = 2; - (void)writev(fd, iov, 2); + (fd = open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK, 0)) = 0) { + iov[iovcnt].iov_base = __UNCONST(CRLF); + iov[iovcnt].iov_len = 2; + (void)writev(fd, iov, iovcnt + 1); (void)close(fd); }
CVS commit: src/external/bsd/atf
Module Name:src Committed By: christos Date: Fri May 14 15:30:39 UTC 2010 Modified Files: src/external/bsd/atf/dist/atf-version: atf-version.cpp src/external/bsd/atf/usr.bin/atf-version: Makefile Log Message: make things compile. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/atf/dist/atf-version/atf-version.cpp cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/usr.bin/atf-version/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-version/atf-version.cpp diff -u src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.1.1.1 src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.2 --- src/external/bsd/atf/dist/atf-version/atf-version.cpp:1.1.1.1 Sat May 8 04:05:23 2010 +++ src/external/bsd/atf/dist/atf-version/atf-version.cpp Fri May 14 11:30:39 2010 @@ -30,7 +30,7 @@ #if defined(HAVE_CONFIG_H) #include bconfig.h #endif -#include atf-version/revision.h +#include revision.h #include cstdlib #include iostream Index: src/external/bsd/atf/usr.bin/atf-version/Makefile diff -u src/external/bsd/atf/usr.bin/atf-version/Makefile:1.2 src/external/bsd/atf/usr.bin/atf-version/Makefile:1.3 --- src/external/bsd/atf/usr.bin/atf-version/Makefile:1.2 Sat May 8 04:12:35 2010 +++ src/external/bsd/atf/usr.bin/atf-version/Makefile Fri May 14 11:30:39 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/05/08 08:12:35 jmmv Exp $ +# $NetBSD: Makefile,v 1.3 2010/05/14 15:30:39 christos Exp $ .include bsd.own.mk @@ -12,7 +12,7 @@ CPPFLAGS+= -DHAVE_CONFIG_H CPPFLAGS+= -I${.CURDIR}/../../lib/libatf-c -CPPFLAGS+= -I.. +CPPFLAGS+= -I.. -I. LDADD+= -latf-c++ -latf-c WARNS?= 2
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Mon May 17 17:01:16 UTC 2010 Modified Files: src/usr.bin/make: main.c Log Message: put back canonicalization, but avoid doing it for files that don't contain / From dholland To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/usr.bin/make/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/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.186 src/usr.bin/make/main.c:1.187 --- src/usr.bin/make/main.c:1.186 Mon May 10 11:54:21 2010 +++ src/usr.bin/make/main.c Mon May 17 13:01:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.186 2010/05/10 15:54:21 sjg Exp $ */ +/* $NetBSD: main.c,v 1.187 2010/05/17 17:01:16 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = $NetBSD: main.c,v 1.186 2010/05/10 15:54:21 sjg Exp $; +static char rcsid[] = $NetBSD: main.c,v 1.187 2010/05/17 17:01:16 christos Exp $; #else #include sys/cdefs.h #ifndef lint @@ -81,7 +81,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.3 (Berkeley) 3/19/94; #else -__RCSID($NetBSD: main.c,v 1.186 2010/05/10 15:54:21 sjg Exp $); +__RCSID($NetBSD: main.c,v 1.187 2010/05/17 17:01:16 christos Exp $); #endif #endif /* not lint */ #endif @@ -900,7 +900,22 @@ * MFLAGS also gets initialized empty, for compatibility. */ Parse_Init(); - p1 = argv[0]; + if (argv[0][0] == '/' || strchr(argv[0], '/') == NULL) { + /* + * Leave alone if it is an absolute path, or if it does + * not contain a '/' in which case we need to find it in + * the path, like execvp(3) and the shells do. + */ + p1 = argv[0]; + } else { + /* + * A relative path, canonicalize it. + */ + p1 = realpath(argv[0], mdpath); + if (!p1 || *p1 != '/' || stat(p1, sb) 0) { + p1 = argv[0]; /* realpath failed */ + } + } Var_Set(MAKE, p1, VAR_GLOBAL, 0); Var_Set(.MAKE, p1, VAR_GLOBAL, 0); Var_Set(MAKEFLAGS, , VAR_GLOBAL, 0);
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Tue May 18 21:47:43 UTC 2010 Modified Files: src/external/bsd/cron/dist: crontab.c Log Message: Forgot to commit this: Bring back the default to allow any user to install crontabs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/cron/dist/crontab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/crontab.c diff -u src/external/bsd/cron/dist/crontab.c:1.2 src/external/bsd/cron/dist/crontab.c:1.3 --- src/external/bsd/cron/dist/crontab.c:1.2 Thu May 6 14:53:17 2010 +++ src/external/bsd/cron/dist/crontab.c Tue May 18 17:47:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: crontab.c,v 1.2 2010/05/06 18:53:17 christos Exp $ */ +/* $NetBSD: crontab.c,v 1.3 2010/05/18 21:47:43 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp; #else -__RCSID($NetBSD: crontab.c,v 1.2 2010/05/06 18:53:17 christos Exp $); +__RCSID($NetBSD: crontab.c,v 1.3 2010/05/18 21:47:43 christos Exp $); #endif #endif @@ -587,7 +587,7 @@ */ (void)fprintf(tmp, # DO NOT EDIT THIS FILE - edit the master and reinstall.\n); (void)fprintf(tmp, # (%s installed on %-24.24s)\n, Filename, ctime(now)); - (void)fprintf(tmp, # (Cron version %s -- %s)\n, CRON_VERSION, $NetBSD: crontab.c,v 1.2 2010/05/06 18:53:17 christos Exp $); + (void)fprintf(tmp, # (Cron version %s -- %s)\n, CRON_VERSION, $NetBSD: crontab.c,v 1.3 2010/05/18 21:47:43 christos Exp $); /* copy the crontab to the tmp */ @@ -729,7 +729,11 @@ if (strcmp(username, ROOT_USER) == 0) return (TRUE); +#ifdef ALLOW_ONLY_ROOT isallowed = FALSE; +#else + isallowed = TRUE; +#endif if ((fp = fopen(allow_file, r)) != NULL) { isallowed = in_file(username, fp, FALSE); (void)fclose(fp);
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Tue May 18 21:49:52 UTC 2010 Modified Files: src/external/bsd/cron/dist: cron.c Log Message: - The new cron keeps time internally as localtime. Revert to previous behavior of keeping UTC, and handle timezones the way we handled them before (CRON_TZ). The old behavior can be selected with defining CRON_LOCALTIME. - Provide functions to pretty-print crontab entries. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/cron/dist/cron.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/cron.c diff -u src/external/bsd/cron/dist/cron.c:1.5 src/external/bsd/cron/dist/cron.c:1.6 --- src/external/bsd/cron/dist/cron.c:1.5 Fri May 7 13:12:00 2010 +++ src/external/bsd/cron/dist/cron.c Tue May 18 17:49:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cron.c,v 1.5 2010/05/07 17:12:00 christos Exp $ */ +/* $NetBSD: cron.c,v 1.6 2010/05/18 21:49:51 christos Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -25,7 +25,7 @@ #if 0 static char rcsid[] = Id: cron.c,v 1.12 2004/01/23 18:56:42 vixie Exp; #else -__RCSID($NetBSD: cron.c,v 1.5 2010/05/07 17:12:00 christos Exp $); +__RCSID($NetBSD: cron.c,v 1.6 2010/05/18 21:49:51 christos Exp $); #endif #endif @@ -264,14 +264,97 @@ (void) job_runqueue(); } +static const char * +bitprint(const bitstr_t *b, size_t l) +{ + size_t i, set, clear; + static char result[1024]; + char tmp[1024]; + + result[0] = '\0'; + for (i = 0;;) { + for (; i l; i++) + if (bit_test(b, i)) +break; + if (i == l) + return result; + set = i; + for (; i l; i++) + if (!bit_test(b, i)) +break; + clear = i; + if (set == 0 clear == l) { + snprintf(result, sizeof(result), *); + return result; + } + if (clear == l || set == clear - 1) + snprintf(tmp, sizeof(tmp), ,%zu, set); + else + snprintf(tmp, sizeof(tmp), ,%zu-%zu, set, clear - 1); + if (result[0] == '\0') + strlcpy(result, tmp + 1, sizeof(result)); + else + strlcat(result, tmp, sizeof(result)); + } +} + +static const char * +flagsprint(int flags) +{ + static char result[1024]; + + result[0] = '\0'; + if (flags MIN_STAR) + strlcat(result, ,min, sizeof(result)); + if (flags HR_STAR) + strlcat(result, ,hr, sizeof(result)); + if (flags DOM_STAR) + strlcat(result, ,dom, sizeof(result)); + if (flags DOW_STAR) + strlcat(result, ,dow, sizeof(result)); + if (flags WHEN_REBOOT) + strlcat(result, ,reboot, sizeof(result)); + if (flags DONT_LOG) + strlcat(result, ,nolog, sizeof(result)); + + return result + (result[0] == ','); +} + +static void +printone(char *res, size_t len, const char *b) +{ + int comma = strchr(b, ',') != NULL; + if (comma) + strlcat(res, [, len); + strlcat(res, b, len); + strlcat(res, ], + (comma ? 0 : 1), len); +} + +static const char * +tick(const entry *e) +{ + static char result[1024]; + + result[0] = '\0'; + printone(result, sizeof(result), bitprint(e-minute, MINUTE_COUNT)); + printone(result, sizeof(result), bitprint(e-hour, HOUR_COUNT)); + printone(result, sizeof(result), bitprint(e-dom, DOM_COUNT)); + printone(result, sizeof(result), bitprint(e-month, MONTH_COUNT)); + printone(result, sizeof(result), bitprint(e-dow, DOW_COUNT)); + strlcat(result, flags=, sizeof(result)); + strlcat(result, flagsprint(e-flags), sizeof(result)); + return result; +} + static void find_jobs(time_t vtime, cron_db *db, int doWild, int doNonWild) { - time_t virtualSecond = vtime * SECONDS_PER_MINUTE; - struct tm *tm = gmtime(virtualSecond); + time_t virtualSecond = vtime * SECONDS_PER_MINUTE; + struct tm *tm; int minute, hour, dom, month, dow; user *u; entry *e; - char *orig_tz, *job_tz; +#ifndef CRON_LOCALTIME + char *orig_tz, *job_tz; #define maketime(tz1, tz2) do { \ char *t = tz1; \ @@ -281,6 +364,7 @@ setenv(TZ, (tz2), 1); \ else \ unsetenv(TZ); \ + tzset(); \ tm = localtime(virtualSecond); \ minute = tm-tm_min -FIRST_MINUTE; \ hour = tm-tm_hour -FIRST_HOUR; \ @@ -291,6 +375,9 @@ orig_tz = getenv(TZ); maketime(NULL, orig_tz); +#else + tm = gmtime(virtualSecond); +#endif Debug(DSCH, ([%ld] tick(%d,%d,%d,%d,%d) %s %s\n, (long)getpid(), minute, hour, dom, month, dow, @@ -304,11 +391,19 @@ */ for (u = db-head; u != NULL; u = u-next) { for (e = u-crontab; e != NULL; e = e-next) { - Debug(DSCH|DEXT, (user [%s:%ld:%ld:...] cmd=\%s\\n, - e-pwd-pw_name, (long)e-pwd-pw_uid, - (long)e-pwd-pw_gid, e-cmd)); +#ifndef CRON_LOCALTIME job_tz = env_get(CRON_TZ, e-envp); maketime(job_tz, orig_tz); +#else +#define job_tz N/A +#define orig_tz N/A +#endif + Debug(DSCH|DEXT, (user [%s:%ld:%ld:...] + [jobtz=%s, origtz=%s] + tick(%s), cmd=\%s\\n, + e-pwd-pw_name, (long)e-pwd-pw_uid, + (long)e-pwd-pw_gid, job_tz, orig_tz, + tick(e), e-cmd)); if (bit_test(e-minute, minute)
CVS commit: src/external/bsd/cron/dist
Module Name:src Committed By: christos Date: Wed May 19 12:50:49 UTC 2010 Modified Files: src/external/bsd/cron/dist: pathnames.h Log Message: rename the allow and deny files to match the documentation. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/cron/dist/pathnames.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/cron/dist/pathnames.h diff -u src/external/bsd/cron/dist/pathnames.h:1.2 src/external/bsd/cron/dist/pathnames.h:1.3 --- src/external/bsd/cron/dist/pathnames.h:1.2 Thu May 6 14:53:17 2010 +++ src/external/bsd/cron/dist/pathnames.h Wed May 19 08:50:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pathnames.h,v 1.2 2010/05/06 18:53:17 christos Exp $ */ +/* $NetBSD: pathnames.h,v 1.3 2010/05/19 12:50:49 christos Exp $ */ /* Copyright 1993,1994 by Paul Vixie * All rights reserved @@ -56,8 +56,8 @@ /* cron allow/deny file. At least cron.deny must * exist for ordinary users to run crontab. */ -#define CRON_ALLOW cron.allow -#define CRON_DENY cron.deny +#define CRON_ALLOW allow +#define CRON_DENY deny /* undefining this turns off logging to a file. If * neither LOG_FILE or SYSLOG is defined, we don't log.
CVS commit: src/sys
Module Name:src Committed By: christos Date: Wed May 19 20:41:59 UTC 2010 Modified Files: src/sys/arch/evbmips/adm5120: machdep.c src/sys/dev/usb: if_cdce.c src/sys/net: if_ether.h if_etherip.c if_ethersubr.c if_tap.c Log Message: Replace ether_nonstatic_aton with a - better named one - not suffering from buffer oveflow - simpler - handling different separators - returning error codes for errors Some ideas from one posted on tech-net by Jonathan A. Kollasch To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbmips/adm5120/machdep.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.57 -r1.58 src/sys/net/if_ether.h cvs rdiff -u -r1.29 -r1.30 src/sys/net/if_etherip.c cvs rdiff -u -r1.179 -r1.180 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.64 -r1.65 src/sys/net/if_tap.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/evbmips/adm5120/machdep.c diff -u src/sys/arch/evbmips/adm5120/machdep.c:1.16 src/sys/arch/evbmips/adm5120/machdep.c:1.17 --- src/sys/arch/evbmips/adm5120/machdep.c:1.16 Mon Feb 8 14:02:27 2010 +++ src/sys/arch/evbmips/adm5120/machdep.c Wed May 19 16:41:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.16 2010/02/08 19:02:27 joerg Exp $ */ +/* $NetBSD: machdep.c,v 1.17 2010/05/19 20:41:59 christos Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -107,7 +107,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.16 2010/02/08 19:02:27 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.17 2010/05/19 20:41:59 christos Exp $); #include opt_ddb.h #include opt_kgdb.h @@ -281,7 +281,7 @@ } else if (strcmp(key, kmac) == 0) { prop_data_t pd; - ether_nonstatic_aton(enaddr, val); + (void)ether_aton_r(enaddr, sizeof(enaddr), val); if (properties == NULL) continue; pd = prop_data_create_data(enaddr, sizeof(enaddr)); Index: src/sys/dev/usb/if_cdce.c diff -u src/sys/dev/usb/if_cdce.c:1.28 src/sys/dev/usb/if_cdce.c:1.29 --- src/sys/dev/usb/if_cdce.c:1.28 Mon Apr 5 03:21:48 2010 +++ src/sys/dev/usb/if_cdce.c Wed May 19 16:41:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cdce.c,v 1.28 2010/04/05 07:21:48 joerg Exp $ */ +/* $NetBSD: if_cdce.c,v 1.29 2010/05/19 20:41:59 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul wp...@windriver.com @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_cdce.c,v 1.28 2010/04/05 07:21:48 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: if_cdce.c,v 1.29 2010/05/19 20:41:59 christos Exp $); #ifdef __NetBSD__ #include opt_inet.h #endif @@ -268,7 +268,7 @@ memcpy(eaddr[1], hardclock_ticks, sizeof(u_int32_t)); eaddr[5] = (u_int8_t)(device_unit(sc-cdce_dev)); } else { - (void)ether_nonstatic_aton(eaddr, eaddr_str); + (void)ether_aton_r(eaddr, sizeof(eaddr), eaddr_str); } s = splnet(); Index: src/sys/net/if_ether.h diff -u src/sys/net/if_ether.h:1.57 src/sys/net/if_ether.h:1.58 --- src/sys/net/if_ether.h:1.57 Wed May 19 14:58:22 2010 +++ src/sys/net/if_ether.h Wed May 19 16:41:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ether.h,v 1.57 2010/05/19 18:58:22 jakllsch Exp $ */ +/* $NetBSD: if_ether.h,v 1.58 2010/05/19 20:41:59 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -310,7 +310,7 @@ uint32_t ether_crc32_le(const uint8_t *, size_t); uint32_t ether_crc32_be(const uint8_t *, size_t); -int ether_nonstatic_aton(u_char *, const char *); +int ether_aton_r(u_char *, size_t, const char *); #else /* * Prototype ethers(3) functions. Index: src/sys/net/if_etherip.c diff -u src/sys/net/if_etherip.c:1.29 src/sys/net/if_etherip.c:1.30 --- src/sys/net/if_etherip.c:1.29 Mon Apr 5 03:22:23 2010 +++ src/sys/net/if_etherip.c Wed May 19 16:41:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_etherip.c,v 1.29 2010/04/05 07:22:23 joerg Exp $*/ +/* $NetBSD: if_etherip.c,v 1.30 2010/05/19 20:41:59 christos Exp $*/ /* * Copyright (c) 2006, Hans Rosenfeld rosenf...@grumpf.hope-2000.org @@ -86,7 +86,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_etherip.c,v 1.29 2010/04/05 07:22:23 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: if_etherip.c,v 1.30 2010/05/19 20:41:59 christos Exp $); #include opt_inet.h @@ -691,7 +691,7 @@ return EINVAL; /* Commit change */ - if (ether_nonstatic_aton(enaddr, addr) != 0) + if (ether_aton_r(enaddr, sizeof(enaddr), addr) != 0) return EINVAL; if_set_sadl(ifp, enaddr, ETHER_ADDR_LEN, false); Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.179 src/sys/net/if_ethersubr.c:1.180 --- src/sys/net/if_ethersubr.c:1.179 Wed May 19 14:58:22 2010 +++ src/sys/net/if_ethersubr.c Wed May 19 16:41:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.179 2010/05/19 18:58:22 jakllsch Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.180
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Wed May 19 20:43:51 UTC 2010 Modified Files: src/sys/net: if_ethersubr.c Log Message: delint previous To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.180 src/sys/net/if_ethersubr.c:1.181 --- src/sys/net/if_ethersubr.c:1.180 Wed May 19 16:41:59 2010 +++ src/sys/net/if_ethersubr.c Wed May 19 16:43:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.180 2010/05/19 20:41:59 christos Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.181 2010/05/19 20:43:51 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.180 2010/05/19 20:41:59 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.181 2010/05/19 20:43:51 christos Exp $); #include opt_inet.h #include opt_atalk.h @@ -1226,7 +1226,6 @@ int ether_aton_r(u_char *dest, size_t len, const char *str) { -int i; const u_char *cp = (const void *)str; u_char *ep; @@ -1247,7 +1246,7 @@ dest++; cp++; } else - *dest++; + dest++; if (dest == ep) return *cp == '\0' ? 0 : ENAMETOOLONG; switch (*cp) {
CVS commit: src/regress/sys/net
Module Name:src Committed By: christos Date: Wed May 19 21:55:36 UTC 2010 Modified Files: src/regress/sys/net: Makefile Added Files: src/regress/sys/net/ether_aton_r: Makefile autogen main.c Log Message: regression test for ether_aton_r() To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/regress/sys/net/Makefile cvs rdiff -u -r0 -r1.1 src/regress/sys/net/ether_aton_r/Makefile \ src/regress/sys/net/ether_aton_r/autogen \ src/regress/sys/net/ether_aton_r/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/regress/sys/net/Makefile diff -u src/regress/sys/net/Makefile:1.1 src/regress/sys/net/Makefile:1.2 --- src/regress/sys/net/Makefile:1.1 Wed Dec 14 18:55:02 2005 +++ src/regress/sys/net/Makefile Wed May 19 17:55:35 2010 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2005/12/14 23:55:02 rpaulo Exp $ +# $NetBSD: Makefile,v 1.2 2010/05/19 21:55:35 christos Exp $ .include bsd.own.mk -SUBDIR= bpf +SUBDIR= bpf ether_aton_r .include bsd.subdir.mk Added files: Index: src/regress/sys/net/ether_aton_r/Makefile diff -u /dev/null src/regress/sys/net/ether_aton_r/Makefile:1.1 --- /dev/null Wed May 19 17:55:36 2010 +++ src/regress/sys/net/ether_aton_r/Makefile Wed May 19 17:55:36 2010 @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2010/05/19 21:55:36 christos Exp $ +# +# To use this, copy / link the cpu_in_cksum.S from the arch subdirectory +# and copy assym.h from the build directory of a kernel. +# + +NOMAN= # defined +.include bsd.own.mk + +PROG= ether_aton_r +SRCS= ether_aton_r.c main.c +WARNS ?= 4 + +CLEANFILES+=ether_aton_r.c + +ether_aton_r.c: autogen ${NETBSDSRCDIR}/sys/net/if_ethersubr.c + ${.ALLSRC} ${.TARGET} + +regress: + @if ./${PROG} ; then \ + echo PASSED; \ + else\ + echo FAILED; \ + fi + +.include bsd.prog.mk Index: src/regress/sys/net/ether_aton_r/autogen diff -u /dev/null src/regress/sys/net/ether_aton_r/autogen:1.1 --- /dev/null Wed May 19 17:55:36 2010 +++ src/regress/sys/net/ether_aton_r/autogen Wed May 19 17:55:36 2010 @@ -0,0 +1,26 @@ +#!/bin/sh + +cat __EOF $2 + +#include ctype.h +#include sys/types.h +#include errno.h + +#define ETHER_ADDR_LEN 6 + +int ether_aton_r(u_char *dest, size_t len, const char *str); + +__EOF + +ed $1 _EOF /dev/null 21 +1 +/^ether_aton_r/ +- +- +1,.d +/^}$/ ++ +.,\$d +W $2 +q +_EOF Index: src/regress/sys/net/ether_aton_r/main.c diff -u /dev/null src/regress/sys/net/ether_aton_r/main.c:1.1 --- /dev/null Wed May 19 17:55:36 2010 +++ src/regress/sys/net/ether_aton_r/main.c Wed May 19 17:55:36 2010 @@ -0,0 +1,96 @@ +/* $NetBSD: main.c,v 1.1 2010/05/19 21:55:36 christos Exp $ */ + +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + *must display the following acknowledgement: + *This product includes software developed by the NetBSD + *Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + *contributors may be used to endorse or promote products derived + *from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include sys/cdefs.h +__RCSID($NetBSD: main.c,v 1.1 2010/05/19 21:55:36 christos Exp $); + +#include stdio.h +#include ctype.h +#include sys/types.h +#include err.h +#include string.h +#include errno.h + +#define ETHER_ADDR_LEN 6 + +int ether_aton_r(u_char *dest, size_t len, const char *str
CVS commit: src/regress/sys/net/ether_aton_r
Module Name:src Committed By: christos Date: Wed May 19 21:59:35 UTC 2010 Modified Files: src/regress/sys/net/ether_aton_r: main.c Log Message: verify hex digits. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/regress/sys/net/ether_aton_r/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/regress/sys/net/ether_aton_r/main.c diff -u src/regress/sys/net/ether_aton_r/main.c:1.1 src/regress/sys/net/ether_aton_r/main.c:1.2 --- src/regress/sys/net/ether_aton_r/main.c:1.1 Wed May 19 17:55:36 2010 +++ src/regress/sys/net/ether_aton_r/main.c Wed May 19 17:59:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.1 2010/05/19 21:55:36 christos Exp $ */ +/* $NetBSD: main.c,v 1.2 2010/05/19 21:59:34 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: main.c,v 1.1 2010/05/19 21:55:36 christos Exp $); +__RCSID($NetBSD: main.c,v 1.2 2010/05/19 21:59:34 christos Exp $); #include stdio.h #include ctype.h @@ -60,6 +60,7 @@ #define ZERO { 0, 0, 0, 0, 0, 0 } { { 0, 1, 0x22, 3, 0x14, 5 }, 0:1:22-3:14:05, 0 }, { { 0, 1, 0x22, 3, 0x14, 5 }, 000122031405, 0 }, + { { 0xa, 0xB, 0xcc, 0xdD, 0xEE, 0xf }, 0a0BccdDEE0f, 0 }, { ZERO, 0:1:2-3:04:05:06, ENAMETOOLONG }, { ZERO, 0:1:2-3:04:, ENOBUFS }, { ZERO, 0:1:2-3:04:x7, EINVAL },
CVS commit: src/external/mit/xorg
Module Name:src Committed By: christos Date: Thu May 20 12:51:17 UTC 2010 Modified Files: src/external/mit/xorg/bin/xkbcomp: Makefile Makefile.common src/external/mit/xorg/server/xorg-server/xkb: Makefile Log Message: Allow the build to work on a read-only source tree. From Anon Ymous To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/bin/xkbcomp/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/bin/xkbcomp/Makefile.common cvs rdiff -u -r1.6 -r1.7 \ src/external/mit/xorg/server/xorg-server/xkb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xkbcomp/Makefile diff -u src/external/mit/xorg/bin/xkbcomp/Makefile:1.5 src/external/mit/xorg/bin/xkbcomp/Makefile:1.6 --- src/external/mit/xorg/bin/xkbcomp/Makefile:1.5 Wed Sep 30 22:27:59 2009 +++ src/external/mit/xorg/bin/xkbcomp/Makefile Thu May 20 08:51:16 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2009/10/01 02:27:59 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2010/05/20 12:51:16 christos Exp $ .include bsd.own.mk .include Makefile.common @@ -9,16 +9,16 @@ symbols.c geometry.c xkbpath.c listing.c \ xkbparse.y parseutils.c utils.c -CPPFLAGS.xkbpath.c= -DDFLT_XKB_CONFIG_ROOT=\${XKBCOMPDIR}\ +CPPFLAGS.xkbpath.c= -DDFLT_XKB_CONFIG_ROOT=\${XKBROOTDIR}\ CPPFLAGS+= -I${X11SRCDIR.${PROG}} -I${X11SRCDIR.${PROG}}/../include -DHAVE_CONFIG_H CPPFLAGS.geometry.c= -Wno-error # XXX -FILESDIR=${X11LIBDIR}/xkb +FILESDIR=${XKBROOTDIR} FILES= README README.config README.enhancing -SYMLINKS+= ${BINDIR}/xkbcomp ${X11LIBDIR}/xkb/xkbcomp -SYMLINKS+= ${XKBCOMPDIR} ${X11LIBDIR}/xkb/compiled +SYMLINKS+= ${BINDIR}/xkbcomp ${XKBROOTDIR}/xkbcomp +SYMLINKS+= ${XKBDATADIR} ${XKBCOMPDIR} LDADD+= -lxkbfile -lXext -lX11 DPADD+= ${LIBXKBFILE} ${LIBXEXT} ${LIBX11} Index: src/external/mit/xorg/bin/xkbcomp/Makefile.common diff -u src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.2 src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.3 --- src/external/mit/xorg/bin/xkbcomp/Makefile.common:1.2 Wed Sep 30 22:27:59 2009 +++ src/external/mit/xorg/bin/xkbcomp/Makefile.common Thu May 20 08:51:16 2010 @@ -1,3 +1,5 @@ -# $NetBSD: Makefile.common,v 1.2 2009/10/01 02:27:59 mrg Exp $ +# $NetBSD: Makefile.common,v 1.3 2010/05/20 12:51:16 christos Exp $ -XKBCOMPDIR= ${X11LIBDIR}/xkb +XKBROOTDIR= ${X11LIBDIR}/xkb +XKBCOMPDIR= ${XKBROOTDIR}/compiled # actually a link to ${XKBDATADIR} +XKBDATADIR= /var/db/xkb # must be writable! Index: src/external/mit/xorg/server/xorg-server/xkb/Makefile diff -u src/external/mit/xorg/server/xorg-server/xkb/Makefile:1.6 src/external/mit/xorg/server/xorg-server/xkb/Makefile:1.7 --- src/external/mit/xorg/server/xorg-server/xkb/Makefile:1.6 Fri Sep 25 02:07:06 2009 +++ src/external/mit/xorg/server/xorg-server/xkb/Makefile Thu May 20 08:51:17 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2009/09/25 06:07:06 mrg Exp $ +# $NetBSD: Makefile,v 1.7 2010/05/20 12:51:17 christos Exp $ .include ../Makefile.serverlib .include ../Makefile.servermod @@ -30,13 +30,15 @@ -I${X11SRCDIR.xorg-server}/hw/xfree86/common \ -I${X11SRCDIR.xorg-server}/../include -# For ${XKBCOMPDIR} +# For ${XKBROOTDIR} and ${XKBCOMPDIR} .include ../../../bin/xkbcomp/Makefile.common +# XXX: ddxLoad.c expects XKM_OUTPUT_DIR to have a trailing '/'. + CPPFLAGS+= -DXKB_IN_SERVER -DHAVE_XKB_CONFIG_H \ - -DXKB_BASE_DIRECTORY=\${X11LIBDIR}/xkb\ \ + -DXKB_BASE_DIRECTORY=\${XKBROOTDIR}\ \ -DXKB_BIN_DIRECTORY=\${X11BINDIR}\ \ - -DXKM_OUTPUT_DIR=\${XKBCOMPDIR}\ \ + -DXKM_OUTPUT_DIR=\${XKBCOMPDIR}/\ \ -DXKB_DFLT_DISABLED=0 COPTS.XKBAlloc.c= -Wno-error # XXX gcc 3.3
CVS commit: src
Module Name:src Committed By: christos Date: Sat May 22 02:31:26 UTC 2010 Modified Files: src: UPDATING Log Message: mention compiled xkb move. To generate a diff of this commit: cvs rdiff -u -r1.209 -r1.210 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.209 src/UPDATING:1.210 --- src/UPDATING:1.209 Mon Feb 22 07:35:32 2010 +++ src/UPDATING Fri May 21 22:31:25 2010 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.209 2010/02/22 12:35:32 njoly Exp $ +$NetBSD: UPDATING,v 1.210 2010/05/22 02:31:25 christos 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,11 @@ Recent changes: ^^^ +20100520: + The location of the xkb compiled descriptions has changed. Please + remove usr/X11R7/lib/X11/xkb/compiled from your $DESTDIR. + + 20100222: The shared objects file extension has been changed from .so to .pico, in order to avoid conflicts with shared libraries names
CVS commit: src/sys/dev/ieee1394
Module Name:src Committed By: christos Date: Sun May 23 02:24:40 UTC 2010 Modified Files: src/sys/dev/ieee1394: firewire.c firewirereg.h Log Message: don't allocate rom scratch memory from an interrupt context: fwohci0: BUS reset panic: kernel diagnostic assertion !cpu_intr_p() failed: file ../../../../ker n/subr_kmem.c, line 195 fatal breakpoint trap in supervisor mode trap type 1 code 0 rip 8022db1d cs 8 rflags 246 cr2 0 cpl 6 rsp fff f80fafb08 breakpoint() at netbsd:breakpoint+0x5 panic() at netbsd:panic+0x2ba kern_assert() at netbsd:kern_assert+0x2d kmem_alloc() at netbsd:kmem_alloc+0x18a kmem_zalloc() at netbsd:kmem_zalloc+0xf fw_busreset() at netbsd:fw_busreset+0x23b fwohci_intr() at netbsd:fwohci_intr+0xa56 ... To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ieee1394/firewire.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ieee1394/firewirereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ieee1394/firewire.c diff -u src/sys/dev/ieee1394/firewire.c:1.33 src/sys/dev/ieee1394/firewire.c:1.34 --- src/sys/dev/ieee1394/firewire.c:1.33 Sat May 15 06:42:51 2010 +++ src/sys/dev/ieee1394/firewire.c Sat May 22 22:24:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: firewire.c,v 1.33 2010/05/15 10:42:51 kiyohara Exp $ */ +/* $NetBSD: firewire.c,v 1.34 2010/05/23 02:24:40 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: firewire.c,v 1.33 2010/05/15 10:42:51 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: firewire.c,v 1.34 2010/05/23 02:24:40 christos Exp $); #include sys/param.h #include sys/bus.h @@ -548,7 +548,6 @@ struct firewire_dev_list *devlist; struct firewire_dev_comm *fdc; struct crom_src *src; - uint32_t *newrom; if (fc-status == FWBUSMGRELECT) callout_stop(fc-bmr_callout); @@ -583,15 +582,13 @@ * Configuration ROM. */ #define FW_MAX_GENERATION 0xF - newrom = kmem_zalloc(CROMSIZE, KM_NOSLEEP); src = fc-crom_src_buf-src; - crom_load(src, newrom, CROMSIZE); - if (memcmp(newrom, fc-config_rom, CROMSIZE) != 0) { + crom_load(src, fc-new_rom, CROMSIZE); + if (memcmp(fc-new_rom, fc-config_rom, CROMSIZE) != 0) { if (src-businfo.generation++ FW_MAX_GENERATION) src-businfo.generation = FW_GENERATION_CHANGEABLE; - memcpy((void *)fc-config_rom, newrom, CROMSIZE); + memcpy(fc-config_rom, fc-new_rom, CROMSIZE); } - kmem_free(newrom, CROMSIZE); } /* Call once after reboot */ Index: src/sys/dev/ieee1394/firewirereg.h diff -u src/sys/dev/ieee1394/firewirereg.h:1.11 src/sys/dev/ieee1394/firewirereg.h:1.12 --- src/sys/dev/ieee1394/firewirereg.h:1.11 Sun Mar 28 23:05:27 2010 +++ src/sys/dev/ieee1394/firewirereg.h Sat May 22 22:24:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: firewirereg.h,v 1.11 2010/03/29 03:05:27 kiyohara Exp $ */ +/* $NetBSD: firewirereg.h,v 1.12 2010/05/23 02:24:40 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -141,6 +141,7 @@ uint32_t csr_arc[CSRSIZE/4]; #define CROMSIZE 0x400 uint32_t *config_rom; + uint32_t *new_rom; struct crom_src_buf *crom_src_buf; struct crom_src *crom_src; struct crom_chunk *crom_root;
CVS commit: src/usr.bin/telnet
Module Name:src Committed By: christos Date: Tue Jan 10 13:49:32 UTC 2012 Modified Files: src/usr.bin/telnet: telnet.c Log Message: fix signed/unsigned comparison. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/usr.bin/telnet/telnet.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/telnet/telnet.c diff -u src/usr.bin/telnet/telnet.c:1.35 src/usr.bin/telnet/telnet.c:1.36 --- src/usr.bin/telnet/telnet.c:1.35 Mon Jan 9 11:08:55 2012 +++ src/usr.bin/telnet/telnet.c Tue Jan 10 08:49:32 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: telnet.c,v 1.35 2012/01/09 16:08:55 christos Exp $ */ +/* $NetBSD: telnet.c,v 1.36 2012/01/10 13:49:32 christos Exp $ */ /* * Copyright (c) 1988, 1990, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)telnet.c 8.4 (Berkeley) 5/30/95; #else -__RCSID($NetBSD: telnet.c,v 1.35 2012/01/09 16:08:55 christos Exp $); +__RCSID($NetBSD: telnet.c,v 1.36 2012/01/10 13:49:32 christos Exp $); #endif #endif /* not lint */ @@ -1633,7 +1633,7 @@ env_opt_add(unsigned char *ep) vp = env_getvalue(ep); elen = 2 * (vp ? strlen((char *)vp) : 0) + 2 * strlen((char *)ep) + 6; - if ((opt_replyend - opt_replyp) elen) + if ((unsigned int)(opt_replyend - opt_replyp) elen) { unsigned char *p; len = opt_replyend - opt_reply + elen;
CVS commit: src/tests/net/bpf
Module Name:src Committed By: christos Date: Fri Jan 13 16:28:44 UTC 2012 Modified Files: src/tests/net/bpf: t_bpf.c Log Message: PR/44196 is now fixed, so don't expect a failure. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/net/bpf/t_bpf.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/net/bpf/t_bpf.c diff -u src/tests/net/bpf/t_bpf.c:1.3 src/tests/net/bpf/t_bpf.c:1.4 --- src/tests/net/bpf/t_bpf.c:1.3 Sun Dec 18 17:51:00 2011 +++ src/tests/net/bpf/t_bpf.c Fri Jan 13 11:28:44 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_bpf.c,v 1.3 2011/12/18 22:51:00 joerg Exp $ */ +/* $NetBSD: t_bpf.c,v 1.4 2012/01/13 16:28:44 christos Exp $ */ /*- * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -90,7 +90,6 @@ ATF_TC_BODY(bpfwriteleak, tc) ATF_REQUIRE_ERRNO(ENETDOWN, rump_sys_write(bpfd, buf, sizeof(buf))==-1); - atf_tc_expect_fail(PR kern/44196); ATF_REQUIRE_EQ(getmtdata(), 0); }
CVS commit: src/usr.bin/ftp
Module Name:src Committed By: christos Date: Sun Jan 15 03:58:28 UTC 2012 Modified Files: src/usr.bin/ftp: cmds.c Log Message: make -R work the same in ftp:// like it does for http:// (i.e. work if there is no local file). To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133 src/usr.bin/ftp/cmds.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/ftp/cmds.c diff -u src/usr.bin/ftp/cmds.c:1.132 src/usr.bin/ftp/cmds.c:1.133 --- src/usr.bin/ftp/cmds.c:1.132 Fri Sep 16 11:39:26 2011 +++ src/usr.bin/ftp/cmds.c Sat Jan 14 22:58:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cmds.c,v 1.132 2011/09/16 15:39:26 joerg Exp $ */ +/* $NetBSD: cmds.c,v 1.133 2012/01/15 03:58:28 christos Exp $ */ /*- * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ #if 0 static char sccsid[] = @(#)cmds.c 8.6 (Berkeley) 10/9/94; #else -__RCSID($NetBSD: cmds.c,v 1.132 2011/09/16 15:39:26 joerg Exp $); +__RCSID($NetBSD: cmds.c,v 1.133 2012/01/15 03:58:28 christos Exp $); #endif #endif /* not lint */ @@ -111,6 +111,7 @@ __RCSID($NetBSD: cmds.c,v 1.132 2011/09 #include ctype.h #include err.h +#include errno.h #include glob.h #include limits.h #include netdb.h @@ -556,7 +557,7 @@ void reget(int argc, char *argv[]) { - (void)getit(argc, argv, 1, r+); + (void)getit(argc, argv, 1, restart_point ? r+ : w ); } void @@ -612,10 +613,14 @@ getit(int argc, char *argv[], int restar ret = stat(locfile, stbuf); if (restartit == 1) { if (ret 0) { -warn(Can't stat `%s', locfile); -goto freegetit; +if (errno != ENOENT) { + warn(Can't stat `%s', locfile); + goto freegetit; +} +restart_point = 0; } - restart_point = stbuf.st_size; + else +restart_point = stbuf.st_size; } else { if (ret == 0) { time_t mtime;
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Mon Jan 16 14:57:46 UTC 2012 Modified Files: src/lib/libedit: vi.c Log Message: PR/45843: Henning Petersen: Fix resource leak on error. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/lib/libedit/vi.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/libedit/vi.c diff -u src/lib/libedit/vi.c:1.42 src/lib/libedit/vi.c:1.43 --- src/lib/libedit/vi.c:1.42 Fri Nov 18 15:24:21 2011 +++ src/lib/libedit/vi.c Mon Jan 16 09:57:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.42 2011/11/18 20:24:21 christos Exp $ */ +/* $NetBSD: vi.c,v 1.43 2012/01/16 14:57:45 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)vi.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: vi.c,v 1.42 2011/11/18 20:24:21 christos Exp $); +__RCSID($NetBSD: vi.c,v 1.43 2012/01/16 14:57:45 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -1006,9 +1006,9 @@ vi_histedit(EditLine *el, Int c __attrib ssize_t st; int status; char tempfile[] = /tmp/histedit.XX; - char *cp; + char *cp = NULL; size_t len; - Char *line; + Char *line = NULL; if (el-el_state.doingarg) { if (vi_to_history_line(el, 0) == CC_ERROR) @@ -1021,16 +1021,11 @@ vi_histedit(EditLine *el, Int c __attrib len = (size_t)(el-el_line.lastchar - el-el_line.buffer); #define TMP_BUFSIZ (EL_BUFSIZ * MB_LEN_MAX) cp = el_malloc(TMP_BUFSIZ * sizeof(*cp)); - if (cp == NULL) { - unlink(tempfile); - close(fd); - return CC_ERROR; - } + if (cp == NULL) + goto error; line = el_malloc(len * sizeof(*line) + 1); - if (line == NULL) { - el_free(cp); - return CC_ERROR; - } + if (line == NULL) + goto error; Strncpy(line, el-el_line.buffer, len); line[len] = '\0'; ct_wcstombs(cp, line, TMP_BUFSIZ - 1); @@ -1041,11 +1036,7 @@ vi_histedit(EditLine *el, Int c __attrib pid = fork(); switch (pid) { case -1: - close(fd); - unlink(tempfile); - el_free(cp); -el_free(line); - return CC_ERROR; + goto error; case 0: close(fd); execlp(vi, vi, tempfile, (char *)NULL); @@ -1076,6 +1067,12 @@ vi_histedit(EditLine *el, Int c __attrib unlink(tempfile); /* return CC_REFRESH; */ return ed_newline(el, 0); +error: + el_free(line); + el_free(cp); + close(fd); + unlink(tempfile); + return CC_ERROR; } /* vi_history_word():
CVS commit: src
Module Name:src Committed By: christos Date: Mon Jan 16 17:38:16 UTC 2012 Modified Files: src/games/battlestar: getcom.c src/sbin/routed: parms.c src/usr.bin/mail: edit.c src/usr.bin/tftp: main.c src/usr.sbin/timed/timedc: timedc.c Log Message: PR/45842: Henning Petersen: compare fgets with NULL not 0 To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/games/battlestar/getcom.c cvs rdiff -u -r1.25 -r1.26 src/sbin/routed/parms.c cvs rdiff -u -r1.25 -r1.26 src/usr.bin/mail/edit.c cvs rdiff -u -r1.29 -r1.30 src/usr.bin/tftp/main.c cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/timed/timedc/timedc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/battlestar/getcom.c diff -u src/games/battlestar/getcom.c:1.13 src/games/battlestar/getcom.c:1.14 --- src/games/battlestar/getcom.c:1.13 Fri Jul 1 02:04:54 2005 +++ src/games/battlestar/getcom.c Mon Jan 16 12:38:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: getcom.c,v 1.13 2005/07/01 06:04:54 jmc Exp $ */ +/* $NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)getcom.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: getcom.c,v 1.13 2005/07/01 06:04:54 jmc Exp $); +__RCSID($NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $); #endif #endif/* not lint */ @@ -45,7 +45,7 @@ getcom(char *buf, int size, const char * { for (;;) { fputs(prompt, stdout); - if (fgets(buf, size, stdin) == 0) { + if (fgets(buf, size, stdin) == NULL) { if (feof(stdin)) die(); clearerr(stdin); Index: src/sbin/routed/parms.c diff -u src/sbin/routed/parms.c:1.25 src/sbin/routed/parms.c:1.26 --- src/sbin/routed/parms.c:1.25 Tue May 24 08:03:04 2011 +++ src/sbin/routed/parms.c Mon Jan 16 12:38:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: parms.c,v 1.25 2011/05/24 12:03:04 joerg Exp $ */ +/* $NetBSD: parms.c,v 1.26 2012/01/16 17:38:16 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #include sys/stat.h #ifdef __NetBSD__ -__RCSID($NetBSD: parms.c,v 1.25 2011/05/24 12:03:04 joerg Exp $); +__RCSID($NetBSD: parms.c,v 1.26 2012/01/16 17:38:16 christos Exp $); #elif defined(__FreeBSD__) __RCSID($FreeBSD$); #else @@ -192,7 +192,7 @@ gwkludge(void) } for (lnum = 1; ; lnum++) { - if (0 == fgets(lbuf, sizeof(lbuf), fp)) + if (fgets(lbuf, sizeof(lbuf), fp) == NULL) break; lptr = lbuf; while (*lptr == ' ') Index: src/usr.bin/mail/edit.c diff -u src/usr.bin/mail/edit.c:1.25 src/usr.bin/mail/edit.c:1.26 --- src/usr.bin/mail/edit.c:1.25 Fri Apr 10 09:08:24 2009 +++ src/usr.bin/mail/edit.c Mon Jan 16 12:38:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: edit.c,v 1.25 2009/04/10 13:08:24 christos Exp $ */ +/* $NetBSD: edit.c,v 1.26 2012/01/16 17:38:16 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)edit.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: edit.c,v 1.25 2009/04/10 13:08:24 christos Exp $); +__RCSID($NetBSD: edit.c,v 1.26 2012/01/16 17:38:16 christos Exp $); #endif #endif /* not lint */ @@ -172,7 +172,7 @@ edit1(int *msgvec, int editortype) char *p; (void)printf(Edit message %d [ynq]? , msgvec[i]); - if (fgets(buf, (int)sizeof(buf), stdin) == 0) + if (fgets(buf, (int)sizeof(buf), stdin) == NULL) break; p = skip_WSP(buf); if (*p == 'q') Index: src/usr.bin/tftp/main.c diff -u src/usr.bin/tftp/main.c:1.29 src/usr.bin/tftp/main.c:1.30 --- src/usr.bin/tftp/main.c:1.29 Sat Sep 17 11:15:46 2011 +++ src/usr.bin/tftp/main.c Mon Jan 16 12:38:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.29 2011/09/17 15:15:46 christos Exp $ */ +/* $NetBSD: main.c,v 1.30 2012/01/16 17:38:16 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -36,7 +36,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = @(#)main.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: main.c,v 1.29 2011/09/17 15:15:46 christos Exp $); +__RCSID($NetBSD: main.c,v 1.30 2012/01/16 17:38:16 christos Exp $); #endif #endif /* not lint */ @@ -662,7 +662,7 @@ command(void) for (;;) { (void)printf(%s , prompt); - if (fgets(line, LBUFLEN, stdin) == 0) { + if (fgets(line, LBUFLEN, stdin) == NULL) { if (feof(stdin)) { exit(0); } else { Index: src/usr.sbin/timed/timedc/timedc.c diff -u src/usr.sbin/timed/timedc/timedc.c:1.21 src/usr.sbin/timed/timedc/timedc.c:1.22 --- src/usr.sbin/timed/timedc/timedc.c:1.21 Mon Jul 21 09:37:00 2008 +++ src/usr.sbin/timed/timedc/timedc.c Mon Jan 16 12:38:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: timedc.c,v 1.21 2008/07/21 13:37:00 lukem Exp $ */ +/* $NetBSD: timedc.c,v 1.22 2012/01/16 17:38:16 christos Exp $ */ /*- * Copyright (c) 1985, 1993 The Regents of the University of California. @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] =
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: christos Date: Mon Jan 16 18:44:13 UTC 2012 Modified Files: src/sys/lib/libsa: Makefile ext2fs.c stand.h ufs.c Added Files: src/sys/lib/libsa: fnmatch.c minixfs3.c minixfs3.h Log Message: PR/45796: Evgeniy Ivanov minixfs3 support. Split out fn_match since we have 3 copies now. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/lib/libsa/Makefile cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libsa/ext2fs.c cvs rdiff -u -r0 -r1.1 src/sys/lib/libsa/fnmatch.c \ src/sys/lib/libsa/minixfs3.c src/sys/lib/libsa/minixfs3.h cvs rdiff -u -r1.74 -r1.75 src/sys/lib/libsa/stand.h cvs rdiff -u -r1.56 -r1.57 src/sys/lib/libsa/ufs.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/Makefile diff -u src/sys/lib/libsa/Makefile:1.76 src/sys/lib/libsa/Makefile:1.77 --- src/sys/lib/libsa/Makefile:1.76 Sun Dec 25 01:09:08 2011 +++ src/sys/lib/libsa/Makefile Mon Jan 16 13:44:13 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.76 2011/12/25 06:09:08 tsutsui Exp $ +# $NetBSD: Makefile,v 1.77 2012/01/16 18:44:13 christos Exp $ LIB= sa NOPIC= # defined @@ -75,6 +75,8 @@ SRCS+= cd9660.c SRCS+= ustarfs.c SRCS+= dosfs.c SRCS+= ext2fs.c +SRCS+= minixfs3.c +SRCS+= fnmatch.c # for historic compatibility ufs == ffsv1 SRCS+= ufs.c Index: src/sys/lib/libsa/ext2fs.c diff -u src/sys/lib/libsa/ext2fs.c:1.11 src/sys/lib/libsa/ext2fs.c:1.12 --- src/sys/lib/libsa/ext2fs.c:1.11 Sun Dec 25 01:09:08 2011 +++ src/sys/lib/libsa/ext2fs.c Mon Jan 16 13:44:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs.c,v 1.11 2011/12/25 06:09:08 tsutsui Exp $ */ +/* $NetBSD: ext2fs.c,v 1.12 2012/01/16 18:44:13 christos Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. @@ -169,34 +169,6 @@ static const char*const typestr[] = LNK }; -static int -fn_match(const char *fname, const char *pattern) -{ - char fc, pc; - - do { - fc = *fname++; - pc = *pattern++; - if (!fc !pc) - return 1; - if (pc == '?' fc) - pc = fc; - } while (fc == pc); - - if (pc != '*') - return 0; - /* - * Too hard (and unnecessary really) too check for *?name etc - * ** will look for a '*' and *? a '?' - */ - pc = *pattern++; - if (!pc) - return 1; - while ((fname = strchr(fname, pc))) - if (fn_match(++fname, pattern)) - return 1; - return 0; -} #endif /* LIBSA_ENABLE_LS_OP */ static int read_inode(ino32_t, struct open_file *); @@ -903,7 +875,7 @@ ext2fs_ls(struct open_file *f, const cha printf(bad dir entry\n); goto out; } - if (pattern !fn_match(dp-e2d_name, pattern)) + if (pattern !fnmatch(dp-e2d_name, pattern)) continue; n = alloc(sizeof *n + strlen(dp-e2d_name)); if (!n) { Index: src/sys/lib/libsa/stand.h diff -u src/sys/lib/libsa/stand.h:1.74 src/sys/lib/libsa/stand.h:1.75 --- src/sys/lib/libsa/stand.h:1.74 Sun Dec 25 01:09:08 2011 +++ src/sys/lib/libsa/stand.h Mon Jan 16 13:44:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: stand.h,v 1.74 2011/12/25 06:09:08 tsutsui Exp $ */ +/* $NetBSD: stand.h,v 1.75 2012/01/16 18:44:13 christos Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -320,6 +320,8 @@ off_t olseek(int, off_t, int); extern const char hexdigits[]; +int fnmatch(const char *, const char *); + /* XXX: These should be removed eventually. */ void bcopy(const void *, void *, size_t); void bzero(void *, size_t); Index: src/sys/lib/libsa/ufs.c diff -u src/sys/lib/libsa/ufs.c:1.56 src/sys/lib/libsa/ufs.c:1.57 --- src/sys/lib/libsa/ufs.c:1.56 Sun Dec 25 01:09:08 2011 +++ src/sys/lib/libsa/ufs.c Mon Jan 16 13:44:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs.c,v 1.56 2011/12/25 06:09:08 tsutsui Exp $ */ +/* $NetBSD: ufs.c,v 1.57 2012/01/16 18:44:13 christos Exp $ */ /*- * Copyright (c) 1993 @@ -208,35 +208,6 @@ static const char*const typestr[] = 0, WHT }; - -static int -fn_match(const char *fname, const char *pattern) -{ - char fc, pc; - - do { - fc = *fname++; - pc = *pattern++; - if (!fc !pc) - return 1; - if (pc == '?' fc) - pc = fc; - } while (fc == pc); - - if (pc != '*') - return 0; - /* - * Too hard (and unnecessary really) too check for *?name etc - * ** will look for a '*' and *? a '?' - */ - pc = *pattern++; - if (!pc) - return 1; - while ((fname = strchr(fname, pc))) - if (fn_match(++fname, pattern)) - return 1; - return 0; -} #endif /* LIBSA_ENABLE_LS_OP */ #ifdef LIBSA_LFS @@ -954,7 +925,7 @@ ufs_ls(struct open_file *f, const char * printf(bad dir entry\n); goto out; } - if (pattern !fn_match(dp-d_name, pattern)) + if (pattern !fnmatch(dp-d_name, pattern)) continue; n = alloc(sizeof *n + strlen(dp-d_name)); if (!n) { Added files: Index: src/sys/lib/libsa/fnmatch.c diff -u /dev/null src/sys/lib/libsa/fnmatch.c:1.1 --- /dev/null Mon Jan 16 13:44:13 2012 +++ src/sys/lib/libsa/fnmatch.c Mon Jan 16 13:44:13 2012 @@ -0,0
CVS commit: src
Module Name:src Committed By: christos Date: Mon Jan 16 18:47:58 UTC 2012 Modified Files: src/common/lib/libutil: getfstypename.c src/sys/arch/i386/stand/lib: biosdisk.c src/sys/lib/libkern: xlat_mbr_fstype.c src/sys/sys: disk.h disklabel.h Log Message: PR/45796: Evgeniy Ivanov minixfs3 support. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libutil/getfstypename.c cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/stand/lib/biosdisk.c cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/xlat_mbr_fstype.c cvs rdiff -u -r1.55 -r1.56 src/sys/sys/disk.h cvs rdiff -u -r1.111 -r1.112 src/sys/sys/disklabel.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libutil/getfstypename.c diff -u src/common/lib/libutil/getfstypename.c:1.5 src/common/lib/libutil/getfstypename.c:1.6 --- src/common/lib/libutil/getfstypename.c:1.5 Mon Nov 14 11:21:44 2011 +++ src/common/lib/libutil/getfstypename.c Mon Jan 16 13:47:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: getfstypename.c,v 1.5 2011/11/14 16:21:44 christos Exp $ */ +/* $NetBSD: getfstypename.c,v 1.6 2012/01/16 18:47:57 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -39,10 +39,10 @@ # include sys/cdefs.h # ifndef _KERNEL # if !defined(lint) -__RCSID($NetBSD: getfstypename.c,v 1.5 2011/11/14 16:21:44 christos Exp $); +__RCSID($NetBSD: getfstypename.c,v 1.6 2012/01/16 18:47:57 christos Exp $); # endif # else -__KERNEL_RCSID(0, $NetBSD: getfstypename.c,v 1.5 2011/11/14 16:21:44 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: getfstypename.c,v 1.6 2012/01/16 18:47:57 christos Exp $); # endif /* _KERNEL */ # define FSTYPE_ENUMNAME fstype_enum @@ -121,6 +121,8 @@ getfstypename(int fstype) return DKW_PTYPE_CGD; case FSMAXTYPES: return DKW_PTYPE_UNKNOWN; + case FS_MINIXFS3: + return DKW_PTYPE_MINIXFS3; } /* Stupid gcc, should know it is impossible to get here */ return DKW_PTYPE_UNKNOWN; Index: src/sys/arch/i386/stand/lib/biosdisk.c diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.39 src/sys/arch/i386/stand/lib/biosdisk.c:1.40 --- src/sys/arch/i386/stand/lib/biosdisk.c:1.39 Wed Sep 21 04:57:12 2011 +++ src/sys/arch/i386/stand/lib/biosdisk.c Mon Jan 16 13:47:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: biosdisk.c,v 1.39 2011/09/21 08:57:12 gsutre Exp $ */ +/* $NetBSD: biosdisk.c,v 1.40 2012/01/16 18:47:57 christos Exp $ */ /* * Copyright (c) 1996, 1998 @@ -404,6 +404,40 @@ check_label(struct biosdisk *d, daddr_t } static int +read_minix_subp(struct biosdisk *d, struct disklabel* dflt_lbl, + int this_ext, daddr_t sector) +{ + struct mbr_partition mbr[MBR_PART_COUNT]; + int i; + int typ; + struct partition *p; + + if (readsects(d-ll, sector, 1, d-buf, 0)) { +#ifdef DISK_DEBUG + printf(Error reading MFS sector %d\n, sector); +#endif + return EIO; + } + if ((uint8_t)d-buf[510] != 0x55 || (uint8_t)d-buf[511] != 0xAA) { + return -1; + } + memcpy(mbr, ((struct mbr_sector *)d-buf)-mbr_parts, sizeof(mbr)); + for (i = 0; i MBR_PART_COUNT; i++) { + typ = mbr[i].mbrp_type; + if (typ == 0) + continue; + sector = this_ext + mbr[i].mbrp_start; + if (dflt_lbl-d_npartitions = MAXPARTITIONS) + continue; + p = dflt_lbl-d_partitions[dflt_lbl-d_npartitions++]; + p-p_offset = sector; + p-p_size = mbr[i].mbrp_size; + p-p_fstype = xlat_mbr_fstype(typ); + } + return 0; +} + +static int read_label(struct biosdisk *d) { struct disklabel dflt_lbl; @@ -452,6 +486,13 @@ read_label(struct biosdisk *d) #ifdef DISK_DEBUG printf(ptn type %d in sector %d\n, typ, sector); #endif +if (typ == MBR_PTYPE_MINIX_14B) { +if (!read_minix_subp(d, dflt_lbl, + this_ext, sector)) { + /* Don't add container partition */ + continue; +} + } if (typ == MBR_PTYPE_NETBSD) { error = check_label(d, sector); if (error = 0) Index: src/sys/lib/libkern/xlat_mbr_fstype.c diff -u src/sys/lib/libkern/xlat_mbr_fstype.c:1.7 src/sys/lib/libkern/xlat_mbr_fstype.c:1.8 --- src/sys/lib/libkern/xlat_mbr_fstype.c:1.7 Mon Apr 28 16:24:06 2008 +++ src/sys/lib/libkern/xlat_mbr_fstype.c Mon Jan 16 13:47:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: xlat_mbr_fstype.c,v 1.7 2008/04/28 20:24:06 martin Exp $ */ +/* $NetBSD: xlat_mbr_fstype.c,v 1.8 2012/01/16 18:47:57 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0,$NetBSD: xlat_mbr_fstype.c,v 1.7 2008/04/28 20:24:06 martin Exp $); +__KERNEL_RCSID(0,$NetBSD: xlat_mbr_fstype.c,v 1.8 2012/01/16 18:47:57 christos Exp $); #include sys/disklabel.h @@ -55,6 +55,7 @@ xlat_mbr_fstype(int mbr_type) { MBR_PTYPE_LNXSWAP, FS_SWAP }, { MBR_PTYPE_NETBSD, FS_BSDFFS }, { MBR_PTYPE_NTFS, FS_NTFS }, + { MBR_PTYPE_MINIX_14B, FS_MINIXFS3 }, { 0, FS_OTHER } }; const struct ptn_types *pt; Index: src/sys/sys/disk.h diff
CVS commit: src/etc
Module Name:src Committed By: christos Date: Mon Jan 16 22:12:41 UTC 2012 Modified Files: src/etc: ntp.conf Log Message: Instead of using the general servers, use the ones allocated specifically for the NetBSD project. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/etc/ntp.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/ntp.conf diff -u src/etc/ntp.conf:1.12 src/etc/ntp.conf:1.13 --- src/etc/ntp.conf:1.12 Thu Jul 28 18:28:07 2011 +++ src/etc/ntp.conf Mon Jan 16 17:12:41 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ntp.conf,v 1.12 2011/07/28 22:28:07 simonb Exp $ +# $NetBSD: ntp.conf,v 1.13 2012/01/16 22:12:41 christos Exp $ # # NetBSD default Network Time Protocol (NTP) configuration file for ntpd @@ -65,23 +65,12 @@ mdnstries 0 # http://www.pool.ntp.org/ # -# The country codes can help you find servers that are net-wise close. -# As explained above, closer is better... - -# Northern U.S.A -#server ca.pool.ntp.org -#server 0.us.pool.ntp.org -#server 1.us.pool.ntp.org - -# Northern Europe -#server 0.de.pool.ntp.org -#server 1.de.pool.ntp.org -#server dk.pool.ntp.org - # Depending on the vagaries of DNS can occasionally pull in the same # server twice. The following CNAMES are guaranteed to be disjoint, at -# least over some short interval. +# least over some short interval. The following servers are allocated +# to the NetBSD project. -server 0.pool.ntp.org -server 1.pool.ntp.org -server 2.pool.ntp.org +server 0.netbsd.pool.ntp.org +server 1.netbsd.pool.ntp.org +server 2.netbsd.pool.ntp.org +server 3.netbsd.pool.ntp.org
CVS commit: src/etc
Module Name:src Committed By: christos Date: Mon Jan 16 22:20:45 UTC 2012 Modified Files: src/etc: ntp.conf Log Message: use the join URL. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/etc/ntp.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/ntp.conf diff -u src/etc/ntp.conf:1.13 src/etc/ntp.conf:1.14 --- src/etc/ntp.conf:1.13 Mon Jan 16 17:12:41 2012 +++ src/etc/ntp.conf Mon Jan 16 17:20:45 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ntp.conf,v 1.13 2012/01/16 22:12:41 christos Exp $ +# $NetBSD: ntp.conf,v 1.14 2012/01/16 22:20:45 christos Exp $ # # NetBSD default Network Time Protocol (NTP) configuration file for ntpd @@ -62,7 +62,7 @@ mdnstries 0 # join are a nailed-up connection and a static IP address. For details, # see the web page: # -# http://www.pool.ntp.org/ +# http://www.pool.ntp.org/join.html # # Depending on the vagaries of DNS can occasionally pull in the same
CVS commit: src/bin/csh
Module Name:src Committed By: christos Date: Thu Jan 19 02:42:53 UTC 2012 Modified Files: src/bin/csh: char.c char.h Log Message: PR/45856: Bernhard Burnhard Riedel: Infinite loop on nbsp; input. Sending char 160 in the input to csh, lead it to an infinite loop, because tcsh tables counted this as a space character, but the word logic switch does not. Change that character tables, so that this does not count as a spacing character anymore, by syncing the table with the one from tcsh. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/bin/csh/char.c cvs rdiff -u -r1.8 -r1.9 src/bin/csh/char.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/char.c diff -u src/bin/csh/char.c:1.9 src/bin/csh/char.c:1.10 --- src/bin/csh/char.c:1.9 Thu Aug 7 05:05:03 2003 +++ src/bin/csh/char.c Wed Jan 18 21:42:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: char.c,v 1.9 2003/08/07 09:05:03 agc Exp $ */ +/* $NetBSD: char.c,v 1.10 2012/01/19 02:42:53 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,209 +34,210 @@ #if 0 static char sccsid[] = @(#)char.c 8.1 (Berkeley) 5/31/93; #else -__RCSID($NetBSD: char.c,v 1.9 2003/08/07 09:05:03 agc Exp $); +__RCSID($NetBSD: char.c,v 1.10 2012/01/19 02:42:53 christos Exp $); #endif #endif /* not lint */ #include char.h +/* on default same as original map */ unsigned short _cmap[256] = { -/* nul soh stx etx */ +/* 0 nul 1 soh 2 stx 3 etx */ _CTR, _CTR, _CTR, _CTR, -/* eot enq ack bel */ +/* 4 eot 5 enq 6 ack 7 bel */ _CTR, _CTR, _CTR, _CTR, -/* bs ht nl vt */ +/* 8 bs 9 ht 10 nl 11 vt */ _CTR, _CTR|_SP|_META, _CTR|_NL|_META, _CTR, -/* np cr so si */ +/* 12 np 13 cr 14 so 15 si */ _CTR, _CTR, _CTR, _CTR, -/* dle dc1 dc2 dc3 */ +/* 16 dle 17 dc1 18 dc2 19 dc3 */ _CTR, _CTR, _CTR, _CTR, -/* dc4 nak syn etb */ +/* 20 dc4 21 nak 22 syn 23 etb */ _CTR, _CTR, _CTR, _CTR, -/* can em sub esc */ +/* 24 can 25 em 26 sub 27 esc */ _CTR, _CTR, _CTR, _CTR, -/* fs gs rs us */ +/* 28 fs 29 gs 30 rs 31 us */ _CTR, _CTR, _CTR, _CTR, -/* sp !# */ - _SP|_META, 0, _QF, _META, +/* 32 sp 33 ! 34 35 # */ + _SP|_META, _PUN, _QF|_PUN, _META|_PUN, -/* $ %' */ - _DOL, 0, _META|_CMD, _QF, +/* 36 $ 37 % 38 39 ' */ + _DOL|_PUN, _PUN, _META|_CMD|_PUN,_QF|_PUN, -/* ( ) * + */ - _META|_CMD, _META, _GLOB, 0, +/* 40 ( 41 ) 42 * 43 + */ + _META|_CMD|_PUN,_META|_PUN, _GLOB|_PUN, _PUN, -/* , - . / */ - 0, 0, 0, 0, +/* 44 , 45 - 46 . 47 / */ + _PUN, _PUN, _PUN, _PUN, -/* 0 1 2 3 */ +/* 48 0 49 1 50 2 51 3 */ _DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD, -/* 4 5 6 7 */ +/* 52 4 53 5 54 6 55 7 */ _DIG|_XD, _DIG|_XD, _DIG|_XD, _DIG|_XD, -/* 8 9 : ; */ - _DIG|_XD, _DIG|_XD, 0, _META|_CMD, +/* 56 8 57 9 58 : 59 ; */ + _DIG|_XD, _DIG|_XD, _PUN, _META|_CMD|_PUN, -/* =? */ - _META, 0, _META, _GLOB, +/* 60 61 = 62 63 ? */ + _META|_PUN, _PUN, _META|_PUN, _GLOB|_PUN, -/* @ A B C */ - 0, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, +/* 64 @ 65 A 66 B 67 C */ + _PUN, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, -/* D E F G */ +/* 68 D 69 E 70 F 71 G */ _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP|_XD, _LET|_UP, -/* H I J K */ +/* 72 H 73 I 74 J 75 K */ _LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP, -/* L M N O */ +/* 76 L 77 M 78 N 79 O */ _LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP, -/* P Q R S */ +/* 80 P 81 Q 82 R 83 S */ _LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP, -/* T U V W */ +/* 84 T 85 U 86 V 87 W */ _LET|_UP, _LET|_UP, _LET|_UP, _LET|_UP, -/* X Y Z [ */ - _LET|_UP, _LET|_UP, _LET|_UP, _GLOB, +/* 88 X 89 Y 90 Z 91 [ */ + _LET|_UP, _LET|_UP, _LET|_UP, _GLOB|_PUN, -/* \ ] ^ _ */ - _ESC, 0, 0, 0, +/* 92 \ 93 ] 94 ^ 95 _ */ + _ESC|_PUN, _PUN, _PUN, _PUN, -/* ` a b c */ - _QB|_GLOB|_META, _LET|_LOW|_XD, _LET|_LOW|_XD, _LET|_LOW|_XD, +/* 96 ` 97 a 98 b 99 c */ + _QB|_GLOB|_META|_PUN, _LET|_LOW|_XD, _LET|_LOW|_XD, _LET|_LOW|_XD, -/* d e f g */ +/* 100 d 101 e 102 f 103 g */ _LET|_LOW|_XD, _LET|_LOW|_XD, _LET|_LOW|_XD, _LET|_LOW, -/* h i j k */ +/* 104 h 105 i 106 j 107 k */ _LET|_LOW, _LET|_LOW, _LET|_LOW, _LET|_LOW, -/* l m n o */ +/* 108 l 109 m 110 n 111 o */ _LET|_LOW, _LET|_LOW, _LET|_LOW, _LET|_LOW, -/* p q r s */ +/* 112 p 113 q 114 r 115 s */ _LET|_LOW, _LET|_LOW, _LET|_LOW, _LET|_LOW, -/* t u v w */ +/* 116 t 117 u 118 v 119 w */ _LET|_LOW, _LET|_LOW, _LET|_LOW, _LET|_LOW, -/* x y z { */ - _LET|_LOW, _LET|_LOW, _LET|_LOW, _GLOB, +/* 120 x 121 y 122 z 123 { */ + _LET|_LOW, _LET|_LOW, _LET|_LOW, _GLOB|_PUN, -/* | } ~ del */ - _META|_CMD, 0, 0, _CTR, +/* 124
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Thu Jan 19 21:25:13 UTC 2012 Modified Files: src/sys/sys: exec_elf.h Log Message: whitespace diffs [and comments] To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/sys/sys/exec_elf.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/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.118 src/sys/sys/exec_elf.h:1.119 --- src/sys/sys/exec_elf.h:1.118 Fri Nov 25 09:34:50 2011 +++ src/sys/sys/exec_elf.h Thu Jan 19 16:25:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.118 2011/11/25 14:34:50 joerg Exp $ */ +/* $NetBSD: exec_elf.h,v 1.119 2012/01/19 21:25:13 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -52,42 +52,42 @@ #include machine/elf_machdep.h #endif -typedef uint8_t Elf_Byte; +typedef uint8_t Elf_Byte; -typedef uint32_t Elf32_Addr; +typedef uint32_t Elf32_Addr; #define ELF32_FSZ_ADDR 4 -typedef uint32_t Elf32_Off; -typedef int32_t Elf32_SOff; +typedef uint32_t Elf32_Off; +typedef int32_t Elf32_SOff; #define ELF32_FSZ_OFF 4 -typedef int32_t Elf32_Sword; -#define ELF32_FSZ_SWORD 4 -typedef uint32_t Elf32_Word; +typedef int32_t Elf32_Sword; +#define ELF32_FSZ_SWORD 4 +typedef uint32_t Elf32_Word; #define ELF32_FSZ_WORD 4 -typedef uint16_t Elf32_Half; +typedef uint16_t Elf32_Half; #define ELF32_FSZ_HALF 2 -typedef uint64_t Elf32_Lword; -#define ELF32_FSZ_LWORD 8 +typedef uint64_t Elf32_Lword; +#define ELF32_FSZ_LWORD 8 -typedef uint64_t Elf64_Addr; +typedef uint64_t Elf64_Addr; #define ELF64_FSZ_ADDR 8 -typedef uint64_t Elf64_Off; -typedef int64_t Elf64_SOff; +typedef uint64_t Elf64_Off; +typedef int64_t Elf64_SOff; #define ELF64_FSZ_OFF 8 -typedef int32_t Elf64_Shalf; -#define ELF64_FSZ_SHALF 4 +typedef int32_t Elf64_Shalf; +#define ELF64_FSZ_SHALF 4 -typedef int32_t Elf64_Sword; -#define ELF64_FSZ_SWORD 4 -typedef uint32_t Elf64_Word; +typedef int32_t Elf64_Sword; +#define ELF64_FSZ_SWORD 4 +typedef uint32_t Elf64_Word; #define ELF64_FSZ_WORD 4 -typedef int64_t Elf64_Sxword; +typedef int64_t Elf64_Sxword; #define ELF64_FSZ_SXWORD 8 -typedef uint64_t Elf64_Xword; -#define ELF64_FSZ_XWORD 8 -typedef uint64_t Elf64_Lword; -#define ELF64_FSZ_LWORD 8 -typedef uint16_t Elf64_Half; +typedef uint64_t Elf64_Xword; +#define ELF64_FSZ_XWORD 8 +typedef uint64_t Elf64_Lword; +#define ELF64_FSZ_LWORD 8 +typedef uint16_t Elf64_Half; #define ELF64_FSZ_HALF 2 /* @@ -104,12 +104,12 @@ typedef struct { Elf32_Off e_phoff; /* Program hdr offset */ Elf32_Off e_shoff; /* Section hdr offset */ Elf32_Word e_flags; /* Processor flags */ - Elf32_Half e_ehsize; /* sizeof ehdr */ - Elf32_Half e_phentsize; /* Program header entry size */ - Elf32_Half e_phnum; /* Number of program headers */ - Elf32_Half e_shentsize; /* Section header entry size */ - Elf32_Half e_shnum; /* Number of section headers */ - Elf32_Half e_shstrndx; /* String table index */ + Elf32_Half e_ehsize; /* sizeof ehdr */ + Elf32_Half e_phentsize; /* Program header entry size */ + Elf32_Half e_phnum; /* Number of program headers */ + Elf32_Half e_shentsize; /* Section header entry size */ + Elf32_Half e_shnum; /* Number of section headers */ + Elf32_Half e_shstrndx; /* String table index */ } Elf32_Ehdr; typedef struct { @@ -131,9 +131,9 @@ typedef struct { /* e_ident offsets */ #define EI_MAG0 0 /* '\177' */ -#define EI_MAG1 1 /* 'E'*/ -#define EI_MAG2 2 /* 'L'*/ -#define EI_MAG3 3 /* 'F'*/ +#define EI_MAG1 1 /* 'E' */ +#define EI_MAG2 2 /* 'L' */ +#define EI_MAG3 3 /* 'F' */ #define EI_CLASS 4 /* File class */ #define EI_DATA 5 /* Data encoding */ #define EI_VERSION 6 /* File version */ @@ -343,23 +343,23 @@ typedef struct { #define PT_TLS 7 /* TLS initialisation image */ #define PT_NUM 8 -#define PT_LOOS 0x6000 /* OS-specific range */ +#define PT_LOOS 0x6000 /* OS-specific range */ /* GNU-specific */ -#define PT_GNU_EH_FRAME 0x6474e550 /* EH frame segment */ +#define PT_GNU_EH_FRAME 0x6474e550 /* EH frame segment */ #define PT_GNU_STACK 0x6474e551 /* Indicate executable stack */ -#define PT_GNU_RELRO 0x6474e552 /* Make read-only after relocation */ +#define PT_GNU_RELRO 0x6474e552 /* Make read-only after relocation */ -#define PT_HIOS 0x6fff +#define PT_HIOS 0x6fff #define PT_LOPROC 0x7000 /* Processor-specific range */ #define PT_HIPROC 0x7fff -#define PT_MIPS_REGINFO 0x7000 +#define PT_MIPS_REGINFO 0x7000 /* p_flags */ -#define PF_R 0x4 /* Segment is readable */ -#define PF_W 0x2 /* Segment is writable */ -#define PF_X 0x1 /* Segment is executable */ +#define PF_R 0x4 /* Segment is readable */ +#define PF_W 0x2 /* Segment is writable */ +#define PF_X 0x1 /* Segment is executable */ #define PF_MASKOS 0x0ff0 /* Operating system
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Thu Jan 19 21:35:12 UTC 2012 Modified Files: src/sys/sys: exec_elf.h Log Message: Add more SHF_ and whitespace align SHT_ To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/sys/exec_elf.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/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.119 src/sys/sys/exec_elf.h:1.120 --- src/sys/sys/exec_elf.h:1.119 Thu Jan 19 16:25:13 2012 +++ src/sys/sys/exec_elf.h Thu Jan 19 16:35:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.119 2012/01/19 21:25:13 christos Exp $ */ +/* $NetBSD: exec_elf.h,v 1.120 2012/01/19 21:35:11 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #ifndef _SYS_EXEC_ELF_H_ -#define _SYS_EXEC_ELF_H_ +#define _SYS_EXEC_ELF_H_ /* * The current ELF ABI specification is available at: @@ -55,45 +55,45 @@ typedef uint8_t Elf_Byte; typedef uint32_t Elf32_Addr; -#define ELF32_FSZ_ADDR 4 +#define ELF32_FSZ_ADDR 4 typedef uint32_t Elf32_Off; typedef int32_t Elf32_SOff; -#define ELF32_FSZ_OFF 4 +#define ELF32_FSZ_OFF 4 typedef int32_t Elf32_Sword; -#define ELF32_FSZ_SWORD 4 +#define ELF32_FSZ_SWORD 4 typedef uint32_t Elf32_Word; -#define ELF32_FSZ_WORD 4 +#define ELF32_FSZ_WORD 4 typedef uint16_t Elf32_Half; -#define ELF32_FSZ_HALF 2 +#define ELF32_FSZ_HALF 2 typedef uint64_t Elf32_Lword; -#define ELF32_FSZ_LWORD 8 +#define ELF32_FSZ_LWORD 8 typedef uint64_t Elf64_Addr; -#define ELF64_FSZ_ADDR 8 +#define ELF64_FSZ_ADDR 8 typedef uint64_t Elf64_Off; typedef int64_t Elf64_SOff; -#define ELF64_FSZ_OFF 8 +#define ELF64_FSZ_OFF 8 typedef int32_t Elf64_Shalf; -#define ELF64_FSZ_SHALF 4 +#define ELF64_FSZ_SHALF 4 typedef int32_t Elf64_Sword; -#define ELF64_FSZ_SWORD 4 +#define ELF64_FSZ_SWORD 4 typedef uint32_t Elf64_Word; -#define ELF64_FSZ_WORD 4 +#define ELF64_FSZ_WORD 4 typedef int64_t Elf64_Sxword; -#define ELF64_FSZ_SXWORD 8 +#define ELF64_FSZ_SXWORD 8 typedef uint64_t Elf64_Xword; -#define ELF64_FSZ_XWORD 8 +#define ELF64_FSZ_XWORD 8 typedef uint64_t Elf64_Lword; -#define ELF64_FSZ_LWORD 8 +#define ELF64_FSZ_LWORD 8 typedef uint16_t Elf64_Half; -#define ELF64_FSZ_HALF 2 +#define ELF64_FSZ_HALF 2 /* * ELF Header */ -#define ELF_NIDENT 16 +#define ELF_NIDENT 16 typedef struct { unsigned char e_ident[ELF_NIDENT]; /* Id bytes */ @@ -130,182 +130,182 @@ typedef struct { } Elf64_Ehdr; /* e_ident offsets */ -#define EI_MAG0 0 /* '\177' */ -#define EI_MAG1 1 /* 'E' */ -#define EI_MAG2 2 /* 'L' */ -#define EI_MAG3 3 /* 'F' */ -#define EI_CLASS 4 /* File class */ -#define EI_DATA 5 /* Data encoding */ -#define EI_VERSION 6 /* File version */ -#define EI_OSABI 7 /* Operating system/ABI identification */ -#define EI_ABIVERSION 8 /* ABI version */ -#define EI_PAD 9 /* Start of padding bytes up to EI_NIDENT*/ -#define EI_NIDENT 16 /* First non-ident header byte */ +#define EI_MAG0 0 /* '\177' */ +#define EI_MAG1 1 /* 'E' */ +#define EI_MAG2 2 /* 'L' */ +#define EI_MAG3 3 /* 'F' */ +#define EI_CLASS 4 /* File class */ +#define EI_DATA 5 /* Data encoding */ +#define EI_VERSION 6 /* File version */ +#define EI_OSABI 7 /* Operating system/ABI identification */ +#define EI_ABIVERSION 8 /* ABI version */ +#define EI_PAD 9 /* Start of padding bytes up to EI_NIDENT*/ +#define EI_NIDENT 16 /* First non-ident header byte */ /* e_ident[EI_MAG0,EI_MAG3] */ -#define ELFMAG0 0x7f -#define ELFMAG1 'E' -#define ELFMAG2 'L' -#define ELFMAG3 'F' -#define ELFMAG \177ELF -#define SELFMAG 4 +#define ELFMAG0 0x7f +#define ELFMAG1 'E' +#define ELFMAG2 'L' +#define ELFMAG3 'F' +#define ELFMAG \177ELF +#define SELFMAG 4 /* e_ident[EI_CLASS] */ -#define ELFCLASSNONE 0 /* Invalid class */ -#define ELFCLASS32 1 /* 32-bit objects */ -#define ELFCLASS64 2 /* 64-bit objects */ -#define ELFCLASSNUM 3 +#define ELFCLASSNONE 0 /* Invalid class */ +#define ELFCLASS32 1 /* 32-bit objects */ +#define ELFCLASS64 2 /* 64-bit objects */ +#define ELFCLASSNUM 3 /* e_ident[EI_DATA] */ -#define ELFDATANONE 0 /* Invalid data encoding */ -#define ELFDATA2LSB 1 /* 2's complement values, LSB first */ -#define ELFDATA2MSB 2 /* 2's complement values, MSB first */ +#define ELFDATANONE 0 /* Invalid data encoding */ +#define ELFDATA2LSB 1 /* 2's complement values, LSB first */ +#define ELFDATA2MSB 2 /* 2's complement values, MSB first */ /* e_ident[EI_VERSION] */ -#define EV_NONE 0 /* Invalid version */ -#define EV_CURRENT 1 /* Current version */ -#define EV_NUM 2 +#define EV_NONE 0 /* Invalid version */ +#define EV_CURRENT 1 /* Current version */ +#define EV_NUM 2 /* e_ident[EI_OSABI] */ -#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ -#define ELFOSABI_HPUX 1 /* HP-UX operating system */ -#define ELFOSABI_NETBSD 2 /* NetBSD */ -#define ELFOSABI_LINUX 3 /* GNU/Linux */
CVS commit: src/tools
Module Name:src Committed By: christos Date: Fri Jan 20 23:01:05 UTC 2012 Modified Files: src/tools: Makefile.gmakehost Makefile.gnuhost Log Message: Merge the two Makefiles that were mostly copies of each others. The reason to do this was to add support for cleaning up the config.cache files when the build environment (as determined by uname -srm) changes. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tools/Makefile.gmakehost cvs rdiff -u -r1.35 -r1.36 src/tools/Makefile.gnuhost Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile.gmakehost diff -u src/tools/Makefile.gmakehost:1.6 src/tools/Makefile.gmakehost:1.7 --- src/tools/Makefile.gmakehost:1.6 Wed Nov 25 06:49:36 2009 +++ src/tools/Makefile.gmakehost Fri Jan 20 18:01:05 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gmakehost,v 1.6 2009/11/25 11:49:36 uebayasi Exp $ +# $NetBSD: Makefile.gmakehost,v 1.7 2012/01/20 23:01:05 christos Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # This version runs ${TOOL_GMAKE} instead of ${MAKE} @@ -17,109 +17,5 @@ # since the last install in the current directory. .include bsd.own.mk - -# Disable use of pre-compiled headers on Darwin. -BUILD_OSTYPE!= uname -s -.if ${BUILD_OSTYPE} == Darwin -HOST_CFLAGS+=-O2 -no-cpp-precomp -.endif - -GNUHOSTDIST?= ${.CURDIR}/../../gnu/dist/${MODULE} - -FIND_ARGS+= \! \( -type d \( \ - -name 'CVS' -o \ - -name 'config' -o \ - -name 'doc' -o \ - -name 'po' -o \ - -name 'nbsd.mt' -o \ - -name 'tests*' \ - \) -prune \) - -# Do this find only if actually building something. -.if (${USETOOLS} == yes) empty(.MAKEFLAGS:M-V*) \ -(make(all) || make(realall) || (!make(clean) !make(cleandir) !make(obj))) \ -!defined(_GNU_CFGSRC) - -_GNU_CFGSRC!= find ${GNUHOSTDIST} ${FIND_ARGS} \ - -type f \( -name 'config*' -o -name '*.in' \) -print -.MAKEOVERRIDES+= _GNU_CFGSRC -.endif - -CONFIGURE_ENV+= \ - AR=${HOST_AR:Q} \ - AWK=${TOOL_AWK:Q} \ - CC=${HOST_CC:Q} \ - CFLAGS=${HOST_CFLAGS:Q} \ - CPPFLAGS=${HOST_CPPFLAGS:Q} \ - CXX=${HOST_CXX:Q} \ - CXXFLAGS=${HOST_CXXFLAGS:Q} \ - INSTALL=${HOST_INSTALL_FILE:Q} \ - LDFLAGS=${HOST_LDFLAGS:Q} \ - LEX=${LEX:Q} \ - MAKE=${TOOL_GMAKE:Q} \ - PATH=${TOOLDIR}/bin:$$PATH \ - RANLIB=${HOST_RANLIB:Q} \ - YACC=${YACC:Q} - -BUILD_ENV+= ${CONFIGURE_ENV} - -CONFIGURE_ARGS+=--prefix=${TOOLDIR} -.if ${MKPIC} == no -CONFIGURE_ARGS+=--disable-shared -.endif - -# don't need this for gmake? i hope. might need gmake equiv of -X? -##.ifndef _NOWRAPPER -### Some systems have a small ARG_MAX. On such systems, prevent Make -### variables set on the command line from being exported in the -### environment (they will still be set in MAKEOVERRIDES). -##BUILD_OSTYPE!= uname -s -##.if ${BUILD_OSTYPE} == Darwin || ${BUILD_OSTYPE} == FreeBSD -##__noenvexport= -X -##.endif -##MAKE_ARGS:= ${__noenvexport} -f ${.PARSEDIR}/Makefile.gnuwrap ${MAKE_ARGS} -##.else -##MAKE_ARGS+= _NOWRAPPER=1 -##.endif - -MAKE_ARGS+= BISON=true DESTDIR= INSTALL=${HOST_INSTALL_FILE:Q} - -ALL_TARGET?= all -INSTALL_TARGET?=install - -.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile - @mkdir build 2/dev/null || true - @(cd build /usr/bin/env ${CONFIGURE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure ${CONFIGURE_ARGS}) - @touch $@ - -# The .build_done timestamp is only updated if a file actually changes -# in the build tree during make all. This way, if nothing has changed, -# a make install MKUPDATE=yes will do nothing. - -# gmake version of this puts MAKE_ARGS in the environment to be sure that -# sub-gmake's get them, otherwise tools/gcc tries to build libgcc and -# fails. it also uses env -i to entirely clear out MAKEFLAGS. - -GMAKE_J_ARGS?= ${MAKEFLAGS:[*]:M*-j*:C/.*(-j ?[0-9]*).*/\1/W} - -.build_done: .configure_done - @(cd build /usr/bin/env -i ${BUILD_ENV} ${MAKE_ARGS} ${TOOL_GMAKE} ${GMAKE_J_ARGS} -e ${MAKE_ARGS} ${ALL_TARGET}) - @if [ ! -f $@ ] || [ -n $$(find build -type f -newer .build_done -print) ]; \ - then touch $@; fi - -.install_done! ${BUILD:D.build_done} - @(cd ${.OBJDIR}/build /usr/bin/env -i ${BUILD_ENV} ${MAKE_ARGS} ${TOOL_GMAKE} -e ${MAKE_ARGS} ${INSTALL_TARGET}) - @touch $@ - -# Mapping to standard targets. - -.if ${USETOOLS} == yes -realall: .build_done -realinstall: .install_done -.endif - -clean: clean.gnu -clean.gnu: - -rm -r -f .*_done build - -.include bsd.hostprog.mk +MAKE_PROGRAM=${TOOL_GMAKE} +.include Makefile.gnuhost Index: src/tools/Makefile.gnuhost diff -u src/tools/Makefile.gnuhost:1.35 src/tools/Makefile.gnuhost:1.36 --- src/tools/Makefile.gnuhost:1.35 Mon Nov 21 08:46:37 2011 +++ src/tools/Makefile.gnuhost Fri Jan 20 18:01:05 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.35 2011/11/21 13:46:37 tsutsui Exp $ +# $NetBSD: Makefile.gnuhost,v 1.36 2012/01/20 23:01:05 christos Exp $ # # Rules used when building a GNU host package. Expects
CVS commit: src/dist/nvi
Module Name:src Committed By: christos Date: Sat Jan 21 19:29:41 UTC 2012 Modified Files: src/dist/nvi/common: delete.c src/dist/nvi/vi: getc.c Log Message: undo previous, it is wrong. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/delete.c cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/vi/getc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/delete.c diff -u src/dist/nvi/common/delete.c:1.2 src/dist/nvi/common/delete.c:1.3 --- src/dist/nvi/common/delete.c:1.2 Sat Jan 21 12:12:56 2012 +++ src/dist/nvi/common/delete.c Sat Jan 21 14:29:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: delete.c,v 1.2 2012/01/21 17:12:56 christos Exp $ */ +/* $NetBSD: delete.c,v 1.3 2012/01/21 19:29:41 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -89,11 +89,6 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo /* Case 3 -- delete within a single line. */ if (tm-lno == fm-lno) { - if (tm-cno == fm-cno) { - if (db_delete(sp, fm-lno)) -return (1); - goto done; - } if (db_get(sp, fm-lno, DBG_FATAL, p, len)) return (1); GET_SPACE_RETW(sp, bp, blen, len); Index: src/dist/nvi/vi/getc.c diff -u src/dist/nvi/vi/getc.c:1.4 src/dist/nvi/vi/getc.c:1.5 --- src/dist/nvi/vi/getc.c:1.4 Sat Jan 21 12:12:56 2012 +++ src/dist/nvi/vi/getc.c Sat Jan 21 14:29:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: getc.c,v 1.4 2012/01/21 17:12:56 christos Exp $ */ +/* $NetBSD: getc.c,v 1.5 2012/01/21 19:29:41 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -143,12 +143,10 @@ cs_fspace(SCR *sp, VCS *csp) int cs_fblank(SCR *sp, VCS *csp) { - if (csp-cs_flags == CS_EMP) - return (0); for (;;) { if (cs_next(sp, csp)) return (1); - if (csp-cs_flags == CS_EOL || + if (csp-cs_flags == CS_EOL || csp-cs_flags == CS_EMP || (csp-cs_flags == 0 ISBLANK2(csp-cs_ch))) continue; break; @@ -214,12 +212,10 @@ cs_prev(SCR *sp, VCS *csp) int cs_bblank(SCR *sp, VCS *csp) { - if (csp-cs_flags == CS_EMP) - return (0); for (;;) { if (cs_prev(sp, csp)) return (1); - if (csp-cs_flags == CS_EOL || + if (csp-cs_flags == CS_EOL || csp-cs_flags == CS_EMP || (csp-cs_flags == 0 ISBLANK2(csp-cs_ch))) continue; break;
CVS commit: src/dist/nvi/common
Module Name:src Committed By: christos Date: Sat Jan 21 19:32:37 UTC 2012 Modified Files: src/dist/nvi/common: cut.c Log Message: PR/10367: Restore lost fix: http://mail-index.netbsd.org/source-changes/2001/09/09/0042.html Define ENTIRE_LINE to be -1 instead of 0 since we may want to copy 0 characters. (and use ENTIRE_LINE instead of 0 where appropriate) This fixes a bug in the dw command with for example: cursor a b c ~ ~ if you hit dw there, only the empty line would be killed but both the empty line and the subsequent one would be pasted when asked for with P for example. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/common/cut.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/cut.c diff -u src/dist/nvi/common/cut.c:1.5 src/dist/nvi/common/cut.c:1.6 --- src/dist/nvi/common/cut.c:1.5 Wed Nov 23 14:25:28 2011 +++ src/dist/nvi/common/cut.c Sat Jan 21 14:32:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cut.c,v 1.5 2011/11/23 19:25:28 tnozaki Exp $ */ +/* $NetBSD: cut.c,v 1.6 2012/01/21 19:32:37 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -134,16 +134,16 @@ copyloop: } -#define ENTIRE_LINE 0 +#define ENTIRE_LINE -1 /* In line mode, it's pretty easy, just cut the lines. */ if (LF_ISSET(CUT_LINEMODE)) { cbp-flags |= CB_LMODE; for (lno = fm-lno; lno = tm-lno; ++lno) - if (cut_line(sp, lno, 0, 0, cbp)) + if (cut_line(sp, lno, 0, ENTIRE_LINE, cbp)) goto cut_line_err; } else { /* - * Get the first line. A length of 0 causes cut_line + * Get the first line. A length of ENTIRE_LINE causes cut_line * to cut from the MARK to the end of the line. */ if (cut_line(sp, fm-lno, fm-cno, fm-lno != tm-lno ? @@ -257,7 +257,7 @@ cut_line(SCR *sp, db_recno_t lno, size_t * copy the portion we want, and reset the TEXT length. */ if (len != 0) { - if (clen == 0) + if (clen == ENTIRE_LINE) clen = len - fcno; MEMCPYW(tp-lb, p + fcno, clen); tp-len = clen;
CVS commit: src/dist/nvi/common
Module Name:src Committed By: christos Date: Sat Jan 21 19:35:02 UTC 2012 Modified Files: src/dist/nvi/common: delete.c Log Message: PR/10367: Second part. Restore lost fix: http://mail-index.netbsd.org/source-changes/2001/09/09/0043.html Fix a test condition for EOF. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/common/delete.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/delete.c diff -u src/dist/nvi/common/delete.c:1.3 src/dist/nvi/common/delete.c:1.4 --- src/dist/nvi/common/delete.c:1.3 Sat Jan 21 14:29:41 2012 +++ src/dist/nvi/common/delete.c Sat Jan 21 14:35:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: delete.c,v 1.3 2012/01/21 19:29:41 christos Exp $ */ +/* $NetBSD: delete.c,v 1.4 2012/01/21 19:35:02 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -65,7 +65,7 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo if (tm-lno == lno) { if (db_get(sp, lno, DBG_FATAL, p, len)) return (1); - eof = tm-cno = len ? 1 : 0; + eof = tm-cno != -1 tm-cno = len ? 1 : 0; } else eof = 1; if (eof) {
CVS commit: src/dist/nvi/common
Module Name:src Committed By: christos Date: Sat Jan 21 19:49:56 UTC 2012 Modified Files: src/dist/nvi/common: cut.c delete.c Log Message: make the previous patch compile. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/dist/nvi/common/cut.c cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/common/delete.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/cut.c diff -u src/dist/nvi/common/cut.c:1.6 src/dist/nvi/common/cut.c:1.7 --- src/dist/nvi/common/cut.c:1.6 Sat Jan 21 14:32:37 2012 +++ src/dist/nvi/common/cut.c Sat Jan 21 14:49:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cut.c,v 1.6 2012/01/21 19:32:37 christos Exp $ */ +/* $NetBSD: cut.c,v 1.7 2012/01/21 19:49:56 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -134,7 +134,7 @@ copyloop: } -#define ENTIRE_LINE -1 +#define ENTIRE_LINE (size_t)-1 /* In line mode, it's pretty easy, just cut the lines. */ if (LF_ISSET(CUT_LINEMODE)) { cbp-flags |= CB_LMODE; @@ -257,6 +257,7 @@ cut_line(SCR *sp, db_recno_t lno, size_t * copy the portion we want, and reset the TEXT length. */ if (len != 0) { +/*###260 [cc] error: comparison between signed and unsigned integer expressions%%%*/ if (clen == ENTIRE_LINE) clen = len - fcno; MEMCPYW(tp-lb, p + fcno, clen); Index: src/dist/nvi/common/delete.c diff -u src/dist/nvi/common/delete.c:1.4 src/dist/nvi/common/delete.c:1.5 --- src/dist/nvi/common/delete.c:1.4 Sat Jan 21 14:35:02 2012 +++ src/dist/nvi/common/delete.c Sat Jan 21 14:49:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: delete.c,v 1.4 2012/01/21 19:35:02 christos Exp $ */ +/* $NetBSD: delete.c,v 1.5 2012/01/21 19:49:56 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -65,7 +65,7 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo if (tm-lno == lno) { if (db_get(sp, lno, DBG_FATAL, p, len)) return (1); - eof = tm-cno != -1 tm-cno = len ? 1 : 0; + eof = tm-cno != (size_t)-1 tm-cno = len ? 1 : 0; } else eof = 1; if (eof) {
CVS commit: src/dist/nvi/common
Module Name:src Committed By: christos Date: Sat Jan 21 19:56:46 UTC 2012 Modified Files: src/dist/nvi/common: cut.c Log Message: remove error(1) line. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/dist/nvi/common/cut.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/cut.c diff -u src/dist/nvi/common/cut.c:1.7 src/dist/nvi/common/cut.c:1.8 --- src/dist/nvi/common/cut.c:1.7 Sat Jan 21 14:49:56 2012 +++ src/dist/nvi/common/cut.c Sat Jan 21 14:56:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cut.c,v 1.7 2012/01/21 19:49:56 christos Exp $ */ +/* $NetBSD: cut.c,v 1.8 2012/01/21 19:56:46 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -257,7 +257,6 @@ cut_line(SCR *sp, db_recno_t lno, size_t * copy the portion we want, and reset the TEXT length. */ if (len != 0) { -/*###260 [cc] error: comparison between signed and unsigned integer expressions%%%*/ if (clen == ENTIRE_LINE) clen = len - fcno; MEMCPYW(tp-lb, p + fcno, clen);
CVS commit: src/tools
Module Name:src Committed By: christos Date: Sat Jan 21 22:31:15 UTC 2012 Modified Files: src/tools: Makefile.gnuhost Log Message: remove dup target. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/tools/Makefile.gnuhost Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile.gnuhost diff -u src/tools/Makefile.gnuhost:1.36 src/tools/Makefile.gnuhost:1.37 --- src/tools/Makefile.gnuhost:1.36 Fri Jan 20 18:01:05 2012 +++ src/tools/Makefile.gnuhost Sat Jan 21 17:31:15 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.36 2012/01/20 23:01:05 christos Exp $ +# $NetBSD: Makefile.gnuhost,v 1.37 2012/01/21 22:31:15 christos Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # @@ -107,16 +107,6 @@ configure_cleanup: configure_cleanup=configure_cleanup .endif -BUILD_PLATFORM!= uname -srm | tr ' ' '-' -CONFIGURE_PLATFORM!= if [ -s .configure_done ]; then cat .configure_done; else echo none; fi -.if ${BUILD_PLATFORM} != ${CONFIGURE_PLATFORM} -configure_cleanup: - @mkdir build 2/dev/null || true - @(echo Cleaning stale cache files ${BUILD_PLATFORM} != ${CONFIGURE_PLATFORM}) - @(cd build find . -name config.cache -print0 | xargs -0 rm -f) -configure_cleanup=configure_cleanup -.endif - .configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile ${configure_cleanup} @mkdir build 2/dev/null || true @(cd build ${CONFIGURE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure ${CONFIGURE_ARGS})
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: christos Date: Sun Jan 22 13:53:24 UTC 2012 Removed Files: src/sys/dev/acpi: itpm_acpi.c Log Message: remove aborted work in progress To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/sys/dev/acpi/itpm_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: christos Date: Sun Jan 22 13:53:48 UTC 2012 Modified Files: src/sys/dev: DEVNAMES Log Message: add tpm To generate a diff of this commit: cvs rdiff -u -r1.270 -r1.271 src/sys/dev/DEVNAMES 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/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.270 src/sys/dev/DEVNAMES:1.271 --- src/sys/dev/DEVNAMES:1.270 Wed Aug 31 06:01:18 2011 +++ src/sys/dev/DEVNAMES Sun Jan 22 08:53:48 2012 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.270 2011/08/31 10:01:18 mbalmer Exp $ +# $NetBSD: DEVNAMES,v 1.271 2012/01/22 13:53:48 christos Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -1294,6 +1294,7 @@ tpcalib hpcarm Attribute tpcalib hpcmips Attribute tpcalib hpcsh Attribute tpcic sparc +tpm MI tqphy MI tr MI tr_isa MI Attribute
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Sun Jan 22 16:35:39 UTC 2012 Modified Files: src/sys/dev/ic: tpm.c Log Message: as jared noted, this is not mpsafe. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/tpm.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/tpm.c diff -u src/sys/dev/ic/tpm.c:1.1 src/sys/dev/ic/tpm.c:1.2 --- src/sys/dev/ic/tpm.c:1.1 Sun Jan 22 01:44:28 2012 +++ src/sys/dev/ic/tpm.c Sun Jan 22 11:35:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm.c,v 1.1 2012/01/22 06:44:28 christos Exp $ */ +/* $NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $ */ /* * Copyright (c) 2008, 2009 Michael Shalayeff * Copyright (c) 2009, 2010 Hans-Jörg Höxer @@ -18,7 +18,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.1 2012/01/22 06:44:28 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $); /* #define TPM_DEBUG */ @@ -76,7 +76,7 @@ extern struct cfdriver tpm_cd; const struct cdevsw tpm_cdevsw = { tpmopen, tpmclose, tpmread, tpmwrite, tpmioctl, - nostop, notty, nopoll, nommap, nokqfilter, D_OTHER | D_MPSAFE, + nostop, notty, nopoll, nommap, nokqfilter, D_OTHER, }; /* Probe TPM using TIS 1.2 interface. */
CVS commit: src
Module Name:src Committed By: christos Date: Sun Jan 22 18:36:19 UTC 2012 Modified Files: src/bin/csh: csh.c src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64 md.sparc64 shl.mi src/include: stdio.h src/lib/libc: shlib_version src/lib/libc/compat: Makefile Makefile.inc src/lib/libc/stdio: fgetpos.c findfp.c fmemopen.c fopen.c freopen.c fseek.3 fseeko.c fsetpos.c ftell.c ftello.c funopen.3 funopen.c local.h stdio.c src/tests/fs/nfs/nfsservice: mountd.c Added Files: src/lib/libc/compat/include: stdio.h src/lib/libc/compat/stdio: Makefile.inc compat_fgetpos.c compat_fsetpos.c Log Message: From tsutsui@: make fpos_t a complex object that keeps track of the parse state of the stream. Change argument of the seek function to funopen() from fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing backwards compatible entry points. Approved by releng@ To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/bin/csh/csh.c cvs rdiff -u -r1.77 -r1.78 src/distrib/sets/lists/base/ad.mips64eb cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/lists/base/ad.mips64el cvs rdiff -u -r1.149 -r1.150 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.142 -r1.143 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.611 -r1.612 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/comp/ad.mips64eb \ src/distrib/sets/lists/comp/ad.mips64el cvs rdiff -u -r1.150 -r1.151 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.133 -r1.134 src/distrib/sets/lists/comp/md.sparc64 cvs rdiff -u -r1.204 -r1.205 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.79 -r1.80 src/include/stdio.h cvs rdiff -u -r1.225 -r1.226 src/lib/libc/shlib_version cvs rdiff -u -r1.5 -r1.6 src/lib/libc/compat/Makefile cvs rdiff -u -r1.6 -r1.7 src/lib/libc/compat/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/include/stdio.h cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/stdio/Makefile.inc \ src/lib/libc/compat/stdio/compat_fgetpos.c \ src/lib/libc/compat/stdio/compat_fsetpos.c cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdio/fgetpos.c cvs rdiff -u -r1.25 -r1.26 src/lib/libc/stdio/findfp.c \ src/lib/libc/stdio/fseek.3 cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdio/fmemopen.c cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/fopen.c cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/freopen.c \ src/lib/libc/stdio/funopen.3 src/lib/libc/stdio/stdio.c cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdio/fseeko.c cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdio/fsetpos.c \ src/lib/libc/stdio/funopen.c cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdio/ftell.c cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdio/ftello.c cvs rdiff -u -r1.30 -r1.31 src/lib/libc/stdio/local.h cvs rdiff -u -r1.6 -r1.7 src/tests/fs/nfs/nfsservice/mountd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/csh.c diff -u src/bin/csh/csh.c:1.42 src/bin/csh/csh.c:1.43 --- src/bin/csh/csh.c:1.42 Mon Aug 29 10:51:17 2011 +++ src/bin/csh/csh.c Sun Jan 22 13:36:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: csh.c,v 1.42 2011/08/29 14:51:17 joerg Exp $ */ +/* $NetBSD: csh.c,v 1.43 2012/01/22 18:36:14 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)csh.c 8.2 (Berkeley) 10/12/93; #else -__RCSID($NetBSD: csh.c,v 1.42 2011/08/29 14:51:17 joerg Exp $); +__RCSID($NetBSD: csh.c,v 1.43 2012/01/22 18:36:14 christos Exp $); #endif #endif /* not lint */ @@ -94,7 +94,7 @@ int reenter = 0; extern char **environ; static int readf(void *, char *, int); -static fpos_t seekf(void *, fpos_t, int); +static off_t seekf(void *, off_t, int); static int writef(void *, const char *, int); static int closef(void *); static int srccat(Char *, Char *); @@ -1245,8 +1245,8 @@ writef(void *oreo, const char *buf, int return write(DESC(oreo), buf, siz); } -static fpos_t -seekf(void *oreo, fpos_t off, int whence) +static off_t +seekf(void *oreo, off_t off, int whence) { return lseek(DESC(oreo), off, whence); } Index: src/distrib/sets/lists/base/ad.mips64eb diff -u src/distrib/sets/lists/base/ad.mips64eb:1.77 src/distrib/sets/lists/base/ad.mips64eb:1.78 --- src/distrib/sets/lists/base/ad.mips64eb:1.77 Mon Jan 9 10:24:37 2012 +++ src/distrib/sets/lists/base/ad.mips64eb Sun Jan 22 13:36:14 2012 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips64eb,v 1.77 2012/01/09 15:24:37 dholland Exp $ +# $NetBSD: ad.mips64eb,v 1.78 2012/01/22 18:36:14 christos Exp $ ./libexec/ld.elf_so-64base-compat-shlib compat,pic ./libexec/ld.elf_so-o32base-sysutil-bin compat,pic ./usr/lib/64 base-compat-lib @@ -66,7 +66,7 @@
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Sun Jan 22 20:41:25 UTC 2012 Modified Files: src/sys/dev/ic: tpm.c tpmreg.h tpmvar.h Log Message: cosmetic fixes To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/tpm.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/tpmreg.h src/sys/dev/ic/tpmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/tpm.c diff -u src/sys/dev/ic/tpm.c:1.2 src/sys/dev/ic/tpm.c:1.3 --- src/sys/dev/ic/tpm.c:1.2 Sun Jan 22 11:35:39 2012 +++ src/sys/dev/ic/tpm.c Sun Jan 22 15:41:25 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $ */ +/* $NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $ */ /* * Copyright (c) 2008, 2009 Michael Shalayeff * Copyright (c) 2009, 2010 Hans-Jörg Höxer @@ -18,9 +18,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $); -/* #define TPM_DEBUG */ +#if 0 +#define TPM_DEBUG +#define aprint_debug_dev aprint_error_dev +#endif #include sys/param.h #include sys/systm.h @@ -93,12 +96,12 @@ tpm_tis12_probe(bus_space_tag_t bt, bus_ #ifdef TPM_DEBUG char buf[128]; snprintb(buf, sizeof(buf), TPM_CAPBITS, r); - printf(tpm: caps=%s\n, buf); + printf(%s: caps=%s\n, __func__, buf); #endif if ((r TPM_CAPSREQ) != TPM_CAPSREQ || !(r (TPM_INTF_INT_EDGE_RISING | TPM_INTF_INT_LEVEL_LOW))) { #ifdef TPM_DEBUG - printf(tpm: caps too low (caps=%s)\n, buf); + printf(%s: caps too low (caps=%s)\n, __func__, buf); #endif return 0; } @@ -162,7 +165,7 @@ tpm_tis12_init(struct tpm_softc *sc, int #ifdef TPM_DEBUG char cbuf[128]; snprintb(cbuf, sizeof(cbuf), TPM_CAPBITS, r); - aprint_debug_dev(sc-sc_dev, caps=%s , cbuf); + aprint_debug_dev(sc-sc_dev, %s: caps=%s , __func__, cbuf); #endif if ((r TPM_CAPSREQ) != TPM_CAPSREQ || !(r (TPM_INTF_INT_EDGE_RISING | TPM_INTF_INT_LEVEL_LOW))) { @@ -225,8 +228,8 @@ tpm_request_locality(struct tpm_softc *s rv = tsleep(sc-sc_init, PRIBIO | PCATCH, tpm_locality, 1); if (rv rv != EWOULDBLOCK) { #ifdef TPM_DEBUG - aprint_debug_dev(sc-sc_dev, - tpm_request_locality: interrupted %d\n, rv); + aprint_debug_dev(sc-sc_dev, %s: interrupted %d\n, + __func__, rv); #endif return rv; } @@ -236,9 +239,8 @@ tpm_request_locality(struct tpm_softc *s (TPM_ACCESS_VALID | TPM_ACCESS_ACTIVE_LOCALITY)) { #ifdef TPM_DEBUG char buf[128]; - snprintb(buf, sizeof(buf), TPM_CAPBITS, r); - aprint_debug_dev(sc-sc_dev, - tpm_request_locality: access %s\n, buf); + snprintb(buf, sizeof(buf), TPM_ACCESS_BITS, r); + aprint_debug_dev(sc-sc_dev, %s: access %s\n, __func__, buf); #endif return EBUSY; } @@ -264,7 +266,7 @@ tpm_getburst(struct tpm_softc *sc) burst |= bus_space_read_1(sc-sc_bt, sc-sc_bh, TPM_STS + 2) 8; #ifdef TPM_DEBUG - aprint_debug_dev(sc-sc_dev, tpm_getburst: read %d\n, burst); + aprint_debug_dev(sc-sc_dev, %s: read %d\n, __func__, burst); #endif if (burst) return burst; @@ -281,12 +283,7 @@ tpm_getburst(struct tpm_softc *sc) uint8_t tpm_status(struct tpm_softc *sc) { - uint8_t status; - - status = bus_space_read_1(sc-sc_bt, sc-sc_bh, TPM_STS) - TPM_STS_MASK; - - return status; + return bus_space_read_1(sc-sc_bt, sc-sc_bh, TPM_STS) TPM_STS_MASK; } int @@ -305,7 +302,7 @@ bool tpm_suspend(device_t dev, const pmf_qual_t *qual) { struct tpm_softc *sc = device_private(dev); - uint8_t command[] = { + static const uint8_t command[] = { 0, 193, /* TPM_TAG_RQU_COMMAND */ 0, 0, 0, 10, /* Length in bytes */ 0, 0, 0, 156 /* TPM_ORD_SaveStates */ @@ -314,10 +311,10 @@ tpm_suspend(device_t dev, const pmf_qual /* * Power down: We have to issue the SaveStates command. */ - sc-sc_write(sc, command, sizeof(command)); - sc-sc_read(sc, command, sizeof(command), NULL, TPM_HDRSIZE); + (*sc-sc_write)(sc, command, sizeof(command)); + (*sc-sc_read)(sc, command, sizeof(command), NULL, TPM_HDRSIZE); #ifdef TPM_DEBUG - aprint_debug_dev(sc-sc_dev, tpm_suspend: power down\n); + aprint_debug_dev(sc-sc_dev, %s: power down\n, __func__); #endif return 0; } @@ -331,7 +328,7 @@ tpm_resume(device_t dev, const pmf_qual_ { #ifdef TPM_DEBUG struct tpm_softc *sc = device_private(dev); - aprint_debug_dev(sc-sc_dev, tpm_resume: resume\n); + aprint_debug_dev(sc-sc_dev, %s: resume\n, __func__); #endif return 0; } @@ -351,7 +348,7 @@ tpm_waitfor_poll(struct tpm_softc *sc, u if (rv rv != EWOULDBLOCK) { #ifdef TPM_DEBUG aprint_debug_dev(sc-sc_dev, - tpm_waitfor_poll: interrupted %d\n, rv); + %s: interrupted %d\n, __func__, rv); #endif return rv; } @@ -397,7 +394,7 @@ tpm_waitfor_int(struct tpm_softc *sc, ui to = tpm_tmotohz(tmo); #ifdef TPM_DEBUG aprint_debug_dev(sc-sc_dev, -
CVS commit: src/common/lib/libutil
Module Name:src Committed By: christos Date: Mon Jan 23 02:34:01 UTC 2012 Modified Files: src/common/lib/libutil: snprintb.c Log Message: In the new format F did not print a separator as required. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libutil/snprintb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libutil/snprintb.c diff -u src/common/lib/libutil/snprintb.c:1.5 src/common/lib/libutil/snprintb.c:1.6 --- src/common/lib/libutil/snprintb.c:1.5 Tue May 12 22:50:31 2009 +++ src/common/lib/libutil/snprintb.c Sun Jan 22 21:34:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: snprintb.c,v 1.5 2009/05/13 02:50:31 pgoyette Exp $ */ +/* $NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ # include sys/cdefs.h # if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: snprintb.c,v 1.5 2009/05/13 02:50:31 pgoyette Exp $); +__RCSID($NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $); # endif # include sys/types.h @@ -51,7 +51,7 @@ __RCSID($NetBSD: snprintb.c,v 1.5 2009/ # include errno.h # else # include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.5 2009/05/13 02:50:31 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $); # include sys/param.h # include sys/inttypes.h # include sys/systm.h @@ -209,9 +209,9 @@ snprintb_m(char *buf, size_t buflen, con f_len = *bitfmt++; /* field length */ field = (val bit) (((uint64_t)1 f_len) - 1); +PUTSEP; if (ch == 'F') /* just extract */ break; -PUTSEP; if (restart == 0) { sep = ','; PUTS(bitfmt);
CVS commit: src/common/lib/libutil
Module Name:src Committed By: christos Date: Mon Jan 23 03:22:41 UTC 2012 Modified Files: src/common/lib/libutil: snprintb.c Log Message: also handle the separator after the F field. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/common/lib/libutil/snprintb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libutil/snprintb.c diff -u src/common/lib/libutil/snprintb.c:1.6 src/common/lib/libutil/snprintb.c:1.7 --- src/common/lib/libutil/snprintb.c:1.6 Sun Jan 22 21:34:01 2012 +++ src/common/lib/libutil/snprintb.c Sun Jan 22 22:22:41 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $ */ +/* $NetBSD: snprintb.c,v 1.7 2012/01/23 03:22:41 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ # include sys/cdefs.h # if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $); +__RCSID($NetBSD: snprintb.c,v 1.7 2012/01/23 03:22:41 christos Exp $); # endif # include sys/types.h @@ -51,7 +51,7 @@ __RCSID($NetBSD: snprintb.c,v 1.6 2012/ # include errno.h # else # include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.7 2012/01/23 03:22:41 christos Exp $); # include sys/param.h # include sys/inttypes.h # include sys/systm.h @@ -137,7 +137,7 @@ snprintb_m(char *buf, size_t buflen, con STORE(''); \ } else { \ /* Remember separator location */ \ - if ( l_max 0 sep != '') { \ + if (l_max 0 sep != '') { \ s_len = l_len;\ s_bp = bp;\ s_fmt = cur_fmt; \ @@ -210,13 +210,12 @@ snprintb_m(char *buf, size_t buflen, con field = (val bit) (((uint64_t)1 f_len) - 1); PUTSEP; +if (restart == 0) + sep = ','; if (ch == 'F') /* just extract */ break; if (restart == 0) { - sep = ','; PUTS(bitfmt); -} -if (restart == 0) { PUTCHR('='); } if (restart == 0) {
CVS commit: src/sys/dev/ic
Module Name:src Committed By: christos Date: Mon Jan 23 04:12:26 UTC 2012 Modified Files: src/sys/dev/ic: tpm.c tpmreg.h Log Message: reduce the polling interval to 2 seconds, and try harder to get interrupts working. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/tpm.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/tpmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/tpm.c diff -u src/sys/dev/ic/tpm.c:1.3 src/sys/dev/ic/tpm.c:1.4 --- src/sys/dev/ic/tpm.c:1.3 Sun Jan 22 15:41:25 2012 +++ src/sys/dev/ic/tpm.c Sun Jan 22 23:12:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $ */ +/* $NetBSD: tpm.c,v 1.4 2012/01/23 04:12:26 christos Exp $ */ /* * Copyright (c) 2008, 2009 Michael Shalayeff * Copyright (c) 2009, 2010 Hans-Jörg Höxer @@ -18,7 +18,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.4 2012/01/23 04:12:26 christos Exp $); #if 0 #define TPM_DEBUG @@ -132,24 +132,40 @@ tpm_tis12_irqinit(struct tpm_softc *sc, } /* Ack and disable all interrupts. */ + r = bus_space_read_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE); bus_space_write_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE, - bus_space_read_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE) - ~TPM_GLOBAL_INT_ENABLE); + r ~TPM_GLOBAL_INT_ENABLE); bus_space_write_4(sc-sc_bt, sc-sc_bh, TPM_INT_STATUS, bus_space_read_4(sc-sc_bt, sc-sc_bh, TPM_INT_STATUS)); +#ifdef TPM_DEBUG + char buf[128]; + snprintb(buf, sizeof(buf), TPM_INTERRUPT_ENABLE_BITS, r); + aprint_debug_dev(sc-sc_dev, %s: before ien %s\n, __func__, buf); +#endif /* Program interrupt vector. */ bus_space_write_1(sc-sc_bt, sc-sc_bh, TPM_INT_VECTOR, irq); sc-sc_vector = irq; /* Program interrupt type. */ + r = ~(TPM_INT_EDGE_RISING|TPM_INT_EDGE_FALLING|TPM_INT_LEVEL_HIGH| + TPM_INT_LEVEL_LOW); + r |= TPM_GLOBAL_INT_ENABLE|TPM_CMD_READY_INT|TPM_LOCALITY_CHANGE_INT| + TPM_STS_VALID_INT|TPM_DATA_AVAIL_INT; if (sc-sc_capabilities TPM_INTF_INT_EDGE_RISING) - r = TPM_INT_EDGE_RISING; + r |= TPM_INT_EDGE_RISING; + else if (sc-sc_capabilities TPM_INTF_INT_EDGE_FALLING) + r |= TPM_INT_EDGE_FALLING; else if (sc-sc_capabilities TPM_INTF_INT_LEVEL_HIGH) - r = TPM_INT_LEVEL_HIGH; + r |= TPM_INT_LEVEL_HIGH; else - r = TPM_INT_LEVEL_LOW; + r |= TPM_INT_LEVEL_LOW; + bus_space_write_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE, r); +#ifdef TPM_DEBUG + snprintb(buf, sizeof(buf), TPM_INTERRUPT_ENABLE_BITS, r); + aprint_debug_dev(sc-sc_dev, %s: after ien %s\n, __func__, buf); +#endif return 0; } Index: src/sys/dev/ic/tpmreg.h diff -u src/sys/dev/ic/tpmreg.h:1.2 src/sys/dev/ic/tpmreg.h:1.3 --- src/sys/dev/ic/tpmreg.h:1.2 Sun Jan 22 15:41:25 2012 +++ src/sys/dev/ic/tpmreg.h Sun Jan 22 23:12:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: tpmreg.h,v 1.2 2012/01/22 20:41:25 christos Exp $ */ +/* $NetBSD: tpmreg.h,v 1.3 2012/01/23 04:12:26 christos Exp $ */ /* * Copyright (c) 2008, 2009 Michael Shalayeff @@ -46,7 +46,9 @@ #define TPM_STS_VALID_INT 0x0002 /* int on TPM_STS_VALID is set */ #define TPM_DATA_AVAIL_INT 0x0001 /* int on TPM_STS_DATA_AVAIL is set */ #define TPM_INTERRUPT_ENABLE_BITS \ -\020\040ENA\010RDY\03LOCH\02STSV\01DRDY +\177\020b\0DRDY\0b\1STSVALID\0b\2LOCCHG\0 \ +F\3\2:\0HIGH\0:\1LOW\0:\2RISE\0:\3FALL\0 \ +b\7IRDY\0b\x1fGIENABLE\0 #define TPM_INT_VECTOR 0x000c /* 8 bit reg for 4 bit irq vector */ #define TPM_INT_STATUS 0x0010 /* bits are 0x87 from TPM_INTERRUPT_ENABLE */ @@ -84,7 +86,7 @@ #define TPM_ACCESS_TMO 2000 /* 2sec */ #define TPM_READY_TMO 2000 /* 2sec */ -#define TPM_READ_TMO 12 /* 2 minutes */ +#define TPM_READ_TMO 2000 /* 2sec */ #define TPM_BURST_TMO 2000 /* 2sec */ #define TPM_LEGACY_BUSY 0x01
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Mon Jan 23 21:24:44 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: armnbsd-nat.c Log Message: add supply_{g,fp}regset() To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.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/gdb/dist/gdb/armnbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.5 --- src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c:1.4 Sun Jan 22 15:27:28 2012 +++ src/external/gpl3/gdb/dist/gdb/armnbsd-nat.c Mon Jan 23 16:24:43 2012 @@ -181,6 +181,18 @@ fill_fpregset (const struct regcache *re regcache_raw_collect (regcache, ARM_FPS_REGNUM, (char *) fpregsetp-fpr_fpsr); } +void +supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp) +{ + arm_supply_gregset (regcache, (struct reg *)gregsetp); +} + +void +supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) +{ + arm_supply_fparegset (regcache, (struct fpreg *)fpregsetp); +} + static void fetch_register (struct regcache *regcache, int regno) {
CVS commit: src/sys
Module Name:src Committed By: christos Date: Tue Jan 24 20:03:38 UTC 2012 Modified Files: src/sys/arch/alpha/include: param.h src/sys/arch/amd64/include: param.h src/sys/arch/arm/include: param.h src/sys/arch/hppa/include: param.h src/sys/arch/i386/include: param.h src/sys/arch/ia64/include: param.h src/sys/arch/m68k/include: param.h src/sys/arch/mips/include: mips_param.h src/sys/arch/powerpc/include: param.h src/sys/arch/sh3/include: param.h src/sys/arch/sparc/include: param.h src/sys/arch/sparc64/include: param.h src/sys/arch/vax/include: param.h src/sys/kern: init_main.c kern_exec.c src/sys/sys: param.h Log Message: Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently, and avoid definining them in 10 different places if not needed. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/include/param.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amd64/include/param.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/param.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/include/param.h cvs rdiff -u -r1.73 -r1.74 src/sys/arch/i386/include/param.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/include/param.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/m68k/include/param.h cvs rdiff -u -r1.31 -r1.32 src/sys/arch/mips/include/mips_param.h cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/param.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sh3/include/param.h cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sparc/include/param.h cvs rdiff -u -r1.46 -r1.47 src/sys/arch/sparc64/include/param.h cvs rdiff -u -r1.59 -r1.60 src/sys/arch/vax/include/param.h cvs rdiff -u -r1.438 -r1.439 src/sys/kern/init_main.c cvs rdiff -u -r1.333 -r1.334 src/sys/kern/kern_exec.c cvs rdiff -u -r1.399 -r1.400 src/sys/sys/param.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/alpha/include/param.h diff -u src/sys/arch/alpha/include/param.h:1.39 src/sys/arch/alpha/include/param.h:1.40 --- src/sys/arch/alpha/include/param.h:1.39 Fri Jan 20 09:08:05 2012 +++ src/sys/arch/alpha/include/param.h Tue Jan 24 15:03:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.39 2012/01/20 14:08:05 joerg Exp $ */ +/* $NetBSD: param.h,v 1.40 2012/01/24 20:03:36 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -49,21 +49,6 @@ #include machine/cpu.h -/* - * Round p (pointer or byte index) up to a correctly-aligned value for all - * data types (int, long, ...). The result is u_long and must be cast to - * any desired pointer type. - * - * ALIGNED_POINTER is a boolean macro that checks whether an address - * is valid to fetch data elements of type t from on this architecture. - * This does not reflect the optimal alignment, just the possibility - * (within reasonable limits). - * - */ -#define ALIGNBYTES __ALIGNBYTES -#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) ~ ALIGNBYTES) -#define ALIGNED_POINTER(p,t) u_long)(p)) (sizeof(t)-1)) == 0) - #define NBPG (1 ALPHA_PGSHIFT) /* bytes/page */ #define PGOFSET (NBPG-1) /* byte off. into pg */ #define PGSHIFT ALPHA_PGSHIFT /* LOG2(NBPG) */ Index: src/sys/arch/amd64/include/param.h diff -u src/sys/arch/amd64/include/param.h:1.15 src/sys/arch/amd64/include/param.h:1.16 --- src/sys/arch/amd64/include/param.h:1.15 Fri Jan 20 09:08:05 2012 +++ src/sys/arch/amd64/include/param.h Tue Jan 24 15:03:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.15 2012/01/20 14:08:05 joerg Exp $ */ +/* $NetBSD: param.h,v 1.16 2012/01/24 20:03:36 christos Exp $ */ #ifdef __x86_64__ @@ -12,19 +12,6 @@ #define MACHINE_ARCH x86_64 #define MID_MACHINE MID_X86_64 -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is u_int and - * must be cast to any desired pointer type. - * - * ALIGNED_POINTER is a boolean macro that checks whether an address - * is valid to fetch data elements of type t from on this architecture. - * This does not reflect the optimal alignment, just the possibility - * (within reasonable limits). - * - */ -#define ALIGNBYTES __ALIGNBYTES -#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) ~ALIGNBYTES) #define ALIGNED_POINTER(p,t) 1 #define ALIGNBYTES32 (sizeof(int) - 1) Index: src/sys/arch/arm/include/param.h diff -u src/sys/arch/arm/include/param.h:1.14 src/sys/arch/arm/include/param.h:1.15 --- src/sys/arch/arm/include/param.h:1.14 Fri Jan 20 09:08:05 2012 +++ src/sys/arch/arm/include/param.h Tue Jan 24 15:03:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.14 2012/01/20 14:08:05 joerg Exp $ */ +/* $NetBSD: param.h,v 1.15 2012/01/24 20:03:36 christos Exp $ */ /* * Copyright (c) 1994,1995 Mark Brinicombe. @@ -79,23 +79,8 @@ #define MID_MACHINE MID_ARM6 -/* - * Round p (pointer or byte index) up to a correctly-aligned value
CVS commit: src
Module Name:src Committed By: christos Date: Wed Jan 25 00:28:36 UTC 2012 Modified Files: src/lib/libc/sys: dup.2 fcntl.2 getsockopt.2 kqueue.2 open.2 pipe.2 socket.2 src/sys/kern: kern_descrip.c kern_event.c sys_descrip.c sys_generic.c sys_pipe.c uipc_socket.c uipc_syscalls.c src/sys/sys: fcntl.h filedesc.h socket.h Log Message: As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE on EPIPE for all file descriptor types: - provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD] - provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD] - provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX] - provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX] To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/sys/dup.2 src/lib/libc/sys/pipe.2 cvs rdiff -u -r1.39 -r1.40 src/lib/libc/sys/fcntl.2 cvs rdiff -u -r1.34 -r1.35 src/lib/libc/sys/getsockopt.2 cvs rdiff -u -r1.31 -r1.32 src/lib/libc/sys/kqueue.2 cvs rdiff -u -r1.50 -r1.51 src/lib/libc/sys/open.2 cvs rdiff -u -r1.37 -r1.38 src/lib/libc/sys/socket.2 cvs rdiff -u -r1.217 -r1.218 src/sys/kern/kern_descrip.c cvs rdiff -u -r1.74 -r1.75 src/sys/kern/kern_event.c cvs rdiff -u -r1.23 -r1.24 src/sys/kern/sys_descrip.c cvs rdiff -u -r1.127 -r1.128 src/sys/kern/sys_generic.c cvs rdiff -u -r1.134 -r1.135 src/sys/kern/sys_pipe.c cvs rdiff -u -r1.206 -r1.207 src/sys/kern/uipc_socket.c cvs rdiff -u -r1.150 -r1.151 src/sys/kern/uipc_syscalls.c cvs rdiff -u -r1.41 -r1.42 src/sys/sys/fcntl.h cvs rdiff -u -r1.61 -r1.62 src/sys/sys/filedesc.h cvs rdiff -u -r1.104 -r1.105 src/sys/sys/socket.h 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/dup.2 diff -u src/lib/libc/sys/dup.2:1.27 src/lib/libc/sys/dup.2:1.28 --- src/lib/libc/sys/dup.2:1.27 Fri Jul 22 07:02:39 2011 +++ src/lib/libc/sys/dup.2 Tue Jan 24 19:28:35 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: dup.2,v 1.27 2011/07/22 11:02:39 wiz Exp $ +.\ $NetBSD: dup.2,v 1.28 2012/01/25 00:28:35 christos Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)dup.2 8.1 (Berkeley) 6/4/93 .\ -.Dd July 16, 2011 +.Dd January 23, 2012 .Dt DUP 2 .Os .Sh NAME @@ -118,6 +118,11 @@ Set the property. .It Dv O_NONBLOCK Sets non-blocking I/O. +.It Dv O_NOSIGPIPE +Return +.Er EPIPE +instead of raising +.Dv SIGPIPE . .El .Sh RETURN VALUES The value \-1 is returned if an error occurs in either call. Index: src/lib/libc/sys/pipe.2 diff -u src/lib/libc/sys/pipe.2:1.27 src/lib/libc/sys/pipe.2:1.28 --- src/lib/libc/sys/pipe.2:1.27 Fri Jul 22 07:02:39 2011 +++ src/lib/libc/sys/pipe.2 Tue Jan 24 19:28:35 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: pipe.2,v 1.27 2011/07/22 11:02:39 wiz Exp $ +.\ $NetBSD: pipe.2,v 1.28 2012/01/25 00:28:35 christos Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)pipe.2 8.1 (Berkeley) 6/4/93 .\ -.Dd July 15, 2011 +.Dd January 23, 2012 .Dt PIPE 2 .Os .Sh NAME @@ -97,6 +97,11 @@ Set the property. .It Dv O_NONBLOCK Sets non-blocking I/O. +.It Dv O_NOSIGPIPE +Return +.Er EPIPE +instead of raising +.Dv SIGPIPE . .El .Sh RETURN VALUES On successful creation of the pipe, zero is returned. Index: src/lib/libc/sys/fcntl.2 diff -u src/lib/libc/sys/fcntl.2:1.39 src/lib/libc/sys/fcntl.2:1.40 --- src/lib/libc/sys/fcntl.2:1.39 Mon Jun 27 04:21:08 2011 +++ src/lib/libc/sys/fcntl.2 Tue Jan 24 19:28:35 2012 @@ -1,4 +1,4 @@ -.\ $NetBSD: fcntl.2,v 1.39 2011/06/27 08:21:08 wiz Exp $ +.\ $NetBSD: fcntl.2,v 1.40 2012/01/25 00:28:35 christos Exp $ .\ .\ Copyright (c) 1983, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)fcntl.2 8.2 (Berkeley) 1/12/94 .\ -.Dd June 25, 2011 +.Dd January 23, 2012 .Dt FCNTL 2 .Os .Sh NAME @@ -146,35 +146,32 @@ Close all file descriptors greater than .Ar fd . .It Dv F_MAXFD Return the maximum file descriptor number currently open by the process. +.It Dv F_GETNOSIGPIPE +Return if the +.Dv O_NOSIGPIPE +flag is set in the file descriptor. +.It Dv F_SETNOSIGPIPE +Set or clear the +.Dv O_NOSIGPIPE +in the file descriptor. .El .Pp -The flags for the +The set of valid flags for the .Dv F_GETFL and .Dv F_SETFL flags are as follows: -.Bl -tag -width O_NONBLOCKX -.It Dv O_NONBLOCK -Non-blocking I/O; if no data is available to a -.Xr read 2 -call, or if a -.Xr write 2 -operation would block, -the read or write call returns \-1 with the error -.Er EAGAIN . -.It Dv O_APPEND -Force each write to append at the end of file; -corresponds to the -.Dv O_APPEND -flag of +.Dv O_APPEND , +.Dv O_ASYNC , +.Dv O_FSYNC , +.Dv O_NONBLOCK , +.Dv O_DSYNC , +.Dv O_RSYNC , +.Dv O_ALT_IO , +.Dv O_DIRECT , +.Dv O_NOSIGPIPE . +These flags are described
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 03:25:02 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: i386bsd-nat.c i386bsd-nat.h nbsd-thread.c Log Message: Fix i386 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/i386bsd-nat.c cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/nbsd-thread.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/gdb/dist/gdb/i386bsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/i386bsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/i386bsd-nat.c:1.3 --- src/external/gpl3/gdb/dist/gdb/i386bsd-nat.c:1.2 Sun Sep 25 12:30:24 2011 +++ src/external/gpl3/gdb/dist/gdb/i386bsd-nat.c Tue Jan 24 22:25:02 2012 @@ -88,7 +88,7 @@ static int have_ptrace_xmmregs = -1; /* Supply the general-purpose registers in GREGS, to REGCACHE. */ -static void +void i386bsd_supply_gregset (struct regcache *regcache, const void *gregs) { const char *regs = gregs; @@ -107,7 +107,7 @@ i386bsd_supply_gregset (struct regcache GREGS. If REGNUM is -1, collect and store all appropriate registers. */ -static void +void i386bsd_collect_gregset (const struct regcache *regcache, void *gregs, int regnum) { Index: src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h diff -u src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h:1.1.1.1 src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h:1.2 --- src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h:1.1.1.1 Sat Sep 24 16:10:46 2011 +++ src/external/gpl3/gdb/dist/gdb/i386bsd-nat.h Tue Jan 24 22:25:02 2012 @@ -36,4 +36,10 @@ extern void i386bsd_dr_reset_addr (int r extern unsigned long i386bsd_dr_get_status (void); +extern void i386bsd_supply_gregset (struct regcache *regcache, +const void *gregs); + +extern void i386bsd_collect_gregset (const struct regcache *regcache, + void *gregs, int regnum); + #endif /* i386bsd-nat.h */ Index: src/external/gpl3/gdb/dist/gdb/nbsd-thread.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.5 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.6 --- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.5 Thu Oct 13 17:11:57 2011 +++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Tue Jan 24 22:25:02 2012 @@ -1123,6 +1123,7 @@ init_nbsd_proc_callbacks (void) { nbsd_thread_callbacks.proc_read = nbsd_thread_proc_read; nbsd_thread_callbacks.proc_write = nbsd_thread_proc_write; +/*###1126 [cc] error: assignment from incompatible pointer type%%%*/ nbsd_thread_callbacks.proc_lookup = nbsd_thread_proc_lookup; nbsd_thread_callbacks.proc_regsize = nbsd_thread_proc_regsize; nbsd_thread_callbacks.proc_getregs = nbsd_thread_proc_getregs;
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 03:26:40 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: nbsd-thread.c Log Message: remove error(1) junk. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gdb/dist/gdb/nbsd-thread.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/gdb/dist/gdb/nbsd-thread.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.6 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.7 --- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.6 Tue Jan 24 22:25:02 2012 +++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Tue Jan 24 22:26:39 2012 @@ -1123,7 +1123,6 @@ init_nbsd_proc_callbacks (void) { nbsd_thread_callbacks.proc_read = nbsd_thread_proc_read; nbsd_thread_callbacks.proc_write = nbsd_thread_proc_write; -/*###1126 [cc] error: assignment from incompatible pointer type%%%*/ nbsd_thread_callbacks.proc_lookup = nbsd_thread_proc_lookup; nbsd_thread_callbacks.proc_regsize = nbsd_thread_proc_regsize; nbsd_thread_callbacks.proc_getregs = nbsd_thread_proc_getregs;
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Wed Jan 25 14:04:09 UTC 2012 Modified Files: src/sys/kern: sys_descrip.c uipc_syscalls.c Log Message: Add locking, requested by yamt. Note that locking is not used everywhere for these. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/kern/sys_descrip.c cvs rdiff -u -r1.151 -r1.152 src/sys/kern/uipc_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_descrip.c diff -u src/sys/kern/sys_descrip.c:1.24 src/sys/kern/sys_descrip.c:1.25 --- src/sys/kern/sys_descrip.c:1.24 Tue Jan 24 19:28:36 2012 +++ src/sys/kern/sys_descrip.c Wed Jan 25 09:04:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_descrip.c,v 1.24 2012/01/25 00:28:36 christos Exp $ */ +/* $NetBSD: sys_descrip.c,v 1.25 2012/01/25 14:04:09 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_descrip.c,v 1.24 2012/01/25 00:28:36 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_descrip.c,v 1.25 2012/01/25 14:04:09 christos Exp $); #include sys/param.h #include sys/systm.h @@ -409,9 +409,9 @@ sys_fcntl(struct lwp *l, const struct sy case F_SETNOSIGPIPE: if (SCARG(uap, arg)) - fp-f_flag |= FNOSIGPIPE; + atomic_or_uint(fp-f_flag, FNOSIGPIPE); else - fp-f_flag = ~FNOSIGPIPE; + atomic_and_uint(fp-f_flag, ~FNOSIGPIPE); *retval = 0; break; Index: src/sys/kern/uipc_syscalls.c diff -u src/sys/kern/uipc_syscalls.c:1.151 src/sys/kern/uipc_syscalls.c:1.152 --- src/sys/kern/uipc_syscalls.c:1.151 Tue Jan 24 19:28:36 2012 +++ src/sys/kern/uipc_syscalls.c Wed Jan 25 09:04:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.151 2012/01/25 00:28:36 christos Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.151 2012/01/25 00:28:36 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $); #include opt_pipe.h @@ -974,9 +974,9 @@ sys_setsockopt(struct lwp *l, const stru error = sosetopt(so, sopt); if (so-so_options SO_NOSIGPIPE) - fp-f_flag |= FNOSIGPIPE; + atomic_or_uint(fp-f_flag, FNOSIGPIPE); else - fp-f_flag = ~FNOSIGPIPE; + atomic_and_uint(fp-f_flag, ~FNOSIGPIPE); out: sockopt_destroy(sopt); @@ -1014,9 +1014,9 @@ sys_getsockopt(struct lwp *l, const stru sockopt_init(sopt, SCARG(uap, level), SCARG(uap, name), 0); if (fp-f_flag FNOSIGPIPE) - so-so_options |= SO_NOSIGPIPE; + atomic_or_uint(so-so_options, SO_NOSIGPIPE); else - so-so_options = ~SO_NOSIGPIPE; + atomic_and_uint(so-so_options, ~SO_NOSIGPIPE); error = sogetopt(so, sopt); if (error) goto out;
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: christos Date: Wed Jan 25 14:06:07 UTC 2012 Modified Files: src/sys/compat/netbsd32: netbsd32_fs.c Log Message: Add FNOSIGPIPE for compat32; noted by yamt. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/compat/netbsd32/netbsd32_fs.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/netbsd32/netbsd32_fs.c diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.61 src/sys/compat/netbsd32/netbsd32_fs.c:1.62 --- src/sys/compat/netbsd32/netbsd32_fs.c:1.61 Sun Jun 5 04:42:59 2011 +++ src/sys/compat/netbsd32/netbsd32_fs.c Wed Jan 25 09:06:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_fs.c,v 1.61 2011/06/05 08:42:59 dsl Exp $ */ +/* $NetBSD: netbsd32_fs.c,v 1.62 2012/01/25 14:06:07 christos Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_fs.c,v 1.61 2011/06/05 08:42:59 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_fs.c,v 1.62 2012/01/25 14:06:07 christos Exp $); #include sys/param.h #include sys/systm.h @@ -296,7 +296,7 @@ dofilewritev32(int fd, struct file *fp, if (auio.uio_resid != cnt (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; - if (error == EPIPE) { + if (error == EPIPE (fp-f_flag FNOSIGPIPE) == 0) { mutex_enter(proc_lock); psignal(curproc, SIGPIPE); mutex_exit(proc_lock);
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Wed Jan 25 15:51:24 UTC 2012 Modified Files: src/sys/kern: uipc_syscalls.c Log Message: need sys/atomic.h To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/sys/kern/uipc_syscalls.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/uipc_syscalls.c diff -u src/sys/kern/uipc_syscalls.c:1.152 src/sys/kern/uipc_syscalls.c:1.153 --- src/sys/kern/uipc_syscalls.c:1.152 Wed Jan 25 09:04:09 2012 +++ src/sys/kern/uipc_syscalls.c Wed Jan 25 10:51:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.152 2012/01/25 14:04:09 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $); #include opt_pipe.h @@ -80,6 +80,7 @@ __KERNEL_RCSID(0, $NetBSD: uipc_syscall #include sys/un.h #include sys/ktrace.h #include sys/event.h +#include sys/atomic.h #include sys/kauth.h #include sys/mount.h
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 16:08:37 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: m68kbsd-nat.c Log Message: make gdb link again To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.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/gdb/dist/gdb/m68kbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.5 --- src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c:1.4 Sun Jan 22 15:27:28 2012 +++ src/external/gpl3/gdb/dist/gdb/m68kbsd-nat.c Wed Jan 25 11:08:37 2012 @@ -32,6 +32,16 @@ #include m68k-tdep.h #include inf-ptrace.h +#ifndef HAVE_GREGSET_T +typedef struct reg gregset_t; +#endif + +#ifndef HAVE_FPREGSET_T +typedef struct fpreg fpregset_t; +#endif + +#include gregset.h + static int m68kbsd_gregset_supplies_p (int regnum) { @@ -91,7 +101,7 @@ m68kbsd_collect_gregset (const struct re in FPREGS. */ static void -m68kbsd_collect_fpregset (struct regcache *regcache, +m68kbsd_collect_fpregset (const struct regcache *regcache, void *fpregs, int regnum) { struct gdbarch *gdbarch = get_regcache_arch (regcache); @@ -106,6 +116,36 @@ m68kbsd_collect_fpregset (struct regcach } } +void +supply_gregset (struct regcache *regcache, const gregset_t *gregsetp) +{ + m68kbsd_supply_gregset (regcache, gregsetp); +} + +/* Fill register REGNUM (if it is a general-purpose register) in + *GREGSETP with the value in GDB's register cache. If REGNUM is -1, + do this for all registers. */ + +void +fill_gregset (const struct regcache *regcache, + gregset_t *gregsetp, int regnum) +{ + m68kbsd_collect_gregset (regcache, gregsetp, regnum); +} + +void +supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp) +{ + m68kbsd_supply_fpregset (regcache, fpregsetp); +} + +void +fill_fpregset (const struct regcache *regcache, + fpregset_t *fpregsetp, int regnum) +{ + m68kbsd_collect_fpregset (regcache, fpregsetp, regnum); +} + /* Fetch register REGNUM from the inferior. If REGNUM is -1, do this for all registers (including the floating-point registers). */
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 16:25:29 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: sparc64nbsd-nat.c Log Message: fix this properly. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.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/gdb/dist/gdb/sparc64nbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.5 --- src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c:1.4 Mon Jan 23 16:51:46 2012 +++ src/external/gpl3/gdb/dist/gdb/sparc64nbsd-nat.c Wed Jan 25 11:25:28 2012 @@ -27,6 +27,17 @@ #include sparc64-tdep.h #include sparc-nat.h +#include machine/reg.h + +#ifndef HAVE_GREGSET_T +typedef struct reg gregset_t; +#endif + +#ifndef HAVE_FPREGSET_T +typedef struct fpreg fpregset_t; +#endif +#include gregset.h + /* NetBSD is different from the other OSes that support both SPARC and UltraSPARC in that the result of ptrace(2) depends on whether the traced process is 32-bit or 64-bit. */ @@ -126,28 +137,26 @@ sparc64nbsd_fpregset_supplies_p (struct return 0; } - void -supply_gregset (struct regcache *regcache, const void *gregs) +supply_gregset (struct regcache *regcache, const gregset_t *gregs) { sparc64nbsd_supply_gregset (sparc_gregset, regcache, -1, gregs); } void -supply_fpregset (struct regcache *regcache, const void *fpregs) +supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs) { sparc64nbsd_supply_fpregset (regcache, -1, fpregs); } void -fill_gregset (const struct regcache *regcache, void *gregs, int regnum) +fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum) { sparc64nbsd_collect_gregset (sparc_gregset, regcache, regnum, gregs); } void -fill_fpregset (const struct regcache *regcache, - void *fpregs, int regnum) +fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum) { sparc64nbsd_collect_fpregset (regcache, regnum, fpregs); }
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 16:48:44 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: nbsd-thread.c Log Message: Deal with sh3 having no FPREGS and having 32 bit pointers and 64 bit CORE_ADDR. Ugly. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/dist/gdb/nbsd-thread.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/gdb/dist/gdb/nbsd-thread.c diff -u src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.7 src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.8 --- src/external/gpl3/gdb/dist/gdb/nbsd-thread.c:1.7 Tue Jan 24 22:26:39 2012 +++ src/external/gpl3/gdb/dist/gdb/nbsd-thread.c Wed Jan 25 11:48:44 2012 @@ -42,6 +42,11 @@ #include observer.h #include machine/reg.h +#ifndef __sh3__ +#define HAVE_FPREGS +#else +struct fpreg { }; +#endif #ifndef HAVE_GREGSET_T typedef struct reg gregset_t; @@ -366,7 +371,9 @@ nbsd_thread_fetch_registers (struct targ struct target_ops *beneath = find_target_beneath (ops); td_thread_t *thread; gregset_t gregs; +#ifdef HAVE_FPREGS fpregset_t fpregs; +#endif int val; struct cleanup *old_chain; @@ -381,8 +388,10 @@ nbsd_thread_fetch_registers (struct targ error (nbsd_thread_fetch_registers: td_thr_getregs: %s\n, td_err_string (val)); supply_gregset (cache, gregs); +#ifdef HAVE_FPREGS if ((val = td_thr_getregs (thread, 1, fpregs)) == 0) supply_fpregset (cache, fpregs); +#endif } else { @@ -404,7 +413,9 @@ nbsd_thread_store_registers (struct targ struct target_ops *beneath = find_target_beneath (ops); td_thread_t *thread; gregset_t gregs; +#ifdef HAVE_FPREGS fpregset_t fpregs; +#endif int val; if (nbsd_thread_active IS_THREAD (inferior_ptid)) @@ -415,16 +426,20 @@ nbsd_thread_store_registers (struct targ td_err_string (val)); fill_gregset (cache, gregs, -1); +#ifdef HAVE_FPREGS fill_fpregset (cache, fpregs, -1); +#endif val = td_thr_setregs (thread, 0, gregs); if (val != 0) error (nbsd_thread_store_registers: td_thr_setregs: %s\n, td_err_string (val)); +#ifdef HAVE_FPREGS val = td_thr_setregs (thread, 1, fpregs); if (val != 0) error (nbsd_thread_store_registers: td_thr_setregs: %s\n, td_err_string (val)); +#endif } else { @@ -842,7 +857,7 @@ nbsd_thread_examine_cmd (char *exp, int else return; - if ((ret = td_map_pth2thr (main_ta, (pthread_t) addr, th)) != 0) + if ((ret = td_map_pth2thr (main_ta, (pthread_t)(uintptr_t)addr, th)) != 0) error (nbsd_thread_examine_command: td_map_pth2thr: %s, td_err_string (ret)); @@ -949,7 +964,7 @@ tsd_cb (pthread_key_t key, void (*destru printf_filtered (Key %3d , key); /* XXX What does GDB use to print a function? */ - ms = lookup_minimal_symbol_by_pc ((CORE_ADDR)destructor); + ms = lookup_minimal_symbol_by_pc ((CORE_ADDR)(uintptr_t)destructor); if (!ms) name = ???; @@ -975,7 +990,7 @@ nbsd_thread_proc_read (void *arg, caddr_ { int val; - val = target_read_memory ((CORE_ADDR)addr, buf, size); + val = target_read_memory ((CORE_ADDR)(uintptr_t)addr, buf, size); if (val == 0) return 0; @@ -989,7 +1004,7 @@ nbsd_thread_proc_write (void *arg, caddr { int val; - val = target_write_memory ((CORE_ADDR)addr, buf, size); + val = target_write_memory ((CORE_ADDR)(uintptr_t)addr, buf, size); if (val == 0) return 0; @@ -1007,7 +1022,7 @@ nbsd_thread_proc_lookup (void *arg, cons if (!ms) return TD_ERR_NOSYM; - *addr = (caddr_t) SYMBOL_VALUE_ADDRESS (ms); + *addr = (caddr_t)(uintptr_t)SYMBOL_VALUE_ADDRESS (ms); return 0; @@ -1022,7 +1037,11 @@ nbsd_thread_proc_regsize (void *arg, int *size = sizeof (gregset_t); break; case 1: +#ifdef HAVE_FPREGS *size = sizeof (fpregset_t); +#else + *size = 0; +#endif break; default: return TD_ERR_INVAL; @@ -1066,7 +1085,9 @@ nbsd_thread_proc_getregs (void *arg, int fill_gregset (cache, (gregset_t *)buf, -1); break; case 1: +#ifdef HAVE_FPREGS fill_fpregset (cache, (fpregset_t *)buf, -1); +#endif break; default: /* XXX need to handle other reg sets: SSE, AltiVec, etc. */ ret = TD_ERR_INVAL; @@ -1096,7 +1117,9 @@ nbsd_thread_proc_setregs (void *arg, int supply_gregset(cache, (gregset_t *)buf); break; case 1: +#ifdef HAVE_FPREGS supply_fpregset(cache, (fpregset_t *)buf); +#endif break; default: /* XXX need to handle other reg sets: SSE, AltiVec, etc. */ ret = TD_ERR_INVAL;
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Wed Jan 25 16:56:13 UTC 2012 Modified Files: src/sys/kern: uipc_syscalls.c Log Message: revert atomics for so_options since it is a short. To generate a diff of this commit: cvs rdiff -u -r1.153 -r1.154 src/sys/kern/uipc_syscalls.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/uipc_syscalls.c diff -u src/sys/kern/uipc_syscalls.c:1.153 src/sys/kern/uipc_syscalls.c:1.154 --- src/sys/kern/uipc_syscalls.c:1.153 Wed Jan 25 10:51:24 2012 +++ src/sys/kern/uipc_syscalls.c Wed Jan 25 11:56:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.154 2012/01/25 16:56:13 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.153 2012/01/25 15:51:24 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.154 2012/01/25 16:56:13 christos Exp $); #include opt_pipe.h @@ -1015,9 +1015,9 @@ sys_getsockopt(struct lwp *l, const stru sockopt_init(sopt, SCARG(uap, level), SCARG(uap, name), 0); if (fp-f_flag FNOSIGPIPE) - atomic_or_uint(so-so_options, SO_NOSIGPIPE); + so-so_options |= SO_NOSIGPIPE; else - atomic_and_uint(so-so_options, ~SO_NOSIGPIPE); + so-so_options = ~SO_NOSIGPIPE; error = sogetopt(so, sopt); if (error) goto out;
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 17:01:02 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: shnbsd-nat.c Log Message: hack to make sh3 build. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/shnbsd-nat.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/gdb/dist/gdb/shnbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.5 --- src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.4 Mon Oct 31 17:00:39 2011 +++ src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c Wed Jan 25 12:01:02 2012 @@ -34,7 +34,16 @@ #include nbsd-nat.h - +#ifndef HAVE_GREGSET_T +typedef struct reg gregset_t; +#endif + +#ifndef HAVE_FPREGSET_T +struct fpreg { }; +typedef struct fpreg fpregset_t; +#endif +#include gregset.h + /* Determine if PT_GETREGS fetches this register. */ #define GETREGS_SUPPLIES(gdbarch, regno) \ (((regno) = R0_REGNUM (regno) = (R0_REGNUM + 15)) \ @@ -91,6 +100,22 @@ shnbsd_store_inferior_registers (struct } } +void +supply_gregset (struct regcache *regcache, const gregset_t *gregs) +{ + if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), + (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1) + perror_with_name (_(Couldn't set registers)); +} + +void +fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum) +{ + if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), + (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1) + perror_with_name (_(Couldn't get registers)); +} + /* Provide a prototype to silence -Wmissing-prototypes. */ void _initialize_shnbsd_nat (void);
CVS commit: src/sys
Module Name:src Committed By: christos Date: Wed Jan 25 18:26:26 UTC 2012 Modified Files: src/sys/kern: kern_exec.c src/sys/sys: param.h Log Message: Add a macro to align the length of the stack, not the pointer itself, since we always want the alignment to grow the length. To generate a diff of this commit: cvs rdiff -u -r1.334 -r1.335 src/sys/kern/kern_exec.c cvs rdiff -u -r1.400 -r1.401 src/sys/sys/param.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/kern/kern_exec.c diff -u src/sys/kern/kern_exec.c:1.334 src/sys/kern/kern_exec.c:1.335 --- src/sys/kern/kern_exec.c:1.334 Tue Jan 24 15:03:36 2012 +++ src/sys/kern/kern_exec.c Wed Jan 25 13:26:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.334 2012/01/24 20:03:36 christos Exp $ */ +/* $NetBSD: kern_exec.c,v 1.335 2012/01/25 18:26:26 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.334 2012/01/24 20:03:36 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.335 2012/01/25 18:26:26 christos Exp $); #include opt_exec.h #include opt_ktrace.h @@ -793,7 +793,7 @@ execve1(struct lwp *l, const char *path, #endif /* PAX_ASLR */ /* make the stack safely aligned */ - len = (size_t)STACK_ALIGN(len, STACK_ALIGNBYTES); + len = STACK_LEN_ALIGN(len, STACK_ALIGNBYTES); if (len pack.ep_ssize) { /* in effect, compare to initial limit */ DPRINTF((%s: stack limit exceeded %zu\n, __func__, len)); Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.400 src/sys/sys/param.h:1.401 --- src/sys/sys/param.h:1.400 Tue Jan 24 15:03:36 2012 +++ src/sys/sys/param.h Wed Jan 25 13:26:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.400 2012/01/24 20:03:36 christos Exp $ */ +/* $NetBSD: param.h,v 1.401 2012/01/25 18:26:26 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -224,6 +224,7 @@ #define STACK_ALLOC(sp, _size) (((char *)(void *)(sp)) - (_size)) #define STACK_MAX(p, _size) ((char *)(void *)(p)) #endif +#define STACK_LEN_ALIGN(len, bytes) ((len) + bytes) ~bytes) #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Wed Jan 25 19:24:21 UTC 2012 Modified Files: src/external/gpl3/gdb/dist/gdb: ppcnbsd-nat.c Log Message: make powerpc compile. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.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/gdb/dist/gdb/ppcnbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.5 --- src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4 Sun Jan 22 15:27:28 2012 +++ src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c Wed Jan 25 14:24:21 2012 @@ -39,6 +39,16 @@ #include bsd-kvm.h #include inf-ptrace.h +#ifndef HAVE_GREGSET_T +typedef struct reg gregset_t; +#endif + +#ifndef HAVE_FPREGSET_T +typedef struct fpreg fpregset_t; +#endif +#include gregset.h + + /* Returns true if PT_GETREGS fetches this register. */ static int @@ -149,6 +159,38 @@ ppcnbsd_store_inferior_registers (struct } } +void +supply_gregset (struct regcache *regcache, const gregset_t *gregs) +{ + if (ptrace (PT_SETREGS, PIDGET (inferior_ptid), + (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1) +perror_with_name (_(Couldn't write registers)); +} + +void +supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs) +{ + if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid), + (PTRACE_TYPE_ARG3) fpregs, TIDGET (inferior_ptid)) == -1) +perror_with_name (_(Couldn't set FP registers)); +} + +void +fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum) +{ + if (ptrace (PT_GETREGS, PIDGET (inferior_ptid), + (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1) +perror_with_name (_(Couldn't get registers)); +} + +void +fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum) +{ + if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid), + (PTRACE_TYPE_ARG3) fpregs, TIDGET (inferior_ptid)) == -1) + perror_with_name (_(Couldn't get FP registers)); +} + static int ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) {
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Wed Jan 25 19:39:07 UTC 2012 Modified Files: src/sys/sys: param.h Log Message: missing paren To generate a diff of this commit: cvs rdiff -u -r1.401 -r1.402 src/sys/sys/param.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/param.h diff -u src/sys/sys/param.h:1.401 src/sys/sys/param.h:1.402 --- src/sys/sys/param.h:1.401 Wed Jan 25 13:26:26 2012 +++ src/sys/sys/param.h Wed Jan 25 14:39:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.401 2012/01/25 18:26:26 christos Exp $ */ +/* $NetBSD: param.h,v 1.402 2012/01/25 19:39:07 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -224,7 +224,7 @@ #define STACK_ALLOC(sp, _size) (((char *)(void *)(sp)) - (_size)) #define STACK_MAX(p, _size) ((char *)(void *)(p)) #endif -#define STACK_LEN_ALIGN(len, bytes) ((len) + bytes) ~bytes) +#define STACK_LEN_ALIGN(len, bytes) (((len) + bytes) ~bytes) #endif /* defined(_KERNEL) || defined(__EXPOSE_STACK) */
CVS commit: xsrc/external/mit/xf86-input-mouse/dist/src
Module Name:xsrc Committed By: christos Date: Thu Jan 26 22:43:06 UTC 2012 Modified Files: xsrc/external/mit/xf86-input-mouse/dist/src: bsd_mouse.c Log Message: PR/45853: Pierre Pronchery: Add support for absolute positioning (tablets) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c diff -u xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c:1.2 xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c:1.3 --- xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c:1.2 Sat Jul 23 21:22:16 2011 +++ xsrc/external/mit/xf86-input-mouse/dist/src/bsd_mouse.c Thu Jan 26 17:43:06 2012 @@ -409,7 +409,7 @@ wsconsReadInput(InputInfoPtr pInfo) n /= sizeof(struct wscons_event); while( n-- ) { int buttons = pMse-lastButtons; - int dx = 0, dy = 0, dz = 0, dw = 0; + int dx = 0, dy = 0, dz = 0, dw = 0, x, y; switch (event-type) { case WSCONS_EVENT_MOUSE_UP: #define BUTBIT (1 (event-value = 2 ? 2 - event-value : event-value)) @@ -434,6 +434,30 @@ wsconsReadInput(InputInfoPtr pInfo) dw = event-value; break; #endif + case WSCONS_EVENT_MOUSE_ABSOLUTE_X: + miPointerGetPosition (pInfo-dev, x, y); + x = event-value; + miPointerSetPosition (pInfo-dev, x, y); + xf86PostMotionEvent(pInfo-dev, TRUE, 0, 2, x, y); + ++event; + continue; + case WSCONS_EVENT_MOUSE_ABSOLUTE_Y: + miPointerGetPosition (pInfo-dev, x, y); + y = event-value; + miPointerSetPosition (pInfo-dev, x, y); + xf86PostMotionEvent(pInfo-dev, TRUE, 0, 2, x, y); + ++event; + continue; +#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_Z + case WSCONS_EVENT_MOUSE_ABSOLUTE_Z: + ++event; + continue; +#endif +#ifdef WSCONS_EVENT_MOUSE_ABSOLUTE_W + case WSCONS_EVENT_MOUSE_ABSOLUTE_W: + ++event; + continue; +#endif default: xf86Msg(X_WARNING, %s: bad wsmouse event type=%d\n, pInfo-name, event-type);
CVS commit: src/lib/libcurses
Module Name:src Committed By: christos Date: Fri Jan 27 15:37:09 UTC 2012 Modified Files: src/lib/libcurses: getstr.c Log Message: handle the case where we have no space properly (Nat Sloss) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libcurses/getstr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/getstr.c diff -u src/lib/libcurses/getstr.c:1.21 src/lib/libcurses/getstr.c:1.22 --- src/lib/libcurses/getstr.c:1.21 Fri Jan 6 17:20:54 2012 +++ src/lib/libcurses/getstr.c Fri Jan 27 10:37:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: getstr.c,v 1.21 2012/01/06 22:20:54 christos Exp $ */ +/* $NetBSD: getstr.c,v 1.22 2012/01/27 15:37:09 christos Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -35,7 +35,7 @@ #if 0 static char sccsid[] = @(#)getstr.c 8.2 (Berkeley) 5/4/94; #else -__RCSID($NetBSD: getstr.c,v 1.21 2012/01/06 22:20:54 christos Exp $); +__RCSID($NetBSD: getstr.c,v 1.22 2012/01/27 15:37:09 christos Exp $); #endif #endif/* not lint */ @@ -241,17 +241,14 @@ __wgetnstr(WINDOW *win, char *str, int n wmove(win, win-cury, xpos); } else { if (remain) { -if (iscntrl((unsigned char)c)) { +if (iscntrl((unsigned char)c)) mvwaddch(win, win-cury, xpos, ' '); - wmove(win, win-cury, xpos + 1); -} str++; xpos++; remain--; - } else { + } else mvwaddch(win, win-cury, xpos, ' '); -wmove(win, win-cury, xpos - 1); - } + wmove(win, win-cury, xpos); } }
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: christos Date: Fri Jan 27 15:41:02 UTC 2012 Modified Files: src/sys/arch/amd64/include: int_limits.h Log Message: PR/45878: Nick Hudson: SIG_ATOMIC_{MAX,MIN} wrong for sig_atomic_t on amd64 sig_atomic_t is an int on amd64, put the proper limits there To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/int_limits.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/amd64/include/int_limits.h diff -u src/sys/arch/amd64/include/int_limits.h:1.7 src/sys/arch/amd64/include/int_limits.h:1.8 --- src/sys/arch/amd64/include/int_limits.h:1.7 Sat Oct 25 20:08:15 2008 +++ src/sys/arch/amd64/include/int_limits.h Fri Jan 27 10:41:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: int_limits.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */ +/* $NetBSD: int_limits.h,v 1.8 2012/01/27 15:41:02 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -120,8 +120,8 @@ #define PTRDIFF_MAX 0x7fffL /* ptrdiff_t */ /* limits of sig_atomic_t */ -#define SIG_ATOMIC_MIN (-0x7fffL-1) /* sig_atomic_t */ -#define SIG_ATOMIC_MAX 0x7fffL /* sig_atomic_t */ +#define SIG_ATOMIC_MIN (-0x7fff-1) /* sig_atomic_t */ +#define SIG_ATOMIC_MAX 0x7fff /* sig_atomic_t */ /* limit of size_t */ #define SIZE_MAX 0xUL /* size_t */
CVS commit: src/dist/nvi
Module Name:src Committed By: christos Date: Fri Jan 27 16:41:23 UTC 2012 Modified Files: src/dist/nvi/common: common.h cut.c delete.c src/dist/nvi/ex: ex_move.c Log Message: PR/45881: Chavdar Ivanov: nvi copy command copies empty lines. Move ENTIRE_LINE definition to common.h and have interested parties use it. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/common.h cvs rdiff -u -r1.8 -r1.9 src/dist/nvi/common/cut.c cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/common/delete.c cvs rdiff -u -r1.1.1.2 -r1.2 src/dist/nvi/ex/ex_move.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/nvi/common/common.h diff -u src/dist/nvi/common/common.h:1.2 src/dist/nvi/common/common.h:1.3 --- src/dist/nvi/common/common.h:1.2 Tue May 20 13:38:19 2008 +++ src/dist/nvi/common/common.h Fri Jan 27 11:41:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: common.h,v 1.2 2008/05/20 17:38:19 aymeric Exp $ */ +/* $NetBSD: common.h,v 1.3 2012/01/27 16:41:22 christos Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -85,6 +85,7 @@ typedef enum { LOCK_FAILED, LOCK_SUCCESS /* Sequence types. */ typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t; +#define ENTIRE_LINE ((size_t)-1) /* * Local includes. */ Index: src/dist/nvi/common/cut.c diff -u src/dist/nvi/common/cut.c:1.8 src/dist/nvi/common/cut.c:1.9 --- src/dist/nvi/common/cut.c:1.8 Sat Jan 21 14:56:46 2012 +++ src/dist/nvi/common/cut.c Fri Jan 27 11:41:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cut.c,v 1.8 2012/01/21 19:56:46 christos Exp $ */ +/* $NetBSD: cut.c,v 1.9 2012/01/27 16:41:22 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -134,7 +134,6 @@ copyloop: } -#define ENTIRE_LINE (size_t)-1 /* In line mode, it's pretty easy, just cut the lines. */ if (LF_ISSET(CUT_LINEMODE)) { cbp-flags |= CB_LMODE; Index: src/dist/nvi/common/delete.c diff -u src/dist/nvi/common/delete.c:1.5 src/dist/nvi/common/delete.c:1.6 --- src/dist/nvi/common/delete.c:1.5 Sat Jan 21 14:49:56 2012 +++ src/dist/nvi/common/delete.c Fri Jan 27 11:41:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: delete.c,v 1.5 2012/01/21 19:49:56 christos Exp $ */ +/* $NetBSD: delete.c,v 1.6 2012/01/27 16:41:22 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -65,7 +65,7 @@ del(SCR *sp, MARK *fm, MARK *tm, int lmo if (tm-lno == lno) { if (db_get(sp, lno, DBG_FATAL, p, len)) return (1); - eof = tm-cno != (size_t)-1 tm-cno = len ? 1 : 0; + eof = tm-cno != ENTIRE_LINE tm-cno = len ? 1 : 0; } else eof = 1; if (eof) { Index: src/dist/nvi/ex/ex_move.c diff -u src/dist/nvi/ex/ex_move.c:1.1.1.2 src/dist/nvi/ex/ex_move.c:1.2 --- src/dist/nvi/ex/ex_move.c:1.1.1.2 Sun May 18 10:31:16 2008 +++ src/dist/nvi/ex/ex_move.c Fri Jan 27 11:41:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ex_move.c,v 1.1.1.2 2008/05/18 14:31:16 aymeric Exp $ */ +/* $NetBSD: ex_move.c,v 1.2 2012/01/27 16:41:22 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -54,7 +54,7 @@ ex_copy(SCR *sp, EXCMD *cmdp) memset(cb, 0, sizeof(cb)); CIRCLEQ_INIT(cb.textq); for (cnt = fm1.lno; cnt = fm2.lno; ++cnt) - if (cut_line(sp, cnt, 0, 0, cb)) { + if (cut_line(sp, cnt, 0, ENTIRE_LINE, cb)) { rval = 1; goto err; }
CVS commit: src/crypto/external
Module Name:src Committed By: christos Date: Sat Jan 28 01:30:42 UTC 2012 Modified Files: src/crypto/external: README Log Message: description of cpl To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/crypto/external/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/README diff -u src/crypto/external/README:1.2 src/crypto/external/README:1.3 --- src/crypto/external/README:1.2 Wed Jan 21 19:01:52 2009 +++ src/crypto/external/README Fri Jan 27 20:30:42 2012 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.2 2009/01/22 00:01:52 lukem Exp $ +$NetBSD: README,v 1.3 2012/01/28 01:30:42 christos Exp $ Organization of Sources: @@ -45,6 +45,8 @@ The licenses currently used are: bsd BSD (or equivalent) licensed software, possibly with the advertising clause. + cpl Common Public License + http://www.opensource.org/licenses/cpl1.0 If a package has components covered by different licenses (for example, GPL2 and the LGPL), use the license subdirectory
CVS commit: src/crypto/external/cpl/trousers/dist
Module Name:src Committed By: christos Date: Sat Jan 28 01:37:22 UTC 2012 Update of /cvsroot/src/crypto/external/cpl/trousers/dist In directory ivanova.netbsd.org:/tmp/cvs-serv18301 Log Message: import trousers 0.3.8 from sourceforge. TrouSerS is the open-source TCG Software Stack Status: Vendor Tag: TROUSERS Release Tags: TROUSERS0_3_8 N src/crypto/external/cpl/trousers/dist/NEWS N src/crypto/external/cpl/trousers/dist/install-sh N src/crypto/external/cpl/trousers/dist/TODO N src/crypto/external/cpl/trousers/dist/aclocal.m4 N src/crypto/external/cpl/trousers/dist/depcomp N src/crypto/external/cpl/trousers/dist/config.sub N src/crypto/external/cpl/trousers/dist/README.selinux N src/crypto/external/cpl/trousers/dist/config.guess N src/crypto/external/cpl/trousers/dist/missing N src/crypto/external/cpl/trousers/dist/README N src/crypto/external/cpl/trousers/dist/configure N src/crypto/external/cpl/trousers/dist/ChangeLog N src/crypto/external/cpl/trousers/dist/LICENSE N src/crypto/external/cpl/trousers/dist/Makefile.am N src/crypto/external/cpl/trousers/dist/NICETOHAVES N src/crypto/external/cpl/trousers/dist/AUTHORS N src/crypto/external/cpl/trousers/dist/Makefile.in N src/crypto/external/cpl/trousers/dist/configure.in N src/crypto/external/cpl/trousers/dist/ltmain.sh N src/crypto/external/cpl/trousers/dist/src/Makefile.am N src/crypto/external/cpl/trousers/dist/src/Makefile.in N src/crypto/external/cpl/trousers/dist/src/tddl/Makefile.am N src/crypto/external/cpl/trousers/dist/src/tddl/tddl.c N src/crypto/external/cpl/trousers/dist/src/tddl/Makefile.in N src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c N src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_conf.c N src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c N src/crypto/external/cpl/trousers/dist/src/tcsd/Makefile.am N src/crypto/external/cpl/trousers/dist/src/tcsd/Makefile.in N src/crypto/external/cpl/trousers/dist/src/tcsd/svrside.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_tick.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_ps.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_delegate.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_bind.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_audit.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_evlog.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_context_key.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_auth_mgr.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_key.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_auth.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_changeauth.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_quote.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_migration.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_cmk.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_context.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_ps.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_evlog_biosem.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_quote2.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_key_mem_cache.c N src/crypto/external/cpl/trousers/dist/src/tcs/log.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_utils.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_maint.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_evlog_imaem.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_counter.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_admin.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_context.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_pbg.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_caps.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_pcr.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_key.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_caps.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_random.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_quote.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_evlog.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_selftest.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_aik.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_oper.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_counter.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_dir.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_caps_tpm.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_quote2.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_key_ps.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_own.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_daa.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcs_aik.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_certify.c N src/crypto/external/cpl/trousers/dist/src/tcs/Makefile.am N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_nv.c N src/crypto/external/cpl/trousers/dist/src/tcs/tcsi_seal.c N
CVS commit: src/crypto/external/cpl/trousers/dist/man/man3
Module Name:src Committed By: christos Date: Sat Jan 28 01:58:25 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/dist/man/man3: Tspi_DAA_VerifyInit.3 Tspi_DAA_VerifySignature.3 Log Message: remove erroneous extra .TP To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifyInit.3 \ src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifySignature.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifyInit.3 diff -u src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifyInit.3:1.1.1.1 src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifyInit.3:1.2 --- src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifyInit.3:1.1.1.1 Fri Jan 27 20:37:16 2012 +++ src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifyInit.3 Fri Jan 27 20:58:25 2012 @@ -73,7 +73,6 @@ following values is returned: .TP .SM TSS_E_INTERNAL_ERROR An internal SW error has been detected. -.TP .SH CONFORMING TO .PP \fBTspi_DAA_VerifyInit\fR conforms to the Trusted Computing Group Index: src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifySignature.3 diff -u src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifySignature.3:1.1.1.1 src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifySignature.3:1.2 --- src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifySignature.3:1.1.1.1 Fri Jan 27 20:37:18 2012 +++ src/crypto/external/cpl/trousers/dist/man/man3/Tspi_DAA_VerifySignature.3 Fri Jan 27 20:58:25 2012 @@ -94,7 +94,6 @@ following values is returned: .TP .SM TSS_E_INTERNAL_ERROR An internal SW error has been detected. -.TP .SH CONFORMING TO .PP \fBTspi_DAA_VerifySignature\fR conforms to the Trusted Computing Group
CVS commit: src/crypto/external/cpl/trousers/dist/src/include
Module Name:src Committed By: christos Date: Sat Jan 28 02:00:51 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/dist/src/include: tcsd.h Log Message: we want our role accounts to start with _ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/src/include/tcsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/dist/src/include/tcsd.h diff -u src/crypto/external/cpl/trousers/dist/src/include/tcsd.h:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/include/tcsd.h:1.2 --- src/crypto/external/cpl/trousers/dist/src/include/tcsd.h:1.1.1.1 Fri Jan 27 20:36:42 2012 +++ src/crypto/external/cpl/trousers/dist/src/include/tcsd.h Fri Jan 27 21:00:51 2012 @@ -51,8 +51,13 @@ struct tcsd_config #define TCSD_DEFAULT_CONFIG_FILE ETC_PREFIX /tcsd.conf extern char *tcsd_config_file; +#ifdef __NetBSD__ +#define TSS_USER_NAME _tss +#define TSS_GROUP_NAME _tss +#else #define TSS_USER_NAME tss #define TSS_GROUP_NAME tss +#endif #define TCSD_DEFAULT_MAX_THREADS 10 #define TCSD_DEFAULT_SYSTEM_PS_FILE VAR_PREFIX /lib/tpm/system.data
CVS commit: src/crypto/external/cpl/trousers/dist/src
Module Name:src Committed By: christos Date: Sat Jan 28 02:03:41 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/dist/src/include: tcsps.h tspps.h src/crypto/external/cpl/trousers/dist/src/tspi/ps: ps_utils.c Log Message: don't inline functions whose body is not visible in all places used. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/src/include/tcsps.h \ src/crypto/external/cpl/trousers/dist/src/include/tspps.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/src/tspi/ps/ps_utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/dist/src/include/tcsps.h diff -u src/crypto/external/cpl/trousers/dist/src/include/tcsps.h:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/include/tcsps.h:1.2 --- src/crypto/external/cpl/trousers/dist/src/include/tcsps.h:1.1.1.1 Fri Jan 27 20:36:45 2012 +++ src/crypto/external/cpl/trousers/dist/src/include/tcsps.h Fri Jan 27 21:03:41 2012 @@ -23,13 +23,8 @@ int get_file(); int put_file(int); void close_file(int); void ps_destroy(); -#ifdef SOLARIS -TSS_RESULT read_data(int, void *, UINT32); -TSS_RESULT write_data(int, void *, UINT32); -#else -inline TSS_RESULT read_data(int, void *, UINT32); -inline TSS_RESULT write_data(int, void *, UINT32); -#endif +TSS_RESULT read_data(int, void *, UINT32); +TSS_RESULT write_data(int, void *, UINT32); int write_key_init(int, UINT32, UINT32, UINT32); TSS_RESULT cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32); TSS_RESULT UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *); Index: src/crypto/external/cpl/trousers/dist/src/include/tspps.h diff -u src/crypto/external/cpl/trousers/dist/src/include/tspps.h:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/include/tspps.h:1.2 --- src/crypto/external/cpl/trousers/dist/src/include/tspps.h:1.1.1.1 Fri Jan 27 20:36:43 2012 +++ src/crypto/external/cpl/trousers/dist/src/include/tspps.h Fri Jan 27 21:03:41 2012 @@ -18,8 +18,8 @@ TSS_RESULT get_file(int *); int put_file(int); -inline TSS_RESULT read_data(int, void *, UINT32); -inline TSS_RESULT write_data(int, void *, UINT32); +TSS_RESULT read_data(int, void *, UINT32); +TSS_RESULT write_data(int, void *, UINT32); UINT32 psfile_get_num_keys(int); TSS_RESULT psfile_get_parent_uuid_by_uuid(int, TSS_UUID *, TSS_UUID *); TSS_RESULT psfile_remove_key_by_uuid(int, TSS_UUID *); Index: src/crypto/external/cpl/trousers/dist/src/tspi/ps/ps_utils.c diff -u src/crypto/external/cpl/trousers/dist/src/tspi/ps/ps_utils.c:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/tspi/ps/ps_utils.c:1.2 --- src/crypto/external/cpl/trousers/dist/src/tspi/ps/ps_utils.c:1.1.1.1 Fri Jan 27 20:36:41 2012 +++ src/crypto/external/cpl/trousers/dist/src/tspi/ps/ps_utils.c Fri Jan 27 21:03:41 2012 @@ -22,7 +22,7 @@ #include tspps.h #include tsplog.h -inline TSS_RESULT +TSS_RESULT read_data(int fd, void *data, UINT32 size) { int rc; @@ -39,7 +39,7 @@ read_data(int fd, void *data, UINT32 siz return TSS_SUCCESS; } -inline TSS_RESULT +TSS_RESULT write_data(int fd, void *data, UINT32 size) { int rc;
CVS commit: src/crypto/external/cpl/trousers/dist/src/tcsd
Module Name:src Committed By: christos Date: Sat Jan 28 02:06:51 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/dist/src/tcsd: tcsd_threads.c Log Message: cast to long the thread id before printing To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c diff -u src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c:1.2 --- src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c:1.1.1.1 Fri Jan 27 20:35:37 2012 +++ src/crypto/external/cpl/trousers/dist/src/tcsd/tcsd_threads.c Fri Jan 27 21:06:51 2012 @@ -185,13 +185,13 @@ thread_signal_init() if ((rc = sigfillset(thread_sigmask))) { LogError(sigfillset failed: error=%d: %s, rc, strerror(rc)); - LogError(worker thread %ld is exiting prematurely, THREAD_ID); + LogError(worker thread %ld is exiting prematurely, (long)THREAD_ID); THREAD_EXIT(NULL); } if ((rc = THREAD_SET_SIGNAL_MASK(SIG_BLOCK, thread_sigmask, NULL))) { LogError(Setting thread sigmask failed: error=%d: %s, rc, strerror(rc)); - LogError(worker thread %ld is exiting prematurely, THREAD_ID); + LogError(worker thread %ld is exiting prematurely, (long)THREAD_ID); THREAD_EXIT(NULL); } }
CVS commit: src/crypto/external/cpl/trousers/dist/src/tcsd
Module Name:src Committed By: christos Date: Sat Jan 28 02:08:11 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/dist/src/tcsd: platform.c Log Message: add defined(__NetBSD__) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c diff -u src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c:1.2 --- src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c:1.1.1.1 Fri Jan 27 20:35:38 2012 +++ src/crypto/external/cpl/trousers/dist/src/tcsd/platform.c Fri Jan 27 21:08:11 2012 @@ -9,7 +9,7 @@ */ -#if (defined (__FreeBSD__) || defined (__OpenBSD__)) +#if (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)) #include sys/param.h #include sys/sysctl.h #include err.h @@ -81,7 +81,7 @@ platform_get_runlevel() return runlevel; } -#elif (defined (__FreeBSD__) || defined (__OpenBSD__)) +#elif (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)) char platform_get_runlevel()
CVS commit: src/crypto/external/cpl/trousers/dist/src/tcs/ps
Module Name:src Committed By: christos Date: Sat Jan 28 02:11:18 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/dist/src/tcs/ps: ps_utils.c tcsps.c Log Message: we only have sys/endian.h not endian.h To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/trousers/dist/src/tcs/ps/ps_utils.c \ src/crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/dist/src/tcs/ps/ps_utils.c diff -u src/crypto/external/cpl/trousers/dist/src/tcs/ps/ps_utils.c:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/tcs/ps/ps_utils.c:1.2 --- src/crypto/external/cpl/trousers/dist/src/tcs/ps/ps_utils.c:1.1.1.1 Fri Jan 27 20:36:00 2012 +++ src/crypto/external/cpl/trousers/dist/src/tcs/ps/ps_utils.c Fri Jan 27 21:11:18 2012 @@ -16,7 +16,11 @@ #if defined(HAVE_BYTEORDER_H) #include sys/byteorder.h #elif defined(HTOLE_DEFINED) +#ifdef __NetBSD__ +#include sys/endian.h +#else #include endian.h +#endif #define LE_16 htole16 #define LE_32 htole32 #define LE_64 htole64 Index: src/crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c diff -u src/crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c:1.2 --- src/crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c:1.1.1.1 Fri Jan 27 20:36:00 2012 +++ src/crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c Fri Jan 27 21:11:18 2012 @@ -20,7 +20,11 @@ #if defined (HAVE_BYTEORDER_H) #include sys/byteorder.h #elif defined (HTOLE_DEFINED) +#ifdef __NetBSD__ +#include sys/endian.h +#else #include endian.h +#endif #define LE_16 htole16 #define LE_32 htole32 #define LE_64 htole64
CVS commit: src/crypto/external/cpl/trousers
Module Name:src Committed By: christos Date: Sat Jan 28 02:15:26 UTC 2012 Added Files: src/crypto/external/cpl/trousers: Makefile Makefile.inc src/crypto/external/cpl/trousers/bin: Makefile Makefile.inc src/crypto/external/cpl/trousers/bin/tcsd: Makefile src/crypto/external/cpl/trousers/etc: tcsd.conf src/crypto/external/cpl/trousers/lib: Makefile Makefile.inc src/crypto/external/cpl/trousers/lib/libtcs: Makefile src/crypto/external/cpl/trousers/lib/libtddl: Makefile src/crypto/external/cpl/trousers/lib/libtspi: Makefile Log Message: add build glue To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/Makefile \ src/crypto/external/cpl/trousers/Makefile.inc cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/bin/Makefile \ src/crypto/external/cpl/trousers/bin/Makefile.inc cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/bin/tcsd/Makefile cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/etc/tcsd.conf cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/lib/Makefile \ src/crypto/external/cpl/trousers/lib/Makefile.inc cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/lib/libtcs/Makefile cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/lib/libtddl/Makefile cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/trousers/lib/libtspi/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/cpl/trousers/Makefile diff -u /dev/null src/crypto/external/cpl/trousers/Makefile:1.1 --- /dev/null Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/Makefile Fri Jan 27 21:15:25 2012 @@ -0,0 +1,3 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 02:15:25 christos Exp $ +SUBDIR=lib .WAIT bin +.include bsd.subdir.mk Index: src/crypto/external/cpl/trousers/Makefile.inc diff -u /dev/null src/crypto/external/cpl/trousers/Makefile.inc:1.1 --- /dev/null Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/Makefile.inc Fri Jan 27 21:15:25 2012 @@ -0,0 +1,21 @@ +# $NetBSD: Makefile.inc,v 1.1 2012/01/28 02:15:25 christos Exp $ + +.include bsd.own.mk + +DIST=${NETBSDSRCDIR}/crypto/external/cpl/trousers/dist + +CPPFLAGS+= -I${DIST}/src/include + +CPPFLAGS+= -DPACKAGE_NAME=\trousers\ -DPACKAGE_TARNAME=\trousers\ +CPPFLAGS+= -DPACKAGE_VERSION=\0.3.8\ -DPACKAGE_STRING=\trousers\ 0.3.8\ +CPPFLAGS+= -DPACKAGE_BUGREPORT=\trousers-t...@lists.sf.net\ +CPPFLAGS+= -DPACKAGE_URL=\\ -DPACKAGE=\trousers\ -DVERSION=\0.3.8\ +CPPFLAGS+= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 +CPPFLAGS+= -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 +CPPFLAGS+= -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 +CPPFLAGS+= -DHAVE_UNISTD_H=1 -DHAVE_OPENSSL_BN_H=1 -DHAVE_OPENSSL_ENGINE_H=1 +CPPFLAGS+= -DHAVE_PTHREAD_H=1 -DHAVE_DLFCN_H=1 -DHTOLE_DEFINED=1 -DHAVE_DAEMON=1 + +CPPFLAGS+=-DBI_OPENSSL -DTCSD_DEFAULT_PORT=30003 +CPPFLAGS+=-DTSS_VER_MAJOR=0 -DTSS_VER_MINOR=3 -DTSS_SPEC_MAJOR=1 +CPPFLAGS+=-DTSS_SPEC_MINOR=2 Index: src/crypto/external/cpl/trousers/bin/Makefile diff -u /dev/null src/crypto/external/cpl/trousers/bin/Makefile:1.1 --- /dev/null Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/bin/Makefile Fri Jan 27 21:15:26 2012 @@ -0,0 +1,3 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 02:15:26 christos Exp $ +SUBDIR = tcsd +.include bsd.subdir.mk Index: src/crypto/external/cpl/trousers/bin/Makefile.inc diff -u /dev/null src/crypto/external/cpl/trousers/bin/Makefile.inc:1.1 --- /dev/null Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/bin/Makefile.inc Fri Jan 27 21:15:26 2012 @@ -0,0 +1,2 @@ +# $NetBSD: Makefile.inc,v 1.1 2012/01/28 02:15:26 christos Exp $ +.include ../Makefile.inc Index: src/crypto/external/cpl/trousers/bin/tcsd/Makefile diff -u /dev/null src/crypto/external/cpl/trousers/bin/tcsd/Makefile:1.1 --- /dev/null Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/bin/tcsd/Makefile Fri Jan 27 21:15:26 2012 @@ -0,0 +1,28 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 02:15:26 christos Exp $ +.include ../Makefile.inc + +.PATH.c: ${DIST}/src/tcsd + +CPPFLAGS+=-DAPPID=\TCSD\ -DVAR_PREFIX=\/var\ -DETC_PREFIX=\/etc\ +CPPFLAGS+=-DTSS_BUILD_PS -DTSS_BUILD_PCR_EVENTS + +BINDIR=/usr/sbin +PROG=tcsd +SRCS=\ +platform.c \ +svrside.c \ +tcsd_conf.c \ +tcsd_threads.c + +LIBTCSOBJDIR!= cd ${.CURDIR}/../../lib/libtcs ${PRINTOBJDIR} + +DPADD+=${LIBTDDL} ${LIBCRYPTO} ${LIBPTHREAD} +LDADD+=-L${LIBTCSOBJDIR} -ltcs -ltddl -lcrypto -lpthread + +.SUFFIXES: .5 .8 +.PATH.5: ${DIST}/man/man5 +.PATH.8: ${DIST}/man/man8 + +MAN+=tcsd.conf.5 tcsd.8 + +.include bsd.prog.mk Index: src/crypto/external/cpl/trousers/etc/tcsd.conf diff -u /dev/null src/crypto/external/cpl/trousers/etc/tcsd.conf:1.1 --- /dev/null Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/etc/tcsd.conf Fri Jan 27 21:15:26 2012 @@ -0,0 +1,13 @@ +port = 30003 +num_threads =
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Jan 28 02:21:23 UTC 2012 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: add TrouSerS To generate a diff of this commit: cvs rdiff -u -r1.900 -r1.901 src/doc/3RDPARTY cvs rdiff -u -r1.1655 -r1.1656 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/3RDPARTY diff -u src/doc/3RDPARTY:1.900 src/doc/3RDPARTY:1.901 --- src/doc/3RDPARTY:1.900 Wed Jan 25 09:36:30 2012 +++ src/doc/3RDPARTY Fri Jan 27 21:21:22 2012 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.900 2012/01/25 14:36:30 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.901 2012/01/28 02:21:22 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1248,3 +1248,15 @@ Responsible: agc, christos License: BSD Notes: Need to feed back local changes + +Package: TrouSerS +Version: 0.3.8 +Current Vers: 0.3.8 +Maintainer: http://trousers.sourceforge.net +Archive Site: http://trousers.sourceforge.net +Home Page: http://trousers.sourceforge.net +Mailing List: http://trousers.sourceforge.net +Responsible: christos +License: CPL +Notes: + Need to feed back local changes Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1655 src/doc/CHANGES:1.1656 --- src/doc/CHANGES:1.1655 Fri Jan 27 03:41:35 2012 +++ src/doc/CHANGES Fri Jan 27 21:21:23 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1655 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1656 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1214,3 +1214,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0: [macallan 20120123] dhcpcd(8): Import dhcpcd-5.5.0 [roy 20120125] x86: Stop building boot ROM images for old NICs. [jnemeth 20120127] + TrouSerS: Import trousers-0.3.8 [christos 20120127]
CVS commit: src/usr.sbin/makefs
Module Name:src Committed By: christos Date: Sat Jan 28 02:35:46 UTC 2012 Modified Files: src/usr.sbin/makefs: cd9660.c cd9660.h ffs.c makefs.8 makefs.c makefs.h walk.c src/usr.sbin/makefs/cd9660: cd9660_write.c Log Message: Patch from Jung-uk Kim (jkim at FreeBSD dot org) to allow contents of multiple directories to be merged to the current image. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/makefs/cd9660.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/makefs/cd9660.h cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/makefs/ffs.c cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/makefs.8 cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/makefs/makefs.c cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/makefs/makefs.h cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/makefs/walk.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makefs/cd9660/cd9660_write.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.sbin/makefs/cd9660.c diff -u src/usr.sbin/makefs/cd9660.c:1.34 src/usr.sbin/makefs/cd9660.c:1.35 --- src/usr.sbin/makefs/cd9660.c:1.34 Tue Aug 23 15:57:24 2011 +++ src/usr.sbin/makefs/cd9660.c Fri Jan 27 21:35:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.c,v 1.34 2011/08/23 19:57:24 christos Exp $ */ +/* $NetBSD: cd9660.c,v 1.35 2012/01/28 02:35:46 christos Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -103,7 +103,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(__lint) -__RCSID($NetBSD: cd9660.c,v 1.34 2011/08/23 19:57:24 christos Exp $); +__RCSID($NetBSD: cd9660.c,v 1.35 2012/01/28 02:35:46 christos Exp $); #endif /* !__lint */ #include string.h @@ -480,8 +480,6 @@ cd9660_makefs(const char *image, const c return; } - diskStructure.rootFilesystemPath = dir; - if (diskStructure.verbose_level 0) printf(cd9660_makefs: image %s directory %s root %p\n, image, dir, root); @@ -1592,24 +1590,15 @@ cd9660_generate_path_table(void) } void -cd9660_compute_full_filename(cd9660node *node, char *buf, int level) +cd9660_compute_full_filename(cd9660node *node, char *buf) { - cd9660node *parent; - - parent = (node-rr_real_parent == NULL ? - node-parent : node-rr_real_parent); - if (parent != NULL) { - cd9660_compute_full_filename(parent, buf, level + 1); - strcat(buf, node-node-name); - } else { - /* We are at the root */ - strcat(buf, diskStructure.rootFilesystemPath); - if (buf[strlen(buf) - 1] == '/') - buf[strlen(buf) - 1] = '\0'; - } + int len; - if (level != 0) - strcat(buf, /); + len = CD9660MAXPATH + 1; + len = snprintf(buf, len, %s/%s/%s, node-node-root, + node-node-path, node-node-name); + if (len CD9660MAXPATH) + errx(1, Pathname too long.); } /* NEW filename conversion method */ Index: src/usr.sbin/makefs/cd9660.h diff -u src/usr.sbin/makefs/cd9660.h:1.17 src/usr.sbin/makefs/cd9660.h:1.18 --- src/usr.sbin/makefs/cd9660.h:1.17 Wed Jun 22 22:35:56 2011 +++ src/usr.sbin/makefs/cd9660.h Fri Jan 27 21:35:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660.h,v 1.17 2011/06/23 02:35:56 enami Exp $ */ +/* $NetBSD: cd9660.h,v 1.18 2012/01/28 02:35:46 christos Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -245,8 +245,6 @@ typedef struct _iso9660_disk { cd9660node *rootNode; - const char *rootFilesystemPath; - /* Important sector numbers here */ /* primaryDescriptor.type_l_path_table*/ int64_t primaryBigEndianTableSector; @@ -346,7 +344,7 @@ int cd9660_setup_boot_volume_descriptor( int cd9660_write_image(const char *image); int cd9660_copy_file(FILE *, off_t, const char *); -void cd9660_compute_full_filename(cd9660node *, char *, int); +void cd9660_compute_full_filename(cd9660node *, char *); int cd9660_compute_record_size(cd9660node *); /* Debugging functions */ Index: src/usr.sbin/makefs/ffs.c diff -u src/usr.sbin/makefs/ffs.c:1.45 src/usr.sbin/makefs/ffs.c:1.46 --- src/usr.sbin/makefs/ffs.c:1.45 Sun Oct 9 17:33:43 2011 +++ src/usr.sbin/makefs/ffs.c Fri Jan 27 21:35:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.c,v 1.45 2011/10/09 21:33:43 christos Exp $ */ +/* $NetBSD: ffs.c,v 1.46 2012/01/28 02:35:46 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -71,7 +71,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(__lint) -__RCSID($NetBSD: ffs.c,v 1.45 2011/10/09 21:33:43 christos Exp $); +__RCSID($NetBSD: ffs.c,v 1.46 2012/01/28 02:35:46 christos Exp $); #endif /* !__lint */ #include sys/param.h @@ -784,8 +784,8 @@ ffs_populate_dir(const char *dir, fsnode continue; /* skip hard-linked entries */ cur-inode-flags |= FI_WRITTEN; - if (snprintf(path, sizeof(path), %s/%s, dir, cur-name) - = sizeof(path)) + if ((size_t)snprintf(path, sizeof(path), %s/%s/%s, cur-root, + cur-path, cur-name) = sizeof(path)) errx(1, Pathname too long.); if (cur-child != NULL) Index: src/usr.sbin/makefs/makefs.8
CVS commit: src/crypto/external/cpl/trousers/lib
Module Name:src Committed By: christos Date: Sat Jan 28 02:51:19 UTC 2012 Modified Files: src/crypto/external/cpl/trousers/lib: Makefile Log Message: add libtcs To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/crypto/external/cpl/trousers/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/trousers/lib/Makefile diff -u src/crypto/external/cpl/trousers/lib/Makefile:1.1 src/crypto/external/cpl/trousers/lib/Makefile:1.2 --- src/crypto/external/cpl/trousers/lib/Makefile:1.1 Fri Jan 27 21:15:26 2012 +++ src/crypto/external/cpl/trousers/lib/Makefile Fri Jan 27 21:51:19 2012 @@ -1,3 +1,3 @@ -# $NetBSD: Makefile,v 1.1 2012/01/28 02:15:26 christos Exp $ -SUBDIR = libtddl libtspi +# $NetBSD: Makefile,v 1.2 2012/01/28 02:51:19 christos Exp $ +SUBDIR = libtddl libtspi libtcs .include bsd.subdir.mk
CVS commit: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt
Module Name:src Committed By: christos Date: Sat Jan 28 03:04:28 UTC 2012 Modified Files: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt: tpm_nvcommon.c Log Message: handle ctype lossage To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c diff -u src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c:1.2 --- src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c:1.1.1.1 Fri Jan 27 21:57:27 2012 +++ src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c Fri Jan 27 22:04:27 2012 @@ -116,7 +116,7 @@ int parseStringWithValues(const char *aA while (offset totlen) { int found = 0; - while (isspace(*(aArg + offset))) + while (isspace((unsigned char)*(aArg + offset))) offset++; for (i = 0; svals[i].name; i++) { @@ -155,7 +155,7 @@ int parseStringWithValues(const char *aA } while (!found) { - if (!isdigit(*(aArg+offset))) + if (!isdigit((unsigned char)*(aArg+offset))) break; if (sscanf(aArg + offset, %u%n, num, numbytes) != 1) { @@ -247,7 +247,7 @@ int parseHexOrDecimal(const char *aArg, unsigned int minimum, unsigned int maximum, const char *name) { - while (isspace(*aArg)) + while (isspace((unsigned char)*aArg)) aArg++; if (strncmp(aArg, 0x, 2) == 0) { @@ -255,7 +255,7 @@ int parseHexOrDecimal(const char *aArg, return -1; } } else { - if (!isdigit(*aArg)) { + if (!isdigit((unsigned char)*aArg)) { fprintf(stderr, %s must be a positive integer.\n, name); return -1;
CVS commit: src/crypto/external/cpl/tpm-tools/dist
Module Name:src Committed By: christos Date: Sat Jan 28 03:05:53 UTC 2012 Modified Files: src/crypto/external/cpl/tpm-tools/dist/lib: Makefile.am Makefile.in src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt: Makefile.am Makefile.in Log Message: we don't have -ldl To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.am \ src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.in cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.am \ src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.am diff -u src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.am:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.am:1.2 --- src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.am:1.1.1.1 Fri Jan 27 21:57:21 2012 +++ src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.am Fri Jan 27 22:05:53 2012 @@ -44,7 +44,7 @@ libtpm_utils_la_SOURCES = tpm_utils.c \ # # TSPI interface library libtpm_tspi_la_SOURCES = tpm_tspi.c -libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl +libtpm_tspi_la_LIBADD = libtpm_utils.la # # PKCS#11 interface library Index: src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.in diff -u src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.in:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.in:1.2 --- src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.in:1.1.1.1 Fri Jan 27 21:57:21 2012 +++ src/crypto/external/cpl/tpm-tools/dist/lib/Makefile.in Fri Jan 27 22:05:53 2012 @@ -298,7 +298,7 @@ libtpm_utils_la_SOURCES = tpm_utils.c \ # # TSPI interface library libtpm_tspi_la_SOURCES = tpm_tspi.c -libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl +libtpm_tspi_la_LIBADD = libtpm_utils.la @P11_SUPPORT_TRUE@libtpm_pkcs11_la_SOURCES = tpm_pkcs11.c @P11_SUPPORT_TRUE@libtpm_pkcs11_la_LIBADD = libtpm_utils.la Index: src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.am diff -u src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.am:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.am:1.2 --- src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.am:1.1.1.1 Fri Jan 27 21:57:25 2012 +++ src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.am Fri Jan 27 22:05:53 2012 @@ -38,7 +38,7 @@ noinst_HEADERS = data_common.h \ # Common build flags AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX -LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl +LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi # Index: src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.in diff -u src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.in:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.in:1.2 --- src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.in:1.1.1.1 Fri Jan 27 21:57:27 2012 +++ src/crypto/external/cpl/tpm-tools/dist/src/data_mgmt/Makefile.in Fri Jan 27 22:05:53 2012 @@ -274,7 +274,7 @@ noinst_HEADERS = data_common.h \ # # Common build flags AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX -LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl +LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi # # TPM Token initialization command
CVS commit: src/crypto/external/cpl/tpm-tools/dist/man/man8
Module Name:src Committed By: christos Date: Sat Jan 28 16:03:46 UTC 2012 Modified Files: src/crypto/external/cpl/tpm-tools/dist/man/man8: tpm_changeownerauth.8 Log Message: remove stray .TP To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/cpl/tpm-tools/dist/man/man8/tpm_changeownerauth.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/cpl/tpm-tools/dist/man/man8/tpm_changeownerauth.8 diff -u src/crypto/external/cpl/tpm-tools/dist/man/man8/tpm_changeownerauth.8:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/man/man8/tpm_changeownerauth.8:1.2 --- src/crypto/external/cpl/tpm-tools/dist/man/man8/tpm_changeownerauth.8:1.1.1.1 Fri Jan 27 21:57:41 2012 +++ src/crypto/external/cpl/tpm-tools/dist/man/man8/tpm_changeownerauth.8 Sat Jan 28 11:03:46 2012 @@ -64,7 +64,6 @@ Change password to a new one when curren .TP \fB-r\fR, \fB\-\-set-well-known\fR Change password to a secret of all zeros (20 bytes of zeros). It must be specified which password (owner, SRK or both) to change -.TP .SH SEE ALSO .PP \fBtpm_version\fR(1), \fBtpm_takeownership\fR(8), \fBtcsd\fR(8)
CVS commit: src/crypto/external/cpl/tpm-tools
Module Name:src Committed By: christos Date: Sat Jan 28 16:04:15 UTC 2012 Added Files: src/crypto/external/cpl/tpm-tools: Makefile Makefile.inc src/crypto/external/cpl/tpm-tools/bin: Makefile Makefile.inc Makefile.prog src/crypto/external/cpl/tpm-tools/bin/tpm_changeownerauth: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_clear: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_createek: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_getpubek: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_nvdefine: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_nvinfo: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_nvread: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_nvrelease: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_nvwrite: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_resetdalock: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_restrictpubek: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_restrictsrk: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_revokeek: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_sealdata: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_selftest: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_setactive: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_setclearable: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_setenable: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_setoperatorauth: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_setownable: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_setpresence: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_takeownership: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_unsealdata: Makefile src/crypto/external/cpl/tpm-tools/bin/tpm_version: Makefile src/crypto/external/cpl/tpm-tools/lib: Makefile Makefile.inc src/crypto/external/cpl/tpm-tools/lib/libtpm_unseal: Makefile src/crypto/external/cpl/tpm-tools/lib/libtpm_utils: Makefile Log Message: Add build glue: no pkcs11 yes. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/tpm-tools/Makefile \ src/crypto/external/cpl/tpm-tools/Makefile.inc cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/tpm-tools/bin/Makefile \ src/crypto/external/cpl/tpm-tools/bin/Makefile.inc \ src/crypto/external/cpl/tpm-tools/bin/Makefile.prog cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_changeownerauth/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_clear/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_createek/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_getpubek/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_nvdefine/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_nvinfo/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_nvread/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_nvrelease/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_nvwrite/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_resetdalock/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_restrictpubek/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_restrictsrk/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_revokeek/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_sealdata/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_selftest/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_setactive/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_setclearable/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_setenable/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_setoperatorauth/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_setownable/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_setpresence/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_takeownership/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_unsealdata/Makefile cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/bin/tpm_version/Makefile cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/tpm-tools/lib/Makefile \ src/crypto/external/cpl/tpm-tools/lib/Makefile.inc cvs rdiff -u -r0 -r1.1 \ src/crypto/external/cpl/tpm-tools/lib/libtpm_unseal/Makefile cvs rdiff -u -r0 -r1.1 \
CVS commit: src/crypto/external/cpl/tpm-tools/include
Module Name:src Committed By: christos Date: Sat Jan 28 16:05:20 UTC 2012 Added Files: src/crypto/external/cpl/tpm-tools/include: config.h Log Message: Add configuration glue To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/crypto/external/cpl/tpm-tools/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/crypto/external/cpl/tpm-tools/include/config.h diff -u /dev/null src/crypto/external/cpl/tpm-tools/include/config.h:1.1 --- /dev/null Sat Jan 28 11:05:20 2012 +++ src/crypto/external/cpl/tpm-tools/include/config.h Sat Jan 28 11:05:20 2012 @@ -0,0 +1,118 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the dlfcn.h header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define if you have the iconv() function. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the inttypes.h header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you support file names longer than 14 characters. */ +#define HAVE_LONG_FILE_NAMES 1 + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the stdint.h header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the stdlib.h header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the strings.h header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the string.h header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the sys/stat.h header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the sys/types.h header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the unistd.h header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR .libs/ + +/* Name of package */ +#define PACKAGE tpm-tools + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT trousers-t...@lists.sf.net + +/* Define to the full name of this package. */ +#define PACKAGE_NAME tpm-tools + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING tpm-tools 1.3.7 + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME tpm-tools + +/* Define to the home page for this package. */ +#define PACKAGE_URL + +/* Define to the version of this package. */ +#define PACKAGE_VERSION 1.3.7 + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION 1.3.7 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `int' if sys/types.h doesn't define. */ +/* #undef gid_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `int' if sys/types.h does not define. */ +/* #undef mode_t */ + +/* Define to `long int' if sys/types.h does not define. */ +/* #undef off_t */ + +/* Define to `int' if sys/types.h does not define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if sys/types.h does not define. */ +/* #undef size_t */ + +/* Define to `int' if sys/types.h doesn't define. */ +/* #undef uid_t */
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Jan 28 19:43:48 UTC 2012 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: document tpm-tools To generate a diff of this commit: cvs rdiff -u -r1.901 -r1.902 src/doc/3RDPARTY cvs rdiff -u -r1.1656 -r1.1657 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/3RDPARTY diff -u src/doc/3RDPARTY:1.901 src/doc/3RDPARTY:1.902 --- src/doc/3RDPARTY:1.901 Fri Jan 27 21:21:22 2012 +++ src/doc/3RDPARTY Sat Jan 28 14:43:47 2012 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.901 2012/01/28 02:21:22 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.902 2012/01/28 19:43:47 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1260,3 +1260,15 @@ Responsible: christos License: CPL Notes: Need to feed back local changes + +Package: tpm-tools +Version: 1.3.7.1 +Current Vers: 1.3.7.1 +Maintainer: http://trousers.sourceforge.net +Archive Site: http://trousers.sourceforge.net +Home Page: http://trousers.sourceforge.net +Mailing List: http://trousers.sourceforge.net +Responsible: christos +License: CPL +Notes: + Need to feed back local changes Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1656 src/doc/CHANGES:1.1657 --- src/doc/CHANGES:1.1656 Fri Jan 27 21:21:23 2012 +++ src/doc/CHANGES Sat Jan 28 14:43:47 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1656 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1657 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1215,3 +1215,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0: dhcpcd(8): Import dhcpcd-5.5.0 [roy 20120125] x86: Stop building boot ROM images for old NICs. [jnemeth 20120127] TrouSerS: Import trousers-0.3.8 [christos 20120127] + tpm-tools: Import tpm-tools-1.3.7.1 [christos 20120128]
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jan 28 21:32:14 UTC 2012 Modified Files: src/share/mk: bsd.README bsd.lib.mk bsd.sys.mk Log Message: Provide a way to override the default objcopy flags for library modules. To generate a diff of this commit: cvs rdiff -u -r1.290 -r1.291 src/share/mk/bsd.README cvs rdiff -u -r1.318 -r1.319 src/share/mk/bsd.lib.mk cvs rdiff -u -r1.210 -r1.211 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.290 src/share/mk/bsd.README:1.291 --- src/share/mk/bsd.README:1.290 Sat Nov 5 18:56:30 2011 +++ src/share/mk/bsd.README Sat Jan 28 16:32:13 2012 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.290 2011/11/05 22:56:30 christos Exp $ +# $NetBSD: bsd.README,v 1.291 2012/01/28 21:32:13 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make include files for the NetBSD @@ -1731,6 +1731,9 @@ OBJCFLAGS Options to ${OBJC}. [${CFLAGS OBJCOPY Copy and translate object files. [objcopy] +OBJCOPYLIBFLAGS Flags to pass to objcopy when library objects are + being built. [${.TARGET} =~ *.po ? -X : -x] + OBJDUMP Display information from object files. [objdump] RANLIB Generate index to archive. [ranlib] Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.318 src/share/mk/bsd.lib.mk:1.319 --- src/share/mk/bsd.lib.mk:1.318 Fri Oct 7 05:15:22 2011 +++ src/share/mk/bsd.lib.mk Sat Jan 28 16:32:14 2012 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.318 2011/10/07 09:15:22 mrg Exp $ +# $NetBSD: bsd.lib.mk,v 1.319 2012/01/28 21:32:14 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include bsd.init.mk @@ -214,7 +214,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .c.po: @@ -224,7 +224,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} -X ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .c.go: @@ -235,21 +235,21 @@ CTFFLAGS+= -g ${_MKTARGET_COMPILE} ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .cc.o .cpp.o .cxx.o .C.o: ${_MKTARGET_COMPILE} ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .cc.po .cpp.po .cxx.po .C.po: ${_MKTARGET_COMPILE} ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} -X ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .cc.go .cpp.go .cxx.go .C.go: @@ -260,7 +260,7 @@ CTFFLAGS+= -g ${_MKTARGET_COMPILE} ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .f.o: @@ -270,7 +270,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(FOPTS) || empty(FOPTS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .f.po: @@ -280,7 +280,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(FOPTS) || empty(FOPTS:M*-g*) - ${OBJCOPY} -X ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .f.go: @@ -291,7 +291,7 @@ CTFFLAGS+= -g ${_MKTARGET_COMPILE} ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET} .if !defined(FOPTS) || empty(FOPTS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .f.ln: @@ -305,7 +305,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} -x ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .m.po: @@ -315,21 +315,21 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} -X ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .m.go: ${_MKTARGET_COMPILE} ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} -X ${.TARGET} + ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} .endif .m.pico: ${_MKTARGET_COMPILE} ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} -x ${.TARGET} +
CVS commit: src/lib/libpam/modules
Module Name:src Committed By: christos Date: Sat Jan 28 21:34:22 UTC 2012 Modified Files: src/lib/libpam/modules: mod.mk Log Message: Use -X so that the link-set symbols are not stripped. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libpam/modules/mod.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpam/modules/mod.mk diff -u src/lib/libpam/modules/mod.mk:1.9 src/lib/libpam/modules/mod.mk:1.10 --- src/lib/libpam/modules/mod.mk:1.9 Mon May 3 18:12:32 2010 +++ src/lib/libpam/modules/mod.mk Sat Jan 28 16:34:22 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mod.mk,v 1.9 2010/05/03 22:12:32 christos Exp $ +# $NetBSD: mod.mk,v 1.10 2012/01/28 21:34:22 christos Exp $ NOLINT= # don't build a lint library NOPROFILE= # don't build a profile library @@ -23,6 +23,9 @@ libinstall:: ${DESTDIR}${LIBDIR}/${LIB}. libinstall:: .endif +# Don't use -x because strips link_set symbols (which are local) +OBJCOPYLIBFLAGS=-X + .include bsd.lib.mk ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}: lib${LIB}.so.${SHLIB_FULLVERSION}
CVS commit: src/external/bsd/openpam/dist/include/security
Module Name:src Committed By: christos Date: Sat Jan 28 21:52:14 UTC 2012 Modified Files: src/external/bsd/openpam/dist/include/security: openpam.h Log Message: fix the link_set name. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/openpam/dist/include/security/openpam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/openpam/dist/include/security/openpam.h diff -u src/external/bsd/openpam/dist/include/security/openpam.h:1.3 src/external/bsd/openpam/dist/include/security/openpam.h:1.4 --- src/external/bsd/openpam/dist/include/security/openpam.h:1.3 Sun Dec 25 18:18:56 2011 +++ src/external/bsd/openpam/dist/include/security/openpam.h Sat Jan 28 16:52:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: openpam.h,v 1.3 2011/12/25 23:18:56 christos Exp $ */ +/* $NetBSD: openpam.h,v 1.4 2012/01/28 21:52:14 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -346,7 +346,7 @@ struct pam_module { [PAM_SM_CHAUTHTOK] = _PAM_SM_CHAUTHTOK \ }, \ };\ - DATA_SET(_openpam_static_modules, _pam_module) + DATA_SET(openpam_static_modules, _pam_module) #else /* normal case */ # define PAM_EXTERN
CVS commit: src/lib/libpam/modules
Module Name:src Committed By: christos Date: Sat Jan 28 21:54:26 UTC 2012 Modified Files: src/lib/libpam/modules: mod.mk Log Message: remove unneeded change To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libpam/modules/mod.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpam/modules/mod.mk diff -u src/lib/libpam/modules/mod.mk:1.10 src/lib/libpam/modules/mod.mk:1.11 --- src/lib/libpam/modules/mod.mk:1.10 Sat Jan 28 16:34:22 2012 +++ src/lib/libpam/modules/mod.mk Sat Jan 28 16:54:26 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mod.mk,v 1.10 2012/01/28 21:34:22 christos Exp $ +# $NetBSD: mod.mk,v 1.11 2012/01/28 21:54:26 christos Exp $ NOLINT= # don't build a lint library NOPROFILE= # don't build a profile library @@ -23,9 +23,6 @@ libinstall:: ${DESTDIR}${LIBDIR}/${LIB}. libinstall:: .endif -# Don't use -x because strips link_set symbols (which are local) -OBJCOPYLIBFLAGS=-X - .include bsd.lib.mk ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}: lib${LIB}.so.${SHLIB_FULLVERSION}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jan 28 23:13:24 UTC 2012 Modified Files: src/share/mk: bsd.lib.mk Log Message: rename to OBJCOPYLIBFLAGS To generate a diff of this commit: cvs rdiff -u -r1.319 -r1.320 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.319 src/share/mk/bsd.lib.mk:1.320 --- src/share/mk/bsd.lib.mk:1.319 Sat Jan 28 16:32:14 2012 +++ src/share/mk/bsd.lib.mk Sat Jan 28 18:13:24 2012 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.319 2012/01/28 21:32:14 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.320 2012/01/28 23:13:24 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include bsd.init.mk @@ -214,7 +214,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .c.po: @@ -224,7 +224,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .c.go: @@ -235,21 +235,21 @@ CTFFLAGS+= -g ${_MKTARGET_COMPILE} ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .cc.o .cpp.o .cxx.o .C.o: ${_MKTARGET_COMPILE} ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .cc.po .cpp.po .cxx.po .C.po: ${_MKTARGET_COMPILE} ${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .cc.go .cpp.go .cxx.go .C.go: @@ -260,7 +260,7 @@ CTFFLAGS+= -g ${_MKTARGET_COMPILE} ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET} .if !defined(CFLAGS) || empty(CFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .f.o: @@ -270,7 +270,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(FOPTS) || empty(FOPTS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .f.po: @@ -280,7 +280,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(FOPTS) || empty(FOPTS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .f.go: @@ -291,7 +291,7 @@ CTFFLAGS+= -g ${_MKTARGET_COMPILE} ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET} .if !defined(FOPTS) || empty(FOPTS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .f.ln: @@ -305,7 +305,7 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .m.po: @@ -315,21 +315,21 @@ CTFFLAGS+= -g ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .m.go: ${_MKTARGET_COMPILE} ${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .m.pico: ${_MKTARGET_COMPILE} ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET} .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*) - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .endif .s.o: @@ -338,7 +338,7 @@ CTFFLAGS+= -g .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .S.o: ${_MKTARGET_COMPILE} @@ -346,7 +346,7 @@ CTFFLAGS+= -g .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .s.po: ${_MKTARGET_COMPILE} @@ -354,7 +354,7 @@ CTFFLAGS+= -g .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif - ${OBJCOPY} ${OBJCOPYFLAGS} ${.TARGET} + ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET} .S.po: ${_MKTARGET_COMPILE} @@ -362,7 +362,7 @@ CTFFLAGS+= -g .if defined(CTFCONVERT)