CVS commit: src

2011-02-14 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Feb 14 08:50:40 UTC 2011

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4: Makefile
src/sys/arch/amd64/conf: GENERIC
src/sys/arch/i386/conf: ALL GENERIC
src/sys/dev/i2c: files.i2c
Added Files:
src/share/man/man4: ibmhawk.4
src/sys/dev/i2c: ibmhawk.c ibmhawkreg.h ibmhawkvar.h

Log Message:
Initial implementation of ibmhawk(4) driver for sensors behind the IBM Hawk
on-board Integrated Systems Management Processor found on some eServers.

Tested on an IBM eServer x335.


To generate a diff of this commit:
cvs rdiff -u -r1.1287 -r1.1288 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.549 -r1.550 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/ibmhawk.4
cvs rdiff -u -r1.303 -r1.304 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.286 -r1.287 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1013 -r1.1014 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/ibmhawk.c src/sys/dev/i2c/ibmhawkreg.h \
src/sys/dev/i2c/ibmhawkvar.h

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.1287 src/distrib/sets/lists/man/mi:1.1288
--- src/distrib/sets/lists/man/mi:1.1287	Thu Feb 10 14:04:30 2011
+++ src/distrib/sets/lists/man/mi	Mon Feb 14 08:50:38 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1287 2011/02/10 14:04:30 rmind Exp $
+# $NetBSD: mi,v 1.1288 2011/02/14 08:50:38 hannken Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1130,6 +1130,7 @@
 ./usr/share/man/cat4/i4btrc.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i915drm.0			man-sys-catman		.cat
 ./usr/share/man/cat4/iavc.0			man-sys-catman		.cat
+./usr/share/man/cat4/ibmhawk.0			man-sys-catman		.cat
 ./usr/share/man/cat4/ichlpcib.0			man-obsolete		obsolete
 ./usr/share/man/cat4/ichsmb.0			man-sys-catman		.cat
 ./usr/share/man/cat4/icmp.0			man-sys-catman		.cat
@@ -3860,6 +3861,7 @@
 ./usr/share/man/html4/i386/vesafb.html		man-obsolete		obsolete
 ./usr/share/man/html4/i915drm.html		man-sys-htmlman		html
 ./usr/share/man/html4/iavc.html			man-sys-htmlman		html
+./usr/share/man/html4/ibmhawk.html		man-sys-htmlman		html
 ./usr/share/man/html4/ichlpcib.html		man-obsolete		obsolete
 ./usr/share/man/html4/ichsmb.html		man-sys-htmlman		html
 ./usr/share/man/html4/icmp.html			man-sys-htmlman		html
@@ -6425,6 +6427,7 @@
 ./usr/share/man/man4/i4btrc.4			man-obsolete		obsolete
 ./usr/share/man/man4/i915drm.4			man-sys-man		.man
 ./usr/share/man/man4/iavc.4			man-sys-man		.man
+./usr/share/man/man4/ibmhawk.4			man-sys-man		.man
 ./usr/share/man/man4/ichlpcib.4			man-obsolete		obsolete
 ./usr/share/man/man4/ichsmb.4			man-sys-man		.man
 ./usr/share/man/man4/icmp.4			man-sys-man		.man

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.549 src/share/man/man4/Makefile:1.550
--- src/share/man/man4/Makefile:1.549	Wed Feb  9 15:31:30 2011
+++ src/share/man/man4/Makefile	Mon Feb 14 08:50:39 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.549 2011/02/09 15:31:30 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.550 2011/02/14 08:50:39 hannken Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -28,7 +28,7 @@
 	gcscaudio.4 gem.4 genfb.4 gentbi.4 geodeide.4 \
 	glxtphy.4 gpib.4 gpio.4 gpiolock.4 gpiosim.4 gre.4 gphyter.4 gsip.4 \
 	hdaudio.4 hifn.4 hme.4 hpqlb.4 hptide.4 \
-	ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \
+	ibmhawk.4 ichsmb.4 icmp.4 icp.4 icsphy.4 iee.4 ieee80211.4 \
 	ifmedia.4 igphy.4 igsfb.4 iha.4 ihphy.4 iic.4 inet.4 ikphy.4 inphy.4 \
 	intersil7170.4 \
 	ioasic.4 ioat.4 iop.4 iophy.4 iopsp.4 ip.4 ipkdb.4 ipmi.4 ipw.4 \

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.303 src/sys/arch/amd64/conf/GENERIC:1.304
--- src/sys/arch/amd64/conf/GENERIC:1.303	Sun Feb 13 04:21:23 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Feb 14 08:50:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.303 2011/02/13 04:21:23 jym Exp $
+# $NetBSD: GENERIC,v 1.304 2011/02/14 08:50:39 hannken Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.303 $
+#ident 		GENERIC-$Revision: 1.304 $
 
 maxusers	64		# estimated number of users
 
@@ -428,6 +428,9 @@
 #wbsio*	at isa? port 0x2e
 #wbsio*	at isa? port 0x4e
 
+# IBM Hawk Integrated Systems Management Processor
+#ibmhawk0	at iic? addr 0x37
+
 # LM7[89] and compatible hardware monitors
 # Use flags to select temp sensor type (see lm(4) man page for details)
 #lm0	at isa?	port 0x290 flags 0x0	# other common ports: 0x280, 0x310

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.286 src/sys/arch/i386/conf/ALL:1.287
--- 

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

2011-02-14 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Mon Feb 14 09:00:04 UTC 2011

Modified Files:
src/sys/arch/sandpoint/pci: pci_machdep.c

Log Message:
add EPIC definition for Netronics NH230/NH231 and the brothers.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sandpoint/pci/pci_machdep.c

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

Modified files:

Index: src/sys/arch/sandpoint/pci/pci_machdep.c
diff -u src/sys/arch/sandpoint/pci/pci_machdep.c:1.22 src/sys/arch/sandpoint/pci/pci_machdep.c:1.23
--- src/sys/arch/sandpoint/pci/pci_machdep.c:1.22	Thu Feb 10 13:54:45 2011
+++ src/sys/arch/sandpoint/pci/pci_machdep.c	Mon Feb 14 09:00:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.22 2011/02/10 13:54:45 nisimura Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.23 2011/02/14 09:00:04 nisimura Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.22 2011/02/10 13:54:45 nisimura Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_machdep.c,v 1.23 2011/02/14 09:00:04 nisimura Exp $);
 
 #include opt_pci.h
 
@@ -96,6 +96,7 @@
 #define BRD_SYNOLOGY		102
 #define BRD_STORCENTER		103
 #define BRD_DLINKDSM		104
+#define BRD_NH230NAS		105
 #define BRD_UNKNOWN		-1
 
 #define	PCI_CONFIG_ENABLE	0x8000UL
@@ -158,6 +159,11 @@
 		brdtype = BRD_DLINKDSM;
 		return;
 	}
+	if (PCI_VENDOR(dev16) == PCI_VENDOR_ITE
+	|| PCI_VENDOR(dev16) == PCI_VENDOR_CMDTECH) {
+		brdtype = BRD_NH230NAS;
+		return;
+	}
 
 	brdtype = BRD_UNKNOWN;
 }
@@ -348,6 +354,12 @@
 		/* map line 13,14,15,16 to EPIC IRQ0,1,3,4 */
 		*ihp = (line  15) ? line - 13 : line - 12;
 		break;
+	case BRD_NH230NAS:
+		/* map line 13,14,15,16 to EPIC IRQ0,3,1,2 */
+		*ihp =  (line == 16) ? 2 :
+			(line == 15) ? 1 :
+			(line == 14) ? 3 : 0;
+		break;
 	case BRD_STORCENTER:
 	default:
 		/* map line 12-15 to EPIC IRQ0-3 */



CVS commit: src/share/man/man4

2011-02-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Feb 14 09:21:34 UTC 2011

Modified Files:
src/share/man/man4: ibmhawk.4

Log Message:
Fix a typo, add a serial comma.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/ibmhawk.4

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/man4/ibmhawk.4
diff -u src/share/man/man4/ibmhawk.4:1.1 src/share/man/man4/ibmhawk.4:1.2
--- src/share/man/man4/ibmhawk.4:1.1	Mon Feb 14 08:50:39 2011
+++ src/share/man/man4/ibmhawk.4	Mon Feb 14 09:21:33 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: ibmhawk.4,v 1.1 2011/02/14 08:50:39 hannken Exp $
+.\ $NetBSD: ibmhawk.4,v 1.2 2011/02/14 09:21:33 wiz Exp $
 .\
 .\ Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -33,12 +33,12 @@
 .Sh NAME
 .Nm ibmhawk
 .Nd IBM Hawk Integrated Systems Management Processor
-.Sh SYNOPSUS
+.Sh SYNOPSIS
 .Cd ibmhawk0 at iic?
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the temperature, voltage and
+driver provides support for the temperature, voltage, and
 fan sensors present on IBM eServers equipped with an on-board
 Hawk Integrated Systems Management Processor.
 .Pp



CVS commit: src/sys/arch/sparc/sparc

2011-02-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb 14 10:20:31 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc: timer.c

Log Message:
use schedintr() (not schedintr_4m()) on MP or single CPU configurations.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sparc/sparc/timer.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/timer.c
diff -u src/sys/arch/sparc/sparc/timer.c:1.26 src/sys/arch/sparc/sparc/timer.c:1.27
--- src/sys/arch/sparc/sparc/timer.c:1.26	Mon Jan  4 04:21:35 2010
+++ src/sys/arch/sparc/sparc/timer.c	Mon Feb 14 10:20:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer.c,v 1.26 2010/01/04 04:21:35 mrg Exp $ */
+/*	$NetBSD: timer.c,v 1.27 2011/02/14 10:20:31 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: timer.c,v 1.26 2010/01/04 04:21:35 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: timer.c,v 1.27 2011/02/14 10:20:31 mrg Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -208,7 +208,12 @@
 #if defined(SUN4M)
 	if (CPU_ISSUN4M) {
 		timer_init = timer_init_4m;
-		sched_intr_fn = schedintr_4m;
+#if defined(MULTIPROCESSOR)
+		if (sparc_ncpus  1)
+			sched_intr_fn = schedintr_4m;
+		else
+#endif
+			sched_intr_fn = schedintr;
 		level10.ih_fun = clockintr_4m;
 		level14.ih_fun = statintr_4m;
 		cntr.limit = tmr_ustolim4m(tick);



CVS commit: src/sys/arch/sparc/sparc

2011-02-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Feb 14 10:21:05 UTC 2011

Modified Files:
src/sys/arch/sparc/sparc: timer_sun4m.c

Log Message:
call hardclock() the same way on cpu0 in MP and !MP cases.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/sparc/timer_sun4m.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/timer_sun4m.c
diff -u src/sys/arch/sparc/sparc/timer_sun4m.c:1.23 src/sys/arch/sparc/sparc/timer_sun4m.c:1.24
--- src/sys/arch/sparc/sparc/timer_sun4m.c:1.23	Thu Jan 27 06:24:59 2011
+++ src/sys/arch/sparc/sparc/timer_sun4m.c	Mon Feb 14 10:21:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer_sun4m.c,v 1.23 2011/01/27 06:24:59 mrg Exp $	*/
+/*	$NetBSD: timer_sun4m.c,v 1.24 2011/02/14 10:21:05 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: timer_sun4m.c,v 1.23 2011/01/27 06:24:59 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: timer_sun4m.c,v 1.24 2011/02/14 10:21:05 mrg Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -106,7 +106,8 @@
 	 * all CPUs.  This function ends up being called on sun4m systems
 	 * every tick.
 	 */
-	hardclock(v);
+	if (!CPU_IS_PRIMARY(curcpu()))
+		hardclock(v);
 
 	/*
 	 * The factor 8 is only valid for stathz==100.
@@ -125,6 +126,7 @@
 clockintr_4m(void *cap)
 {
 
+	KASSERT(CPU_IS_PRIMARY(curcpu()));
 	/*
 	 * XXX this needs to be fixed in a more general way
 	 * problem is that the kernel enables interrupts and THEN
@@ -141,9 +143,7 @@
 	/* read the limit register to clear the interrupt */
 	*((volatile int *)timerreg4m-t_limit);
 	tickle_tc();
