CVS commit: src/dist/ipf/man

2011-01-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 21 09:15:21 UTC 2011

Modified Files:
src/dist/ipf/man: ipftest.1

Log Message:
Fix typo reported in PR 44429 by Ryo HAYASAKA.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/dist/ipf/man/ipftest.1

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/man/ipftest.1
diff -u src/dist/ipf/man/ipftest.1:1.7 src/dist/ipf/man/ipftest.1:1.8
--- src/dist/ipf/man/ipftest.1:1.7	Tue Apr  4 16:17:18 2006
+++ src/dist/ipf/man/ipftest.1	Fri Jan 21 09:15:20 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: ipftest.1,v 1.7 2006/04/04 16:17:18 martti Exp $
+.\	$NetBSD: ipftest.1,v 1.8 2011/01/21 09:15:20 wiz Exp $
 .\
 .TH ipftest 1
 .SH NAME
@@ -178,7 +178,7 @@
 Don't attempt to convert IP addresses to hostnames.
 .TP
 .BR \-S \0ip_address
-The IP address specifived with this option is used by ipftest to determine
+The IP address specified with this option is used by ipftest to determine
 whether a packet should be treated as input or output.  If the source
 address in an IP packet matches then it is considered to be inbound.  If it
 does not match then it is considered to be outbound.  This is primarily



CVS commit: xsrc/external/mit/xf86-video-intel/dist/src

2011-01-21 Thread Adam Hoka
Module Name:xsrc
Committed By:   ahoka
Date:   Fri Jan 21 09:46:19 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-intel/dist/src: i915_render.c

Log Message:
Avoid a crash when pDrawable is null.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xf86-video-intel/dist/src/i915_render.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-intel/dist/src/i915_render.c
diff -u xsrc/external/mit/xf86-video-intel/dist/src/i915_render.c:1.1.1.2 xsrc/external/mit/xf86-video-intel/dist/src/i915_render.c:1.2
--- xsrc/external/mit/xf86-video-intel/dist/src/i915_render.c:1.1.1.2	Tue Jun  9 02:54:33 2009
+++ xsrc/external/mit/xf86-video-intel/dist/src/i915_render.c	Fri Jan 21 09:46:19 2011
@@ -169,6 +169,9 @@
 
 static Bool i915_check_composite_texture(PicturePtr pPict, int unit)
 {
+if (pPict-pDrawable == NULL)
+	return FALSE;
+
 ScrnInfoPtr pScrn = xf86Screens[pPict-pDrawable-pScreen-myNum];
 int w = pPict-pDrawable-width;
 int h = pPict-pDrawable-height;



CVS commit: src/usr.bin/rump_dhcpclient

2011-01-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 21 09:47:00 UTC 2011

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

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 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.1 src/usr.bin/rump_dhcpclient/rump.dhcpclient.1:1.2
--- src/usr.bin/rump_dhcpclient/rump.dhcpclient.1:1.1	Thu Jan 20 18:47:20 2011
+++ src/usr.bin/rump_dhcpclient/rump.dhcpclient.1	Fri Jan 21 09:47:00 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: rump.dhcpclient.1,v 1.1 2011/01/20 18:47:20 pooka Exp $
+.\	$NetBSD: rump.dhcpclient.1,v 1.2 2011/01/21 09:47:00 wiz Exp $
 .\
 .\ Copyright (c) 2011 Antti Kantee.  All rights reserved.
 .\
@@ -36,8 +36,8 @@
 The
 .Nm
 utility is a very simple DHCP client which can be used to apply
-networking configuration on one interface in a rump kernel.  Unlike
-full DHCP clients,
+networking configuration on one interface in a rump kernel.
+Unlike full DHCP clients,
 .Nm
 does not store leases or renew expired leases.
 The reason for this is the typical transient nature of a rump kernel.



CVS commit: xsrc/external/mit/xf86-video-intel/dist/src

2011-01-21 Thread Adam Hoka
Module Name:xsrc
Committed By:   ahoka
Date:   Fri Jan 21 09:48:29 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-intel/dist/src: i830_bios.c

Log Message:
dont negate error value passed to strerror
the linux libpciaccess returns negated value, but no other os does...


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/xf86-video-intel/dist/src/i830_bios.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-intel/dist/src/i830_bios.c
diff -u xsrc/external/mit/xf86-video-intel/dist/src/i830_bios.c:1.1.1.2 xsrc/external/mit/xf86-video-intel/dist/src/i830_bios.c:1.2
--- xsrc/external/mit/xf86-video-intel/dist/src/i830_bios.c:1.1.1.2	Tue Jun  9 02:54:33 2009
+++ xsrc/external/mit/xf86-video-intel/dist/src/i830_bios.c	Fri Jan 21 09:48:29 2011
@@ -238,7 +238,7 @@
 if (ret != 0) {
 	xf86DrvMsg(pScrn-scrnIndex, X_WARNING,
   libpciaccess failed to read %dkB video BIOS: %s\n,
-  size / 1024, strerror(-ret));
+  size / 1024, strerror(ret));
 	xfree (bios);
 	return -1;
 }



CVS commit: src/share/man/man7

2011-01-21 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Jan 21 10:03:27 UTC 2011

Modified Files:
src/share/man/man7: environ.7

Log Message:
Add comma in enumeration.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/share/man/man7/environ.7

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/man7/environ.7
diff -u src/share/man/man7/environ.7:1.24 src/share/man/man7/environ.7:1.25
--- src/share/man/man7/environ.7:1.24	Fri Jan 21 07:55:12 2011
+++ src/share/man/man7/environ.7	Fri Jan 21 10:03:27 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: environ.7,v 1.24 2011/01/21 07:55:12 roy Exp $
+.\	$NetBSD: environ.7,v 1.25 2011/01/21 10:03:27 wiz Exp $
 .\
 .\ Copyright (c) 1983, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -278,7 +278,7 @@
 .Xr termcap 3 ,
 .Xr terminfo 3 ,
 .Xr audio 4 ,
-.Xr terminfo 5
+.Xr terminfo 5 ,
 .Xr nls 7 ,
 .Xr dump 8
 .Sh HISTORY



CVS commit: src/sys/rump/fs/lib/libzfs

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 12:23:29 UTC 2011

Modified Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
don't perform tasks already done by zfs_modcmd


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/fs/lib/libzfs/component.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/fs/lib/libzfs/component.c
diff -u src/sys/rump/fs/lib/libzfs/component.c:1.1 src/sys/rump/fs/lib/libzfs/component.c:1.2
--- src/sys/rump/fs/lib/libzfs/component.c:1.1	Tue Jan 18 22:21:23 2011
+++ src/sys/rump/fs/lib/libzfs/component.c	Fri Jan 21 12:23:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: component.c,v 1.1 2011/01/18 22:21:23 haad Exp $ */
+/*	$NetBSD: component.c,v 1.2 2011/01/21 12:23:29 pooka Exp $ */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: component.c,v 1.1 2011/01/18 22:21:23 haad Exp $);
+__KERNEL_RCSID(0, $NetBSD: component.c,v 1.2 2011/01/21 12:23:29 pooka Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -80,31 +80,10 @@
 #include rump_dev_private.h
 #include rump_vfs_private.h
 
-RUMP_COMPONENT(RUMP_COMPONENT_KERN_VFS)
+RUMP_COMPONENT(RUMP_COMPONENT_VFS)
 {
-	int error;
-
 	extern int physmem;
 
-	extern uint_t zfs_fsyncer_key;
-	extern uint_t rrw_tsd_key;
-
-	extern const struct bdevsw zfs_bdevsw;
-	extern const struct cdevsw zfs_cdevsw;
-
-	static int	zfs_bmajor = -1;
-	static int	zfs_cmajor = -1;
-
 	/* Set physmem to fit zfs limits. ZFS_MINMEGS * 2048 / PAGE_SIZE */
 	physmem = 262144;
-	error = devsw_attach(zfs, zfs_bdevsw, zfs_bmajor,
-	zfs_cdevsw, zfs_cmajor);
-	if (error != 0) {
-		zvol_fini();
-		zfs_vfsfini();
-		spa_fini();
-		lwp_specific_key_delete(zfs_fsyncer_key);
-		lwp_specific_key_delete(rrw_tsd_key);
-	}
-	return;
 }



CVS commit: src/external/cddl/osnet/sys

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 12:24:25 UTC 2011

Modified Files:
src/external/cddl/osnet/sys/kern: kobj.c
src/external/cddl/osnet/sys/sys: vnode.h

Log Message:
fix kobj_open_file_vnode()

patch from haad


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/kern/kobj.c
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/sys/sys/vnode.h

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

Modified files:

Index: src/external/cddl/osnet/sys/kern/kobj.c
diff -u src/external/cddl/osnet/sys/kern/kobj.c:1.1 src/external/cddl/osnet/sys/kern/kobj.c:1.2
--- src/external/cddl/osnet/sys/kern/kobj.c:1.1	Fri Aug  7 20:57:57 2009
+++ src/external/cddl/osnet/sys/kern/kobj.c	Fri Jan 21 12:24:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kobj.c,v 1.1 2009/08/07 20:57:57 haad Exp $	*/
+/*	$NetBSD: kobj.c,v 1.2 2011/01/21 12:24:24 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/sys/compat/opensolaris/kern/opensolaris_kobj.c,v 1.4 2007/05/31 11:51:49 kib Exp $); */
-__KERNEL_RCSID(0, $NetBSD: kobj.c,v 1.1 2009/08/07 20:57:57 haad Exp $);
+__KERNEL_RCSID(0, $NetBSD: kobj.c,v 1.2 2011/01/21 12:24:24 pooka Exp $);
 
 #include sys/types.h
 #include sys/systm.h
@@ -97,7 +97,7 @@
 {
 	vnode_t *vp;
 
-	if (vn_open(file, UIO_SYSSPACE, 0, 0, vp, CRCREAT, 0) != 0) {
+	if (vn_open(file, UIO_SYSSPACE, FCREAT, 0, vp, CRCREAT, 0) != 0) {
 		return NULL;
 	}
 	return vp;

Index: src/external/cddl/osnet/sys/sys/vnode.h
diff -u src/external/cddl/osnet/sys/sys/vnode.h:1.7 src/external/cddl/osnet/sys/sys/vnode.h:1.8
--- src/external/cddl/osnet/sys/sys/vnode.h:1.7	Tue Dec 14 01:21:02 2010
+++ src/external/cddl/osnet/sys/sys/vnode.h	Fri Jan 21 12:24:24 2011
@@ -1,5 +1,5 @@
 
-/*	$NetBSD: vnode.h,v 1.7 2010/12/14 01:21:02 haad Exp $	*/
+/*	$NetBSD: vnode.h,v 1.8 2011/01/21 12:24:24 pooka Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -536,7 +536,7 @@
 	int error;
 
 	ASSERT(seg == UIO_SYSSPACE);
-	ASSERT(filemode == (FWRITE | FCREAT | FTRUNC | FOFFMAX));
+	ASSERT((filemode  (FWRITE | FCREAT | FTRUNC | FOFFMAX)) != 0);
 	ASSERT(crwhy == CRCREAT);
 	ASSERT(umask == 0);
 



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 13:08:42 UTC 2011

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_ioctl.c

Log Message:
Don't allow module to init if root is not mounted since the modcmd
wants to traverse the file system.  This *might* fix statically
linking zfs support into the kernel (at least it fixes rump kernel
bootstrap).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.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/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.7
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.6	Wed May 19 18:01:26 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c	Fri Jan 21 13:08:42 2011
@@ -4601,6 +4601,9 @@
 	
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+		if (!rootvnode)
+			return EAGAIN;
+
 		printf(WARNING: ZFS on NetBSD is under development\n);
 		availrmem = (uint64_t)physmem * PAGE_SIZE / 1048576;
 		if (availrmem  ZFS_MIN_MEGS * 80 / 100) {



CVS commit: src/sys/rump

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 13:11:04 UTC 2011

Modified Files:
src/sys/rump/fs/lib/libzfs: Makefile
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Since physmem is largely unused except for zfs wanting to know
if it has enough memory available, just pick a number which makes
zfs happy.

We *could* use a MIN() of available host mem and rump_memlimit,
though ...


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/fs/lib/libzfs/Makefile
cvs rdiff -u -r1.148 -r1.149 src/sys/rump/librump/rumpkern/emul.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/fs/lib/libzfs/Makefile
diff -u src/sys/rump/fs/lib/libzfs/Makefile:1.1 src/sys/rump/fs/lib/libzfs/Makefile:1.2
--- src/sys/rump/fs/lib/libzfs/Makefile:1.1	Tue Jan 18 22:21:23 2011
+++ src/sys/rump/fs/lib/libzfs/Makefile	Fri Jan 21 13:11:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/01/18 22:21:23 haad Exp $
+#	$NetBSD: Makefile,v 1.2 2011/01/21 13:11:04 pooka Exp $
 #
 
 S!= cd ${.PARSEDIR}/../../../../;pwd
@@ -10,7 +10,6 @@
 # RUMP stuff
 CPPFLAGS+=  -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs\
 		-I${RUMPTOP}/librump/rumpdev
-SRCS+= component.c
 
 
 .include bsd.lib.mk

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.148 src/sys/rump/librump/rumpkern/emul.c:1.149
--- src/sys/rump/librump/rumpkern/emul.c:1.148	Thu Jan  6 11:22:55 2011
+++ src/sys/rump/librump/rumpkern/emul.c	Fri Jan 21 13:11:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.148 2011/01/06 11:22:55 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.149 2011/01/21 13:11:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.148 2011/01/06 11:22:55 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.149 2011/01/21 13:11:03 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -62,11 +62,21 @@
 
 #include rump_private.h
 
+/*
+ * physmem is largely unused (except for nmbcluster calculations),
+ * so pick a default value which suits ZFS.  if an application wants
+ * a very small memory footprint, it can still adjust this before
+ * calling rump_init()
+ */
+#define PHYSMEM 512*256
+int physmem = PHYSMEM;
+int nkmempages = PHYSMEM/2; /* from le chapeau */
+#undef PHYSMEM
+
 struct lwp lwp0;
 struct vnode *rootvp;
 dev_t rootdev = NODEV;
-int physmem = 256*256; /* 256 * 1024*1024 / 4k, PAGE_SIZE not always set */
-int nkmempages = 256*256/2; /* from le chapeau */
+
 const int schedppq = 1;
 int hardclock_ticks;
 bool mp_online = false;



CVS commit: src/sys/rump/fs/lib/libzfs

2011-01-21 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 21 13:11:32 UTC 2011

Removed Files:
src/sys/rump/fs/lib/libzfs: component.c

Log Message:
no longer used


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 src/sys/rump/fs/lib/libzfs/component.c

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



CVS commit: src

2011-01-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jan 21 15:59:10 UTC 2011

Modified Files:
src: UPDATING
src/share/mk: sys.mk
src/sys/arch/acorn26/conf: Makefile.acorn26
src/sys/arch/amiga/conf: Makefile.amiga
src/sys/arch/arc/stand/boot: Makefile
src/sys/arch/atari/conf: Makefile.atari
src/sys/arch/bebox/stand/boot: Makefile
src/sys/arch/cesfic/conf: Makefile.cesfic
src/sys/arch/hp300/conf: Makefile.hp300
src/sys/arch/hpcmips/stand/lcboot: Makefile
src/sys/arch/luna68k/conf: Makefile.luna68k
src/sys/arch/mac68k/conf: Makefile.mac68k
src/sys/arch/mips/conf: Makefile.mips
src/sys/arch/mips/include: Makefile.inc
src/sys/arch/mvme68k/conf: Makefile.mvme68k
src/sys/arch/mvme68k/stand/bootxx: Makefile
src/sys/arch/mvme68k/stand/libbug: Makefile
src/sys/arch/mvme68k/stand/sboot: Makefile
src/sys/arch/news68k/conf: Makefile.news68k
src/sys/arch/next68k/conf: Makefile.next68k
src/sys/arch/prep/stand/boot: Makefile
src/sys/arch/rs6000/stand/boot: Makefile
src/sys/arch/sh3/conf: Makefile.sh3
src/sys/arch/sun2/conf: Makefile.sun2
src/sys/arch/sun3/conf: Makefile.sun3
src/sys/arch/usermode/conf: Makefile.usermode
src/sys/arch/vax/conf: Makefile.vax
src/sys/arch/x68k/conf: Makefile.x68k

Log Message:
Switch remaining platforms to modern CPP for assembler.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/UPDATING
cvs rdiff -u -r1.103 -r1.104 src/share/mk/sys.mk
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/acorn26/conf/Makefile.acorn26
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amiga/conf/Makefile.amiga
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/stand/boot/Makefile
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/atari/conf/Makefile.atari
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/bebox/stand/boot/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cesfic/conf/Makefile.cesfic
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/hp300/conf/Makefile.hp300
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hpcmips/stand/lcboot/Makefile
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/luna68k/conf/Makefile.luna68k
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/mac68k/conf/Makefile.mac68k
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mips/conf/Makefile.mips
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/include/Makefile.inc
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/mvme68k/conf/Makefile.mvme68k
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mvme68k/stand/bootxx/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mvme68k/stand/libbug/Makefile
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mvme68k/stand/sboot/Makefile
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/news68k/conf/Makefile.news68k
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/next68k/conf/Makefile.next68k
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/prep/stand/boot/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/rs6000/stand/boot/Makefile
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sh3/conf/Makefile.sh3
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sun2/conf/Makefile.sun2
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/sun3/conf/Makefile.sun3
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/usermode/conf/Makefile.usermode
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/vax/conf/Makefile.vax
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/x68k/conf/Makefile.x68k

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.219 src/UPDATING:1.220
--- src/UPDATING:1.219	Mon Jan 17 18:11:09 2011
+++ src/UPDATING	Fri Jan 21 15:59:04 2011
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.219 2011/01/17 18:11:09 joerg Exp $
+$NetBSD: UPDATING,v 1.220 2011/01/21 15:59:04 joerg Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -15,17 +15,11 @@
 
 Recent changes:
 ^^^
-20110117:
-	Assembler files on the following platforms no longer use -tradition-cpp:
-	- Alpha,
-	- AMD64,
-	- i386,
-	- SPARC,
-	- SPARC64.
-	This can break the build of individual parts of the tree.  This is
-	handled correctly by build.sh.  Manual builds have to update
-	/usr/share/mk and re-run config(1) for any kernel configurations as
-	needed.
+20110121:
+	Assembler files no longer use -tradition-cpp.  This can break
+	the build of individual parts of the tree.  This is handled
+	correctly by build.sh.  Manual builds have to update /usr/share/mk
+	and re-run config(1) for any kernel configurations as needed.
 
 20101217:
 	The tcpdump(8) program was changed to drop privileges and chroot(2)

Index: src/share/mk/sys.mk
diff -u src/share/mk/sys.mk:1.103 src/share/mk/sys.mk:1.104
--- src/share/mk/sys.mk:1.103	Mon Jan 17 18:11:10 2011
+++ src/share/mk/sys.mk	Fri Jan 21 15:59:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: sys.mk,v 1.103 2011/01/17 18:11:10 joerg Exp $
+#	$NetBSD: sys.mk,v 1.104 2011/01/21

CVS commit: [bouyer-quota2] src/usr.bin/quota

2011-01-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Jan 21 16:36:57 UTC 2011

Modified Files:
src/usr.bin/quota [bouyer-quota2]: quota.1

Log Message:
Remove FILES section, it's obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.14.52.1 -r1.14.52.2 src/usr.bin/quota/quota.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/quota/quota.1
diff -u src/usr.bin/quota/quota.1:1.14.52.1 src/usr.bin/quota/quota.1:1.14.52.2
--- src/usr.bin/quota/quota.1:1.14.52.1	Thu Jan 20 14:25:05 2011
+++ src/usr.bin/quota/quota.1	Fri Jan 21 16:36:57 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: quota.1,v 1.14.52.1 2011/01/20 14:25:05 bouyer Exp $
+.\	$NetBSD: quota.1,v 1.14.52.2 2011/01/21 16:36:57 bouyer Exp $
 .\
 .\ Copyright (c) 1983, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -135,14 +135,6 @@
 .Nm
 exits with a non-zero status, one or more filesystems
 are over quota.
-.Sh FILES
-.Bl -tag -width quota.group -compact
-.It Pa quota.user
-located at the filesystem root with user quotas
-.It Pa quota.group
-located at the filesystem root with group quotas
-.It Pa /etc/fstab
-to find filesystem names and locations
 .El
 .Sh SEE ALSO
 .Xr quotactl 2 ,



CVS commit: src/sys/uvm

2011-01-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Jan 21 16:56:38 UTC 2011

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

Log Message:
buildfix: use PRIxPADDR for type paddr_t


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/uvm/uvm_pglist.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_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.52 src/sys/uvm/uvm_pglist.c:1.53
--- src/sys/uvm/uvm_pglist.c:1.52	Tue Jan 18 21:43:29 2011
+++ src/sys/uvm/uvm_pglist.c	Fri Jan 21 16:56:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.52 2011/01/18 21:43:29 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.53 2011/01/21 16:56:38 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.52 2011/01/18 21:43:29 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.53 2011/01/21 16:56:38 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -205,7 +205,7 @@
 		 * Found a suitable starting page.  See if the range is free.
 		 */
 #ifdef PGALLOC_VERBOSE
-		printf(%s: ps=%p try=%#x end=%#x skip=%#x, align=%#x,
+		printf(%s: ps=%p try=%#x end=%#x skip=%#x, align=0x%PRIxPADDR,
 		__func__, ps, tryidx, end, skip, alignment);
 #endif
 		/*



CVS commit: [bouyer-quota2] src

2011-01-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Jan 21 16:58:07 UTC 2011

Modified Files:
src/sys/ufs/ufs [bouyer-quota2]: quota2.h quota2_prop.c quota2_prop.h
ufs_quota.c ufs_quota.h ufs_quota2.c
src/usr.bin/quota [bouyer-quota2]: Makefile quota.1 quota.c
src/usr.sbin/repquota [bouyer-quota2]: Makefile repquota.8 repquota.c
Added Files:
src/usr.bin/quota [bouyer-quota2]: printquota.c printquota.h

Log Message:
Add support for quotactl(getall) command, and convert repquota to new
world.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/ufs/ufs/quota2.h \
src/sys/ufs/ufs/quota2_prop.c src/sys/ufs/ufs/quota2_prop.h \
src/sys/ufs/ufs/ufs_quota.h src/sys/ufs/ufs/ufs_quota2.c
cvs rdiff -u -r1.68.4.1 -r1.68.4.2 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.6.64.1 -r1.6.64.2 src/usr.bin/quota/Makefile
cvs rdiff -u -r0 -r1.1.2.1 src/usr.bin/quota/printquota.c \
src/usr.bin/quota/printquota.h
cvs rdiff -u -r1.14.52.2 -r1.14.52.3 src/usr.bin/quota/quota.1
cvs rdiff -u -r1.33.2.1 -r1.33.2.2 src/usr.bin/quota/quota.c
cvs rdiff -u -r1.5 -r1.5.64.1 src/usr.sbin/repquota/Makefile
cvs rdiff -u -r1.9 -r1.9.50.1 src/usr.sbin/repquota/repquota.8
cvs rdiff -u -r1.25 -r1.25.2.1 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/sys/ufs/ufs/quota2.h
diff -u src/sys/ufs/ufs/quota2.h:1.1.2.1 src/sys/ufs/ufs/quota2.h:1.1.2.2
--- src/sys/ufs/ufs/quota2.h:1.1.2.1	Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/quota2.h	Fri Jan 21 16:58:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: quota2.h,v 1.1.2.1 2011/01/20 14:25:03 bouyer Exp $ */
+/* $NetBSD: quota2.h,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -97,5 +97,4 @@
 /* quota2_subr.c */
 void quota2_addfreeq2e(struct quota2_header *, void *, uint64_t, uint64_t, int);
 void quota2_create_blk0(uint64_t, void *bp, int, int, int);
-
 #endif /*  _UFS_UFS_QUOTA2_H_ */
Index: src/sys/ufs/ufs/quota2_prop.c
diff -u src/sys/ufs/ufs/quota2_prop.c:1.1.2.1 src/sys/ufs/ufs/quota2_prop.c:1.1.2.2
--- src/sys/ufs/ufs/quota2_prop.c:1.1.2.1	Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/quota2_prop.c	Fri Jan 21 16:58:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: quota2_prop.c,v 1.1.2.1 2011/01/20 14:25:03 bouyer Exp $ */
+/* $NetBSD: quota2_prop.c,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -95,8 +95,6 @@
 {
 	int i, error;
 	prop_dictionary_t val;
-	if (!prop_dictionary_get_uint32(data, id, q2e-q2e_uid))
-		return EINVAL;
 	for (i = 0; i  NQ2V; i++) {
 		val = prop_dictionary_get_dict(data, quota2_valnames[i]);
 		if (val == NULL)
@@ -135,6 +133,16 @@
 	return 0;
 }
 
+bool
+prop_array_add_and_rel(prop_array_t array, prop_object_t po)
+{
+	bool ret;
+	if (po == NULL)
+		return false;
+	ret = prop_array_add(array, po);
+	prop_object_release(po);
+	return ret;
+}
 
 bool
 prop_dictionary_set_and_rel(prop_dictionary_t dict, const char *key,
Index: src/sys/ufs/ufs/quota2_prop.h
diff -u src/sys/ufs/ufs/quota2_prop.h:1.1.2.1 src/sys/ufs/ufs/quota2_prop.h:1.1.2.2
--- src/sys/ufs/ufs/quota2_prop.h:1.1.2.1	Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/quota2_prop.h	Fri Jan 21 16:58:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: quota2_prop.h,v 1.1.2.1 2011/01/20 14:25:03 bouyer Exp $ */
+/* $NetBSD: quota2_prop.h,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -36,6 +36,7 @@
 int quota2_dict_get_q2e_usage(prop_dictionary_t, struct quota2_entry *);
 int quota2_get_cmds(prop_dictionary_t, prop_array_t *);
 
+bool prop_array_add_and_rel(prop_array_t, prop_object_t);
 bool prop_dictionary_set_and_rel(prop_dictionary_t, const char *,
  prop_object_t);
 prop_dictionary_t quota2_prop_create(void);
Index: src/sys/ufs/ufs/ufs_quota.h
diff -u src/sys/ufs/ufs/ufs_quota.h:1.1.2.1 src/sys/ufs/ufs/ufs_quota.h:1.1.2.2
--- src/sys/ufs/ufs/ufs_quota.h:1.1.2.1	Thu Jan 20 14:25:03 2011
+++ src/sys/ufs/ufs/ufs_quota.h	Fri Jan 21 16:58:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.h,v 1.1.2.1 2011/01/20 14:25:03 bouyer Exp $	*/
+/*	$NetBSD: ufs_quota.h,v 1.1.2.2 2011/01/21 16:58:06 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -96,8 +96,8 @@
  */
 #define	NODQUOT		NULL
 
-static kmutex_t dqlock;
-static kcondvar_t dqcv;
+extern kmutex_t dqlock;
+extern kcondvar_t dqcv;
 /*
  * Quota name to error message mapping.
  */
@@ -128,8 +128,9 @@
 
 int chkdq2(struct inode *, int64_t, kauth_cred_t, int);
 int chkiq2(struct inode *, int32_t, kauth_cred_t, int);
-int quota2_handle_cmd_get(struct ufsmount *, const char *, int, int,
+int quota2_handle_cmd_get(struct ufsmount *, int, int, int,
 prop_array_t);
+int quota2_handle_cmd_getall(struct ufsmount *, int, prop_array_t);
 int q2sync(struct mount *);
 int 

CVS commit: src/sys

2011-01-21 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jan 21 17:46:20 UTC 2011

Modified Files:
src/sys/dev/ic: ath_netbsd.c ath_netbsd.h
src/sys/kern: subr_prf.c
src/sys/sys: systm.h

Log Message:
Move device_printf() from ath_netbsd.c to subr_prf.c for reuse in a new
driver.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/ath_netbsd.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/ath_netbsd.h
cvs rdiff -u -r1.138 -r1.139 src/sys/kern/subr_prf.c
cvs rdiff -u -r1.245 -r1.246 src/sys/sys/systm.h

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

Modified files:

Index: src/sys/dev/ic/ath_netbsd.c
diff -u src/sys/dev/ic/ath_netbsd.c:1.17 src/sys/dev/ic/ath_netbsd.c:1.18
--- src/sys/dev/ic/ath_netbsd.c:1.17	Mon Oct 19 23:19:39 2009
+++ src/sys/dev/ic/ath_netbsd.c	Fri Jan 21 17:46:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ath_netbsd.c,v 1.17 2009/10/19 23:19:39 rmind Exp $ */
+/*	$NetBSD: ath_netbsd.c,v 1.18 2011/01/21 17:46:19 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2003, 2004 David Young
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ath_netbsd.c,v 1.17 2009/10/19 23:19:39 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: ath_netbsd.c,v 1.18 2011/01/21 17:46:19 dyoung Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -57,18 +57,6 @@
 #include dev/ic/ath_netbsd.h
 #include dev/ic/athvar.h
 
-void
-device_printf(device_t dev, const char *fmt, ...)
-{
-	va_list ap;
-
-	va_start(ap, fmt);
-	printf(%s: , device_xname(dev));
-	vprintf(fmt, ap);
-	va_end(ap);
-	return;
-}
-
 /*
  * Setup sysctl(3) MIB, hw.ath.*.
  *

Index: src/sys/dev/ic/ath_netbsd.h
diff -u src/sys/dev/ic/ath_netbsd.h:1.10 src/sys/dev/ic/ath_netbsd.h:1.11
--- src/sys/dev/ic/ath_netbsd.h:1.10	Fri Mar 19 01:31:11 2010
+++ src/sys/dev/ic/ath_netbsd.h	Fri Jan 21 17:46:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ath_netbsd.h,v 1.10 2010/03/19 01:31:11 dyoung Exp $ */
+/*	$NetBSD: ath_netbsd.h,v 1.11 2011/01/21 17:46:19 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2003, 2004 David Young
@@ -119,8 +119,6 @@
 	SYSCTL_DESCR(__descr), NULL, 0, ath_##__var, 0, CTL_CREATE,\
 	CTL_EOL)
 
-extern void device_printf(device_t, const char *fmt, ...)
-__attribute__((__format__(__printf__,2,3)));
 const struct sysctlnode *ath_sysctl_treetop(struct sysctllog **);
 const struct sysctlnode *ath_sysctl_instance(const char *, struct sysctllog **);
 

Index: src/sys/kern/subr_prf.c
diff -u src/sys/kern/subr_prf.c:1.138 src/sys/kern/subr_prf.c:1.139
--- src/sys/kern/subr_prf.c:1.138	Tue Jan 26 12:59:50 2010
+++ src/sys/kern/subr_prf.c	Fri Jan 21 17:46:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.138 2010/01/26 12:59:50 he Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.139 2011/01/21 17:46:19 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.138 2010/01/26 12:59:50 he Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_prf.c,v 1.139 2011/01/21 17:46:19 dyoung Exp $);
 
 #include opt_ddb.h
 #include opt_ipkdb.h
@@ -1138,6 +1138,18 @@
 	}\
 }
 
+void
+device_printf(device_t dev, const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	printf(%s: , device_xname(dev));
+	vprintf(fmt, ap);
+	va_end(ap);
+	return;
+}
+
 /*
  * Guts of kernel printf.  Note, we already expect to be in a mutex!
  */

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.245 src/sys/sys/systm.h:1.246
--- src/sys/sys/systm.h:1.245	Thu Dec 30 16:49:25 2010
+++ src/sys/sys/systm.h	Fri Jan 21 17:46:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.245 2010/12/30 16:49:25 pooka Exp $	*/
+/*	$NetBSD: systm.h,v 1.246 2011/01/21 17:46:19 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -48,10 +48,10 @@
 
 #ifdef _KERNEL
 #include sys/types.h
+#include sys/device_if.h
 #endif
 
 struct clockframe;
-struct device;
 struct lwp;
 struct proc;
 struct timeval;
@@ -89,7 +89,7 @@
 
 extern dev_t rootdev;		/* root device */
 extern struct vnode *rootvp;	/* vnode equivalent to above */
-extern struct device *root_device; /* device equivalent to above */
+extern device_t root_device; /* device equivalent to above */
 extern const char *rootspec;	/* how root device was specified */
 
 extern int ncpu;		/* number of CPUs configured */
@@ -187,17 +187,18 @@
 void	aprint_debug(const char *, ...)
 __attribute__((__format__(__printf__,1,2)));
 
-struct device;
+void device_printf(device_t, const char *fmt, ...)
+__attribute__((__format__(__printf__,2,3)));
 
-void	aprint_normal_dev(struct device *, const char *, ...)
+void	aprint_normal_dev(device_t, const char *, ...)
 __attribute__((__format__(__printf__,2,3)));
-void	aprint_error_dev(struct device *, const char *, ...)
+void	aprint_error_dev(device_t, const char *, ...)
 __attribute__((__format__(__printf__,2,3)));
-void	aprint_naive_dev(struct device *, const char *, ...)
+void	

CVS commit: src/share/man/man9

2011-01-21 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jan 21 17:51:20 UTC 2011

Modified Files:
src/share/man/man9: kprintf.9

Log Message:
Describe device_printf(9).

XXX Need symbolic link device_printf.9 - kprintf.9.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/kprintf.9

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/man9/kprintf.9
diff -u src/share/man/man9/kprintf.9:1.29 src/share/man/man9/kprintf.9:1.30
--- src/share/man/man9/kprintf.9:1.29	Wed Feb 17 22:04:14 2010
+++ src/share/man/man9/kprintf.9	Fri Jan 21 17:51:19 2011
@@ -1,6 +1,6 @@
-.\ $NetBSD: kprintf.9,v 1.29 2010/02/17 22:04:14 cnst Exp $
+.\ $NetBSD: kprintf.9,v 1.30 2011/01/21 17:51:19 dyoung Exp $
 .\
-.\ Copyright (c) 1998, 2002, 2007 The NetBSD Foundation, Inc.
+.\ Copyright (c) 1998, 2002, 2007, 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ This code is derived from software contributed to The NetBSD Foundation
@@ -27,10 +27,11 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd September 4, 2009
+.Dd January 21, 2011
 .Dt KPRINTF 9
 .Os
 .Sh NAME
+.Nm device_printf ,
 .Nm printf ,
 .Nm snprintf ,
 .Nm vprintf ,
@@ -43,6 +44,8 @@
 .Sh SYNOPSIS
 .In sys/systm.h
 .Ft void
+.Fn device_printf device_t const char *format ...
+.Ft void
 .Fn printf const char *format ...
 .Ft void
 .Fn printf_nolog const char *format ...
@@ -107,6 +110,12 @@
 .Fn vprintf
 send formatted strings to the system console.
 The
+.Fn device_printf
+function is identical to
+.Fn printf ,
+except that it prefixes the log message with the corresponding
+device name.
+The
 .Fn printf_nolog
 function is identical to
 .Fn printf ,



CVS commit: src/sys/dev/i2c

2011-01-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Jan 21 19:11:48 UTC 2011

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: pcf8563.c pcf8563reg.h

Log Message:
Add pcf8563rtc(4), yet another I2C real time clock.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/pcf8563.c src/sys/dev/i2c/pcf8563reg.h

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

Modified files:

Index: src/sys/dev/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.31 src/sys/dev/i2c/files.i2c:1.32
--- src/sys/dev/i2c/files.i2c:1.31	Tue Jan  4 01:24:56 2011
+++ src/sys/dev/i2c/files.i2c	Fri Jan 21 19:11:47 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.31 2011/01/04 01:24:56 matt Exp $
+#	$NetBSD: files.i2c,v 1.32 2011/01/21 19:11:47 jakllsch Exp $
 
 defflag	opt_i2cbus.hI2C_SCAN
 define	i2cbus { }
@@ -48,6 +48,11 @@
 attach	maxrtc at iic
 file	dev/i2c/max6900.c			maxrtc
 
+# NXP/Philips PCF8563 Real Time Clock
+device	pcf8563rtc
+attach	pcf8563rtc at iic
+file	dev/i2c/pcf8563.c			pcf8563rtc
+
 # Philips PCF8583 Real Time Clock
 device	pcfrtc
 attach	pcfrtc at iic

Added files:

Index: src/sys/dev/i2c/pcf8563.c
diff -u /dev/null src/sys/dev/i2c/pcf8563.c:1.1
--- /dev/null	Fri Jan 21 19:11:48 2011
+++ src/sys/dev/i2c/pcf8563.c	Fri Jan 21 19:11:47 2011
@@ -0,0 +1,182 @@
+/*	$NetBSD: pcf8563.c,v 1.1 2011/01/21 19:11:47 jakllsch Exp $	*/
+
+/*
+ * Copyright (c) 2011 Jonathan A. Kollasch
+ * 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 HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: pcf8563.c,v 1.1 2011/01/21 19:11:47 jakllsch Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/kernel.h
+
+#include dev/clock_subr.h
+
+#include dev/i2c/i2cvar.h
+#include dev/i2c/pcf8563reg.h
+
+struct pcf8563rtc_softc {
+	device_t sc_dev;
+	i2c_tag_t sc_tag;
+	int sc_addr;
+	struct todr_chip_handle sc_todr;
+};
+
+static int pcf8563rtc_match(device_t, cfdata_t, void *);
+static void pcf8563rtc_attach(device_t, device_t, void *);
+
+CFATTACH_DECL_NEW(pcf8563rtc, sizeof(struct pcf8563rtc_softc),
+pcf8563rtc_match, pcf8563rtc_attach, NULL, NULL);
+
+static int pcf8563rtc_clock_read(struct pcf8563rtc_softc *, struct clock_ymdhms *);
+static int pcf8563rtc_clock_write(struct pcf8563rtc_softc *, struct clock_ymdhms *);
+static int pcf8563rtc_gettime(struct todr_chip_handle *, struct timeval *);
+static int pcf8563rtc_settime(struct todr_chip_handle *, struct timeval *);
+
+static int
+pcf8563rtc_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct i2c_attach_args *ia = aux;
+
+	if (ia-ia_addr == PCF8563_ADDR)
+		return 1;
+
+	return 0;
+}
+
+static void
+pcf8563rtc_attach(device_t parent, device_t self, void *aux)
+{
+	struct pcf8563rtc_softc *sc = device_private(self);
+	struct i2c_attach_args *ia = aux;
+
+	aprint_naive(: Real-time Clock\n);
+	aprint_normal(: NXP PCF8563 Real-time Clock\n);
+
+	sc-sc_dev = self;
+	sc-sc_tag = ia-ia_tag;
+	sc-sc_addr = ia-ia_addr;
+	sc-sc_todr.cookie = sc;
+	sc-sc_todr.todr_gettime = pcf8563rtc_gettime;
+	sc-sc_todr.todr_settime = pcf8563rtc_settime;
+	sc-sc_todr.todr_setwen = NULL;
+
+	todr_attach(sc-sc_todr);
+}
+
+static int
+pcf8563rtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
+{
+	struct pcf8563rtc_softc *sc = ch-cookie;
+	struct clock_ymdhms dt;
+
+	memset(dt, 0, sizeof(dt));
+
+	if (pcf8563rtc_clock_read(sc, dt) == 0)
+		return -1;
+
+	tv-tv_sec = clock_ymdhms_to_secs(dt);
+	tv-tv_usec = 0;
+
+	return 0;
+}
+
+static int
+pcf8563rtc_settime(struct todr_chip_handle *ch, struct 

CVS commit: src/sys/uvm

2011-01-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jan 21 19:27:09 UTC 2011

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

Log Message:
Cleanup/add some asserts.  no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/uvm/uvm_pglist.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_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.53 src/sys/uvm/uvm_pglist.c:1.54
--- src/sys/uvm/uvm_pglist.c:1.53	Fri Jan 21 16:56:38 2011
+++ src/sys/uvm/uvm_pglist.c	Fri Jan 21 19:27:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.53 2011/01/21 16:56:38 cegger Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.54 2011/01/21 19:27:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.53 2011/01/21 16:56:38 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.54 2011/01/21 19:27:09 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -205,7 +205,7 @@
 		 * Found a suitable starting page.  See if the range is free.
 		 */
 #ifdef PGALLOC_VERBOSE
-		printf(%s: ps=%p try=%#x end=%#x skip=%#x, align=0x%PRIxPADDR,
+		printf(%s: ps=%p try=%#x end=%#x skip=%#x, align=%#PRIxPADDR,
 		__func__, ps, tryidx, end, skip, alignment);
 #endif
 		/*
@@ -356,15 +356,16 @@
 	int todo, limit, try;
 	struct vm_page *pg;
 	bool second_pass;
-#ifdef DEBUG
-	int cidx = 0;	/* XXX: GCC */
-#endif
 #ifdef PGALLOC_VERBOSE
 	printf(pgalloc: simple %d pgs from psi %ld\n, num,
 	(long)(ps - vm_physmem));
 #endif
 
 	KASSERT(mutex_owned(uvm_fpageqlock));
+	KASSERT(ps-start = ps-avail_start);
+	KASSERT(ps-start = ps-avail_end);
+	KASSERT(ps-avail_start = ps-end);
+	KASSERT(ps-avail_end = ps-end);
 
 	low = atop(low);
 	high = atop(high);
@@ -385,10 +386,16 @@
 			continue;
 		}
 #ifdef DEBUG
-		if (vm_physseg_find(try, cidx) != ps - vm_physmem)
-			panic(pgalloc simple: botch1);
-		if (cidx != (try - ps-start))
-			panic(pgalloc simple: botch2);
+		{
+			int cidx = 0;
+			const int bank = vm_physseg_find(try, cidx);
+			KASSERTMSG(bank == ps - vm_physmem,
+			(vm_physseg_find(%#x) (%d) != ps %zd,
+			 try, bank, ps - vm_physmem));
+			KASSERTMSG(cidx == try - ps-start,
+			(vm_physseg_find(%#x): %#x != off %PRIxPADDR,
+			 try, cidx, try - ps-start));
+		}
 #endif
 		if (VM_PAGE_IS_FREE(pg) == 0)
 			continue;



CVS commit: src/sys/fs/udf

2011-01-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Jan 21 20:36:53 UTC 2011

Modified Files:
src/sys/fs/udf: udf_subr.c

Log Message:
Split out the raw to indexed partitioning code protecting against roque
implementations that use `ramdom' numbers for the physical partitions breaking
lots of implementations. Known curlpit is MicroSoft Windows 7.

Not only the partition mappings need to be protected against this but also the 
metadata partition files.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/fs/udf/udf_subr.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/fs/udf/udf_subr.c
diff -u src/sys/fs/udf/udf_subr.c:1.110 src/sys/fs/udf/udf_subr.c:1.111
--- src/sys/fs/udf/udf_subr.c:1.110	Thu Jan 13 13:13:31 2011
+++ src/sys/fs/udf/udf_subr.c	Fri Jan 21 20:36:53 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.110 2011/01/13 13:13:31 reinoud Exp $ */
+/* $NetBSD: udf_subr.c,v 1.111 2011/01/21 20:36:53 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__KERNEL_RCSID(0, $NetBSD: udf_subr.c,v 1.110 2011/01/13 13:13:31 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: udf_subr.c,v 1.111 2011/01/21 20:36:53 reinoud Exp $);
 #endif /* not lint */
 
 
@@ -983,6 +983,28 @@
 	return vpart_num;
 }
 
+
+/* 
+ * BUGALERT: some rogue implementations use random physical partition
+ * numbers to break other implementations so lookup the number.
+ */
+
+static uint16_t
+udf_find_raw_phys(struct udf_mount *ump, uint16_t raw_phys_part)
+{
+	struct part_desc *part;
+	uint16_t phys_part;
+
+	for (phys_part = 0; phys_part  UDF_PARTITIONS; phys_part++) {
+		part = ump-partitions[phys_part];
+		if (part == NULL)
+			break;
+		if (udf_rw16(part-part_num) == raw_phys_part)
+			break;
+	}
+	return phys_part;
+}
+
 /* - */
 
 /* we dont try to be smart; we just record the parts */
@@ -994,7 +1016,6 @@
 static int
 udf_process_vds_descriptor(struct udf_mount *ump, union dscrptr *dscr)
 {
-	struct part_desc *part;
 	uint16_t phys_part, raw_phys_part;
 
 	DPRINTF(VOLUMES, (\tprocessing VDS descr %d\n,
@@ -1026,13 +1047,8 @@
 		 * the number.
 		 */
 		raw_phys_part = udf_rw16(dscr-pd.part_num);
-		for (phys_part = 0; phys_part  UDF_PARTITIONS; phys_part++) {
-			part = ump-partitions[phys_part];
-			if (part == NULL)
-break;
-			if (udf_rw16(part-part_num) == raw_phys_part)
-break;
-		}
+		phys_part = udf_find_raw_phys(ump, raw_phys_part);
+
 		if (phys_part == UDF_PARTITIONS) {
 			free(dscr, M_UDFVOLD);
 			return EINVAL;
@@ -1839,7 +1855,6 @@
 	/* struct udf_args *args = ump-mount_args; */
 	struct logvol_int_desc *lvint;
 	struct udf_logvol_info *lvinfo;
-	struct part_desc *part;
 	uint32_t n_pm, mt_l;
 	uint8_t *pmap_pos;
 	char *domain_name, *map_name;
@@ -1970,13 +1985,7 @@
 		 * partition numbers to break other implementations so lookup
 		 * the number.
 		 */
-		for (phys_part = 0; phys_part  UDF_PARTITIONS; phys_part++) {
-			part = ump-partitions[phys_part];
-			if (part == NULL)
-continue;
-			if (udf_rw16(part-part_num) == raw_phys_part)
-break;
-		}
+		phys_part = udf_find_raw_phys(ump, raw_phys_part);
 
 		DPRINTF(VOLUMES, (\t%d - %d(%d) type %d\n, log_part,
 		raw_phys_part, phys_part, pmap_type));
@@ -3116,17 +3125,28 @@
 	struct part_map_meta *pmm = mapping-pmm;
 	struct long_ad	 icb_loc;
 	struct vnode *vp;
+	uint16_t raw_phys_part, phys_part;
 	int error;
 
+	/*
+	 * BUGALERT: some rogue implementations use random physical
+	 * partition numbers to break other implementations so lookup
+	 * the number.
+	 */
+
 	/* extract our allocation parameters set up on format */
 	ump-metadata_alloc_unit_size = udf_rw32(mapping-pmm.alloc_unit_size);
 	ump-metadata_alignment_unit_size = udf_rw16(mapping-pmm.alignment_unit_size);
 	ump-metadata_flags = mapping-pmm.flags;
 
 	DPRINTF(VOLUMES, (Reading in Metadata files\n));
-	icb_loc.loc.part_num = pmm-part_num;
-	icb_loc.loc.lb_num   = pmm-meta_file_lbn;
+	raw_phys_part = udf_rw16(pmm-part_num);
+	phys_part = udf_find_raw_phys(ump, raw_phys_part);
+
+	icb_loc.loc.part_num = udf_rw16(phys_part);
+
 	DPRINTF(VOLUMES, (Metadata file\n));
+	icb_loc.loc.lb_num   = pmm-meta_file_lbn;
 	error = udf_get_node(ump, icb_loc, ump-metadata_node);
 	if (ump-metadata_node) {
 		vp = ump-metadata_node-vnode;
@@ -5309,6 +5329,7 @@
 	/* garbage check: translate udf_node_icb_loc to sectornr */
 	error = udf_translate_vtop(ump, node_icb_loc, sector, dummy);
 	if (error) {
+		DPRINTF(NODE, (\tcan't translate icb address!\n));
 		/* no use, this will fail anyway */
 		mutex_exit(ump-get_node_lock);
 		return EINVAL;



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2011-01-21 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jan 21 21:57:17 UTC 2011

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: i915_drv.h

Log Message:
unifdef -U__linux__ -U__FreeBSD__.  No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/sys/external/bsd/drm/dist/shared-core/i915_drv.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/external/bsd/drm/dist/shared-core/i915_drv.h
diff -u src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.1.1.4 src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.2
--- src/sys/external/bsd/drm/dist/shared-core/i915_drv.h:1.1.1.4	Fri Jun 19 03:22:24 2009
+++ src/sys/external/bsd/drm/dist/shared-core/i915_drv.h	Fri Jan 21 21:57:16 2011
@@ -232,9 +232,6 @@
 	u8 saveDACDATA[256*3]; /* 256 3-byte colors */
 	u8 saveCR[37];
 	struct {
-#ifdef __linux__
-		struct drm_mm gtt_space;
-#endif
 		/**
 		 * List of objects currently involved in rendering from the
 		 * ringbuffer.
@@ -267,16 +264,6 @@
 		 * outstanding.
 		 */
 		struct list_head request_list;
-#ifdef __linux__
-		/**
-		 * We leave the user IRQ off as much as possible,
-		 * but this means that requests will finish and never
-		 * be retired once the system goes idle. Set a timer to
-		 * fire periodically while the ring is running. When it
-		 * fires, go retire requests.
-		 */
-		struct delayed_work retire_work;
-#endif
 		uint32_t next_gem_seqno;
 
 		/**
@@ -556,10 +543,6 @@
 		LOCK_TEST_WITH_RETURN(dev, file_priv);			\
 } while (0)
 
-#if defined(__FreeBSD__)
-typedef boolean_t bool;
-#endif
-
 #define I915_READ(reg)		DRM_READ32(dev_priv-mmio_map, (reg))
 #define I915_WRITE(reg,val)	DRM_WRITE32(dev_priv-mmio_map, (reg), (val))
 #define I915_READ16(reg)	DRM_READ16(dev_priv-mmio_map, (reg))



CVS commit: src/sbin/newfs_udf

2011-01-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Jan 21 22:10:51 UTC 2011

Modified Files:
src/sbin/newfs_udf: newfs_udf.c

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/newfs_udf/newfs_udf.c

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

Modified files:

Index: src/sbin/newfs_udf/newfs_udf.c
diff -u src/sbin/newfs_udf/newfs_udf.c:1.9 src/sbin/newfs_udf/newfs_udf.c:1.10
--- src/sbin/newfs_udf/newfs_udf.c:1.9	Tue Jan  4 23:42:48 2011
+++ src/sbin/newfs_udf/newfs_udf.c	Fri Jan 21 22:10:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_udf.c,v 1.9 2011/01/04 23:42:48 wiz Exp $ */
+/* $NetBSD: newfs_udf.c,v 1.10 2011/01/21 22:10:51 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -1549,7 +1549,7 @@
 		return EXIT_FAILURE;
 	}
 
-	/* Formatting can only be done on raw devices */
+	/* formatting can only be done on raw devices */
 	if (!S_ISCHR(st.st_mode)) {
 		printf(%s is not a raw device\n, dev);
 		close(fd);



CVS commit: src/sbin/newfs_udf

2011-01-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Fri Jan 21 22:32:13 UTC 2011

Modified Files:
src/sbin/newfs_udf: newfs_udf.c

Log Message:
When requesting to disable metadata partitions, also disable low formatting.
When no meta and not low formatting we can lower the required UDF version.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/newfs_udf/newfs_udf.c

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

Modified files:

Index: src/sbin/newfs_udf/newfs_udf.c
diff -u src/sbin/newfs_udf/newfs_udf.c:1.10 src/sbin/newfs_udf/newfs_udf.c:1.11
--- src/sbin/newfs_udf/newfs_udf.c:1.10	Fri Jan 21 22:10:51 2011
+++ src/sbin/newfs_udf/newfs_udf.c	Fri Jan 21 22:32:13 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_udf.c,v 1.10 2011/01/21 22:10:51 reinoud Exp $ */
+/* $NetBSD: newfs_udf.c,v 1.11 2011/01/21 22:32:13 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -573,7 +573,7 @@
 
 	/* enable/disable requests */
 	if (req_disable  FORMAT_META) {
-		format_flags = ~FORMAT_META;
+		format_flags = ~(FORMAT_META | FORMAT_LOW);
 		req_disable  = ~FORMAT_META;
 	}
 	if (req_disable || req_enable) {
@@ -608,7 +608,8 @@
 		context.min_udf = MAX(context.min_udf, 0x0260);
 
 	/* adjust maximum version limits not to tease or break things */
-	if (!(format_flags  FORMAT_META)  (context.max_udf  0x200))
+	if (!(format_flags  (FORMAT_META | FORMAT_LOW)) 
+	(context.max_udf  0x200))
 		context.max_udf = 0x201;
 
 	if ((format_flags  (FORMAT_VAT | FORMAT_SPARABLE)) == 0)



CVS commit: src/sys/arch/algor/conf

2011-01-21 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Fri Jan 21 22:37:12 UTC 2011

Modified Files:
src/sys/arch/algor/conf: P4032

Log Message:
Bump SYMTAB_SPACE so that it fits again.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/algor/conf/P4032

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/algor/conf/P4032
diff -u src/sys/arch/algor/conf/P4032:1.54 src/sys/arch/algor/conf/P4032:1.55
--- src/sys/arch/algor/conf/P4032:1.54	Tue Nov 23 11:13:53 2010
+++ src/sys/arch/algor/conf/P4032	Fri Jan 21 22:37:11 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: P4032,v 1.54 2010/11/23 11:13:53 hannken Exp $
+#	$NetBSD: P4032,v 1.55 2011/01/21 22:37:11 he Exp $
 #
 # Algorithmics P-4032 kernel.
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		P4032-$Revision: 1.54 $
+#ident 		P4032-$Revision: 1.55 $
 
 maxusers 32
 
@@ -30,7 +30,7 @@
 options 	DDB			# kernel debugger
 makeoptions	DEBUG=-g
 #makeoptions	DEBUGLIST=pattern1 pattern2 ...
-options 	SYMTAB_SPACE=34
+options 	SYMTAB_SPACE=35
 
 # File systems
 file-system	FFS		# Fast file system



CVS commit: src/sys/dev/i2c

2011-01-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Jan 21 22:42:16 UTC 2011

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

Log Message:
Per suggestion from tsutsui, convert to todr_[gs]ettime_ymdhms flavor.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/pcf8563.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/pcf8563.c
diff -u src/sys/dev/i2c/pcf8563.c:1.1 src/sys/dev/i2c/pcf8563.c:1.2
--- src/sys/dev/i2c/pcf8563.c:1.1	Fri Jan 21 19:11:47 2011
+++ src/sys/dev/i2c/pcf8563.c	Fri Jan 21 22:42:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcf8563.c,v 1.1 2011/01/21 19:11:47 jakllsch Exp $	*/
+/*	$NetBSD: pcf8563.c,v 1.2 2011/01/21 22:42:16 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pcf8563.c,v 1.1 2011/01/21 19:11:47 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: pcf8563.c,v 1.2 2011/01/21 22:42:16 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -54,8 +54,8 @@
 
 static int pcf8563rtc_clock_read(struct pcf8563rtc_softc *, struct clock_ymdhms *);
 static int pcf8563rtc_clock_write(struct pcf8563rtc_softc *, struct clock_ymdhms *);
-static int pcf8563rtc_gettime(struct todr_chip_handle *, struct timeval *);
-static int pcf8563rtc_settime(struct todr_chip_handle *, struct timeval *);
+static int pcf8563rtc_gettime(struct todr_chip_handle *, struct clock_ymdhms *);
+static int pcf8563rtc_settime(struct todr_chip_handle *, struct clock_ymdhms *);
 
 static int
 pcf8563rtc_match(device_t parent, cfdata_t cf, void *aux)
@@ -81,39 +81,30 @@
 	sc-sc_tag = ia-ia_tag;
 	sc-sc_addr = ia-ia_addr;
 	sc-sc_todr.cookie = sc;
-	sc-sc_todr.todr_gettime = pcf8563rtc_gettime;
-	sc-sc_todr.todr_settime = pcf8563rtc_settime;
+	sc-sc_todr.todr_gettime_ymdhms = pcf8563rtc_gettime;
+	sc-sc_todr.todr_settime_ymdhms = pcf8563rtc_settime;
 	sc-sc_todr.todr_setwen = NULL;
 
 	todr_attach(sc-sc_todr);
 }
 
 static int
-pcf8563rtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
+pcf8563rtc_gettime(struct todr_chip_handle *ch, struct clock_ymdhms *dt)
 {
 	struct pcf8563rtc_softc *sc = ch-cookie;
-	struct clock_ymdhms dt;
-
-	memset(dt, 0, sizeof(dt));
-
-	if (pcf8563rtc_clock_read(sc, dt) == 0)
+	
+	if (pcf8563rtc_clock_read(sc, dt) == 0)
 		return -1;
 
-	tv-tv_sec = clock_ymdhms_to_secs(dt);
-	tv-tv_usec = 0;
-
 	return 0;
 }
 
 static int
-pcf8563rtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
+pcf8563rtc_settime(struct todr_chip_handle *ch, struct clock_ymdhms *dt)
 {
 struct pcf8563rtc_softc *sc = ch-cookie;
-	struct clock_ymdhms dt;
-
-	clock_secs_to_ymdhms(tv-tv_sec, dt);
 
-	if (pcf8563rtc_clock_write(sc, dt) == 0)
+	if (pcf8563rtc_clock_write(sc, dt) == 0)
 		return -1;
 
 	return 0;



CVS commit: src/sys/kern

2011-01-21 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Jan 21 23:23:44 UTC 2011

Modified Files:
src/sys/kern: Make.tags.inc

Log Message:
Exclude drm sources from tags computation.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/Make.tags.inc

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/Make.tags.inc
diff -u src/sys/kern/Make.tags.inc:1.23 src/sys/kern/Make.tags.inc:1.24
--- src/sys/kern/Make.tags.inc:1.23	Tue Jan 11 00:36:03 2011
+++ src/sys/kern/Make.tags.inc	Fri Jan 21 23:23:44 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Make.tags.inc,v 1.23 2011/01/11 00:36:03 dyoung Exp $
+#	$NetBSD: Make.tags.inc,v 1.24 2011/01/21 23:23:44 dyoung Exp $
 #
 #	from: @(#)Make.tags.inc	8.1 (Berkeley) 6/11/93
 
@@ -15,7 +15,7 @@
 # This promises to be easier to maintain, considering how often the directory
 # structure of the kernel sources has been changing recently.
 SYSDIR?= ${.CURDIR:H:H}
-FINDCOMM=	find -H ${SYSDIR} \( -path '*/dist/ipf' -o -name arch -o -name rump -o -name coda -o -name cxgb \) -prune -o -type f -name *.[ch] \( \! -name 'altq.h' \! -name 'nbcompat.h' \! -name 'pf_osfp.c' \! -name 'unichromereg.h' \! -name 'midway*' \! -name 'if_lmc.[ch]' \! -name 'aic79xxvar.h' \) -print | \
+FINDCOMM=	find -H ${SYSDIR} \( -path '*/dist/ipf' -o -name arch -o -name rump -o -name coda -o -name cxgb -o -name drm \) -prune -o -type f -name *.[ch] \( \! -name 'altq.h' \! -name 'nbcompat.h' \! -name 'pf_osfp.c' \! -name 'unichromereg.h' \! -name 'midway*' \! -name 'if_lmc.[ch]' \! -name 'aic79xxvar.h' \) -print | \
 sort -t / -u
 COMM!=	${FINDCOMM}
 .endif



CVS commit: src/lib/libc/gen

2011-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 21 23:30:31 UTC 2011

Modified Files:
src/lib/libc/gen: glob.c

Log Message:
prevent resource DoS from brace expansion (from Maksymilian Arciemowicz)


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/gen/glob.c

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

Modified files:

Index: src/lib/libc/gen/glob.c
diff -u src/lib/libc/gen/glob.c:1.27 src/lib/libc/gen/glob.c:1.28
--- src/lib/libc/gen/glob.c:1.27	Mon Sep  6 10:40:25 2010
+++ src/lib/libc/gen/glob.c	Fri Jan 21 18:30:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: glob.c,v 1.27 2010/09/06 14:40:25 christos Exp $	*/
+/*	$NetBSD: glob.c,v 1.28 2011/01/21 23:30:31 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)glob.c	8.3 (Berkeley) 10/13/93;
 #else
-__RCSID($NetBSD: glob.c,v 1.27 2010/09/06 14:40:25 christos Exp $);
+__RCSID($NetBSD: glob.c,v 1.28 2011/01/21 23:30:31 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -87,13 +87,18 @@
 #define NO_GETPW_R
 #endif
 
-#define	GLOB_LIMIT_MALLOC	65536
-#define	GLOB_LIMIT_STAT		128
-#define	GLOB_LIMIT_READDIR	16384
-
-#define	GLOB_INDEX_MALLOC	0
-#define	GLOB_INDEX_STAT		1
-#define	GLOB_INDEX_READDIR	2
+#define	GLOB_LIMIT_STRING	65536	/* number of readdirs */
+#define	GLOB_LIMIT_STAT		128	/* number of stat system calls */
+#define	GLOB_LIMIT_READDIR	16384	/* total buffer size of path strings */
+#define	GLOB_LIMIT_PATH		1024	/* number of path elements */
+#define GLOB_LIMIT_BRACE	128	/* Number of brace calls */
+
+struct glob_limit {
+	size_t l_string;
+	size_t l_stat;	
+	size_t l_readdir;	
+	size_t l_brace;
+};
 
 /*
  * XXX: For NetBSD 1.4.x compatibility. (kill me l8r)
@@ -158,17 +163,17 @@
 static DIR	*g_opendir(Char *, glob_t *);
 static Char	*g_strchr(const Char *, int);
 static int	 g_stat(Char *, __gl_stat_t *, glob_t *);
-static int	 glob0(const Char *, glob_t *, size_t *);
-static int	 glob1(Char *, glob_t *, size_t *);
+static int	 glob0(const Char *, glob_t *, struct glob_limit *);
+static int	 glob1(Char *, glob_t *, struct glob_limit *);
 static int	 glob2(Char *, Char *, Char *, const Char *, glob_t *,
-size_t *);
+struct glob_limit *);
 static int	 glob3(Char *, Char *, Char *, const Char *, const Char *,
-const Char *, glob_t *, size_t *);
-static int	 globextend(const Char *, glob_t *, size_t *);
+const Char *, glob_t *, struct glob_limit *);
+static int	 globextend(const Char *, glob_t *, struct glob_limit *);
 static const Char *globtilde(const Char *, Char *, size_t, glob_t *);
-static int	 globexp1(const Char *, glob_t *, size_t *);
+static int	 globexp1(const Char *, glob_t *, struct glob_limit *);
 static int	 globexp2(const Char *, const Char *, glob_t *, int *,
-size_t *);
+struct glob_limit *);
 static int	 match(const Char *, const Char *, const Char *);
 #ifdef DEBUG
 static void	 qprintf(const char *, Char *);
@@ -181,8 +186,7 @@
 	const u_char *patnext;
 	int c;
 	Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
-	/* 0 = malloc(), 1 = stat(), 2 = readdir() */
-	size_t limit[] = { 0, 0, 0 };
+	struct glob_limit limit = { 0, 0, 0, 0 };
 
 	_DIAGASSERT(pattern != NULL);
 
@@ -218,9 +222,9 @@
 	*bufnext = EOS;
 
 	if (flags  GLOB_BRACE)
-	return globexp1(patbuf, pglob, limit);
+	return globexp1(patbuf, pglob, limit);
 	else
-	return glob0(patbuf, pglob, limit);
+	return glob0(patbuf, pglob, limit);
 }
 
 /*
@@ -229,7 +233,7 @@
  * characters
  */
 static int
-globexp1(const Char *pattern, glob_t *pglob, size_t *limit)
+globexp1(const Char *pattern, glob_t *pglob, struct glob_limit *limit)
 {
 	const Char* ptr = pattern;
 	int rv;
@@ -237,6 +241,12 @@
 	_DIAGASSERT(pattern != NULL);
 	_DIAGASSERT(pglob != NULL);
 
+	if ((pglob-gl_flags  GLOB_LIMIT) 
+	limit-l_brace++ = GLOB_LIMIT_BRACE) {
+		errno = 0;
+		return GLOB_NOSPACE;
+	}
+
 	/* Protect a single {}, for find(1), like csh */
 	if (pattern[0] == LBRACE  pattern[1] == RBRACE  pattern[2] == EOS)
 		return glob0(pattern, pglob, limit);
@@ -256,7 +266,7 @@
  */
 static int
 globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv,
-size_t *limit)
+struct glob_limit *limit)
 {
 	int i;
 	Char   *lm, *ls;
@@ -461,7 +471,7 @@
  * to find no matches.
  */
 static int
-glob0(const Char *pattern, glob_t *pglob, size_t *limit)
+glob0(const Char *pattern, glob_t *pglob, struct glob_limit *limit)
 {
 	const Char *qpatnext;
 	int c, error;
@@ -570,7 +580,7 @@
 }
 
 static int
-glob1(Char *pattern, glob_t *pglob, size_t *limit)
+glob1(Char *pattern, glob_t *pglob, struct glob_limit *limit)
 {
 	Char pathbuf[MAXPATHLEN+1];
 
@@ -596,7 +606,7 @@
  */
 static int
 glob2(Char *pathbuf, Char *pathend, Char *pathlim, const Char *pattern,
-glob_t *pglob, size_t *limit)
+glob_t *pglob, struct glob_limit *limit)
 {
 	__gl_stat_t sb;
 	const Char *p;
@@ 

CVS commit: src/lib/libc/gdtoa

2011-01-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 21 23:36:50 UTC 2011

Modified Files:
src/lib/libc/gdtoa: gdtoaimp.h

Log Message:
add may alias attribute to the double union because gcc-4.5.x produces
incorrect code on ARMv7a. From nikunj badjatya


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/gdtoa/gdtoaimp.h

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

Modified files:

Index: src/lib/libc/gdtoa/gdtoaimp.h
diff -u src/lib/libc/gdtoa/gdtoaimp.h:1.7 src/lib/libc/gdtoa/gdtoaimp.h:1.8
--- src/lib/libc/gdtoa/gdtoaimp.h:1.7	Thu May  7 16:31:44 2009
+++ src/lib/libc/gdtoa/gdtoaimp.h	Fri Jan 21 18:36:49 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: gdtoaimp.h,v 1.7 2009/05/07 20:31:44 christos Exp $ */
+/* $NetBSD: gdtoaimp.h,v 1.8 2011/01/21 23:36:49 christos Exp $ */
 
 /
 
@@ -276,7 +276,7 @@
 Exactly one of IEEE_LITTLE_ENDIAN, IEEE_BIG_ENDIAN, VAX, or IBM should be defined.
 #endif
 
-typedef union { double d; ULong L[2]; } U;
+typedef union { double d; ULong L[2]; } __attribute__((__may_alias__)) U;
 
 #ifdef YES_ALIAS
 #define dval(x) x



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

2011-01-21 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Sat Jan 22 00:32:42 UTC 2011

Modified Files:
src/sys/arch/sandpoint/stand/netboot: dsk.c

Log Message:
- make sure to wait for BUSY bit goes down prior to each 512B block
read from xfer register, or corrupted datum may be retrieved.  Uncovered
by corrected PIO READ_CMD value.
- remove redundant register assignments to set transfer mode.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sandpoint/stand/netboot/dsk.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/stand/netboot/dsk.c
diff -u src/sys/arch/sandpoint/stand/netboot/dsk.c:1.7 src/sys/arch/sandpoint/stand/netboot/dsk.c:1.8
--- src/sys/arch/sandpoint/stand/netboot/dsk.c:1.7	Tue Jan 11 07:01:21 2011
+++ src/sys/arch/sandpoint/stand/netboot/dsk.c	Sat Jan 22 00:32:41 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.7 2011/01/11 07:01:21 nisimura Exp $ */
+/* $NetBSD: dsk.c,v 1.8 2011/01/22 00:32:41 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -154,7 +154,9 @@
 	(void)CSR_READ_1(chan-alt);
 
 	sts = CSR_READ_1(chan-cmd + _STS);
-	while (milli--  0  sts != 0xff  (sts  ATA_STS_BUSY)) {
+	while (milli--  0
+	 sts != 0xff
+	 (sts  (ATA_STS_BUSY|ATA_STS_DRDY)) != ATA_STS_DRDY) {
 		delay(1000);
 		sts = CSR_READ_1(chan-cmd + _STS);
 	}
@@ -166,6 +168,8 @@
 		msg = returned ERR;
 	else if (sts  ATA_STS_BUSY)
 		msg = remains BUSY;
+	else if ((sts  ATA_STS_DRDY) == 0)
+		msg = no DRDY;
 
 	if (err != NULL)
 		*err = msg;
@@ -251,10 +255,10 @@
 		huge = p[60] | (p[61]  16);
 	}
 	if ((p[83]  0xc000) == 0x4000  (p[83]  (1  10))) {
+		printf(LBA48 );
 		huge = p[100] | (p[101]  16);
 		huge |= (uint64_t)p[102]  32;
 		huge |= (uint64_t)p[103]  48;
-		printf(LBA48 );
 	}
 	huge = (1 + 10);
 	printf(%d MB\n, (int)huge);
@@ -357,10 +361,7 @@
 
 	CSR_WRITE_1(chan-cmd + _FEA, ATA_XFER);
 	CSR_WRITE_1(chan-cmd + _NSECT, XFER_PIO0);
-	CSR_WRITE_1(chan-cmd + _LBAL, 0);
-	CSR_WRITE_1(chan-cmd + _LBAM, 0);
-	CSR_WRITE_1(chan-cmd + _LBAH, 0);
-	CSR_WRITE_1(chan-cmd + _DEV, ATA_DEV_OBS);
+	CSR_WRITE_1(chan-cmd + _DEV, ATA_DEV_OBS); /* ??? */
 	CSR_WRITE_1(chan-cmd + _CMD, ATA_CMD_SETF);
 
 	spinwait_unbusy(l, n, 1000, NULL);
@@ -372,7 +373,7 @@
 	struct dkdev_ata *l;
 	struct dvata_chan *chan;
 	void (*issue)(struct dvata_chan *, uint64_t, uint32_t);
-	int n, rdcnt, i;
+	int n, rdcnt, i, k;
 	uint16_t *p;
 	const char *err;
 	int error;
@@ -386,16 +387,20 @@
 		issue = (bno  (1ULL28)) ? issue28 : issue48;
 		rdcnt = (bcnt  255) ? 255 : bcnt;
 		(*issue)(chan, bno, rdcnt);
-		if (spinwait_unbusy(l, n, 1000, err) == 0) {
-			printf(%s blk %d %s\n, d-xname, (int)bno, err);
-			error = EIO;
-			continue;
-		}
-		for (i = 0; i  rdcnt * 512; i += 2) {
-			/* arrives in native order */
-			*p++ = *(uint16_t *)(chan-cmd + _DAT);
+		for (k = 0; k  rdcnt; k++) {
+			if (spinwait_unbusy(l, n, 1000, err) == 0) {
+printf(%s blk %d %s\n,
+   d-xname, (int)bno, err);
+error = EIO;
+break;
+			}
+			for (i = 0; i  512; i += 2) {
+/* arrives in native order */
+*p++ = *(uint16_t *)(chan-cmd + _DAT);
+			}
+			/* clear irq if any */
+			(void)CSR_READ_1(chan-cmd + _STS);
 		}
-		(void)CSR_READ_1(chan-cmd + _STS);
 	}
 	return error;
 }
@@ -404,7 +409,7 @@
 issue48(struct dvata_chan *chan, uint64_t bno, uint32_t nblk)
 {
 
-	CSR_WRITE_1(chan-cmd + _NSECT, 0);
+	CSR_WRITE_1(chan-cmd + _NSECT, 0); /* always less than 256 */
 	CSR_WRITE_1(chan-cmd + _LBAL, (bno  24)  0xff);
 	CSR_WRITE_1(chan-cmd + _LBAM, (bno  32)  0xff);
 	CSR_WRITE_1(chan-cmd + _LBAH, (bno  40)  0xff);



CVS commit: src/sys/uvm

2011-01-21 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Jan 22 01:36:28 UTC 2011

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

Log Message:
Fix the corruption of ps-start_hint.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/uvm/uvm_pglist.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_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.54 src/sys/uvm/uvm_pglist.c:1.55
--- src/sys/uvm/uvm_pglist.c:1.54	Fri Jan 21 19:27:09 2011
+++ src/sys/uvm/uvm_pglist.c	Sat Jan 22 01:36:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.54 2011/01/21 19:27:09 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.55 2011/01/22 01:36:27 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.54 2011/01/21 19:27:09 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.55 2011/01/22 01:36:27 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -284,7 +284,12 @@
 	 * the next time we need to search this segment, start after this
 	 * chunk of pages we just allocated.
 	 */
-	ps-start_hint = tryidx + num;
+	ps-start_hint = try + num - ps-avail_start;
+	KASSERTMSG(ps-start_hint = ps-avail_end - ps-avail_start,
+	(%x %u (%#x) = %#PRIxPADDR - %#PRIxPADDR (%#PRIxPADDR),
+	try + num,
+	ps-start_hint, ps-start_hint, ps-avail_end, ps-avail_start,
+	ps-avail_end - ps-avail_start));
 
 #ifdef PGALLOC_VERBOSE
 	printf(got %d pgs\n, num);
@@ -410,7 +415,12 @@
 	 * The next time we need to search this segment,
 	 * start just after the pages we just allocated.
 	 */
-	ps-start_hint = try + 1 - ps-start;
+	ps-start_hint = try + 1 - ps-avail_start;
+	KASSERTMSG(ps-start_hint = ps-avail_end - ps-avail_start,
+	(%#x %u (%#x) = %#PRIxPADDR - %#PRIxPADDR (%#PRIxPADDR),
+	try + 1,
+	ps-start_hint, ps-start_hint, ps-avail_end, ps-avail_start,
+	ps-avail_end - ps-avail_start));
 
 #ifdef PGALLOC_VERBOSE
 	printf(got %d pgs\n, num - todo);



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2011-01-21 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Sat Jan 22 07:38:52 UTC 2011

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: isakmp_inf.c

Log Message:
From Roman Hoog Antink r...@open.ch: Fixes a null pointer dereference
that might occur after removing peers from the config and then reloading.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.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/dist/ipsec-tools/src/racoon/isakmp_inf.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.44 src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.45
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.44	Wed Nov 17 10:40:41 2010
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c	Sat Jan 22 07:38:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_inf.c,v 1.44 2010/11/17 10:40:41 tteras Exp $	*/
+/*	$NetBSD: isakmp_inf.c,v 1.45 2011/01/22 07:38:51 tteras Exp $	*/
 
 /* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
 
@@ -1502,6 +1502,15 @@
 
 	plog(LLV_DEBUG, LOCATION, iph1-remote, DPD monitoring\n);
 
+	if (iph1-status == PHASE1ST_EXPIRED) {
+		/* This can happen after removing tunnels from the
+		 * config file and then reloading.
+		 * Such iph1 have rmconf=NULL, so return before the if
+		 * block below.
+		 */
+		return;
+	}
+
 	if (iph1-dpd_fails = iph1-rmconf-dpd_maxfails) {
 
 		plog(LLV_INFO, LOCATION, iph1-remote,



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src/racoon

2011-01-21 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Sat Jan 22 07:44:39 UTC 2011

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
isakmp_inf.c

Log Message:
From Roman Hoog Antink r...@open.ch: Fixes a null pointer dereference
that might occur after removing peers from the config and then reloading.


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.17 -r1.14.4.18 \
src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.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/dist/ipsec-tools/src/racoon/isakmp_inf.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.14.4.17 src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.14.4.18
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.14.4.17	Mon May 18 17:07:46 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c	Sat Jan 22 07:44:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp_inf.c,v 1.14.4.17 2009/05/18 17:07:46 tteras Exp $	*/
+/*	$NetBSD: isakmp_inf.c,v 1.14.4.18 2011/01/22 07:44:39 tteras Exp $	*/
 
 /* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
 
@@ -1624,6 +1624,15 @@
 
 	iph1-dpd_r_u=NULL;
 
+	if (iph1-status == PHASE1ST_EXPIRED) {
+		/* This can happen after removing tunnels from the
+		 * config file and then reloading.
+		 * Such iph1 have rmconf=NULL, so return before the if
+		 * block below.
+		 */
+		return;
+	}
+
 	if (iph1-dpd_fails = iph1-rmconf-dpd_maxfails) {
 
 		plog(LLV_INFO, LOCATION, iph1-remote,