Re: CVS commit: src/usr.bin/quota

2012-01-31 Thread Manuel Bouyer
On Mon, Jan 30, 2012 at 06:14:43AM +, David A. Holland wrote:
 Module Name:  src
 Committed By: dholland
 Date: Mon Jan 30 06:14:43 UTC 2012
 
 Modified Files:
   src/usr.bin/quota: quotautil.c quotautil.h
 
 Log Message:
 Remove stray p in identifier name. This has (as far as I can tell)
 prevented quotacheck and other old-style quota bits from working since
 last March.

just to make it clear: this bugs only shows up if you use userquota/groupquota
in fstab without an explicit quota file name; that's probably why it was
not noticed.

-- 
Manuel Bouyer bou...@antioche.eu.org
 NetBSD: 26 ans d'experience feront toujours la difference
--


Re: CVS commit: src/sys/kern

2012-01-31 Thread David Young
On Tue, Jan 31, 2012 at 07:11:38PM +, Alexander Nasonov wrote:
 Module Name:  src
 Committed By: alnsn
 Date: Tue Jan 31 19:11:38 UTC 2012
 
 Modified Files:
   src/sys/kern: subr_pcq.c
 
 Log Message:
 Replace offsetof(pcq_t, pcq_items[nitems]) with sizeof(pcq_t) + sizeof(void 
 *[nitems]).

Yuck. The offsetof() way was much more readable.  Please put it back
the old way.  If you have to, provide and use a runtime_offsetof() that
DTRT.

Dave

-- 
David Young
dyo...@pobox.comUrbana, IL(217) 721-9981


Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
David Young wrote:
 Yuck. The offsetof() way was much more readable.

Yes, it's more readable but it's not standard C99.
And it's confusing to use offsetof when you want to use sizeof.

 Please put it back the old way.
 If you have to, provide and use a runtime_offsetof() that
 DTRT.

DTRT TWW ;-)

What about something like this (untested)?

/*
 * Return a size of a structure s with flexible-array member m
 * with n elements.
 */
#define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n))


and use like this:

sizeof_fam(struct pcq, pcq_items, nitems);

Alex


Re: CVS commit: src/sys/kern

2012-01-31 Thread Joerg Sonnenberger
On Tue, Jan 31, 2012 at 07:32:52PM +, Alexander Nasonov wrote:
 What about something like this (untested)?
 
 /*
  * Return a size of a structure s with flexible-array member m
  * with n elements.
  */
 #define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n))

That's still not necessarily optimal, depending on the padding rules of
the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]).

Joerg


Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Joerg Sonnenberger wrote:
 On Tue, Jan 31, 2012 at 07:32:52PM +, Alexander Nasonov wrote:
  #define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n))
 
 That's still not necessarily optimal, depending on the padding rules of
 the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]).

I'm aware of this but I was merely following examples from the standard.

More specifically I was following DR 282 (flexible array members 
struct padding) which was incorporated into TC2.

http://std.dkuug.dk/jtc1/sc22/wg14/www/docs/dr_282.htm

I can add a comment about padding to sizeof_fam. If there is no padding,
my and your expression should return same values.

Alex


Re: CVS commit: src/sys/kern

2012-01-31 Thread David Laight
On Tue, Jan 31, 2012 at 07:50:26PM +, Alexander Nasonov wrote:
 Joerg Sonnenberger wrote:
  On Tue, Jan 31, 2012 at 07:32:52PM +, Alexander Nasonov wrote:
   #define sizeof_fam(s, m, n) (sizeof(s) + sizeof(((s *)NULL)-m[0]) * (n))
  
  That's still not necessarily optimal, depending on the padding rules of
  the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]).
 
 I'm aware of this but I was merely following examples from the standard.
 
 More specifically I was following DR 282 (flexible array members 
 struct padding) which was incorporated into TC2.
 
 http://std.dkuug.dk/jtc1/sc22/wg14/www/docs/dr_282.htm
 
 I can add a comment about padding to sizeof_fam. If there is no padding,
 my and your expression should return same values.

And if there is padding, and it is after the last field (and a few
other clauses) your scheme will allocate a longer buffer than needed.

The advantage of Joerg's is that you don't have to 'know' the type of
the member.

Sudden barin explosion - how about (untested):
#define sizeof_var_struct(s, m, c) \
offsetof(s, m[0]) + (c) * (offsetof(s, m[1]) -  offsetof(s, m[0]))

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Joerg Sonnenberger wrote:
 That's still not necessarily optimal, depending on the padding rules of
 the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]).

Using m[0] inside offsetof is non-standard but I think this will work:

offsetof(s, m) + n * sizeof((s*)NULL-m[0]).

Alex


Re: CVS commit: src/sys/kern

2012-01-31 Thread David Laight
On Tue, Jan 31, 2012 at 09:51:17PM +, Alexander Nasonov wrote:
 Joerg Sonnenberger wrote:
  That's still not necessarily optimal, depending on the padding rules of
  the platform. You want to do offsetof(s, m[0]) + n * sizeof((s*)NULL-m[0]).
 
 Using m[0] inside offsetof is non-standard but I think this will work:
 
 offsetof(s, m) + n * sizeof((s*)NULL-m[0]).

I don't believe there is a problem using m[0], just m[non-constant-expr].