-#if !defined(MULTIPROCESSOR)
 	hardclock((struct clockframe *)cap);
-#endif
 	return (1);
 }
 



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

2011-02-14 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Feb 14 10:22:19 UTC 2011

Modified Files:
src/sys/arch/sparc/include: pmap.h

Log Message:
Provide a macro for pmap_mmap_flags() since we define PMAP_EXCLUDE_DECLS
here.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/sparc/include/pmap.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/sparc/include/pmap.h
diff -u src/sys/arch/sparc/include/pmap.h:1.89 src/sys/arch/sparc/include/pmap.h:1.90
--- src/sys/arch/sparc/include/pmap.h:1.89	Sun Nov 14 13:33:23 2010
+++ src/sys/arch/sparc/include/pmap.h	Mon Feb 14 10:22:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.89 2010/11/14 13:33:23 uebayasi Exp $ */
+/*	$NetBSD: pmap.h,v 1.90 2011/02/14 10:22:19 he Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -271,6 +271,7 @@
 void		pmap_writetext(unsigned char *, int);
 void		pmap_globalize_boot_cpuinfo(struct cpu_info *);
 void		pmap_remove_all(struct pmap *pm);
+#define 	pmap_mmap_flags(x)	0	/* dummy so far */
 
 /* SUN4/SUN4C SPECIFIC DECLARATIONS */
 



CVS commit: src/usr.sbin/ldpd

2011-02-14 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Mon Feb 14 11:43:59 UTC 2011

Modified Files:
src/usr.sbin/ldpd: mpls_routes.c

Log Message:
get rid of unused variable/assignments


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/ldpd/mpls_routes.c

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

Modified files:

Index: src/usr.sbin/ldpd/mpls_routes.c
diff -u src/usr.sbin/ldpd/mpls_routes.c:1.4 src/usr.sbin/ldpd/mpls_routes.c:1.5
--- src/usr.sbin/ldpd/mpls_routes.c:1.4	Wed Feb  9 11:38:57 2011
+++ src/usr.sbin/ldpd/mpls_routes.c	Mon Feb 14 11:43:59 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mpls_routes.c,v 1.4 2011/02/09 11:38:57 kefren Exp $ */
+/* $NetBSD: mpls_routes.c,v 1.5 2011/02/14 11:43:59 kefren Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -635,25 +635,23 @@
 		 */
 
 		/* First of all check if we already know this one */
-		lab = label_get(so_dest, so_pref);
-		if (!lab) {
+		if (label_get(so_dest, so_pref) == NULL) {
 			if (!(rg-m_rtm.rtm_flags  RTF_GATEWAY))
-lab = label_add(so_dest, so_pref, NULL,
+label_add(so_dest, so_pref, NULL,
 	MPLS_LABEL_IMPLNULL, NULL, 0);
 			else {
 pm = ldp_test_mapping(so_dest-sin.sin_addr,
 	 prefixlen, so_gate-sin.sin_addr);
 if (pm) {
-	lab = label_add(so_dest, so_pref,
+	label_add(so_dest, so_pref,
 		so_gate, 0, NULL, 0);
 	mpls_add_label(pm-peer, rg,
 	  so_dest-sin.sin_addr, prefixlen,
 	  pm-lm-label, ROUTE_LOOKUP_LOOP);
 	free(pm);
 } else
-	lab = label_add(so_dest, so_pref,
-		so_gate, MPLS_LABEL_IMPLNULL,
-		NULL, 0);
+	label_add(so_dest, so_pref, so_gate,
+	MPLS_LABEL_IMPLNULL, NULL, 0);
 			}
 		} else	/* We already know about this prefix */
 			debugp(Binding already there for prefix %s/%d !\n,
@@ -728,7 +726,6 @@
 	char   *buf, *next, *lim;
 	struct rt_msghdr *rtmes;
 	union sockunion *so_dst, *so_pref, *so_gate;
-	struct label	*lab;
 
 	mib[0] = CTL_NET;
 	mib[1] = PF_ROUTE;
@@ -812,7 +809,7 @@
 			continue;
 		}
 		if (so_gate-sa.sa_family == AF_INET)
-			lab = label_add(so_dst, so_pref, so_gate,
+			label_add(so_dst, so_pref, so_gate,
 			MPLS_LABEL_IMPLNULL, NULL, 0);
 
 		if (rtmes-rtm_flags  RTF_HOST)



CVS commit: src/sys/arch/sandpoint

2011-02-14 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Mon Feb 14 12:36:38 UTC 2011

Modified Files:
src/sys/arch/sandpoint: README.NAS

Log Message:
add Thecus N3200 to the research list.  Along with N1200 they use
MPC8347 single PCI SoC.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sandpoint/README.NAS

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/README.NAS
diff -u src/sys/arch/sandpoint/README.NAS:1.16 src/sys/arch/sandpoint/README.NAS:1.17
--- src/sys/arch/sandpoint/README.NAS:1.16	Sun Feb 13 20:39:11 2011
+++ src/sys/arch/sandpoint/README.NAS	Mon Feb 14 12:36:38 2011
@@ -1,4 +1,4 @@
-$NetBSD: README.NAS,v 1.16 2011/02/13 20:39:11 phx Exp $
+$NetBSD: README.NAS,v 1.17 2011/02/14 12:36:38 nisimura Exp $
 
  MPC8241/8245 NAS products 
 
@@ -60,10 +60,20 @@
 ds1339 RTC	1:0x68
 sat MCU		1:0x0a
 
-- Thecus N1200
+- Thecus N1200 (MPC8347)
+- Thecus N3200 (MPC8347)
+
+  PCI		IDSEL		IPIC IRQ
+satalink	16		20
+
+  I2C		bus:addr
+f75375 fanctl	0:0x2e
+rs5c372a RTC	0:0x32
+sat MCU		0:0x36
+
 
   PCI		bus:IDSEL	IPIC IRQ
-satalink	0:16		22
+satalink	16		20
 
   I2C		bus:addr
 f75375 fanctl	0:0x2e



CVS commit: src/crypto/external/bsd/libsaslc/dist/src

2011-02-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 14 12:45:31 UTC 2011

Modified Files:
src/crypto/external/bsd/libsaslc/dist/src: mech.c

Log Message:
fix the loop sentinel.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/libsaslc/dist/src/mech.c

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

Modified files:

Index: src/crypto/external/bsd/libsaslc/dist/src/mech.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech.c:1.5 src/crypto/external/bsd/libsaslc/dist/src/mech.c:1.6
--- src/crypto/external/bsd/libsaslc/dist/src/mech.c:1.5	Sun Feb 13 00:39:52 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech.c	Mon Feb 14 07:45:31 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech.c,v 1.5 2011/02/13 05:39:52 christos Exp $ */
+/* $NetBSD: mech.c,v 1.6 2011/02/14 12:45:31 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: mech.c,v 1.5 2011/02/13 05:39:52 christos Exp $);
+__RCSID($NetBSD: mech.c,v 1.6 2011/02/14 12:45:31 christos Exp $);
 
 #include sys/queue.h
 
@@ -106,7 +106,7 @@
 		saslc__error_set_errno(ERR(ctx), ERROR_NOMEM);
 		return NULL;
 	}
-	for (i = 0; __arraycount(saslc__mechanisms); i++) {
+	for (i = 0; i  __arraycount(saslc__mechanisms); i++) {
 		if (saslc__mechanisms[i] == NULL)
 			continue;
 		if ((node = calloc(1, sizeof(*node))) == NULL)



CVS commit: src/sys/arch/sandpoint

2011-02-14 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Mon Feb 14 13:05:00 UTC 2011

Modified Files:
src/sys/arch/sandpoint: README.NAS

Log Message:
- remove the mangled lines of the previous commit.
- withdraw DS407 description for now as pieces of info are conflicting
  and remain uncertain.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sandpoint/README.NAS

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/README.NAS
diff -u src/sys/arch/sandpoint/README.NAS:1.17 src/sys/arch/sandpoint/README.NAS:1.18
--- src/sys/arch/sandpoint/README.NAS:1.17	Mon Feb 14 12:36:38 2011
+++ src/sys/arch/sandpoint/README.NAS	Mon Feb 14 13:05:00 2011
@@ -1,4 +1,4 @@
-$NetBSD: README.NAS,v 1.17 2011/02/14 12:36:38 nisimura Exp $
+$NetBSD: README.NAS,v 1.18 2011/02/14 13:05:00 nisimura Exp $
 
  MPC8241/8245 NAS products 
 
@@ -60,8 +60,7 @@
 ds1339 RTC	1:0x68
 sat MCU		1:0x0a
 
-- Thecus N1200 (MPC8347)
-- Thecus N3200 (MPC8347)
+- Thecus N1200/N3200 (MPC8347)
 
   PCI		IDSEL		IPIC IRQ
 satalink	16		20
@@ -72,26 +71,6 @@
 sat MCU		0:0x36
 
 
-  PCI		bus:IDSEL	IPIC IRQ
-satalink	16		20
-
-  I2C		bus:addr
-f75375 fanctl	0:0x2e
-rs5c372a RTC	0:0x32
-sat MCU		0:0x36
-
-- Synology DS407
-
-  PCI		bus:IDSEL	IPIC IRQ
-satalink	0:13		20
-satalink	0:14		21
-USB ?		0:15		22
-PCI ?		0:16		19
-
-  I2C
-ds1337 RTC	1:0x68
-
-
 [ research still in progress ]
 
 ---



CVS commit: src/sys/netipsec

2011-02-14 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Feb 14 13:43:45 UTC 2011

Modified Files:
src/sys/netipsec: xform_ah.c xform_esp.c xform_ipcomp.c

Log Message:
change locking order, to make sure the cpu is at splsoftnet()
before the softnet_lock (adaptive) mutex is acquired, from
Wolfgang Stukenbrock, should fix a recursive lock panic


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/netipsec/xform_ah.c
cvs rdiff -u -r1.23 -r1.24 src/sys/netipsec/xform_esp.c
cvs rdiff -u -r1.21 -r1.22 src/sys/netipsec/xform_ipcomp.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/netipsec/xform_ah.c
diff -u src/sys/netipsec/xform_ah.c:1.27 src/sys/netipsec/xform_ah.c:1.28
--- src/sys/netipsec/xform_ah.c:1.27	Thu Feb 10 20:24:27 2011
+++ src/sys/netipsec/xform_ah.c	Mon Feb 14 13:43:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_ah.c,v 1.27 2011/02/10 20:24:27 drochner Exp $	*/
+/*	$NetBSD: xform_ah.c,v 1.28 2011/02/14 13:43:45 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
 /*
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_ah.c,v 1.27 2011/02/10 20:24:27 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_ah.c,v 1.28 2011/02/14 13:43:45 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -829,8 +829,8 @@
 	}
 #endif
 
-	mutex_enter(softnet_lock);
 	s = splsoftnet();
+	mutex_enter(softnet_lock);
 
 	sav = KEY_ALLOCSA(tc-tc_dst, tc-tc_proto, tc-tc_spi, sport, dport);
 	if (sav == NULL) {
@@ -854,8 +854,8 @@
 			sav-tdb_cryptoid = crp-crp_sid;
 
 		if (crp-crp_etype == EAGAIN) {
-			splx(s);
 			mutex_exit(softnet_lock);
+			splx(s);
 			return crypto_dispatch(crp);
 		}
 
@@ -964,14 +964,14 @@
 	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag);
 
 	KEY_FREESAV(sav);
-	splx(s);
 	mutex_exit(softnet_lock);
+	splx(s);
 	return error;
 bad:
 	if (sav)
 		KEY_FREESAV(sav);
-	splx(s);
 	mutex_exit(softnet_lock);
+	splx(s);
 	if (m != NULL)
 		m_freem(m);
 	if (tc != NULL)
@@ -1235,8 +1235,8 @@
 	ptr = (tc + 1);
 	m = (struct mbuf *) crp-crp_buf;
 
-	mutex_enter(softnet_lock);
 	s = splsoftnet();
+	mutex_enter(softnet_lock);
 
 	isr = tc-tc_isr;
 	sav = KEY_ALLOCSA(tc-tc_dst, tc-tc_proto, tc-tc_spi, 0, 0);
@@ -1255,8 +1255,8 @@
 
 		if (crp-crp_etype == EAGAIN) {
 			KEY_FREESAV(sav);
-			splx(s);
 			mutex_exit(softnet_lock);
+			splx(s);
 			return crypto_dispatch(crp);
 		}
 
@@ -1302,14 +1302,14 @@
 	/* NB: m is reclaimed by ipsec_process_done. */
 	err = ipsec_process_done(m, isr);
 	KEY_FREESAV(sav);
-	splx(s);
 	mutex_exit(softnet_lock);
+	splx(s);
 	return err;
 bad:
 	if (sav)
 		KEY_FREESAV(sav);
-	splx(s);
 	mutex_exit(softnet_lock);
+	splx(s);
 	if (m)
 		m_freem(m);
 	free(tc, M_XDATA);

Index: src/sys/netipsec/xform_esp.c
diff -u src/sys/netipsec/xform_esp.c:1.23 src/sys/netipsec/xform_esp.c:1.24
--- src/sys/netipsec/xform_esp.c:1.23	Thu Feb 10 20:24:27 2011
+++ src/sys/netipsec/xform_esp.c	Mon Feb 14 13:43:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_esp.c,v 1.23 2011/02/10 20:24:27 drochner Exp $	*/
+/*	$NetBSD: xform_esp.c,v 1.24 2011/02/14 13:43:45 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.23 2011/02/10 20:24:27 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.24 2011/02/14 13:43:45 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -498,8 +498,8 @@
 	}
 #endif
 
-	mutex_enter(softnet_lock);
 	s = splsoftnet();
+	mutex_enter(softnet_lock);
 
 	sav = KEY_ALLOCSA(tc-tc_dst, tc-tc_proto, tc-tc_spi, sport, dport);
 	if (sav == NULL) {
@@ -528,8 +528,8 @@
 
 		if (crp-crp_etype == EAGAIN) {
 			KEY_FREESAV(sav);
-			splx(s);
 			mutex_exit(softnet_lock);
+			splx(s);
 			return crypto_dispatch(crp);
 		}
 
@@ -667,14 +667,14 @@
 	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag);
 
 	KEY_FREESAV(sav);
-	splx(s);
 	mutex_exit(softnet_lock);
+	splx(s);
 	return error;
 bad:
 	if (sav)
 		KEY_FREESAV(sav);
-	splx(s);
 	mutex_exit(softnet_lock);
+	splx(s);
 	if (m != NULL)
 		m_freem(m);
 	if (tc != NULL)
@@ -939,8 +939,8 @@
 	IPSEC_ASSERT(tc != NULL, (esp_output_cb: null opaque data area!));
 	m = (struct mbuf *) crp-crp_buf;
 
-	mutex_enter(softnet_lock);
 	s = splsoftnet();
+	mutex_enter(softnet_lock);
 
 	isr = tc-tc_isr;
 	sav = KEY_ALLOCSA(tc-tc_dst, tc-tc_proto, tc-tc_spi, 0, 0);
@@ -963,8 +963,8 @@
 
 		if (crp-crp_etype == EAGAIN) {
 			KEY_FREESAV(sav);
-			splx(s);
 			mutex_exit(softnet_lock);
+			splx(s);
 			return crypto_dispatch(crp);
 		}
 
@@ -1010,14 +1010,14 @@
 	/* NB: m is reclaimed by ipsec_process_done. */
 	err = ipsec_process_done(m, isr);
 	

CVS commit: src/sys/dev/i2c

2011-02-14 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Feb 14 14:15:25 UTC 2011

Modified Files:
src/sys/dev/i2c: ibmhawk.c

Log Message:
ibmhawk_set: No need to set states ENVSYS_SWARNxxx, sysmon will do it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ibmhawk.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/i2c/ibmhawk.c
diff -u src/sys/dev/i2c/ibmhawk.c:1.1 src/sys/dev/i2c/ibmhawk.c:1.2
--- src/sys/dev/i2c/ibmhawk.c:1.1	Mon Feb 14 08:50:39 2011
+++ src/sys/dev/i2c/ibmhawk.c	Mon Feb 14 14:15:25 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ibmhawk.c,v 1.1 2011/02/14 08:50:39 hannken Exp $ */
+/* $NetBSD: ibmhawk.c,v 1.2 2011/02/14 14:15:25 hannken Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -318,15 +318,11 @@
 			failed to attach \%s\\n, dp-desc);
 	}
 
-	dp-value_cur = ibmhawk_normalize(value, dp-units);
-	if (!valid)
-		dp-state = ENVSYS_SINVALID;
-	else if (sd-ihs_warnmin != 0  value  sd-ihs_warnmin)
-		dp-state = ENVSYS_SWARNUNDER;
-	else if (sd-ihs_warnmax != 0  value  sd-ihs_warnmax)
-		dp-state = ENVSYS_SWARNOVER;
-	else
+	if (valid) {
+		dp-value_cur = ibmhawk_normalize(value, dp-units);
 		dp-state = ENVSYS_SVALID;
+	} else
+		dp-state = ENVSYS_SINVALID;
 }
 
 static void



CVS commit: src/lib

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 14:56:23 UTC 2011

Modified Files:
src/lib/librumpclient: rumpclient.c rumpclient.h
src/lib/librumphijack: hijack.c
src/lib/librumpuser: sp_common.c

Log Message:
A bunch of changes which essentially make sshd work with a hijacked
rump tcp/ip stack:

* sshd likes to fork and then re-exec itself
  == trap execve() and augment the env with the current parameters
  essential to a rump kernel (kernel communication fd, information
  about dup2'd file descriptors)

* sshd likes to play lots of games with pipes, socketpairs and dup{,2}()
  == make sure we do not close essential rump client descriptors:
  dup() them to a safe place, except for F_CLOSEM where we
  simply leave them alone.  also, partially solved by the above,
  make sure the process's set of rump kernel descriptors persists
  over exec()

* sshd likes to chdir() before exec
  == for unix-style rump_sp(7) sockets save the full path on the
  initial exec and use it afterwards.  thread the path through
  the environment in execve()


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.5 -r1.6 src/lib/librumpclient/rumpclient.h
cvs rdiff -u -r1.38 -r1.39 src/lib/librumphijack/hijack.c
cvs rdiff -u -r1.26 -r1.27 src/lib/librumpuser/sp_common.c

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

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.27 src/lib/librumpclient/rumpclient.c:1.28
--- src/lib/librumpclient/rumpclient.c:1.27	Wed Feb  9 14:29:58 2011
+++ src/lib/librumpclient/rumpclient.c	Mon Feb 14 14:56:23 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.27 2011/02/09 14:29:58 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.28 2011/02/14 14:56:23 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -198,6 +198,10 @@
 	rv = host_kevent(kq, NULL, 0,
 	kev, __arraycount(kev), NULL);
 
+	if (__predict_false(rv == -1)) {
+		goto cleanup;
+	}
+
 	/*
 	 * XXX: don't know how this can
 	 * happen (timeout cannot expire
@@ -546,15 +550,19 @@
 
 /* dup until we get a good fd which does not collide with stdio */
 static int
-dupgood(int myfd)
+dupgood(int myfd, int mustchange)
 {
-	int ofds[3];
+	int ofds[4];
 	int i;
 
-	for (i = 0; myfd = 2  myfd != -1; i++) {
+	for (i = 0; (myfd = 2 || mustchange)  myfd != -1; i++) {
 		assert(i  __arraycount(ofds));
 		ofds[i] = myfd;
 		myfd = host_dup(myfd);
+		if (mustchange) {
+			i--; /* prevent closing old fd */
+			mustchange = 0;
+		}
 	}
 
 	for (i--; i = 0; i--) {
@@ -611,7 +619,7 @@
 	free(clispc.spc_buf);
 	clispc.spc_off = 0;
 
-	s = dupgood(host_socket(parsetab[ptab_idx].domain, SOCK_STREAM, 0));
+	s = dupgood(host_socket(parsetab[ptab_idx].domain, SOCK_STREAM, 0), 0);
 	if (s == -1)
 		return -1;
 
@@ -666,7 +674,7 @@
 	clispc.spc_reconnecting = 0;
 
 	/* setup kqueue, we want all signals and the fd */
-	if ((kq = dupgood(host_kqueue())) == -1) {
+	if ((kq = dupgood(host_kqueue(), 0)) == -1) {
 		error = errno;
 		if (noisy)
 			fprintf(stderr, rump_sp: cannot setup kqueue);
@@ -742,9 +750,11 @@
 #undef	FINDSYM
 #undef	FINDSY2
 
-	if ((p = getenv(RUMP_SERVER)) == NULL) {
-		errno = ENOENT;
-		return -1;
+	if ((p = getenv(RUMP__PARSEDSERVER)) == NULL) {
+		if ((p = getenv(RUMP_SERVER)) == NULL) {
+			errno = ENOENT;
+			return -1;
+		}
 	}
 
 	if ((error = parseurl(p, serv_sa, ptab_idx, 0)) != 0) {
@@ -754,6 +764,13 @@
 
 	if (doinit() == -1)
 		return -1;
+
+	if ((p = getenv(RUMPCLIENT__EXECFD)) != NULL) {
+		sscanf(p, %d,%d, clispc.spc_fd, kq);
+		unsetenv(RUMPCLIENT__EXECFD);
+		return 0;
+	}
+
 	if (doconnect(true) == -1)
 		return -1;
 
@@ -839,3 +856,126 @@
 
 	retrytimo = timeout;
 }
+
+int
+rumpclient__closenotify(int *fdp, enum rumpclient_closevariant variant)
+{
+	int fd = *fdp;
+	int untilfd, rv;
+	int newfd;
+
+	switch (variant) {
+	case RUMPCLIENT_CLOSE_FCLOSEM:
+		untilfd = MAX(clispc.spc_fd, kq);
+		for (; fd = untilfd; fd++) {
+			if (fd == clispc.spc_fd || fd == kq)
+continue;
+			rv = host_close(fd);
+			if (rv == -1)
+return -1;
+		}
+		*fdp = fd;
+		break;
+
+	case RUMPCLIENT_CLOSE_CLOSE:
+	case RUMPCLIENT_CLOSE_DUP2:
+		if (fd == clispc.spc_fd) {
+			struct kevent kev[2];
+
+			newfd = dupgood(clispc.spc_fd, 1);
+			if (newfd == -1)
+return -1;
+			/*
+			 * now, we have a new socket number, so change
+			 * the file descriptor that kqueue is
+			 * monitoring.  remove old and add new.
+			 */
+			EV_SET(kev[0], clispc.spc_fd,
+			EVFILT_READ, EV_DELETE, 0, 0, 0);
+			EV_SET(kev[1], newfd,
+			EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0);
+			if (host_kevent(kq, kev, 2, NULL, 0, NULL) == -1) {
+int sverrno = errno;
+host_close(newfd);
+errno = sverrno;
+return -1;
+			}
+			

CVS commit: src/tests/lib/librumphijack

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 15:14:00 UTC 2011

Modified Files:
src/tests/lib/librumphijack: Makefile t_tcpip.sh
Added Files:
src/tests/lib/librumphijack: ssh_config.in ssh_host_key
ssh_host_key.pub sshd_config.in

Log Message:
Test that hijacked ssh/sshd work.

Copypastes jmmv's sshd magic from fs/psshfs.
(dunno if it's worth sharing the code, or even what the
best practice for doing so would be)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumphijack/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/librumphijack/ssh_config.in \
src/tests/lib/librumphijack/ssh_host_key \
src/tests/lib/librumphijack/ssh_host_key.pub \
src/tests/lib/librumphijack/sshd_config.in
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/librumphijack/t_tcpip.sh

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

Modified files:

Index: src/tests/lib/librumphijack/Makefile
diff -u src/tests/lib/librumphijack/Makefile:1.2 src/tests/lib/librumphijack/Makefile:1.3
--- src/tests/lib/librumphijack/Makefile:1.2	Fri Feb 11 15:38:14 2011
+++ src/tests/lib/librumphijack/Makefile	Mon Feb 14 15:14:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/02/11 15:38:14 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2011/02/14 15:14:00 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -13,6 +13,12 @@
 FILES=		netstat.expout index.html
 FILESDIR=	${TESTSDIR}
 
+# ssh test
+FILES+=		ssh_config.in
+FILES+=		ssh_host_key
+FILES+=		ssh_host_key.pub
+FILES+=		sshd_config.in
+
 ATFFILE=	yes
 
 .include bsd.test.mk

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.1 src/tests/lib/librumphijack/t_tcpip.sh:1.2
--- src/tests/lib/librumphijack/t_tcpip.sh:1.1	Sun Feb  6 18:44:30 2011
+++ src/tests/lib/librumphijack/t_tcpip.sh	Mon Feb 14 15:14:00 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_tcpip.sh,v 1.1 2011/02/06 18:44:30 pooka Exp $
+#   $NetBSD: t_tcpip.sh,v 1.2 2011/02/14 15:14:00 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -42,7 +42,7 @@
 	export RUMPHIJACK_RETRY='die'
 
 	# start bozo in daemon mode
-	atf_check -s exit:0 -e ignore env LD_PRELOAD=/usr/lib/librumphijack.so \
+	atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \
 	/usr/libexec/httpd -b -s $(atf_get_srcdir)
 
 	atf_check -s exit:0 -o file:$(atf_get_srcdir)/netstat.expout \
@@ -64,7 +64,90 @@
 	rump.halt
 }
 
+#
+# Starts a SSH server and sets up the client to access it.
+# Authentication is allowed and done using an RSA key exclusively, which
+# is generated on the fly as part of the test case.
+# XXX: Ideally, all the tests in this test program should be able to share
+# the generated key, because creating it can be a very slow process on some
+# machines.
+#
+# XXX2: copypasted from jmmv's sshd thingamob in the psshfs test.
+# ideally code (and keys, like jmmv notes above) could be shared
+#
+start_sshd() {
+	echo Setting up SSH server configuration
+	sed -e s,@SRCDIR@,$(atf_get_srcdir),g -e s,@WORKDIR@,$(pwd),g \
+	$(atf_get_srcdir)/sshd_config.in sshd_config || \
+	atf_fail Failed to create sshd_config
+	atf_check -s ignore -o empty -e ignore \
+	cp $(atf_get_srcdir)/ssh_host_key .
+	atf_check -s ignore -o empty -e ignore \
+	cp $(atf_get_srcdir)/ssh_host_key.pub .
+	atf_check -s eq:0 -o empty -e empty chmod 400 ssh_host_key
+	atf_check -s eq:0 -o empty -e empty chmod 444 ssh_host_key.pub
+
+env LD_PRELOAD=/usr/lib/librumphijack.so \
+	/usr/sbin/sshd -e -f ./sshd_config
+	while [ ! -f sshd.pid ]; do
+		sleep 0.01
+	done
+	echo SSH server started (pid $(cat sshd.pid))
+
+	echo Setting up SSH client configuration
+	atf_check -s eq:0 -o empty -e empty \
+	ssh-keygen -f ssh_user_key -t rsa -b 1024 -N  -q
+	atf_check -s eq:0 -o empty -e empty \
+	cp ssh_user_key.pub authorized_keys
+	echo 127.0.0.1,localhost,::1  \
+	$(cat $(atf_get_srcdir)/ssh_host_key.pub) known_hosts || \
+	atf_fail Failed to create known_hosts
+	atf_check -s eq:0 -o empty -e empty chmod 600 authorized_keys
+	sed -e s,@SRCDIR@,$(atf_get_srcdir),g -e s,@WORKDIR@,$(pwd),g \
+	$(atf_get_srcdir)/ssh_config.in ssh_config || \
+	atf_fail Failed to create ssh_config
+	
+	echo sshd running
+}
+
+atf_test_case ssh cleanup
+ssh_head()
+{
+atf_set descr Test that hijacked ssh/sshd works
+}
+
+ssh_body()
+{
+
+	atf_check -s exit:0 ${rumpnetsrv} ${RUMP_SERVER}
+	# make sure clients die after we nuke the server
+	export RUMPHIJACK_RETRY='die'
+
+	export LD_LIBRARY_PATH=/home/pooka/src/nb5/src/lib/libssh
+
+	start_sshd
+
+	# create some sort of directory for us to ls
+	mkdir testdir
+	cd testdir
+	jot 11 | xargs touch
+	jot 11 12 | xargs mkdir
+	cd ..
+
+	atf_check -s exit:0 -o save:ssh.out\
+	env LD_PRELOAD=/usr/lib/librumphijack.so			\
+	ssh -T -F ssh_config 127.0.0.1 ls -li $(pwd)/testdir
+	atf_check -s exit:0 -o 

CVS commit: src/distrib/sets/lists/tests

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 15:15:40 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
slap this with summa dat +files


To generate a diff of this commit:
cvs rdiff -u -r1.246 -r1.247 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.246 src/distrib/sets/lists/tests/mi:1.247
--- src/distrib/sets/lists/tests/mi:1.246	Fri Feb 11 15:38:55 2011
+++ src/distrib/sets/lists/tests/mi	Mon Feb 14 15:15:40 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.246 2011/02/11 15:38:55 pooka Exp $
+# $NetBSD: mi,v 1.247 2011/02/14 15:15:40 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1908,6 +1908,10 @@
 ./usr/tests/lib/librumphijack/netstat.expout			tests-lib-tests		atf
 ./usr/tests/lib/librumphijack/t_asyncio			tests-lib-tests		atf
 ./usr/tests/lib/librumphijack/t_tcpip			tests-lib-tests		atf
+./usr/tests/lib/librumphijack/ssh_config.in			tests-lib-tests		atf
+./usr/tests/lib/librumphijack/ssh_host_key			tests-lib-tests		atf
+./usr/tests/lib/librumphijack/ssh_host_key.pub			tests-lib-tests		atf
+./usr/tests/lib/librumphijack/sshd_config.in			tests-lib-tests		atf
 ./usr/tests/lib/libskeytests-lib-tests		atf
 ./usr/tests/lib/libskey/Atffile			tests-lib-tests		atf,skey
 ./usr/tests/lib/libskey/t_algorithms		tests-lib-tests		atf,skey



CVS commit: [bouyer-quota2] src/sys/ufs/ufs

2011-02-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Feb 14 15:38:16 UTC 2011

Modified Files:
src/sys/ufs/ufs [bouyer-quota2]: ufs_inode.c

Log Message:
Update quota in the same WAPBL transaction as we write mode=0 back to inode.


To generate a diff of this commit:
cvs rdiff -u -r1.83.4.1 -r1.83.4.2 src/sys/ufs/ufs/ufs_inode.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_inode.c
diff -u src/sys/ufs/ufs/ufs_inode.c:1.83.4.1 src/sys/ufs/ufs/ufs_inode.c:1.83.4.2
--- src/sys/ufs/ufs/ufs_inode.c:1.83.4.1	Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/ufs_inode.c	Mon Feb 14 15:38:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_inode.c,v 1.83.4.1 2011/01/20 14:25:03 bouyer Exp $	*/
+/*	$NetBSD: ufs_inode.c,v 1.83.4.2 2011/02/14 15:38:16 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_inode.c,v 1.83.4.1 2011/01/20 14:25:03 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_inode.c,v 1.83.4.2 2011/02/14 15:38:16 bouyer Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -103,9 +103,6 @@
 		if (error)
 			goto out;
 		logged = 1;
-#if defined(QUOTA) || defined(QUOTA2)
-		(void)chkiq(ip, -1, NOCRED, 0);
-#endif
 #ifdef UFS_EXTATTR
 		ufs_extattr_vnode_inactive(vp, curlwp);
 #endif
@@ -140,6 +137,9 @@
 			if (!error)
 error = UFS_TRUNCATE(vp, (off_t)0, 0, NOCRED);
 		}
+#if defined(QUOTA) || defined(QUOTA2)
+		(void)chkiq(ip, -1, NOCRED, 0);
+#endif
 		DIP_ASSIGN(ip, rdev, 0);
 		mode = ip-i_mode;
 		ip-i_mode = 0;



CVS commit: src/sys/kern

2011-02-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Feb 14 16:05:11 UTC 2011

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

Log Message:
if DIAGNOSTIC, check the size of the transaction in wapbl_end().
Hopefully this will point us to the place which generaed the large
transaction, before an asynchronous panic() in wabl_end()


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/vfs_wapbl.c

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

Modified files:

Index: src/sys/kern/vfs_wapbl.c
diff -u src/sys/kern/vfs_wapbl.c:1.39 src/sys/kern/vfs_wapbl.c:1.40
--- src/sys/kern/vfs_wapbl.c:1.39	Sat Jan  8 20:37:05 2011
+++ src/sys/kern/vfs_wapbl.c	Mon Feb 14 16:05:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_wapbl.c,v 1.39 2011/01/08 20:37:05 christos Exp $	*/
+/*	$NetBSD: vfs_wapbl.c,v 1.40 2011/02/14 16:05:11 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #define WAPBL_INTERNAL
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.39 2011/01/08 20:37:05 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.40 2011/02/14 16:05:11 bouyer Exp $);
 
 #include sys/param.h
 #include sys/bitops.h
@@ -901,6 +901,18 @@
 	  wl-wl_bufbytes, wl-wl_bcount));
 #endif
 
+#ifdef DIAGNOSTIC
+	size_t flushsize = wapbl_transaction_len(wl);
+	if (flushsize  (wl-wl_circ_size - wl-wl_reserved_bytes)) {
+		/*
+		 * XXX this could be handled more gracefully, perhaps place
+		 * only a partial transaction in the log and allow the
+		 * remaining to flush without the protection of the journal.
+		 */
+		panic(wapbl_end: current transaction too big to flush\n);
+	}
+#endif
+
 	mutex_enter(wl-wl_mtx);
 	KASSERT(wl-wl_lock_count  0);
 	wl-wl_lock_count--;



CVS commit: src/usr.sbin/mtree

2011-02-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Feb 14 16:27:58 UTC 2011

Modified Files:
src/usr.sbin/mtree: spec.c

Log Message:
Suppress a superfluous whitespace after time=... in the output.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/mtree/spec.c

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

Modified files:

Index: src/usr.sbin/mtree/spec.c
diff -u src/usr.sbin/mtree/spec.c:1.78 src/usr.sbin/mtree/spec.c:1.79
--- src/usr.sbin/mtree/spec.c:1.78	Tue Sep 22 04:38:21 2009
+++ src/usr.sbin/mtree/spec.c	Mon Feb 14 16:27:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec.c,v 1.78 2009/09/22 04:38:21 apb Exp $	*/
+/*	$NetBSD: spec.c,v 1.79 2011/02/14 16:27:58 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = @(#)spec.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: spec.c,v 1.78 2009/09/22 04:38:21 apb Exp $);
+__RCSID($NetBSD: spec.c,v 1.79 2011/02/14 16:27:58 uebayasi Exp $);
 #endif
 #endif /* not lint */
 
@@ -358,7 +358,7 @@
 		if (MATCHFLAG(F_SIZE))
 			appendfield(pathlast, size=%lld, (long long)cur-st_size);
 		if (MATCHFLAG(F_TIME))
-			appendfield(pathlast, time=%lld.%ld ,
+			appendfield(pathlast, time=%lld.%ld,
 			(long long)cur-st_mtimespec.tv_sec,
 			cur-st_mtimespec.tv_nsec);
 		if (MATCHFLAG(F_CKSUM))



CVS commit: src/sys/netipsec

2011-02-14 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Feb 14 16:34:43 UTC 2011

Modified Files:
src/sys/netipsec: xform_esp.c

Log Message:
fix output bytecount statcounter


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/netipsec/xform_esp.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/netipsec/xform_esp.c
diff -u src/sys/netipsec/xform_esp.c:1.24 src/sys/netipsec/xform_esp.c:1.25
--- src/sys/netipsec/xform_esp.c:1.24	Mon Feb 14 13:43:45 2011
+++ src/sys/netipsec/xform_esp.c	Mon Feb 14 16:34:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_esp.c,v 1.24 2011/02/14 13:43:45 drochner Exp $	*/
+/*	$NetBSD: xform_esp.c,v 1.25 2011/02/14 16:34:43 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.24 2011/02/14 13:43:45 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.25 2011/02/14 16:34:43 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -774,7 +774,7 @@
 	}
 
 	/* Update the counters. */
-	ESP_STATADD(ESP_STAT_OUTPUT, m-m_pkthdr.len - skip);
+	ESP_STATADD(ESP_STAT_OBYTES, m-m_pkthdr.len - skip);
 
 	m = m_clone(m);
 	if (m == NULL) {



CVS commit: src/usr.bin/rump_dhcpclient

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 17:30:54 UTC 2011

Modified Files:
src/usr.bin/rump_dhcpclient: rump.dhcpclient.1

Log Message:
remove a decidedly illogical statement


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/rump_dhcpclient/rump.dhcpclient.1

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/rump_dhcpclient/rump.dhcpclient.1
diff -u src/usr.bin/rump_dhcpclient/rump.dhcpclient.1:1.2 src/usr.bin/rump_dhcpclient/rump.dhcpclient.1:1.3
--- src/usr.bin/rump_dhcpclient/rump.dhcpclient.1:1.2	Fri Jan 21 09:47:00 2011
+++ src/usr.bin/rump_dhcpclient/rump.dhcpclient.1	Mon Feb 14 17:30:54 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: rump.dhcpclient.1,v 1.2 2011/01/21 09:47:00 wiz Exp $
+.\	$NetBSD: rump.dhcpclient.1,v 1.3 2011/02/14 17:30:54 pooka Exp $
 .\
 .\ Copyright (c) 2011 Antti Kantee.  All rights reserved.
 .\
@@ -43,8 +43,7 @@
 The reason for this is the typical transient nature of a rump kernel.
 Additionally,
 .Nm
-does not store a DNS resolver address since a rump
-kernel may not have file system support.
+does not save DNS resolver information.
 .Pp
 After having succesfully configured networking,
 .Nm



CVS commit: src/distrib/sets/lists

2011-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb 14 18:20:44 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el

Log Message:
Add libsaslc entries


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.39 -r1.40 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.22 -r1.23 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el

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

Modified files:

Index: src/distrib/sets/lists/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.41 src/distrib/sets/lists/base/ad.mips64eb:1.42
--- src/distrib/sets/lists/base/ad.mips64eb:1.41	Fri Feb 11 06:50:13 2011
+++ src/distrib/sets/lists/base/ad.mips64eb	Mon Feb 14 18:20:44 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.41 2011/02/11 06:50:13 matt Exp $
+# $NetBSD: ad.mips64eb,v 1.42 2011/02/14 18:20:44 matt Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -77,7 +77,8 @@
 ./usr/lib/64/libcurses.so.7.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libdes.so.8			base-compat-shlib	compat,pic,crypto
 ./usr/lib/64/libdes.so.8.1			base-compat-shlib	compat,pic,crypto
-./usr/lib/64/libdm.sobase-compat-shlib	compat,pic
+./usr/lib/64/libdevmapper.so.1			base-compat-shlib	compat,pic,lvm
+./usr/lib/64/libdevmapper.so.1.0		base-compat-shlib	compat,pic,lvm
 ./usr/lib/64/libdm.so.0base-compat-shlib	compat,pic
 ./usr/lib/64/libdm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libdns.so.5			base-compat-shlib	compat,pic
@@ -142,6 +143,8 @@
 ./usr/lib/64/liblua.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/liblwres.so.5			base-compat-shlib	compat,pic
 ./usr/lib/64/liblwres.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/64/liblzf.so.0			base-compat-shlib	compat,pic
+./usr/lib/64/liblzf.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzma.so.1			base-compat-shlib	compat,pic
 ./usr/lib/64/liblzma.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libm.so.0base-compat-shlib	compat,pic
@@ -208,6 +211,8 @@
 ./usr/lib/64/librumpdev.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/librumpvfs.so.0			base-compat-shlib	compat,pic
 ./usr/lib/64/librumpvfs.so.0.0			base-compat-shlib	compat,pic
+./usr/lib/64/libsaslc.so.0			base-compat-shlib	compat,pic,crypto
+./usr/lib/64/libsaslc.so.0.0			base-compat-shlib	compat,pic,crypto
 ./usr/lib/64/libsdp.so.2			base-obsolete		obsolete
 ./usr/lib/64/libsdp.so.2.0			base-obsolete		obsolete
 ./usr/lib/64/libskey.so.2			base-compat-shlib	compat,pic,skey
@@ -339,7 +344,8 @@
 ./usr/lib/o32/libcurses.so.7.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libdes.so.8			base-compat-shlib	compat,pic,crypto
 ./usr/lib/o32/libdes.so.8.1			base-compat-shlib	compat,pic,crypto
-./usr/lib/o32/libdm.sobase-compat-shlib	compat,pic
+./usr/lib/o32/libdevmapper.so.1			base-compat-shlib	compat,pic,lvm
+./usr/lib/o32/libdevmapper.so.1.0		base-compat-shlib	compat,pic,lvm
 ./usr/lib/o32/libdm.so.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libdm.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libdns.so.5			base-compat-shlib	compat,pic
@@ -404,6 +410,8 @@
 ./usr/lib/o32/liblua.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/liblwres.so.5			base-compat-shlib	compat,pic
 ./usr/lib/o32/liblwres.so.5.2			base-compat-shlib	compat,pic
+./usr/lib/o32/liblzf.so.0			base-compat-shlib	compat,pic
+./usr/lib/o32/liblzf.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/liblzma.so.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/liblzma.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libm.so.0base-compat-shlib	compat,pic
@@ -470,6 +478,8 @@
 ./usr/lib/o32/librumpdev.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/librumpvfs.so.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/librumpvfs.so.0.0			base-compat-shlib	compat,pic
+./usr/lib/o32/libsaslc.so.0			base-compat-shlib	compat,pic,crypto
+./usr/lib/o32/libsaslc.so.0.0			base-compat-shlib	compat,pic,crypto
 ./usr/lib/o32/libsdp.so.2			base-obsolete		obsolete
 ./usr/lib/o32/libsdp.so.2.0			base-obsolete		obsolete
 ./usr/lib/o32/libskey.so.2			base-compat-shlib	compat,pic,skey

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.39 src/distrib/sets/lists/base/ad.mips64el:1.40
--- src/distrib/sets/lists/base/ad.mips64el:1.39	Fri Feb 11 06:50:13 2011
+++ src/distrib/sets/lists/base/ad.mips64el	Mon Feb 14 18:20:44 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.39 2011/02/11 06:50:13 matt Exp $
+# $NetBSD: ad.mips64el,v 1.40 2011/02/14 18:20:44 matt Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ 

CVS commit: src/external/gpl3/binutils/dist/opcodes

2011-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb 14 18:23:36 UTC 2011

Modified Files:
src/external/gpl3/binutils/dist/opcodes: mips-opc.c

Log Message:
Add NetLogic Fast Messaging instructions


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/binutils/dist/opcodes/mips-opc.c

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

Modified files:

Index: src/external/gpl3/binutils/dist/opcodes/mips-opc.c
diff -u src/external/gpl3/binutils/dist/opcodes/mips-opc.c:1.2 src/external/gpl3/binutils/dist/opcodes/mips-opc.c:1.3
--- src/external/gpl3/binutils/dist/opcodes/mips-opc.c:1.2	Sun Nov 15 10:25:17 2009
+++ src/external/gpl3/binutils/dist/opcodes/mips-opc.c	Mon Feb 14 18:23:35 2011
@@ -1509,6 +1509,11 @@
 {mthc2,   t,G,H,	0x48e0, 0xffe007f8,	COD|RD_t|WR_C2|WR_CC,	0,		I33	},
 {mthc2,   t,i,	0x48e0, 0xffe0,	COD|RD_t|WR_C2|WR_CC,	0,		I33	},
 
+/* NetLogic XL[PRS] Coprocessor 2 ops */
+{msgsnd,  t,	0x4a01, 0xffe0, COD|RD_t|WR_C2,		0,		I64	},
+{msgld,   t,	0x4a02, 0xffe0, COD|RD_t|WR_C2,		0,		I64	},
+{msgwait, t,	0x4a03, 0xffe0, COD|RD_t|WR_C2,		0,		I64	},
+
 /* Coprocessor 3 move/branch operations overlap with MIPS IV COP1X 
instructions, so they are here for the latters to take precedence.  */
 {bc3f,p,	0x4d00, 0x,	CBD|RD_CC,		0,		I1	},



CVS commit: src/lib/libkvm

2011-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb 14 18:27:24 UTC 2011

Modified Files:
src/lib/libkvm: Makefile

Log Message:
Add -D_KMEMUSER to CPPFLAGS


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libkvm/Makefile

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

Modified files:

Index: src/lib/libkvm/Makefile
diff -u src/lib/libkvm/Makefile:1.46 src/lib/libkvm/Makefile:1.47
--- src/lib/libkvm/Makefile:1.46	Tue Oct  5 23:48:16 2010
+++ src/lib/libkvm/Makefile	Mon Feb 14 18:27:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.46 2010/10/05 23:48:16 jym Exp $
+#	$NetBSD: Makefile,v 1.47 2011/02/14 18:27:24 matt Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/4/93
 
 USE_FORT?= yes	# used primarily by setgid programs
@@ -6,7 +6,7 @@
 USE_SHLIBDIR=	yes
 
 LIB=	kvm
-CPPFLAGS+=-DLIBC_SCCS -I${NETBSDSRCDIR}/sys
+CPPFLAGS+=-DLIBC_SCCS -I${NETBSDSRCDIR}/sys -D_KMEMUSER
 
 SRCS=	kvm.c kvm_file.c kvm_getloadavg.c kvm_proc.c
 



CVS commit: src/share/misc

2011-02-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Feb 14 18:33:26 UTC 2011

Modified Files:
src/share/misc: acronyms

Log Message:
AISE, AYF, BAK, BOC, BTFT, CPC, DIAFYO, EDS, FITB, FYEO, GLWT, IAE, ICUR,
IDTS, IMBO, INPO, IUD, KMA, KWIM, MAD, NFA, NIMBY, NUNP, ONNA, ONNTA,
OOSOOM, PFI, PPP, ROI, SAR, SITD, TCB, TIC, TINWIS, TM, TMK, TTM, TWAIN,
WAFWOT, WDYMBT, WELC, WWJD, YAOTM, YWSYLS.


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/share/misc/acronyms

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.202 src/share/misc/acronyms:1.203
--- src/share/misc/acronyms:1.202	Sat Feb 12 19:32:42 2011
+++ src/share/misc/acronyms	Mon Feb 14 18:33:26 2011
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.202 2011/02/12 19:32:42 dholland Exp $
+$NetBSD: acronyms,v 1.203 2011/02/14 18:33:26 jruoho Exp $
 10Q	thank you
 10X	thanks
 1337	elite (leet)
@@ -20,6 +20,7 @@
 AFU	all fucked up
 AFW	away from window
 AINEC	and it's not even close
+AISE	as I see it
 AIU	as I understand
 AIUI	as I understand it
 AKA	also known as
@@ -32,11 +33,13 @@
 ATW	around the world
 AWOL	absent without official leave
 AYBABTU	all your base are belong to us
+AYF	all your fault
 AYT	are you there
 B/C	because
 B/S	bullshit
 B/W	bandwidth
 B/W	between
+BAK	back at keyboard
 BBIAB	be back in a bit
 BBL	[I'll] be back later
 BBS	be back soon
@@ -56,12 +59,14 @@
 BIAW	back in a while
 BNYA	burned now you are
 BOATILAS	bend over and take it like a slut
+BOC	but of course
 BOFH	bastard operator from hell
 BOGAHICA	bend over, grab ankles, here it comes again
 BOHICA	bend over here it comes again
 BRB	[I'll] be right back
 BS	bullshit
 BTDT	been there, done that
+BTFT	been there, fixed that
 BTTH	boot to the head
 BTW	by the way
 CFV	call for votes
@@ -70,11 +75,13 @@
 CNP	continued [in my] next post
 COB	close of business [day]
 COTS	commercial off-the-shelf
+CPC	cost per click
 CU	see you
 CYA	see you around
 D/L	download
 DBEYR	don't believe everything you read
 DGAS	don't give a shit
+DIAFYO	did I ask for your opinion?
 DIY	do it yourself
 DKDC	don't know, don't care
 DND	do not disturb
@@ -84,6 +91,7 @@
 DTRT	do the right thing
 DTWT	do the wrong thing
 DWIM	do what I mean
+EDS	eternal downward spiral
 EG	evil grin
 EMSG	email message
 EOB	end of business [day]
@@ -102,6 +110,7 @@
 FIGJAM	fuck I'm good, just ask me
 FIIK	fuck[ed] if I know
 FIIR	fuck[ed] if I remember
+FITB	fill in the blank
 FM	fucking magic
 FML	fuck my life
 FNO	from now on
@@ -124,6 +133,7 @@
 FUBAR	fucked up beyond all recognition
 FUD	fear, uncertainty and doubt
 FWIW	for what it's worth
+FYEO	for your eyes only
 FYI	for your information
 G	grin
 G/C	garbage collect
@@ -143,6 +153,7 @@
 GJ	good job
 GL	good luck
 GLHF	good luck, have fun
+GLWT	good luck with that
 GMTA	great minds think alike
 GPS	global positioning system
 GR8	great
@@ -162,13 +173,16 @@
 HSIW	HOLY SHIT IT WORKS
 HTH	hope this helps
 IAC	in any case
+IAE	in any event
 IANAL	I am not a lawyer
 IAWTC	I agree with this comment
 IC	I see
 ICBW	I could be wrong
 ICCL	I couldn't care less
+ICUR	I see you are
 IDK	I don't know
 IDRC	I don't really care
+IDTS	I don't think so
 IHAFC	I haven't a fucking clue
 IHBW	I have been wrong
 IHNFC	I have no fucking clue
@@ -179,10 +193,12 @@
 ILU	I love you
 ILY	I love you
 IMAO	in my arrogant opinion
+IMBO	in my biased opinion
 IMCO	in my considered opinion
 IMHO	in my humble opinion
 IMNSHO	in my not so humble opinion
 IMO	in my opinion
+INPO	in no particular order
 IOW	in other words
 IPML	I pissed myself laughing
 IRL	in real life
@@ -190,6 +206,7 @@
 ISTM	it seems to me
 ISTR	I seem to recall
 ITYM	I think you mean
+IUD	insert usual disclaimers
 IWBNI	it would be nice if
 IYKWIM	if you know what I mean
 IYSS	if you say so
@@ -206,9 +223,13 @@
 KISS	keep it simple, stupid
 KITA	kick in the ass
 KK	okay, okay
+KMA	keep moving ahead
+KMA	keep me advised
+KMA	kill me already
 KNF	kernel normal form
 KOS	kill on sight
 KTHX	okay, thanks
+KWIM	know what I mean?
 L8	late
 L8R	later
 LART	luser attitude readjustment tool (ie, hammer)
@@ -225,6 +246,7 @@
 LTNS	long time no see
 LWYL	laugh with you later
 M8	mate
+MAD	mutually assured destruction
 MIA	missing in action
 MOTAS	member of the appropriate sex
 MOTOS	member of the opposite sex
@@ -235,11 +257,13 @@
 NAFAIK	not as far as I know
 NBD	no big deal
 NE1	anyone
+NFA	no flaming allowed
 NFC	no fucking clue
 NFI	no fucking idea
 NFW	no fucking way
 NIFOC	naked in front of computer
 NIH	not invented here
+NIMBY	not in my backyard
 NMF	not my fault
 NMP	not my problem
 NOOB	newbie
@@ -250,6 +274,7 @@
 NRN	not right now
 NRN	no reply necessary
 NSFW	not suitable for work
+NUNP	no users, no problems
 NVM	never mind
 NXT	next
 O2W	off to work
@@ -258,9 +283,12 @@
 OMFG	oh my fucking god
 OMG	oh, my god
 OMW	on my way
+ONNA	oh no, not again
+ONNTA	oh no, 

CVS commit: src/doc

2011-02-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Feb 14 18:41:09 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
ACPICA 20110211 is out.

(Mostly bug fixes; for once, no big API changes.)


To generate a diff of this commit:
cvs rdiff -u -r1.810 -r1.811 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.810 src/doc/3RDPARTY:1.811
--- src/doc/3RDPARTY:1.810	Fri Feb  4 15:11:12 2011
+++ src/doc/3RDPARTY	Mon Feb 14 18:41:09 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.810 2011/02/04 15:11:12 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.811 2011/02/14 18:41:09 jruoho Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -26,7 +26,7 @@
 
 Package:	acpica
 Version:	20100528
-Current Vers:	20110112
+Current Vers:	20110211
 Maintainer:	INTEL
 Archive Site:	http://www.acpica.org/downloads/unix_source_code.php
 Home Page:	http://www.acpica.org/



CVS commit: src/sys/netipsec

2011-02-14 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Feb 14 18:49:31 UTC 2011

Modified Files:
src/sys/netipsec: xform_esp.c

Log Message:
one more botched statistics counter (could increment semi-random locations)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/netipsec/xform_esp.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/netipsec/xform_esp.c
diff -u src/sys/netipsec/xform_esp.c:1.25 src/sys/netipsec/xform_esp.c:1.26
--- src/sys/netipsec/xform_esp.c:1.25	Mon Feb 14 16:34:43 2011
+++ src/sys/netipsec/xform_esp.c	Mon Feb 14 18:49:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xform_esp.c,v 1.25 2011/02/14 16:34:43 drochner Exp $	*/
+/*	$NetBSD: xform_esp.c,v 1.26 2011/02/14 18:49:31 drochner Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
 
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.25 2011/02/14 16:34:43 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: xform_esp.c,v 1.26 2011/02/14 18:49:31 drochner Exp $);
 
 #include opt_inet.h
 #ifdef __FreeBSD__
@@ -983,7 +983,7 @@
 	}
 	ESP_STATINC(ESP_STAT_HIST + sav-alg_enc);
 	if (sav-tdb_authalgxform != NULL)
-		AH_STATINC(sav-alg_auth + sav-alg_auth);
+		AH_STATINC(AH_STAT_HIST + sav-alg_auth);
 
 	/* Release crypto descriptors. */
 	free(tc, M_XDATA);



CVS commit: src/sys/dev/acpi

2011-02-14 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Feb 14 18:51:45 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_pmtr.c

Log Message:
Fix small negligence mistake.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_pmtr.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/acpi/acpi_pmtr.c
diff -u src/sys/dev/acpi/acpi_pmtr.c:1.1 src/sys/dev/acpi/acpi_pmtr.c:1.2
--- src/sys/dev/acpi/acpi_pmtr.c:1.1	Wed Jan  5 20:08:12 2011
+++ src/sys/dev/acpi/acpi_pmtr.c	Mon Feb 14 18:51:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_pmtr.c,v 1.1 2011/01/05 20:08:12 jruoho Exp $ */
+/*	$NetBSD: acpi_pmtr.c,v 1.2 2011/02/14 18:51:44 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_pmtr.c,v 1.1 2011/01/05 20:08:12 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_pmtr.c,v 1.2 2011/02/14 18:51:44 jruoho Exp $);
 
 #include sys/param.h
 #include sys/module.h
@@ -289,7 +289,7 @@
 
 		ad = acpi_get_node(hdl);
 
-		if (ACPI_FAILURE(rv))
+		if (ad == NULL)
 			continue;
 
 		aprint_debug(%s , ad-ad_name);



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-ati/dist

2011-02-14 Thread Manuel Bouyer
Module Name:xsrc
Committed By:   bouyer
Date:   Mon Feb 14 19:26:18 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-ati/dist [netbsd-5]: compile

Log Message:
Fix fallout from ticket #1524 (patch applied twice to new files),
pointed out by veego@


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xf86-video-ati/dist/compile

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

Modified files:

Index: xsrc/external/mit/xf86-video-ati/dist/compile
diff -u xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.2 xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.3
--- xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.2	Sun Jan 16 14:35:52 2011
+++ xsrc/external/mit/xf86-video-ati/dist/compile	Mon Feb 14 19:26:18 2011
@@ -141,146 +141,3 @@
 # time-stamp-time-zone: UTC
 # time-stamp-end: ; # UTC
 # End:
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2009-10-06.20; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
-# Written by Tom Tromey tro...@cygnus.com.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to bug-autom...@gnu.org or send patches to
-# automake-patc...@gnu.org.
-
-case $1 in
-  '')
- echo $0: No command.  Try \`$0 --help' for more information. 12
- exit 1;
- ;;
-  -h | --h*)
-cat \EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to bug-autom...@gnu.org.
-EOF
-exit $?
-;;
-  -v | --v*)
-echo compile $scriptversion
-exit $?
-;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n $eat; then
-eat=
-  else
-case $1 in
-  -o)
-	# configure might choose to run compile as `compile cc -o foo foo.c'.
-	# So we strip `-o arg' only if arg is an object.
-	eat=1
-	case $2 in
-	  *.o | *.obj)
-	ofile=$2
-	;;
-	  *)
-	set x $@ -o $2
-	shift
-	;;
-	esac
-	;;
-  *.c)
-	cfile=$1
-	set x $@ $1
-	shift
-	;;
-  *)
-	set x $@ $1
-	shift
-	;;
-esac
-  fi
-  shift
-done
-
-if test -z $ofile || test -z $cfile; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec $@
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo $cfile | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo $cofile | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir $lockdir /dev/null 21; then
-break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap rmdir '$lockdir'; exit 1 1 2 15
-
-# Run the compile.
-$@
-ret=$?
-
-if test -f $cofile; then
-  test $cofile = $ofile || mv $cofile $ofile
-elif test -f ${cofile}bj; then
-  test ${cofile}bj = $ofile || mv ${cofile}bj $ofile
-fi
-
-rmdir $lockdir
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: scriptversion=
-# time-stamp-format: %:y-%02m-%02d.%02H
-# time-stamp-time-zone: UTC
-# time-stamp-end: ; # UTC
-# End:



CVS commit: src/tests/lib/librumphijack

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 19:54:29 UTC 2011

Modified Files:
src/tests/lib/librumphijack: t_tcpip.sh

Log Message:
-debugging crud


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumphijack/t_tcpip.sh

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

Modified files:

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.2 src/tests/lib/librumphijack/t_tcpip.sh:1.3
--- src/tests/lib/librumphijack/t_tcpip.sh:1.2	Mon Feb 14 15:14:00 2011
+++ src/tests/lib/librumphijack/t_tcpip.sh	Mon Feb 14 19:54:29 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_tcpip.sh,v 1.2 2011/02/14 15:14:00 pooka Exp $
+#   $NetBSD: t_tcpip.sh,v 1.3 2011/02/14 19:54:29 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -123,8 +123,6 @@
 	# make sure clients die after we nuke the server
 	export RUMPHIJACK_RETRY='die'
 
-	export LD_LIBRARY_PATH=/home/pooka/src/nb5/src/lib/libssh
-
 	start_sshd
 
 	# create some sort of directory for us to ls



CVS commit: src/tests/lib/librumphijack

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 19:56:30 UTC 2011

Modified Files:
src/tests/lib/librumphijack: t_tcpip.sh

Log Message:
explicitly set BLOCKSIZE so that we don't get fooled again


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/librumphijack/t_tcpip.sh

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

Modified files:

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.3 src/tests/lib/librumphijack/t_tcpip.sh:1.4
--- src/tests/lib/librumphijack/t_tcpip.sh:1.3	Mon Feb 14 19:54:29 2011
+++ src/tests/lib/librumphijack/t_tcpip.sh	Mon Feb 14 19:56:30 2011
@@ -1,4 +1,4 @@
-#   $NetBSD: t_tcpip.sh,v 1.3 2011/02/14 19:54:29 pooka Exp $
+#   $NetBSD: t_tcpip.sh,v 1.4 2011/02/14 19:56:30 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -134,8 +134,10 @@
 
 	atf_check -s exit:0 -o save:ssh.out\
 	env LD_PRELOAD=/usr/lib/librumphijack.so			\
-	ssh -T -F ssh_config 127.0.0.1 ls -li $(pwd)/testdir
-	atf_check -s exit:0 -o file:ssh.out ls -li $(pwd)/testdir
+	ssh -T -F ssh_config 127.0.0.1 env BLOCKSIZE=512		\
+	ls -li $(pwd)/testdir
+	atf_check -s exit:0 -o file:ssh.out env BLOCKSIZE=512 		\
+	ls -li $(pwd)/testdir
 }
 
 ssh_cleanup()



CVS commit: [bouyer-quota2] src

2011-02-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Feb 14 20:35:24 UTC 2011

Modified Files:
src/libexec/rpc.rquotad [bouyer-quota2]: Makefile rquotad.c
src/usr.bin/quota [bouyer-quota2]: Makefile quota.c

Log Message:
The rpc.rquotad protocol uses the legacy definitions and integer types.
Convert from/to dqblk using the quota1_subr.c routines to have the
necessery convertions done.


To generate a diff of this commit:
cvs rdiff -u -r1.6.64.1 -r1.6.64.2 src/libexec/rpc.rquotad/Makefile
cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/libexec/rpc.rquotad/rquotad.c
cvs rdiff -u -r1.6.64.4 -r1.6.64.5 src/usr.bin/quota/Makefile
cvs rdiff -u -r1.33.2.7 -r1.33.2.8 src/usr.bin/quota/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/libexec/rpc.rquotad/Makefile
diff -u src/libexec/rpc.rquotad/Makefile:1.6.64.1 src/libexec/rpc.rquotad/Makefile:1.6.64.2
--- src/libexec/rpc.rquotad/Makefile:1.6.64.1	Tue Feb  8 22:14:22 2011
+++ src/libexec/rpc.rquotad/Makefile	Mon Feb 14 20:35:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6.64.1 2011/02/08 22:14:22 bouyer Exp $
+#	$NetBSD: Makefile,v 1.6.64.2 2011/02/14 20:35:24 bouyer Exp $
 
 .include bsd.own.mk
 PROG =	rpc.rquotad
@@ -13,7 +13,7 @@
 .PATH:  ${NETBSDSRCDIR}/usr.bin/quota
 SRCS+=	getvfsquota.c
 .PATH:  ${NETBSDSRCDIR}/sys/ufs/ufs
-SRCS+=	quota2_prop.c
+SRCS+=	quota2_prop.c quota1_subr.c
 
 
 .include bsd.prog.mk

Index: src/libexec/rpc.rquotad/rquotad.c
diff -u src/libexec/rpc.rquotad/rquotad.c:1.24.2.1 src/libexec/rpc.rquotad/rquotad.c:1.24.2.2
--- src/libexec/rpc.rquotad/rquotad.c:1.24.2.1	Tue Feb  8 22:14:22 2011
+++ src/libexec/rpc.rquotad/rquotad.c	Mon Feb 14 20:35:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rquotad.c,v 1.24.2.1 2011/02/08 22:14:22 bouyer Exp $	*/
+/*	$NetBSD: rquotad.c,v 1.24.2.2 2011/02/14 20:35:24 bouyer Exp $	*/
 
 /*
  * by Manuel Bouyer (bou...@ensta.fr). Public domain.
@@ -6,7 +6,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: rquotad.c,v 1.24.2.1 2011/02/08 22:14:22 bouyer Exp $);
+__RCSID($NetBSD: rquotad.c,v 1.24.2.2 2011/02/14 20:35:24 bouyer Exp $);
 #endif
 
 #include sys/param.h
@@ -30,6 +30,7 @@
 #include syslog.h
 
 #include ufs/ufs/quota2_prop.h
+#include ufs/ufs/quota1.h
 #include rpc/rpc.h
 #include rpcsvc/rquota.h
 #include arpa/inet.h
@@ -164,6 +165,7 @@
 	struct ext_getquota_args ext_getq_args;
 	struct getquota_rslt getq_rslt;
 	struct quota2_entry q2e;
+	struct dqblk dqblk;
 	int type;
 	int8_t version;
 	struct timeval timev;
@@ -207,26 +209,27 @@
 		/* failed, return noquota */
 		getq_rslt.status = Q_NOQUOTA;
 	} else {
+		q2e2dqblk(q2e, dqblk);
 		gettimeofday(timev, NULL);
 		getq_rslt.status = Q_OK;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_active = TRUE;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize = DEV_BSIZE;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_bhardlimit =
-		q2e.q2e_val[QL_BLOCK].q2v_hardlimit;
+		dqblk.dqb_bhardlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_bsoftlimit =
-		q2e.q2e_val[QL_BLOCK].q2v_softlimit;
+		dqblk.dqb_bsoftlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_curblocks =
-		q2e.q2e_val[QL_BLOCK].q2v_cur;
+		dqblk.dqb_curblocks;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_fhardlimit =
-		q2e.q2e_val[QL_FILE].q2v_hardlimit;
+		dqblk.dqb_ihardlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_fsoftlimit =
-		q2e.q2e_val[QL_FILE].q2v_softlimit;
+		dqblk.dqb_isoftlimit;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_curfiles =
-		q2e.q2e_val[QL_FILE].q2v_softlimit;
+		dqblk.dqb_curinodes;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_btimeleft =
-		q2e.q2e_val[QL_BLOCK].q2v_time - timev.tv_sec;
+		dqblk.dqb_btime;
 		getq_rslt.getquota_rslt_u.gqr_rquota.rq_ftimeleft =
-		q2e.q2e_val[QL_FILE].q2v_time - timev.tv_sec;
+		dqblk.dqb_itime;
 	}
 out:
 	if (!svc_sendreply(transp, xdr_getquota_rslt, (char *)getq_rslt))

Index: src/usr.bin/quota/Makefile
diff -u src/usr.bin/quota/Makefile:1.6.64.4 src/usr.bin/quota/Makefile:1.6.64.5
--- src/usr.bin/quota/Makefile:1.6.64.4	Thu Feb  3 15:56:15 2011
+++ src/usr.bin/quota/Makefile	Mon Feb 14 20:35:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6.64.4 2011/02/03 15:56:15 bouyer Exp $	
+#	$NetBSD: Makefile,v 1.6.64.5 2011/02/14 20:35:24 bouyer Exp $	
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
 
 .include bsd.own.mk
@@ -10,5 +10,5 @@
 LDADD=	-lrpcsvc -lprop
 
 .PATH:	${NETBSDSRCDIR}/sys/ufs/ufs 
-SRCS+=	quota2_prop.c quota2_subr.c
+SRCS+=	quota2_prop.c quota2_subr.c quota1_subr.c
 .include bsd.prog.mk

Index: src/usr.bin/quota/quota.c
diff -u src/usr.bin/quota/quota.c:1.33.2.7 src/usr.bin/quota/quota.c:1.33.2.8
--- src/usr.bin/quota/quota.c:1.33.2.7	Thu Feb  3 15:56:15 2011
+++ src/usr.bin/quota/quota.c	Mon Feb 14 20:35:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota.c,v 1.33.2.7 2011/02/03 15:56:15 bouyer Exp $	*/
+/*	$NetBSD: quota.c,v 1.33.2.8 2011/02/14 20:35:24 

CVS commit: [bouyer-quota2] src/usr.sbin/repquota

2011-02-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Feb 14 20:55:36 UTC 2011

Modified Files:
src/usr.sbin/repquota [bouyer-quota2]: repquota.8 repquota.c

Log Message:
When reading quota1 entries, initialize default quota to unlimited,
for POLA when using -x.
When displaying quotas, do not skip users which have a 0 usage but are
overquota.
When -v is used display all existing quota entries, including those with a
0 usage.


To generate a diff of this commit:
cvs rdiff -u -r1.9.50.2 -r1.9.50.3 src/usr.sbin/repquota/repquota.8
cvs rdiff -u -r1.25.2.7 -r1.25.2.8 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/usr.sbin/repquota/repquota.8
diff -u src/usr.sbin/repquota/repquota.8:1.9.50.2 src/usr.sbin/repquota/repquota.8:1.9.50.3
--- src/usr.sbin/repquota/repquota.8:1.9.50.2	Thu Feb 10 17:11:35 2011
+++ src/usr.sbin/repquota/repquota.8	Mon Feb 14 20:55:36 2011
@@ -29,7 +29,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)repquota.8	8.1 (Berkeley) 6/6/93
-.\	$NetBSD: repquota.8,v 1.9.50.2 2011/02/10 17:11:35 bouyer Exp $
+.\	$NetBSD: repquota.8,v 1.9.50.3 2011/02/14 20:55:36 bouyer Exp $
 .\
 .Dd February 10, 2011
 .Dt REPQUOTA 8
@@ -75,6 +75,7 @@
 group and user quotas if they exist).
 .It Fl v
 Print a header line before printing each filesystem quotas.
+Print all exiting quotas, including those whose current usage is 0.
 .It Fl D
 Debug: print plist sent to and received from kernel.
 .It Fl h

Index: src/usr.sbin/repquota/repquota.c
diff -u src/usr.sbin/repquota/repquota.c:1.25.2.7 src/usr.sbin/repquota/repquota.c:1.25.2.8
--- src/usr.sbin/repquota/repquota.c:1.25.2.7	Thu Feb 10 17:11:35 2011
+++ src/usr.sbin/repquota/repquota.c	Mon Feb 14 20:55:36 2011
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = @(#)repquota.c	8.2 (Berkeley) 11/22/94;
 #else
-__RCSID($NetBSD: repquota.c,v 1.25.2.7 2011/02/10 17:11:35 bouyer Exp $);
+__RCSID($NetBSD: repquota.c,v 1.25.2.8 2011/02/14 20:55:36 bouyer Exp $);
 #endif
 #endif /* not lint */
 
@@ -378,7 +378,9 @@
 			if (dqbuf.dqb_itime  0)
 igrace = dqbuf.dqb_itime;
 		}
-		if (dqbuf.dqb_curinodes == 0  dqbuf.dqb_curblocks == 0)
+		if (dqbuf.dqb_curinodes == 0  dqbuf.dqb_curblocks == 0 
+		dqbuf.dqb_bsoftlimit == 0  dqbuf.dqb_bhardlimit == 0 
+		dqbuf.dqb_isoftlimit == 0  dqbuf.dqb_ihardlimit == 0)
 			continue;
 		if ((fup = lookup(id, type)) == 0)
 			fup = addid(id, type, (char *)0);
@@ -388,6 +390,10 @@
 	}
 	defaultq2e[type].q2e_val[QL_BLOCK].q2v_grace = bgrace;
 	defaultq2e[type].q2e_val[QL_FILE].q2v_grace = igrace;
+	defaultq2e[type].q2e_val[QL_BLOCK].q2v_softlimit = 
+	defaultq2e[type].q2e_val[QL_BLOCK].q2v_hardlimit = 
+	defaultq2e[type].q2e_val[QL_FILE].q2v_softlimit = 
+	defaultq2e[type].q2e_val[QL_FILE].q2v_hardlimit = UQUAD_MAX;
 	fclose(qf);
 	valid[type] = 1;
 	if (xflag == 0)
@@ -423,13 +429,6 @@
 		fup = lookup(id, type);
 		if (fup == 0)
 			continue;
-		if (fup-fu_q2e.q2e_val[QL_BLOCK].q2v_cur == 0 
-		fup-fu_q2e.q2e_val[QL_FILE].q2v_cur == 0)
-			continue;
-		if (strlen(fup-fu_name)  9)
-			printf(%s , fup-fu_name);
-		else
-			printf(%-10s, fup-fu_name);
 		for (i = 0; i  N_QL; i++) {
 			switch (QL_STATUS(quota2_check_limit(
 			 fup-fu_q2e.q2e_val[i], 1, now))) {
@@ -450,6 +449,14 @@
 			}
 		}
 
+		if (fup-fu_q2e.q2e_val[QL_BLOCK].q2v_cur == 0 
+		fup-fu_q2e.q2e_val[QL_FILE].q2v_cur == 0  vflag == 0 
+		overchar[QL_BLOCK] == '-'  overchar[QL_FILE] == '-')
+			continue;
+		if (strlen(fup-fu_name)  9)
+			printf(%s , fup-fu_name);
+		else
+			printf(%-10s, fup-fu_name);
 		printf(%c%c%9s%9s%9s%7s,
 			overchar[QL_BLOCK], overchar[QL_FILE],
 			intprt(fup-fu_q2e.q2e_val[QL_BLOCK].q2v_cur,



CVS commit: src/share/man/man4/man4.emips

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 21:00:17 UTC 2011

Modified Files:
src/share/man/man4/man4.emips: enic.4

Log Message:
fix nic name in diagnostic.  from sandrof


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.emips/enic.4

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/man4/man4.emips/enic.4
diff -u src/share/man/man4/man4.emips/enic.4:1.1 src/share/man/man4/man4.emips/enic.4:1.2
--- src/share/man/man4/man4.emips/enic.4:1.1	Wed Jan 26 01:18:48 2011
+++ src/share/man/man4/man4.emips/enic.4	Mon Feb 14 21:00:17 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: enic.4,v 1.1 2011/01/26 01:18:48 pooka Exp $
+.\	$NetBSD: enic.4,v 1.2 2011/02/14 21:00:17 pooka Exp $
 .\
 .\ Copyright (c) 2010 Microsoft Corp.
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -61,9 +61,9 @@
 interface is present on the BEE3 and Xilinx XUP boards. The interface speed is wired at 1Gbps.
 .Sh DIAGNOSTICS
 .Bl -diag
-.It le%d: enic_put: no mem?
+.It enic%d: enic_put: no mem?
 The driver could not allocate a transmit buffer, packet was not sent.
-.It le%d: internal error
+.It enic%d: internal error
 This and other messages are indicative of bad hardware or software driver coding errors.
 .El
 .Sh SEE ALSO



CVS commit: src/share/man/man4/man4.emips

2011-02-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Feb 14 21:13:17 UTC 2011

Modified Files:
src/share/man/man4/man4.emips: ace.4 autoconf.4 dz.4 ebus.4 eclock.4
enic.4 intro.4

Log Message:
MSFT assigned the copyright to these files to TNF, so fix license.
Also, make rcsid placement match man.template.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.emips/ace.4 \
src/share/man/man4/man4.emips/autoconf.4 \
src/share/man/man4/man4.emips/dz.4 src/share/man/man4/man4.emips/ebus.4 \
src/share/man/man4/man4.emips/eclock.4 \
src/share/man/man4/man4.emips/intro.4
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/man4.emips/enic.4

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/man4/man4.emips/ace.4
diff -u src/share/man/man4/man4.emips/ace.4:1.1 src/share/man/man4/man4.emips/ace.4:1.2
--- src/share/man/man4/man4.emips/ace.4:1.1	Wed Jan 26 01:18:48 2011
+++ src/share/man/man4/man4.emips/ace.4	Mon Feb 14 21:13:17 2011
@@ -1,8 +1,10 @@
+.\	$NetBSD: ace.4,v 1.2 2011/02/14 21:13:17 pooka Exp $
 .\
-.\ Copyright (c) 2010 Microsoft Corp.
 .\ Copyright (c) 2010 NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
+.\ This file is derived from work contributed by Microsoft Corporation.
+.\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
 .\ are met:
@@ -23,8 +25,6 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.\	$NetBSD: ace.4,v 1.1 2011/01/26 01:18:48 pooka Exp $
-.\
 .Dd July 17, 2010
 .Dt ACE 4 emips
 .Os
Index: src/share/man/man4/man4.emips/autoconf.4
diff -u src/share/man/man4/man4.emips/autoconf.4:1.1 src/share/man/man4/man4.emips/autoconf.4:1.2
--- src/share/man/man4/man4.emips/autoconf.4:1.1	Wed Jan 26 01:18:48 2011
+++ src/share/man/man4/man4.emips/autoconf.4	Mon Feb 14 21:13:17 2011
@@ -1,8 +1,10 @@
+.\	$NetBSD: autoconf.4,v 1.2 2011/02/14 21:13:17 pooka Exp $
 .\
-.\ Copyright (c) 2010 Microsoft Corp.
 .\ Copyright (c) 2010 NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
+.\ This file is derived from work contributed by Microsoft Corporation.
+.\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
 .\ are met:
@@ -23,8 +25,6 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.\ $NetBSD: autoconf.4,v 1.1 2011/01/26 01:18:48 pooka Exp $
-.\
 .Dd July 17, 2010
 .Dt AUTOCONF 4 emips
 .Os
Index: src/share/man/man4/man4.emips/dz.4
diff -u src/share/man/man4/man4.emips/dz.4:1.1 src/share/man/man4/man4.emips/dz.4:1.2
--- src/share/man/man4/man4.emips/dz.4:1.1	Wed Jan 26 01:18:48 2011
+++ src/share/man/man4/man4.emips/dz.4	Mon Feb 14 21:13:17 2011
@@ -1,9 +1,10 @@
-.\	$NetBSD: dz.4,v 1.1 2011/01/26 01:18:48 pooka Exp $
+.\	$NetBSD: dz.4,v 1.2 2011/02/14 21:13:17 pooka Exp $
 .\
-.\ Copyright (c) 2010 Microsoft Corp.
 .\ Copyright (c) 2010 NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
+.\ This file is derived from work contributed by Microsoft Corporation.
+.\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
 .\ are met:
@@ -24,7 +25,6 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.\
 .Dd July 17, 2010
 .Dt DZ 4 emips
 .Os
Index: src/share/man/man4/man4.emips/ebus.4
diff -u src/share/man/man4/man4.emips/ebus.4:1.1 src/share/man/man4/man4.emips/ebus.4:1.2
--- src/share/man/man4/man4.emips/ebus.4:1.1	Wed Jan 26 01:18:48 2011
+++ src/share/man/man4/man4.emips/ebus.4	Mon Feb 14 21:13:17 2011
@@ -1,9 +1,10 @@
-.\	$NetBSD: ebus.4,v 1.1 2011/01/26 01:18:48 pooka Exp $
+.\	$NetBSD: ebus.4,v 1.2 2011/02/14 21:13:17 pooka Exp $
 .\
-.\ Copyright (c) 2010 Microsoft Corp.
 .\ Copyright (c) 2010 NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
+.\ This file is derived from work contributed by Microsoft Corporation.
+.\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
 .\ are met:
Index: src/share/man/man4/man4.emips/eclock.4
diff -u src/share/man/man4/man4.emips/eclock.4:1.1 src/share/man/man4/man4.emips/eclock.4:1.2
--- src/share/man/man4/man4.emips/eclock.4:1.1	Wed Jan 26 01:18:48 2011
+++ src/share/man/man4/man4.emips/eclock.4	Mon Feb 14 21:13:17 2011
@@ -1,9 +1,10 @@
-.\ $NetBSD: eclock.4,v 1.1 2011/01/26 01:18:48 pooka Exp $
+.\ $NetBSD: eclock.4,v 1.2 2011/02/14 21:13:17 pooka Exp $
 .\
-.\ Copyright (c) 2010 Microsoft Corp.
-.\ Copyright (c) 

CVS commit: src/distrib/sets/lists/comp

2011-02-14 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Feb 14 21:29:45 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: md.amd64

Log Message:
missing lvm keyword.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/lists/comp/md.amd64

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/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.100 src/distrib/sets/lists/comp/md.amd64:1.101
--- src/distrib/sets/lists/comp/md.amd64:1.100	Sat Feb 12 22:25:59 2011
+++ src/distrib/sets/lists/comp/md.amd64	Mon Feb 14 21:29:45 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.100 2011/02/12 22:25:59 matt Exp $
+# $NetBSD: md.amd64,v 1.101 2011/02/14 21:29:45 njoly Exp $
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -938,7 +938,7 @@
 ./usr/libdata/debug/usr/lib/i386/libcrypto.so.6.1.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libcurses.so.7.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdes.so.8.1.debug	comp-compat-shlib	compat,pic,debug
-./usr/libdata/debug/usr/lib/i386/libdevmapper.so.1.0.debug	comp-compat-shlib	compat,pic,debug
+./usr/libdata/debug/usr/lib/i386/libdevmapper.so.1.0.debug	comp-compat-shlib	compat,pic,lvm,debug
 ./usr/libdata/debug/usr/lib/i386/libdm.so.0.0.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdns.so.5.2.debug	comp-compat-shlib	compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libdns_sd.so.0.0.debug	comp-compat-shlib	compat,pic,debug



CVS commit: src/sys/arch/i386/stand/lib

2011-02-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Feb 14 23:47:11 UTC 2011

Modified Files:
src/sys/arch/i386/stand/lib: pcio.c

Log Message:
port-i386/44563: boot loader prompt doesn't read keyboard input on a MacBook1,1

check for keystroke (int 16h, AH=01h) before getting keystroke (int 16h,
AH=00h), fixes bootloader keyboard input with Apple firmware, from Taylor R
Campbell


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/i386/stand/lib/pcio.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/i386/stand/lib/pcio.c
diff -u src/sys/arch/i386/stand/lib/pcio.c:1.28 src/sys/arch/i386/stand/lib/pcio.c:1.29
--- src/sys/arch/i386/stand/lib/pcio.c:1.28	Fri Jun 25 15:35:08 2010
+++ src/sys/arch/i386/stand/lib/pcio.c	Mon Feb 14 23:47:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcio.c,v 1.28 2010/06/25 15:35:08 tsutsui Exp $	 */
+/*	$NetBSD: pcio.c,v 1.29 2011/02/14 23:47:11 jmcneill Exp $	 */
 
 /*
  * Copyright (c) 1996, 1997
@@ -271,6 +271,8 @@
 	default: /* to make gcc -Wall happy... */
 	case CONSDEV_PC:
 #endif
+		while (!coniskey())
+			;
 		c = congetc();
 #ifdef CONSOLE_KEYMAP
 		{



CVS commit: src/sys/dev/pci

2011-02-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Feb 15 04:06:44 UTC 2011

Modified Files:
src/sys/dev/pci: r128fb.c

Log Message:
don't muck with the LVDS_BLON bit


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/r128fb.c

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

Modified files:

Index: src/sys/dev/pci/r128fb.c
diff -u src/sys/dev/pci/r128fb.c:1.20 src/sys/dev/pci/r128fb.c:1.21
--- src/sys/dev/pci/r128fb.c:1.20	Sat Jan 22 15:14:28 2011
+++ src/sys/dev/pci/r128fb.c	Tue Feb 15 04:06:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: r128fb.c,v 1.20 2011/01/22 15:14:28 cegger Exp $	*/
+/*	$NetBSD: r128fb.c,v 1.21 2011/02/15 04:06:43 macallan Exp $	*/
 
 /*
  * Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: r128fb.c,v 1.20 2011/01/22 15:14:28 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: r128fb.c,v 1.21 2011/02/15 04:06:43 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -962,8 +962,7 @@
 	level = 255 - level;
 	reg = bus_space_read_4(sc-sc_memt, sc-sc_regh, R128_LVDS_GEN_CNTL);
 	reg = ~R128_LEVEL_MASK;
-	reg |= (level  R128_LEVEL_SHIFT) | 
-	   (level != 255 ? R128_LVDS_BLON : 0);
+	reg |= (level  R128_LEVEL_SHIFT);
 	bus_space_write_4(sc-sc_memt, sc-sc_regh, R128_LVDS_GEN_CNTL, reg);
 	DPRINTF(backlight level: %d reg %08x\n, level, reg);
 }
@@ -979,10 +978,6 @@
 	sc-sc_bl_on = on;
 	reg = bus_space_read_4(sc-sc_memt, sc-sc_regh, R128_LVDS_GEN_CNTL);
 	reg = ~R128_LEVEL_MASK;
-	if (on) {
-		reg |= R128_LVDS_BLON;
-	} else
-		reg = ~R128_LVDS_BLON;
 	level = on ? 255 - sc-sc_bl_level : 255;
 	reg |= level  R128_LEVEL_SHIFT;
 	bus_space_write_4(sc-sc_memt, sc-sc_regh, R128_LVDS_GEN_CNTL, reg);