CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rjs Date: Sun Feb 27 09:01:57 UTC 2011 Modified Files: src/sys/arch/powerpc/oea: pmap_kernel.c Log Message: Missing semicolon. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/oea/pmap_kernel.c diff -u src/sys/arch/powerpc/oea/pmap_kernel.c:1.6 src/sys/arch/powerpc/oea/pmap_kernel.c:1.7 --- src/sys/arch/powerpc/oea/pmap_kernel.c:1.6 Sat Feb 26 22:33:45 2011 +++ src/sys/arch/powerpc/oea/pmap_kernel.c Sun Feb 27 09:01:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_kernel.c,v 1.6 2011/02/26 22:33:45 matt Exp $ */ +/* $NetBSD: pmap_kernel.c,v 1.7 2011/02/27 09:01:56 rjs Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: pmap_kernel.c,v 1.6 2011/02/26 22:33:45 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: pmap_kernel.c,v 1.7 2011/02/27 09:01:56 rjs Exp $); #include opt_ddb.h #include opt_pmap.h @@ -286,7 +286,7 @@ void pmap_pvo_verify(void) { - (*pmapops-pmapop_pvo_verify)() + (*pmapops-pmapop_pvo_verify)(); } #endif
CVS commit: src/usr.bin/showmount
Module Name:src Committed By: mbalmer Date: Sun Feb 27 10:11:27 UTC 2011 Modified Files: src/usr.bin/showmount: showmount.c Log Message: Don't use 'bool' as variable name. No binary changes. From Henning Petersen, thanks! To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/showmount/showmount.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/showmount/showmount.c diff -u src/usr.bin/showmount/showmount.c:1.17 src/usr.bin/showmount/showmount.c:1.18 --- src/usr.bin/showmount/showmount.c:1.17 Mon Apr 13 07:30:49 2009 +++ src/usr.bin/showmount/showmount.c Sun Feb 27 10:11:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: showmount.c,v 1.17 2009/04/13 07:30:49 lukem Exp $ */ +/* $NetBSD: showmount.c,v 1.18 2011/02/27 10:11:27 mbalmer Exp $ */ /* * Copyright (c) 1989, 1993, 1995 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)showmount.c 8.3 (Berkeley) 3/29/95; #endif -__RCSID($NetBSD: showmount.c,v 1.17 2009/04/13 07:30:49 lukem Exp $); +__RCSID($NetBSD: showmount.c,v 1.18 2011/02/27 10:11:27 mbalmer Exp $); #endif /* not lint */ #include sys/types.h @@ -241,14 +241,14 @@ xdr_mntdump(XDR *xdrsp, struct mountlist **mlp) { struct mountlist *mp, **otp, *tp; - int bool, val, val2; + int bool_int, val, val2; char *strp; otp = NULL; *mlp = (struct mountlist *)0; - if (!xdr_bool(xdrsp, bool)) + if (!xdr_bool(xdrsp, bool_int)) return (0); - while (bool) { + while (bool_int) { mp = (struct mountlist *)malloc(sizeof(struct mountlist)); if (mp == NULL) return (0); @@ -306,7 +306,7 @@ *otp = mp; } next: - if (!xdr_bool(xdrsp, bool)) + if (!xdr_bool(xdrsp, bool_int)) return (0); } return (1); @@ -320,13 +320,13 @@ { struct exportslist *ep; struct grouplist *gp; - int bool, grpbool; + int bool_int, grpbool; char *strp; *exp = (struct exportslist *)0; - if (!xdr_bool(xdrsp, bool)) + if (!xdr_bool(xdrsp, bool_int)) return (0); - while (bool) { + while (bool_int) { ep = (struct exportslist *)malloc(sizeof(struct exportslist)); if (ep == NULL) return (0); @@ -350,7 +350,7 @@ } ep-ex_next = *exp; *exp = ep; - if (!xdr_bool(xdrsp, bool)) + if (!xdr_bool(xdrsp, bool_int)) return (0); } return (1);
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Sun Feb 27 11:32:13 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: make error messages sensible. from uwe To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/lib/librumphijack/hijack.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/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.69 src/lib/librumphijack/hijack.c:1.70 --- src/lib/librumphijack/hijack.c:1.69 Fri Feb 25 18:36:36 2011 +++ src/lib/librumphijack/hijack.c Sun Feb 27 11:32:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.69 2011/02/25 18:36:36 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.70 2011/02/27 11:32:12 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: hijack.c,v 1.69 2011/02/25 18:36:36 pooka Exp $); +__RCSID($NetBSD: hijack.c,v 1.70 2011/02/27 11:32:12 pooka Exp $); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -460,13 +460,13 @@ syscalls[i].bs_host = dlsym(RTLD_NEXT, syscnames[j].scm_hostname); if (syscalls[i].bs_host == NULL) - errx(1, hostcall %s not found missing, + errx(1, hostcall %s not found!, syscnames[j].scm_hostname); syscalls[i].bs_rump = dlsym(RTLD_NEXT, syscnames[j].scm_rumpname); if (syscalls[i].bs_rump == NULL) - errx(1, rumpcall %s not found missing, + errx(1, rumpcall %s not found!, syscnames[j].scm_rumpname); }
CVS commit: src/external/bsd/ntp/dist/ntpd
Module Name:src Committed By: plunky Date: Sun Feb 27 12:10:18 UTC 2011 Modified Files: src/external/bsd/ntp/dist/ntpd: ntp_util.c Log Message: setting USE_FORT=yes means that memmove() becomes a macro, and the #ifdef inside the macro arguments is undefined behaviour (pcc reports a syntax error) This was fixed upstream so change this to be the same as the 4.2.6p3 stable release of ntp (can't find an actual changelog entry that describes this, so have included the memcpy change also - memmove is not required here) To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/ntp/dist/ntpd/ntp_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/dist/ntpd/ntp_util.c diff -u src/external/bsd/ntp/dist/ntpd/ntp_util.c:1.1.1.1 src/external/bsd/ntp/dist/ntpd/ntp_util.c:1.2 --- src/external/bsd/ntp/dist/ntpd/ntp_util.c:1.1.1.1 Sun Dec 13 16:55:42 2009 +++ src/external/bsd/ntp/dist/ntpd/ntp_util.c Sun Feb 27 12:10:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_util.c,v 1.1.1.1 2009/12/13 16:55:42 kardel Exp $ */ +/* $NetBSD: ntp_util.c,v 1.2 2011/02/27 12:10:18 plunky Exp $ */ /* * ntp_util.c - stuff I didn't have any other place for @@ -358,6 +358,11 @@ int len; char tbuf[80]; char str1[20], str2[20]; +#ifndef VMS + const char temp_ext[] = .TEMP; +#else + const char temp_ext[] = -TEMP; +#endif /* * Expand environment strings under Windows NT, since the @@ -412,14 +417,10 @@ stats_temp_file = erealloc(stats_temp_file, len + sizeof(.TEMP)); - memmove(stats_drift_file, value, (unsigned)(len+1)); - memmove(stats_temp_file, value, (unsigned)len); - memmove(stats_temp_file + len, -#if !defined(VMS) - .TEMP, sizeof(.TEMP)); -#else - -TEMP, sizeof(-TEMP)); -#endif /* VMS */ + memcpy(stats_drift_file, value, (unsigned)(len+1)); + memcpy(stats_temp_file, value, (unsigned)len); + memcpy(stats_temp_file + len, temp_ext, + sizeof(temp_ext)); /* * Open drift file and read frequency. If the file is
CVS commit: src/external/bsd/ntp/bin/ntpq
Module Name:src Committed By: gdt Date: Sun Feb 27 12:42:44 UTC 2011 Modified Files: src/external/bsd/ntp/bin/ntpq: Makefile Log Message: Don't copy ntpq.1 to ntpq.8 before overwriting it. foo bar fails when bar is mode 444, and files copied from the source tree should be expected to perhaps be read only. However, the copy should have been removed when the sed was added. And, it never should have been @; suppressing it made debugging this harder than it should have been. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ntp/bin/ntpq/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/ntp/bin/ntpq/Makefile diff -u src/external/bsd/ntp/bin/ntpq/Makefile:1.4 src/external/bsd/ntp/bin/ntpq/Makefile:1.5 --- src/external/bsd/ntp/bin/ntpq/Makefile:1.4 Sat Feb 26 19:17:38 2011 +++ src/external/bsd/ntp/bin/ntpq/Makefile Sun Feb 27 12:42:44 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2011/02/26 19:17:38 plunky Exp $ +# $NetBSD: Makefile,v 1.5 2011/02/27 12:42:44 gdt Exp $ # NOGCCERROR=yes @@ -24,7 +24,6 @@ .PATH: ${DIST} ntpq.8: ntpq.1 - @cp $? $@ ${_MKTARGET_BUILD} ${TOOL_SED} -e s,NTPQ 1,NTPQ 8, $? $@
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Sun Feb 27 12:58:29 UTC 2011 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: Take reasonable precautions against init in a parent process which did a rump-transparent host-only fork(). To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/librumpclient/rumpclient.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/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.37 src/lib/librumpclient/rumpclient.c:1.38 --- src/lib/librumpclient/rumpclient.c:1.37 Fri Feb 25 15:12:06 2011 +++ src/lib/librumpclient/rumpclient.c Sun Feb 27 12:58:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.37 2011/02/25 15:12:06 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.38 2011/02/27 12:58:29 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: rumpclient.c,v 1.37 2011/02/25 15:12:06 pooka Exp $); +__RCSID($NetBSD: rumpclient.c,v 1.38 2011/02/27 12:58:29 pooka Exp $); #include sys/param.h #include sys/event.h @@ -727,7 +727,7 @@ } __weak_alias(rumphijack_dlsym,rumpclient__dlsym); -static int init_done = 0; +static pid_t init_done = 0; int rumpclient_init() @@ -736,10 +736,22 @@ int error; int rv = -1; int hstype; + pid_t mypid; - if (init_done) + /* + * Make sure we're not riding the context of a previous + * host fork. Note: it's *possible* that after n1 forks + * we have the same pid as one of our exited parents, but + * I'm pretty sure there are 0 practical implications, since + * it means generations would have to skip rumpclient init. + */ + if (init_done == (mypid = getpid())) return 0; - init_done = 1; + + /* kq does not traverse fork() */ + if (init_done != 0) + kq = -1; + init_done = mypid; sigfillset(fullset);
CVS commit: src/external/apache2/mDNSResponder/usr.sbin/mdnsd
Module Name:src Committed By: plunky Date: Sun Feb 27 13:01:06 UTC 2011 Added Files: src/external/apache2/mDNSResponder/usr.sbin/mdnsd: mdnsd.8 Log Message: the original mDNSResponder.8 manpage, for reference To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 diff -u /dev/null src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.1 --- /dev/null Sun Feb 27 13:01:06 2011 +++ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 Sun Feb 27 13:01:05 2011 @@ -0,0 +1,149 @@ +.\ -*- tab-width: 4 -*- +.\ +.\ Copyright (c) 2003-2004 Apple Computer, Inc. All Rights Reserved. +.\ +.\ Licensed under the Apache License, Version 2.0 (the License); +.\ you may not use this file except in compliance with the License. +.\ You may obtain a copy of the License at +.\ +.\ http://www.apache.org/licenses/LICENSE-2.0 +.\ +.\ Unless required by applicable law or agreed to in writing, software +.\ distributed under the License is distributed on an AS IS BASIS, +.\ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.\ See the License for the specific language governing permissions and +.\ limitations under the License. +.\ +.\ Log: mDNSResponder.8,v $ +.\ Revision 1.10 2009/04/20 16:12:13 mcguire +.\ rdar://problem/6807798 manpage: roff errors +.\ +.\ Revision 1.9 2009/04/11 00:20:27 jessic2 +.\ rdar://problem/4426780 Daemon: Should be able to turn on LogOperation dynamically +.\ +.\ Revision 1.8 2006/10/06 17:31:33 mkrochma +.\ rdar://problem/4769407 Typo in man page for mDNSResponder(8) +.\ +.\ Revision 1.7 2006/08/14 23:24:56 cheshire +.\ Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0 +.\ +.\ Revision 1.6 2005/02/10 22:35:28 cheshire +.\ rdar://problem/3727944 Update name +.\ +.\ Revision 1.5 2004/06/29 02:41:38 cheshire +.\ Add note that mDNSResponder is called mdnsd on some systems +.\ +.\ Revision 1.4 2004/05/18 18:14:36 cheshire +.\ Minor wording update +.\ +.\ Revision 1.3 2004/04/22 02:56:08 cheshire +.\ rdar://problem/3619494: mDNSResponder man page format error +.\ +.\ Revision 1.2 2004/04/12 18:03:24 ksekar +.\ rdar://problem/3619494: mDNSResponder man page format error +.\ +.\ Revision 1.1 2003/11/13 03:21:38 cheshire +.\ rdar://problem/3086886: No man page for mDNSResponder +.\ +.\ +.\ +.Dd April 2004 \ Date +.Dt mDNSResponder 8 \ Document Title +.Os Darwin \ Operating System +.\ +.Sh NAME +.Nm mDNSResponder +.Nd Multicast and Unicast DNS daemon\ Name Description for whatis database +.\ +.Sh SYNOPSIS +.Nm +.\ +.Sh DESCRIPTION +.Nm +(also known as +.Nm mdnsd +on some systems) +is a daemon invoked at boot time to implement Multicast DNS and DNS Service Discovery. On +Mac OS X 10.6 (Snow Leopard), +.Nm +is also the system-wide Unicast DNS Resolver. +.Pp +.Nm +listens on UDP port 5353 for Multicast DNS Query packets. +When it receives a query for which it knows an answer, +.Nm +issues the appropriate Multicast DNS Reply packet. +.Pp +.Nm +also performs Unicast and Multicast DNS Queries on behalf of client processes, and +maintains a cache of the replies. +.Pp +.Nm +has no user-specifiable command-line argument, and users should not run +.Nm +manually. +.Pp +.Ss LOGGING +There are several methods with which to examine +.Nm Ns 's internal state for debugging and diagnostic purposes. The syslog(1) +logging levels map as follows: +.Pp +.Dl Error - Error messages +.Dl Warning - Client-initiated operations +.Dl Notice - Sleep proxy operations +.Dl Info - Informational messages +.Pp +By default, only log level Error is logged. +.Pp +A SIGUSR1 signal toggles additional logging, with Warning and Notice +enabled by default: +.Pp +.Dl % sudo killall -USR1 mDNSResponder +.Pp +Once this logging is enabled, users can additionally use syslog(1) +to change the log filter for the process. For example, to enable log levels Emergency - Debug: +.Pp +.Dl % sudo syslog -c mDNSResponder -d +.Pp +A SIGUSR2 signal toggles packet logging: +.Pp +.Dl % sudo killall -USR2 mDNSResponder +.Pp +A SIGINFO signal will dump a snapshot summary of the internal state to +.Pa /var/log/system.log Ns : +.Pp +.Dl % sudo killall -INFO mDNSResponder +.Sh FILES +.Pa /usr/sbin/mDNSResponder \ Pathname +.\ +.Sh SEE ALSO +.Xr mDNS 1 +.Pp +For information on Multicast DNS, see +.Pa http://www.multicastdns.org/ +.Pp +For information on DNS Service Discovery, see +.Pa http://www.dns-sd.org/ +.Pp +For information on how to use the Multicast DNS and the +DNS Service Discovery APIs on Mac OS X and other platforms, see +.Pa http://developer.apple.com/bonjour/ +.Pp +For the source code to +.Nm , see +.Pa
CVS commit: src/external/apache2/mDNSResponder/usr.sbin/mdnsd
Module Name:src Committed By: plunky Date: Sun Feb 27 13:05:38 UTC 2011 Modified Files: src/external/apache2/mDNSResponder/usr.sbin/mdnsd: Makefile mdnsd.8 Log Message: since the mDNSResponder daemon is installed as mdnsd, there is some confusion in the manpage. Not to mention the examples including commands that don't exist on NetBSD (killall, sudo), so do a bit of cleanup (and don't copy from dist, just keep it here) mDNSResponder - mdnsd mdnsd - mDNSResponder mDNS - dns-sd killall - pkill % sudo - # syslog(8) - syslogd(8) example for syslog - /dev/null Xr for pkill, syslogd, dns-sd To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile diff -u src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.5 src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.6 --- src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile:1.5 Sun Oct 18 17:43:11 2009 +++ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile Sun Feb 27 13:05:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2009/10/18 17:43:11 tron Exp $ +# $NetBSD: Makefile,v 1.6 2011/02/27 13:05:38 plunky Exp $ PROG= mdnsd @@ -16,9 +16,4 @@ MAN= mdnsd.8 -mdnsd.8: mDNSResponder.8 - ${TOOL_CAT} $? $@ - -CLEANFILES+= mdnsd.8 - .include bsd.prog.mk Index: src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 diff -u src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.1 src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.2 --- src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.1 Sun Feb 27 13:01:05 2011 +++ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 Sun Feb 27 13:05:38 2011 @@ -1,3 +1,5 @@ +.\ $NetBSD: mdnsd.8,v 1.2 2011/02/27 13:05:38 plunky Exp $ +.\ .\ -*- tab-width: 4 -*- .\ .\ Copyright (c) 2003-2004 Apple Computer, Inc. All Rights Reserved. @@ -47,12 +49,12 @@ .\ .\ .\ -.Dd April 2004 \ Date -.Dt mDNSResponder 8 \ Document Title +.Dd February 27, 2011 \ Date +.Dt mdnsd 8 \ Document Title .Os Darwin \ Operating System .\ .Sh NAME -.Nm mDNSResponder +.Nm mdnsd .Nd Multicast and Unicast DNS daemon\ Name Description for whatis database .\ .Sh SYNOPSIS @@ -61,7 +63,7 @@ .Sh DESCRIPTION .Nm (also known as -.Nm mdnsd +.Nm mDNSResponder on some systems) is a daemon invoked at boot time to implement Multicast DNS and DNS Service Discovery. On Mac OS X 10.6 (Snow Leopard), @@ -85,7 +87,8 @@ .Pp .Ss LOGGING There are several methods with which to examine -.Nm Ns 's internal state for debugging and diagnostic purposes. The syslog(1) +.Nm Ns 's internal state for debugging and diagnostic purposes. The +.Xr syslogd 8 logging levels map as follows: .Pp .Dl Error - Error messages @@ -98,26 +101,23 @@ A SIGUSR1 signal toggles additional logging, with Warning and Notice enabled by default: .Pp -.Dl % sudo killall -USR1 mDNSResponder -.Pp -Once this logging is enabled, users can additionally use syslog(1) -to change the log filter for the process. For example, to enable log levels Emergency - Debug: -.Pp -.Dl % sudo syslog -c mDNSResponder -d +.Dl # pkill -USR1 mdnsd .Pp A SIGUSR2 signal toggles packet logging: .Pp -.Dl % sudo killall -USR2 mDNSResponder +.Dl # pkill -USR2 mdnsd .Pp A SIGINFO signal will dump a snapshot summary of the internal state to .Pa /var/log/system.log Ns : .Pp -.Dl % sudo killall -INFO mDNSResponder +.Dl # pkill -INFO mdnsd .Sh FILES -.Pa /usr/sbin/mDNSResponder \ Pathname +.Pa /usr/sbin/mdnsd \ Pathname .\ .Sh SEE ALSO -.Xr mDNS 1 +.Xr dns-sd 1 , +.Xr pkill 1 , +.Xr syslogd 8 .Pp For information on Multicast DNS, see .Pa http://www.multicastdns.org/
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Sun Feb 27 13:37:39 UTC 2011 Modified Files: src/sys/rump/librump/rumpvfs: vm_vfs.c Log Message: tmpfs has two layers of uvm objects (vnode-uobj and the anon object in tmpfs_node), so when playing with pages make sure we lock the uvm object the pages belong to instead of the vnode's uvm object. per test from Nicolas Joly (which I'm sure he will commit soon ;) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/rump/librump/rumpvfs/vm_vfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpvfs/vm_vfs.c diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.25 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.26 --- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.25 Tue Feb 22 20:17:37 2011 +++ src/sys/rump/librump/rumpvfs/vm_vfs.c Sun Feb 27 13:37:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_vfs.c,v 1.25 2011/02/22 20:17:37 pooka Exp $ */ +/* $NetBSD: vm_vfs.c,v 1.26 2011/02/27 13:37:39 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.25 2011/02/22 20:17:37 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_vfs.c,v 1.26 2011/02/27 13:37:39 pooka Exp $); #include sys/param.h @@ -109,6 +109,7 @@ { struct uvm_object *uobj = vp-v_uobj; struct vm_page **pgs; + struct uvm_object *pguobj; int maxpages = MIN(32, round_page(len) PAGE_SHIFT); int rv, npages, i; @@ -125,7 +126,7 @@ 0, PAGERFLAGS | PGO_PASTEOF); KASSERT(npages 0); - for (i = 0; i npages; i++) { + for (i = 0, pguobj = NULL; i npages; i++) { struct vm_page *pg; uint8_t *start; size_t chunkoff, chunklen; @@ -133,6 +134,9 @@ pg = pgs[i]; if (pg == NULL) break; + if (pguobj == NULL) +pguobj = pg-uobject; + KASSERT(pguobj == pg-uobject); chunkoff = off PAGE_MASK; chunklen = MIN(PAGE_SIZE - chunkoff, len); @@ -144,8 +148,12 @@ off += chunklen; len -= chunklen; } - mutex_enter(uobj-vmobjlock); + mutex_enter(pguobj-vmobjlock); uvm_page_unbusy(pgs, npages); + if (pguobj != uobj) { + mutex_exit(pguobj-vmobjlock); + mutex_enter(uobj-vmobjlock); + } } mutex_exit(uobj-vmobjlock); kmem_free(pgs, maxpages * sizeof(pgs)); @@ -161,6 +169,7 @@ int advice, int flags) { struct vm_page **pgs; + struct uvm_object *pguobj; int npages = len2npages(uio-uio_offset, todo); size_t pgalloc; int i, rv, pagerflags; @@ -184,7 +193,7 @@ if (rv) goto out; - for (i = 0; i npages; i++) { + for (i = 0, pguobj = NULL; i npages; i++) { struct vm_page *pg; size_t xfersize; off_t pageoff; @@ -192,6 +201,9 @@ pg = pgs[i]; if (pg == NULL) break; + if (pguobj == NULL) +pguobj = pg-uobject; + KASSERT(pguobj == pg-uobject); pageoff = uio-uio_offset PAGE_MASK; xfersize = MIN(MIN(todo, PAGE_SIZE), PAGE_SIZE-pageoff); @@ -199,17 +211,21 @@ rv = uiomove((uint8_t *)pg-uanon + pageoff, xfersize, uio); if (rv) { -mutex_enter(uobj-vmobjlock); +mutex_enter(pguobj-vmobjlock); uvm_page_unbusy(pgs, npages); -mutex_exit(uobj-vmobjlock); +mutex_exit(pguobj-vmobjlock); goto out; } if (uio-uio_rw == UIO_WRITE) pg-flags = ~(PG_CLEAN | PG_FAKE); todo -= xfersize; } - mutex_enter(uobj-vmobjlock); + mutex_enter(pguobj-vmobjlock); uvm_page_unbusy(pgs, npages); + if (pguobj != uobj) { + mutex_exit(pguobj-vmobjlock); + mutex_enter(uobj-vmobjlock); + } } while (todo); mutex_exit(uobj-vmobjlock);
CVS commit: src/external/apache2/mDNSResponder/usr.sbin/mdnsd
Module Name:src Committed By: wiz Date: Sun Feb 27 14:01:42 UTC 2011 Modified Files: src/external/apache2/mDNSResponder/usr.sbin/mdnsd: mdnsd.8 Log Message: Lots of small fixes, so mdoclint is happy. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 diff -u src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.2 src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.3 --- src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8:1.2 Sun Feb 27 13:05:38 2011 +++ src/external/apache2/mDNSResponder/usr.sbin/mdnsd/mdnsd.8 Sun Feb 27 14:01:42 2011 @@ -1,15 +1,15 @@ -.\ $NetBSD: mdnsd.8,v 1.2 2011/02/27 13:05:38 plunky Exp $ -.\ +.\ $NetBSD: mdnsd.8,v 1.3 2011/02/27 14:01:42 wiz Exp $ +.\ .\ -*- tab-width: 4 -*- -.\ +.\ .\ Copyright (c) 2003-2004 Apple Computer, Inc. All Rights Reserved. -.\ +.\ .\ Licensed under the Apache License, Version 2.0 (the License); .\ you may not use this file except in compliance with the License. .\ You may obtain a copy of the License at -.\ +.\ .\ http://www.apache.org/licenses/LICENSE-2.0 -.\ +.\ .\ Unless required by applicable law or agreed to in writing, software .\ distributed under the License is distributed on an AS IS BASIS, .\ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,14 +49,14 @@ .\ .\ .\ -.Dd February 27, 2011 \ Date -.Dt mdnsd 8 \ Document Title -.Os Darwin \ Operating System +.Dd February 27, 2011 +.Dt MDNSD 8 +.Os .\ .Sh NAME .Nm mdnsd .Nd Multicast and Unicast DNS daemon\ Name Description for whatis database -.\ +.\ .Sh SYNOPSIS .Nm .\ @@ -65,9 +65,10 @@ (also known as .Nm mDNSResponder on some systems) -is a daemon invoked at boot time to implement Multicast DNS and DNS Service Discovery. On -Mac OS X 10.6 (Snow Leopard), -.Nm +is a daemon invoked at boot time to implement Multicast DNS and DNS Service Discovery. +On +Mac OS X 10.6 (Snow Leopard), +.Nm is also the system-wide Unicast DNS Resolver. .Pp .Nm @@ -77,17 +78,18 @@ issues the appropriate Multicast DNS Reply packet. .Pp .Nm -also performs Unicast and Multicast DNS Queries on behalf of client processes, and +also performs Unicast and Multicast DNS Queries on behalf of client processes, and maintains a cache of the replies. .Pp .Nm has no user-specifiable command-line argument, and users should not run .Nm manually. -.Pp .Ss LOGGING -There are several methods with which to examine -.Nm Ns 's internal state for debugging and diagnostic purposes. The +There are several methods with which to examine +.Nm Ap s +internal state for debugging and diagnostic purposes. +The .Xr syslogd 8 logging levels map as follows: .Pp @@ -107,8 +109,8 @@ .Pp .Dl # pkill -USR2 mdnsd .Pp -A SIGINFO signal will dump a snapshot summary of the internal state to -.Pa /var/log/system.log Ns : +A SIGINFO signal will dump a snapshot summary of the internal state to +.Pa /var/log/system.log : .Pp .Dl # pkill -INFO mdnsd .Sh FILES @@ -133,17 +135,20 @@ .Nm , see .Pa http://developer.apple.com/darwin/projects/bonjour/ .\ -.Sh BUGS -.Nm -bugs are tracked in Apple Radar component mDNSResponder. -.\ .Sh HISTORY The .Nm daemon first appeared in Mac OS X 10.2 (Jaguar). .Pp Also available from the Darwin open source repository -(though not officially supported by Apple) are +(though not officially supported by Apple) are .Nm daemons for other platforms, including Mac OS 9, Microsoft Windows, -Linux, FreeBSD, NetBSD, Solaris, and other POSIX systems. +Linux, +.Fx , +.Nx , +Solaris, and other POSIX systems. +.\ +.Sh BUGS +.Nm +bugs are tracked in Apple Radar component mDNSResponder.
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: njoly Date: Sun Feb 27 15:16:31 UTC 2011 Modified Files: src/tests/fs/vfs: t_io.c Log Message: Add a small testcase that shrink a file using 2 consecutive ftruncate calls. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/fs/vfs/t_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/vfs/t_io.c diff -u src/tests/fs/vfs/t_io.c:1.7 src/tests/fs/vfs/t_io.c:1.8 --- src/tests/fs/vfs/t_io.c:1.7 Wed Feb 2 14:42:15 2011 +++ src/tests/fs/vfs/t_io.c Sun Feb 27 15:16:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_io.c,v 1.7 2011/02/02 14:42:15 pooka Exp $ */ +/* $NetBSD: t_io.c,v 1.8 2011/02/27 15:16:31 njoly Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -158,6 +158,19 @@ overwritebody(tc, 116, true); } +static void +shrinkfile(const atf_tc_t *tc, const char *mp) +{ + int fd; + + FSTEST_ENTER(); + RL(fd = rump_sys_open(file, O_RDWR|O_CREAT|O_TRUNC, 0666)); + RL(rump_sys_ftruncate(fd, 2)); + RL(rump_sys_ftruncate(fd, 1)); + rump_sys_close(fd); + FSTEST_EXIT(); +} + ATF_TC_FSAPPLY(holywrite, create a sparse file and fill hole); ATF_TC_FSAPPLY(extendfile, check that extending a file works); ATF_TC_FSAPPLY(extendfile_append, check that extending a file works @@ -165,6 +178,7 @@ ATF_TC_FSAPPLY(overwrite512, write a 512 byte file twice); ATF_TC_FSAPPLY(overwrite64k, write a 64k byte file twice); ATF_TC_FSAPPLY(overwrite_trunc, write 64k + truncate + rewrite); +ATF_TC_FSAPPLY(shrinkfile, shrink file); ATF_TP_ADD_TCS(tp) { @@ -175,6 +189,7 @@ ATF_TP_FSAPPLY(overwrite512); ATF_TP_FSAPPLY(overwrite64k); ATF_TP_FSAPPLY(overwrite_trunc); + ATF_TP_FSAPPLY(shrinkfile); return atf_no_error(); }
CVS commit: src/sys
Module Name:src Committed By: jruoho Date: Sun Feb 27 17:10:34 UTC 2011 Modified Files: src/sys/arch/amd64/conf: GENERIC src/sys/arch/i386/conf: ALL GENERIC src/sys/arch/x86/conf: files.x86 src/sys/dev/acpi: acpi.c acpi_cpu.c acpi_cpu_pstate.c files.acpi src/sys/modules/acpicpu: acpicpu.ioconf Log Message: Move acpicpu(4) from acpinodebus to cpufeaturebus. To generate a diff of this commit: cvs rdiff -u -r1.314 -r1.315 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.298 -r1.299 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1023 -r1.1024 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r1.239 -r1.240 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.29 -r1.30 src/sys/dev/acpi/acpi_cpu.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/acpi/acpi_cpu_pstate.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/acpi/files.acpi cvs rdiff -u -r1.1 -r1.2 src/sys/modules/acpicpu/acpicpu.ioconf 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/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.314 src/sys/arch/amd64/conf/GENERIC:1.315 --- src/sys/arch/amd64/conf/GENERIC:1.314 Thu Feb 24 10:56:00 2011 +++ src/sys/arch/amd64/conf/GENERIC Sun Feb 27 17:10:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.314 2011/02/24 10:56:00 jruoho Exp $ +# $NetBSD: GENERIC,v 1.315 2011/02/27 17:10:33 jruoho Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.314 $ +#ident GENERIC-$Revision: 1.315 $ maxusers 64 # estimated number of users @@ -79,6 +79,7 @@ options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # CPU features +#acpicpu* at cpu? # ACPI CPU (including frequency scaling) coretemp* at cpu? # Intel on-die thermal sensor est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI) powernow0 at cpu0 # AMD PowerNow! and Cool'n'Quiet (non-ACPI) @@ -279,7 +280,6 @@ acpiacad* at acpi? # ACPI AC Adapter acpibat* at acpi? # ACPI Battery acpibut* at acpi? # ACPI Button -#acpicpu* at acpi? # ACPI CPU acpidalb* at acpi? # Direct Application Launch Button acpiec* at acpi? # ACPI Embedded Controller (late) acpiecdt* at acpi? # ACPI Embedded Controller (early) Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.298 src/sys/arch/i386/conf/ALL:1.299 --- src/sys/arch/i386/conf/ALL:1.298 Sat Feb 26 18:07:30 2011 +++ src/sys/arch/i386/conf/ALL Sun Feb 27 17:10:33 2011 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.298 2011/02/26 18:07:30 ahoka Exp $ +# $NetBSD: ALL,v 1.299 2011/02/27 17:10:33 jruoho Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident ALL-$Revision: 1.298 $ +#ident ALL-$Revision: 1.299 $ maxusers 64 # estimated number of users @@ -30,6 +30,7 @@ options PAE # PAE mode (36 bits physical addressing) # CPU features +acpicpu* at cpu? # ACPI CPU (including frequency scaling) coretemp* at cpu? # Intel on-die thermal sensor est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI) padlock0 at cpu0 # VIA PadLock @@ -356,7 +357,6 @@ acpiacad* at acpi? # ACPI AC Adapter acpibat* at acpi? # ACPI Battery acpibut* at acpi? # ACPI Button -acpicpu* at acpi? # ACPI CPU acpidalb* at acpi? # ACPI Direct Application Launch Button acpiec* at acpi? # ACPI Embedded Controller (late) acpiecdt* at acpi? # ACPI Embedded Controller (early) Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1023 src/sys/arch/i386/conf/GENERIC:1.1024 --- src/sys/arch/i386/conf/GENERIC:1.1023 Thu Feb 24 13:58:39 2011 +++ src/sys/arch/i386/conf/GENERIC Sun Feb 27 17:10:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1023 2011/02/24 13:58:39 jruoho Exp $ +# $NetBSD: GENERIC,v 1.1024 2011/02/27 17:10:34 jruoho Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.1023 $ +#ident GENERIC-$Revision: 1.1024 $ maxusers 64 # estimated number of users @@ -38,6 +38,7 @@ #options PAE # PAE mode (36 bits physical addressing) # CPU features +#acpicpu* at cpu? # ACPI CPU (including frequency scaling) coretemp* at cpu? # Intel on-die thermal sensor est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI) #padlock0 at cpu0 # VIA PadLock @@ -348,7 +349,6 @@ acpiacad* at acpi? # ACPI AC Adapter acpibat* at acpi? # ACPI Battery acpibut* at acpi? # ACPI Button -#acpicpu* at acpi? # ACPI CPU acpidalb* at acpi? # ACPI Direct Application Launch Button acpiec* at acpi? # ACPI Embedded Controller (late) acpiecdt* at acpi? # ACPI Embedded Controller (early) Index:
CVS commit: src/sys/arch/x86/acpi
Module Name:src Committed By: jruoho Date: Sun Feb 27 17:27:28 UTC 2011 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c Log Message: Claim to support the dependency coordination during the _PDC/_OSC query. (Although we do not actually support it.) Only after these bits are set, many Intel-based BIOSes are willing to relinquish the necessary information. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/x86/acpi/acpi_cpu_md.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/x86/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.46 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.47 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.46 Fri Feb 25 17:23:34 2011 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Sun Feb 27 17:27:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.46 2011/02/25 17:23:34 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.47 2011/02/27 17:27:28 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.46 2011/02/25 17:23:34 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.47 2011/02/27 17:27:28 jruoho Exp $); #include sys/param.h #include sys/bus.h @@ -130,10 +130,15 @@ return val; /* - * Basic SMP C-states (required for _CST). + * Basic SMP C-states (required for e.g. _CST). */ val |= ACPICPU_PDC_C_C1PT | ACPICPU_PDC_C_C2C3; + /* + * Claim to support dependency coordination. + */ + val |= ACPICPU_PDC_P_SW | ACPICPU_PDC_C_SW | ACPICPU_PDC_T_SW; + /* * If MONITOR/MWAIT is available, announce * support for native instructions in all C-states.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jruoho Date: Sun Feb 27 17:31:09 UTC 2011 Modified Files: src/sys/dev/pci: pci_map.c Log Message: Remove the following aprint_debug(9): pci_mem_find: void region. I have a system where this is printed about a hundred times. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/pci_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_map.c diff -u src/sys/dev/pci/pci_map.c:1.25 src/sys/dev/pci/pci_map.c:1.26 --- src/sys/dev/pci/pci_map.c:1.25 Tue May 11 16:49:35 2010 +++ src/sys/dev/pci/pci_map.c Sun Feb 27 17:31:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_map.c,v 1.25 2010/05/11 16:49:35 dyoung Exp $ */ +/* $NetBSD: pci_map.c,v 1.26 2011/02/27 17:31:08 jruoho Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_map.c,v 1.25 2010/05/11 16:49:35 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_map.c,v 1.26 2011/02/27 17:31:08 jruoho Exp $); #include sys/param.h #include sys/systm.h @@ -174,7 +174,6 @@ if ((is64bit PCI_MAPREG_MEM64_SIZE(wmask) == 0) || (!is64bit PCI_MAPREG_MEM_SIZE(mask) == 0)) { - aprint_debug(pci_mem_find: void region\n); return 1; }
CVS commit: src/usr.bin/grep
Module Name:src Committed By: joerg Date: Sun Feb 27 17:33:37 UTC 2011 Modified Files: src/usr.bin/grep: fastgrep.c grep.h util.c Log Message: If transforming patterns with \...\ to implicit word bounaries, don't change the global wflag, but use a per pattern flag derived from it. Fixes usage of grep with multiple -w arguments. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/grep/fastgrep.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/grep/grep.h cvs rdiff -u -r1.8 -r1.9 src/usr.bin/grep/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/grep/fastgrep.c diff -u src/usr.bin/grep/fastgrep.c:1.3 src/usr.bin/grep/fastgrep.c:1.4 --- src/usr.bin/grep/fastgrep.c:1.3 Thu Feb 17 22:03:25 2011 +++ src/usr.bin/grep/fastgrep.c Sun Feb 27 17:33:37 2011 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: fastgrep.c,v 1.3 2011/02/17 22:03:25 joerg Exp $); +__RCSID($NetBSD: fastgrep.c,v 1.4 2011/02/27 17:33:37 joerg Exp $); #include limits.h #include stdbool.h @@ -88,6 +88,7 @@ fg-bol = false; fg-eol = false; fg-reversed = false; + fg-word = wflag; /* Remove end-of-line character ('$'). */ if (fg-len 0 pat[fg-len - 1] == '$') { @@ -108,7 +109,7 @@ fg-len -= 14; pat += 7; /* Word boundary is handled separately in util.c */ - wflag = true; + fg-word = true; } /* Index: src/usr.bin/grep/grep.h diff -u src/usr.bin/grep/grep.h:1.4 src/usr.bin/grep/grep.h:1.5 --- src/usr.bin/grep/grep.h:1.4 Wed Feb 16 01:31:33 2011 +++ src/usr.bin/grep/grep.h Sun Feb 27 17:33:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: grep.h,v 1.4 2011/02/16 01:31:33 joerg Exp $ */ +/* $NetBSD: grep.h,v 1.5 2011/02/27 17:33:37 joerg Exp $ */ /* $OpenBSD: grep.h,v 1.15 2010/04/05 03:03:55 tedu Exp $ */ /* $FreeBSD: head/usr.bin/grep/grep.h 211496 2010-08-19 09:28:59Z des $ */ @@ -103,6 +103,7 @@ bool bol; bool eol; bool reversed; + bool word; } fastgrep_t; /* Flags passed to regcomp() and regexec() */ Index: src/usr.bin/grep/util.c diff -u src/usr.bin/grep/util.c:1.8 src/usr.bin/grep/util.c:1.9 --- src/usr.bin/grep/util.c:1.8 Wed Feb 16 18:35:39 2011 +++ src/usr.bin/grep/util.c Sun Feb 27 17:33:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.8 2011/02/16 18:35:39 joerg Exp $ */ +/* $NetBSD: util.c,v 1.9 2011/02/27 17:33:37 joerg Exp $ */ /* $FreeBSD: head/usr.bin/grep/util.c 211496 2010-08-19 09:28:59Z des $ */ /* $OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $ */ @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: util.c,v 1.8 2011/02/16 18:35:39 joerg Exp $); +__RCSID($NetBSD: util.c,v 1.9 2011/02/27 17:33:37 joerg Exp $); #include sys/stat.h #include sys/types.h @@ -323,7 +323,8 @@ (size_t)pmatch.rm_eo != l-len) r = REG_NOMATCH; /* Check for whole word match */ -if (r == 0 wflag pmatch.rm_so != 0) { +if (r == 0 fg_pattern[i].word +pmatch.rm_so != 0) { wint_t wbegin, wend; wbegin = wend = L' ';
CVS commit: src
Module Name:src Committed By: ahoka Date: Sun Feb 27 17:51:45 UTC 2011 Modified Files: src/distrib/sets/lists/man: mi src/usr.sbin/flashctl: Makefile Added Files: src/usr.sbin/flashctl: flashctl.8 Log Message: Add manpage for flashctl To generate a diff of this commit: cvs rdiff -u -r1.1296 -r1.1297 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/flashctl/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/flashctl/flashctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1296 src/distrib/sets/lists/man/mi:1.1297 --- src/distrib/sets/lists/man/mi:1.1296 Sat Feb 26 18:07:15 2011 +++ src/distrib/sets/lists/man/mi Sun Feb 27 17:51:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1296 2011/02/26 18:07:15 ahoka Exp $ +# $NetBSD: mi,v 1.1297 2011/02/27 17:51:45 ahoka Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2221,6 +2221,7 @@ ./usr/share/man/cat8/fdisk.0 man-sysutil-catman .cat ./usr/share/man/cat8/fingerd.0 man-sysutil-catman .cat ./usr/share/man/cat8/fixmount.0 man-sysutil-catman .cat +./usr/share/man/cat8/flashctl.0 man-sysutil-catman .cat ./usr/share/man/cat8/flush.0 man-postfix-catman postfix,.cat ./usr/share/man/cat8/fsck.0 man-sysutil-catman .cat ./usr/share/man/cat8/fsck_ext2fs.0 man-ext2fs-catman .cat @@ -4830,6 +4831,7 @@ ./usr/share/man/html8/fdisk.html man-sysutil-htmlman html ./usr/share/man/html8/fingerd.html man-sysutil-htmlman html ./usr/share/man/html8/fixmount.html man-sysutil-htmlman html +./usr/share/man/html8/flashctl.html man-sysutil-htmlman html ./usr/share/man/html8/flush.html man-postfix-htmlman postfix,html ./usr/share/man/html8/fsck.html man-sysutil-htmlman html ./usr/share/man/html8/fsck_ext2fs.html man-ext2fs-htmlman html @@ -7531,6 +7533,7 @@ ./usr/share/man/man8/fdisk.8 man-sysutil-man .man ./usr/share/man/man8/fingerd.8 man-sysutil-man .man ./usr/share/man/man8/fixmount.8 man-sysutil-man .man +./usr/share/man/man8/flashctl.8 man-sysutil-man .man ./usr/share/man/man8/flush.8 man-postfix-man postfix,.man ./usr/share/man/man8/fsck.8 man-sysutil-man .man ./usr/share/man/man8/fsck_ext2fs.8 man-ext2fs-man .man Index: src/usr.sbin/flashctl/Makefile diff -u src/usr.sbin/flashctl/Makefile:1.1 src/usr.sbin/flashctl/Makefile:1.2 --- src/usr.sbin/flashctl/Makefile:1.1 Sat Feb 26 18:07:32 2011 +++ src/usr.sbin/flashctl/Makefile Sun Feb 27 17:51:45 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.1 2011/02/26 18:07:32 ahoka Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/27 17:51:45 ahoka Exp $ SRCS= flashctl.c PROG= flashctl -MAN= # not yet +MAN= flashctl.8 WARNS= 4 Added files: Index: src/usr.sbin/flashctl/flashctl.8 diff -u /dev/null src/usr.sbin/flashctl/flashctl.8:1.1 --- /dev/null Sun Feb 27 17:51:46 2011 +++ src/usr.sbin/flashctl/flashctl.8 Sun Feb 27 17:51:45 2011 @@ -0,0 +1,85 @@ +.\ $NetBSD: flashctl.8,v 1.1 2011/02/27 17:51:45 ahoka Exp $ +.\ +.\ Copyright (c) 2011 Department of Software Engineering, +.\ University of Szeged, Hungary +.\ Copyright (c) 2011 Adam Hoka ah...@netbsd.org +.\ All rights reserved. +.\ +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by the Department of Software Engineering, University of Szeged, Hungary +.\ +.\ 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 AUTHOR ``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 AUTHOR 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. +.\ +.Dd February 27, 2011 +.Dt FLASHCTL 8 +.Os +.Sh NAME +.Nm flashctl +.Nd a program to manipulate flash devices +.Sh SYNOPSIS +.Nm +.Ar device +.Ar command +.Oo +.Ar arg Oo ... +.Oc +.Oc +.Sh DESCRIPTION +.Nm +could be used to invoke low level
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Sun Feb 27 18:01:29 UTC 2011 Modified Files: src/sys/dev/pci: pci_map.c Log Message: revert previous; instead of commenting out the error message how about fixing the code that causes it to be printed in the first place To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/pci_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_map.c diff -u src/sys/dev/pci/pci_map.c:1.26 src/sys/dev/pci/pci_map.c:1.27 --- src/sys/dev/pci/pci_map.c:1.26 Sun Feb 27 17:31:08 2011 +++ src/sys/dev/pci/pci_map.c Sun Feb 27 18:01:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_map.c,v 1.26 2011/02/27 17:31:08 jruoho Exp $ */ +/* $NetBSD: pci_map.c,v 1.27 2011/02/27 18:01:28 jmcneill Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci_map.c,v 1.26 2011/02/27 17:31:08 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: pci_map.c,v 1.27 2011/02/27 18:01:28 jmcneill Exp $); #include sys/param.h #include sys/systm.h @@ -174,6 +174,7 @@ if ((is64bit PCI_MAPREG_MEM64_SIZE(wmask) == 0) || (!is64bit PCI_MAPREG_MEM_SIZE(mask) == 0)) { + aprint_debug(pci_mem_find: void region\n); return 1; }
CVS commit: src/external/bsd/wpa/dist/src/ap
Module Name:src Committed By: plunky Date: Sun Feb 27 18:07:43 UTC 2011 Modified Files: src/external/bsd/wpa/dist/src/ap: wpa_auth.c Log Message: avoid preprocessor directives in macro arguments has been committed upstream at http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=blobdiff;f=src/ap/wpa_auth.c;h=7ad60a23d999082a00e9be672d4b55a19c46a4bb;hp=13e8ec43895a67d6d825b5c2a199499232dbafcb;hb=8ce58ceb250f101ee66682a4149cc652a30a74da;hpb=73304dbf65c3da859b1c51e6be32457e9ec9932d To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/wpa/dist/src/ap/wpa_auth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/wpa/dist/src/ap/wpa_auth.c diff -u src/external/bsd/wpa/dist/src/ap/wpa_auth.c:1.1.1.1 src/external/bsd/wpa/dist/src/ap/wpa_auth.c:1.2 --- src/external/bsd/wpa/dist/src/ap/wpa_auth.c:1.1.1.1 Wed Aug 4 10:18:00 2010 +++ src/external/bsd/wpa/dist/src/ap/wpa_auth.c Sun Feb 27 18:07:42 2011 @@ -2327,19 +2327,21 @@ { int len = 0, ret; char pmkid_txt[PMKID_LEN * 2 + 1]; +#ifdef CONFIG_RSN_PREAUTH + const int preauth = 1; +#else /* CONFIG_RSN_PREAUTH */ + const int preauth = 0; +#endif /* CONFIG_RSN_PREAUTH */ if (wpa_auth == NULL) return len; ret = os_snprintf(buf + len, buflen - len, dot11RSNAOptionImplemented=TRUE\n -#ifdef CONFIG_RSN_PREAUTH - dot11RSNAPreauthenticationImplemented=TRUE\n -#else /* CONFIG_RSN_PREAUTH */ - dot11RSNAPreauthenticationImplemented=FALSE\n -#endif /* CONFIG_RSN_PREAUTH */ + dot11RSNAPreauthenticationImplemented=%s\n dot11RSNAEnabled=%s\n dot11RSNAPreauthenticationEnabled=%s\n, + wpa_bool_txt(preauth), wpa_bool_txt(wpa_auth-conf.wpa WPA_PROTO_RSN), wpa_bool_txt(wpa_auth-conf.rsn_preauth)); if (ret 0 || (size_t) ret = buflen - len)
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Sun Feb 27 18:10:25 UTC 2011 Modified Files: src/sys/dev/pci: pci.c Log Message: follow the lead of genfb_pci and call pci_mapreg_probe before pci_mapreg_info To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/dev/pci/pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci.c diff -u src/sys/dev/pci/pci.c:1.133 src/sys/dev/pci/pci.c:1.134 --- src/sys/dev/pci/pci.c:1.133 Thu Feb 24 03:37:02 2011 +++ src/sys/dev/pci/pci.c Sun Feb 27 18:10:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.133 2011/02/24 03:37:02 macallan Exp $ */ +/* $NetBSD: pci.c,v 1.134 2011/02/27 18:10:25 jmcneill Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.133 2011/02/24 03:37:02 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.134 2011/02/27 18:10:25 jmcneill Exp $); #include opt_pci.h @@ -302,10 +302,13 @@ sizeof(sc-PCI_SC_DEVICESC(device, function).c_range)); i = 0; for (bar = PCI_MAPREG_START; bar PCI_MAPREG_END; bar += width) { - int type = pci_mapreg_type(pc, tag, bar); struct pci_range *r; + pcireg_t type; width = 4; + if (pci_mapreg_probe(pc, tag, bar, type) == 0) + continue; + if (PCI_MAPREG_TYPE(type) == PCI_MAPREG_TYPE_MEM) { if (PCI_MAPREG_MEM_TYPE(type) == PCI_MAPREG_MEM_TYPE_64BIT)
CVS commit: src/sys
Module Name:src Committed By: jruoho Date: Sun Feb 27 18:32:54 UTC 2011 Modified Files: src/sys/arch/x86/acpi: acpi_cpu_md.c src/sys/dev/acpi: acpi_cpu.c acpi_cpu.h Log Message: Provide MD wrappers for match and attach. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/acpi/acpi_cpu_md.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/acpi/acpi_cpu.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/acpi_cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/acpi/acpi_cpu_md.c diff -u src/sys/arch/x86/acpi/acpi_cpu_md.c:1.47 src/sys/arch/x86/acpi/acpi_cpu_md.c:1.48 --- src/sys/arch/x86/acpi/acpi_cpu_md.c:1.47 Sun Feb 27 17:27:28 2011 +++ src/sys/arch/x86/acpi/acpi_cpu_md.c Sun Feb 27 18:32:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_md.c,v 1.47 2011/02/27 17:27:28 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_md.c,v 1.48 2011/02/27 18:32:54 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -27,10 +27,11 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.47 2011/02/27 17:27:28 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_md.c,v 1.48 2011/02/27 18:32:54 jruoho Exp $); #include sys/param.h #include sys/bus.h +#include sys/device.h #include sys/kcore.h #include sys/sysctl.h #include sys/xcall.h @@ -118,6 +119,25 @@ static bool acpicpu_pstate_status = false; static struct sysctllog *acpicpu_log = NULL; +struct cpu_info * +acpicpu_md_match(device_t parent, cfdata_t match, void *aux) +{ + struct cpufeature_attach_args *cfaa = aux; + + if (strcmp(cfaa-name, frequency) != 0) + return NULL; + + return cfaa-ci; +} + +struct cpu_info * +acpicpu_md_attach(device_t parent, device_t self, void *aux) +{ + struct cpufeature_attach_args *cfaa = aux; + + return cfaa-ci; +} + uint32_t acpicpu_md_cap(void) { Index: src/sys/dev/acpi/acpi_cpu.c diff -u src/sys/dev/acpi/acpi_cpu.c:1.30 src/sys/dev/acpi/acpi_cpu.c:1.31 --- src/sys/dev/acpi/acpi_cpu.c:1.30 Sun Feb 27 17:10:33 2011 +++ src/sys/dev/acpi/acpi_cpu.c Sun Feb 27 18:32:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu.c,v 1.30 2011/02/27 17:10:33 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.c,v 1.31 2011/02/27 18:32:53 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.30 2011/02/27 17:10:33 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.31 2011/02/27 18:32:53 jruoho Exp $); #include sys/param.h #include sys/cpu.h @@ -85,26 +85,32 @@ static int acpicpu_match(device_t parent, cfdata_t match, void *aux) { - struct cpufeature_attach_args *cfaa = aux; + struct cpu_info *ci; if (acpi_softc == NULL) return 0; - if (strcmp(cfaa-name, frequency) != 0) + ci = acpicpu_md_match(parent, match, aux); + + if (ci == NULL) return 0; - return acpicpu_find(cfaa-ci, NULL); + return acpicpu_find(ci, NULL); } static void acpicpu_attach(device_t parent, device_t self, void *aux) { struct acpicpu_softc *sc = device_private(self); - struct cpufeature_attach_args *cfaa = aux; - struct cpu_info *ci = cfaa-ci; + struct cpu_info *ci; cpuid_t id; int rv; + ci = acpicpu_md_attach(parent, self, aux); + + if (ci == NULL) + return; + sc-sc_ci = ci; sc-sc_dev = self; sc-sc_cold = true; @@ -409,7 +415,7 @@ if (ptr != NULL) *ptr = ad; - return 10; /* Beat est(4) and powernow(4). */ + return 10; } static uint32_t Index: src/sys/dev/acpi/acpi_cpu.h diff -u src/sys/dev/acpi/acpi_cpu.h:1.33 src/sys/dev/acpi/acpi_cpu.h:1.34 --- src/sys/dev/acpi/acpi_cpu.h:1.33 Fri Feb 25 20:59:37 2011 +++ src/sys/dev/acpi/acpi_cpu.h Sun Feb 27 18:32:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu.h,v 1.33 2011/02/25 20:59:37 jruoho Exp $ */ +/* $NetBSD: acpi_cpu.h,v 1.34 2011/02/27 18:32:53 jruoho Exp $ */ /*- * Copyright (c) 2010, 2011 Jukka Ruohonen jruoho...@iki.fi @@ -230,45 +230,48 @@ bool sc_cold; }; -void acpicpu_cstate_attach(device_t); -int acpicpu_cstate_detach(device_t); -void acpicpu_cstate_start(device_t); -bool acpicpu_cstate_suspend(device_t); -bool acpicpu_cstate_resume(device_t); -void acpicpu_cstate_callback(void *); -void acpicpu_cstate_idle(void); - -void acpicpu_pstate_attach(device_t); -int acpicpu_pstate_detach(device_t); -void acpicpu_pstate_start(device_t); -bool acpicpu_pstate_suspend(device_t); -bool acpicpu_pstate_resume(device_t); -void acpicpu_pstate_callback(void *); -int acpicpu_pstate_get(struct acpicpu_softc *, uint32_t *); -int acpicpu_pstate_set(struct acpicpu_softc *, uint32_t); - -void acpicpu_tstate_attach(device_t); -int acpicpu_tstate_detach(device_t); -void acpicpu_tstate_start(device_t); -bool acpicpu_tstate_suspend(device_t); -bool acpicpu_tstate_resume(device_t); -void acpicpu_tstate_callback(void *); -int
CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Sun Feb 27 23:06:41 UTC 2011 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: Check for bogus flags to access() up front. Otherwise we end up calling VOP_ACCESS with flags 0 and something asserts deep in the bowels of kauth. PR 44648 from Taylor Campbell. (I moved the check earlier relative to the suggested patch.) Pullup candidate. To generate a diff of this commit: cvs rdiff -u -r1.414 -r1.415 src/sys/kern/vfs_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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.414 src/sys/kern/vfs_syscalls.c:1.415 --- src/sys/kern/vfs_syscalls.c:1.414 Thu Jan 13 07:25:50 2011 +++ src/sys/kern/vfs_syscalls.c Sun Feb 27 23:06:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.414 2011/01/13 07:25:50 pooka Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.415 2011/02/27 23:06:40 dholland Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.414 2011/01/13 07:25:50 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.415 2011/02/27 23:06:40 dholland Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -2484,6 +2484,11 @@ struct pathbuf *pb; struct nameidata nd; + if ((SCARG(uap, flags) ~(R_OK | W_OK | X_OK)) != 0) { + /* nonsense flags */ + return EINVAL; + } + error = pathbuf_copyin(SCARG(uap, path), pb); if (error) { return error;
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Mon Feb 28 00:12:16 UTC 2011 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: don't depend on F_OK being 0. To generate a diff of this commit: cvs rdiff -u -r1.415 -r1.416 src/sys/kern/vfs_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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.415 src/sys/kern/vfs_syscalls.c:1.416 --- src/sys/kern/vfs_syscalls.c:1.415 Sun Feb 27 18:06:40 2011 +++ src/sys/kern/vfs_syscalls.c Sun Feb 27 19:12:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.415 2011/02/27 23:06:40 dholland Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.416 2011/02/28 00:12:15 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.415 2011/02/27 23:06:40 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.416 2011/02/28 00:12:15 christos Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -2484,7 +2484,7 @@ struct pathbuf *pb; struct nameidata nd; - if ((SCARG(uap, flags) ~(R_OK | W_OK | X_OK)) != 0) { + if ((SCARG(uap, flags) ~(F_OK | R_OK | W_OK | X_OK)) != 0) { /* nonsense flags */ return EINVAL; }
CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Mon Feb 28 03:23:44 UTC 2011 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: Revert previous, which doesn't cover all the cases if F_OK isn't 0, and just CTASSERT that it is, as that's not remotely likely to change. Per source-changes-d; ok by Christos. To generate a diff of this commit: cvs rdiff -u -r1.416 -r1.417 src/sys/kern/vfs_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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.416 src/sys/kern/vfs_syscalls.c:1.417 --- src/sys/kern/vfs_syscalls.c:1.416 Mon Feb 28 00:12:15 2011 +++ src/sys/kern/vfs_syscalls.c Mon Feb 28 03:23:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.416 2011/02/28 00:12:15 christos Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.417 2011/02/28 03:23:44 dholland Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.416 2011/02/28 00:12:15 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.417 2011/02/28 03:23:44 dholland Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -2484,7 +2484,8 @@ struct pathbuf *pb; struct nameidata nd; - if ((SCARG(uap, flags) ~(F_OK | R_OK | W_OK | X_OK)) != 0) { + CTASSERT(F_OK == 0); + if ((SCARG(uap, flags) ~(R_OK | W_OK | X_OK)) != 0) { /* nonsense flags */ return EINVAL; }
CVS commit: src/tests/fs/vfs
Module Name:src Committed By: pooka Date: Mon Feb 28 03:40:45 UTC 2011 Modified Files: src/tests/fs/vfs: t_vnops.c Log Message: Add simple test case for access(2), including panicky scenario from PR kern/44648. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/fs/vfs/t_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/vfs/t_vnops.c diff -u src/tests/fs/vfs/t_vnops.c:1.14 src/tests/fs/vfs/t_vnops.c:1.15 --- src/tests/fs/vfs/t_vnops.c:1.14 Tue Feb 22 21:23:19 2011 +++ src/tests/fs/vfs/t_vnops.c Mon Feb 28 03:40:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_vnops.c,v 1.14 2011/02/22 21:23:19 yamt Exp $ */ +/* $NetBSD: t_vnops.c,v 1.15 2011/02/28 03:40:45 pooka Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -705,6 +705,30 @@ FSTEST_EXIT(); } +static void +access_simple(const atf_tc_t *tc, const char *mp) +{ + int fd; + int tmode; + + FSTEST_ENTER(); + RL(fd = rump_sys_open(tfile, O_CREAT | O_RDWR, 0777)); + RL(rump_sys_close(fd)); + +#define ALLACC (F_OK | X_OK | W_OK | R_OK) + if (FSTYPE_SYSVBFS(tc) || FSTYPE_MSDOS(tc)) + tmode = F_OK; + else + tmode = ALLACC; + + RL(rump_sys_access(tfile, tmode)); + + /* PR kern/44648 */ + ATF_REQUIRE_ERRNO(EINVAL, rump_sys_access(tfile, ALLACC+1) == -1); +#undef ALLACC + FSTEST_EXIT(); +} + ATF_TC_FSAPPLY(lookup_simple, simple lookup (./.. on root)); ATF_TC_FSAPPLY(lookup_complex, lookup of non-dot entries); ATF_TC_FSAPPLY(dir_simple, mkdir/rmdir); @@ -719,6 +743,7 @@ ATF_TC_FSAPPLY(attrs, check setting attributes works); ATF_TC_FSAPPLY(fcntl_lock, check fcntl F_SETLK); ATF_TC_FSAPPLY(fcntl_getlock_pids,fcntl F_GETLK w/ many procs, PR kern/44494); +ATF_TC_FSAPPLY(access_simple, access(2)); ATF_TP_ADD_TCS(tp) { @@ -737,6 +762,7 @@ ATF_TP_FSAPPLY(attrs); ATF_TP_FSAPPLY(fcntl_lock); ATF_TP_FSAPPLY(fcntl_getlock_pids); + ATF_TP_FSAPPLY(access_simple); return atf_no_error(); }
CVS commit: src/lib/libc/sys
Module Name:src Committed By: dholland Date: Mon Feb 28 04:03:00 UTC 2011 Modified Files: src/lib/libc/sys: mlock.2 Log Message: Improve discussion of alignment and rounding per PR 33527. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/lib/libc/sys/mlock.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/mlock.2 diff -u src/lib/libc/sys/mlock.2:1.18 src/lib/libc/sys/mlock.2:1.19 --- src/lib/libc/sys/mlock.2:1.18 Thu May 13 10:20:58 2004 +++ src/lib/libc/sys/mlock.2 Mon Feb 28 04:03:00 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: mlock.2,v 1.18 2004/05/13 10:20:58 wiz Exp $ +.\ $NetBSD: mlock.2,v 1.19 2011/02/28 04:03:00 dholland Exp $ .\ .\ Copyright (c) 1993 .\ The Regents of the University of California. All rights reserved. @@ -59,14 +59,7 @@ call unlocks pages previously locked by one or more .Nm mlock calls. -For both, the -.Fa addr -parameter should be aligned to a multiple of the page size. -If the -.Fa len -parameter is not a multiple of the page size, it will be rounded up -to be so. -The entire range must be allocated. +The entire range of memory must be allocated. .Pp After an .Nm mlock @@ -99,6 +92,14 @@ the per-process .Li RLIMIT_MEMLOCK resource limit. +.Pp +Portable code should ensure that the +.Fa addr +and +.Fa len +parameters are aligned to a multiple of the page size, even though the +.Nx +implementation will round as necessary. .Sh RETURN VALUES A return value of 0 indicates that the call succeeded and all pages in the range have either been locked or unlocked. @@ -112,7 +113,10 @@ will fail if: .Bl -tag -width Er .It Bq Er EINVAL -The address given is not page aligned or the length is negative. +The length is negative. +.It Bq Er EINVAL +The address or length given is not page aligned and the implementation +does not round. .It Bq Er EAGAIN Locking the indicated range would exceed either the system or per-process limit for locked memory. @@ -129,7 +133,10 @@ will fail if: .Bl -tag -width Er .It Bq Er EINVAL -The address given is not page aligned or the length is negative. +The length is negative. +.It Bq Er EINVAL +The address or length given is not page aligned and the implementation +does not round. .It Bq Er ENOMEM Some portion of the indicated address range is not allocated. Some portion of the indicated address range is not locked.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Mon Feb 28 07:17:02 UTC 2011 Modified Files: src/lib/libc/sys: mlock.2 Log Message: Merge EINVAL descriptions; sort errors alphabetically; bump date. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/sys/mlock.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/mlock.2 diff -u src/lib/libc/sys/mlock.2:1.19 src/lib/libc/sys/mlock.2:1.20 --- src/lib/libc/sys/mlock.2:1.19 Mon Feb 28 04:03:00 2011 +++ src/lib/libc/sys/mlock.2 Mon Feb 28 07:17:02 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: mlock.2,v 1.19 2011/02/28 04:03:00 dholland Exp $ +.\ $NetBSD: mlock.2,v 1.20 2011/02/28 07:17:02 wiz Exp $ .\ .\ Copyright (c) 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)mlock.2 8.2 (Berkeley) 12/11/93 .\ -.Dd June 2, 1993 +.Dd February 28, 2011 .Dt MLOCK 2 .Os .Sh NAME @@ -112,14 +112,12 @@ .Fn mlock will fail if: .Bl -tag -width Er -.It Bq Er EINVAL -The length is negative. -.It Bq Er EINVAL -The address or length given is not page aligned and the implementation -does not round. .It Bq Er EAGAIN Locking the indicated range would exceed either the system or per-process limit for locked memory. +.It Bq Er EINVAL +The length is negative; or the address or length given is not page +aligned and the implementation does not round. .It Bq Er ENOMEM Some portion of the indicated address range is not allocated. There was an error faulting/mapping a page. @@ -133,10 +131,8 @@ will fail if: .Bl -tag -width Er .It Bq Er EINVAL -The length is negative. -.It Bq Er EINVAL -The address or length given is not page aligned and the implementation -does not round. +The length is negative; or the address or length given is not page +aligned and the implementation does not round. .It Bq Er ENOMEM Some portion of the indicated address range is not allocated. Some portion of the indicated address range is not locked.