OTOH 'sizeof (s *)0-m[0]' might be deemed invalid (because it has
an inferred dereference of NULL.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
David Laight wrote:
 I don't believe there is a problem using m[0], just m[non-constant-expr].

Practically speaking, m[0] is not a problem but the standard says

... to the structure member (designated by member-designator), ...
 ^^

 OTOH 'sizeof (s *)0-m[0]' might be deemed invalid (because it has
 an inferred dereference of NULL.

Oh yes. I can change it to:

extern void *foo(void);

and then sizeof(((s *)foo())-m[0]) but NULL should work too.

So, if we reached a consensus on this, where should I add the macro?

Alex



Re: CVS commit: src/sys/kern

2012-01-31 Thread Warner Losh

On Jan 31, 2012, at 3:53 PM, Alexander Nasonov wrote:
 David Laight wrote:
 I don't believe there is a problem using m[0], just m[non-constant-expr].
 
 Practically speaking, m[0] is not a problem but the standard says
 
 ... to the structure member (designated by member-designator), ...
 ^^
 
 OTOH 'sizeof (s *)0-m[0]' might be deemed invalid (because it has
 an inferred dereference of NULL.
 
 Oh yes. I can change it to:
 
 extern void *foo(void);
 
 and then sizeof(((s *)foo())-m[0]) but NULL should work too.
 
 So, if we reached a consensus on this, where should I add the macro?

There's no NULL dereference, so it is fine (completely standards conforming).  
The sizeof operator is a compile time construct that evaluates its argument for 
its type only, so no dereference is happening, so any value for the pointer is 
OK.  In the absence of a local variable, 0 is just as valid as anything else.

Warner



Re: CVS commit: src/sys/kern

2012-01-31 Thread Valeriy E. Ushakov
On Tue, Jan 31, 2012 at 22:53:37 +, Alexander Nasonov wrote:

 David Laight wrote:
  I don't believe there is a problem using m[0], just m[non-constant-expr].
 
 Practically speaking, m[0] is not a problem but the standard says
 
 ... to the structure member (designated by member-designator), ...
  ^^

Well, the standard also says that:

   The type and member designator shall be such that given

   static type t;

   then  the  expression (t.member-designator) evaluates to an
   address constant.  (If the specified member is a  bit-field,
   the behavior is undefined.)

Note that the standard doesn't actually bother to define
memeber-designator formally, but see 6.7.8 Initialization.  We can
haggle about the finer points of specific wording used in the relevant
paragraphs, but I think the intended meaning is pretty clear.

-uwe


CVS commit: src/dist/ipf/lib

2012-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 31 08:43:45 UTC 2012

Modified Files:
src/dist/ipf/lib: printactivenat.c printaps.c

Log Message:
Fix printf formats (those who can't decide wether to use casts or PRI*
macros do both in bogus combination)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/dist/ipf/lib/printactivenat.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/dist/ipf/lib/printaps.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/ipf/lib/printactivenat.c
diff -u src/dist/ipf/lib/printactivenat.c:1.1.1.4 src/dist/ipf/lib/printactivenat.c:1.2
--- src/dist/ipf/lib/printactivenat.c:1.1.1.4	Mon Jan 30 16:03:22 2012
+++ src/dist/ipf/lib/printactivenat.c	Tue Jan 31 08:43:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: printactivenat.c,v 1.1.1.4 2012/01/30 16:03:22 darrenr Exp $	*/
+/*	$NetBSD: printactivenat.c,v 1.2 2012/01/31 08:43:44 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -113,7 +113,7 @@ printactivenat(nat, opts, ticks)
 		PRINTF(\tifp %s, getifname(nat-nat_ifps[0]));
 		PRINTF(,%s , getifname(nat-nat_ifps[1]));
 #ifdef	USE_QUAD_T
-		PRINTF(bytes %PRIu64/%PRIu64 pkts %PRIu64/%PRIu64,
+		PRINTF(bytes %llu/%llu pkts %llu/%llu,
 			(unsigned long long)nat-nat_bytes[0],
 			(unsigned long long)nat-nat_bytes[1],
 			(unsigned long long)nat-nat_pkts[0],

Index: src/dist/ipf/lib/printaps.c
diff -u src/dist/ipf/lib/printaps.c:1.1.1.3 src/dist/ipf/lib/printaps.c:1.2
--- src/dist/ipf/lib/printaps.c:1.1.1.3	Mon Jan 30 16:03:22 2012
+++ src/dist/ipf/lib/printaps.c	Tue Jan 31 08:43:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: printaps.c,v 1.1.1.3 2012/01/30 16:03:22 darrenr Exp $	*/
+/*	$NetBSD: printaps.c,v 1.2 2012/01/31 08:43:44 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -35,7 +35,7 @@ printaps(aps, opts, proto)
 	PRINTF(\tproxy %s/%d use %d flags %x\n, apr.apr_label,
 		apr.apr_p, apr.apr_ref, apr.apr_flags);
 #ifdef	USE_QUAD_T
-	PRINTF(%PRIu64 pkts %PRIu64, (unsigned long long)ap.aps_bytes,
+	PRINTF(%llu pkts %llu, (unsigned long long)ap.aps_bytes,
 		(unsigned long long)ap.aps_pkts);
 #else
 	PRINTF(%lu pkts %lu, ap.aps_bytes, ap.aps_pkts);



CVS commit: src/dist/ipf/tools

2012-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 31 08:57:36 UTC 2012

Modified Files:
src/dist/ipf/tools: ipfstat.c

Log Message:
More printf format fixes


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/dist/ipf/tools/ipfstat.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/ipf/tools/ipfstat.c
diff -u src/dist/ipf/tools/ipfstat.c:1.19 src/dist/ipf/tools/ipfstat.c:1.20
--- src/dist/ipf/tools/ipfstat.c:1.19	Mon Jan 30 16:12:05 2012
+++ src/dist/ipf/tools/ipfstat.c	Tue Jan 31 08:57:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipfstat.c,v 1.19 2012/01/30 16:12:05 darrenr Exp $	*/
+/*	$NetBSD: ipfstat.c,v 1.20 2012/01/31 08:57:36 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -834,13 +834,13 @@ static void printlivelist(fiop, out, set
 
 		if (opts  (OPT_HITS|OPT_VERBOSE))
 #ifdef	USE_QUAD_T
-			PRINTF(%PRIu64 , (unsigned long long) fp-fr_hits);
+			PRINTF(%llu , (unsigned long long) fp-fr_hits);
 #else
 			PRINTF(%lu , fp-fr_hits);
 #endif
 		if (opts  (OPT_ACCNT|OPT_VERBOSE))
 #ifdef	USE_QUAD_T
-			PRINTF(%PRIu64 , (unsigned long long) fp-fr_bytes);
+			PRINTF(%llu , (unsigned long long) fp-fr_bytes);
 #else
 			PRINTF(%lu , fp-fr_bytes);
 #endif
@@ -951,13 +951,13 @@ static void printdeadlist(fiop, out, set
 
 		if (opts  (OPT_HITS|OPT_VERBOSE))
 #ifdef	USE_QUAD_T
-			PRINTF(%PRIu64 , (unsigned long long) fb.fr_hits);
+			PRINTF(%llu , (unsigned long long) fb.fr_hits);
 #else
 			PRINTF(%lu , fb.fr_hits);
 #endif
 		if (opts  (OPT_ACCNT|OPT_VERBOSE))
 #ifdef	USE_QUAD_T
-			PRINTF(%PRIu64 , (unsigned long long) fb.fr_bytes);
+			PRINTF(%llu , (unsigned long long) fb.fr_bytes);
 #else
 			PRINTF(%lu , fb.fr_bytes);
 #endif
@@ -1772,7 +1772,7 @@ static void showauthstates(asp)
 	auth.igi_data = fra;
 
 #ifdef	USE_QUAD_T
-	printf(Authorisation hits: %PRIu64\tmisses %PRIu64\n,
+	printf(Authorisation hits: %llu\tmisses %llu\n,
 		(unsigned long long) asp-fas_hits,
 		(unsigned long long) asp-fas_miss);
 #else



CVS commit: src/dist/ipf/tools

2012-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 31 09:06:12 UTC 2012

Modified Files:
src/dist/ipf/tools: ipftest.c

Log Message:
More printf format fixes


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/dist/ipf/tools/ipftest.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/ipf/tools/ipftest.c
diff -u src/dist/ipf/tools/ipftest.c:1.1.1.7 src/dist/ipf/tools/ipftest.c:1.2
--- src/dist/ipf/tools/ipftest.c:1.1.1.7	Mon Jan 30 16:03:47 2012
+++ src/dist/ipf/tools/ipftest.c	Tue Jan 31 09:06:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipftest.c,v 1.1.1.7 2012/01/30 16:03:47 darrenr Exp $	*/
+/*	$NetBSD: ipftest.c,v 1.2 2012/01/31 09:06:12 martin Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -736,7 +736,7 @@ void dumprules(rulehead)
 
 	for (fr = rulehead; fr != NULL; fr = fr-fr_next) {
 #ifdef	USE_QUAD_T
-		printf(%PRIu64 ,(unsigned long long)fr-fr_hits);
+		printf(%llu ,(unsigned long long)fr-fr_hits);
 #else
 		printf(%ld , fr-fr_hits);
 #endif



CVS commit: src/external/bsd/openresolv/dist

2012-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jan 31 09:19:58 UTC 2012

Update of /cvsroot/src/external/bsd/openresolv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv1894

Log Message:
Import openresolv-3.4.6 with the following change from 3.4.5
* dnsmasq subscriber correctly sets IPv6 domain specific servers over dbus

Status:

Vendor Tag: roy
Release Tags:   openresolv-3-4-6

U src/external/bsd/openresolv/dist/README
U src/external/bsd/openresolv/dist/resolvconf.in
U src/external/bsd/openresolv/dist/resolvconf.8.in
U src/external/bsd/openresolv/dist/resolvconf.conf.5.in
U src/external/bsd/openresolv/dist/libc.in
U src/external/bsd/openresolv/dist/dnsmasq.in
U src/external/bsd/openresolv/dist/named.in
U src/external/bsd/openresolv/dist/pdnsd.in
U src/external/bsd/openresolv/dist/unbound.in

No conflicts created by this import



CVS commit: src/external/bsd/dhcpcd/dist

2012-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jan 31 09:39:49 UTC 2012

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv10558

Log Message:
Import dhcpcd-5.5.1 with the following changes:
* Don't start IPv6 RS if disabled globally
* Allow dhcpcd to run on a read only filesystem
* Don't attempt to run the script if an empty string or /dev/null
* Stop truncating the netmask sockaddr on routing messages for BSD

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-5-1

U src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/ipv6rs.c
U src/external/bsd/dhcpcd/dist/net.c
U src/external/bsd/dhcpcd/dist/signals.c
U src/external/bsd/dhcpcd/dist/configure.c
U src/external/bsd/dhcpcd/dist/bpf.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/configure.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
U src/external/bsd/dhcpcd/dist/ipv6rs.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/signals.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

No conflicts created by this import



CVS commit: src/sys/dist/ipf/netinet

2012-01-31 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Tue Jan 31 09:41:37 UTC 2012

Modified Files:
src/sys/dist/ipf/netinet: fil.c

Log Message:
PR bin/45894
ipftest core dumps when running tests


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dist/ipf/netinet/fil.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/dist/ipf/netinet/fil.c
diff -u src/sys/dist/ipf/netinet/fil.c:1.47 src/sys/dist/ipf/netinet/fil.c:1.48
--- src/sys/dist/ipf/netinet/fil.c:1.47	Mon Jan 30 16:12:49 2012
+++ src/sys/dist/ipf/netinet/fil.c	Tue Jan 31 09:41:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fil.c,v 1.47 2012/01/30 16:12:49 darrenr Exp $	*/
+/*	$NetBSD: fil.c,v 1.48 2012/01/31 09:41:37 darrenr Exp $	*/
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.47 2012/01/30 16:12:49 darrenr Exp $);
+__KERNEL_RCSID(0, $NetBSD: fil.c,v 1.48 2012/01/31 09:41:37 darrenr Exp $);
 #else
 static const char sccsid[] = @(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed;
 static const char rcsid[] = @(#)Id: fil.c,v 2.443.2.36 2012/01/29 05:30:35 darrenr Exp;
@@ -3195,7 +3195,9 @@ finished:
 	if (!FR_ISPASS(pass)) {
 		LBUMP(ipf_stats[out].fr_block);
 		if (*mp != NULL) {
+#ifdef _KERNEL
 			FREE_MB_T(*mp);
+#endif
 			m = *mp = NULL;
 		}
 	} else {



CVS commit: src/sys/netatalk

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 09:53:44 UTC 2012

Modified Files:
src/sys/netatalk: aarp.c ddp_output.c

Log Message:
Fix AppleTalk name registration, as discussed on the port-macppc list
http://mail-index.netbsd.org/port-macppc/2010/07/09/msg001119.html
and in PR kern/44412, by looping back ddp broadcasts.

Patch submitted by David Riley against netbsd-5, adaptation for
-current and minor KNF touchup by me.

Needs to be pulled up to netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netatalk/aarp.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netatalk/ddp_output.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/netatalk/aarp.c
diff -u src/sys/netatalk/aarp.c:1.35 src/sys/netatalk/aarp.c:1.36
--- src/sys/netatalk/aarp.c:1.35	Sun May  8 13:51:31 2011
+++ src/sys/netatalk/aarp.c	Tue Jan 31 09:53:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $	*/
+/*	$NetBSD: aarp.c,v 1.36 2012/01/31 09:53:44 hauke Exp $	*/
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.36 2012/01/31 09:53:44 hauke Exp $);
 
 #include opt_mbuftrace.h
 
@@ -222,11 +222,19 @@ aarpwhohas(struct ifnet *ifp, const stru
 		ea-aarp_tpa = sat-sat_addr.s_node;
 	}
 
+	/* If we are talking to ourselves, use the loopback interface. */
+	if (AA_SAT(aa)-sat_addr.s_net == sat-sat_addr.s_net 
+	AA_SAT(aa)-sat_addr.s_node == sat-sat_addr.s_node)
+		ifp = lo0ifp;
+
 #ifdef NETATALKDEBUG
-	printf(aarp: sending request via %u.%u seaking %u.%u\n,
-	ntohs(AA_SAT(aa)-sat_addr.s_net), AA_SAT(aa)-sat_addr.s_node,
-	ntohs(sat-sat_addr.s_net), sat-sat_addr.s_node);
-#endif	/* NETATALKDEBUG */
+	printf(aarp: sending request via %u.%u through %s seeking %u.%u\n,
+	ntohs(AA_SAT(aa)-sat_addr.s_net),
+	AA_SAT(aa)-sat_addr.s_node,
+	ifp-if_xname,
+	ntohs(sat-sat_addr.s_net),
+	sat-sat_addr.s_node);
+#endif /* NETATALKDEBUG */
 
 	sa.sa_len = sizeof(struct sockaddr);
 	sa.sa_family = AF_UNSPEC;

Index: src/sys/netatalk/ddp_output.c
diff -u src/sys/netatalk/ddp_output.c:1.15 src/sys/netatalk/ddp_output.c:1.16
--- src/sys/netatalk/ddp_output.c:1.15	Sun Jul 17 20:54:53 2011
+++ src/sys/netatalk/ddp_output.c	Tue Jan 31 09:53:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ddp_output.c,v 1.15 2011/07/17 20:54:53 joerg Exp $	 */
+/*	$NetBSD: ddp_output.c,v 1.16 2012/01/31 09:53:44 hauke Exp $	 */
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ddp_output.c,v 1.15 2011/07/17 20:54:53 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ddp_output.c,v 1.16 2012/01/31 09:53:44 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -126,20 +126,40 @@ ddp_route(struct mbuf *m, struct route *
 	struct elaphdr *elh;
 	struct at_ifaddr *aa = NULL;
 	struct ifnet   *ifp = NULL;
-	u_short net;
+	uint16_tnet;
+	uint8_t node;
+	uint8_t loopback = 0;
 
 	if ((rt = rtcache_validate(ro)) != NULL  (ifp = rt-rt_ifp) != NULL) {
+		const struct sockaddr_at *dst = satocsat(rtcache_getdst(ro));
+		uint16_t dnet = dst-sat_addr.s_net;
+		uint8_t dnode = dst-sat_addr.s_node;
 		net = satosat(rt-rt_gateway)-sat_addr.s_net;
+		node = satosat(rt-rt_gateway)-sat_addr.s_node;
+
 		TAILQ_FOREACH(aa, at_ifaddr, aa_list) {
-			if (aa-aa_ifp == ifp 
-			ntohs(net) = ntohs(aa-aa_firstnet) 
+			if (ntohs(net) = ntohs(aa-aa_firstnet) 
 			ntohs(net) = ntohs(aa-aa_lastnet)) {
+/* Are we talking to ourselves? */
+if (dnet == aa-aa_addr.sat_addr.s_net 
+dnode == aa-aa_addr.sat_addr.s_node) {
+	/* If to us, redirect to lo0. */
+	ifp = lo0ifp;
+}
+/* Or is it a broadcast? */
+else if (dnet == aa-aa_addr.sat_addr.s_net 
+	dnode == 255) {
+	/* If broadcast, loop back a copy. */
+	loopback = 1;
+}
 break;
 			}
 		}
 	}
 	if (aa == NULL) {
+#ifdef NETATALKDEBUG
 		printf(%s: no address found\n, __func__);
+#endif
 		m_freem(m);
 		return EINVAL;
 	}
@@ -161,7 +181,8 @@ ddp_route(struct mbuf *m, struct route *
 		ntohs(aa-aa_firstnet) 
 		ntohs(satocsat(rtcache_getdst(ro))-sat_addr.s_net) =
 		ntohs(aa-aa_lastnet)) {
-			elh-el_dnode = satocsat(rtcache_getdst(ro))-sat_addr.s_node;
+			elh-el_dnode =
+			satocsat(rtcache_getdst(ro))-sat_addr.s_node;
 		} else {
 			elh-el_dnode =
 			satosat(rt-rt_gateway)-sat_addr.s_node;
@@ -182,5 +203,13 @@ ddp_route(struct mbuf *m, struct route *
 #endif
 
 	/* XXX */
+	if (loopback  rtcache_getdst(ro)-sa_family == AF_APPLETALK) {
+		struct mbuf *copym = m_copypacket(m, M_DONTWAIT);
+		
+#ifdef NETATALKDEBUG
+		printf(Looping back (not AARP).\n);
+#endif
+		looutput(lo0ifp, 

CVS commit: src/sys/arch/evbarm/stand/boot2440

2012-01-31 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Jan 31 11:04:17 UTC 2012

Modified Files:
src/sys/arch/evbarm/stand/boot2440: Makefile dev_net.c devopen.c

Log Message:
- add TFTP loading facility.
- SD/MMC load default is now ld0a:netbsd


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/stand/boot2440/Makefile \
src/sys/arch/evbarm/stand/boot2440/dev_net.c \
src/sys/arch/evbarm/stand/boot2440/devopen.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/evbarm/stand/boot2440/Makefile
diff -u src/sys/arch/evbarm/stand/boot2440/Makefile:1.1 src/sys/arch/evbarm/stand/boot2440/Makefile:1.2
--- src/sys/arch/evbarm/stand/boot2440/Makefile:1.1	Mon Jan 30 03:28:34 2012
+++ src/sys/arch/evbarm/stand/boot2440/Makefile	Tue Jan 31 11:04:17 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2012/01/30 03:28:34 nisimura Exp $
+#	$NetBSD: Makefile,v 1.2 2012/01/31 11:04:17 nisimura Exp $
 
 S=		${.CURDIR}/../../../..
 PROG=		bootmini2440
@@ -11,7 +11,7 @@ CLEANFILES+=	vers.c ${PROG}.elf
 CFLAGS+=	-Wall -Wno-main -ffreestanding -march=armv4
 CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP 
 CPPFLAGS+=	-DDM9000MAC=0x08,0x08,0x11,0x18,0x12,0x27 
-CPPFLAGS+=	-DDEFAULT_BOOTFILE=ld0e:netbsd;net:
+CPPFLAGS+=	-DDEFAULT_BOOTFILE=ld0a:netbsd;net:
 CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch
 DBG=		
 
Index: src/sys/arch/evbarm/stand/boot2440/dev_net.c
diff -u src/sys/arch/evbarm/stand/boot2440/dev_net.c:1.1 src/sys/arch/evbarm/stand/boot2440/dev_net.c:1.2
--- src/sys/arch/evbarm/stand/boot2440/dev_net.c:1.1	Mon Jan 30 03:28:34 2012
+++ src/sys/arch/evbarm/stand/boot2440/dev_net.c	Tue Jan 31 11:04:17 2012
@@ -42,12 +42,16 @@
 extern int netif_open(void*);
 extern int netif_init(unsigned int tag);
 
+extern struct in_addr servip;
+
+static int netdev_sock = -1;
+
 int
 net_open(struct open_file *f, ...)
 {
 	va_list ap;
-	char *path;
-	int sock, error = 0;
+	char *path, *proto;
+	int error = 0;
 
 	if( netif_init(0) == 0 ) {
 		error = ENODEV;
@@ -55,15 +59,16 @@ net_open(struct open_file *f, ...)
 	}
 
 	va_start(ap, f);
-
 	path = va_arg(ap, char *);
-	if ((sock = netif_open(path))  0) {
+	proto = va_arg(ap, char *);
+	va_end(ap);
+	if ((netdev_sock = netif_open(path))  0) {
 		error = errno;
 		goto out;
 	}
 
 	/* send DHCP request */
-	bootp(sock);
+	bootp(netdev_sock);
 
 	/* IP address was not found */
 	if (myip.s_addr == 0) {
@@ -96,6 +101,9 @@ net_open(struct open_file *f, ...)
 			printf(Root path: %s\n, rootpath);
 			strcpy(bootfile, ++filename);
 			printf(Bootfile: %s\n, bootfile);
+		} else {
+			/* No ':' found, assume it's just a filename */
+			strcpy(bootfile, path);
 		}
 	}
 
@@ -103,12 +111,14 @@ net_open(struct open_file *f, ...)
 	if (bootfile[0] == '\0')
 		strcpy(bootfile, netbsd);
 
-	if (nfs_mount(sock, rootip, rootpath) != 0) {
+	if (strcmp(proto, nfs) == 0
+	 (nfs_mount(netdev_sock, rootip, rootpath) != 0)) {
 		error = errno;
 		goto out;
 	}
+
+	f-f_devdata = netdev_sock;
 out:
-	va_end(ap);
 	return (error);
 }
 
Index: src/sys/arch/evbarm/stand/boot2440/devopen.c
diff -u src/sys/arch/evbarm/stand/boot2440/devopen.c:1.1 src/sys/arch/evbarm/stand/boot2440/devopen.c:1.2
--- src/sys/arch/evbarm/stand/boot2440/devopen.c:1.1	Mon Jan 30 03:28:34 2012
+++ src/sys/arch/evbarm/stand/boot2440/devopen.c	Tue Jan 31 11:04:17 2012
@@ -34,6 +34,7 @@
 #include lib/libkern/libkern.h
 #include lib/libsa/stand.h
 #include lib/libsa/nfs.h
+#include lib/libsa/tftp.h
 #include lib/libsa/ext2fs.h
 #include lib/libsa/dosfs.h
 #include lib/libsa/ufs.h
@@ -58,6 +59,7 @@ struct devsw devsw[] = {
 };
 
 struct fs_ops ops_nfs = FS_OPS(nfs);
+struct fs_ops ops_tftp = FS_OPS(tftp);
 struct fs_ops ops_ext2fs = FS_OPS(ext2fs);
 struct fs_ops ops_dosfs = FS_OPS(dosfs);
 struct fs_ops ops_bsdfs = FS_OPS(ufs);
@@ -78,16 +80,29 @@ devopen(struct open_file *of, const char
 	if (strncmp(net:, name, 4) == 0 ||
 	strncmp(nfs:, name, 4) == 0 ) {
 		of-f_dev = devsw[0];
-		if ((error = net_open(of, name+4)) != 0)
+		if ((error = net_open(of, name+4, nfs)) != 0)
 			return error;
 		file_system[0] = ops_nfs;
 		*file = bootfile;
 		strncpy(bi_path.bootpath, bootfile, sizeof(bi_path.bootpath));
 
 		return 0;
+	} else if (strncmp(tftp:, name, 5) == 0) {
+		of-f_dev = devsw[0];
+		if ((error = net_open(of, name+5, tftp)) != 0) {
+			return error;
+		}
+		file_system[0] = ops_tftp;
+		*file = bootfile;
+		strncpy(bi_path.bootpath, bootfile, sizeof(bi_path.bootpath));
+
+		return 0;
 	} else if (name[0] == 'l'  name[1] == 'd') {
 		int unit, part;
 		parseunit(name[2], unit, part, file);
+		if (*file == NULL || strlen(*file) == 0) {
+			strcpy(*file, netbsd);
+		}
 		of-f_dev = devsw[1];
 		if ((error = sdmmc_open(of, unit, part)) != 0)
 			return error;



CVS commit: src

2012-01-31 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Jan 31 12:23:33 UTC 2012

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man8: Makefile
Added Files:
src/share/man/man8/man8.evbarm: Makefile bootmini2440.8

Log Message:
introduce evbarm bootmini2440(8) man entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1373 -r1.1374 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.101 -r1.102 src/share/man/man8/Makefile
cvs rdiff -u -r0 -r1.3 src/share/man/man8/man8.evbarm/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man8/man8.evbarm/bootmini2440.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.1373 src/distrib/sets/lists/man/mi:1.1374
--- src/distrib/sets/lists/man/mi:1.1373	Sun Jan 22 08:58:13 2012
+++ src/distrib/sets/lists/man/mi	Tue Jan 31 12:23:32 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1373 2012/01/22 08:58:13 jnemeth Exp $
+# $NetBSD: mi,v 1.1374 2012/01/31 12:23:32 nisimura Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2279,6 +2279,7 @@
 ./usr/share/man/cat8/eshconfig.0		man-sysutil-catman	.cat
 ./usr/share/man/cat8/etcupdate.0		man-sysutil-catman	.cat
 ./usr/share/man/cat8/evbarm/MAKEDEV.0		man-obsolete		obsolete
+./usr/share/man/cat8/evbarm/bootmini2440.0	man-sysutil-catman	.cat
 ./usr/share/man/cat8/evbarm/makedev.0		man-obsolete		obsolete
 ./usr/share/man/cat8/evbmips/MAKEDEV.0		man-obsolete		obsolete
 ./usr/share/man/cat8/evbmips/makedev.0		man-obsolete		obsolete
@@ -4986,6 +4987,7 @@
 ./usr/share/man/html8/edquota.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/eeprom.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/emips/boot.html		man-sys-htmlman		html
+./usr/share/man/html8/evbarm/bootmini2440.html	man-sysutil-htmlman	html
 ./usr/share/man/html8/envstat.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/error.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html8/eshconfig.html		man-sysutil-htmlman	html
@@ -7770,6 +7772,7 @@
 ./usr/share/man/man8/emips/boot.8		man-sys-man		.man
 ./usr/share/man/man8/emips/installboot.8		man-obsolete		obsolete
 ./usr/share/man/man8/emips/makedev.8		man-obsolete		obsolete
+./usr/share/man/man8/evbarm/bootmini2440.8	man-sysutils-man	.man
 ./usr/share/man/man8/envstat.8			man-sysutil-man		.man
 ./usr/share/man/man8/error.8			man-postfix-man		postfix,.man
 ./usr/share/man/man8/eshconfig.8		man-sysutil-man		.man

Index: src/share/man/man8/Makefile
diff -u src/share/man/man8/Makefile:1.101 src/share/man/man8/Makefile:1.102
--- src/share/man/man8/Makefile:1.101	Tue Apr 26 16:57:39 2011
+++ src/share/man/man8/Makefile	Tue Jan 31 12:23:33 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.101 2011/04/26 16:57:39 joerg Exp $
+#	$NetBSD: Makefile,v 1.102 2012/01/31 12:23:33 nisimura Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/5/93
 
 MAN=	MAKEDEV.8 MAKEDEV.local.8 afterboot.8 boot.8 compat_30.8 \
@@ -21,8 +21,8 @@ MLINKS+=rc.8 rc.local.8
 MLINKS+=rc.8 rc.shutdown.8
 
 SUBDIR= man8.acorn26 man8.acorn32 man8.alpha man8.amd64 man8.amiga man8.atari \
-	man8.cobalt man8.dreamcast man8.emips man8.hp300 man8.hp700 \
-	man8.hpcarm \
+	man8.cobalt man8.dreamcast man8.emips man8.evbarm man8.hp300 \
+	man8.hp700 man8.hpcarm \
 	man8.hpcmips man8.hpcsh man8.i386 man8.mac68k man8.macppc \
 	man8.mvme68k man8.next68k man8.pmax man8.prep man8.sandpoint \
 	man8.sgimips man8.sparc man8.sparc64 man8.sun2 man8.sun3 \

Added files:

Index: src/share/man/man8/man8.evbarm/Makefile
diff -u /dev/null src/share/man/man8/man8.evbarm/Makefile:1.3
--- /dev/null	Tue Jan 31 12:23:33 2012
+++ src/share/man/man8/man8.evbarm/Makefile	Tue Jan 31 12:23:33 2012
@@ -0,0 +1,7 @@
+#	@(#)Makefile	5.1 (Berkeley) 3/22/91
+#	$NetBSD: Makefile,v 1.3 2012/01/31 12:23:33 nisimura Exp $
+
+MAN=	bootmini2440.8
+MANSUBDIR=/evbarm
+
+.include bsd.man.mk

Index: src/share/man/man8/man8.evbarm/bootmini2440.8
diff -u /dev/null src/share/man/man8/man8.evbarm/bootmini2440.8:1.1
--- /dev/null	Tue Jan 31 12:23:33 2012
+++ src/share/man/man8/man8.evbarm/bootmini2440.8	Tue Jan 31 12:23:33 2012
@@ -0,0 +1,171 @@
+.\ $NetBSD: bootmini2440.8,v 1.1 2012/01/31 12:23:33 nisimura Exp $
+.\
+.\ Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Paul Fleischer p...@xpg.dk.
+.\
+.\ 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 

CVS commit: src/share/man/man8/man8.evbarm

2012-01-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jan 31 13:25:05 UTC 2012

Modified Files:
src/share/man/man8/man8.evbarm: bootmini2440.8

Log Message:
Remove trailing whitespace.
New sentence, new line.
Remove Pp before Sh.
Sort sections.
Use more markup.
Remove unnecessary macro arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man8/man8.evbarm/bootmini2440.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man8/man8.evbarm/bootmini2440.8
diff -u src/share/man/man8/man8.evbarm/bootmini2440.8:1.1 src/share/man/man8/man8.evbarm/bootmini2440.8:1.2
--- src/share/man/man8/man8.evbarm/bootmini2440.8:1.1	Tue Jan 31 12:23:33 2012
+++ src/share/man/man8/man8.evbarm/bootmini2440.8	Tue Jan 31 13:25:05 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: bootmini2440.8,v 1.1 2012/01/31 12:23:33 nisimura Exp $
+.\ $NetBSD: bootmini2440.8,v 1.2 2012/01/31 13:25:05 wiz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,10 +27,9 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-
 .Dd January 31, 2012
 .Dt BOOTMINI2440 8 evbarm
-.Os NetBSD
+.Os
 .Sh NAME
 .Nm bootmini2440
 .Nd bootloader for FriendlyARM MINI2440 evaluation board
@@ -42,18 +41,19 @@ is a program to load
 kernel, which works on top of
 .Tn U-Boot .
 It loads and executes a kernel from an SD memory card, or over
-network using
+the network using the
 .Tn NFS/TFTP
 protocol.
 .Pp
-The 
+The
 .Nm
 bootloader can be loaded anywhere by
 .Tn U-Boot ,
 although care should be taken that the bootloader can load the
 .Nx
-kernel without overwriting itself. The kernel is, by default, made
-to be loaded at 0x3020. The recommended location for
+kernel without overwriting itself.
+The kernel is, by default, made to be loaded at 0x3020.
+The recommended location for
 .Nm
 is 0x30A0.
 .Pp
@@ -63,13 +63,15 @@ takes a number of arguments, which all a
 .Bl -tag -width xx
 .It Va mac=
 is used to set the MAC-address of the on-board DM9000 Ethernet
-chip. As Mini2440 has no EEPROM to store DM9000 MAC-address, this
-is necessary in order to have a working Ethernet controller. If
-this argument is left unspecified, a default value of 08:08:11:18:12:27
+chip.
+As Mini2440 has no EEPROM to store DM9000 MAC-address, this
+is necessary in order to have a working Ethernet controller.
+If this argument is left unspecified, a default value of 08:08:11:18:12:27
 is used.
 .It Va opt1 ... Va optN
-is one of single, kdb, ask, quiet, or verbose. Their meaning is described in 
-.Xr boothowto 7 .
+is one of single, kdb, ask, quiet, or verbose.
+Their meaning is described in
+.Xr boothowto 9 .
 .It Va bootname
 is one of the following:
 .Pp
@@ -79,7 +81,7 @@ is one of the following:
 .Dl tftp: Ns Ar filename
 .Dl tftp:
 .Dl ld0 Ns Ar p : Ns Ar filename
-.Dl ld0 Ns Ar p : 
+.Dl ld0 Ns Ar p :
 .Pp
 .Bl -tag -width xx
 .It net: Ns Va ip Ns : Ns Va filename
@@ -94,7 +96,8 @@ using
 .It net: Ns Ar filename
 use
 .Tn DHCP
-to determine own IP-address and server IP-address. Load kernel specified by
+to determine own IP-address and server IP-address.
+Load kernel specified by
 .Ar filename
 from the server using
 .Tn NFS .
@@ -107,7 +110,8 @@ Load the kernel using
 .It tftp: Ns Ar filename
 use
 .Tn DHCP
-to determine own IP-address and server IP-address. Load kernel specified by
+to determine own IP-address and server IP-address.
+Load kernel specified by
 .Ar filename
 from the server using
 .Tn TFTP .
@@ -118,16 +122,18 @@ to determine own IP-address, server IP-a
 Load kernel using
 .Tn TFTP .
 .It ld0 Ns Va p : Ns Va filename
-load kernel from an SD card. The kernel specified by
+load kernel from an SD card.
+The kernel specified by
 .Ar filename
 is attempted loaded on the partition given by
 .Ar p .
-.It ld0 Ns Va p : 
-load kernel from an SD card. The kernel will be loaded from the
-file netbsd on the partition specified by
+.It ld0 Ns Va p :
+load kernel from an SD card.
+The kernel will be loaded from the file
+.Dq Pa netbsd
+on the partition specified by
 .Ar p .
 .El
-.Pp
 .Sh EXAMPLES
 .Ss Loading Nm
 Use
@@ -154,18 +160,19 @@ MAC-address, and booting into single use
 .Xr nfsd 8 ,
 .xr tftpd 8 ,
 .Xr boothowto 9
+.Sh HISTORY
+The
+.Nx Ns Tn /evbarm
+.Nm
+first appeared in
+.Nx 6.0 .
 .Sh BUGS
 .Nm
 cannot currently function properly without
 .Tn U-Boot
-(or equivalent). Although it performs clock and
+(or equivalent).
+Although it performs clock and
 .Tn UART
 configuration, it cannot bootstrap itself from
 .Tn NAND
 flash.
-.Sh HISTORY
-The
-.Nx Ns Tn /evbarm
-.Nm
-first appeared in
-.Nx 6.0 .



CVS commit: src/tests/fs/puffs/h_dtfs

2012-01-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jan 31 18:56:07 UTC 2012

Modified Files:
src/tests/fs/puffs/h_dtfs: dtfs_vnops.c

Log Message:
Check directory write access for DELETE operation. And while here,
small indentation adjust.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/puffs/h_dtfs/dtfs_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/puffs/h_dtfs/dtfs_vnops.c
diff -u src/tests/fs/puffs/h_dtfs/dtfs_vnops.c:1.8 src/tests/fs/puffs/h_dtfs/dtfs_vnops.c:1.9
--- src/tests/fs/puffs/h_dtfs/dtfs_vnops.c:1.8	Tue Mar  1 15:19:49 2011
+++ src/tests/fs/puffs/h_dtfs/dtfs_vnops.c	Tue Jan 31 18:56:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtfs_vnops.c,v 1.8 2011/03/01 15:19:49 pooka Exp $	*/
+/*	$NetBSD: dtfs_vnops.c,v 1.9 2012/01/31 18:56:07 njoly Exp $	*/
 
 /*
  * Copyright (c) 2006  Antti Kantee.  All Rights Reserved.
@@ -63,6 +63,14 @@ dtfs_node_lookup(struct puffs_usermount 
 
 	dfd = dtfs_dirgetbyname(df, pcn-pcn_name, pcn-pcn_namelen);
 	if (dfd) {
+		if ((pcn-pcn_flags  NAMEI_ISLASTCN) 
+		(pcn-pcn_nameiop == NAMEI_DELETE)) {
+			rv = puffs_access(VDIR, pn_dir-pn_va.va_mode,
+			pn_dir-pn_va.va_uid, pn_dir-pn_va.va_gid,
+			PUFFS_VWRITE, pcn-pcn_cred);
+			if (rv)
+return rv;
+		}
 		puffs_newinfo_setcookie(pni, dfd-dfd_node);
 		puffs_newinfo_setvtype(pni, dfd-dfd_node-pn_va.va_type);
 		puffs_newinfo_setsize(pni, dfd-dfd_node-pn_va.va_size);
@@ -76,7 +84,7 @@ dtfs_node_lookup(struct puffs_usermount 
 
 	if ((pcn-pcn_flags  NAMEI_ISLASTCN)
 	 (pcn-pcn_nameiop == NAMEI_CREATE ||
-	  pcn-pcn_nameiop == NAMEI_RENAME)) {
+	pcn-pcn_nameiop == NAMEI_RENAME)) {
 		rv = puffs_access(VDIR, pn_dir-pn_va.va_mode,
 		pn_dir-pn_va.va_uid, pn_dir-pn_va.va_gid,
 		PUFFS_VWRITE, pcn-pcn_cred);



CVS commit: src/sys/rump/librump/rumpvfs

2012-01-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jan 31 19:00:04 UTC 2012

Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c

Log Message:
Check credentials when setting uid, gid or mode attributes.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/rump/librump/rumpvfs/rumpfs.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/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.105 src/sys/rump/librump/rumpvfs/rumpfs.c:1.106
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.105	Mon Jan 30 16:17:14 2012
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Tue Jan 31 19:00:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.105 2012/01/30 16:17:14 njoly Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.106 2012/01/31 19:00:03 njoly Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.105 2012/01/30 16:17:14 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: rumpfs.c,v 1.106 2012/01/31 19:00:03 njoly Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -895,11 +895,11 @@ rump_vop_setattr(void *v)
 	struct vnode *vp = ap-a_vp;
 	struct vattr *vap = ap-a_vap;
 	struct rumpfs_node *rn = vp-v_data;
+	struct vattr *attr = rn-rn_va;
+	kauth_cred_t cred = ap-a_cred;
+	int error;
 
 #define SETIFVAL(a,t) if (vap-a != (t)VNOVAL) rn-rn_va.a = vap-a
-	SETIFVAL(va_mode, mode_t);
-	SETIFVAL(va_uid, uid_t);
-	SETIFVAL(va_gid, gid_t);
 	SETIFVAL(va_atime.tv_sec, time_t);
 	SETIFVAL(va_ctime.tv_sec, time_t);
 	SETIFVAL(va_mtime.tv_sec, time_t);
@@ -911,6 +911,31 @@ rump_vop_setattr(void *v)
 	SETIFVAL(va_flags, u_long);
 #undef  SETIFVAL
 
+	if (vap-va_uid != (uid_t)VNOVAL || vap-va_gid != (uid_t)VNOVAL) {
+		uid_t uid =
+		(vap-va_uid != (uid_t)VNOVAL) ? vap-va_uid : attr-va_uid;
+		gid_t gid =
+		(vap-va_gid != (gid_t)VNOVAL) ? vap-va_gid : attr-va_gid;
+		error = kauth_authorize_vnode(cred,
+		KAUTH_VNODE_CHANGE_OWNERSHIP, vp, NULL,
+		genfs_can_chown(vp, cred, attr-va_uid, attr-va_gid, uid,
+		gid));
+		if (error)
+			return error;
+		attr-va_uid = uid;
+		attr-va_gid = gid;
+	}
+
+	if (vap-va_mode != (mode_t)VNOVAL) {
+		mode_t mode = vap-va_mode;
+		error = kauth_authorize_vnode(cred, KAUTH_VNODE_WRITE_SECURITY,
+		vp, NULL, genfs_can_chmod(vp, cred, attr-va_uid,
+		attr-va_gid, mode));
+		if (error)
+			return error;
+		attr-va_mode = mode;
+	}
+
 	if (vp-v_type == VREG 
 	vap-va_size != VSIZENOTSET 
 	vap-va_size != rn-rn_dlen) {



CVS commit: src/tests/fs/vfs

2012-01-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jan 31 19:02:49 UTC 2012

Modified Files:
src/tests/fs/vfs: t_unpriv.c

Log Message:
owner testcase now succeed with rumpfs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/vfs/t_unpriv.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_unpriv.c
diff -u src/tests/fs/vfs/t_unpriv.c:1.3 src/tests/fs/vfs/t_unpriv.c:1.4
--- src/tests/fs/vfs/t_unpriv.c:1.3	Fri Jan 27 21:53:50 2012
+++ src/tests/fs/vfs/t_unpriv.c	Tue Jan 31 19:02:49 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_unpriv.c,v 1.3 2012/01/27 21:53:50 njoly Exp $	*/
+/*	$NetBSD: t_unpriv.c,v 1.4 2012/01/31 19:02:49 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #include ../../h_macros.h
 
 #define USES_OWNER			 \
-	if (FSTYPE_MSDOS(tc) || FSTYPE_RUMPFS(tc)) \
+	if (FSTYPE_MSDOS(tc))		 \
 	atf_tc_skip(owner not supported by file system)
 
 static void



CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jan 31 19:11:38 UTC 2012

Modified Files:
src/sys/kern: subr_pcq.c

Log Message:
Replace offsetof(pcq_t, pcq_items[nitems]) with sizeof(pcq_t) + sizeof(void 
*[nitems]).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_pcq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_pcq.c
diff -u src/sys/kern/subr_pcq.c:1.4 src/sys/kern/subr_pcq.c:1.5
--- src/sys/kern/subr_pcq.c:1.4	Sun Jan 22 02:55:47 2012
+++ src/sys/kern/subr_pcq.c	Tue Jan 31 19:11:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pcq.c,v 1.4 2012/01/22 02:55:47 rmind Exp $	*/
+/*	$NetBSD: subr_pcq.c,v 1.5 2012/01/31 19:11:37 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pcq.c,v 1.4 2012/01/22 02:55:47 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pcq.c,v 1.5 2012/01/31 19:11:37 alnsn Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -199,7 +199,7 @@ pcq_create(size_t nitems, km_flag_t kmfl
 
 	KASSERT(nitems  0 || nitems = 0x);
 
-	pcq = kmem_zalloc(offsetof(pcq_t, pcq_items[nitems]), kmflags);
+	pcq = kmem_zalloc(sizeof(pcq_t) + sizeof(void *[nitems]), kmflags);
 	if (pcq == NULL) {
 		return NULL;
 	}



CVS commit: src/lib/csu/common

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 19:58:22 UTC 2012

Modified Files:
src/lib/csu/common: Makefile.inc

Log Message:
Use -DPIC to compile crtbeginS.o since that's what machine/asm.h
headers check.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/csu/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/csu/common/Makefile.inc
diff -u src/lib/csu/common/Makefile.inc:1.3 src/lib/csu/common/Makefile.inc:1.4
--- src/lib/csu/common/Makefile.inc:1.3	Mon Jan 31 17:54:20 2011
+++ src/lib/csu/common/Makefile.inc	Tue Jan 31 19:58:22 2012
@@ -1,4 +1,5 @@
-#	$NetBSD: Makefile.inc,v 1.3 2011/01/31 17:54:20 drochner Exp $
+Warning: Permanently added the RSA host key for IP address '149.20.53.70' to the list of known hosts.
+#	$NetBSD: Makefile.inc,v 1.4 2012/01/31 19:58:22 uwe Exp $
 
 .include bsd.own.mk
 
@@ -23,7 +24,7 @@ crtbegin.o: crtbegin.S
 
 crtbeginS.o: crtbegin.S
 	${_MKTARGET_COMPILE}
-	${COMPILE.S} -DSHARED ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
+	${COMPILE.S} -DPIC -DSHARED ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
 	${LD} -x -r -o ${.TARGET} ${.TARGET}.o
 	rm -f ${.TARGET}.o
 .if ${MKSTRIPIDENT} != no



CVS commit: src/external/bsd/ntp

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Jan 31 20:05:13 UTC 2012

Modified Files:
src/external/bsd/ntp: ntp2netbsd

Log Message:
fix instructions in comment part


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/ntp2netbsd

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/ntp2netbsd
diff -u src/external/bsd/ntp/ntp2netbsd:1.2 src/external/bsd/ntp/ntp2netbsd:1.3
--- src/external/bsd/ntp/ntp2netbsd:1.2	Sat Oct  8 19:28:39 2011
+++ src/external/bsd/ntp/ntp2netbsd	Tue Jan 31 20:05:13 2012
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: ntp2netbsd,v 1.2 2011/10/08 19:28:39 christos Exp $
+#	$NetBSD: ntp2netbsd,v 1.3 2012/01/31 20:05:13 kardel Exp $
 #
 # Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,8 +35,8 @@
 #	$ cd /some/where/temporary
 #	$ tar xpfz /new/ntp/release/tar/file
 #	$ sh /usr/src/external/bsd/ntp/ntp2netbsd ntp-4.x.y `pwd`
-#	$ cd src/externaä/bsd/ntp/dist
-#	$ cvs import -m Import ntp 4.x.y src/dist/ntp UDEL ntp-4-x-y
+#	$ cd src/external/bsd/ntp/dist
+#	$ cvs import -m Import ntp 4.x.y src/external/bsd/ntp/dist UDEL ntp-4-x-y
 #	$ cd ../../../../../ntp-4.x.y
 #	$ run ./configure  --enable-all-clocks --enable-parse-clocks
 #	$ echo cp config.h /usr/src/external/bsd/ntp/include



CVS commit: src/lib/csu/common

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:08:28 UTC 2012

Modified Files:
src/lib/csu/common: Makefile.inc

Log Message:
Move crt0.S in front of crt0-common.c when building crt0.o and gcrt0.o.
Reading disassembly is easier when the asm crt0.S trampoline is at the
start, not hidden behind the C code in crt0-common.c.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/csu/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/csu/common/Makefile.inc
diff -u src/lib/csu/common/Makefile.inc:1.5 src/lib/csu/common/Makefile.inc:1.6
--- src/lib/csu/common/Makefile.inc:1.5	Tue Jan 31 20:03:50 2012
+++ src/lib/csu/common/Makefile.inc	Tue Jan 31 20:08:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.5 2012/01/31 20:03:50 uwe Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2012/01/31 20:08:28 uwe Exp $
 
 .include bsd.own.mk
 
@@ -45,22 +45,22 @@ PICFLAGS=	-fPIC
 PICFLAGS=
 .endif
 
-crt0.o: crt0-common.c crt0.S
+crt0.o: crt0.S crt0-common.c
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
 	${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o
-	${LD} -x -r -o ${.TARGET} ${.TARGET}.c.o ${.TARGET}.S.o
-	rm -f ${.TARGET}.c.o ${.TARGET}.S.o
+	${COMPILE.c} ${PICFLAGS} ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
+	${LD} -x -r -o ${.TARGET} ${.TARGET}.S.o ${.TARGET}.c.o
+	rm -f ${.TARGET}.S.o ${.TARGET}.c.o
 .if ${MKSTRIPIDENT} != no
 	${OBJCOPY} -R .ident ${.TARGET}
 .endif
 
-gcrt0.o: crt0-common.c crt0.S
+gcrt0.o: crt0.S crt0-common.c
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${PICFLAGS} -DMCRT0 ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
 	${COMPILE.S} ${ARCHDIR}/crt0.S -o ${.TARGET}.S.o
-	${LD} -x -r -o ${.TARGET} ${.TARGET}.c.o ${.TARGET}.S.o
-	rm -f ${.TARGET}.c.o ${.TARGET}.S.o
+	${COMPILE.c} ${PICFLAGS} -DMCRT0 ${COMMON_DIR}/crt0-common.c -o ${.TARGET}.c.o
+	${LD} -x -r -o ${.TARGET} ${.TARGET}.S.o ${.TARGET}.c.o
+	rm -f ${.TARGET}.S.o ${.TARGET}.c.o
 .if ${MKSTRIPIDENT} != no
 	${OBJCOPY} -R .ident ${.TARGET}
 .endif



CVS commit: src/doc

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Jan 31 20:11:42 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
update ntp current version


To generate a diff of this commit:
cvs rdiff -u -r1.902 -r1.903 src/doc/3RDPARTY

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.902 src/doc/3RDPARTY:1.903
--- src/doc/3RDPARTY:1.902	Sat Jan 28 19:43:47 2012
+++ src/doc/3RDPARTY	Tue Jan 31 20:11:41 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.902 2012/01/28 19:43:47 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.903 2012/01/31 20:11:41 kardel Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -714,7 +714,7 @@ HAVE_STRICT_ALIGNMENT.  Fix RCS IDs, imp
 
 Package:	ntp
 Version:	4.2.6
-Current Vers:	4.2.4p8
+Current Vers:	4.2.6p5
 Maintainer:	David L. Mills mi...@udel.edu
 Archive Site:	ftp://ftp.udel.edu/pub/ntp/ntp4/
 Home Page:	http://www.ntp.org/, http://support.ntp.org/



CVS commit: src/lib/csu/arch/sh3

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:17:57 UTC 2012

Modified Files:
src/lib/csu/arch/sh3: crt0.S

Log Message:
New ___start() C function takes 3 arguments instead of 6 and fetches
argc, argv and environ from ps_strings instead.  Adjust the trampoline
accordingly.

Fix brain fart in previous: direct jump is jmp @rN, not bsrf rN.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/csu/arch/sh3/crt0.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/csu/arch/sh3/crt0.S
diff -u src/lib/csu/arch/sh3/crt0.S:1.3 src/lib/csu/arch/sh3/crt0.S:1.4
--- src/lib/csu/arch/sh3/crt0.S:1.3	Sun Jan 29 23:27:24 2012
+++ src/lib/csu/arch/sh3/crt0.S	Tue Jan 31 20:17:57 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.S,v 1.3 2012/01/29 23:27:24 uwe Exp $ */
+/* $NetBSD: crt0.S,v 1.4 2012/01/31 20:17:57 uwe Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -37,21 +37,23 @@
 
 #include machine/asm.h
 
-RCSID($NetBSD: crt0.S,v 1.3 2012/01/29 23:27:24 uwe Exp $)
+RCSID($NetBSD: crt0.S,v 1.4 2012/01/31 20:17:57 uwe Exp $)
 
 STRONG_ALIAS(_start,__start)
 
 /*
- * Kernel setregs() passes all arguments in registers to avoid
- * copyout.  This trampoline pushes 5th and 6th arguments into stack,
- * where C ABI expects them to be, and calls the real startup code
- * written in C.
+ * Kernel setregs() passes arguments for the 6-argument version of
+ * ___start (but with 5th and 6th in registers, to avoid copyout).
+ * Since we now use 3-argument version of ___start - that obtains
+ * argc, argv and environ from ps_strings - move its arguments to
+ * proper registers.
  */
 _ENTRY(__start)
 	mov.l	.L___start, r0
-	mov.l	r9, @-sp
-	braf	r0
-	 mov.l	r8, @-sp
+	mov	r7, r4		! void (*cleanup)(void)
+	mov	r8, r5		! const Obj_Entry *obj
+	jmp	@r0
+	 mov	r9, r6		! struct ps_strings *ps_strings
 
 	.p2align 2
 .L___start:	.long	_C_LABEL(___start)



CVS commit: src/lib/csu/arch/sh3

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:30:15 UTC 2012

Added Files:
src/lib/csu/arch/sh3: crtbegin.S

Log Message:
Implement crtbegin* for sh3.  Tested to work on landisk.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/sh3/crtbegin.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/lib/csu/arch/sh3/crtbegin.S
diff -u /dev/null src/lib/csu/arch/sh3/crtbegin.S:1.1
--- /dev/null	Tue Jan 31 20:30:15 2012
+++ src/lib/csu/arch/sh3/crtbegin.S	Tue Jan 31 20:30:15 2012
@@ -0,0 +1,366 @@
+/*	$NetBSD: crtbegin.S,v 1.1 2012/01/31 20:30:15 uwe Exp $	*/
+/*-
+ * Copyright (c) 2010 Joerg Sonnenberger jo...@netbsd.org
+ * 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 COPYRIGHT HOLDERS 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
+ * COPYRIGHT HOLDERS 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 machine/asm.h
+
+RCSID($NetBSD: crtbegin.S,v 1.1 2012/01/31 20:30:15 uwe Exp $)
+
+	.section	.ctors, aw, @progbits
+	.p2align 2
+__CTOR_LIST__:
+	.long -1
+
+	.section	.dtors, aw, @progbits
+	.p2align 2
+__DTOR_LIST__:
+	.long -1
+
+	.section	.eh_frame, a, @progbits
+	.p2align 2
+__EH_FRAME_LIST__:
+
+	.section	.jcr, aw, @progbits
+	.p2align 2
+__JCR_LIST__:
+
+	.section	.data.rel, aw, @progbits
+	.p2align 2
+	.globl	__dso_handle
+	.hidden	__dso_handle
+	.type	__dso_handle, @object
+	.size	__dso_handle, 4
+__dso_handle:
+#ifdef SHARED
+	.long	__dso_handle
+#else
+	.long	0
+#endif
+
+__dwarf_eh_object:
+	.zero	32
+
+__initialized:
+	.zero	1
+__finished:
+	.zero	1
+
+	.text
+	.weak	__cxa_finalize
+	.weak	__deregister_frame_info
+	.weak	__register_frame_info
+	.weak	_Jv_RegisterClasses
+
+/*
+ * A bit of CPP syntactic sugar for accessing variables.
+ *
+ * For PIC we are obliged to use @(r0, r12) since r12 has the GOT
+ * address and only r0 can be used in @(r0, Rm) addressing mode, so we
+ * always load variable address to r0.
+ */
+#ifdef PIC
+#define VAR_DATUM(var)	var@GOTOFF
+#define FUNC_DATUM(f)	f@GOT
+#define R0VAR		(r0, r12)
+#else
+#define VAR_DATUM(var)	var
+#define FUNC_DATUM(f)	f
+#define R0VAR		r0
+#endif
+
+
+__do_global_ctors_aux:
+mov.l   r8, @-sp
+mov.l   r9, @-sp
+#ifdef PIC
+mov.l   r12, @-sp
+mov.l   .Lc_got, r12
+mova.Lc_got, r0
+add r0, r12
+#endif
+mov.l   r14, @-sp
+sts.l   pr, @-sp
+	mov sp, r14
+
+	!! if (__initialized) return;
+	mov.l	.Lc___initialized, r0
+	mov.b	@R0VAR, r1
+	tst	r1, r1
+	bf	.Lc_return
+
+	!! __initialized = 1;
+	mov	#1, r1
+	mov.b	r1, @R0VAR
+
+
+	!! if (__register_frame_info)
+	!! __register_frame_info(__EH_FRAME_LIST__[0], __dwarf_eh_object)
+#ifdef PIC
+	mov.l	.Lc___register_frame_info_GOT, r0
+	mov.l	@R0VAR, r1
+	tst	r1, r1
+	bt	.Lc___register_frame_info_done
+	mov.l	.Lc___register_frame_info, r0
+	mov.l	.Lc___EH_FRAME_LIST__, r4
+	mov.l	.Lc___dwarf_eh_object, r5
+	add	r12, r4
+.Lc___register_frame_info_call:
+	CALL	r0
+	 add	r12, r5
+#else /* !PIC */
+	mov.l	.Lc___register_frame_info, r0
+	tst	r0, r0
+	bt	.Lc___register_frame_info_done
+	mov.l	.Lc___EH_FRAME_LIST__, r4
+	mov.l	.Lc___dwarf_eh_object, r5
+	CALL	r0
+	 nop
+#endif
+.Lc___register_frame_info_done:
+
+	!!  if (_Jv_RegisterClasses  __JCR_LIST__[0])
+	!!  _Jv_RegisterClasses(__JCR_LIST__[0]);
+#ifdef PIC
+	mov.l	.Lc__Jv_RegisterClasses_GOT, r0
+	mov.l	@R0VAR, r1
+	tst	r1, r1
+	bt	.Lc__Jv_RegisterClasses_done
+
+	mov.l	.Lc___JCR_LIST__, r0
+	mov.l	@R0VAR, r1
+	tst	r1, r1
+	bt	.Lc__Jv_RegisterClasses_done
+
+	mov.l	.Lc__Jv_RegisterClasses, r2
+	mov	r0, r4
+.Lc__Jv_RegisterClasses_call:
+	CALL	r2
+	 add	r12, r4
+
+#else /* !PIC */
+	mov.l	.Lc__Jv_RegisterClasses, r2
+	tst	r2, r2
+	bt	

CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jan 31 20:40:09 UTC 2012

Modified Files:
src/sys/kern: subr_pcq.c

Log Message:
Revert to more readable but non-standard use of offsetof to calculate
a size of a structure with a flexible array member.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_pcq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_pcq.c
diff -u src/sys/kern/subr_pcq.c:1.5 src/sys/kern/subr_pcq.c:1.6
--- src/sys/kern/subr_pcq.c:1.5	Tue Jan 31 19:11:37 2012
+++ src/sys/kern/subr_pcq.c	Tue Jan 31 20:40:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pcq.c,v 1.5 2012/01/31 19:11:37 alnsn Exp $	*/
+/*	$NetBSD: subr_pcq.c,v 1.6 2012/01/31 20:40:09 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pcq.c,v 1.5 2012/01/31 19:11:37 alnsn Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pcq.c,v 1.6 2012/01/31 20:40:09 alnsn Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -199,7 +199,7 @@ pcq_create(size_t nitems, km_flag_t kmfl
 
 	KASSERT(nitems  0 || nitems = 0x);
 
-	pcq = kmem_zalloc(sizeof(pcq_t) + sizeof(void *[nitems]), kmflags);
+	pcq = kmem_zalloc(offsetof(pcq_t, pcq_items[nitems]), kmflags);
 	if (pcq == NULL) {
 		return NULL;
 	}



CVS commit: src/sys/arch/sandpoint/sandpoint

2012-01-31 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Tue Jan 31 21:12:03 UTC 2012

Modified Files:
src/sys/arch/sandpoint/sandpoint: mainbus.c

Log Message:
Print MPC8245 cpu speed. We can calculate it using the PLL ratio.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sandpoint/sandpoint/mainbus.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/sandpoint/sandpoint/mainbus.c
diff -u src/sys/arch/sandpoint/sandpoint/mainbus.c:1.28 src/sys/arch/sandpoint/sandpoint/mainbus.c:1.29
--- src/sys/arch/sandpoint/sandpoint/mainbus.c:1.28	Fri Jan 27 18:53:00 2012
+++ src/sys/arch/sandpoint/sandpoint/mainbus.c	Tue Jan 31 21:12:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.28 2012/01/27 18:53:00 para Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.29 2012/01/31 21:12:03 phx Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.28 2012/01/27 18:53:00 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.29 2012/01/31 21:12:03 phx Exp $);
 
 #include opt_pci.h
 #include pci.h
@@ -46,6 +46,8 @@ __KERNEL_RCSID(0, $NetBSD: mainbus.c,v 
 #include machine/bootinfo.h
 #include machine/isa_machdep.h
 
+#include powerpc/oea/spr.h
+
 #include dev/pci/pcivar.h
 #include dev/pci/pciconf.h
 
@@ -150,6 +152,7 @@ cpu_match(device_t parent, cfdata_t cf, 
 
 	if (strcmp(mba-ma_name, cpu_cd.cd_name) != 0)
 		return 0;
+
 	if (cpu_info[0].ci_dev != NULL)
 		return 0;
 
@@ -159,8 +162,29 @@ cpu_match(device_t parent, cfdata_t cf, 
 void
 cpu_attach(device_t parent, device_t self, void *aux)
 {
-
-	(void)cpu_attach_common(self, 0);
+	static uint8_t mem_to_cpuclk[] = {
+		25, 30, 45, 20, 20, 00, 10, 30,
+		30, 20, 45, 30, 25, 35, 30, 35,
+		20, 25, 20, 30, 35, 40, 40, 20,
+		30, 25, 40, 30, 30, 25, 35, 00
+	};
+	extern u_long ticks_per_sec;
+	struct cpu_info *ci;
+	u_int hid1, vers;
+
+	ci = cpu_attach_common(self, 0);
+	if (ci == NULL)
+		return;
+
+	vers = (mfpvr()  16)  0x;
+	if (ci-ci_khz == 0  vers == MPC8245) {
+		/* calculate speed from bus clock and PLL ratio */
+		asm volatile (mfspr %0,1009 : =r(hid1));
+		ci-ci_khz = ((uint64_t)ticks_per_sec * 4 *
+		mem_to_cpuclk[hid1  27] + 10) / 1;
+		aprint_normal_dev(self, %u.%02u MHz\n,
+		ci-ci_khz / 1000, (ci-ci_khz / 10) % 100);
+	}
 }
 
 int



CVS commit: src

2012-01-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jan 31 21:17:57 UTC 2012

Modified Files:
src/sys/arch/m68k/include: db_machdep.h
src/sys/arch/m68k/m68k: db_disasm.c db_interface.c db_trace.c
src/usr.sbin/crash: Makefile

Log Message:
Enable build of crash(8) for m86k platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/db_disasm.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/m68k/db_interface.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/crash/Makefile

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/m68k/include/db_machdep.h
diff -u src/sys/arch/m68k/include/db_machdep.h:1.30 src/sys/arch/m68k/include/db_machdep.h:1.31
--- src/sys/arch/m68k/include/db_machdep.h:1.30	Thu May 26 15:34:13 2011
+++ src/sys/arch/m68k/include/db_machdep.h	Tue Jan 31 21:17:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.h,v 1.30 2011/05/26 15:34:13 joerg Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.31 2012/01/31 21:17:57 mlelstv Exp $	*/
 
 /* 
  * Mach Operating System
@@ -32,6 +32,12 @@
 #ifndef	_M68K_DB_MACHDEP_H_
 #define	_M68K_DB_MACHDEP_H_
 
+#if !defined(_KERNEL)  !defined(_STANDALONE)
+#include stddef.h
+#include stdbool.h
+#include string.h
+#endif /* _KERNEL || _STANDALONE */
+
 #include sys/types.h
 
 /*

Index: src/sys/arch/m68k/m68k/db_disasm.c
diff -u src/sys/arch/m68k/m68k/db_disasm.c:1.38 src/sys/arch/m68k/m68k/db_disasm.c:1.39
--- src/sys/arch/m68k/m68k/db_disasm.c:1.38	Wed Feb 21 22:59:46 2007
+++ src/sys/arch/m68k/m68k/db_disasm.c	Tue Jan 31 21:17:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.38 2007/02/21 22:59:46 thorpej Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.39 2012/01/31 21:17:57 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -63,10 +63,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.38 2007/02/21 22:59:46 thorpej Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.39 2012/01/31 21:17:57 mlelstv Exp $);
 
 #include sys/param.h
+#ifdef _KERNEL
 #include sys/systm.h
+#endif
 
 #include machine/db_machdep.h
 
@@ -168,6 +170,9 @@ static const char *const dregs[8] = {d0
 static const char *const fpregs[8] = {
 	fp0,fp1,fp2,fp3,fp4,fp5,fp6,fp7 };
 static const char *const fpcregs[3] = { fpiar, fpsr, fpcr };
+#ifndef _KERNEL
+static const char hexdigits[] = 0123456789abcdef;
+#endif
 
 /*
  * Disassemble intruction at location ``loc''.

Index: src/sys/arch/m68k/m68k/db_interface.c
diff -u src/sys/arch/m68k/m68k/db_interface.c:1.34 src/sys/arch/m68k/m68k/db_interface.c:1.35
--- src/sys/arch/m68k/m68k/db_interface.c:1.34	Thu Feb 22 17:09:44 2007
+++ src/sys/arch/m68k/m68k/db_interface.c	Tue Jan 31 21:17:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.c,v 1.34 2007/02/22 17:09:44 thorpej Exp $	*/
+/*	$NetBSD: db_interface.c,v 1.35 2012/01/31 21:17:57 mlelstv Exp $	*/
 
 /* 
  * Mach Operating System
@@ -31,9 +31,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.34 2007/02/22 17:09:44 thorpej Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_interface.c,v 1.35 2012/01/31 21:17:57 mlelstv Exp $);
 
+#ifdef _KERNEL_OPT
 #include opt_ddb.h
+#endif
 
 #include sys/param.h
 #include sys/proc.h
@@ -49,12 +51,14 @@ __KERNEL_RCSID(0, $NetBSD: db_interface
 
 #include ddb/db_command.h
 #include ddb/db_sym.h
+#ifdef _KERNEL
 #include ddb/db_extern.h
-
+#endif
 
 int	db_active = 0;
 db_regs_t	ddb_regs;
 
+#ifdef _KERNEL
 static void kdbprinttrap(int, int);
 
 /*
@@ -155,3 +159,4 @@ cpu_Debugger(void)
 
 	__asm (trap #15);
 }
+#endif

Index: src/sys/arch/m68k/m68k/db_trace.c
diff -u src/sys/arch/m68k/m68k/db_trace.c:1.56 src/sys/arch/m68k/m68k/db_trace.c:1.57
--- src/sys/arch/m68k/m68k/db_trace.c:1.56	Thu Jul  1 02:38:27 2010
+++ src/sys/arch/m68k/m68k/db_trace.c	Tue Jan 31 21:17:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.56 2010/07/01 02:38:27 rmind Exp $	*/
+/*	$NetBSD: db_trace.c,v 1.57 2012/01/31 21:17:57 mlelstv Exp $	*/
 
 /* 
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_trace.c,v 1.56 2010/07/01 02:38:27 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_trace.c,v 1.57 2012/01/31 21:17:57 mlelstv Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -39,7 +39,6 @@ __KERNEL_RCSID(0, $NetBSD: db_trace.c,v
 #include ddb/db_output.h
 #include ddb/db_access.h
 #include ddb/db_sym.h
-#include ddb/db_extern.h
 #include ddb/db_variables.h
 
 /*
@@ -49,26 +48,26 @@ static int db_var_short(const struct db_
 
 const struct db_variable db_regs[] = {
 	/* D0-D7 */
-	{ d0,	(long *)ddb_regs.tf_regs[0],	FCN_NULL },
-	{ d1,	(long *)ddb_regs.tf_regs[1],	FCN_NULL },
-	{ d2,	(long *)ddb_regs.tf_regs[2],	FCN_NULL },
-	{ d3,	(long *)ddb_regs.tf_regs[3],	FCN_NULL },
-	{ d4,	(long *)ddb_regs.tf_regs[4],	

CVS commit: src/external/bsd/ntp/dist

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Jan 31 21:29:40 UTC 2012

Update of /cvsroot/src/external/bsd/ntp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv2606

Log Message:
Import ntp 4.2.6p5

Status:

Vendor Tag: UDEL
Release Tags:   ntp-4-2-6p5

U src/external/bsd/ntp/dist/CommitLog-4.1.0
U src/external/bsd/ntp/dist/COPYRIGHT
U src/external/bsd/ntp/dist/ChangeLog
U src/external/bsd/ntp/dist/CommitLog
U src/external/bsd/ntp/dist/Makefile.am
U src/external/bsd/ntp/dist/INSTALL
U src/external/bsd/ntp/dist/NOTES.y2kfixes
U src/external/bsd/ntp/dist/Makefile.in
U src/external/bsd/ntp/dist/NEWS
U src/external/bsd/ntp/dist/README.bk
U src/external/bsd/ntp/dist/README
U src/external/bsd/ntp/dist/bincheck.mf
U src/external/bsd/ntp/dist/README.hackers
U src/external/bsd/ntp/dist/README.patches
U src/external/bsd/ntp/dist/README.refclocks
U src/external/bsd/ntp/dist/README.versions
U src/external/bsd/ntp/dist/TODO
U src/external/bsd/ntp/dist/WHERE-TO-START
U src/external/bsd/ntp/dist/aclocal.m4
U src/external/bsd/ntp/dist/bootstrap
U src/external/bsd/ntp/dist/build
U src/external/bsd/ntp/dist/compile
U src/external/bsd/ntp/dist/config.guess
U src/external/bsd/ntp/dist/config.h.in
U src/external/bsd/ntp/dist/config.sub
U src/external/bsd/ntp/dist/configure
U src/external/bsd/ntp/dist/configure.ac
U src/external/bsd/ntp/dist/depcomp
U src/external/bsd/ntp/dist/deps-ver
U src/external/bsd/ntp/dist/depsver.mf
U src/external/bsd/ntp/dist/dot.emacs
U src/external/bsd/ntp/dist/excludes
U src/external/bsd/ntp/dist/flock-build
U src/external/bsd/ntp/dist/install-sh
U src/external/bsd/ntp/dist/ltmain.sh
U src/external/bsd/ntp/dist/missing
U src/external/bsd/ntp/dist/packageinfo.sh
U src/external/bsd/ntp/dist/readme.y2kfixes
U src/external/bsd/ntp/dist/results.y2kfixes
U src/external/bsd/ntp/dist/version.m4
U src/external/bsd/ntp/dist/version
U src/external/bsd/ntp/dist/ylwrap
U src/external/bsd/ntp/dist/ElectricFence/tstheap.c
U src/external/bsd/ntp/dist/ElectricFence/efence.c
U src/external/bsd/ntp/dist/ElectricFence/eftest.c
U src/external/bsd/ntp/dist/ElectricFence/README
U src/external/bsd/ntp/dist/ElectricFence/page.c
U src/external/bsd/ntp/dist/ElectricFence/libefence.3
U src/external/bsd/ntp/dist/ElectricFence/Makefile.in
U src/external/bsd/ntp/dist/ElectricFence/print.c
U src/external/bsd/ntp/dist/ElectricFence/CHANGES
U src/external/bsd/ntp/dist/ElectricFence/Makefile.am
U src/external/bsd/ntp/dist/ElectricFence/COPYING
U src/external/bsd/ntp/dist/ElectricFence/efence.h
U src/external/bsd/ntp/dist/adjtimed/adjtimed.c
U src/external/bsd/ntp/dist/adjtimed/README
U src/external/bsd/ntp/dist/adjtimed/Makefile.in
U src/external/bsd/ntp/dist/adjtimed/Makefile.am
U src/external/bsd/ntp/dist/clockstuff/clktest.c
U src/external/bsd/ntp/dist/clockstuff/propdelay.c
U src/external/bsd/ntp/dist/clockstuff/chutest.c
U src/external/bsd/ntp/dist/clockstuff/Makefile.am
U src/external/bsd/ntp/dist/clockstuff/Makefile.in
U src/external/bsd/ntp/dist/clockstuff/README
U src/external/bsd/ntp/dist/conf/beauregard.conf
U src/external/bsd/ntp/dist/conf/malarky.conf
U src/external/bsd/ntp/dist/conf/pogo.conf
U src/external/bsd/ntp/dist/conf/rackety.conf
U src/external/bsd/ntp/dist/conf/grundoon.conf
U src/external/bsd/ntp/dist/conf/baldwin.conf
U src/external/bsd/ntp/dist/conf/README
U src/external/bsd/ntp/dist/html/ntptrace.html
U src/external/bsd/ntp/dist/html/kern.html
U src/external/bsd/ntp/dist/html/copyright.html
U src/external/bsd/ntp/dist/html/release.html
U src/external/bsd/ntp/dist/html/xleave.html
U src/external/bsd/ntp/dist/html/sntp.html
U src/external/bsd/ntp/dist/html/rate.html
U src/external/bsd/ntp/dist/html/accopt.html
U src/external/bsd/ntp/dist/html/config.html
U src/external/bsd/ntp/dist/html/ntpdc.html
U src/external/bsd/ntp/dist/html/rdebug.html
U src/external/bsd/ntp/dist/html/refclock.html
U src/external/bsd/ntp/dist/html/comdex.html
U src/external/bsd/ntp/dist/html/miscopt.html
U src/external/bsd/ntp/dist/html/ntp_conf.html
U src/external/bsd/ntp/dist/html/quick.html
U src/external/bsd/ntp/dist/html/manyopt.html
U src/external/bsd/ntp/dist/html/parsedata.html
U src/external/bsd/ntp/dist/html/extern.html
U src/external/bsd/ntp/dist/html/decode.html
U src/external/bsd/ntp/dist/html/howto.html
N src/external/bsd/ntp/dist/html/ntp-wait.html
U src/external/bsd/ntp/dist/html/build.html
U src/external/bsd/ntp/dist/html/ntpdsim.html
U src/external/bsd/ntp/dist/html/authopt.html
U src/external/bsd/ntp/dist/html/pps.html
U src/external/bsd/ntp/dist/html/parsenew.html
U src/external/bsd/ntp/dist/html/ntpdate.html
U src/external/bsd/ntp/dist/html/kernpps.html
U src/external/bsd/ntp/dist/html/gadget.html
U src/external/bsd/ntp/dist/html/msyslog.html
U src/external/bsd/ntp/dist/html/assoc.html
U src/external/bsd/ntp/dist/html/tickadj.html
U src/external/bsd/ntp/dist/html/ntpq.html
U src/external/bsd/ntp/dist/html/hints.html
U src/external/bsd/ntp/dist/html/clockopt.html
U 

CVS commit: src/usr.bin/lastcomm

2012-01-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jan 31 21:53:42 UTC 2012

Modified Files:
src/usr.bin/lastcomm: lastcomm.c

Log Message:
Sync usage with man page.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/lastcomm/lastcomm.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/lastcomm/lastcomm.c
diff -u src/usr.bin/lastcomm/lastcomm.c:1.22 src/usr.bin/lastcomm/lastcomm.c:1.23
--- src/usr.bin/lastcomm/lastcomm.c:1.22	Tue Jan 31 16:30:40 2012
+++ src/usr.bin/lastcomm/lastcomm.c	Tue Jan 31 21:53:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lastcomm.c,v 1.22 2012/01/31 16:30:40 christos Exp $	*/
+/*	$NetBSD: lastcomm.c,v 1.23 2012/01/31 21:53:42 wiz Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)lastcomm.c	8.2 (Berkeley) 4/29/95;
 #endif
-__RCSID($NetBSD: lastcomm.c,v 1.22 2012/01/31 16:30:40 christos Exp $);
+__RCSID($NetBSD: lastcomm.c,v 1.23 2012/01/31 21:53:42 wiz Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -226,7 +226,7 @@ static void
 usage(void)
 {
 	(void)fprintf(stderr,
-	Usage: %s [ -f file ] [-w] [command ...] [user ...] [tty ...]\n,
+	Usage: %s [-w] [-f file] [command ...] [user ...] [terminal ...]\n,
 	getprogname());
 	exit(1);
 }



CVS commit: src/sys

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 22:13:20 UTC 2012

Modified Files:
src/sys/arch/mac68k/conf: GENERIC
src/sys/arch/mac68k/nubus: cpi_nubus.c cpi_nubusvar.h
src/sys/dev/ic: z8536reg.h

Log Message:
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/nubus/cpi_nubus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/nubus/cpi_nubusvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/z8536reg.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/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.204 src/sys/arch/mac68k/conf/GENERIC:1.205
--- src/sys/arch/mac68k/conf/GENERIC:1.204	Sun Dec 18 05:49:29 2011
+++ src/sys/arch/mac68k/conf/GENERIC	Tue Jan 31 22:13:20 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.204 2011/12/18 05:49:29 dholland Exp $
+# $NetBSD: GENERIC,v 1.205 2012/01/31 22:13:20 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/mac68k/conf/std.mac68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.204 $
+#ident 		GENERIC-$Revision: 1.205 $
 
 maxusers	16		# estimated number of users
 
@@ -234,7 +234,8 @@ wsmouse* at ams?
 # Centronics printer port
 
 # CSI Hurdler Centronics Parallel Interface
-cpi*	at nubus?
+# CPI_CTC12_IS_TIMECOUNTER	0x01	Run counters 1+2 as timecounter	
+cpi*	at nubus? flags 0x1
 
 
 # Serial Devices

Index: src/sys/arch/mac68k/nubus/cpi_nubus.c
diff -u src/sys/arch/mac68k/nubus/cpi_nubus.c:1.5 src/sys/arch/mac68k/nubus/cpi_nubus.c:1.6
--- src/sys/arch/mac68k/nubus/cpi_nubus.c:1.5	Fri May 13 22:35:50 2011
+++ src/sys/arch/mac68k/nubus/cpi_nubus.c	Tue Jan 31 22:13:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpi_nubus.c,v 1.5 2011/05/13 22:35:50 rmind Exp $	*/
+/*	$NetBSD: cpi_nubus.c,v 1.6 2012/01/31 22:13:20 hauke Exp $	*/
 
 /*-
  * Copyright (c) 2008 Hauke Fath
@@ -25,8 +25,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,v 1.5 2011/05/13 22:35:50 rmind Exp $);
-
+__KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,v 1.6 2012/01/31 22:13:20 hauke Exp $);
 #include sys/param.h
 #include sys/systm.h
 #include sys/proc.h
@@ -40,6 +39,7 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #include sys/ioctl.h
 #include sys/tty.h
 #include sys/time.h
+#include sys/timetc.h
 #include sys/kernel.h
 #include sys/syslog.h
 #include sys/errno.h
@@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #define M_TRACE_WRITE	0x0010
 #define M_TRACE_IOCTL	0x0020
 #define M_TRACE_STATUS	0x0040
+#define M_TRACE_TCNTR	0x0080
 #define M_TRACE_ALL	0x
 #define M_TRACE_NONE	0x
 
@@ -81,12 +82,12 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #define TRACE_WRITE	(cpi_debug_mask  M_TRACE_WRITE)
 #define TRACE_IOCTL	(cpi_debug_mask  M_TRACE_IOCTL)
 #define TRACE_STATUS	(cpi_debug_mask  M_TRACE_STATUS)
+#define TRACE_TCNTR	(cpi_debug_mask  M_TRACE_TCNTR)
 #define TRACE_ALL	(cpi_debug_mask  M_TRACE_ALL)
 #define TRACE_NONE	(cpi_debug_mask  M_TRACE_NONE)
 
-uint32_t cpi_debug_mask = M_TRACE_NONE /* | M_TRACE_WRITE */ ;
-
-#else
+uint32_t cpi_debug_mask = M_TRACE_NONE /* | M_TRACE_TCNTR | M_TRACE_WRITE */ ;
+#else /* CPI_DEBUG */
 #define TRACE_CONFIG	0
 #define TRACE_OPEN	0
 #define TRACE_CLOSE	0
@@ -94,11 +95,10 @@ uint32_t cpi_debug_mask = M_TRACE_NONE /
 #define TRACE_WRITE	0
 #define TRACE_IOCTL	0
 #define TRACE_STATUS	0
+#define TRACE_TCNTR	0
 #define TRACE_ALL	0
 #define TRACE_NONE	0
-#endif
-
-#undef USE_CIO_TIMERS		/* TBD */
+#endif /* CPI_DEBUG */
 
 /* autoconf interface */
 int cpi_nubus_match(device_t, cfdata_t, void *);
@@ -126,14 +126,13 @@ static void cpi_wakeup(void *);
 static int cpi_flush(struct cpi_softc *);
 static void cpi_intr(void *);
 
-#ifdef USE_CIO_TIMERS
-static void cpi_initclock(struct cpi_softc *);
-static u_int cpi_get_timecount(struct timecounter *);
-#endif
-
-static inline void z8536_reg_set(bus_space_tag_t, bus_space_handle_t,
+static void cpi_tc_initclock(struct cpi_softc *);
+static uint cpi_get_timecount(struct timecounter *);
+static uint z8536_read_counter1(bus_space_tag_t, bus_space_handle_t);
+static uint z8536_read_counter2(bus_space_tag_t, bus_space_handle_t);
+static void z8536_reg_set(bus_space_tag_t, bus_space_handle_t,
 uint8_t, uint8_t);
-static inline uint8_t z8536_reg_get(bus_space_tag_t, bus_space_handle_t,
+static uint8_t z8536_reg_get(bus_space_tag_t, bus_space_handle_t,
 uint8_t);
 
 
@@ -191,19 +190,6 @@ const uint8_t cio_init[] = {
 	Z8536_DPPRC, 	0x00,
 	Z8536_SIOCRC, 	0x00,
 
-#ifdef USE_CIO_TIMERS
-	/*
-	 * Counter/Timers 1+2 are joined to form a free-running
-	 * 32 bit timecounter
-	 */
-	Z8536_CTMSR1, 	

CVS commit: src/sys/arch/sun2/sun2

2012-01-31 Thread Lars Heidieker
Module Name:src
Committed By:   para
Date:   Tue Jan 31 22:47:08 UTC 2012

Modified Files:
src/sys/arch/sun2/sun2: pmap.c

Log Message:
unbreak the sun2 pmap


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sun2/sun2/pmap.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/sun2/sun2/pmap.c
diff -u src/sys/arch/sun2/sun2/pmap.c:1.44 src/sys/arch/sun2/sun2/pmap.c:1.45
--- src/sys/arch/sun2/sun2/pmap.c:1.44	Fri Jun  3 17:03:52 2011
+++ src/sys/arch/sun2/sun2/pmap.c	Tue Jan 31 22:47:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.44 2011/06/03 17:03:52 tsutsui Exp $	*/
+/*	$NetBSD: pmap.c,v 1.45 2012/01/31 22:47:08 para Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.44 2011/06/03 17:03:52 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.45 2012/01/31 22:47:08 para Exp $);
 
 #include opt_ddb.h
 #include opt_pmap_debug.h
@@ -90,7 +90,7 @@ __KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.4
 #include sys/param.h
 #include sys/systm.h
 #include sys/proc.h
-#include sys/malloc.h
+#include sys/kmem.h
 #include sys/pool.h
 #include sys/queue.h
 #include sys/kcore.h
@@ -1820,7 +1820,7 @@ void 
 pmap_user_init(pmap_t pmap)
 {
 	int i;
-	pmap-pm_segmap = malloc(sizeof(char)*NUSEG, M_VMPMAP, M_WAITOK);
+	pmap-pm_segmap = kmem_alloc(sizeof(char)*NUSEG, KM_SLEEP);
 	for (i = 0; i  NUSEG; i++) {
 		pmap-pm_segmap[i] = SEGINV;
 	}
@@ -1871,7 +1871,7 @@ pmap_release(struct pmap *pmap)
 #endif
 		context_free(pmap);
 	}
-	free(pmap-pm_segmap, M_VMPMAP);
+	kmem_free(pmap-pm_segmap, sizeof(char)*NUSEG);
 	pmap-pm_segmap = NULL;
 
 	splx(s);



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:51:42 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
Add netbsd32_socklenp_t


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/netbsd32/netbsd32.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.88 src/sys/compat/netbsd32/netbsd32.h:1.89
--- src/sys/compat/netbsd32/netbsd32.h:1.88	Wed Oct 12 23:04:22 2011
+++ src/sys/compat/netbsd32/netbsd32.h	Tue Jan 31 22:51:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.88 2011/10/12 23:04:22 dholland Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.89 2012/01/31 22:51:41 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -583,6 +583,7 @@ typedef netbsd32_pointer_t netbsd32_stac
 /* from sys/socket.h */
 typedef netbsd32_pointer_t netbsd32_sockaddrp_t;
 typedef netbsd32_pointer_t netbsd32_osockaddrp_t;
+typedef netbsd32_pointer_t netbsd32_socklenp_t;
 
 typedef netbsd32_pointer_t netbsd32_msghdrp_t;
 struct netbsd32_msghdr {



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:52:19 UTC 2012

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Add the *at syscalls and other missing syscalls.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/netbsd32/syscalls.master

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/syscalls.master
diff -u src/sys/compat/netbsd32/syscalls.master:1.88 src/sys/compat/netbsd32/syscalls.master:1.89
--- src/sys/compat/netbsd32/syscalls.master:1.88	Tue Nov  8 10:59:12 2011
+++ src/sys/compat/netbsd32/syscalls.master	Tue Jan 31 22:52:19 2012
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.88 2011/11/08 10:59:12 njoly Exp $
+	$NetBSD: syscalls.master,v 1.89 2012/01/31 22:52:19 matt Exp $
 
 ;	from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;	@(#)syscalls.master	8.2 (Berkeley) 1/13/94
@@ -974,3 +974,67 @@
 453	STD		{ int|netbsd32||pipe2(netbsd32_intp fildes, int flags); }
 454	STD		{ int|netbsd32||dup3(int from, int to, int flags); }
 455	STD		{ int|netbsd32||kqueue1(int flags); }
+456	STD  		{ int|netbsd32||paccept(int s, \
+			netbsd32_sockaddrp_t name, \
+			netbsd32_socklenp_t anamelen, \
+			const netbsd32_sigsetp_t mask, \
+			int flags); }
+457	STD  		{ int|netbsd32||linkat(int fd1, \
+			const netbsd32_charp name1, \
+			int fd2, \
+			const netbsd32_charp name2, \
+			int flags); }
+458	STD  		{ int|netbsd32||renameat(int fromfd, \
+			const netbsd32_charp from, \
+			int tofd, \
+			const netbsd32_charp to); }
+459	STD  		{ int|netbsd32||mkfifoat(int fd, \
+			const netbsd32_charp path, \
+			mode_t mode); }
+460	STD  		{ int|netbsd32||mknodat(int fd, \
+			const netbsd32_charp path, \
+			mode_t mode, \
+			uint32_t dev); }
+461	STD  		{ int|netbsd32||mkdirat(int fd, \
+			const netbsd32_charp path, \
+			mode_t mode); }
+462	STD  		{ int|netbsd32||faccessat(int fd, \
+			const netbsd32_charp path, \
+			int amode, \
+			int flag); }
+463	STD  		{ int|netbsd32||fchmodat(int fd, \
+			const netbsd32_charp path, \
+			mode_t mode, \
+			int flag); }
+464	STD  		{ int|netbsd32||fchownat(int fd, \
+			const netbsd32_charp path, \
+			uid_t owner, \
+			gid_t group, \
+			int flag); }
+465	STD  		{ int|netbsd32||fexecve(int fd, \
+			netbsd32_charpp argp, \
+			netbsd32_charpp envp); }
+466	STD  		{ int|netbsd32||fstatat(int fd, \
+			const netbsd32_charp path, \
+			netbsd32_statp_t buf, \
+			int flag); }
+467	STD  		{ int|netbsd32||utimensat(int fd, \
+			const netbsd32_charp path, \
+			const netbsd32_timespecp_t tptr, \
+			int flag); }
+468	STD  		{ int|netbsd32||openat(int fd, \
+			const netbsd32_charp path, \
+			int oflags, ... \
+			mode_t mode); }
+469	STD  		{ int|netbsd32||readlinkat(int fd, \
+			const netbsd32_charp path, \
+			netbsd32_charp buf, \
+			size_t bufsize); }
+470	STD  		{ int|netbsd32||symlinkat(const netbsd32_charp path1, \
+			int fd, \
+			const netbsd32_charp path2); }
+471	STD  		{ int|netbsd32||unlinkat(int fd, \
+			const netbsd32_charp path, \
+			int flag); }
+472	STD  		{ int|netbsd32||futimens(int fd, \
+			const netbsd32_timespecp_t tptr); }



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:53:28 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.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_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.96 src/sys/compat/netbsd32/netbsd32_syscall.h:1.97
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.96	Tue Nov  8 10:59:44 2011
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Tue Jan 31 22:53:28 2012
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.96 2011/11/08 10:59:44 njoly Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.97 2012/01/31 22:53:28 matt Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.88 2011/11/08 10:59:12 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.89 2012/01/31 22:52:19 matt Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -1208,6 +1208,57 @@
 /* syscall: netbsd32_kqueue1 ret: int args: int */
 #define	NETBSD32_SYS_netbsd32_kqueue1	455
 
-#define	NETBSD32_SYS_MAXSYSCALL	456
+/* syscall: netbsd32_paccept ret: int args: int netbsd32_sockaddrp_t netbsd32_socklenp_t const netbsd32_sigsetp_t int */
+#define	NETBSD32_SYS_netbsd32_paccept	456
+
+/* syscall: netbsd32_linkat ret: int args: int const netbsd32_charp int const netbsd32_charp int */
+#define	NETBSD32_SYS_netbsd32_linkat	457
+
+/* syscall: netbsd32_renameat ret: int args: int const netbsd32_charp int const netbsd32_charp */
+#define	NETBSD32_SYS_netbsd32_renameat	458
+
+/* syscall: netbsd32_mkfifoat ret: int args: int const netbsd32_charp mode_t */
+#define	NETBSD32_SYS_netbsd32_mkfifoat	459
+
+/* syscall: netbsd32_mknodat ret: int args: int const netbsd32_charp mode_t uint32_t */
+#define	NETBSD32_SYS_netbsd32_mknodat	460
+
+/* syscall: netbsd32_mkdirat ret: int args: int const netbsd32_charp mode_t */
+#define	NETBSD32_SYS_netbsd32_mkdirat	461
+
+/* syscall: netbsd32_faccessat ret: int args: int const netbsd32_charp int int */
+#define	NETBSD32_SYS_netbsd32_faccessat	462
+
+/* syscall: netbsd32_fchmodat ret: int args: int const netbsd32_charp mode_t int */
+#define	NETBSD32_SYS_netbsd32_fchmodat	463
+
+/* syscall: netbsd32_fchownat ret: int args: int const netbsd32_charp uid_t gid_t int */
+#define	NETBSD32_SYS_netbsd32_fchownat	464
+
+/* syscall: netbsd32_fexecve ret: int args: int netbsd32_charpp netbsd32_charpp */
+#define	NETBSD32_SYS_netbsd32_fexecve	465
+
+/* syscall: netbsd32_fstatat ret: int args: int const netbsd32_charp netbsd32_statp_t int */
+#define	NETBSD32_SYS_netbsd32_fstatat	466
+
+/* syscall: netbsd32_utimensat ret: int args: int const netbsd32_charp const netbsd32_timespecp_t int */
+#define	NETBSD32_SYS_netbsd32_utimensat	467
+
+/* syscall: netbsd32_openat ret: int args: int const netbsd32_charp int ... */
+#define	NETBSD32_SYS_netbsd32_openat	468
+
+/* syscall: netbsd32_readlinkat ret: int args: int const netbsd32_charp netbsd32_charp size_t */
+#define	NETBSD32_SYS_netbsd32_readlinkat	469
+
+/* syscall: netbsd32_symlinkat ret: int args: const netbsd32_charp int const netbsd32_charp */
+#define	NETBSD32_SYS_netbsd32_symlinkat	470
+
+/* syscall: netbsd32_unlinkat ret: int args: int const netbsd32_charp int */
+#define	NETBSD32_SYS_netbsd32_unlinkat	471
+
+/* syscall: netbsd32_futimens ret: int args: int const netbsd32_timespecp_t */
+#define	NETBSD32_SYS_netbsd32_futimens	472
+
+#define	NETBSD32_SYS_MAXSYSCALL	473
 #define	NETBSD32_SYS_NSYSENT	512
 #endif /* _NETBSD32_SYS_SYSCALL_H_ */
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.96 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.97
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.96	Tue Nov  8 10:59:45 2011
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Tue Jan 31 22:53:28 2012
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.96 2011/11/08 10:59:45 njoly Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.97 2012/01/31 22:53:28 matt Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.88 2011/11/08 10:59:12 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.89 2012/01/31 22:52:19 matt Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -2327,6 +2327,138 @@ struct netbsd32_kqueue1_args {
 };
 check_syscall_args(netbsd32_kqueue1)
 
+struct netbsd32_paccept_args {
+	syscallarg(int) s;
+	syscallarg(netbsd32_sockaddrp_t) name;
+	

CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:53:56 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_execve.c netbsd32_netbsd.c

Log Message:
Add missing *at syscalls among others


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_execve.c
cvs rdiff -u -r1.176 -r1.177 src/sys/compat/netbsd32/netbsd32_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/sys/compat/netbsd32/netbsd32_execve.c
diff -u src/sys/compat/netbsd32/netbsd32_execve.c:1.32 src/sys/compat/netbsd32/netbsd32_execve.c:1.33
--- src/sys/compat/netbsd32/netbsd32_execve.c:1.32	Thu May 29 14:51:26 2008
+++ src/sys/compat/netbsd32/netbsd32_execve.c	Tue Jan 31 22:53:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_execve.c,v 1.32 2008/05/29 14:51:26 mrg Exp $	*/
+/*	$NetBSD: netbsd32_execve.c,v 1.33 2012/01/31 22:53:56 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: netbsd32_execve.c,v 1.32 2008/05/29 14:51:26 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_execve.c,v 1.33 2012/01/31 22:53:56 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -72,3 +72,21 @@ netbsd32_execve(struct lwp *l, const str
 	return execve1(l, path, SCARG_P32(uap, argp),
 	SCARG_P32(uap, envp), netbsd32_execve_fetch_element);
 }
+
+int
+netbsd32_fexecve(struct lwp *l, const struct netbsd32_fexecve_args *uap,
+		 register_t *retval)
+{
+	/* {
+		syscallarg(int) fd;
+		syscallarg(netbsd32_charpp) argp;
+		syscallarg(netbsd32_charpp) envp;
+	} */
+	struct sys_fexecve_args ua;
+
+	NETBSD32TO64_UAP(fd);
+	NETBSD32TOP_UAP(argp, char * const);
+	NETBSD32TOP_UAP(envp, char * const);
+
+	return sys_fexecve(l, ua, retval);
+}

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.176 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.177
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.176	Sun Jan 29 06:29:04 2012
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Tue Jan 31 22:53:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.176 2012/01/29 06:29:04 dholland Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.177 2012/01/31 22:53:56 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.176 2012/01/29 06:29:04 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.177 2012/01/31 22:53:56 matt Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ddb.h
@@ -2621,9 +2621,324 @@ netbsd32_kqueue1(struct lwp *l, const st
 	struct sys_kqueue1_args ua;
 
 	NETBSD32TO64_UAP(flags);
+
 	return sys_kqueue1(l, ua, retval);
 }
 
+int
+netbsd32_paccept(struct lwp *l, const struct netbsd32_paccept_args *uap,
+		 register_t *retval)
+{
+	/* {
+		syscallarg(int) s;
+		syscallarg(netbsd32_sockaddrp_t) name;
+		syscallarg(netbsd32_socklenp_t) anamelen;
+		syscallarg(const netbsd32_sigsetp_t) mask;
+		syscallarg(int) flags;
+	} */
+	struct sys_paccept_args ua;
+
+	NETBSD32TO64_UAP(s);
+	NETBSD32TOP_UAP(name, struct sockaddr *);
+	NETBSD32TOP_UAP(anamelen, socklen_t *);
+	NETBSD32TOP_UAP(mask, const sigset_t *);
+	NETBSD32TO64_UAP(flags);
+
+	return sys_paccept(l, ua, retval);
+}
+
+int
+netbsd32_linkat(struct lwp *l, const struct netbsd32_linkat_args *uap,
+		 register_t *retval)
+{
+	/* {
+		syscallarg(int) fd1;
+		syscallarg(const netbsd32_charp) name1;
+		syscallarg(int) fd2;
+		syscallarg(const netbsd32_charp) name2;
+		syscallarg(int) flags;
+	} */
+	struct sys_linkat_args ua;
+
+	NETBSD32TO64_UAP(fd1);
+	NETBSD32TOP_UAP(name1, const char);
+	NETBSD32TO64_UAP(fd2);
+	NETBSD32TOP_UAP(name2, const char);
+	NETBSD32TO64_UAP(flags);
+
+	return sys_linkat(l, ua, retval);
+}
+
+int
+netbsd32_renameat(struct lwp *l, const struct netbsd32_renameat_args *uap,
+		 register_t *retval)
+{
+	/* {
+		syscallarg(int) fromfd;
+		syscallarg(const netbsd32_charp) from;
+		syscallarg(int) tofd;
+		syscallarg(const netbsd32_charp) to;
+	} */
+	struct sys_renameat_args ua;
+
+	NETBSD32TO64_UAP(fromfd);
+	NETBSD32TOP_UAP(from, const char);
+	NETBSD32TO64_UAP(tofd);
+	NETBSD32TOP_UAP(to, const char);
+
+	return sys_renameat(l, ua, retval);
+}
+
+int
+netbsd32_mkfifoat(struct lwp *l, const struct netbsd32_mkfifoat_args *uap,
+		 register_t *retval)
+{
+	/* {
+		syscallarg(int) fd;
+		syscallarg(const netbsd32_charp) path;
+		syscallarg(mode_t) mode;
+	} */
+	struct sys_mkfifoat_args ua;
+
+	NETBSD32TO64_UAP(fd);
+	NETBSD32TOP_UAP(path, const char);
+	NETBSD32TO64_UAP(mode);
+
+	return sys_mkfifoat(l, ua, retval);
+}
+
+int
+netbsd32_mknodat(struct lwp *l, const struct netbsd32_mknodat_args *uap,
+		 register_t *retval)
+{
+	/* {
+		syscallarg(int) fd;
+		syscallarg(netbsd32_charp) path;
+		syscallarg(mode_t) mode;
+		syscallarg(uint32_t) dev;
+	} */
+	struct sys_mknodat_args 

CVS commit: src/sys/dev/isa

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:01:29 UTC 2012

Modified Files:
src/sys/dev/isa: spkr.c

Log Message:
Use C89 prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/isa/spkr.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/isa/spkr.c
diff -u src/sys/dev/isa/spkr.c:1.31 src/sys/dev/isa/spkr.c:1.32
--- src/sys/dev/isa/spkr.c:1.31	Tue Jul 27 14:34:34 2010
+++ src/sys/dev/isa/spkr.c	Wed Feb  1 02:01:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: spkr.c,v 1.31 2010/07/27 14:34:34 jakllsch Exp $	*/
+/*	$NetBSD: spkr.c,v 1.32 2012/02/01 02:01:28 matt Exp $	*/
 
 /*
  * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com)
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: spkr.c,v 1.31 2010/07/27 14:34:34 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: spkr.c,v 1.32 2012/02/01 02:01:28 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -88,18 +88,16 @@ static void playinit(void);
 static void playtone(int, int, int);
 static void playstring(char *, int);
 
-static
-void tone(xhz, ticks)
+static void
+tone(u_int xhz, u_int ticks)
 /* emit tone of frequency hz for given number of ticks */
-u_int xhz, ticks;
 {
 	pcppi_bell(ppicookie, xhz, ticks, PCPPI_BELL_SLEEP);
 }
 
 static void
-rest(ticks)
+rest(int ticks)
 /* rest for given number of ticks */
-int	ticks;
 {
 /*
  * Set timeout to endrest function, then give up the timeslice.
@@ -182,9 +180,8 @@ playinit(void)
 }
 
 static void
-playtone(pitch, val, sustain)
+playtone(int pitch, int val, int sustain)
 /* play tone of proper duration for current rhythm signature */
-int	pitch, val, sustain;
 {
 int	sound, silence, snum = 1, sdenom = 1;
 
@@ -215,10 +212,8 @@ playtone(pitch, val, sustain)
 }
 
 static void
-playstring(cp, slen)
+playstring(char *cp, int slen)
 /* interpret and play an item from a notation string */
-char	*cp;
-int		slen;
 {
 int		pitch, lastpitch = OCTAVE_NOTES * DFLT_OCTAVE;
 
@@ -414,10 +409,9 @@ spkrattach(device_t parent, device_t sel
 	printf(\n);
 	ppicookie = ((struct pcppi_attach_args *)aux)-pa_cookie;
 	spkr_attached = 1;
-if (!device_pmf_is_registered(self))
-		if (!pmf_device_register(self, NULL, NULL))
-			aprint_error_dev(self,
-			couldn't establish power handler\n); 
+if (!device_pmf_is_registered(self)
+	 !pmf_device_register(self, NULL, NULL))
+		aprint_error_dev(self, couldn't establish power handler\n); 
 
 }
 
@@ -463,8 +457,8 @@ spkrwrite(dev_t dev, struct uio *uio, in
 }
 }
 
-int spkrclose(dev_t dev, int flags, int mode,
-struct lwp *l)
+int
+spkrclose(dev_t dev, int flags, int mode, struct lwp *l)
 {
 #ifdef SPKRDEBUG
 printf(spkrclose: entering with dev = %PRIx64\n, dev);
@@ -481,8 +475,8 @@ int spkrclose(dev_t dev, int flags, int 
 return(0);
 }
 
-int spkrioctl(dev_t dev, u_long cmd, void *data, int	flag,
-struct lwp *l)
+int
+spkrioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 #ifdef SPKRDEBUG
 printf(spkrioctl: entering with dev = %PRIx64, cmd = %lx\n, dev, cmd);



CVS commit: src/sys/arch/macppc/dev

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:02:07 UTC 2012

Modified Files:
src/sys/arch/macppc/dev: adb.c adb_direct.c viareg.h

Log Message:
Use C89 function prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/macppc/dev/adb.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/dev/adb_direct.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/dev/viareg.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/macppc/dev/adb.c
diff -u src/sys/arch/macppc/dev/adb.c:1.32 src/sys/arch/macppc/dev/adb.c:1.33
--- src/sys/arch/macppc/dev/adb.c:1.32	Fri Jul  1 18:41:51 2011
+++ src/sys/arch/macppc/dev/adb.c	Wed Feb  1 02:02:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb.c,v 1.32 2011/07/01 18:41:51 dyoung Exp $	*/
+/*	$NetBSD: adb.c,v 1.33 2012/02/01 02:02:07 matt Exp $	*/
 
 /*-
  * Copyright (C) 1994	Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adb.c,v 1.32 2011/07/01 18:41:51 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: adb.c,v 1.33 2012/02/01 02:02:07 matt Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -107,7 +107,7 @@ adbattach(device_t parent, device_t self
 	int totaladbs;
 	int adbindex, adbaddr, adb_node;
 
-	extern volatile u_char *Via1Base;
+	extern volatile uint8_t *Via1Base;
 
 	ca-ca_reg[0] += ca-ca_baseaddr;
 

Index: src/sys/arch/macppc/dev/adb_direct.c
diff -u src/sys/arch/macppc/dev/adb_direct.c:1.42 src/sys/arch/macppc/dev/adb_direct.c:1.43
--- src/sys/arch/macppc/dev/adb_direct.c:1.42	Wed Mar 18 10:22:31 2009
+++ src/sys/arch/macppc/dev/adb_direct.c	Wed Feb  1 02:02:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb_direct.c,v 1.42 2009/03/18 10:22:31 cegger Exp $	*/
+/*	$NetBSD: adb_direct.c,v 1.43 2012/02/01 02:02:07 matt Exp $	*/
 
 /* From: adb_direct.c 2.02 4/18/97 jpw */
 
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adb_direct.c,v 1.42 2009/03/18 10:22:31 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: adb_direct.c,v 1.43 2012/02/01 02:02:07 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -224,7 +224,7 @@ int	adb_cuda_serial = 0;		/* the current
 struct callout adb_cuda_tickle_ch;
 struct callout adb_soft_intr_ch;
 
-volatile u_char *Via1Base;
+volatile uint8_t *Via1Base;
 extern int adb_polling;			/* Are we polling? */
 
 void	pm_setup_adb(void);

Index: src/sys/arch/macppc/dev/viareg.h
diff -u src/sys/arch/macppc/dev/viareg.h:1.8 src/sys/arch/macppc/dev/viareg.h:1.9
--- src/sys/arch/macppc/dev/viareg.h:1.8	Sat Mar 14 14:46:01 2009
+++ src/sys/arch/macppc/dev/viareg.h	Wed Feb  1 02:02:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: viareg.h,v 1.8 2009/03/14 14:46:01 dsl Exp $	*/
+/*	$NetBSD: viareg.h,v 1.9 2012/02/01 02:02:07 matt Exp $	*/
 
 /*-
  * Copyright (C) 1993	Allen K. Briggs, Chris P. Caputo,
@@ -201,46 +201,41 @@ static inline void write_via_reg(int, in
 static inline int read_via_reg(int, int);
 
 static inline void
-via_reg_and(ign, reg, val) 
-	int ign, reg, val;
+via_reg_and(int ign, int reg, int val) 
 {
-	volatile unsigned char *addr = Via1Base + reg;
+	volatile uint8_t *addr = Via1Base + reg;
 
 	out8(addr, in8(addr)  val);
 }
 
 static inline void
-via_reg_or(ign, reg, val) 
-	int ign, reg, val;
+via_reg_or(int ign, int reg, int val) 
 {
-	volatile unsigned char *addr = Via1Base + reg;
+	volatile uint8_t *addr = Via1Base + reg;
 
 	out8(addr, in8(addr) | val);
 }
 
 static inline void
-via_reg_xor(ign, reg, val) 
-	int ign, reg, val;
+via_reg_xor(int ign, int reg, int val) 
 {
-	volatile unsigned char *addr = Via1Base + reg;
+	volatile uint8_t *addr = Via1Base + reg;
 
 	out8(addr, in8(addr) ^ val);
 }
 
 static inline int
-read_via_reg(ign, reg)
-	int ign, reg;
+read_via_reg(int ign, int reg)
 {
-	volatile unsigned char *addr = Via1Base + reg;
+	volatile uint8_t *addr = Via1Base + reg;
 
 	return in8(addr);
 }
 
 static inline void
-write_via_reg(ign, reg, val)
-	int ign, reg, val;
+write_via_reg(int ign, int reg, int val)
 {
-	volatile unsigned char *addr = Via1Base + reg;
+	volatile uint8_t *addr = Via1Base + reg;
 
 	out8(addr, val);
 }



CVS commit: src/sys/arch/powerpc

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:03:52 UTC 2012

Modified Files:
src/sys/arch/powerpc/include: openpic.h
src/sys/arch/powerpc/pic: pic_mpcsoc.c

Log Message:
Use C89 function prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/openpic.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/pic/pic_mpcsoc.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/include/openpic.h
diff -u src/sys/arch/powerpc/include/openpic.h:1.7 src/sys/arch/powerpc/include/openpic.h:1.8
--- src/sys/arch/powerpc/include/openpic.h:1.7	Sat Mar 14 14:46:05 2009
+++ src/sys/arch/powerpc/include/openpic.h	Wed Feb  1 02:03:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpic.h,v 1.7 2009/03/14 14:46:05 dsl Exp $	*/
+/*	$NetBSD: openpic.h,v 1.8 2012/02/01 02:03:51 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -32,40 +32,35 @@
 
 extern volatile unsigned char *openpic_base;
 
-static __inline u_int openpic_read(int);
-static __inline void openpic_write(int, u_int);
+static __inline uint32_t openpic_read(u_int);
+static __inline void openpic_write(u_int, uint32_t);
 static __inline int openpic_read_irq(int);
 static __inline void openpic_eoi(int);
 
-static __inline u_int
-openpic_read(reg)
-	int reg;
+static __inline uint32_t
+openpic_read(u_int reg)
 {
-	volatile unsigned char *addr = openpic_base + reg;
+	volatile uint8_t *addr = openpic_base + reg;
 
 	return in32rb(addr);
 }
 
 static __inline void
-openpic_write(reg, val)
-	int reg;
-	u_int val;
+openpic_write(u_int reg, uint32_t val)
 {
-	volatile unsigned char *addr = openpic_base + reg;
+	volatile uint8_t *addr = openpic_base + reg;
 
 	out32rb(addr, val);
 }
 
 static __inline int
-openpic_read_irq(cpu)
-	int cpu;
+openpic_read_irq(int cpu)
 {
 	return openpic_read(OPENPIC_IACK(cpu))  OPENPIC_VECTOR_MASK;
 }
 
 static __inline void
-openpic_eoi(cpu)
-	int cpu;
+openpic_eoi(int cpu)
 {
 	openpic_write(OPENPIC_EOI(cpu), 0);
 	openpic_read(OPENPIC_EOI(cpu));

Index: src/sys/arch/powerpc/pic/pic_mpcsoc.c
diff -u src/sys/arch/powerpc/pic/pic_mpcsoc.c:1.3 src/sys/arch/powerpc/pic/pic_mpcsoc.c:1.4
--- src/sys/arch/powerpc/pic/pic_mpcsoc.c:1.3	Sat Jan 14 19:35:59 2012
+++ src/sys/arch/powerpc/pic/pic_mpcsoc.c	Wed Feb  1 02:03:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_mpcsoc.c,v 1.3 2012/01/14 19:35:59 phx Exp $ */
+/*	$NetBSD: pic_mpcsoc.c,v 1.4 2012/02/01 02:03:52 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic_mpcsoc.c,v 1.3 2012/01/14 19:35:59 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic_mpcsoc.c,v 1.4 2012/02/01 02:03:52 matt Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -143,7 +143,7 @@ setup_mpcpic(void *addr)
 }
 
 void
-mpcpic_reserv16()
+mpcpic_reserv16(void)
 {
 	extern int max_base; /* intr.c */
 



CVS commit: src/sys/arch

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:05:14 UTC 2012

Modified Files:
src/sys/arch/evbmips/rasoc: machdep.c
src/sys/arch/mips/ralink: ralink_com.c ralink_var.h

Log Message:
Fix early console support.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/rasoc/machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ralink/ralink_com.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/ralink/ralink_var.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/evbmips/rasoc/machdep.c
diff -u src/sys/arch/evbmips/rasoc/machdep.c:1.5 src/sys/arch/evbmips/rasoc/machdep.c:1.6
--- src/sys/arch/evbmips/rasoc/machdep.c:1.5	Tue Aug 16 06:59:19 2011
+++ src/sys/arch/evbmips/rasoc/machdep.c	Wed Feb  1 02:05:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.5 2011/08/16 06:59:19 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.6 2012/02/01 02:05:14 matt Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.5 2011/08/16 06:59:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.6 2012/02/01 02:05:14 matt Exp $);
 
 #include sys/param.h
 #include sys/boot_flag.h
@@ -107,13 +107,13 @@ mach_init(void)
 
 	memset(edata, 0, kernend - (vaddr_t)edata);
 
-#ifdef RA_CONSOLE_EARLY
+#ifdef RALINK_CONSOLE_EARLY
 	/*
 	 * set up early console
 	 *  cannot printf until sometime (?) in mips_vector_init
 	 *  meanwhile can use the ra_console_putc primitive if necessary
 	 */
-	ra_console_early();
+	ralink_console_early();
 #endif
 
 	/* set CPU model info for sysctl_hw */

Index: src/sys/arch/mips/ralink/ralink_com.c
diff -u src/sys/arch/mips/ralink/ralink_com.c:1.2 src/sys/arch/mips/ralink/ralink_com.c:1.3
--- src/sys/arch/mips/ralink/ralink_com.c:1.2	Thu Jul 28 15:38:49 2011
+++ src/sys/arch/mips/ralink/ralink_com.c	Wed Feb  1 02:05:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_com.c,v 1.2 2011/07/28 15:38:49 matt Exp $	*/
+/*	$NetBSD: ralink_com.c,v 1.3 2012/02/01 02:05:14 matt Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -130,7 +130,7 @@
 /* ralink_com.c -- Ralink 3052 uart console driver */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ralink_com.c,v 1.2 2011/07/28 15:38:49 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ralink_com.c,v 1.3 2012/02/01 02:05:14 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -195,6 +195,45 @@ uart_write(const u_int offset, const uin
 	*RA_IOREG_VADDR(RA_UART_LITE_BASE, offset) = val;
 }
 
+#ifdef RALINK_CONSOLE_EARLY
+static int
+ralink_cngetc(dev_t dv)
+{
+if ((uart_read(RA_UART_LSR)  LSR_RXRDY) == 0)
+		return -1;
+
+	return uart_read(RA_UART_RBR)  0xff;
+}
+
+static void
+ralink_cnputc(dev_t dv, int c)
+{
+	int timo = 15;
+
+while ((uart_read(RA_UART_LSR)  LSR_TXRDY) == 0  --timo  0)
+		;
+
+	uart_write(RA_UART_TBR, c);
+	__asm __volatile(sync);
+
+	timo = 15;
+while ((uart_read(RA_UART_LSR)  LSR_TSRE) == 0  --timo  0)
+		;
+}
+
+static struct consdev ralink_earlycons = {
+	.cn_putc = ralink_cnputc,
+	.cn_getc = ralink_cngetc,
+	.cn_pollc = nullcnpollc,
+};
+
+void
+ralink_console_early(void)
+{
+	cn_tab = ralink_earlycons;
+}
+#endif
+
 
 int
 ralink_com_match(device_t parent, cfdata_t cf, void *aux)

Index: src/sys/arch/mips/ralink/ralink_var.h
diff -u src/sys/arch/mips/ralink/ralink_var.h:1.4 src/sys/arch/mips/ralink/ralink_var.h:1.5
--- src/sys/arch/mips/ralink/ralink_var.h:1.4	Wed Aug  3 16:26:53 2011
+++ src/sys/arch/mips/ralink/ralink_var.h	Wed Feb  1 02:05:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_var.h,v 1.4 2011/08/03 16:26:53 matt Exp $	*/
+/*	$NetBSD: ralink_var.h,v 1.5 2012/02/01 02:05:14 matt Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -57,8 +57,8 @@ extern int ra_check_memo_reg(int);
 /* helper defines */
 #define MS_TO_HZ(ms) ((ms) * hz / 1000)
 
-#ifdef RA_CONSOLE_EARLY
-extern void ra_console_early(void);
+#ifdef RALINK_CONSOLE_EARLY
+extern void ralink_console_early(void);
 #endif
 
 #endif	/* _RALINK_VAR_H_ */



CVS commit: src/sys/arch/mips/include

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:05:51 UTC 2012

Modified Files:
src/sys/arch/mips/include: mips_param.h

Log Message:
Add ALIGNBYTES32/ALIGN32 for netbsd32.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mips/include/mips_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/mips/include/mips_param.h
diff -u src/sys/arch/mips/include/mips_param.h:1.32 src/sys/arch/mips/include/mips_param.h:1.33
--- src/sys/arch/mips/include/mips_param.h:1.32	Tue Jan 24 20:03:37 2012
+++ src/sys/arch/mips/include/mips_param.h	Wed Feb  1 02:05:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_param.h,v 1.32 2012/01/24 20:03:37 christos Exp $	*/
+/*	$NetBSD: mips_param.h,v 1.33 2012/02/01 02:05:51 matt Exp $	*/
 
 #ifdef _KERNEL
 #include machine/cpu.h
@@ -40,6 +40,9 @@
 #define MACHINE mips
 #endif
 
+#define ALIGNBYTES32		(sizeof(double) - 1)
+#define ALIGN32(p)		(((uintptr_t)(p) + ALIGNBYTES32) ~ALIGNBYTES32)
+
 /*
  * On mips, UPAGES is fixed by sys/arch/mips/mips/locore code
  * to be the number of per-process-wired kernel-stack pages/PTES.



CVS commit: src/sys/uvm

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:22:28 UTC 2012

Modified Files:
src/sys/uvm: uvm_km.c

Log Message:
Use right UVM_xxx_COLORMATCH flag (even both use the same value).


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/uvm/uvm_km.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.114 src/sys/uvm/uvm_km.c:1.115
--- src/sys/uvm/uvm_km.c:1.114	Tue Jan 31 00:30:52 2012
+++ src/sys/uvm/uvm_km.c	Wed Feb  1 02:22:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.114 2012/01/31 00:30:52 matt Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.115 2012/02/01 02:22:27 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -120,7 +120,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.114 2012/01/31 00:30:52 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_km.c,v 1.115 2012/02/01 02:22:27 matt Exp $);
 
 #include opt_uvmhist.h
 
@@ -670,7 +670,7 @@ again:
 		loopva, loopsize, vm);
 
 		pg = uvm_pagealloc(NULL, loopva, NULL,
-		UVM_KMF_COLORMATCH
+		UVM_FLAG_COLORMATCH
 		| ((flags  VM_SLEEP) ? 0 : UVM_PGA_USERESERVE));
 		if (__predict_false(pg == NULL)) {
 			if (flags  VM_SLEEP) {



CVS commit: src/sys

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:27:24 UTC 2012

Modified Files:
src/sys/kern: uipc_socket.c
src/sys/nfs: nfs_serv.c
src/sys/sys: socketvar.h

Log Message:
When using socket loaning, make sure the KVA used for the loan has the same
color as the UVA being loaned.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.162 -r1.163 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.128 -r1.129 src/sys/sys/socketvar.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/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.208 src/sys/kern/uipc_socket.c:1.209
--- src/sys/kern/uipc_socket.c:1.208	Fri Jan 27 19:48:40 2012
+++ src/sys/kern/uipc_socket.c	Wed Feb  1 02:27:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.208 2012/01/27 19:48:40 para Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.209 2012/02/01 02:27:23 matt Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.208 2012/01/27 19:48:40 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.209 2012/02/01 02:27:23 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_sock_counters.h
@@ -197,7 +197,7 @@ sokvaunreserve(vsize_t len)
  */
 
 vaddr_t
-sokvaalloc(vsize_t len, struct socket *so)
+sokvaalloc(vaddr_t sva, vsize_t len, struct socket *so)
 {
 	vaddr_t lva;
 
@@ -212,7 +212,8 @@ sokvaalloc(vsize_t len, struct socket *s
 	 * allocate kva.
 	 */
 
-	lva = uvm_km_alloc(kernel_map, len, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+	lva = uvm_km_alloc(kernel_map, len, atop(sva)  uvmexp.colormask,
+	UVM_KMF_COLORMATCH | UVM_KMF_VAONLY | UVM_KMF_WAITVA);
 	if (lva == 0) {
 		sokvaunreserve(len);
 		return (0);
@@ -349,7 +350,7 @@ sosend_loan(struct socket *so, struct ui
 
 	KASSERT(npgs = M_EXT_MAXPAGES);
 
-	lva = sokvaalloc(len, so);
+	lva = sokvaalloc(sva, len, so);
 	if (lva == 0)
 		return 0;
 

Index: src/sys/nfs/nfs_serv.c
diff -u src/sys/nfs/nfs_serv.c:1.162 src/sys/nfs/nfs_serv.c:1.163
--- src/sys/nfs/nfs_serv.c:1.162	Mon Nov 21 09:07:59 2011
+++ src/sys/nfs/nfs_serv.c	Wed Feb  1 02:27:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_serv.c,v 1.162 2011/11/21 09:07:59 hannken Exp $	*/
+/*	$NetBSD: nfs_serv.c,v 1.163 2012/02/01 02:27:24 matt Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_serv.c,v 1.162 2011/11/21 09:07:59 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_serv.c,v 1.163 2012/02/01 02:27:24 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -699,7 +699,8 @@ nfsrv_read(struct nfsrv_descript *nfsd, 
 			KASSERT(npages = M_EXT_MAXPAGES); /* XXX */
 
 			/* allocate kva for mbuf data */
-			lva = sokvaalloc(npages  PAGE_SHIFT, slp-ns_so);
+			lva = sokvaalloc(pgoff, npages  PAGE_SHIFT,
+			slp-ns_so);
 			if (lva == 0) {
 /* fall back to VOP_READ */
 goto loan_fail;

Index: src/sys/sys/socketvar.h
diff -u src/sys/sys/socketvar.h:1.128 src/sys/sys/socketvar.h:1.129
--- src/sys/sys/socketvar.h:1.128	Wed Dec 21 19:27:47 2011
+++ src/sys/sys/socketvar.h	Wed Feb  1 02:27:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: socketvar.h,v 1.128 2011/12/21 19:27:47 christos Exp $	*/
+/*	$NetBSD: socketvar.h,v 1.129 2012/02/01 02:27:23 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -508,7 +508,7 @@ void	sblastmbufchk(struct sockbuf *, con
 #endif /* SOCKBUF_DEBUG */
 
 /* sosend loan */
-vaddr_t	sokvaalloc(vsize_t, struct socket *);
+vaddr_t	sokvaalloc(vaddr_t, vsize_t, struct socket *);
 void	sokvafree(vaddr_t, vsize_t);
 void	soloanfree(struct mbuf *, void *, size_t, void *);
 



CVS commit: src/distrib/evbarm/instkernel/instkernel

2012-01-31 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Wed Feb  1 03:35:14 UTC 2012

Modified Files:
src/distrib/evbarm/instkernel/instkernel: Makefile

Log Message:
add MINI2440_INSTALL image to the distribution.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/evbarm/instkernel/instkernel/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/evbarm/instkernel/instkernel/Makefile
diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.14 src/distrib/evbarm/instkernel/instkernel/Makefile:1.15
--- src/distrib/evbarm/instkernel/instkernel/Makefile:1.14	Fri Oct 31 02:04:04 2008
+++ src/distrib/evbarm/instkernel/instkernel/Makefile	Wed Feb  1 03:35:14 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2008/10/31 02:04:04 cliff Exp $
+#	$NetBSD: Makefile,v 1.15 2012/02/01 03:35:14 nisimura Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -15,6 +15,7 @@ MDSETTARGETS=		ADI_BRH_INSTALL		${RAMDIS
 			INTEGRATOR_INSTALL	${RAMDISK}	-	\
 			IQ80310_INSTALL		${RAMDISK}	-	\
 			IQ80321_INSTALL		${RAMDISK}	-	\
+			MINI2440_INSTALL	${RAMDISK}	-	\
 			TS7200_INSTALL		${RAMDISK}	- 	\
 			TEAMASA_NPWR_INSTALL	${RAMDISK}	-
 .else



CVS commit: src/usr.sbin/quotactl

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:07:08 UTC 2012

Modified Files:
src/usr.sbin/quotactl: quotaprop.h

Log Message:
Remove unwanted decl of the old quotactl syscall.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/quotactl/quotaprop.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/quotactl/quotaprop.h
diff -u src/usr.sbin/quotactl/quotaprop.h:1.1 src/usr.sbin/quotactl/quotaprop.h:1.2
--- src/usr.sbin/quotactl/quotaprop.h:1.1	Mon Jan 30 19:31:31 2012
+++ src/usr.sbin/quotactl/quotaprop.h	Wed Feb  1 05:07:08 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: quotaprop.h,v 1.1 2012/01/30 19:31:31 dholland Exp $ */
+/* $NetBSD: quotaprop.h,v 1.2 2012/02/01 05:07:08 dholland Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -84,10 +84,4 @@ prop_dictionary_t limits64toprop(uint64_
 prop_dictionary_t quota64toprop(uid_t, int, uint64_t *[], const char *[], int,
 const char *[], int);
 
-#if !defined(_KERNEL)  !defined(_STANDALONE)
-__BEGIN_DECLS
-int quotactl(const char *, struct plistref *) __RENAME(__quotactl50);
-__END_DECLS
-#endif
-
 #endif /* _QUOTA_QUOTAPROP_H_ */



CVS commit: src/sys/ufs/ufs

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:10:45 UTC 2012

Modified Files:
src/sys/ufs/ufs: ufs_quota2.c

Log Message:
Fix problems in cursor iteration that came to light when iterating one
value at a time, instead of in bulk. Yeah, repquota should do bulk get,
but it doesn't yet.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/ufs/ufs/ufs_quota2.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/ufs/ufs/ufs_quota2.c
diff -u src/sys/ufs/ufs/ufs_quota2.c:1.30 src/sys/ufs/ufs/ufs_quota2.c:1.31
--- src/sys/ufs/ufs/ufs_quota2.c:1.30	Sun Jan 29 07:21:00 2012
+++ src/sys/ufs/ufs/ufs_quota2.c	Wed Feb  1 05:10:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.30 2012/01/29 07:21:00 dholland Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.31 2012/02/01 05:10:44 dholland Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -26,7 +26,7 @@
   */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_quota2.c,v 1.30 2012/01/29 07:21:00 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_quota2.c,v 1.31 2012/02/01 05:10:44 dholland Exp $);
 
 #include sys/buf.h
 #include sys/param.h
@@ -1158,7 +1158,10 @@ q2cursor_getkeys(struct ufsmount *ump, i
 	/* If we haven't done the defaults yet, that goes first. */
 	if (cursor-q2c_defaults_done == 0) {
 		q2cursor_addid(state, idtype, QUOTA_DEFAULTID);
-		cursor-q2c_defaults_done = 1;
+		/* if we read both halves, mark it done */
+		if (state-numids  state-maxids || !state-skiplast) {
+			cursor-q2c_defaults_done = 1;
+		}
 	}
 
 	gi.state = state;
@@ -1181,14 +1184,22 @@ q2cursor_getkeys(struct ufsmount *ump, i
 		if (error == Q2WL_ABORT) {
 			/* callback stopped before reading whole chain */
 			cursor-q2c_uidpos = gi.new_skip;
+			/* if we didn't get both halves, back up */
+			if (state-numids == state-maxids  state-skiplast){
+KASSERT(cursor-q2c_uidpos  0);
+cursor-q2c_uidpos--;
+			}
 			/* not an error */
 			error = 0;
 		} else if (error) {
 			break;
 		} else {
-			/* read whole chain, advance to next */
-			cursor-q2c_uidpos = 0;
-			cursor-q2c_hashpos++;
+			/* read whole chain */
+			/* if we got both halves of the last id, advance */
+			if (state-numids  state-maxids || !state-skiplast){
+cursor-q2c_uidpos = 0;
+cursor-q2c_hashpos++;
+			}
 		}
 	}
 



CVS commit: src

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:12:45 UTC 2012

Modified Files:
src/tests/fs/ffs: t_miscquota.sh
src/usr.sbin/repquota: repquota.8 repquota.c

Log Message:
Reimplement repquota -x to print in tabular form instead of XML.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/ffs/t_miscquota.sh
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/repquota/repquota.8
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/repquota/repquota.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/ffs/t_miscquota.sh
diff -u src/tests/fs/ffs/t_miscquota.sh:1.4 src/tests/fs/ffs/t_miscquota.sh:1.5
--- src/tests/fs/ffs/t_miscquota.sh:1.4	Wed Jan 18 20:51:23 2012
+++ src/tests/fs/ffs/t_miscquota.sh	Wed Feb  1 05:12:45 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_miscquota.sh,v 1.4 2012/01/18 20:51:23 bouyer Exp $ 
+# $NetBSD: t_miscquota.sh,v 1.5 2012/02/01 05:12:45 dholland Exp $ 
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -82,7 +82,7 @@ quota_walk_list()
 		i=$((i + 1))
 	done
 	# do a repquota
-	atf_check -s exit:0 -o 'match:integer0x64000' \
+	atf_check -s exit:0 -o 'match:user 409600 blocks  *81920 20 0' \
 	env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -x -${expect} /mnt
 	rump_quota_shutdown
 }

Index: src/usr.sbin/repquota/repquota.8
diff -u src/usr.sbin/repquota/repquota.8:1.11 src/usr.sbin/repquota/repquota.8:1.12
--- src/usr.sbin/repquota/repquota.8:1.11	Sun Mar  6 17:36:32 2011
+++ src/usr.sbin/repquota/repquota.8	Wed Feb  1 05:12:45 2012
@@ -29,7 +29,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)repquota.8	8.1 (Berkeley) 6/6/93
-.\	$NetBSD: repquota.8,v 1.11 2011/03/06 17:36:32 wiz Exp $
+.\	$NetBSD: repquota.8,v 1.12 2012/02/01 05:12:45 dholland Exp $
 .\
 .Dd February 10, 2011
 .Dt REPQUOTA 8
@@ -71,8 +71,8 @@ group and user quotas if they exist).
 Print a header line before printing each file system quotas.
 Print all exiting quotas, including those whose current usage is 0.
 .It Fl x
-export file system quota in a plist format suitable for
-.Xr quotactl 8 .
+export file system quota in a tabular dump format suitable for
+.Xr quotarestore 8 .
 A single file system should be specified.
 .El
 .Pp
@@ -86,12 +86,12 @@ printed, along with any quotas created w
 Only the super-user may use this command.
 .Sh SEE ALSO
 .Xr quota 1 ,
-.Xr quotactl 2 ,
+.Xr libquota 3 ,
 .Xr fstab 5 ,
 .Xr edquota 8 ,
 .Xr quotacheck 8 ,
-.Xr quotactl 8 ,
-.Xr quotaon 8
+.Xr quotaon 8 ,
+.Xr quotarestore 8
 .Sh HISTORY
 The
 .Nm

Index: src/usr.sbin/repquota/repquota.c
diff -u src/usr.sbin/repquota/repquota.c:1.39 src/usr.sbin/repquota/repquota.c:1.40
--- src/usr.sbin/repquota/repquota.c:1.39	Sun Jan 29 07:23:52 2012
+++ src/usr.sbin/repquota/repquota.c	Wed Feb  1 05:12:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: repquota.c,v 1.39 2012/01/29 07:23:52 dholland Exp $	*/
+/*	$NetBSD: repquota.c,v 1.40 2012/02/01 05:12:45 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)repquota.c	8.2 (Berkeley) 11/22/94;
 #else
-__RCSID($NetBSD: repquota.c,v 1.39 2012/01/29 07:23:52 dholland Exp $);
+__RCSID($NetBSD: repquota.c,v 1.40 2012/02/01 05:12:45 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -65,7 +65,6 @@ __RCSID($NetBSD: repquota.c,v 1.39 2012
 #include unistd.h
 
 #include quota/quota.h
-#include quota/quotaprop.h
 #include quota.h
 
 #include printquota.h
@@ -395,69 +394,77 @@ printquotas(int idtype, struct quotahand
 }
 
 static void
-exportquotas(void)
+exportquotaval(const struct quotaval *qv)
 {
-	uint32_t id;
-	struct fileusage *fup;
-	prop_dictionary_t dict, data;
-	prop_array_t cmds, datas;
-	int idtype;
-	uint64_t *valuesp[QUOTA_NLIMITS];
+	if (qv-qv_hardlimit == QUOTA_NOLIMIT) {
+		printf( -);
+	} else {
+		printf( %llu, (unsigned long long)qv-qv_hardlimit);
+	}
 
-	dict = quota_prop_create();
-	cmds = prop_array_create();
+	if (qv-qv_softlimit == QUOTA_NOLIMIT) {
+		printf( -);
+	} else {
+		printf( %llu, (unsigned long long)qv-qv_softlimit);
+	}
 
-	if (dict == NULL || cmds == NULL) {
-		errx(1, can't allocate proplist);
+	printf( %llu, (unsigned long long)qv-qv_usage);
+
+	if (qv-qv_expiretime == QUOTA_NOTIME) {
+		printf( -);
+	} else {
+		printf( %lld, (long long)qv-qv_expiretime);
 	}
 
+	if (qv-qv_grace == QUOTA_NOTIME) {
+		printf( -);
+	} else {
+		printf( %lld, (long long)qv-qv_grace);
+	}
+}
+
+static void
+exportquotas(void)
+{
+	int idtype;
+	id_t id;
+	struct fileusage *fup;
+
+	/* header */
+	printf(@format netbsd-quota-dump v1\n);
+	printf(# idtype id objtype   hard soft usage expire grace\n);
 
 	for (idtype = 0; idtype  REPQUOTA_NUMIDTYPES; idtype++) {
 		if (valid[idtype] == 0)
 			continue;
-		datas = prop_array_create();
-		if (datas == NULL)
-			errx(1, can't allocate proplist);
-		

CVS commit: src/sys

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:16:56 UTC 2012

Modified Files:
src/sys/sys: quotactl.h
src/sys/ufs/ufs: ufs_quota.c

Log Message:
Add QUOTACTL_IDTYPESTAT and QUOTACTL_OBJTYPESTAT for retrieving info
about idtypes and objtypes. This avoids compiling in the names of
the id and object types.

I overlooked this last week because the proplib syscall interface has
no way to convey this information.

Renumber the operation codes again (since we still can) to insert
the new operations into the list in a semantically sensible place.

Requires kernel version bump.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/sys/quotactl.h
cvs rdiff -u -r1.105 -r1.106 src/sys/ufs/ufs/ufs_quota.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/sys/quotactl.h
diff -u src/sys/sys/quotactl.h:1.31 src/sys/sys/quotactl.h:1.32
--- src/sys/sys/quotactl.h:1.31	Sun Jan 29 19:36:14 2012
+++ src/sys/sys/quotactl.h	Wed Feb  1 05:16:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quotactl.h,v 1.31 2012/01/29 19:36:14 dholland Exp $	*/
+/*	$NetBSD: quotactl.h,v 1.32 2012/02/01 05:16:56 dholland Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -49,6 +49,17 @@ struct quotastat {
 	unsigned qs_numobjtypes;
 	unsigned qs_restrictions;	/* semantic restriction codes */
 };
+
+/*
+ * Structures for QUOTACTL_IDTYPESTAT and QUOTACTL_OBJTYPESTAT.
+ */
+struct quotaidtypestat {
+	char qis_name[QUOTA_NAMELEN];
+};
+struct quotaobjtypestat {
+	char qos_name[QUOTA_NAMELEN];
+	int qos_isbytes;
+};
 
 /*
  * Semi-opaque structure for cursors. This holds the cursor state in
@@ -66,17 +77,19 @@ struct quotakcursor {
 
 /* Command codes. */
 #define QUOTACTL_STAT		0
-#define QUOTACTL_GET		1
-#define QUOTACTL_PUT		2
-#define QUOTACTL_DELETE		3
-#define QUOTACTL_CURSOROPEN	4
-#define QUOTACTL_CURSORCLOSE	5
-#define QUOTACTL_CURSORSKIPIDTYPE 6
-#define QUOTACTL_CURSORGET	7
-#define QUOTACTL_CURSORATEND	8
-#define QUOTACTL_CURSORREWIND	9
-#define QUOTACTL_QUOTAON	10
-#define QUOTACTL_QUOTAOFF	11
+#define QUOTACTL_IDTYPESTAT	1
+#define QUOTACTL_OBJTYPESTAT	2
+#define QUOTACTL_GET		3
+#define QUOTACTL_PUT		4
+#define QUOTACTL_DELETE		5
+#define QUOTACTL_CURSOROPEN	6
+#define QUOTACTL_CURSORCLOSE	7
+#define QUOTACTL_CURSORSKIPIDTYPE 8
+#define QUOTACTL_CURSORGET	9
+#define QUOTACTL_CURSORATEND	10
+#define QUOTACTL_CURSORREWIND	11
+#define QUOTACTL_QUOTAON	12
+#define QUOTACTL_QUOTAOFF	13
 
 /* Argument encoding. */
 struct vfs_quotactl_args {
@@ -86,6 +99,14 @@ struct vfs_quotactl_args {
 			struct quotastat *qc_ret;
 		} stat;
 		struct {
+			int qc_idtype;
+			struct quotaidtypestat *qc_info;
+		} idtypestat;
+		struct {
+			int qc_objtype;
+			struct quotaobjtypestat *qc_info;
+		} objtypestat;
+		struct {
 			const struct quotakey *qc_key;
 			struct quotaval *qc_ret;
 		} get;

Index: src/sys/ufs/ufs/ufs_quota.c
diff -u src/sys/ufs/ufs/ufs_quota.c:1.105 src/sys/ufs/ufs/ufs_quota.c:1.106
--- src/sys/ufs/ufs/ufs_quota.c:1.105	Sun Jan 29 11:59:14 2012
+++ src/sys/ufs/ufs/ufs_quota.c	Wed Feb  1 05:16:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.c,v 1.105 2012/01/29 11:59:14 para Exp $	*/
+/*	$NetBSD: ufs_quota.c,v 1.106 2012/02/01 05:16:56 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_quota.c,v 1.105 2012/01/29 11:59:14 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_quota.c,v 1.106 2012/02/01 05:16:56 dholland Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_quota.h
@@ -72,6 +72,10 @@ static pool_cache_t dquot_cache;
 
 static int quota_handle_cmd_stat(struct mount *, struct lwp *,
 struct vfs_quotactl_args *args);
+static int quota_handle_cmd_idtypestat(struct mount *, struct lwp *,
+struct vfs_quotactl_args *args);
+static int quota_handle_cmd_objtypestat(struct mount *, struct lwp *,
+struct vfs_quotactl_args *args);
 static int quota_handle_cmd_get(struct mount *, struct lwp *,
 struct vfs_quotactl_args *args);
 static int quota_handle_cmd_put(struct mount *, struct lwp *,
@@ -172,6 +176,12 @@ quota_handle_cmd(struct mount *mp, struc
 	case QUOTACTL_STAT:
 		error = quota_handle_cmd_stat(mp, l, args);
 		break;
+	case QUOTACTL_IDTYPESTAT:
+		error = quota_handle_cmd_idtypestat(mp, l, args);
+		break;
+	case QUOTACTL_OBJTYPESTAT:
+		error = quota_handle_cmd_objtypestat(mp, l, args);
+		break;
 	case QUOTACTL_QUOTAON:
 		error = quota_handle_cmd_quotaon(mp, l, args);
 		break;
@@ -250,6 +260,76 @@ quota_handle_cmd_stat(struct mount *mp, 
 	return 0;
 }
 
+static int 
+quota_handle_cmd_idtypestat(struct mount *mp, struct lwp *l, 
+struct vfs_quotactl_args *args)
+{
+	struct ufsmount *ump = VFSTOUFS(mp);
+	int idtype;
+	struct quotaidtypestat *info;
+	const char *name;
+
+	KASSERT(args-qc_op == 

CVS commit: src/sys/arch/powerpc

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 05:25:58 UTC 2012

Modified Files:
src/sys/arch/powerpc/include/oea: bat.h spr.h
src/sys/arch/powerpc/oea: cpu_subr.c genassym.cf oea_machdep.c
ofw_rascons.c pmap.c
src/sys/arch/powerpc/powerpc: bus_space.c db_interface.c trap_subr.S

Log Message:
Enable XBSEN and HIGHBAT for OEA 7455 and related CPUs.
The BAT entries now have a resolution of 8MB.  (Adjacent entries are merged
up to a total of 2GB per entry).


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/oea/bat.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/include/oea/spr.h
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/oea/genassym.cf
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/powerpc/oea/oea_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/oea/ofw_rascons.c
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/powerpc/bus_space.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/powerpc/powerpc/db_interface.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/powerpc/powerpc/trap_subr.S

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/include/oea/bat.h
diff -u src/sys/arch/powerpc/include/oea/bat.h:1.14 src/sys/arch/powerpc/include/oea/bat.h:1.15
--- src/sys/arch/powerpc/include/oea/bat.h:1.14	Mon Jun 20 06:04:33 2011
+++ src/sys/arch/powerpc/include/oea/bat.h	Wed Feb  1 05:25:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bat.h,v 1.14 2011/06/20 06:04:33 matt Exp $	*/
+/*	$NetBSD: bat.h,v 1.15 2012/02/01 05:25:57 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -126,6 +126,8 @@ struct bat {
 #define	BAT_BL_2G	0xfffc
 #define	BAT_BL_4G	0x0001fffc
 
+#define	BAT_BL_TO_SIZE(bl)	(((bl)+4)  15)
+
 #define	BATU(va, len, v)		\
 	(((va)  BAT_EPI) | ((len)  BAT_BL) | ((v)  BAT_V))
 
@@ -196,7 +198,8 @@ struct bat {
 #define	BAT601_VALID_P(batl) \
 	((batl)  BAT601_V)
 
-#define	BAT_VA2IDX(va)	((va)  ADDR_SR_SHFT)
+#define	BAT_VA2IDX(va)	((va) / (8*1024*1024))
+#define	BAT_IDX2VA(i)	((i) * (8*1024*1024))
 
 #if defined(_KERNEL)  !defined(_LOCORE)
 void oea_batinit(paddr_t, ...);

Index: src/sys/arch/powerpc/include/oea/spr.h
diff -u src/sys/arch/powerpc/include/oea/spr.h:1.1 src/sys/arch/powerpc/include/oea/spr.h:1.2
--- src/sys/arch/powerpc/include/oea/spr.h:1.1	Thu Feb 25 23:30:05 2010
+++ src/sys/arch/powerpc/include/oea/spr.h	Wed Feb  1 05:25:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.1 2010/02/25 23:30:05 matt Exp $	*/
+/*	$NetBSD: spr.h,v 1.2 2012/02/01 05:25:57 matt Exp $	*/
 
 #ifndef _POWERPC_OEA_SPR_H_
 #define	_POWERPC_OEA_SPR_H_
@@ -108,6 +108,7 @@
 #define	SPR_DBAT6U		0x23c	/* ..6. Data BAT Reg 6 Upper */
 #define	SPR_DBAT6L		0x23d	/* ..6. Data BAT Reg 6 Lower */
 #define	SPR_DBAT7U		0x23e	/* ..6. Data BAT Reg 7 Upper */
+#define	SPR_DBAT7L		0x23f	/* ..6. Data BAT Reg 7 Upper */
 #define	SPR_UMMCR2		0x3a0	/* ..6. User Monitor Mode Control Register 2 */
 #define	SPR_UMMCR0		0x3a8	/* ..6. User Monitor Mode Control Register 0 */
 #define	SPR_USIA		0x3ab	/* ..6. User Sampled Instruction Address */

Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.71 src/sys/arch/powerpc/oea/cpu_subr.c:1.72
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.71	Mon Jan 23 16:22:57 2012
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Wed Feb  1 05:25:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.71 2012/01/23 16:22:57 phx Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.72 2012/02/01 05:25:57 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.71 2012/01/23 16:22:57 phx Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.72 2012/02/01 05:25:57 matt Exp $);
 
 #include opt_ppcparam.h
 #include opt_multiprocessor.h
@@ -269,17 +269,27 @@ cpu_model_init(void)
 	oeacpufeat = 0;
 	
 	if ((vers = IBMRS64II  vers = IBM970GX) || vers == MPC620 ||
-		vers == IBMCELL || vers == IBMPOWER6P5)
-		oeacpufeat |= OEACPU_64 | OEACPU_64_BRIDGE | OEACPU_NOBAT;
+		vers == IBMCELL || vers == IBMPOWER6P5) {
+		oeacpufeat |= OEACPU_64;
+		oeacpufeat |= OEACPU_64_BRIDGE;
+		oeacpufeat |= OEACPU_NOBAT;
 	
-	else if (vers == MPC601)
+	} else if (vers == MPC601) {
 		oeacpufeat |= OEACPU_601;
 
-	else if (MPC745X_P(vers)  vers != MPC7450)
-		oeacpufeat |= OEACPU_XBSEN | OEACPU_HIGHBAT | OEACPU_HIGHSPRG;
+	} else if (MPC745X_P(vers)  vers != MPC7450) {
+		oeacpufeat |= OEACPU_HIGHSPRG;
+		oeacpufeat |= OEACPU_XBSEN;
+		oeacpufeat |= OEACPU_HIGHBAT;
+		/* Enable more and larger BAT registers */
+		register_t hid0 = mfspr(SPR_HID0);
+		hid0 |= HID0_XBSEN;
+		hid0 |= HID0_HIGH_BAT_EN;
+		mtspr(SPR_HID0, hid0);
 
-	else if (vers == IBM750FX || vers == IBM750GX)
+	} else if (vers == IBM750FX || vers == IBM750GX) {

CVS commit: src/sys

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:39:28 UTC 2012

Modified Files:
src/sys/kern: vfs_syscalls.c
src/sys/sys: vfs_syscalls.h

Log Message:
Split out a do_sys_quotactl for compat_netbsd32.


To generate a diff of this commit:
cvs rdiff -u -r1.444 -r1.445 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.16 -r1.17 src/sys/sys/vfs_syscalls.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/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.444 src/sys/kern/vfs_syscalls.c:1.445
--- src/sys/kern/vfs_syscalls.c:1.444	Wed Feb  1 05:34:41 2012
+++ src/sys/kern/vfs_syscalls.c	Wed Feb  1 05:39:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.444 2012/02/01 05:34:41 dholland Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.445 2012/02/01 05:39:28 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.444 2012/02/01 05:34:41 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.445 2012/02/01 05:39:28 dholland Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_fileassoc.h
@@ -907,107 +907,113 @@ do_sys_quotactl_quotaoff(struct mount *m
 	return vfs_quotactl_quotaoff(mp, idtype);
 }
 
-/* ARGSUSED */
 int
-sys___quotactl(struct lwp *l, const struct sys___quotactl_args *uap,
-register_t *retval)
+do_sys_quotactl(const char *path_u, const struct quotactl_args *args)
 {
-	/* {
-		syscallarg(const char *) path;
-		syscallarg(struct quotactl_args *) args;
-	} */
 	struct mount *mp;
 	struct vnode *vp;
-	struct quotactl_args args;
 	int error;
 
-	error = namei_simple_user(SCARG(uap, path),
-NSM_FOLLOW_TRYEMULROOT, vp);
+	error = namei_simple_user(path_u, NSM_FOLLOW_TRYEMULROOT, vp);
 	if (error != 0)
 		return (error);
 	mp = vp-v_mount;
 
-	error = copyin(SCARG(uap, args), args, sizeof(args));
-	if (error) {
-		goto fail;
-	}
-
-	switch (args.qc_op) {
+	switch (args-qc_op) {
 	case QUOTACTL_STAT:
-		error = do_sys_quotactl_stat(mp, args.u.stat.qc_ret);
+		error = do_sys_quotactl_stat(mp, args-u.stat.qc_ret);
 		break;
 	case QUOTACTL_IDTYPESTAT:
 		error = do_sys_quotactl_idtypestat(mp,
-args.u.idtypestat.qc_idtype,
-args.u.idtypestat.qc_info);
+args-u.idtypestat.qc_idtype,
+args-u.idtypestat.qc_info);
 		break;
 	case QUOTACTL_OBJTYPESTAT:
 		error = do_sys_quotactl_objtypestat(mp,
-args.u.objtypestat.qc_objtype,
-args.u.objtypestat.qc_info);
+args-u.objtypestat.qc_objtype,
+args-u.objtypestat.qc_info);
 		break;
 	case QUOTACTL_GET:
 		error = do_sys_quotactl_get(mp,
-args.u.get.qc_key,
-args.u.get.qc_ret);
+args-u.get.qc_key,
+args-u.get.qc_ret);
 		break;
 	case QUOTACTL_PUT:
 		error = do_sys_quotactl_put(mp,
-args.u.put.qc_key,
-args.u.put.qc_val);
+args-u.put.qc_key,
+args-u.put.qc_val);
 		break;
 	case QUOTACTL_DELETE:
-		error = do_sys_quotactl_delete(mp, args.u.delete.qc_key);
+		error = do_sys_quotactl_delete(mp, args-u.delete.qc_key);
 		break;
 	case QUOTACTL_CURSOROPEN:
 		error = do_sys_quotactl_cursoropen(mp,
-args.u.cursoropen.qc_cursor);
+args-u.cursoropen.qc_cursor);
 		break;
 	case QUOTACTL_CURSORCLOSE:
 		error = do_sys_quotactl_cursorclose(mp,
-args.u.cursorclose.qc_cursor);
+args-u.cursorclose.qc_cursor);
 		break;
 	case QUOTACTL_CURSORSKIPIDTYPE:
 		error = do_sys_quotactl_cursorskipidtype(mp,
-args.u.cursorskipidtype.qc_cursor,
-args.u.cursorskipidtype.qc_idtype);
+args-u.cursorskipidtype.qc_cursor,
+args-u.cursorskipidtype.qc_idtype);
 		break;
 	case QUOTACTL_CURSORGET:
 		error = do_sys_quotactl_cursorget(mp,
-args.u.cursorget.qc_cursor,
-args.u.cursorget.qc_keys,
-args.u.cursorget.qc_vals,
-args.u.cursorget.qc_maxnum,
-args.u.cursorget.qc_ret);
+args-u.cursorget.qc_cursor,
+args-u.cursorget.qc_keys,
+args-u.cursorget.qc_vals,
+args-u.cursorget.qc_maxnum,
+args-u.cursorget.qc_ret);
 		break;
 	case QUOTACTL_CURSORATEND:
 		error = do_sys_quotactl_cursoratend(mp,
-args.u.cursoratend.qc_cursor,
-args.u.cursoratend.qc_ret);
+args-u.cursoratend.qc_cursor,
+args-u.cursoratend.qc_ret);
 		break;
 	case QUOTACTL_CURSORREWIND:
 		error = do_sys_quotactl_cursorrewind(mp,
-args.u.cursorrewind.qc_cursor);
+args-u.cursorrewind.qc_cursor);
 		break;
 	case QUOTACTL_QUOTAON:
 		error = do_sys_quotactl_quotaon(mp,
-args.u.quotaon.qc_idtype,
-args.u.quotaon.qc_quotafile);
+args-u.quotaon.qc_idtype,
+args-u.quotaon.qc_quotafile);
 		break;
 	case QUOTACTL_QUOTAOFF:
 		error = do_sys_quotactl_quotaoff(mp,
-args.u.quotaoff.qc_idtype);
+args-u.quotaoff.qc_idtype);
 		break;
 	default:
 		error = EINVAL;
 		break;
 	}
 
-fail:
 	vrele(vp);
 	return error;
 }
 
+/* ARGSUSED */
+int

CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:40:01 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_netbsd.c
netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c
netbsd32_sysent.c syscalls.master

Log Message:
Update compat_netbsd32 for new quotactl.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.177 -r1.178 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.97 -r1.98 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/netbsd32/syscalls.master

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.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.89 src/sys/compat/netbsd32/netbsd32.h:1.90
--- src/sys/compat/netbsd32/netbsd32.h:1.89	Tue Jan 31 22:51:41 2012
+++ src/sys/compat/netbsd32/netbsd32.h	Wed Feb  1 05:40:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.89 2012/01/31 22:51:41 matt Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.90 2012/02/01 05:40:00 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -68,7 +68,7 @@ typedef uint32_t netbsd32_uintptr_t;
 /* netbsd32_[u]int64 are machine dependent and defined below */
 
 /*
- * machine depedant section; must define:
+ * machine dependant section; must define:
  *	netbsd32_pointer_t
  *		- 32-bit pointer type, normally uint32_t but can be int32_t
  *		  for platforms which rely on sign-extension of pointers
@@ -268,6 +268,67 @@ struct netbsd32_export_args30 {
 /* from sys/poll.h */
 typedef netbsd32_pointer_t netbsd32_pollfdp_t;
 
+/* from sys/quotactl.h */
+typedef netbsd32_pointer_t netbsd32_quotactlargsp_t;
+struct netbsd32_quotactlargs {
+	unsigned qc_op;
+	union {
+		struct {
+			netbsd32_pointer_t qc_ret;
+		} stat;
+		struct {
+			int qc_idtype;
+			netbsd32_pointer_t qc_info;
+		} idtypestat;
+		struct {
+			int qc_objtype;
+			netbsd32_pointer_t qc_info;
+		} objtypestat;
+		struct {
+			netbsd32_pointer_t qc_key;
+			netbsd32_pointer_t qc_ret;
+		} get;
+		struct {
+			netbsd32_pointer_t qc_key;
+			netbsd32_pointer_t qc_val;
+		} put;
+		struct {
+			netbsd32_pointer_t qc_key;
+		} delete;
+		struct {
+			netbsd32_pointer_t qc_cursor;
+		} cursoropen;
+		struct {
+			netbsd32_pointer_t qc_cursor;
+		} cursorclose;
+		struct {
+			netbsd32_pointer_t qc_cursor;
+			unsigned qc_idtype;
+		} cursorskipidtype;
+		struct {
+			netbsd32_pointer_t qc_cursor;
+			netbsd32_pointer_t qc_keys;
+			netbsd32_pointer_t qc_vals;
+			unsigned qc_maxnum;
+			netbsd32_pointer_t qc_ret;
+		} cursorget;
+		struct {
+			netbsd32_pointer_t qc_cursor;
+			netbsd32_pointer_t qc_ret;
+		} cursoratend;
+		struct {
+			netbsd32_pointer_t qc_cursor;
+		} cursorrewind;
+		struct {
+			int qc_idtype;
+			netbsd32_pointer_t qc_quotafile;
+		} quotaon;
+		struct {
+			int qc_idtype;
+		} quotaoff;
+	} u;
+};
+
 /* from sys/resource.h */
 typedef netbsd32_pointer_t netbsd32_rusage50p_t;
 struct	netbsd32_rusage50 {

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.177 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.178
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.177	Tue Jan 31 22:53:56 2012
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Wed Feb  1 05:40:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.177 2012/01/31 22:53:56 matt Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.178 2012/02/01 05:40:00 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.177 2012/01/31 22:53:56 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.178 2012/02/01 05:40:00 dholland Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ddb.h
@@ -68,6 +68,7 @@ __KERNEL_RCSID(0, $NetBSD: netbsd32_net
 #include sys/filedesc.h
 #include sys/namei.h
 #include sys/dirent.h
+#include sys/quotactl.h
 #include sys/kauth.h
 #include sys/vfs_syscalls.h
 
@@ -1185,39 +1186,97 @@ netbsd32_rmdir(struct lwp *l, const stru
 }
 
 int
-netbsd32___quotactl50(struct lwp *l, const struct netbsd32___quotactl50_args *uap, register_t *retval)
+netbsd32___quotactl(struct lwp *l, const struct netbsd32___quotactl_args *uap, register_t *retval)
 {
 	/* {
 		syscallarg(const netbsd32_charp) path;
-		syscallarg(netbsd32_voidp) v;
+		syscallarg(netbsd32_voidp) args;
 	} */
-	struct plistref pref;
+	struct netbsd32_quotactlargs args32;
+	struct quotactl_args args;
 	int error;
-	struct vnode *vp;
-	struct mount *mp;
-	prop_dictionary_t dict;
 
-	error = namei_simple_user(SCARG_P32(uap, path),
-	NSM_FOLLOW_TRYEMULROOT, vp);
+	error = 

CVS commit: src/sys

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:42:18 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c
src/sys/kern: init_sysent.c syscalls.c
src/sys/rump/include/rump: rump_syscalls.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/sys: syscall.h syscallargs.h

Log Message:
Regen syscalls with proper id info.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.97 -r1.98 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c
cvs rdiff -u -r1.259 -r1.260 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.250 -r1.251 src/sys/kern/syscalls.c
cvs rdiff -u -r1.53 -r1.54 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.75 -r1.76 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.246 -r1.247 src/sys/sys/syscall.h
cvs rdiff -u -r1.229 -r1.230 src/sys/sys/syscallargs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_syscall.h
diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.98 src/sys/compat/netbsd32/netbsd32_syscall.h:1.99
--- src/sys/compat/netbsd32/netbsd32_syscall.h:1.98	Wed Feb  1 05:40:00 2012
+++ src/sys/compat/netbsd32/netbsd32_syscall.h	Wed Feb  1 05:42:17 2012
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscall.h,v 1.98 2012/02/01 05:40:00 dholland Exp $ */
+/* $NetBSD: netbsd32_syscall.h,v 1.99 2012/02/01 05:42:17 dholland Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.89 2012/01/31 22:52:19 matt Exp
+ * created from	NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALL_H_
@@ -1257,6 +1257,9 @@
 /* syscall: netbsd32_futimens ret: int args: int const netbsd32_timespecp_t */
 #define	NETBSD32_SYS_netbsd32_futimens	472
 
-#define	NETBSD32_SYS_MAXSYSCALL	473
+/* syscall: netbsd32___quotactl ret: int args: const netbsd32_charp netbsd32_voidp */
+#define	NETBSD32_SYS_netbsd32___quotactl	473
+
+#define	NETBSD32_SYS_MAXSYSCALL	474
 #define	NETBSD32_SYS_NSYSENT	512
 #endif /* _NETBSD32_SYS_SYSCALL_H_ */
Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h
diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.98 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.99
--- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.98	Wed Feb  1 05:40:00 2012
+++ src/sys/compat/netbsd32/netbsd32_syscallargs.h	Wed Feb  1 05:42:17 2012
@@ -1,10 +1,10 @@
-/* $NetBSD: netbsd32_syscallargs.h,v 1.98 2012/02/01 05:40:00 dholland Exp $ */
+/* $NetBSD: netbsd32_syscallargs.h,v 1.99 2012/02/01 05:42:17 dholland Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.89 2012/01/31 22:52:19 matt Exp
+ * created from	NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
  */
 
 #ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@@ -2453,6 +2453,12 @@ struct netbsd32_futimens_args {
 };
 check_syscall_args(netbsd32_futimens)
 
+struct netbsd32___quotactl_args {
+	syscallarg(const netbsd32_charp) path;
+	syscallarg(netbsd32_voidp) args;
+};
+check_syscall_args(netbsd32___quotactl)
+
 /*
  * System call prototypes.
  */
@@ -3269,4 +3275,6 @@ int	netbsd32_unlinkat(struct lwp *, cons
 
 int	netbsd32_futimens(struct lwp *, const struct netbsd32_futimens_args *, register_t *);
 
+int	netbsd32___quotactl(struct lwp *, const struct netbsd32___quotactl_args *, register_t *);
+
 #endif /* _NETBSD32_SYS_SYSCALLARGS_H_ */

Index: src/sys/compat/netbsd32/netbsd32_syscalls.c
diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.97 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.98
--- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.97	Wed Feb  1 05:40:00 2012
+++ src/sys/compat/netbsd32/netbsd32_syscalls.c	Wed Feb  1 05:42:17 2012
@@ -1,14 +1,14 @@
-/* $NetBSD: netbsd32_syscalls.c,v 1.97 2012/02/01 05:40:00 dholland Exp $ */
+/* $NetBSD: netbsd32_syscalls.c,v 1.98 2012/02/01 05:42:17 dholland Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.89 2012/01/31 22:52:19 matt Exp
+ * created from	NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_syscalls.c,v 1.97 2012/02/01 05:40:00 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_syscalls.c,v 1.98 2012/02/01 05:42:17 dholland Exp $);
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -584,7 +584,7 @@ const char *const netbsd32_syscallnames[
 	/* 470 */	netbsd32_symlinkat,
 	/* 471 */	netbsd32_unlinkat,
 	/* 472 */	netbsd32_futimens,
-	/* 473 

CVS commit: src

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:43:55 UTC 2012

Modified Files:
src/lib/libquota: quota_kernel.c
src/sys/compat/netbsd32: netbsd32.h netbsd32_netbsd.c
src/sys/kern: vfs_quotactl.c vfs_syscalls.c
src/sys/sys: quotactl.h
src/sys/ufs/ufs: ufs_quota.c ufs_quota1.c ufs_quota2.c

Log Message:
Improve the names of some members of struct quotactl_args. These are
effectively function parameter names, but since they need to be
described with the same names in the man page the choices do matter.
Some.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libquota/quota_kernel.c
cvs rdiff -u -r1.90 -r1.91 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.178 -r1.179 src/sys/compat/netbsd32/netbsd32_netbsd.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/vfs_quotactl.c
cvs rdiff -u -r1.445 -r1.446 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.33 -r1.34 src/sys/sys/quotactl.h
cvs rdiff -u -r1.107 -r1.108 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.16 -r1.17 src/sys/ufs/ufs/ufs_quota1.c
cvs rdiff -u -r1.31 -r1.32 src/sys/ufs/ufs/ufs_quota2.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/libquota/quota_kernel.c
diff -u src/lib/libquota/quota_kernel.c:1.1 src/lib/libquota/quota_kernel.c:1.2
--- src/lib/libquota/quota_kernel.c:1.1	Wed Feb  1 05:34:40 2012
+++ src/lib/libquota/quota_kernel.c	Wed Feb  1 05:43:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_kernel.c,v 1.1 2012/02/01 05:34:40 dholland Exp $	*/
+/*	$NetBSD: quota_kernel.c,v 1.2 2012/02/01 05:43:53 dholland Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_kernel.c,v 1.1 2012/02/01 05:34:40 dholland Exp $);
+__RCSID($NetBSD: quota_kernel.c,v 1.2 2012/02/01 05:43:53 dholland Exp $);
 
 #include stdlib.h
 #include err.h
@@ -52,7 +52,7 @@ __quota_kernel_stat(struct quotahandle *
 	struct quotactl_args args;
 
 	args.qc_op = QUOTACTL_STAT;
-	args.u.stat.qc_ret = stat;
+	args.u.stat.qc_info = stat;
 	return __quotactl(qh-qh_mountpoint, args);
 }
 
@@ -199,7 +199,7 @@ __quota_kernel_get(struct quotahandle *q
 
 	args.qc_op = QUOTACTL_GET;
 	args.u.get.qc_key = qk;
-	args.u.get.qc_ret = qv;
+	args.u.get.qc_val = qv;
 	return __quotactl(qh-qh_mountpoint, args);
 }
 

Index: src/sys/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.90 src/sys/compat/netbsd32/netbsd32.h:1.91
--- src/sys/compat/netbsd32/netbsd32.h:1.90	Wed Feb  1 05:40:00 2012
+++ src/sys/compat/netbsd32/netbsd32.h	Wed Feb  1 05:43:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.90 2012/02/01 05:40:00 dholland Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.91 2012/02/01 05:43:54 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -274,7 +274,7 @@ struct netbsd32_quotactlargs {
 	unsigned qc_op;
 	union {
 		struct {
-			netbsd32_pointer_t qc_ret;
+			netbsd32_pointer_t qc_info;
 		} stat;
 		struct {
 			int qc_idtype;
@@ -286,7 +286,7 @@ struct netbsd32_quotactlargs {
 		} objtypestat;
 		struct {
 			netbsd32_pointer_t qc_key;
-			netbsd32_pointer_t qc_ret;
+			netbsd32_pointer_t qc_val;
 		} get;
 		struct {
 			netbsd32_pointer_t qc_key;

Index: src/sys/compat/netbsd32/netbsd32_netbsd.c
diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.178 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.179
--- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.178	Wed Feb  1 05:40:00 2012
+++ src/sys/compat/netbsd32/netbsd32_netbsd.c	Wed Feb  1 05:43:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_netbsd.c,v 1.178 2012/02/01 05:40:00 dholland Exp $	*/
+/*	$NetBSD: netbsd32_netbsd.c,v 1.179 2012/02/01 05:43:54 dholland Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.178 2012/02/01 05:40:00 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_netbsd.c,v 1.179 2012/02/01 05:43:54 dholland Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ddb.h
@@ -1204,7 +1204,7 @@ netbsd32___quotactl(struct lwp *l, const
 	args.qc_op = args32.qc_op;
 	switch (args.qc_op) {
 	case QUOTACTL_STAT:
-		args.u.stat.qc_ret = NETBSD32PTR64(args32.u.stat.qc_ret);
+		args.u.stat.qc_info = NETBSD32PTR64(args32.u.stat.qc_info);
 		break;
 	case QUOTACTL_IDTYPESTAT:
 		args.u.idtypestat.qc_idtype = args32.u.idtypestat.qc_idtype;
@@ -1219,7 +1219,7 @@ netbsd32___quotactl(struct lwp *l, const
 		break;
 	case QUOTACTL_GET:
 		args.u.get.qc_key = NETBSD32PTR64(args32.u.get.qc_key);
-		args.u.get.qc_ret = NETBSD32PTR64(args32.u.get.qc_ret);
+		args.u.get.qc_val = NETBSD32PTR64(args32.u.get.qc_val);
 		break;
 	case QUOTACTL_PUT:
 		args.u.put.qc_key = NETBSD32PTR64(args32.u.put.qc_key);

Index: src/sys/kern/vfs_quotactl.c
diff -u src/sys/kern/vfs_quotactl.c:1.37 src/sys/kern/vfs_quotactl.c:1.38
--- 

CVS commit: src

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:46:46 UTC 2012

Modified Files:
src/include: quota.h
src/lib/libquota: libquota.3 quota_cursor.c quota_kernel.c
quota_oldfiles.c quota_schema.c quotapvt.h
src/sys/compat/netbsd32: netbsd32.h
src/sys/kern: vfs_syscalls.c
src/sys/sys: quotactl.h

Log Message:
Be consistent about whether idtype and objtype codes are signed or
unsigned. They are signed. (While unsigned might have been a better
choice, it doesn't really matter and the majority of preexisting uses
were signed. And consistency is good.)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/include/quota.h
cvs rdiff -u -r1.2 -r1.3 src/lib/libquota/libquota.3 \
src/lib/libquota/quota_kernel.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libquota/quota_cursor.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libquota/quota_oldfiles.c \
src/lib/libquota/quota_schema.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libquota/quotapvt.h
cvs rdiff -u -r1.91 -r1.92 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.446 -r1.447 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/quotactl.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/quota.h
diff -u src/include/quota.h:1.5 src/include/quota.h:1.6
--- src/include/quota.h:1.5	Mon Jan 30 16:45:13 2012
+++ src/include/quota.h	Wed Feb  1 05:46:45 2012
@@ -48,10 +48,10 @@ const char *quota_getmountdevice(struct 
 const char *quota_getimplname(struct quotahandle *);
 unsigned quota_getrestrictions(struct quotahandle *);
 
-unsigned quota_getnumidtypes(struct quotahandle *);
+int quota_getnumidtypes(struct quotahandle *);
 const char *quota_idtype_getname(struct quotahandle *, int /*idtype*/);
 
-unsigned quota_getnumobjtypes(struct quotahandle *);
+int quota_getnumobjtypes(struct quotahandle *);
 const char *quota_objtype_getname(struct quotahandle *, int /*objtype*/);
 int quota_objtype_isbytes(struct quotahandle *, int /*objtype*/);
 
@@ -69,7 +69,7 @@ int quota_delete(struct quotahandle *, c
 struct quotacursor *quota_opencursor(struct quotahandle *);
 void quotacursor_close(struct quotacursor *);
 
-int quotacursor_skipidtype(struct quotacursor *, unsigned /*idtype*/);
+int quotacursor_skipidtype(struct quotacursor *, int /*idtype*/);
 
 int quotacursor_get(struct quotacursor *, struct quotakey *,
 		struct quotaval *);

Index: src/lib/libquota/libquota.3
diff -u src/lib/libquota/libquota.3:1.2 src/lib/libquota/libquota.3:1.3
--- src/lib/libquota/libquota.3:1.2	Wed Jan 25 21:58:43 2012
+++ src/lib/libquota/libquota.3	Wed Feb  1 05:46:46 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: libquota.3,v 1.2 2012/01/25 21:58:43 wiz Exp $
+.\	$NetBSD: libquota.3,v 1.3 2012/02/01 05:46:46 dholland Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -67,9 +67,9 @@
 .Fn quota_getmountpoint struct quotahandle *qh
 .Ft const char *
 .Fn quota_getimplname struct quotahandle *qh
-.Ft unsigned
+.Ft int
 .Fn quota_getnumidtypes struct quotahandle *qh
-.Ft unsigned
+.Ft int
 .Fn quota_getnumobjtypes struct quotahandle *qh
 .Ft const char *
 .Fn quota_idtype_getname struct quotahandle *qh int idtype
Index: src/lib/libquota/quota_kernel.c
diff -u src/lib/libquota/quota_kernel.c:1.2 src/lib/libquota/quota_kernel.c:1.3
--- src/lib/libquota/quota_kernel.c:1.2	Wed Feb  1 05:43:53 2012
+++ src/lib/libquota/quota_kernel.c	Wed Feb  1 05:46:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_kernel.c,v 1.2 2012/02/01 05:43:53 dholland Exp $	*/
+/*	$NetBSD: quota_kernel.c,v 1.3 2012/02/01 05:46:46 dholland Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_kernel.c,v 1.2 2012/02/01 05:43:53 dholland Exp $);
+__RCSID($NetBSD: quota_kernel.c,v 1.3 2012/02/01 05:46:46 dholland Exp $);
 
 #include stdlib.h
 #include err.h
@@ -79,7 +79,7 @@ __quota_kernel_getrestrictions(struct qu
 	return stat.qs_restrictions;
 }
 
-unsigned
+int
 __quota_kernel_getnumidtypes(struct quotahandle *qh)
 {
 	struct quotastat stat;
@@ -105,7 +105,7 @@ __quota_kernel_idtype_getname(struct quo
 	return stat.qis_name;
 }
 
-unsigned
+int
 __quota_kernel_getnumobjtypes(struct quotahandle *qh)
 {
 	struct quotastat stat;
@@ -266,7 +266,7 @@ __quota_kernel_cursor_destroy(struct quo
 int
 __quota_kernel_cursor_skipidtype(struct quotahandle *qh,
  struct kernel_quotacursor *cursor,
- unsigned idtype)
+ int idtype)
 {
 	struct quotactl_args args;
 

Index: src/lib/libquota/quota_cursor.c
diff -u src/lib/libquota/quota_cursor.c:1.5 src/lib/libquota/quota_cursor.c:1.6
--- src/lib/libquota/quota_cursor.c:1.5	Wed Feb  1 05:34:40 2012
+++ src/lib/libquota/quota_cursor.c	Wed Feb  1 05:46:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_cursor.c,v 1.5 2012/02/01 05:34:40 dholland Exp $	*/
+/*	$NetBSD: quota_cursor.c,v 1.6 

CVS commit: src/doc

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 05:49:45 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note quota changes in the form of the addition of libquota.


To generate a diff of this commit:
cvs rdiff -u -r1.1662 -r1.1663 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1662 src/doc/CHANGES:1.1663
--- src/doc/CHANGES:1.1662	Mon Jan 30 13:57:43 2012
+++ src/doc/CHANGES	Wed Feb  1 05:49:45 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1662 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1663 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1228,3 +1228,6 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 		ported by TOYOKURA Atsushi. [tsutsui 20120129]
 	evbarm: Add FriendlyARM Mini2440 support. Code was written by Paul
 		Fleischer. [nisimura 20120130]
+	kernel: Add a new library, libquota, for control of and access to
+		disk quotas, extending the file-system-independent interface
+		added with the bouyer-quota2 branch. [dholland 20120201]



CVS commit: src/lib/libquota

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 06:12:37 UTC 2012

Modified Files:
src/lib/libquota: quota_oldfiles.c

Log Message:
Add missing RCSID().


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libquota/quota_oldfiles.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/libquota/quota_oldfiles.c
diff -u src/lib/libquota/quota_oldfiles.c:1.7 src/lib/libquota/quota_oldfiles.c:1.8
--- src/lib/libquota/quota_oldfiles.c:1.7	Wed Feb  1 05:46:46 2012
+++ src/lib/libquota/quota_oldfiles.c	Wed Feb  1 06:12:37 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_oldfiles.c,v 1.7 2012/02/01 05:46:46 dholland Exp $	*/
+/*	$NetBSD: quota_oldfiles.c,v 1.8 2012/02/01 06:12:37 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -32,6 +32,9 @@
  * SUCH DAMAGE.
  */
 
+#include sys/cdefs.h
+__RCSID($NetBSD: quota_oldfiles.c,v 1.8 2012/02/01 06:12:37 dholland Exp $);
+
 #include sys/types.h
 #include sys/stat.h
 #include stdio.h



CVS commit: src/lib/libquota

2012-01-31 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Wed Feb  1 06:19:05 UTC 2012

Modified Files:
src/lib/libquota: quota_kernel.c

Log Message:
Fix stupid bug in cursor_getn - it's supposed to return the number of
values retrieved, but it was returning 0 on success. Fortunately nothing
was using it yet.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libquota/quota_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/lib/libquota/quota_kernel.c
diff -u src/lib/libquota/quota_kernel.c:1.3 src/lib/libquota/quota_kernel.c:1.4
--- src/lib/libquota/quota_kernel.c:1.3	Wed Feb  1 05:46:46 2012
+++ src/lib/libquota/quota_kernel.c	Wed Feb  1 06:19:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota_kernel.c,v 1.3 2012/02/01 05:46:46 dholland Exp $	*/
+/*	$NetBSD: quota_kernel.c,v 1.4 2012/02/01 06:19:05 dholland Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: quota_kernel.c,v 1.3 2012/02/01 05:46:46 dholland Exp $);
+__RCSID($NetBSD: quota_kernel.c,v 1.4 2012/02/01 06:19:05 dholland Exp $);
 
 #include stdlib.h
 #include err.h
@@ -299,13 +299,22 @@ __quota_kernel_cursor_getn(struct quotah
 	struct quotactl_args args;
 	unsigned ret;
 
+	if (maxnum  INT_MAX) {
+		/* joker, eh? */
+		errno = EINVAL;
+		return -1;
+	}
+
 	args.qc_op = QUOTACTL_CURSORGET;
 	args.u.cursorget.qc_cursor = cursor-kcursor;
 	args.u.cursorget.qc_keys = keys;
 	args.u.cursorget.qc_vals = vals;
 	args.u.cursorget.qc_maxnum = maxnum;
 	args.u.cursorget.qc_ret = ret;
-	return __quotactl(qh-qh_mountpoint, args);
+	if (__quotactl(qh-qh_mountpoint, args)  0) {
+		return -1;
+	}
+	return ret;
 }
 
 int



CVS commit: src/external/bsd/ntp

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 07:53:52 UTC 2012

Modified Files:
src/external/bsd/ntp: importdate

Log Message:
merge import ntp-4-2-6p5


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ntp/importdate

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/importdate
diff -u src/external/bsd/ntp/importdate:1.1 src/external/bsd/ntp/importdate:1.2
--- src/external/bsd/ntp/importdate:1.1	Sun Dec 13 17:13:48 2009
+++ src/external/bsd/ntp/importdate	Wed Feb  1 07:53:52 2012
@@ -1 +1 @@
-Sun Dec 13 14:48:32 UTC 2009 (import)
+Wed Feb  1 07:49:06 UTC 2012 (import)



CVS commit: src/external/bsd/ntp/scripts

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Wed Feb  1 07:54:58 UTC 2012

Modified Files:
src/external/bsd/ntp/scripts: mkver

Log Message:
NTP 4.2.6p5 (Harlan Stenn st...@ntp.org, 2011/12/24)

Focus: Bug fixes

Severity: Medium

This is a recommended upgrade.

This release updates sys_rootdisp and sys_jitter calculations to match the
RFC specification, fixes a potential IPv6 address matching error for the
nic and interface configuration directives, suppresses the creation of
extraneous ephemeral associations for certain broadcastclient and
multicastclient configurations, cleans up some ntpq display issues, and
includes improvements to orphan mode, minor bugs fixes and code clean-ups.

New features / changes in this release:

ntpd

 * Updated nic and interface IPv6 address handling to prevent
   mismatches with localhost [::1] and wildcard [::] which resulted from
   using the address/prefix format (e.g. fe80::/64)
 * Fix orphan mode stratum incorrectly counting to infinity
 * Orphan parent selection metric updated to includes missing ntohl()
 * Non-printable stratum 16 refid no longer sent to ntp
 * Duplicate ephemeral associations suppressed for broadcastclient and
   multicastclient without broadcastdelay
 * Exclude undetermined sys_refid from use in loopback TEST12
 * Exclude MODE_SERVER responses from KoD rate limiting
 * Include root delay in clock_update() sys_rootdisp calculations
 * get_systime() updated to exclude sys_residual offset (which only
   affected bits below sys_tick, the precision threshold)
 * sys.peer jitter weighting corrected in sys_jitter calculation

ntpq

 * -n option extended to include the billboard server column
 * IPv6 addresses in the local column truncated to prevent overruns

---
NTP 4.2.6p4 (Harlan Stenn st...@ntp.org, 2011/09/22)

Focus: Bug fixes and portability improvements

Severity: Medium

This is a recommended upgrade.

This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, and documentation revisions.

Portability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t.

New features / changes in this release:

Build system

* Fix checking for struct rtattr
* Update config.guess and config.sub for AIX
* Upgrade required version of autogen and libopts for building
  from our source code repository

ntpd

* Back-ported several fixes for Coverity warnings from ntp-dev
* Fix a rare boundary condition in UNLINK_EXPR_SLIST()
* Allow logconfig =allall configuration directive
* Bind tentative IPv6 addresses on Linux
* Correct WWVB/Spectracom driver to timestamp CR instead of LF
* Improved tally bit handling to prevent incorrect ntpq peer status reports
* Exclude the Undisciplined Local Clock and ACTS drivers from the initial
  candidate list unless they are designated a prefer peer
* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
  selection during the 'tos orphanwait' period
* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
  drivers
* Improved support of the Parse Refclock trusttime flag in Meinberg mode
* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline
  clock slew on Microsoft Windows
* Code cleanup in libntpq

ntpdc

* Fix timerstats reporting

ntpdate

* Reduce time required to set clock
* Allow a timeout greater than 2 seconds

sntp

* Backward incompatible command-line option change:
  -l/--filelog changed -l/--logfile (to be consistent with ntpd)

Documentation

* Update html2man. Fix some tags in the .html files
* Distribute ntp-wait.html

---
NTP 4.2.6p3 (Harlan Stenn st...@ntp.org, 2011/01/03)

Focus: Bug fixes and portability improvements

Severity: Medium

This is a recommended upgrade.

This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, and documentation revisions.

Portability improvements in this release affect AIX, Atari FreeMiNT,
FreeBSD4, Linux and Microsoft Windows.

New features / changes in this release:

Build system
* Use lsb_release to get information about Linux distributions.
* 'test' is in /usr/bin (instead of /bin) on some systems.
* Basic sanity checks for the ChangeLog file.
* Source certain build files with ./filename for systems without . in PATH.
* IRIX portability fix.
* Use a single copy of the libopts code.
* autogen/libopts upgrade.
* configure.ac m4 quoting cleanup.

ntpd
* Do not bind to IN6_IFF_ANYCAST addresses.
* Log the reason for exiting under Windows.
* Multicast fixes for Windows.
* Interpolation fixes for Windows.
* IPv4 and IPv6 Multicast fixes.
* Manycast solicitation fixes and general repairs.
* JJY refclock cleanup.
* NMEA refclock improvements.
* Oncore debug message cleanup.
* Palisade refclock now builds under Linux.
* Give RAWDCF more baud rates.
* Support Truetime Satellite clocks under 

CVS commit: src/dist/ipf/lib

2012-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 31 08:43:45 UTC 2012

Modified Files:
src/dist/ipf/lib: printactivenat.c printaps.c

Log Message:
Fix printf formats (those who can't decide wether to use casts or PRI*
macros do both in bogus combination)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/dist/ipf/lib/printactivenat.c
cvs rdiff -u -r1.1.1.3 -r1.2 src/dist/ipf/lib/printaps.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/dist/ipf/tools

2012-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 31 08:57:36 UTC 2012

Modified Files:
src/dist/ipf/tools: ipfstat.c

Log Message:
More printf format fixes


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/dist/ipf/tools/ipfstat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/dist/ipf/tools

2012-01-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 31 09:06:12 UTC 2012

Modified Files:
src/dist/ipf/tools: ipftest.c

Log Message:
More printf format fixes


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 src/dist/ipf/tools/ipftest.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/openresolv/dist

2012-01-31 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Jan 31 09:19:58 UTC 2012

Update of /cvsroot/src/external/bsd/openresolv/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv1894

Log Message:
Import openresolv-3.4.6 with the following change from 3.4.5
* dnsmasq subscriber correctly sets IPv6 domain specific servers over dbus

Status:

Vendor Tag: roy
Release Tags:   openresolv-3-4-6

U src/external/bsd/openresolv/dist/README
U src/external/bsd/openresolv/dist/resolvconf.in
U src/external/bsd/openresolv/dist/resolvconf.8.in
U src/external/bsd/openresolv/dist/resolvconf.conf.5.in
U src/external/bsd/openresolv/dist/libc.in
U src/external/bsd/openresolv/dist/dnsmasq.in
U src/external/bsd/openresolv/dist/named.in
U src/external/bsd/openresolv/dist/pdnsd.in
U src/external/bsd/openresolv/dist/unbound.in

No conflicts created by this import



CVS commit: src/sys/dist/ipf/netinet

2012-01-31 Thread Darren Reed
Module Name:src
Committed By:   darrenr
Date:   Tue Jan 31 09:41:37 UTC 2012

Modified Files:
src/sys/dist/ipf/netinet: fil.c

Log Message:
PR bin/45894
ipftest core dumps when running tests


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dist/ipf/netinet/fil.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/netatalk

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 09:53:44 UTC 2012

Modified Files:
src/sys/netatalk: aarp.c ddp_output.c

Log Message:
Fix AppleTalk name registration, as discussed on the port-macppc list
http://mail-index.netbsd.org/port-macppc/2010/07/09/msg001119.html
and in PR kern/44412, by looping back ddp broadcasts.

Patch submitted by David Riley against netbsd-5, adaptation for
-current and minor KNF touchup by me.

Needs to be pulled up to netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netatalk/aarp.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netatalk/ddp_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/stand/boot2440

2012-01-31 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Jan 31 11:04:17 UTC 2012

Modified Files:
src/sys/arch/evbarm/stand/boot2440: Makefile dev_net.c devopen.c

Log Message:
- add TFTP loading facility.
- SD/MMC load default is now ld0a:netbsd


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/stand/boot2440/Makefile \
src/sys/arch/evbarm/stand/boot2440/dev_net.c \
src/sys/arch/evbarm/stand/boot2440/devopen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2012-01-31 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Jan 31 12:23:33 UTC 2012

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man8: Makefile
Added Files:
src/share/man/man8/man8.evbarm: Makefile bootmini2440.8

Log Message:
introduce evbarm bootmini2440(8) man entry.


To generate a diff of this commit:
cvs rdiff -u -r1.1373 -r1.1374 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.101 -r1.102 src/share/man/man8/Makefile
cvs rdiff -u -r0 -r1.3 src/share/man/man8/man8.evbarm/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man8/man8.evbarm/bootmini2440.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man8/man8.evbarm

2012-01-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jan 31 13:25:05 UTC 2012

Modified Files:
src/share/man/man8/man8.evbarm: bootmini2440.8

Log Message:
Remove trailing whitespace.
New sentence, new line.
Remove Pp before Sh.
Sort sections.
Use more markup.
Remove unnecessary macro arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man8/man8.evbarm/bootmini2440.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/lastcomm

2012-01-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jan 31 16:30:40 UTC 2012

Modified Files:
src/usr.bin/lastcomm: lastcomm.1 lastcomm.c

Log Message:
PR/45897: Takahiro Kambe: Make default display  80 characters and add -w flag
to display unlimited


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/lastcomm/lastcomm.1
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/lastcomm/lastcomm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/fs/puffs/h_dtfs

2012-01-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jan 31 18:56:07 UTC 2012

Modified Files:
src/tests/fs/puffs/h_dtfs: dtfs_vnops.c

Log Message:
Check directory write access for DELETE operation. And while here,
small indentation adjust.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/puffs/h_dtfs/dtfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpvfs

2012-01-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jan 31 19:00:04 UTC 2012

Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c

Log Message:
Check credentials when setting uid, gid or mode attributes.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/rump/librump/rumpvfs/rumpfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/fs/vfs

2012-01-31 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jan 31 19:02:49 UTC 2012

Modified Files:
src/tests/fs/vfs: t_unpriv.c

Log Message:
owner testcase now succeed with rumpfs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/vfs/t_unpriv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jan 31 19:11:38 UTC 2012

Modified Files:
src/sys/kern: subr_pcq.c

Log Message:
Replace offsetof(pcq_t, pcq_items[nitems]) with sizeof(pcq_t) + sizeof(void 
*[nitems]).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_pcq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu/common

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 19:58:22 UTC 2012

Modified Files:
src/lib/csu/common: Makefile.inc

Log Message:
Use -DPIC to compile crtbeginS.o since that's what machine/asm.h
headers check.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/csu/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu/common

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:03:50 UTC 2012

Modified Files:
src/lib/csu/common: Makefile.inc

Log Message:
Hmm, funny.  I wonder why and how did emacs VC managed to add

  Warning: Permanently added the RSA host key for IP address '...' to the list 
of known hosts.

to the committed file. (hi, new cvs!)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/csu/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Jan 31 20:05:13 UTC 2012

Modified Files:
src/external/bsd/ntp: ntp2netbsd

Log Message:
fix instructions in comment part


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/ntp2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu/common

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:08:28 UTC 2012

Modified Files:
src/lib/csu/common: Makefile.inc

Log Message:
Move crt0.S in front of crt0-common.c when building crt0.o and gcrt0.o.
Reading disassembly is easier when the asm crt0.S trampoline is at the
start, not hidden behind the C code in crt0-common.c.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/csu/common/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Jan 31 20:11:42 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
update ntp current version


To generate a diff of this commit:
cvs rdiff -u -r1.902 -r1.903 src/doc/3RDPARTY

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu/arch/sh3

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:12:47 UTC 2012

Modified Files:
src/lib/csu/arch/sh3: crtend.S crti.S

Log Message:
Use unambiguous .p2align 2 since .align 4 copied from i386 is
incorrect, as .align is .p2align on sh3, not .balign


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/csu/arch/sh3/crtend.S
cvs rdiff -u -r1.2 -r1.3 src/lib/csu/arch/sh3/crti.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu/arch/sh3

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:17:57 UTC 2012

Modified Files:
src/lib/csu/arch/sh3: crt0.S

Log Message:
New ___start() C function takes 3 arguments instead of 6 and fetches
argc, argv and environ from ps_strings instead.  Adjust the trampoline
accordingly.

Fix brain fart in previous: direct jump is jmp @rN, not bsrf rN.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/csu/arch/sh3/crt0.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/csu/arch/sh3

2012-01-31 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Jan 31 20:30:15 UTC 2012

Added Files:
src/lib/csu/arch/sh3: crtbegin.S

Log Message:
Implement crtbegin* for sh3.  Tested to work on landisk.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/csu/arch/sh3/crtbegin.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2012-01-31 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Tue Jan 31 20:40:09 UTC 2012

Modified Files:
src/sys/kern: subr_pcq.c

Log Message:
Revert to more readable but non-standard use of offsetof to calculate
a size of a structure with a flexible array member.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_pcq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/sandpoint/sandpoint

2012-01-31 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Tue Jan 31 21:12:03 UTC 2012

Modified Files:
src/sys/arch/sandpoint/sandpoint: mainbus.c

Log Message:
Print MPC8245 cpu speed. We can calculate it using the PLL ratio.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sandpoint/sandpoint/mainbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2012-01-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jan 31 21:17:57 UTC 2012

Modified Files:
src/sys/arch/m68k/include: db_machdep.h
src/sys/arch/m68k/m68k: db_disasm.c db_interface.c db_trace.c
src/usr.sbin/crash: Makefile

Log Message:
Enable build of crash(8) for m86k platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/db_disasm.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/m68k/db_interface.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/crash/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ntp/dist

2012-01-31 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Jan 31 21:29:40 UTC 2012

Update of /cvsroot/src/external/bsd/ntp/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv2606

Log Message:
Import ntp 4.2.6p5

Status:

Vendor Tag: UDEL
Release Tags:   ntp-4-2-6p5

U src/external/bsd/ntp/dist/CommitLog-4.1.0
U src/external/bsd/ntp/dist/COPYRIGHT
U src/external/bsd/ntp/dist/ChangeLog
U src/external/bsd/ntp/dist/CommitLog
U src/external/bsd/ntp/dist/Makefile.am
U src/external/bsd/ntp/dist/INSTALL
U src/external/bsd/ntp/dist/NOTES.y2kfixes
U src/external/bsd/ntp/dist/Makefile.in
U src/external/bsd/ntp/dist/NEWS
U src/external/bsd/ntp/dist/README.bk
U src/external/bsd/ntp/dist/README
U src/external/bsd/ntp/dist/bincheck.mf
U src/external/bsd/ntp/dist/README.hackers
U src/external/bsd/ntp/dist/README.patches
U src/external/bsd/ntp/dist/README.refclocks
U src/external/bsd/ntp/dist/README.versions
U src/external/bsd/ntp/dist/TODO
U src/external/bsd/ntp/dist/WHERE-TO-START
U src/external/bsd/ntp/dist/aclocal.m4
U src/external/bsd/ntp/dist/bootstrap
U src/external/bsd/ntp/dist/build
U src/external/bsd/ntp/dist/compile
U src/external/bsd/ntp/dist/config.guess
U src/external/bsd/ntp/dist/config.h.in
U src/external/bsd/ntp/dist/config.sub
U src/external/bsd/ntp/dist/configure
U src/external/bsd/ntp/dist/configure.ac
U src/external/bsd/ntp/dist/depcomp
U src/external/bsd/ntp/dist/deps-ver
U src/external/bsd/ntp/dist/depsver.mf
U src/external/bsd/ntp/dist/dot.emacs
U src/external/bsd/ntp/dist/excludes
U src/external/bsd/ntp/dist/flock-build
U src/external/bsd/ntp/dist/install-sh
U src/external/bsd/ntp/dist/ltmain.sh
U src/external/bsd/ntp/dist/missing
U src/external/bsd/ntp/dist/packageinfo.sh
U src/external/bsd/ntp/dist/readme.y2kfixes
U src/external/bsd/ntp/dist/results.y2kfixes
U src/external/bsd/ntp/dist/version.m4
U src/external/bsd/ntp/dist/version
U src/external/bsd/ntp/dist/ylwrap
U src/external/bsd/ntp/dist/ElectricFence/tstheap.c
U src/external/bsd/ntp/dist/ElectricFence/efence.c
U src/external/bsd/ntp/dist/ElectricFence/eftest.c
U src/external/bsd/ntp/dist/ElectricFence/README
U src/external/bsd/ntp/dist/ElectricFence/page.c
U src/external/bsd/ntp/dist/ElectricFence/libefence.3
U src/external/bsd/ntp/dist/ElectricFence/Makefile.in
U src/external/bsd/ntp/dist/ElectricFence/print.c
U src/external/bsd/ntp/dist/ElectricFence/CHANGES
U src/external/bsd/ntp/dist/ElectricFence/Makefile.am
U src/external/bsd/ntp/dist/ElectricFence/COPYING
U src/external/bsd/ntp/dist/ElectricFence/efence.h
U src/external/bsd/ntp/dist/adjtimed/adjtimed.c
U src/external/bsd/ntp/dist/adjtimed/README
U src/external/bsd/ntp/dist/adjtimed/Makefile.in
U src/external/bsd/ntp/dist/adjtimed/Makefile.am
U src/external/bsd/ntp/dist/clockstuff/clktest.c
U src/external/bsd/ntp/dist/clockstuff/propdelay.c
U src/external/bsd/ntp/dist/clockstuff/chutest.c
U src/external/bsd/ntp/dist/clockstuff/Makefile.am
U src/external/bsd/ntp/dist/clockstuff/Makefile.in
U src/external/bsd/ntp/dist/clockstuff/README
U src/external/bsd/ntp/dist/conf/beauregard.conf
U src/external/bsd/ntp/dist/conf/malarky.conf
U src/external/bsd/ntp/dist/conf/pogo.conf
U src/external/bsd/ntp/dist/conf/rackety.conf
U src/external/bsd/ntp/dist/conf/grundoon.conf
U src/external/bsd/ntp/dist/conf/baldwin.conf
U src/external/bsd/ntp/dist/conf/README
U src/external/bsd/ntp/dist/html/ntptrace.html
U src/external/bsd/ntp/dist/html/kern.html
U src/external/bsd/ntp/dist/html/copyright.html
U src/external/bsd/ntp/dist/html/release.html
U src/external/bsd/ntp/dist/html/xleave.html
U src/external/bsd/ntp/dist/html/sntp.html
U src/external/bsd/ntp/dist/html/rate.html
U src/external/bsd/ntp/dist/html/accopt.html
U src/external/bsd/ntp/dist/html/config.html
U src/external/bsd/ntp/dist/html/ntpdc.html
U src/external/bsd/ntp/dist/html/rdebug.html
U src/external/bsd/ntp/dist/html/refclock.html
U src/external/bsd/ntp/dist/html/comdex.html
U src/external/bsd/ntp/dist/html/miscopt.html
U src/external/bsd/ntp/dist/html/ntp_conf.html
U src/external/bsd/ntp/dist/html/quick.html
U src/external/bsd/ntp/dist/html/manyopt.html
U src/external/bsd/ntp/dist/html/parsedata.html
U src/external/bsd/ntp/dist/html/extern.html
U src/external/bsd/ntp/dist/html/decode.html
U src/external/bsd/ntp/dist/html/howto.html
N src/external/bsd/ntp/dist/html/ntp-wait.html
U src/external/bsd/ntp/dist/html/build.html
U src/external/bsd/ntp/dist/html/ntpdsim.html
U src/external/bsd/ntp/dist/html/authopt.html
U src/external/bsd/ntp/dist/html/pps.html
U src/external/bsd/ntp/dist/html/parsenew.html
U src/external/bsd/ntp/dist/html/ntpdate.html
U src/external/bsd/ntp/dist/html/kernpps.html
U src/external/bsd/ntp/dist/html/gadget.html
U src/external/bsd/ntp/dist/html/msyslog.html
U src/external/bsd/ntp/dist/html/assoc.html
U src/external/bsd/ntp/dist/html/tickadj.html
U src/external/bsd/ntp/dist/html/ntpq.html
U src/external/bsd/ntp/dist/html/hints.html
U src/external/bsd/ntp/dist/html/clockopt.html
U 

CVS commit: src/usr.bin/lastcomm

2012-01-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jan 31 21:53:42 UTC 2012

Modified Files:
src/usr.bin/lastcomm: lastcomm.c

Log Message:
Sync usage with man page.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/lastcomm/lastcomm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 22:13:20 UTC 2012

Modified Files:
src/sys/arch/mac68k/conf: GENERIC
src/sys/arch/mac68k/nubus: cpi_nubus.c cpi_nubusvar.h
src/sys/dev/ic: z8536reg.h

Log Message:
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/nubus/cpi_nubus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/nubus/cpi_nubusvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/z8536reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:51:42 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32.h

Log Message:
Add netbsd32_socklenp_t


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/netbsd32/netbsd32.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:52:19 UTC 2012

Modified Files:
src/sys/compat/netbsd32: syscalls.master

Log Message:
Add the *at syscalls and other missing syscalls.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/netbsd32/syscalls.master

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:53:28 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h
netbsd32_syscalls.c netbsd32_sysent.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/compat/netbsd32/netbsd32_syscall.h \
src/sys/compat/netbsd32/netbsd32_syscallargs.h
cvs rdiff -u -r1.95 -r1.96 src/sys/compat/netbsd32/netbsd32_syscalls.c \
src/sys/compat/netbsd32/netbsd32_sysent.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/compat/netbsd32

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan 31 22:53:56 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_execve.c netbsd32_netbsd.c

Log Message:
Add missing *at syscalls among others


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_execve.c
cvs rdiff -u -r1.176 -r1.177 src/sys/compat/netbsd32/netbsd32_netbsd.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/isa

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:01:29 UTC 2012

Modified Files:
src/sys/dev/isa: spkr.c

Log Message:
Use C89 prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/isa/spkr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/macppc/dev

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:02:07 UTC 2012

Modified Files:
src/sys/arch/macppc/dev: adb.c adb_direct.c viareg.h

Log Message:
Use C89 function prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/macppc/dev/adb.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/dev/adb_direct.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/dev/viareg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/powerpc

2012-01-31 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb  1 02:03:52 UTC 2012

Modified Files:
src/sys/arch/powerpc/include: openpic.h
src/sys/arch/powerpc/pic: pic_mpcsoc.c

Log Message:
Use C89 function prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/openpic.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/pic/pic_mpcsoc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >