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

2011-05-19 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu May 19 08:22:38 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: fpu.h

Log Message:
Remove unnecessary Tab.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/fpu.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/powerpc/include/fpu.h
diff -u src/sys/arch/powerpc/include/fpu.h:1.18 src/sys/arch/powerpc/include/fpu.h:1.19
--- src/sys/arch/powerpc/include/fpu.h:1.18	Mon May  2 02:01:33 2011
+++ src/sys/arch/powerpc/include/fpu.h	Thu May 19 08:22:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.h,v 1.18 2011/05/02 02:01:33 matt Exp $	*/
+/*	$NetBSD: fpu.h,v 1.19 2011/05/19 08:22:38 kiyohara Exp $	*/
 
 /*-
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
 #define	FPSCR_VXVC	0x0008	/* Invalid Compare Op */
 #define	FPSCR_FR	0x0004	/* Fraction Rounded */
 #define	FPSCR_FI	0x0002	/* Fraction Inexact */
-#define	FPSCR_FPRF	0x0001f000	
+#define	FPSCR_FPRF	0x0001f000
 #define	FPSCR_C		0x0001	/* FP Class Descriptor */
 #define	FPSCR_FPCC	0xf000
 #define	FPSCR_FL	0x8000	/*  */



CVS commit: src/share/man/man9

2011-05-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu May 19 08:55:01 UTC 2011

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

Log Message:
Improve wording.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man9/kthread.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/kthread.9
diff -u src/share/man/man9/kthread.9:1.25 src/share/man/man9/kthread.9:1.26
--- src/share/man/man9/kthread.9:1.25	Thu May 19 03:07:30 2011
+++ src/share/man/man9/kthread.9	Thu May 19 08:55:01 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: kthread.9,v 1.25 2011/05/19 03:07:30 rmind Exp $
+.\ $NetBSD: kthread.9,v 1.26 2011/05/19 08:55:01 wiz Exp $
 .\
 .\ Copyright (c) 2000, 2007, 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -126,7 +126,7 @@
 Causes the kthread to be created in the
 .Dv SCHED_OTHER
 class (timeshared).
-The priority of thread will be dynamically adjusted by the scheduler.
+The thread's priority will be dynamically adjusted by the scheduler.
 Increased activity by the kthread will cause its priority to fall;
 decreased activity will cause its priority to rise.
 By default, kthreads are created in the
@@ -158,7 +158,8 @@
 Suspend execution of calling thread until the target kthread terminates.
 Conceptually the function can be compared to the user space
 .Xr pthread_join 3 ,
-however it must be called only once for kernel thread which was created using
+however it must be called only once for kernel thread which was
+created using the
 .Dv KTHREAD_JOIN
 flag and would wait on
 .Fa kthread_exit .



CVS commit: src/sys/uvm

2011-05-19 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu May 19 09:57:21 UTC 2011

Modified Files:
src/sys/uvm: uvm_page.h

Log Message:
g/c unused function prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/uvm/uvm_page.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/uvm/uvm_page.h
diff -u src/sys/uvm/uvm_page.h:1.71 src/sys/uvm/uvm_page.h:1.72
--- src/sys/uvm/uvm_page.h:1.71	Wed Feb  2 15:25:27 2011
+++ src/sys/uvm/uvm_page.h	Thu May 19 09:57:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.h,v 1.71 2011/02/02 15:25:27 chuck Exp $	*/
+/*	$NetBSD: uvm_page.h,v 1.72 2011/05/19 09:57:20 yamt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -283,8 +283,6 @@
 void uvm_page_unbusy(struct vm_page **, int);
 struct vm_page *uvm_pagelookup(struct uvm_object *, voff_t);
 void uvm_pageunwire(struct vm_page *);
-void uvm_pagewait(struct vm_page *, int);
-void uvm_pagewake(struct vm_page *);
 void uvm_pagewire(struct vm_page *);
 void uvm_pagezero(struct vm_page *);
 bool uvm_pageismanaged(paddr_t);



CVS commit: src/common/lib/libc/gen

2011-05-19 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu May 19 10:00:30 UTC 2011

Modified Files:
src/common/lib/libc/gen: radixtree.c

Log Message:
radixtree: comments


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.4 src/common/lib/libc/gen/radixtree.c:1.5
--- src/common/lib/libc/gen/radixtree.c:1.4	Thu May 19 09:58:28 2011
+++ src/common/lib/libc/gen/radixtree.c	Thu May 19 10:00:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: radixtree.c,v 1.4 2011/05/19 09:58:28 yamt Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.5 2011/05/19 10:00:30 yamt Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -41,7 +41,7 @@
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.4 2011/05/19 09:58:28 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.5 2011/05/19 10:00:30 yamt Exp $);
 #include sys/param.h
 #include sys/errno.h
 #include sys/pool.h
@@ -51,7 +51,7 @@
 #include lib/libsa/stand.h
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID($NetBSD: radixtree.c,v 1.4 2011/05/19 09:58:28 yamt Exp $);
+__RCSID($NetBSD: radixtree.c,v 1.5 2011/05/19 10:00:30 yamt Exp $);
 #include assert.h
 #include errno.h
 #include stdbool.h
@@ -325,6 +325,25 @@
 	return 0;
 }
 
+/*
+ * radix_tree_lookup_ptr:
+ *
+ * an internal helper function used for various exported functions.
+ *
+ * return the pointer to store the node for the given index.
+ *
+ * if alloc is true, try to allocate the storage.  (note for _KERNEL:
+ * in that case, this function can block.)  if the allocation failed or
+ * alloc is false, return NULL.
+ *
+ * if path is not NULL, fill it for the caller's investigation.
+ *
+ * if tagmask is not zero, search only for nodes with the tag set.
+ *
+ * while this function is a bit large, as it's called with some constant
+ * arguments, inlining might have benefits.  anyway, a compiler will decide.
+ */
+
 static inline void **
 radix_tree_lookup_ptr(struct radix_tree *t, uint64_t idx,
 struct radix_tree_path *path, bool alloc, const unsigned int tagmask)
@@ -336,6 +355,9 @@
 	const uint64_t mask = (UINT64_C(1)  RADIX_TREE_BITS_PER_HEIGHT) - 1;
 	struct radix_tree_node_ref *refs = NULL;
 
+	/*
+	 * check unsupported combinations
+	 */
 	KASSERT(tagmask == 0 || !alloc);
 	KASSERT(path == NULL || !alloc);
 	vpp = t-t_root;



CVS commit: src/common/lib/libc/gen

2011-05-19 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu May 19 10:01:21 UTC 2011

Modified Files:
src/common/lib/libc/gen: radixtree.c

Log Message:
radixtree: assertions


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.5 src/common/lib/libc/gen/radixtree.c:1.6
--- src/common/lib/libc/gen/radixtree.c:1.5	Thu May 19 10:00:30 2011
+++ src/common/lib/libc/gen/radixtree.c	Thu May 19 10:01:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: radixtree.c,v 1.5 2011/05/19 10:00:30 yamt Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.6 2011/05/19 10:01:21 yamt Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -41,7 +41,7 @@
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.5 2011/05/19 10:00:30 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.6 2011/05/19 10:01:21 yamt Exp $);
 #include sys/param.h
 #include sys/errno.h
 #include sys/pool.h
@@ -51,7 +51,7 @@
 #include lib/libsa/stand.h
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID($NetBSD: radixtree.c,v 1.5 2011/05/19 10:00:30 yamt Exp $);
+__RCSID($NetBSD: radixtree.c,v 1.6 2011/05/19 10:01:21 yamt Exp $);
 #include assert.h
 #include errno.h
 #include stdbool.h
@@ -112,6 +112,8 @@
 tagid_to_mask(radix_tree_tagid_t id)
 {
 
+	KASSERT(id = 0);
+	KASSERT(id  RADIX_TREE_TAG_ID_MAX);
 	return 1U  id;
 }
 



CVS commit: src/common/lib/libc/gen

2011-05-19 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu May 19 10:06:56 UTC 2011

Modified Files:
src/common/lib/libc/gen: radixtree.c

Log Message:
radix_tree_clear_tag:
- fix a bug which errornously clears tags on intermediate nodes.
- add comments.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.6 src/common/lib/libc/gen/radixtree.c:1.7
--- src/common/lib/libc/gen/radixtree.c:1.6	Thu May 19 10:01:21 2011
+++ src/common/lib/libc/gen/radixtree.c	Thu May 19 10:06:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: radixtree.c,v 1.6 2011/05/19 10:01:21 yamt Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.7 2011/05/19 10:06:56 yamt Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -41,7 +41,7 @@
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.6 2011/05/19 10:01:21 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.7 2011/05/19 10:06:56 yamt Exp $);
 #include sys/param.h
 #include sys/errno.h
 #include sys/pool.h
@@ -51,7 +51,7 @@
 #include lib/libsa/stand.h
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID($NetBSD: radixtree.c,v 1.6 2011/05/19 10:01:21 yamt Exp $);
+__RCSID($NetBSD: radixtree.c,v 1.7 2011/05/19 10:06:56 yamt Exp $);
 #include assert.h
 #include errno.h
 #include stdbool.h
@@ -128,6 +128,12 @@
 	unsigned int n_nptrs;	/* # of non-NULL pointers in n_ptrs */
 };
 
+/*
+ * any_children_tagmask:
+ *
+ * return OR'ed tagmask of the given node's children.
+ */
+
 static unsigned int
 any_children_tagmask(struct radix_tree_node *n)
 {
@@ -808,9 +814,15 @@
 	KASSERT(*vpp != NULL);
 	KASSERT(path.p_lastidx == t-t_height);
 	KASSERT(vpp == path_pptr(t, path, path.p_lastidx));
+	/*
+	 * if already cleared, nothing to do
+	 */
 	if ((entry_tagmask(*vpp)  tagmask) == 0) {
 		return;
 	}
+	/*
+	 * clear the tag only if no children have the tag.
+	 */
 	for (i = t-t_height; i = 0; i--) {
 		void ** const pptr = (void **)path_pptr(t, path, i);
 		void *entry;
@@ -820,7 +832,10 @@
 		KASSERT((entry_tagmask(entry)  tagmask) != 0);
 		*pptr = entry_compose(entry_ptr(entry),
 		entry_tagmask(entry)  ~tagmask);
-		if (0  i  i  t-t_height - 1) {
+		/*
+		 * check if we should proceed to process the next level.
+		 */
+		if (0  i) {
 			struct radix_tree_node *n = path_node(t, path, i - 1);
 
 			if ((any_children_tagmask(n)  tagmask) != 0) {



CVS commit: src/share/mk

2011-05-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu May 19 14:29:27 UTC 2011

Modified Files:
src/share/mk: bsd.README bsd.own.mk

Log Message:
Add fine-grained compiler selection, including clang support.


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/share/mk/bsd.README
cvs rdiff -u -r1.666 -r1.667 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.280 src/share/mk/bsd.README:1.281
--- src/share/mk/bsd.README:1.280	Thu Mar 24 17:05:44 2011
+++ src/share/mk/bsd.README	Thu May 19 14:29:27 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.280 2011/03/24 17:05:44 bouyer Exp $
+#	$NetBSD: bsd.README,v 1.281 2011/05/19 14:29:27 joerg Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -446,6 +446,20 @@
 		set to -g, -g will be added to COPTS only when compiling
 		the crypto library.
 
+The active compiler is selected using the following variables:
+AVAILABLE_COMPILER
+		List of available compiler suites.  Processed in order
+		for selecting the active compiler for each frontend.
+HAVE_PCC	If defined, PCC is present and enabled.
+HAVE_LLVM	If defined, LLVM/Clang is present and enabled.
+UNSUPPORTED_COMPILER.xxx
+		If defined, the support for compiler xxx is disabled.
+
+For the frontends (CC, CPP, CXX, FC and OBJC) the following variables exist:
+ACTIVE_CC	Active compile suite for the CC frontend.
+SUPPORTED_CC	Compile suite with support for the CC frontend.
+TOOL_CC.xxx	Path to the CC frontend for compiler xxx
+
 =-=-=-=-=   sys.mk   =-=-=-=-=
 
 The include file sys.mk has the default rules for all makes, in the BSD

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.666 src/share/mk/bsd.own.mk:1.667
--- src/share/mk/bsd.own.mk:1.666	Thu May 19 06:09:36 2011
+++ src/share/mk/bsd.own.mk	Thu May 19 14:29:27 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.666 2011/05/19 06:09:36 adam Exp $
+#	$NetBSD: bsd.own.mk,v 1.667 2011/05/19 14:29:27 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -172,11 +172,11 @@
 SIZE=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
 STRIP=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
 
-CC=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
-CPP=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
-CXX=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
-FC=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
-OBJC=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
+TOOL_CC.gcc=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
+TOOL_CPP.gcc=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
+TOOL_CXX.gcc=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
+TOOL_FC.gcc=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
+TOOL_OBJC.gcc=		${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
 .else	# } {
 # Define default locations for common tools.
 .if ${USETOOLS_BINUTILS:Uyes} == yes	#  {
@@ -189,23 +189,24 @@
 RANLIB=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
 SIZE=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
 STRIP=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
-.endif	#  }
 
-.if defined(HAVE_GCC)  ${USETOOLS_GCC:Uyes} == yes			#  {
-CC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
-CPP=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
-CXX=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
-FC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
-OBJC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
+# GCC supports C, C++, Fortran and Objective C
+TOOL_CC.gcc=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
+TOOL_CPP.gcc=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
+TOOL_CXX.gcc=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
+TOOL_FC.gcc=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
+TOOL_OBJC.gcc=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
 .endif	#  }
 
-.if defined(HAVE_PCC)  ${USETOOLS_PCC:Uyes} == yes
-CC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
-CPP=		${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
-CXX=		false
-FC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
-OBJC=		false
-.endif
+# Clang supports C, C++ and Objective C
+TOOL_CC.clang=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
+TOOL_CPP.clang=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
+TOOL_CXX.clang=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
+TOOL_OBJC.clang=	${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
+
+# PCC supports C and Fortran
+TOOL_CC.pcc=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
+TOOL_CPP.pcc=		${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
 
 #
 # Make sure DESTDIR is set, so that builds with these tools always
@@ -318,6 +319,23 @@
 
 .else	# USETOOLS != yes		# } {
 
+# Clang supports C, C++ and Objective C
+TOOL_CC.clang=		clang
+TOOL_CPP.clang=		clang-cpp
+TOOL_CXX.clang=		clang++
+TOOL_OBJC.clang=	

CVS commit: src/usr.sbin/puffs/mount_psshfs

2011-05-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 19 15:07:16 UTC 2011

Modified Files:
src/usr.sbin/puffs/mount_psshfs: psshfs.c

Log Message:
Initialize psshfs root node's readdir waiters queue.

Every other node's readder waiters queue is initialized in makenode,
but the root node is created specially.

ok pooka


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/puffs/mount_psshfs/psshfs.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/puffs/mount_psshfs/psshfs.c
diff -u src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.62 src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.63
--- src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.62	Fri Oct 29 16:13:51 2010
+++ src/usr.sbin/puffs/mount_psshfs/psshfs.c	Thu May 19 15:07:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: psshfs.c,v 1.62 2010/10/29 16:13:51 pooka Exp $	*/
+/*	$NetBSD: psshfs.c,v 1.63 2011/05/19 15:07:16 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2006-2009  Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: psshfs.c,v 1.62 2010/10/29 16:13:51 pooka Exp $);
+__RCSID($NetBSD: psshfs.c,v 1.63 2011/05/19 15:07:16 riastradh Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -257,6 +257,7 @@
 
 	pctx.nextino = 2;
 	memset(root, 0, sizeof(struct psshfs_node));
+	TAILQ_INIT(root-pw);
 	pn_root = puffs_pn_new(pu, root);
 	if (pn_root == NULL)
 		return errno;



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

2011-05-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 19 15:18:29 UTC 2011

Modified Files:
src/sys/arch/sparc/stand/ofwboot: boot.h

Log Message:
Fix a tyop.
The intentions were good...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/boot.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/stand/ofwboot/boot.h
diff -u src/sys/arch/sparc/stand/ofwboot/boot.h:1.7 src/sys/arch/sparc/stand/ofwboot/boot.h:1.8
--- src/sys/arch/sparc/stand/ofwboot/boot.h:1.7	Thu May 19 03:09:47 2011
+++ src/sys/arch/sparc/stand/ofwboot/boot.h	Thu May 19 15:18:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.h,v 1.7 2011/05/19 03:09:47 christos Exp $	*/
+/*	$NetBSD: boot.h,v 1.8 2011/05/19 15:18:29 hauke Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 extern void	loadfile_set_allocator(int);
 
 /* alloc.c */
-extern vois	freeall(void);
+extern void	freeall(void);
 
 /* ofdev.c */
 char *filename(char*, char*);



CVS commit: othersrc/external/bsd/gensetlist

2011-05-19 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Thu May 19 16:48:16 UTC 2011

Modified Files:
othersrc/external/bsd/gensetlist: gensetlist.c

Log Message:
allow for multiple header files in an INCS makefile statement (as found in
libbluetooth, for example).

% pwd
/usr/src/lib/libbluetooth
% make setlist
...
[src/distrib/sets/lists/comp/mi]
./usr/include/bluetooth.h   comp-c-include
./usr/include/sdp.h comp-c-include
./usr/share/man/cat3/bluetooth.0comp-bluetooth-catman   
.cat
...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/gensetlist/gensetlist.c

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

Modified files:

Index: othersrc/external/bsd/gensetlist/gensetlist.c
diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.5 othersrc/external/bsd/gensetlist/gensetlist.c:1.6
--- othersrc/external/bsd/gensetlist/gensetlist.c:1.5	Tue May 17 00:22:44 2011
+++ othersrc/external/bsd/gensetlist/gensetlist.c	Thu May 19 16:48:16 2011
@@ -151,8 +151,7 @@
 REG_EXTENDED);
 		(void) regcomp(mandir, ^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+),
 REG_EXTENDED);
-		(void) regcomp(incs, ^[ \t]*INCS[ \t]*=[ \t]*([^ \t]+),
-REG_EXTENDED);
+		(void) regcomp(incs, ^[ \t]*INCS[ \t]*=, REG_EXTENDED);
 		(void) regcomp(incsdir, ^[ \t]*INCSDIR[ \t]*=[ \t]*([^ \t]+),
 REG_EXTENDED);
 		(void) regcomp(mlinks, ^[ \t]*MLINKS[ \t]*=,
@@ -230,10 +229,14 @@
 		return 1;
 	}
 	if (regexec(incs, in, 10, matches, 0) == 0) {
-		(void) asprintf(vars-incs[vars-incc++], 
-			%.*s,
-			(int)(matches[1].rm_eo - matches[1].rm_so),
-			in[(int)matches[1].rm_so]);
+		for (cp = in[(int)matches[0].rm_eo] ; 
+		 regexec(subman, cp, 10, matches, 0) == 0 ;
+		 cp += matches[0].rm_eo) {
+			(void) asprintf(vars-incs[vars-incc++], 
+%.*s,
+(int)(matches[1].rm_eo - matches[1].rm_so),
+cp[(int)matches[1].rm_so]);
+		}
 		return 1;
 	}
 	if (regexec(incsdir, in, 10, matches, 0) == 0) {



CVS commit: [netbsd-5] src/sys

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:34:14 UTC 2011

Modified Files:
src/sys/dev/pci [netbsd-5]: agp.c agp_via.c
src/sys/sys [netbsd-5]: agpio.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1560):
sys/sys/agpio.h: revision 1.10
sys/dev/pci/agp_via.c: revision 1.21
sys/dev/pci/agp.c: revision 1.77
add AGP v3 support to agp_generic_enable from FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.62.4.1 -r1.62.4.2 src/sys/dev/pci/agp.c
cvs rdiff -u -r1.17.8.1 -r1.17.8.2 src/sys/dev/pci/agp_via.c
cvs rdiff -u -r1.5 -r1.5.86.1 src/sys/sys/agpio.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/pci/agp.c
diff -u src/sys/dev/pci/agp.c:1.62.4.1 src/sys/dev/pci/agp.c:1.62.4.2
--- src/sys/dev/pci/agp.c:1.62.4.1	Tue May  5 18:17:57 2009
+++ src/sys/dev/pci/agp.c	Thu May 19 19:34:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp.c,v 1.62.4.1 2009/05/05 18:17:57 bouyer Exp $	*/
+/*	$NetBSD: agp.c,v 1.62.4.2 2011/05/19 19:34:14 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.62.4.1 2009/05/05 18:17:57 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: agp.c,v 1.62.4.2 2011/05/19 19:34:14 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -102,6 +102,10 @@
 static int agp_deallocate_user(struct agp_softc *, int);
 static int agp_bind_user(struct agp_softc *, agp_bind *);
 static int agp_unbind_user(struct agp_softc *, agp_unbind *);
+static int agp_generic_enable_v2(struct agp_softc *, struct pci_attach_args *,
+ int, u_int32_t);
+static int agp_generic_enable_v3(struct agp_softc *, struct pci_attach_args *,
+ int, u_int32_t);
 static int agpdev_match(struct pci_attach_args *);
 static bool agp_resume(device_t PMF_FN_PROTO);
 
@@ -442,8 +446,7 @@
 {
 	struct pci_attach_args pa;
 	pcireg_t tstatus, mstatus;
-	pcireg_t command;
-	int rq, sba, fw, rate, capoff;
+	int capoff;
 
 	if (pci_find_device(pa, agpdev_match) == 0 ||
 	pci_get_capability(pa.pa_pc, pa.pa_tag, PCI_CAP_AGP,
@@ -457,6 +460,27 @@
 	mstatus = pci_conf_read(pa.pa_pc, pa.pa_tag,
 	capoff + AGP_STATUS);
 
+	if (AGP_MODE_GET_MODE_3(mode) 
+	AGP_MODE_GET_MODE_3(tstatus) 
+	AGP_MODE_GET_MODE_3(mstatus))
+		return agp_generic_enable_v3(sc, pa, capoff, mode);
+	else
+		return agp_generic_enable_v2(sc, pa, capoff, mode);
+}
+
+static int
+agp_generic_enable_v2(struct agp_softc *sc, struct pci_attach_args *pa,
+int capoff, u_int32_t mode)
+{
+	pcireg_t tstatus, mstatus;
+	pcireg_t command;
+	int rq, sba, fw, rate;
+
+	tstatus = pci_conf_read(sc-as_pc, sc-as_tag,
+	sc-as_capoff + AGP_STATUS);
+	mstatus = pci_conf_read(pa-pa_pc, pa-pa_tag,
+	capoff + AGP_STATUS);
+
 	/* Set RQ to the min of mode, tstatus and mstatus */
 	rq = AGP_MODE_GET_RQ(mode);
 	if (AGP_MODE_GET_RQ(tstatus)  rq)
@@ -478,22 +502,89 @@
 	rate = (AGP_MODE_GET_RATE(tstatus)
 		 AGP_MODE_GET_RATE(mstatus)
 		 AGP_MODE_GET_RATE(mode));
-	if (rate  AGP_MODE_RATE_4x)
-		rate = AGP_MODE_RATE_4x;
-	else if (rate  AGP_MODE_RATE_2x)
-		rate = AGP_MODE_RATE_2x;
+	if (rate  AGP_MODE_V2_RATE_4x)
+		rate = AGP_MODE_V2_RATE_4x;
+	else if (rate  AGP_MODE_V2_RATE_2x)
+		rate = AGP_MODE_V2_RATE_2x;
+	else
+		rate = AGP_MODE_V2_RATE_1x;
+
+	/* Construct the new mode word and tell the hardware */
+	command = AGP_MODE_SET_RQ(0, rq);
+	command = AGP_MODE_SET_SBA(command, sba);
+	command = AGP_MODE_SET_FW(command, fw);
+	command = AGP_MODE_SET_RATE(command, rate);
+	command = AGP_MODE_SET_AGP(command, 1);
+	pci_conf_write(sc-as_pc, sc-as_tag,
+	sc-as_capoff + AGP_COMMAND, command);
+	pci_conf_write(pa-pa_pc, pa-pa_tag, capoff + AGP_COMMAND, command);
+
+	return 0;
+}
+
+static int
+agp_generic_enable_v3(struct agp_softc *sc, struct pci_attach_args *pa,
+int capoff, u_int32_t mode)
+{
+	pcireg_t tstatus, mstatus;
+	pcireg_t command;
+	int rq, sba, fw, rate, arqsz, cal;
+
+	tstatus = pci_conf_read(sc-as_pc, sc-as_tag,
+	sc-as_capoff + AGP_STATUS);
+	mstatus = pci_conf_read(pa-pa_pc, pa-pa_tag,
+	capoff + AGP_STATUS);
+
+	/* Set RQ to the min of mode, tstatus and mstatus */
+	rq = AGP_MODE_GET_RQ(mode);
+	if (AGP_MODE_GET_RQ(tstatus)  rq)
+		rq = AGP_MODE_GET_RQ(tstatus);
+	if (AGP_MODE_GET_RQ(mstatus)  rq)
+		rq = AGP_MODE_GET_RQ(mstatus);
+
+	/*
+	 * ARQSZ - Set the value to the maximum one.
+	 * Don't allow the mode register to override values.
+	 */
+	arqsz = AGP_MODE_GET_ARQSZ(mode);
+	if (AGP_MODE_GET_ARQSZ(tstatus)  arqsz)
+		arqsz = AGP_MODE_GET_ARQSZ(tstatus);
+	if (AGP_MODE_GET_ARQSZ(mstatus)  arqsz)
+		arqsz = AGP_MODE_GET_ARQSZ(mstatus);
+
+	/* Calibration cycle - don't allow override by mode register */
+	cal = AGP_MODE_GET_CAL(tstatus);
+	if (AGP_MODE_GET_CAL(mstatus)  cal)
+		cal = AGP_MODE_GET_CAL(mstatus);
+
+	/* SBA must be supported for AGP v3. */
+	

CVS commit: [netbsd-5-0] src/lib/libc/db

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:45:54 UTC 2011

Modified Files:
src/lib/libc/db/btree [netbsd-5-0]: bt_open.c
src/lib/libc/db/hash [netbsd-5-0]: hash_page.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1602):
lib/libc/db/hash/hash_page.c: revision 1.24
lib/libc/db/btree/bt_open.c: revision 1.25
Correct check for snprintf() overflow via Maksymilian Arciemowicz from FreeBSD.
(the bt one was ok, but set errno and make it the same for consistency).
[to be pulled up]


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.10.1 src/lib/libc/db/btree/bt_open.c
cvs rdiff -u -r1.23 -r1.23.10.1 src/lib/libc/db/hash/hash_page.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/db/btree/bt_open.c
diff -u src/lib/libc/db/btree/bt_open.c:1.24 src/lib/libc/db/btree/bt_open.c:1.24.10.1
--- src/lib/libc/db/btree/bt_open.c:1.24	Thu Sep 11 12:58:00 2008
+++ src/lib/libc/db/btree/bt_open.c	Thu May 19 19:45:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_open.c,v 1.24 2008/09/11 12:58:00 joerg Exp $	*/
+/*	$NetBSD: bt_open.c,v 1.24.10.1 2011/05/19 19:45:54 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: bt_open.c,v 1.24 2008/09/11 12:58:00 joerg Exp $);
+__RCSID($NetBSD: bt_open.c,v 1.24.10.1 2011/05/19 19:45:54 bouyer Exp $);
 
 /*
  * Implementation of btree access method for 4.4BSD.
@@ -391,7 +391,7 @@
 tmp(void)
 {
 	sigset_t set, oset;
-	size_t len;
+	int len;
 	int fd;
 	char *envtmp;
 	char path[PATH_MAX];
@@ -403,8 +403,10 @@
 
 	len = snprintf(path,
 	sizeof(path), %s/bt.XX, envtmp ? envtmp : _PATH_TMP);
-	if (len = sizeof(path))
+	if (len  0 || (size_t)len = sizeof(path)) {
+		errno = ENAMETOOLONG;
 		return -1;
+	}
 	
 	(void)sigfillset(set);
 	(void)sigprocmask(SIG_BLOCK, set, oset);

Index: src/lib/libc/db/hash/hash_page.c
diff -u src/lib/libc/db/hash/hash_page.c:1.23 src/lib/libc/db/hash/hash_page.c:1.23.10.1
--- src/lib/libc/db/hash/hash_page.c:1.23	Thu Sep 11 12:58:00 2008
+++ src/lib/libc/db/hash/hash_page.c	Thu May 19 19:45:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_page.c,v 1.23 2008/09/11 12:58:00 joerg Exp $	*/
+/*	$NetBSD: hash_page.c,v 1.23.10.1 2011/05/19 19:45:54 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hash_page.c,v 1.23 2008/09/11 12:58:00 joerg Exp $);
+__RCSID($NetBSD: hash_page.c,v 1.23.10.1 2011/05/19 19:45:54 bouyer Exp $);
 
 /*
  * PACKAGE:  hashing
@@ -869,15 +869,19 @@
 	sigset_t set, oset;
 	char *envtmp;
 	char namestr[PATH_MAX];
+	int len;
 
 	if (issetugid())
 		envtmp = NULL;
 	else
 		envtmp = getenv(TMPDIR);
 
-	if (-1 == snprintf(namestr, sizeof(namestr), %s/_hashXX,
-	envtmp ? envtmp : _PATH_TMP))
+	len = snprintf(namestr, sizeof(namestr), %s/_hashXX,
+	envtmp ? envtmp : _PATH_TMP);
+	if (len  0 || (size_t)len = sizeof(namestr)) {
+		errno = ENAMETOOLONG;
 		return -1;
+	}
 
 	/* Block signals; make sure file goes away at process exit. */
 	(void)sigfillset(set);



CVS commit: [netbsd-5-1] src/lib/libc/db

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:46:10 UTC 2011

Modified Files:
src/lib/libc/db/btree [netbsd-5-1]: bt_open.c
src/lib/libc/db/hash [netbsd-5-1]: hash_page.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1602):
lib/libc/db/hash/hash_page.c: revision 1.24
lib/libc/db/btree/bt_open.c: revision 1.25
Correct check for snprintf() overflow via Maksymilian Arciemowicz from FreeBSD.
(the bt one was ok, but set errno and make it the same for consistency).
[to be pulled up]


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.14.1 src/lib/libc/db/btree/bt_open.c
cvs rdiff -u -r1.23 -r1.23.14.1 src/lib/libc/db/hash/hash_page.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/db/btree/bt_open.c
diff -u src/lib/libc/db/btree/bt_open.c:1.24 src/lib/libc/db/btree/bt_open.c:1.24.14.1
--- src/lib/libc/db/btree/bt_open.c:1.24	Thu Sep 11 12:58:00 2008
+++ src/lib/libc/db/btree/bt_open.c	Thu May 19 19:46:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_open.c,v 1.24 2008/09/11 12:58:00 joerg Exp $	*/
+/*	$NetBSD: bt_open.c,v 1.24.14.1 2011/05/19 19:46:10 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: bt_open.c,v 1.24 2008/09/11 12:58:00 joerg Exp $);
+__RCSID($NetBSD: bt_open.c,v 1.24.14.1 2011/05/19 19:46:10 bouyer Exp $);
 
 /*
  * Implementation of btree access method for 4.4BSD.
@@ -391,7 +391,7 @@
 tmp(void)
 {
 	sigset_t set, oset;
-	size_t len;
+	int len;
 	int fd;
 	char *envtmp;
 	char path[PATH_MAX];
@@ -403,8 +403,10 @@
 
 	len = snprintf(path,
 	sizeof(path), %s/bt.XX, envtmp ? envtmp : _PATH_TMP);
-	if (len = sizeof(path))
+	if (len  0 || (size_t)len = sizeof(path)) {
+		errno = ENAMETOOLONG;
 		return -1;
+	}
 	
 	(void)sigfillset(set);
 	(void)sigprocmask(SIG_BLOCK, set, oset);

Index: src/lib/libc/db/hash/hash_page.c
diff -u src/lib/libc/db/hash/hash_page.c:1.23 src/lib/libc/db/hash/hash_page.c:1.23.14.1
--- src/lib/libc/db/hash/hash_page.c:1.23	Thu Sep 11 12:58:00 2008
+++ src/lib/libc/db/hash/hash_page.c	Thu May 19 19:46:10 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hash_page.c,v 1.23 2008/09/11 12:58:00 joerg Exp $	*/
+/*	$NetBSD: hash_page.c,v 1.23.14.1 2011/05/19 19:46:10 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: hash_page.c,v 1.23 2008/09/11 12:58:00 joerg Exp $);
+__RCSID($NetBSD: hash_page.c,v 1.23.14.1 2011/05/19 19:46:10 bouyer Exp $);
 
 /*
  * PACKAGE:  hashing
@@ -869,15 +869,19 @@
 	sigset_t set, oset;
 	char *envtmp;
 	char namestr[PATH_MAX];
+	int len;
 
 	if (issetugid())
 		envtmp = NULL;
 	else
 		envtmp = getenv(TMPDIR);
 
-	if (-1 == snprintf(namestr, sizeof(namestr), %s/_hashXX,
-	envtmp ? envtmp : _PATH_TMP))
+	len = snprintf(namestr, sizeof(namestr), %s/_hashXX,
+	envtmp ? envtmp : _PATH_TMP);
+	if (len  0 || (size_t)len = sizeof(namestr)) {
+		errno = ENAMETOOLONG;
 		return -1;
+	}
 
 	/* Block signals; make sure file goes away at process exit. */
 	(void)sigfillset(set);



CVS commit: [netbsd-5] src/external/bsd/dhcpcd/dist

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:50:54 UTC 2011

Modified Files:
src/external/bsd/dhcpcd/dist [netbsd-5]: dhcp.c dhcpcd-run-hooks.8.in
dhcpcd-run-hooks.in
src/external/bsd/dhcpcd/dist/dhcpcd-hooks [netbsd-5]: 20-resolv.conf
30-hostname

Log Message:
Pull up following revision(s) (requested by spz in ticket #1603):
external/bsd/dhcpcd/dist/dhcp.c patch
external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in  patch
external/bsd/dhcpcd/dist/dhcpcd-run-hooks.inpatch
external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.confpatch
external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname   patch
Escape | and  characters before passing the value to the shell
Ensure we set a valid hostname, DNS domain and NIS domain.
Document the need for input validation in dhcpcd-run-hooks(8).
Fixes CVE-2011-996


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2.6.4 -r1.1.1.2.6.5 src/external/bsd/dhcpcd/dist/dhcp.c
cvs rdiff -u -r1.1.1.2.6.3 -r1.1.1.2.6.4 \
src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in \
src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
cvs rdiff -u -r1.1.1.2.6.2 -r1.1.1.2.6.3 \
src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf \
src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.4 src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.5
--- src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.4	Mon Nov 23 03:13:28 2009
+++ src/external/bsd/dhcpcd/dist/dhcp.c	Thu May 19 19:50:54 2011
@@ -1138,6 +1138,8 @@
 		case '$':  /* FALLTHROUGH */
 		case '`':  /* FALLTHROUGH */
 		case '\\': /* FALLTHROUGH */
+		case '|':  /* FALLTHROUGH */
+		case '':
 			if (s) {
 if (len  3) {
 	errno = ENOBUFS;

Index: src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.3 src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.4
--- src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.3	Mon Nov 23 03:13:28 2009
+++ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in	Thu May 19 19:50:54 2011
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2006-2009 Roy Marples
+.\ Copyright (c) 2006-2011 Roy Marples
 .\ All rights reserved
 .\
 .\ Redistribution and use in source and binary forms, with or without
@@ -22,7 +22,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd March 23, 2009
+.Dd March 23, 2011
 .Dt DHCPCD-RUN-HOOKS 8 SMM
 .Os
 .Sh NAME
@@ -131,3 +131,11 @@
 .An Roy Marples Aq r...@marples.name
 .Sh BUGS
 Please report them to http://roy.marples.name/projects/dhcpcd
+.Sh SECURITY CONSIDERATIONS 
+Little validation of DHCP options is done in dhcpcd itself. 
+Instead, it is up to the hooks to handle any validation needed. 
+To this end, some helper functions are provided, such as valid_domainname as 
+used by the 
+.Pa 20-resolv.conf 
+hook to ensure that the hostname is not set to an invalid value. 
+valid_path is also provided, but is currently unused by a stock hook script. 
Index: src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.3 src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.4
--- src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.3	Mon Nov 23 03:13:28 2009
+++ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in	Thu May 19 19:50:54 2011
@@ -138,6 +138,46 @@
 	fi
 }
 
+# Check for a valid domain name as per RFC1123 with the exception of 
+# allowing - and _ as they seem to be widely used. 
+valid_domainname() 
+{ 
+local name=$1 label 
+ 
+[ -z $name -o ${#name} -gt 255 ]  return 1 
+ 
+while [ -n $name ]; do 
+label=${name%%.*} 
+[ -z $label -o ${#label} -gt 63 ]  return 1 
+case $label in 
+-*|_*|*-|*_)return 1;; 
+*[![:alnum:]-_]*)   return 1;; 
+esac 
+[ $name = ${name#*.} ]  break 
+name=${name#*.} 
+done 
+return 0 
+} 
+ 
+valid_domainname_list() 
+{ 
+local name 
+ 
+for name in $@; do 
+valid_domainname $name || return $? 
+done 
+return 0 
+} 
+ 
+# Check for a valid path 
+valid_path() 
+{ 
+case $@ in 
+*[![:alnum:]#%+-_:\.,@~\\/\[\]=\ ]*) return 1;; 
+esac 
+return 0 
+} 
+
 
 # We source each script into this one so that scripts run earlier can
 # remove variables from the environment so later scripts don't see them.

Index: src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
diff -u 

CVS commit: [netbsd-5-1] src/external/bsd/dhcpcd/dist

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:51:01 UTC 2011

Modified Files:
src/external/bsd/dhcpcd/dist [netbsd-5-1]: dhcp.c dhcpcd-run-hooks.8.in
dhcpcd-run-hooks.in
src/external/bsd/dhcpcd/dist/dhcpcd-hooks [netbsd-5-1]: 20-resolv.conf
30-hostname

Log Message:
Pull up following revision(s) (requested by spz in ticket #1603):
external/bsd/dhcpcd/dist/dhcp.c patch
external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in  patch
external/bsd/dhcpcd/dist/dhcpcd-run-hooks.inpatch
external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.confpatch
external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname   patch
Escape | and  characters before passing the value to the shell
Ensure we set a valid hostname, DNS domain and NIS domain.
Document the need for input validation in dhcpcd-run-hooks(8).
Fixes CVE-2011-996


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2.6.4 -r1.1.1.2.6.4.2.1 \
src/external/bsd/dhcpcd/dist/dhcp.c
cvs rdiff -u -r1.1.1.2.6.3 -r1.1.1.2.6.3.2.1 \
src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in \
src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
cvs rdiff -u -r1.1.1.2.6.2 -r1.1.1.2.6.2.2.1 \
src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf \
src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.4 src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.4.2.1
--- src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.4	Mon Nov 23 03:13:28 2009
+++ src/external/bsd/dhcpcd/dist/dhcp.c	Thu May 19 19:51:00 2011
@@ -1138,6 +1138,8 @@
 		case '$':  /* FALLTHROUGH */
 		case '`':  /* FALLTHROUGH */
 		case '\\': /* FALLTHROUGH */
+		case '|':  /* FALLTHROUGH */
+		case '':
 			if (s) {
 if (len  3) {
 	errno = ENOBUFS;

Index: src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.3 src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.3.2.1
--- src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.3	Mon Nov 23 03:13:28 2009
+++ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in	Thu May 19 19:51:00 2011
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2006-2009 Roy Marples
+.\ Copyright (c) 2006-2011 Roy Marples
 .\ All rights reserved
 .\
 .\ Redistribution and use in source and binary forms, with or without
@@ -22,7 +22,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd March 23, 2009
+.Dd March 23, 2011
 .Dt DHCPCD-RUN-HOOKS 8 SMM
 .Os
 .Sh NAME
@@ -131,3 +131,11 @@
 .An Roy Marples Aq r...@marples.name
 .Sh BUGS
 Please report them to http://roy.marples.name/projects/dhcpcd
+.Sh SECURITY CONSIDERATIONS 
+Little validation of DHCP options is done in dhcpcd itself. 
+Instead, it is up to the hooks to handle any validation needed. 
+To this end, some helper functions are provided, such as valid_domainname as 
+used by the 
+.Pa 20-resolv.conf 
+hook to ensure that the hostname is not set to an invalid value. 
+valid_path is also provided, but is currently unused by a stock hook script. 
Index: src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.3 src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.3.2.1
--- src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.3	Mon Nov 23 03:13:28 2009
+++ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in	Thu May 19 19:51:00 2011
@@ -138,6 +138,46 @@
 	fi
 }
 
+# Check for a valid domain name as per RFC1123 with the exception of 
+# allowing - and _ as they seem to be widely used. 
+valid_domainname() 
+{ 
+local name=$1 label 
+ 
+[ -z $name -o ${#name} -gt 255 ]  return 1 
+ 
+while [ -n $name ]; do 
+label=${name%%.*} 
+[ -z $label -o ${#label} -gt 63 ]  return 1 
+case $label in 
+-*|_*|*-|*_)return 1;; 
+*[![:alnum:]-_]*)   return 1;; 
+esac 
+[ $name = ${name#*.} ]  break 
+name=${name#*.} 
+done 
+return 0 
+} 
+ 
+valid_domainname_list() 
+{ 
+local name 
+ 
+for name in $@; do 
+valid_domainname $name || return $? 
+done 
+return 0 
+} 
+ 
+# Check for a valid path 
+valid_path() 
+{ 
+case $@ in 
+*[![:alnum:]#%+-_:\.,@~\\/\[\]=\ ]*) return 1;; 
+esac 
+return 0 
+} 
+
 
 # We source each script into this one so that scripts run earlier can
 # remove variables from the environment so later scripts don't see them.

Index: src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
diff -u 

CVS commit: [netbsd-5-0] src/doc

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:52:44 UTC 2011

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
ticket 1602


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-5.0.3

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

Modified files:

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.39 src/doc/CHANGES-5.0.3:1.1.2.40
--- src/doc/CHANGES-5.0.3:1.1.2.39	Sun Apr 24 15:41:55 2011
+++ src/doc/CHANGES-5.0.3	Thu May 19 19:52:44 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.39 2011/04/24 15:41:55 riz Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.40 2011/05/19 19:52:44 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2728,3 +2728,11 @@
 	Prevent resource DoS from brace expansion.
 	[spz, ticket #1597]
 
+lib/libc/db/btree/bt_open.c			1.25
+lib/libc/db/hash/hash_page.c			1.24
+
+	Correct check for snprintf() overflow via Maksymilian Arciemowicz
+	from FreeBSD.
+	(the bt one was ok, but set errno and make it the same for consistency).
+	[christos, ticket #1602]
+



CVS commit: [netbsd-5] src/doc

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:52:52 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
tickets 1560, 1579, 1591, 1592, 1602, 1603


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.76 -r1.1.2.77 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.76 src/doc/CHANGES-5.2:1.1.2.77
--- src/doc/CHANGES-5.2:1.1.2.76	Sun Apr 24 16:31:01 2011
+++ src/doc/CHANGES-5.2	Thu May 19 19:52:51 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.76 2011/04/24 16:31:01 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.77 2011/05/19 19:52:51 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5030,3 +5030,69 @@
 	drivers do.  PR#40018.
 	[buhrow, ticket #1601]
 
+sys/dev/pci/agp.c1.77
+sys/dev/pci/agp_via.c1.21
+sys/sys/agpio.h	1.10
+
+	add AGP v3 support to agp_generic_enable from FreeBSD
+	[jmcneill, ticket #1560]
+
+lib/libc/locale/mbstowcs.3			1.12 via patch
+lib/libc/locale/wcstombs.3			1.13 via patch
+
+	Crosslink wcstombs(3) and mbstowcs(3).
+	[mbalmer, ticket #1579]
+
+xsrc/local/programs/x11-ssh-askpass/ChangeLog			1.2
+xsrc/local/programs/x11-ssh-askpass/Imakefile			1.8
+xsrc/local/programs/x11-ssh-askpass/README			1.2
+xsrc/local/programs/x11-ssh-askpass/SshAskpass-1337.ad		1.3
+xsrc/local/programs/x11-ssh-askpass/SshAskpass-NeXTish.ad	1.3
+xsrc/local/programs/x11-ssh-askpass/SshAskpass-default.ad	1.3
+xsrc/local/programs/x11-ssh-askpass/SshAskpass-green.ad		1.3
+xsrc/local/programs/x11-ssh-askpass/SshAskpass-motif.ad 	1.3
+xsrc/local/programs/x11-ssh-askpass/TODO			1.1
+xsrc/local/programs/x11-ssh-askpass/drawing.c			1.2
+xsrc/local/programs/x11-ssh-askpass/drawing.h			1.2
+xsrc/local/programs/x11-ssh-askpass/dynlist.c			1.2
+xsrc/local/programs/x11-ssh-askpass/dynlist.h			1.2
+xsrc/local/programs/x11-ssh-askpass/resources.c			1.2
+xsrc/local/programs/x11-ssh-askpass/resources.h			1.2
+xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.c		1.3
+xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.h		1.2
+xsrc/local/programs/x11-ssh-askpass/x11-ssh-askpass.man.in	1.1
+
+	Update ssh-askpass to version 1.2.0.  This adds, among other changes,
+	teh ability to display multiples lines as the message, sth openssh
+	assumes and a man page.
+	[mbalmer, ticket #1591]
+
+distrib/sets/lists/xbase/mi			1.108
+external/mit/xorg/bin/ssh-askpass/Makefile	1.3
+x11/bin/ssh-askpass/Makefile			1.7
+
+	Build the updates ssh-askpass program and add the man page to the
+	xbase set.
+	[mbalmer, ticket #1592]
+
+lib/libc/db/btree/bt_open.c			1.25
+lib/libc/db/hash/hash_page.c			1.24
+
+	Correct check for snprintf() overflow via Maksymilian Arciemowicz
+	from FreeBSD.
+	(the bt one was ok, but set errno and make it the same for consistency).
+	[christos, ticket #1602]
+
+external/bsd/dhcpcd/dist/dhcp.cpatch
+external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in		patch
+external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in		patch
+external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf	patch
+external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname	patch
+
+
+	Escape | and  characters before passing the value to the shell
+	Ensure we set a valid hostname, DNS domain and NIS domain.
+	Document the need for input validation in dhcpcd-run-hooks(8).
+	Fixes CVE-2011-996
+	[spz, ticket #1603]
+



CVS commit: [netbsd-5-1] src/doc

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 19:53:03 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
tickets 1602, 1603


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-5.1.1

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

Modified files:

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.24 src/doc/CHANGES-5.1.1:1.1.2.25
--- src/doc/CHANGES-5.1.1:1.1.2.24	Sun Apr 24 15:42:22 2011
+++ src/doc/CHANGES-5.1.1	Thu May 19 19:53:03 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.24 2011/04/24 15:42:22 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.25 2011/05/19 19:53:03 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2401,3 +2401,24 @@
 	Prevent resource DoS from brace expansion.
 	[spz, ticket #1597]
 
+lib/libc/db/btree/bt_open.c			1.25
+lib/libc/db/hash/hash_page.c			1.24
+
+	Correct check for snprintf() overflow via Maksymilian Arciemowicz
+	from FreeBSD.
+	(the bt one was ok, but set errno and make it the same for consistency).
+	[christos, ticket #1602]
+
+external/bsd/dhcpcd/dist/dhcp.cpatch
+external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in		patch
+external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in		patch
+external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf	patch
+external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname	patch
+
+
+	Escape | and  characters before passing the value to the shell
+	Ensure we set a valid hostname, DNS domain and NIS domain.
+	Document the need for input validation in dhcpcd-run-hooks(8).
+	Fixes CVE-2011-996
+	[spz, ticket #1603]
+



CVS commit: src/sys/dev

2011-05-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 19 20:34:13 UTC 2011

Modified Files:
src/sys/dev: cgd.c

Log Message:
Reject unaligned writes to cgd.

Fixes the following PRs:

PR kern/44515 (cgd dies on non-aligned writes to the raw device)
PR kern/44964 (cgd seems to panic on unaligned writes instead of giving EINVAL)

ok christos


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/cgd.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/cgd.c
diff -u src/sys/dev/cgd.c:1.71 src/sys/dev/cgd.c:1.72
--- src/sys/dev/cgd.c:1.71	Fri Nov 19 06:44:39 2010
+++ src/sys/dev/cgd.c	Thu May 19 20:34:13 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.71 2010/11/19 06:44:39 dholland Exp $ */
+/* $NetBSD: cgd.c,v 1.72 2011/05/19 20:34:13 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.71 2010/11/19 06:44:39 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgd.c,v 1.72 2011/05/19 20:34:13 riastradh Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -293,6 +293,21 @@
 
 	DPRINTF_FOLLOW((cgdstrategy(%p): b_bcount = %ld\n, bp,
 	(long)bp-b_bcount));
+
+	/*
+	 * Reject unaligned writes.  We can encrypt and decrypt only
+	 * complete disk sectors, and we let the ciphers require their
+	 * buffers to be aligned to 32-bit boundaries.
+	 */
+	if (bp-b_blkno  0 ||
+	(bp-b_bcount % DEV_BSIZE) != 0 ||
+	((uintptr_t)bp-b_data  3) != 0) {
+		bp-b_error = EINVAL;
+		bp-b_resid = bp-b_bcount;
+		biodone(bp);
+		return;
+	}
+
 	/* XXXrcd: Should we test for (cs != NULL)? */
 	dk_strategy(di, cs-sc_dksc, bp);
 	return;



CVS commit: src/tests/dev/cgd

2011-05-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 19 20:37:50 UTC 2011

Modified Files:
src/tests/dev/cgd: t_cgd.sh

Log Message:
Expand tests for unaligned writes to cgd.  No more xfail.

PR kern/44515
PR kern/44965


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/dev/cgd/t_cgd.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/dev/cgd/t_cgd.sh
diff -u src/tests/dev/cgd/t_cgd.sh:1.9 src/tests/dev/cgd/t_cgd.sh:1.10
--- src/tests/dev/cgd/t_cgd.sh:1.9	Sat May 14 17:42:28 2011
+++ src/tests/dev/cgd/t_cgd.sh	Thu May 19 20:37:50 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: t_cgd.sh,v 1.9 2011/05/14 17:42:28 jmmv Exp $
+#	$NetBSD: t_cgd.sh,v 1.10 2011/05/19 20:37:50 riastradh Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -98,14 +98,14 @@
 }
 
 
-atf_test_case non512 cleanup
-non512_head()
+atf_test_case unaligned_write cleanup
+unaligned_write_head()
 {
 
-	atf_set descr Write a non-512 block to a raw cgd device
+	atf_set descr Attempt unaligned writes to a raw cgd device
 }
 
-non512_body()
+unaligned_write_body()
 {
 	d=$(atf_get_srcdir)
 	atf_check -s exit:0 \
@@ -115,12 +115,34 @@
 	atf_check -s exit:0 -x echo 12345 | \
 	rump.cgdconfig -p cgd0 /dev/dk ${d}/paramsfile
 
-	atf_expect_fail PR kern/44515
-	atf_check -s exit:0 -e ignore -x \
+	# Check that cgd rejects writes of totally bogus lengths.
+	atf_check -s not-exit:0 -e ignore -x \
 	echo die hard | rump.dd of=${rawcgd} bs=123 conv=sync
+
+	# Check that cgd rejects non-sector-length writes even if they
+	# are integral multiples of the block size.
+	atf_check -s not-exit:0 -e ignore -x \
+	echo die hard | rump.dd of=${rawcgd} bs=64 conv=sync
+	atf_check -s not-exit:0 -e ignore -x \
+	echo die hard | rump.dd of=${rawcgd} bs=256 conv=sync
+
+	# Check that cgd rejects misaligned buffers, produced by
+	# packetizing the input on bogus boundaries and using the
+	# bizarre behaviour of `bs=N' in dd.
+	atf_check -s not-exit:0 -e ignore -x \
+	(echo -n x  sleep 1  head -c 511 /dev/zero) \
+		| rump.dd of=${rawcgd} bs=512
+
+	# Check that cgd rejects sector-length writes if they are not
+	# on sector boundaries.  Doesn't work because dd can't be
+	# persuaded to seek a non-integral multiple of the output
+	# buffer size and I can't be arsed to find the another way to
+	# do that.
+	#atf_check -s not-exit:0 -e ignore -x \
+	#echo die hard | rump.dd of=${rawcgd} seek=1 bs=512 conv=sync
 }
 
-non512_cleanup()
+unaligned_write_cleanup()
 {
 	env RUMP_SERVER=unix://csock rump.halt || true
 }
@@ -130,5 +152,5 @@
 
 	atf_add_test_case basic
 	atf_add_test_case wrongpass
-	atf_add_test_case non512
+	atf_add_test_case unaligned_write
 }



CVS commit: [netbsd-5] src/sys/fs/puffs

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:00:16 UTC 2011

Modified Files:
src/sys/fs/puffs [netbsd-5]: puffs_msgif.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #1604):
sys/fs/puffs/puffs_msgif.c: revision 1.84 via patch
Apply patch from PR kern/44093 by yamt:
Interrupt server wait only on certain signals (same set at nfs -i)
instead of all signals.  According to the PR this helps with
git clone run on a puffs file system.


To generate a diff of this commit:
cvs rdiff -u -r1.72.4.1 -r1.72.4.2 src/sys/fs/puffs/puffs_msgif.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/puffs/puffs_msgif.c
diff -u src/sys/fs/puffs/puffs_msgif.c:1.72.4.1 src/sys/fs/puffs/puffs_msgif.c:1.72.4.2
--- src/sys/fs/puffs/puffs_msgif.c:1.72.4.1	Sat Jan  9 01:22:57 2010
+++ src/sys/fs/puffs/puffs_msgif.c	Thu May 19 21:00:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.c,v 1.72.4.1 2010/01/09 01:22:57 snj Exp $	*/
+/*	$NetBSD: puffs_msgif.c,v 1.72.4.2 2011/05/19 21:00:16 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.72.4.1 2010/01/09 01:22:57 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.72.4.2 2011/05/19 21:00:16 bouyer Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -352,17 +352,30 @@
 	if (__predict_false((park-park_flags  PARKFLAG_WANTREPLY)
 	(park-park_flags  PARKFLAG_CALL) == 0
 	(l-l_flag  LW_PENDSIG) != 0  sigispending(l, 0))) {
-		park-park_flags |= PARKFLAG_HASERROR;
-		preq-preq_rv = EINTR;
-		if (PUFFSOP_OPCLASS(preq-preq_opclass) == PUFFSOP_VN
-		 (preq-preq_optype == PUFFS_VN_INACTIVE
-		 || preq-preq_optype == PUFFS_VN_RECLAIM)) {
-			park-park_preq-preq_opclass |= PUFFSOPFLAG_FAF;
-			park-park_flags = ~PARKFLAG_WANTREPLY;
-			DPRINTF((puffs_msg_enqueue: converted to FAF %p\n,
-			park));
-		} else {
-			return;
+	   sigset_t ss;
+
+	   /*
+		* see the comment about signals in puffs_msg_wait.
+		*/
+	   sigpending1(l, ss);
+	   if (sigismember(ss, SIGINT) ||
+		   sigismember(ss, SIGTERM) ||
+		   sigismember(ss, SIGKILL) ||
+		   sigismember(ss, SIGHUP) ||
+		   sigismember(ss, SIGQUIT)) {
+		   park-park_flags |= PARKFLAG_HASERROR;
+		   preq-preq_rv = EINTR;
+		   if (PUFFSOP_OPCLASS(preq-preq_opclass) == PUFFSOP_VN
+			(preq-preq_optype == PUFFS_VN_INACTIVE
+			|| preq-preq_optype == PUFFS_VN_RECLAIM)) {
+			   park-park_preq-preq_opclass |=
+   PUFFSOPFLAG_FAF;
+			   park-park_flags = ~PARKFLAG_WANTREPLY;
+			   DPRINTF((puffs_msg_enqueue: 
+   converted to FAF %p\n, park));
+		   } else {
+			   return;
+		   }
 		}
 	}
 
@@ -431,11 +444,31 @@
 int
 puffs_msg_wait(struct puffs_mount *pmp, struct puffs_msgpark *park)
 {
-	struct puffs_req *preq = park-park_preq; /* XXX: hmmm */
+	lwp_t *l = curlwp;
+	proc_t *p = l-l_proc;
+struct puffs_req *preq = park-park_preq; /* XXX: hmmm */
+	sigset_t ss;
+	sigset_t oss;
 	struct mount *mp = PMPTOMP(pmp);
 	int error = 0;
 	int rv;
 
+	/*
+	 * block unimportant signals.
+	 *
+	 * The set of important signals here was chosen to be same as
+	 * nfs interruptible mount.
+	 */
+	sigfillset(ss);
+	sigdelset(ss, SIGINT);
+	sigdelset(ss, SIGTERM);
+	sigdelset(ss, SIGKILL);
+	sigdelset(ss, SIGHUP);
+	sigdelset(ss, SIGQUIT);
+	mutex_enter(p-p_lock);
+	sigprocmask1(l, SIG_BLOCK, ss, oss);
+	mutex_exit(p-p_lock);
+
 	mutex_enter(pmp-pmp_lock);
 	puffs_mp_reference(pmp);
 	mutex_exit(pmp-pmp_lock);
@@ -523,6 +556,10 @@
 	puffs_mp_release(pmp);
 	mutex_exit(pmp-pmp_lock);
 
+	mutex_enter(p-p_lock);
+	sigprocmask1(l, SIG_SETMASK, oss, NULL);
+	mutex_exit(p-p_lock);
+
 	return rv;
 }
 



CVS commit: src/external/bsd/llvm

2011-05-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu May 19 21:06:02 UTC 2011

Modified Files:
src/external/bsd/llvm: Makefile.inc
src/external/bsd/llvm/lib/libLLVMCore: Makefile

Log Message:
Update LLVM/clang snapshot for support of -Wa,--fatal-warnings in the
integrated assembler


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/llvm/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/lib/libLLVMCore/Makefile

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

Modified files:

Index: src/external/bsd/llvm/Makefile.inc
diff -u src/external/bsd/llvm/Makefile.inc:1.7 src/external/bsd/llvm/Makefile.inc:1.8
--- src/external/bsd/llvm/Makefile.inc:1.7	Mon May 16 19:27:48 2011
+++ src/external/bsd/llvm/Makefile.inc	Thu May 19 21:06:01 2011
@@ -1,12 +1,12 @@
-#	$NetBSD: Makefile.inc,v 1.7 2011/05/16 19:27:48 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.8 2011/05/19 21:06:01 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
 
 .include bsd.own.mk
 
-LLVM_REVISION=	131404
-CLANG_REVISION=	131404
+LLVM_REVISION=	131671
+CLANG_REVISION=	131671
 
 LLVM_SRCDIR:=	${.PARSEDIR}/dist/llvm
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang

Index: src/external/bsd/llvm/lib/libLLVMCore/Makefile
diff -u src/external/bsd/llvm/lib/libLLVMCore/Makefile:1.2 src/external/bsd/llvm/lib/libLLVMCore/Makefile:1.3
--- src/external/bsd/llvm/lib/libLLVMCore/Makefile:1.2	Fri Mar 18 23:32:03 2011
+++ src/external/bsd/llvm/lib/libLLVMCore/Makefile	Thu May 19 21:06:02 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/03/18 23:32:03 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2011/05/19 21:06:02 joerg Exp $
 
 LIB=	LLVMCore
 
@@ -33,6 +33,7 @@
 	PassManager.cpp \
 	PassRegistry.cpp \
 	PrintModulePass.cpp \
+	StandardPasses.cpp \
 	Type.cpp \
 	TypeSymbolTable.cpp \
 	Use.cpp \



CVS commit: [netbsd-5] src

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:06:58 UTC 2011

Modified Files:
src/etc/mtree [netbsd-5]: NetBSD.dist
src/share/i18n/csmapper [netbsd-5]: Makefile
src/share/i18n/esdb [netbsd-5]: Makefile
Added Files:
src/share/i18n/csmapper/CBM [netbsd-5]: CBMINT%UCS.src Makefile.inc
UCS%CBMINT.src charset.pivot.CBM.src mapper.dir.CBM.src
src/share/i18n/esdb/CBM [netbsd-5]: CBMINT.src Makefile.inc
esdb.alias.CBM.src esdb.dir.CBM.src

Log Message:
Pull up following revision(s) (requested by mbalmer in ticket #1605):
share/i18n/csmapper/CBM/UCS%CBMINT.src: revision 1.1
share/i18n/esdb/CBM/esdb.alias.CBM.src: revision 1.1
share/i18n/esdb/CBM/esdb.dir.CBM.src: revision 1.1
share/i18n/esdb/CBM/CBMINT.src: revision 1.1
share/i18n/csmapper/Makefile: revision 1.14
share/i18n/csmapper/CBM/CBMINT%UCS.src: revision 1.1
share/i18n/csmapper/CBM/mapper.dir.CBM.src: revision 1.1
share/i18n/csmapper/CBM/Makefile.inc: revision 1.1
etc/mtree/NetBSD.dist.base: revision 1.87 via patch
share/i18n/esdb/Makefile: revision 1.15
share/i18n/csmapper/CBM/charset.pivot.CBM.src: revision 1.1
share/i18n/esdb/CBM/Makefile.inc: revision 1.1
Add Japan CBM character codes.


To generate a diff of this commit:
cvs rdiff -u -r1.385.2.6 -r1.385.2.7 src/etc/mtree/NetBSD.dist
cvs rdiff -u -r1.13 -r1.13.18.1 src/share/i18n/csmapper/Makefile
cvs rdiff -u -r0 -r1.2.2.2 src/share/i18n/csmapper/CBM/CBMINT%UCS.src \
src/share/i18n/csmapper/CBM/UCS%CBMINT.src \
src/share/i18n/csmapper/CBM/charset.pivot.CBM.src \
src/share/i18n/csmapper/CBM/mapper.dir.CBM.src
cvs rdiff -u -r0 -r1.1.2.2 src/share/i18n/csmapper/CBM/Makefile.inc
cvs rdiff -u -r1.14 -r1.14.18.1 src/share/i18n/esdb/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/share/i18n/esdb/CBM/CBMINT.src \
src/share/i18n/esdb/CBM/Makefile.inc \
src/share/i18n/esdb/CBM/esdb.alias.CBM.src \
src/share/i18n/esdb/CBM/esdb.dir.CBM.src

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

Modified files:

Index: src/etc/mtree/NetBSD.dist
diff -u src/etc/mtree/NetBSD.dist:1.385.2.6 src/etc/mtree/NetBSD.dist:1.385.2.7
--- src/etc/mtree/NetBSD.dist:1.385.2.6	Tue Mar  8 17:38:31 2011
+++ src/etc/mtree/NetBSD.dist	Thu May 19 21:06:58 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist,v 1.385.2.6 2011/03/08 17:38:31 riz Exp $
+#	$NetBSD: NetBSD.dist,v 1.385.2.7 2011/05/19 21:06:58 bouyer Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -715,6 +715,7 @@
 ./usr/share/i18n/csmapper/APPLE
 ./usr/share/i18n/csmapper/AST
 ./usr/share/i18n/csmapper/BIG5
+./usr/share/i18n/csmapper/CBM
 ./usr/share/i18n/csmapper/CNS
 ./usr/share/i18n/csmapper/CP
 ./usr/share/i18n/csmapper/EBCDIC
@@ -732,6 +733,7 @@
 ./usr/share/i18n/esdb/APPLE
 ./usr/share/i18n/esdb/AST
 ./usr/share/i18n/esdb/BIG5
+./usr/share/i18n/esdb/CBM
 ./usr/share/i18n/esdb/CP
 ./usr/share/i18n/esdb/DEC
 ./usr/share/i18n/esdb/EBCDIC

Index: src/share/i18n/csmapper/Makefile
diff -u src/share/i18n/csmapper/Makefile:1.13 src/share/i18n/csmapper/Makefile:1.13.18.1
--- src/share/i18n/csmapper/Makefile:1.13	Tue Mar 13 16:34:37 2007
+++ src/share/i18n/csmapper/Makefile	Thu May 19 21:06:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2007/03/13 16:34:37 tnozaki Exp $
+# $NetBSD: Makefile,v 1.13.18.1 2011/05/19 21:06:57 bouyer Exp $
 
 NOMAN=
 
@@ -10,7 +10,7 @@
 SRCS_mapper.dir+= mapper.dir.src
 SRCS_charset.pivot+= charset.pivot.src
 
-SUBDIR= APPLE AST BIG5 CNS CP EBCDIC GB GEORGIAN ISO646 ISO-8859 \
+SUBDIR= APPLE AST BIG5 CBM CNS CP EBCDIC GB GEORGIAN ISO646 ISO-8859 \
 	JIS KAZAKH KOI KS MISC TCVN
 .for i in ${SUBDIR}
 .if exists(${.CURDIR}/$i/Makefile.inc)

Index: src/share/i18n/esdb/Makefile
diff -u src/share/i18n/esdb/Makefile:1.14 src/share/i18n/esdb/Makefile:1.14.18.1
--- src/share/i18n/esdb/Makefile:1.14	Sun Apr  1 18:52:30 2007
+++ src/share/i18n/esdb/Makefile	Thu May 19 21:06:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2007/04/01 18:52:30 tnozaki Exp $
+# $NetBSD: Makefile,v 1.14.18.1 2011/05/19 21:06:58 bouyer Exp $
 
 NOMAN=
 
@@ -12,7 +12,7 @@
 	${_MKTARGET_CREATE}
 	${TOOL_MKESDB} -o $@ $
 
-SUBDIR=	APPLE AST BIG5 CP DEC EUC EBCDIC GB GEORGIAN ISO-2022 \
+SUBDIR=	APPLE AST BIG5 CBM CP DEC EUC EBCDIC GB GEORGIAN ISO-2022 \
 	ISO-8859 ISO646 KAZAKH KOI MISC TCVN UTF
 
 .for i in ${SUBDIR}

Added files:

Index: src/share/i18n/csmapper/CBM/CBMINT%UCS.src
diff -u /dev/null src/share/i18n/csmapper/CBM/CBMINT%UCS.src:1.2.2.2
--- /dev/null	Thu May 19 21:06:58 2011
+++ src/share/i18n/csmapper/CBM/CBMINT%UCS.src	Thu May 19 21:06:57 2011
@@ -0,0 +1,90 @@
+# $NetBSD: CBMINT%UCS.src,v 1.2.2.2 2011/05/19 21:06:57 bouyer Exp $
+
+TYPE		ROWCOL
+NAME		CBMINT/UCS
+SRC_ZONE	0x00-0xFF
+OOB_MODE	ILSEQ
+DST_ILSEQ	0xFFFE
+DST_UNIT_BITS	16
+

CVS commit: [netbsd-5] src/distrib/sets/lists/base

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:08:46 UTC 2011

Modified Files:
src/distrib/sets/lists/base [netbsd-5]: mi

Log Message:
Pull up following revision(s) (requested by mbalmer in ticket #1606):
distrib/sets/lists/base/mi: revision 1.936
Add new files.


To generate a diff of this commit:
cvs rdiff -u -r1.780.2.19 -r1.780.2.20 src/distrib/sets/lists/base/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/base/mi
diff -u src/distrib/sets/lists/base/mi:1.780.2.19 src/distrib/sets/lists/base/mi:1.780.2.20
--- src/distrib/sets/lists/base/mi:1.780.2.19	Tue Mar  8 17:38:30 2011
+++ src/distrib/sets/lists/base/mi	Thu May 19 21:08:44 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.780.2.19 2011/03/08 17:38:30 riz Exp $
+# $NetBSD: mi,v 1.780.2.20 2011/05/19 21:08:44 bouyer Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -1888,6 +1888,9 @@
 ./usr/share/i18n/csmapper/BIG5/UCS@BMP%HKSCS.mps	base-sysutil-share	nls
 ./usr/share/i18n/csmapper/BIG5/UCS@SIP%ETen.mps		base-sysutil-share	nls
 ./usr/share/i18n/csmapper/BIG5/UCS@SIP%HKSCS.mps	base-sysutil-share	nls
+./usr/share/i18n/csmapper/CBM			base-sysutil-share
+./usr/share/i18n/csmapper/CBM/CBMINT%UCS.mps		base-sysutil-share
+./usr/share/i18n/csmapper/CBM/UCS%CBMINT.mps		base-sysutil-share
 ./usr/share/i18n/csmapper/CNS			base-sysutil-share
 ./usr/share/i18n/csmapper/CNS/CNS11643-1%UCS.mps	base-sysutil-share	nls
 ./usr/share/i18n/csmapper/CNS/CNS11643-2%UCS.mps	base-sysutil-share	nls
@@ -2319,6 +2322,8 @@
 ./usr/share/i18n/esdb/BIG5/Big5-HKSCS.esdb	base-sysutil-share	nls
 ./usr/share/i18n/esdb/BIG5/Big5-IBM.esdb	base-sysutil-share	nls
 ./usr/share/i18n/esdb/BIG5/Big5-Plus.esdb	base-sysutil-share	nls
+./usr/share/i18n/esdb/CBM			base-sysutil-share
+./usr/share/i18n/esdb/CBM/CBMINT.esdb		base-sysutil-share	nls
 ./usr/share/i18n/esdb/CP			base-sysutil-share
 ./usr/share/i18n/esdb/CP/CP037.esdb		base-sysutil-share	nls
 ./usr/share/i18n/esdb/CP/CP038.esdb		base-sysutil-share	nls



CVS commit: [netbsd-5] src/sys/arch/xen/xen

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:11:15 UTC 2011

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: if_xennet_xenbus.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #1608):
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.49
Separate xennet(4) backend initialization code (resume) from the part
that talks with Xenstore to query backend's information. Resuming is now
performed just after xennet(4) attachment instead of waiting for backend
to announce its features in Xenstore and change it state.
This fixes the race observed by Urban Boquist when the domU boots with
root on NFS.
FWIW, the boot code (when root is NFS-backed) can innit() the xennet(4)
interface very early: it tried to access ifnet structures that were not
yet allocated.
Will ask for a pullup. Thanks to Urban for reporting the issue and
investigate it. Confirmed fixed. No regression observed by me for
dynamic attach/detach of xvif(4) and xennet(4) interfaces.
See also http://mail-index.netbsd.org/port-xen/2011/04/18/msg006647.html


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.4 -r1.29.2.5 src/sys/arch/xen/xen/if_xennet_xenbus.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/xen/xen/if_xennet_xenbus.c
diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.4 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.5
--- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.4	Sun Nov 21 23:55:58 2010
+++ src/sys/arch/xen/xen/if_xennet_xenbus.c	Thu May 19 21:11:15 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_xennet_xenbus.c,v 1.29.2.4 2010/11/21 23:55:58 riz Exp $  */
+/*  $NetBSD: if_xennet_xenbus.c,v 1.29.2.5 2011/05/19 21:11:15 bouyer Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.4 2010/11/21 23:55:58 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.5 2011/05/19 21:11:15 bouyer Exp $);
 
 #include opt_xen.h
 #include opt_nfs_boot.h
@@ -203,6 +203,7 @@
 static void xennet_tx_complete(struct xennet_xenbus_softc *);
 static void xennet_rx_mbuf_free(struct mbuf *, void *, size_t, void *);
 static int  xennet_handler(void *);
+static int  xennet_talk_to_backend(struct xennet_xenbus_softc *);
 #ifdef XENNET_DEBUG_DUMP
 static void xennet_hex_dump(const unsigned char *, size_t, const char *, int);
 #endif
@@ -350,6 +351,9 @@
 	rnd_attach_source(sc-sc_rnd_source, device_xname(sc-sc_dev),
 	RND_TYPE_NET, 0);
 #endif
+
+	/* resume shared structures and tell backend that we are ready */
+	xennet_xenbus_resume(sc);
 }
 
 static int
@@ -410,13 +414,10 @@
 xennet_xenbus_resume(void *p)
 {
 	struct xennet_xenbus_softc *sc = p;
-	struct xenbus_transaction *xbt;
-	unsigned long rx_copy;
 	int error;
 	netif_tx_sring_t *tx_ring;
 	netif_rx_sring_t *rx_ring;
 	paddr_t ma;
-	const char *errmsg;
 
 	sc-sc_tx_ring_gntref = GRANT_INVALID_REF;
 	sc-sc_rx_ring_gntref = GRANT_INVALID_REF;
@@ -450,6 +451,17 @@
 	event_set_handler(sc-sc_evtchn, xennet_handler, sc,
 	IPL_NET, device_xname(sc-sc_dev));
 
+	return 0;
+}
+
+static int
+xennet_talk_to_backend(struct xennet_xenbus_softc *sc)
+{
+	int error;
+	unsigned long rx_copy;
+	struct xenbus_transaction *xbt;
+	const char *errmsg;
+
 	error = xenbus_read_ul(NULL, sc-sc_xbusd-xbusd_otherend,
 	feature-rx-copy, rx_copy, 10);
 	if (error)
@@ -529,7 +541,7 @@
 		xenbus_switch_state(sc-sc_xbusd, NULL, XenbusStateClosed);
 		break;
 	case XenbusStateInitWait:
-		if (xennet_xenbus_resume(sc) == 0)
+		if (xennet_talk_to_backend(sc) == 0)
 			xenbus_switch_state(sc-sc_xbusd, NULL,
 			XenbusStateConnected);
 		break;



CVS commit: [netbsd-5] src/sys/arch/xen/xen

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:13:07 UTC 2011

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: if_xennet_xenbus.c xennetback_xenbus.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #1609):
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.50
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.43
Check that xvif(4) is not already connected before proceeding in the
XenbusStateConnected mode. Under rare occasions, the xenbus watcher
can fire multiple times, overwriting the I/O ring memory mappings with
invalid values. This will lead sooner or later to dom0 panic().
Will ask for pullup. FWIW, xbdback(4) is not affected.
Check status before proceeding further. Avoids spurious watch calls.


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.5 -r1.29.2.6 src/sys/arch/xen/xen/if_xennet_xenbus.c
cvs rdiff -u -r1.24.4.3 -r1.24.4.4 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/xen/if_xennet_xenbus.c
diff -u src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.5 src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.6
--- src/sys/arch/xen/xen/if_xennet_xenbus.c:1.29.2.5	Thu May 19 21:11:15 2011
+++ src/sys/arch/xen/xen/if_xennet_xenbus.c	Thu May 19 21:13:07 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_xennet_xenbus.c,v 1.29.2.5 2011/05/19 21:11:15 bouyer Exp $  */
+/*  $NetBSD: if_xennet_xenbus.c,v 1.29.2.6 2011/05/19 21:13:07 bouyer Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.5 2011/05/19 21:11:15 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_xennet_xenbus.c,v 1.29.2.6 2011/05/19 21:13:07 bouyer Exp $);
 
 #include opt_xen.h
 #include opt_nfs_boot.h
@@ -541,6 +541,8 @@
 		xenbus_switch_state(sc-sc_xbusd, NULL, XenbusStateClosed);
 		break;
 	case XenbusStateInitWait:
+		if (sc-sc_backend_status == BEST_CONNECTED)
+			break;
 		if (xennet_talk_to_backend(sc) == 0)
 			xenbus_switch_state(sc-sc_xbusd, NULL,
 			XenbusStateConnected);

Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.3 src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.4
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.24.4.3	Sat Jan 30 19:14:20 2010
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Thu May 19 21:13:07 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.24.4.3 2010/01/30 19:14:20 snj Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.24.4.4 2011/05/19 21:13:07 bouyer Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -444,6 +444,8 @@
 		break;
 
 	case XenbusStateConnected:
+		if (xneti-xni_status == CONNECTED)
+			break;
 		/* read comunication informations */
 		err = xenbus_read_ul(NULL, xbusd-xbusd_otherend,
 		tx-ring-ref, tx_ring_ref, 10);



CVS commit: [netbsd-5] src/share/i18n/csmapper/CBM

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:14:00 UTC 2011

Modified Files:
src/share/i18n/csmapper/CBM [netbsd-5]: charset.pivot.CBM.src
mapper.dir.CBM.src

Log Message:
Pull up following revision(s) (requested by mbalmer in ticket #1610):
share/i18n/csmapper/CBM/mapper.dir.CBM.src: revision 1.2
share/i18n/csmapper/CBM/charset.pivot.CBM.src: revision 1.2
missing files


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 \
src/share/i18n/csmapper/CBM/charset.pivot.CBM.src \
src/share/i18n/csmapper/CBM/mapper.dir.CBM.src

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

Modified files:

Index: src/share/i18n/csmapper/CBM/charset.pivot.CBM.src
diff -u src/share/i18n/csmapper/CBM/charset.pivot.CBM.src:1.2.2.2 src/share/i18n/csmapper/CBM/charset.pivot.CBM.src:1.2.2.3
--- src/share/i18n/csmapper/CBM/charset.pivot.CBM.src:1.2.2.2	Thu May 19 21:06:57 2011
+++ src/share/i18n/csmapper/CBM/charset.pivot.CBM.src	Thu May 19 21:14:00 2011
@@ -1,2 +1,4 @@
-# $NetBSD: charset.pivot.CBM.src,v 1.2.2.2 2011/05/19 21:06:57 bouyer Exp $
+# $NetBSD: charset.pivot.CBM.src,v 1.2.2.3 2011/05/19 21:14:00 bouyer Exp $
 
+CMBINT			UCS			1
+UCS			CBMINT			1
Index: src/share/i18n/csmapper/CBM/mapper.dir.CBM.src
diff -u src/share/i18n/csmapper/CBM/mapper.dir.CBM.src:1.2.2.2 src/share/i18n/csmapper/CBM/mapper.dir.CBM.src:1.2.2.3
--- src/share/i18n/csmapper/CBM/mapper.dir.CBM.src:1.2.2.2	Thu May 19 21:06:57 2011
+++ src/share/i18n/csmapper/CBM/mapper.dir.CBM.src	Thu May 19 21:14:00 2011
@@ -1,2 +1,4 @@
-# $NetBSD: mapper.dir.CBM.src,v 1.2.2.2 2011/05/19 21:06:57 bouyer Exp $
+# $NetBSD: mapper.dir.CBM.src,v 1.2.2.3 2011/05/19 21:14:00 bouyer Exp $
 
+CBMINT/UCS		mapper_std	CBM/CBMINT%UCS.mps
+UCS/CBMINT		mapper_std	CBM/UCS%CBMINT.mps



CVS commit: [netbsd-5] src/doc

2011-05-19 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu May 19 21:14:39 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1604 - 1610


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.77 -r1.1.2.78 src/doc/CHANGES-5.2

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

Modified files:

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.77 src/doc/CHANGES-5.2:1.1.2.78
--- src/doc/CHANGES-5.2:1.1.2.77	Thu May 19 19:52:51 2011
+++ src/doc/CHANGES-5.2	Thu May 19 21:14:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.77 2011/05/19 19:52:51 bouyer Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.78 2011/05/19 21:14:39 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5096,3 +5096,67 @@
 	Fixes CVE-2011-996
 	[spz, ticket #1603]
 
+sys/fs/puffs/puffs_msgif.c			1.84 via patch
+
+	Apply patch from PR kern/44093 by yamt:
+
+	Interrupt server wait only on certain signals (same set at nfs -i)
+	instead of all signals.  According to the PR this helps with
+	git clone run on a puffs file system.
+	[manu, ticket #1604]
+
+etc/mtree/NetBSD.dist.base			1.87 via patch
+share/i18n/csmapper/CBM/CBMINT%UCS.src		1.1
+share/i18n/csmapper/CBM/Makefile.inc		1.1
+share/i18n/csmapper/CBM/UCS%CBMINT.src		1.1
+share/i18n/csmapper/CBM/charset.pivot.CBM.src	1.1
+share/i18n/csmapper/CBM/mapper.dir.CBM.src	1.1
+share/i18n/csmapper/Makefile			1.14
+share/i18n/esdb/CBM/CBMINT.src			1.1
+share/i18n/esdb/CBM/Makefile.inc		1.1
+share/i18n/esdb/CBM/esdb.alias.CBM.src		1.1
+share/i18n/esdb/CBM/esdb.dir.CBM.src		1.1
+share/i18n/esdb/Makefile			1.15
+
+	Add Japan CBM character codes.
+	[mbalmer, ticket #1605]
+
+distrib/sets/lists/base/mi			1.936
+
+	Add new files.
+	[mbalmer, ticket #1606]
+
+share/i18n/csmapper/CBM/CBMINT%UCS.src		1.2
+share/i18n/csmapper/CBM/UCS%CBMINT.src		1.2
+
+	add Yen symbol
+	[mbalmer, ticket #1607]
+
+sys/arch/xen/xen/if_xennet_xenbus.c		1.49
+
+	Separate xennet(4) backend initialization code (resume) from the part
+	that talks with Xenstore to query backend's information. Resuming is
+	now performed just after xennet(4) attachment instead of waiting for
+	backend to announce its features in Xenstore and change it state.
+
+	This fixes the race observed by Urban Boquist when the domU boots with
+	root on NFS.
+	See also http://mail-index.netbsd.org/port-xen/2011/04/18/msg006647.html
+	[jym, ticket #1608]
+
+sys/arch/xen/xen/if_xennet_xenbus.c		1.50
+sys/arch/xen/xen/xennetback_xenbus.c		1.43
+
+	Check that xvif(4) is not already connected before proceeding in the
+	XenbusStateConnected mode. Under rare occasions, the xenbus watcher
+	can fire multiple times, overwriting the I/O ring memory mappings with
+	invalid values. This will lead sooner or later to dom0 panic().
+	Check status before proceeding further. Avoids spurious watch calls.
+	[jym, ticket #1609]
+
+share/i18n/csmapper/CBM/charset.pivot.CBM.src	1.2
+share/i18n/csmapper/CBM/mapper.dir.CBM.src	1.2
+
+	missing files
+	[mbalmer, ticket #1610]
+



CVS commit: src/share/man/man4

2011-05-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 19 21:16:45 UTC 2011

Modified Files:
src/share/man/man4: ip.4 ip6.4 tp.4 unix.4

Log Message:
Fix some typos and incorrect idioms with the cmsg botch^WAPI.

Add a couple cross-references too.

ok wiz


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/ip.4
cvs rdiff -u -r1.27 -r1.28 src/share/man/man4/ip6.4
cvs rdiff -u -r1.18 -r1.19 src/share/man/man4/tp.4
cvs rdiff -u -r1.21 -r1.22 src/share/man/man4/unix.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/ip.4
diff -u src/share/man/man4/ip.4:1.30 src/share/man/man4/ip.4:1.31
--- src/share/man/man4/ip.4:1.30	Mon Jul 20 07:58:54 2009
+++ src/share/man/man4/ip.4	Thu May 19 21:16:45 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: ip.4,v 1.30 2009/07/20 07:58:54 wiz Exp $
+.\	$NetBSD: ip.4,v 1.31 2011/05/19 21:16:45 riastradh Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)ip.4	8.2 (Berkeley) 11/30/93
 .\
-.Dd July 19, 2009
+.Dd May 19, 2011
 .Dt IP 4
 .Os
 .Sh NAME
@@ -142,7 +142,7 @@
 address.
 The cmsghdr fields have the following values:
 .Bd -literal
-cmsg_len = sizeof(struct in_addr)
+cmsg_len = CMSG_LEN(sizeof(struct in_addr))
 cmsg_level = IPPROTO_IP
 cmsg_type = IP_RECVDSTADDR
 .Ed
@@ -162,7 +162,7 @@
 that contains a cmsghdr structure followed by the struct sockaddr_dl.
 The cmsghdr fields have the following values:
 .Bd -literal
-cmsg_len = sizeof(struct sockaddr_dl)
+cmsg_len = CMSG_LEN(sizeof(struct sockaddr_dl))
 cmsg_level = IPPROTO_IP
 cmsg_type = IP_RECVIF
 .Ed
@@ -182,7 +182,7 @@
 value.
 The cmsghdr fields have the following values:
 .Bd -literal
-cmsg_len = sizeof(uint8_t)
+cmsg_len = CMSG_LEN(sizeof(uint8_t))
 cmsg_level = IPPROTO_IP
 cmsg_type = IP_RECVTTL
 .Ed
@@ -437,6 +437,7 @@
 .Xr getsockopt 2 ,
 .Xr recv 2 ,
 .Xr send 2 ,
+.Xr CMSG_DATA 3 ,
 .Xr ipsec_set_policy 3 ,
 .Xr icmp 4 ,
 .Xr inet 4 ,

Index: src/share/man/man4/ip6.4
diff -u src/share/man/man4/ip6.4:1.27 src/share/man/man4/ip6.4:1.28
--- src/share/man/man4/ip6.4:1.27	Mon Aug 20 16:08:55 2007
+++ src/share/man/man4/ip6.4	Thu May 19 21:16:45 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: ip6.4,v 1.27 2007/08/20 16:08:55 perry Exp $
+.\	$NetBSD: ip6.4,v 1.28 2011/05/19 21:16:45 riastradh Exp $
 .\	$KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $
 .\	$OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $
 .\
@@ -28,7 +28,7 @@
 .\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
-.Dd December 5, 2006
+.Dd May 19, 2011
 .Dt IP6 4
 .Os
 .Sh NAME
@@ -645,6 +645,7 @@
 .Xr send 2 ,
 .Xr setsockopt 2 ,
 .Xr socket 2 ,
+.Xr CMSG_DATA 3 ,
 .\ .Xr inet6_option_space 3 ,
 .\ .Xr inet6_rthdr_space 3 ,
 .Xr if_nametoindex 3 ,

Index: src/share/man/man4/tp.4
diff -u src/share/man/man4/tp.4:1.18 src/share/man/man4/tp.4:1.19
--- src/share/man/man4/tp.4:1.18	Mon Mar 22 18:58:31 2010
+++ src/share/man/man4/tp.4	Thu May 19 21:16:45 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: tp.4,v 1.18 2010/03/22 18:58:31 joerg Exp $
+.\	$NetBSD: tp.4,v 1.19 2011/05/19 21:16:45 riastradh Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -204,7 +204,7 @@
 will contain
 .Dv SOL_TRANSPORT
 for the
-.Va csmg_level
+.Va cmsg_level
 and
 .Dv TPOPT_CONN_DATA
 for
@@ -229,7 +229,7 @@
 must contain
 .Dv SOL_TRANSPORT
 for
-.Va csmg_level
+.Va cmsg_level
 and
 .Dv TPOPT_DISC_DATA
 for

Index: src/share/man/man4/unix.4
diff -u src/share/man/man4/unix.4:1.21 src/share/man/man4/unix.4:1.22
--- src/share/man/man4/unix.4:1.21	Mon Mar 22 18:58:31 2010
+++ src/share/man/man4/unix.4	Thu May 19 21:16:45 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: unix.4,v 1.21 2010/03/22 18:58:31 joerg Exp $
+.\	$NetBSD: unix.4,v 1.22 2011/05/19 21:16:45 riastradh Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)unix.4	8.1 (Berkeley) 6/9/93
 .\
-.Dd October 30, 2006
+.Dd May 19, 2011
 .Dt UNIX 4
 .Os
 .Sh NAME
@@ -229,7 +229,7 @@
 of groups.
 The cmsghdr fields have the following values:
 .Bd -literal
-cmsg_len = sizeof(struct cmsghdr) + SOCKCREDSIZE(ngroups)
+cmsg_len = CMSG_LEN(SOCKCREDSIZE(ngroups))
 cmsg_level = SOL_SOCKET
 cmsg_type = SCM_CREDS
 .Ed
@@ -265,6 +265,7 @@
 .Ed
 .Sh SEE ALSO
 .Xr socket 2 ,
+.Xr CMSG_DATA 3 ,
 .Xr intro 4
 .Rs
 .%T An Introductory 4.4BSD Interprocess Communication Tutorial



CVS commit: src/sys

2011-05-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu May 19 21:24:55 UTC 2011

Modified Files:
src/sys/conf: Makefile.kern.inc
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
Spell --fatal-warnings with two hyphens


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/conf/Makefile.kern.inc
cvs rdiff -u -r1.108 -r1.109 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.133 src/sys/conf/Makefile.kern.inc:1.134
--- src/sys/conf/Makefile.kern.inc:1.133	Tue May 17 07:16:02 2011
+++ src/sys/conf/Makefile.kern.inc	Thu May 19 21:24:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.133 2011/05/17 07:16:02 joerg Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.134 2011/05/19 21:24:55 joerg Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -85,7 +85,7 @@
 
 CFLAGS+=	-ffreestanding -fno-zero-initialized-in-bss
 CFLAGS+=	${DEBUG} ${COPTS}
-AFLAGS+=	-D_LOCORE -Wa,-fatal-warnings
+AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
 
 # XXX
 .if defined(HAVE_GCC)  ${HAVE_GCC}  3

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.108 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.109
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.108	Mon Mar 21 05:15:18 2011
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Thu May 19 21:24:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.108 2011/03/21 05:15:18 joerg Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.109 2011/05/19 21:24:55 joerg Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -140,7 +140,7 @@
 
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs
 CPPFLAGS+=	-I${RUMPTOP}/librump/rumpnet -I${RUMPTOP}/librump/rumpdev
-AFLAGS+=	-D_LOCORE -Wa,-fatal-warnings
+AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
 
 #
 # If archdir exists, it is required to provide:



CVS commit: src/sys/arch/x68k/usr.bin

2011-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 19 21:26:39 UTC 2011

Modified Files:
src/sys/arch/x68k/usr.bin/bellctrl: Makefile bellctrl.c
src/sys/arch/x68k/usr.bin/loadfont: Makefile
src/sys/arch/x68k/usr.bin/loadkmap: Makefile ascii_kmap.c jis_kmap.c
loadkmap.c
src/sys/arch/x68k/usr.bin/palette: Makefile palette.c
src/sys/arch/x68k/usr.bin/rtcalarm: Makefile rtcalarm.c
src/sys/arch/x68k/usr.bin/tvctrl: Makefile

Log Message:
WARNSfy.

XXX: rtcalarm/rtcalarm.c refers obsolete /dev/pow0


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/usr.bin/bellctrl/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/usr.bin/bellctrl/bellctrl.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/usr.bin/loadfont/Makefile
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/usr.bin/loadkmap/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/loadkmap/ascii_kmap.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/usr.bin/loadkmap/jis_kmap.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x68k/usr.bin/loadkmap/loadkmap.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/usr.bin/palette/Makefile
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x68k/usr.bin/palette/palette.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/usr.bin/rtcalarm/Makefile
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x68k/usr.bin/rtcalarm/rtcalarm.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/usr.bin/tvctrl/Makefile

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

Modified files:

Index: src/sys/arch/x68k/usr.bin/bellctrl/Makefile
diff -u src/sys/arch/x68k/usr.bin/bellctrl/Makefile:1.8 src/sys/arch/x68k/usr.bin/bellctrl/Makefile:1.9
--- src/sys/arch/x68k/usr.bin/bellctrl/Makefile:1.8	Wed Dec 12 01:49:59 2001
+++ src/sys/arch/x68k/usr.bin/bellctrl/Makefile	Thu May 19 21:26:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2001/12/12 01:49:59 tv Exp $
+#	$NetBSD: Makefile,v 1.9 2011/05/19 21:26:38 tsutsui Exp $
 #
 # Makefile for bellctrl
 
@@ -10,6 +10,7 @@
 	dd bs=1 skip=32 count=52 if=sample.aout of=$@
 	rm sample.aout
 
+WARNS?=	4
 PROG=	bellctrl
 NOMAN=	# defined
 CPPFLAGS+=-I${.CURDIR}/../../..

Index: src/sys/arch/x68k/usr.bin/bellctrl/bellctrl.c
diff -u src/sys/arch/x68k/usr.bin/bellctrl/bellctrl.c:1.11 src/sys/arch/x68k/usr.bin/bellctrl/bellctrl.c:1.12
--- src/sys/arch/x68k/usr.bin/bellctrl/bellctrl.c:1.11	Fri Aug  4 02:30:48 2006
+++ src/sys/arch/x68k/usr.bin/bellctrl/bellctrl.c	Thu May 19 21:26:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bellctrl.c,v 1.11 2006/08/04 02:30:48 mhitch Exp $	*/
+/*	$NetBSD: bellctrl.c,v 1.12 2011/05/19 21:26:39 tsutsui Exp $	*/
 
 /*
  * bellctrl - OPM bell controller (for NetBSD/X680x0)
@@ -6,11 +6,12 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: bellctrl.c,v 1.11 2006/08/04 02:30:48 mhitch Exp $);
+__RCSID($NetBSD: bellctrl.c,v 1.12 2011/05/19 21:26:39 tsutsui Exp $);
 
 #include err.h
 #include stdio.h
 #include stdlib.h
+#include unistd.h
 #include ctype.h
 #include string.h
 #include sys/file.h
@@ -35,18 +36,18 @@
 };
 
 /* function prototype */
-int is_number(char *, int);
+int is_number(const char *, int);
 void set_bell_vol(int);
 void set_bell_pitch(int);
 void set_bell_dur(int);
-void set_voice_param(char *, int);
+void set_voice_param(const char *, int);
 void set_bell_param(void);
-int usage(char *, char *);
+int usage(const char *, const char *);
 
 int
 main(int argc, char **argv)
 {
-	register char *arg;
+	const char *arg;
 	int percent;
 	int i;
 
@@ -153,9 +154,9 @@
 }
 
 int
-is_number(char *arg, int maximum)
+is_number(const char *arg, int maximum)
 {
-	register char *p;
+	const char *p;
 
 	if (arg[0] == '-'  arg[1] == '1'  arg[2] == '\0')
 		return 1;
@@ -189,7 +190,7 @@
 }
 
 void
-set_voice_param(char *path, int flag)
+set_voice_param(const char *path, int flag)
 {
 	int fd;
 
@@ -238,7 +239,7 @@
 }
 
 int
-usage(char *fmt, char *arg)
+usage(const char *fmt, const char *arg)
 {
 	if (fmt) {
 		fprintf(stderr, %s:  , progName);

Index: src/sys/arch/x68k/usr.bin/loadfont/Makefile
diff -u src/sys/arch/x68k/usr.bin/loadfont/Makefile:1.5 src/sys/arch/x68k/usr.bin/loadfont/Makefile:1.6
--- src/sys/arch/x68k/usr.bin/loadfont/Makefile:1.5	Wed Dec 12 01:49:59 2001
+++ src/sys/arch/x68k/usr.bin/loadfont/Makefile	Thu May 19 21:26:39 2011
@@ -1,5 +1,6 @@
-#	$NetBSD: Makefile,v 1.5 2001/12/12 01:49:59 tv Exp $
+#	$NetBSD: Makefile,v 1.6 2011/05/19 21:26:39 tsutsui Exp $
 
+WARNS?=	4
 PROG=loadfont
 NOMAN=	# defined
 

Index: src/sys/arch/x68k/usr.bin/loadkmap/Makefile
diff -u src/sys/arch/x68k/usr.bin/loadkmap/Makefile:1.11 src/sys/arch/x68k/usr.bin/loadkmap/Makefile:1.12
--- src/sys/arch/x68k/usr.bin/loadkmap/Makefile:1.11	Sun Dec 11 12:19:45 2005
+++ src/sys/arch/x68k/usr.bin/loadkmap/Makefile	Thu May 19 21:26:39 2011
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.11 2005/12/11 12:19:45 christos Exp $
+#	$NetBSD: Makefile,v 1.12 2011/05/19 21:26:39 tsutsui Exp $
 # Makefile for 

CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips

2011-05-19 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Thu May 19 21:29:12 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips: ews4800mips.h
ews4800mipsColormap.c ews4800mipsFB.c ews4800mipsInit.c
ews4800mipsIo.c ews4800mipsKbd.c ews4800mipsMouse.c

Log Message:
- fix builds with -std=gnu99
- ANSIfy


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mips.h \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsColormap.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsInit.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mips.h
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mips.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mips.h:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mips.h:1.1	Thu Dec 29 15:43:40 2005
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mips.h	Thu May 19 21:29:12 2011
@@ -152,6 +152,11 @@
 }
 
 /*
+ * ews4800mipsColormap.c
+ */
+void ews4800mipsColormapInit(ScreenPtr);
+
+/*
  * ews4800mipsInit.c
  */
 ews4800mipsFbPtr ews4800mipsGetScreenFb(ScreenPtr);
@@ -183,6 +188,7 @@
 pointer ews4800mipsMemoryMap(size_t, off_t, int);
 Bool ews4800mipsScreenInit(ScreenPtr);
 ews4800mipsScreenPtr ews4800mipsGetScreenPrivate(ScreenPtr);
+Bool ews4800mipsAllocateScreenPrivate(ScreenPtr);
 
 /*
  * ews4800mipsFB.c
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsColormap.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsColormap.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsColormap.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsColormap.c:1.1	Thu Dec 29 15:43:40 2005
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsColormap.c	Thu May 19 21:29:12 2011
@@ -89,10 +89,8 @@
 #include stdio.h
 
 static void
-ews4800mipsUpdateColormap(pScreen, dex, count, rmap, gmap, bmap)
-	ScreenPtr	pScreen;
-	int		dex, count;
-	u_char	*rmap, *gmap, *bmap;
+ews4800mipsUpdateColormap(ScreenPtr pScreen, int dex, int count, u_char *rmap,
+u_char *gmap, u_char *bmap)
 {
 	struct wsdisplay_cmap cmap;
 	ews4800mipsFbPtr pFb = ews4800mipsGetScreenFb(pScreen);
@@ -110,8 +108,7 @@
 }
 
 static void
-ews4800mipsInstallColormap(cmap)
-	ColormapPtr	cmap;
+ews4800mipsInstallColormap(ColormapPtr cmap)
 {
 	ews4800mipsScreenPtr pPrivate = ews4800mipsGetScreenPrivate(cmap-pScreen);
 	ews4800mipsFbPtr pFb = ews4800mipsGetScreenFb(cmap-pScreen);
@@ -165,8 +162,7 @@
 }
 
 static void
-ews4800mipsUninstallColormap(cmap)
-	ColormapPtr	cmap;
+ews4800mipsUninstallColormap(ColormapPtr cmap)
 {
 	ews4800mipsScreenPtr pPrivate = ews4800mipsGetScreenPrivate(cmap-pScreen);
 
@@ -185,9 +181,7 @@
 }
 
 static int
-ews4800mipsListInstalledColormaps(pScreen, pCmapList)
-	ScreenPtr	pScreen;
-	Colormap	*pCmapList;
+ews4800mipsListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapList)
 {
 	ews4800mipsScreenPtr pPrivate = ews4800mipsGetScreenPrivate(pScreen);
 
@@ -196,10 +190,7 @@
 }
 
 static void
-ews4800mipsStoreColors(pmap, ndef, pdefs)
-	ColormapPtr	pmap;
-	int		ndef;
-	xColorItem	*pdefs;
+ews4800mipsStoreColors(ColormapPtr pmap, int ndef, xColorItem *pdefs)
 {
 	ews4800mipsScreenPtr pPrivate = ews4800mipsGetScreenPrivate(pmap-pScreen);
 	u_char	rmap[256], gmap[256], bmap[256];
@@ -223,8 +214,7 @@
 }
 
 Bool
-ews4800mipsInitializeColormap(pmap)
-	register ColormapPtr	pmap;
+ews4800mipsInitializeColormap(register ColormapPtr pmap)
 {
 	int i;
 	VisualPtr pVisual;
@@ -270,8 +260,7 @@
 }
 
 void
-ews4800mipsColormapInit (pScreen)
-	ScreenPtr pScreen;
+ews4800mipsColormapInit(ScreenPtr pScreen)
 {
 	ews4800mipsScreenPtr pPrivate = ews4800mipsGetScreenPrivate(pScreen);
 	ews4800mipsFbPtr pFb = ews4800mipsGetScreenFb(pScreen);
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c:1.1	Thu Dec 29 15:43:40 2005
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c	Thu May 19 21:29:12 2011
@@ -32,6 +32,7 @@
 #define	FORCE_SEPARATE_PRIVATE
 #include cfb.h
 #include stdio.h
+#include mi/mi.h
 
 extern BSFuncRec cfbBSFuncRec;
 

CVS commit: src

2011-05-19 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 19 21:39:03 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man3: Makefile

Log Message:
Add a cmsg.3 man page symlink, since I can never remember its name.

ok wiz


To generate a diff of this commit:
cvs rdiff -u -r1.1623 -r1.1624 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.75 -r1.76 src/share/man/man3/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1623 src/distrib/sets/lists/comp/mi:1.1624
--- src/distrib/sets/lists/comp/mi:1.1623	Mon May  9 17:13:20 2011
+++ src/distrib/sets/lists/comp/mi	Thu May 19 21:39:02 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1623 2011/05/09 17:13:20 manu Exp $
+#	$NetBSD: mi,v 1.1624 2011/05/19 21:39:02 riastradh Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -5624,6 +5624,7 @@
 ./usr/share/man/cat3/closelog_r.0		comp-c-catman		.cat
 ./usr/share/man/cat3/clrtobot.0			comp-c-catman		.cat
 ./usr/share/man/cat3/clrtoeol.0			comp-c-catman		.cat
+./usr/share/man/cat3/cmsg.0			comp-c-catman		.cat
 ./usr/share/man/cat3/color_content.0		comp-c-catman		.cat
 ./usr/share/man/cat3/color_set.0		comp-c-catman		.cat
 ./usr/share/man/cat3/com_err.0			comp-krb5-catman	kerberos,.cat
@@ -11717,6 +11718,7 @@
 ./usr/share/man/html3/closelog_r.html		comp-c-htmlman		html
 ./usr/share/man/html3/clrtobot.html		comp-c-htmlman		html
 ./usr/share/man/html3/clrtoeol.html		comp-c-htmlman		html
+./usr/share/man/html3/cmsg.html			comp-c-htmlman		html
 ./usr/share/man/html3/color_content.html	comp-c-htmlman		html
 ./usr/share/man/html3/color_set.html		comp-c-htmlman		html
 ./usr/share/man/html3/com_err.html		comp-krb5-htmlman	kerberos,html
@@ -17717,6 +17719,7 @@
 ./usr/share/man/man3/closelog_r.3		comp-c-man		.man
 ./usr/share/man/man3/clrtobot.3			comp-c-man		.man
 ./usr/share/man/man3/clrtoeol.3			comp-c-man		.man
+./usr/share/man/man3/cmsg.3			comp-c-man		.man
 ./usr/share/man/man3/color_content.3		comp-c-man		.man
 ./usr/share/man/man3/color_set.3		comp-c-man		.man
 ./usr/share/man/man3/com_err.3			comp-krb5-man		kerberos,.man

Index: src/share/man/man3/Makefile
diff -u src/share/man/man3/Makefile:1.75 src/share/man/man3/Makefile:1.76
--- src/share/man/man3/Makefile:1.75	Tue Apr 12 08:22:49 2011
+++ src/share/man/man3/Makefile	Thu May 19 21:39:03 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.75 2011/04/12 08:22:49 jruoho Exp $
+#	$NetBSD: Makefile,v 1.76 2011/05/19 21:39:03 riastradh Exp $
 #	@(#)Makefile	8.2 (Berkeley) 12/13/93
 
 MAN=	_DIAGASSERT.3 __CONCAT.3 __UNCONST.3 CMSG_DATA.3 \
@@ -266,7 +266,8 @@
 MLINKS+=CMSG_DATA.3 CMSG_FIRSTHDR.3 \
 	CMSG_DATA.3 CMSG_LEN.3 \
 	CMSG_DATA.3 CMSG_NXTHDR.3 \
-	CMSG_DATA.3 CMSG_SPACE.3
+	CMSG_DATA.3 CMSG_SPACE.3 \
+	CMSG_DATA.3 cmsg.3
 
 .include bsd.man.mk
 .include bsd.subdir.mk



CVS commit: src/sys/arch/x68k/usr.bin

2011-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 19 21:40:11 UTC 2011

Modified Files:
src/sys/arch/x68k/usr.bin: Makefile.inc
src/sys/arch/x68k/usr.bin/bellctrl: Makefile
src/sys/arch/x68k/usr.bin/loadfont: Makefile
src/sys/arch/x68k/usr.bin/loadkmap: Makefile
src/sys/arch/x68k/usr.bin/palette: Makefile
src/sys/arch/x68k/usr.bin/rtcalarm: Makefile
src/sys/arch/x68k/usr.bin/tvctrl: Makefile

Log Message:
Set WARNS in common Makefile.inc.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/usr.bin/Makefile.inc
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x68k/usr.bin/bellctrl/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/loadfont/Makefile
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x68k/usr.bin/loadkmap/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/palette/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/rtcalarm/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/tvctrl/Makefile

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

Modified files:

Index: src/sys/arch/x68k/usr.bin/Makefile.inc
diff -u src/sys/arch/x68k/usr.bin/Makefile.inc:1.3 src/sys/arch/x68k/usr.bin/Makefile.inc:1.4
--- src/sys/arch/x68k/usr.bin/Makefile.inc:1.3	Sat Jun 15 20:15:54 1996
+++ src/sys/arch/x68k/usr.bin/Makefile.inc	Thu May 19 21:40:11 2011
@@ -1,3 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3 1996/06/15 20:15:54 oki Exp $
+#	$NetBSD: Makefile.inc,v 1.4 2011/05/19 21:40:11 tsutsui Exp $
 
+WARNS?=		4
 BINDIR?=	/usr/bin

Index: src/sys/arch/x68k/usr.bin/bellctrl/Makefile
diff -u src/sys/arch/x68k/usr.bin/bellctrl/Makefile:1.9 src/sys/arch/x68k/usr.bin/bellctrl/Makefile:1.10
--- src/sys/arch/x68k/usr.bin/bellctrl/Makefile:1.9	Thu May 19 21:26:38 2011
+++ src/sys/arch/x68k/usr.bin/bellctrl/Makefile	Thu May 19 21:40:11 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.9 2011/05/19 21:26:38 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.10 2011/05/19 21:40:11 tsutsui Exp $
 #
 # Makefile for bellctrl
 
@@ -10,7 +10,6 @@
 	dd bs=1 skip=32 count=52 if=sample.aout of=$@
 	rm sample.aout
 
-WARNS?=	4
 PROG=	bellctrl
 NOMAN=	# defined
 CPPFLAGS+=-I${.CURDIR}/../../..

Index: src/sys/arch/x68k/usr.bin/loadfont/Makefile
diff -u src/sys/arch/x68k/usr.bin/loadfont/Makefile:1.6 src/sys/arch/x68k/usr.bin/loadfont/Makefile:1.7
--- src/sys/arch/x68k/usr.bin/loadfont/Makefile:1.6	Thu May 19 21:26:39 2011
+++ src/sys/arch/x68k/usr.bin/loadfont/Makefile	Thu May 19 21:40:11 2011
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.6 2011/05/19 21:26:39 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.7 2011/05/19 21:40:11 tsutsui Exp $
 
-WARNS?=	4
 PROG=loadfont
 NOMAN=	# defined
 

Index: src/sys/arch/x68k/usr.bin/loadkmap/Makefile
diff -u src/sys/arch/x68k/usr.bin/loadkmap/Makefile:1.12 src/sys/arch/x68k/usr.bin/loadkmap/Makefile:1.13
--- src/sys/arch/x68k/usr.bin/loadkmap/Makefile:1.12	Thu May 19 21:26:39 2011
+++ src/sys/arch/x68k/usr.bin/loadkmap/Makefile	Thu May 19 21:40:11 2011
@@ -1,7 +1,6 @@
-#	$NetBSD: Makefile,v 1.12 2011/05/19 21:26:39 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.13 2011/05/19 21:40:11 tsutsui Exp $
 # Makefile for loadkmap
 
-WARNS?=		4
 PROG=		loadkmap
 NOMAN=		# defined
 FILES=		ascii_kmap jis_kmap

Index: src/sys/arch/x68k/usr.bin/palette/Makefile
diff -u src/sys/arch/x68k/usr.bin/palette/Makefile:1.6 src/sys/arch/x68k/usr.bin/palette/Makefile:1.7
--- src/sys/arch/x68k/usr.bin/palette/Makefile:1.6	Thu May 19 21:26:39 2011
+++ src/sys/arch/x68k/usr.bin/palette/Makefile	Thu May 19 21:40:11 2011
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.6 2011/05/19 21:26:39 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.7 2011/05/19 21:40:11 tsutsui Exp $
 
-WARNS?=	4
 PROG=palette
 NOMAN=# defined
 

Index: src/sys/arch/x68k/usr.bin/rtcalarm/Makefile
diff -u src/sys/arch/x68k/usr.bin/rtcalarm/Makefile:1.6 src/sys/arch/x68k/usr.bin/rtcalarm/Makefile:1.7
--- src/sys/arch/x68k/usr.bin/rtcalarm/Makefile:1.6	Thu May 19 21:26:39 2011
+++ src/sys/arch/x68k/usr.bin/rtcalarm/Makefile	Thu May 19 21:40:11 2011
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.6 2011/05/19 21:26:39 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.7 2011/05/19 21:40:11 tsutsui Exp $
 
-WARNS?=	4
 PROG=rtcalarm
 NOMAN=# defined
 

Index: src/sys/arch/x68k/usr.bin/tvctrl/Makefile
diff -u src/sys/arch/x68k/usr.bin/tvctrl/Makefile:1.6 src/sys/arch/x68k/usr.bin/tvctrl/Makefile:1.7
--- src/sys/arch/x68k/usr.bin/tvctrl/Makefile:1.6	Thu May 19 21:26:39 2011
+++ src/sys/arch/x68k/usr.bin/tvctrl/Makefile	Thu May 19 21:40:11 2011
@@ -1,6 +1,5 @@
-#	$NetBSD: Makefile,v 1.6 2011/05/19 21:26:39 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.7 2011/05/19 21:40:11 tsutsui Exp $
 
-WARNS?=	4
 PROG=tvctrl
 NOMAN=# defined
 



CVS commit: src/distrib/utils/ssh

2011-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 19 22:12:35 UTC 2011

Modified Files:
src/distrib/utils/ssh: Makefile ssh.c

Log Message:
- WARNSfy
- KNF, ANSIfy, misc cosmetics

note: this is small shell, not secure shell.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/ssh/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/ssh/ssh.c

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

Modified files:

Index: src/distrib/utils/ssh/Makefile
diff -u src/distrib/utils/ssh/Makefile:1.7 src/distrib/utils/ssh/Makefile:1.8
--- src/distrib/utils/ssh/Makefile:1.7	Wed Dec 12 00:05:10 2001
+++ src/distrib/utils/ssh/Makefile	Thu May 19 22:12:35 2011
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2001/12/12 00:05:10 tv Exp $
+# $NetBSD: Makefile,v 1.8 2011/05/19 22:12:35 tsutsui Exp $
 # Small Shell (i.e. for boot media)
 
+WARNS?=		4
 PROG=		ssh
 NOMAN=		# defined
 

Index: src/distrib/utils/ssh/ssh.c
diff -u src/distrib/utils/ssh/ssh.c:1.3 src/distrib/utils/ssh/ssh.c:1.4
--- src/distrib/utils/ssh/ssh.c:1.3	Wed Oct 21 23:12:09 2009
+++ src/distrib/utils/ssh/ssh.c	Thu May 19 22:12:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssh.c,v 1.3 2009/10/21 23:12:09 snj Exp $	*/
+/*	$NetBSD: ssh.c,v 1.4 2011/05/19 22:12:35 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -61,7 +61,7 @@
 char cur_path[MAXPATH] = PATH=/bin:/usr/bin;
 
 char rc_name[] = .sshrc;
-char *prompt = ssh: ;
+const char *prompt = ssh: ;
 
 int eflag;	/* exit on cmd failure */
 int iflag;	/* interactive mode (catch interrupts) */
@@ -69,7 +69,7 @@
 int xflag;	/* execution trace */
 
 /* Command file: name, line number, arg count, arg vector */
-char *cf_name;
+const char *cf_name;
 int cf_line;
 int cf_argc;
 char **cf_argv;
@@ -79,16 +79,23 @@
 
 jmp_buf next_cmd;
 
-void catchsig __P((int sig));
-void child_newfd __P((int setfd, char *file, int otype));
-int find_in_path __P((char *cmd, char *filebuf));
-void print_termsig __P((FILE *fp, int cstat));
-int runfile __P((FILE *fp));
+int main(int, char *[]);
+void catchsig(int sig);
+void child_newfd(int setfd, char *file, int otype);
+int find_in_path(char *cmd, char *filebuf);
+void print_termsig(FILE *fp, int cstat);
+int runfile(FILE *fp);
+
+int cmd_eval(int, char *[]);
+int cmd_cd(int, char *[]);
+int cmd_exit(int, char *[]);
+int cmd_help(int, char *[]);
+int cmd_path(int, char *[]);
+int cmd_run(int, char *[]);
 
 
-main(argc, argv)
-	int argc;
-	char **argv;
+int
+main(int argc, char *argv[])
 {
 	struct sigaction sa;
 	FILE *cfp;		/* command file ptr */
@@ -116,7 +123,7 @@
 	}
 	if (error) {
 		fprintf(stderr, usage:  ssh [-eisx] [cmd_file [...]]\n);
-		exit(1);
+		exit(EXIT_FAILURE);
 	}
 	cf_argc = argc - optind;
 	cf_argv = argv[optind];
@@ -145,7 +152,7 @@
 		cfp = fopen(cf_name, r);
 		if (cfp == NULL) {
 			perror(cf_name);
-			exit(1);
+			exit(EXIT_FAILURE);
 		}
 		error = runfile(cfp);
 		fclose(cfp);
@@ -174,13 +181,13 @@
 		}
 	}
 	error = runfile(stdin);
-	exit (error);
+	exit(error);
 }
 
 void
-catchsig(sig)
-	int sig;
+catchsig(int sig)
 {
+
 	longjmp(next_cmd, sig);
 }
 
@@ -189,8 +196,7 @@
  * Returns exit status.
  */
 int
-runfile(cfp)
-	FILE *cfp;
+runfile(FILE *cfp)
 {
 	char ibuf[MAXLINE];
 	char *argv[MAXARGS];
@@ -269,7 +275,7 @@
 			break;
 	}
 	/* return status of last command */
-	return (exitcode);
+	return exitcode;
 }
 
 
@@ -279,9 +285,9 @@
  /
 
 struct cmd {
-	char *name;
-	int (*func)();
-	char *help;
+	const char *name;
+	int (*func)(int, char *[]);
+	const char *help;
 };
 struct cmd cmd_table[];
 
@@ -291,9 +297,7 @@
  * Returns exit status.
  */
 int
-cmd_eval(argc, argv)
-	int argc;
-	char **argv;
+cmd_eval(int argc, char *argv[])
 {
 	struct cmd *cp;
 
@@ -305,7 +309,7 @@
 		if (!strcmp(cp-name, argv[0])) {
 			/* Pass only args to builtin. */
 			--argc; argv++;
-			return (cp-func(argc, argv));
+			return cp-func(argc, argv);
 		}
 	}
 
@@ -313,7 +317,7 @@
 	 * If no matching builtin, let run ...
 	 * have a chance to try an external.
 	 */
-	return (cmd_run(argc, argv));
+	return cmd_run(argc, argv);
 }
 
 /*
@@ -323,15 +327,12 @@
  *  All return an exit status.
  /
 
-char help_cd[] = cd [dir];
+const char help_cd[] = cd [dir];
 
 int
-cmd_cd(argc, argv)
-	int argc;
-	char **argv;
+cmd_cd(int argc, char *argv[])
 {
-	char *dir;
-	int err;
+	const char *dir;
 
 	if (argc  0)
 		dir = argv[0];
@@ -342,17 +343,15 @@
 	}
 	if (chdir(dir)) {
 		perror(dir);
-		return (1);
+		return 1;
 	}
-	return(0);
+	return 0;
 }
 
-char help_exit[] = exit [n];
+const char help_exit[] = exit [n];
 
 int
-cmd_exit(argc, argv)
-	int argc;
-	char **argv;
+cmd_exit(int argc, char **argv)
 {
 	int val = 0;
 
@@ -361,12 +360,10 @@
 	exit(val);
 }
 
-char help_help[] 

CVS commit: src/distrib/utils/tls

2011-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 19 22:14:15 UTC 2011

Modified Files:
src/distrib/utils/tls: Makefile tls.c

Log Message:
- WARNSfy
- KNF, ANSIfy, misc cosmetics


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/tls/Makefile
cvs rdiff -u -r1.4 -r1.5 src/distrib/utils/tls/tls.c

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

Modified files:

Index: src/distrib/utils/tls/Makefile
diff -u src/distrib/utils/tls/Makefile:1.7 src/distrib/utils/tls/Makefile:1.8
--- src/distrib/utils/tls/Makefile:1.7	Wed Dec 12 00:05:11 2001
+++ src/distrib/utils/tls/Makefile	Thu May 19 22:14:15 2011
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2001/12/12 00:05:11 tv Exp $
+# $NetBSD: Makefile,v 1.8 2011/05/19 22:14:15 tsutsui Exp $
 # Tiny ls  (i.e. for boot media)
 
+WARNS?=		4
 PROG=		tls
 NOMAN=		# defined
 

Index: src/distrib/utils/tls/tls.c
diff -u src/distrib/utils/tls/tls.c:1.4 src/distrib/utils/tls/tls.c:1.5
--- src/distrib/utils/tls/tls.c:1.4	Fri Apr  2 15:34:16 2010
+++ src/distrib/utils/tls/tls.c	Thu May 19 22:14:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.4 2010/04/02 15:34:16 christos Exp $	*/
+/*	$NetBSD: tls.c,v 1.5 2011/05/19 22:14:15 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -29,17 +29,19 @@
 #include sys/stat.h
 
 #include dirent.h
+#include err.h
 #include stdio.h
 #include stdlib.h
 #include time.h
+#include unistd.h
 
 int iflag;
 
+int main(int, char *[]);
 void show_long(char *fname);
 
-main(argc, argv)
-	int argc;
-	char **argv;
+int
+main(int argc, char *argv[])
 {
 	DIR *dfp;
 	struct dirent *d;
@@ -56,19 +58,18 @@
 
 	dfp = opendir(.);
 	if (dfp == NULL) {
-		perror(opendir);
-		return;
+		err(EXIT_FAILURE, opendir);
 	}
 
 	while ((d = readdir(dfp)) != NULL)
 		show_long(d-d_name);
 
 	closedir(dfp);
-	exit(0);
+	exit(EXIT_SUCCESS);
 }
 
 /* XXX - This is system dependent... */
-char ifmt_name[16] = {
+const char ifmt_name[16] = {
 	'?',	/* 0: nothing */
 	'P',	/* 1: fifo (pipe) */
 	'C',	/* 2: chr device */
@@ -88,8 +89,7 @@
 };
 
 void
-show_long(fname)
-	char *fname;
+show_long(char *fname)
 {
 	struct stat st;
 	int ifmt;
@@ -105,7 +105,7 @@
 
 	if (iflag) {
 		/* inode number */
-		printf(%6d ,  st.st_ino);
+		printf(%6d ,  (int)st.st_ino);	/* assume small fs */
 	}
 
 	/* fmt/mode */



CVS commit: src

2011-05-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May 19 22:23:12 UTC 2011

Modified Files:
src/common/dist/zlib: gzio.c
src/distrib/utils/zcat: Makefile zcat.c

Log Message:
- WARNSfy
- KNF, ANSIfy, remove __P(), misc cosmetics


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/dist/zlib/gzio.c
cvs rdiff -u -r1.14 -r1.15 src/distrib/utils/zcat/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/zcat/zcat.c

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

Modified files:

Index: src/common/dist/zlib/gzio.c
diff -u src/common/dist/zlib/gzio.c:1.2 src/common/dist/zlib/gzio.c:1.3
--- src/common/dist/zlib/gzio.c:1.2	Fri Jan 27 00:45:27 2006
+++ src/common/dist/zlib/gzio.c	Thu May 19 22:23:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gzio.c,v 1.2 2006/01/27 00:45:27 christos Exp $	*/
+/*	$NetBSD: gzio.c,v 1.3 2011/05/19 22:23:12 tsutsui Exp $	*/
 
 /* gzio.c -- IO on .gz files
  * Copyright (C) 1995-2005 Jean-loup Gailly.
@@ -76,11 +76,15 @@
 
 
 local gzFile gz_open  OF((const char *path, const char *mode, int  fd));
+#ifndef NO_GZCOMPRESS
 local int do_flushOF((gzFile file, int flush));
+#endif
 local intget_byte OF((gz_stream *s));
 local void   check_header OF((gz_stream *s));
 local intdestroy  OF((gz_stream *s));
+#ifndef NO_GZCOMPRESS
 local void   putLong  OF((FILE *file, uLong x));
+#endif
 local uLong  getLong  OF((gz_stream *s));
 
 /* ===
@@ -917,6 +921,7 @@
 return s-transparent;
 }
 
+#ifndef NO_GZCOMPRESS
 /* ===
Outputs a long in LSB order to the given file
 */
@@ -930,6 +935,7 @@
 x = 8;
 }
 }
+#endif
 
 /* ===
Reads a long in LSB order from the given gz_stream. Sets z_err in case

Index: src/distrib/utils/zcat/Makefile
diff -u src/distrib/utils/zcat/Makefile:1.14 src/distrib/utils/zcat/Makefile:1.15
--- src/distrib/utils/zcat/Makefile:1.14	Sat Jan 14 21:15:40 2006
+++ src/distrib/utils/zcat/Makefile	Thu May 19 22:23:12 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2006/01/14 21:15:40 christos Exp $
+# $NetBSD: Makefile,v 1.15 2011/05/19 22:23:12 tsutsui Exp $
 # Small zcat (i.e. for install media)
 #
 # Note: gzio.c is compiled here so that crunchgen will assume
@@ -8,6 +8,7 @@
 
 SRCDIR=		${.CURDIR}/../../../common/dist/zlib
 
+WARNS?=		4
 PROG=		zcat
 NOMAN=		# defined
 

Index: src/distrib/utils/zcat/zcat.c
diff -u src/distrib/utils/zcat/zcat.c:1.3 src/distrib/utils/zcat/zcat.c:1.4
--- src/distrib/utils/zcat/zcat.c:1.3	Thu Nov 12 16:49:47 1998
+++ src/distrib/utils/zcat/zcat.c	Thu May 19 22:23:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: zcat.c,v 1.3 1998/11/12 16:49:47 thorpej Exp $	*/
+/*	$NetBSD: zcat.c,v 1.4 2011/05/19 22:23:12 tsutsui Exp $	*/
 
 /* mini zcat.c -- a minimal zcat using the zlib compression library
  * Copyright (C) 1995-1996 Jean-loup Gailly.
@@ -22,43 +22,45 @@
 
 char *prog;
 
-void error   __P((const char *msg));
-void gz_uncompress   __P((gzFile in, FILE   *out));
-int  main__P((int argc, char *argv[]));
+void error(const char *msg);
+void gz_uncompress(gzFile in, FILE   *out);
+int  main(int argc, char *argv[]);
 
 /* ===
  * Display error message and exit
  */
-void error(msg)
-const char *msg;
+void error(const char *msg)
 {
-fprintf(stderr, %s: %s\n, prog, msg);
-exit(1);
+
+	fprintf(stderr, %s: %s\n, prog, msg);
+	exit(EXIT_SUCCESS);
 }
 
 /* ===
  * Uncompress input to output then close both files.
  */
-void gz_uncompress(in, out)
-gzFile in;
-FILE   *out;
-{
-char buf[BUFLEN];
-int len;
-int err;
-
-for (;;) {
-len = gzread(in, buf, sizeof(buf));
-if (len  0) error (gzerror(in, err));
-if (len == 0) break;
+void gz_uncompress(gzFile in, FILE *out)
+{
+	char buf[BUFLEN];
+	int len;
+	int err;
+
+	for (;;) {
+		len = gzread(in, buf, sizeof(buf));
+		if (len  0)
+			error (gzerror(in, err));
+		if (len == 0)
+			break;
 
-if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
-	error(failed fwrite);
+		if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
+			error(failed fwrite);
+		}
 	}
-}
-if (fclose(out)) error(failed fclose);
+	if (fclose(out))
+		error(failed fclose);
 
-if (gzclose(in) != Z_OK) error(failed gzclose);
+	if (gzclose(in) != Z_OK)
+		error(failed gzclose);
 }
 
 
@@ -66,39 +68,37 @@
  * Usage:  zcat [files...]
  */
 
-int main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
 {
-gzFile zfp;
+	gzFile zfp;
 
 	/* save program name and skip */
-prog = argv[0];
-argc--, argv++;
+	prog = 

CVS commit: src/usr.bin/error

2011-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 19 22:55:54 UTC 2011

Modified Files:
src/usr.bin/error: error.1 error.h main.c touch.c

Log Message:
- use getopt
- use err
- add -p filelevel to chop levels like patch
- document all the options


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/error/error.1
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/error/error.h
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/error/main.c
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/error/touch.c

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

Modified files:

Index: src/usr.bin/error/error.1
diff -u src/usr.bin/error/error.1:1.14 src/usr.bin/error/error.1:1.15
--- src/usr.bin/error/error.1:1.14	Mon Apr  5 17:18:20 2010
+++ src/usr.bin/error/error.1	Thu May 19 18:55:53 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: error.1,v 1.14 2010/04/05 21:18:20 joerg Exp $
+.\	$NetBSD: error.1,v 1.15 2011/05/19 22:55:53 christos Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)error.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd June 6, 1993
+.Dd May 19, 2011
 .Dt ERROR 1
 .Os
 .Sh NAME
@@ -37,12 +37,15 @@
 .Nd analyze and disperse compiler error messages
 .Sh SYNOPSIS
 .Nm
+.Op Fl I Ar ignorefile
 .Op Fl n
-.Op Fl s
+.Pp Fl p Ar filelevel
 .Op Fl q
-.Op Fl v
+.Op Fl S
+.Op Fl s
+.Op Fl T
 .Op Fl t Ar suffixlist
-.Op Fl I Ar ignorefile
+.Op Fl v
 .Op name
 .Sh DESCRIPTION
 .Nm
@@ -83,6 +86,8 @@
 or
 .Xr \ed 1
 from standard places.
+.It Fl T
+Terse output.
 .It Fl t
 Take the following argument as a suffix list.
 Files whose suffixes do not appear in the suffix list are not touched.
@@ -94,6 +99,12 @@
 allows
 .Nm
 to touch files ending with ``.c'', ``.y'', ``.foo*'' and ``.h''.
+.It Fl p Ar filelevel
+Interpret filenumber as a level of path component names to skip,
+similar to 
+.Xr patch 1 .
+.It Fl S
+Show the errors in unsorted order (as they come from the error file).
 .It Fl s
 Print out
 .Em statistics

Index: src/usr.bin/error/error.h
diff -u src/usr.bin/error/error.h:1.15 src/usr.bin/error/error.h:1.16
--- src/usr.bin/error/error.h:1.15	Thu Aug 13 02:59:37 2009
+++ src/usr.bin/error/error.h	Thu May 19 18:55:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: error.h,v 1.15 2009/08/13 06:59:37 dholland Exp $	*/
+/*	$NetBSD: error.h,v 1.16 2011/05/19 22:55:53 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -88,6 +88,8 @@
 extern const char *class_table[];
 extern int class_count[];
 
+extern size_t filelevel;
+
 #define nunknown	class_count[C_UNKNOWN]
 #define nignore		class_count[C_IGNORE]
 #define nsyncerrors	class_count[C_SYNC]

Index: src/usr.bin/error/main.c
diff -u src/usr.bin/error/main.c:1.17 src/usr.bin/error/main.c:1.18
--- src/usr.bin/error/main.c:1.17	Thu Aug 13 02:59:37 2009
+++ src/usr.bin/error/main.c	Thu May 19 18:55:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.17 2009/08/13 06:59:37 dholland Exp $	*/
+/*	$NetBSD: main.c,v 1.18 2011/05/19 22:55:53 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)main.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: main.c,v 1.17 2009/08/13 06:59:37 dholland Exp $);
+__RCSID($NetBSD: main.c,v 1.18 2011/05/19 22:55:53 christos Exp $);
 #endif /* not lint */
 
 #include signal.h
@@ -48,6 +48,7 @@
 #include ctype.h
 #include stdlib.h
 #include string.h
+#include err.h
 #include error.h
 #include pathnames.h
 
@@ -57,6 +58,7 @@
 int nignored;
 char **names_ignored;
 
+size_t filelevel = 0;
 int nerrors = 0;
 Eptr er_head;
 static Eptr *errors;
@@ -81,11 +83,10 @@
 static int errorsort(const void *, const void *);
 static void forkvi(int, char **);
 static void try(const char *, int, char **);
+static void usage(void) __attribute__((__noreturn__));
 
 /*
- * error [-I ignorename] [-n] [-q] [-t suffixlist] [-s] [-v] [infile]
- *
- *	-T:	terse output
+ * error [-nqSsTv] [-I ignorename] [-t suffixlist] [-p level] infile
  *
  *	-I:	the following name, `ignorename' contains a list of
  *		function names that are not to be treated as hard errors.
@@ -93,42 +94,38 @@
  *
  *	-n:	don't touch ANY files!
  *
+ *	-p:	take the next argument as the number of levels to skip
+ *		from the filename, like perl.
+ *
  *	-q:	The user is to be queried before touching each
  *		file; if not specified, all files with hard, non
  *		ignorable errors are touched (assuming they can be).
  *
+ *	-S:	show the errors in unsorted order
+ *		(as they come from the error file)
+ *
+ *	-s:	print a summary of the error's categories.
+ *
+ *	-T:	terse output
+ *
  *	-t:	touch only files ending with the list of suffixes, each
  *		suffix preceded by a dot.
  *		eg, -t .c.y.l
  *		will touch only files ending with .c, .y or .l
  *
- *	-s:	print a summary of the error's categories.
- *
  *	-v:	after touching all files, overlay vi(1), ex(1) or ed(1)
  *		on top of error, entered in the first file 

CVS commit: src/sys/dev/mii

2011-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 20 00:46:54 UTC 2011

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
Add Intel 82579


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/mii/miidevs

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/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.99 src/sys/dev/mii/miidevs:1.100
--- src/sys/dev/mii/miidevs:1.99	Wed Jan 26 18:39:04 2011
+++ src/sys/dev/mii/miidevs	Fri May 20 00:46:53 2011
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.99 2011/01/26 18:39:04 bouyer Exp $
+$NetBSD: miidevs,v 1.100 2011/05/20 00:46:53 msaitoh Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -210,6 +210,7 @@
 model yyINTEL I82553		0x0035 i82553 10/100 media interface
 model yyINTEL I82566		0x0039 i82566 10/100/1000 media interface
 model INTEL I82577		0x0005 i82577 10/100/1000 media interface
+model INTEL I82579		0x0009 i82579 10/100/1000 media interface
 model xxMARVELL I82563		0x000a i82563 10/100/1000 media interface
 
 model yyINTEL IGP01E1000	0x0038 Intel IGP01E1000 Gigabit PHY



CVS commit: src/sys/dev/mii

2011-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 20 00:47:11 UTC 2011

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.102 src/sys/dev/mii/miidevs.h:1.103
--- src/sys/dev/mii/miidevs.h:1.102	Wed Jan 26 18:39:25 2011
+++ src/sys/dev/mii/miidevs.h	Fri May 20 00:47:11 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.102 2011/01/26 18:39:25 bouyer Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.103 2011/05/20 00:47:11 msaitoh Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.99 2011/01/26 18:39:04 bouyer Exp
+ *	NetBSD: miidevs,v 1.100 2011/05/20 00:46:53 msaitoh Exp
  */
 
 /*-
@@ -291,6 +291,8 @@
 #define	MII_STR_yyINTEL_I82566	i82566 10/100/1000 media interface
 #define	MII_MODEL_INTEL_I82577	0x0005
 #define	MII_STR_INTEL_I82577	i82577 10/100/1000 media interface
+#define	MII_MODEL_INTEL_I82579	0x0009
+#define	MII_STR_INTEL_I82579	i82579 10/100/1000 media interface
 #define	MII_MODEL_xxMARVELL_I82563	0x000a
 #define	MII_STR_xxMARVELL_I82563	i82563 10/100/1000 media interface
 

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.90 src/sys/dev/mii/miidevs_data.h:1.91
--- src/sys/dev/mii/miidevs_data.h:1.90	Wed Jan 26 18:39:25 2011
+++ src/sys/dev/mii/miidevs_data.h	Fri May 20 00:47:11 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.90 2011/01/26 18:39:25 bouyer Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.91 2011/05/20 00:47:11 msaitoh Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.99 2011/01/26 18:39:04 bouyer Exp
+ *	NetBSD: miidevs,v 1.100 2011/05/20 00:46:53 msaitoh Exp
  */
 
 /*-
@@ -111,6 +111,7 @@
  { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_I82553, MII_STR_yyINTEL_I82553 },
  { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_I82566, MII_STR_yyINTEL_I82566 },
  { MII_OUI_INTEL, MII_MODEL_INTEL_I82577, MII_STR_INTEL_I82577 },
+ { MII_OUI_INTEL, MII_MODEL_INTEL_I82579, MII_STR_INTEL_I82579 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_I82563, MII_STR_xxMARVELL_I82563 },
  { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_IGP01E1000, MII_STR_yyINTEL_IGP01E1000 },
  { MII_OUI_JMICRON, MII_MODEL_JMICRON_JMC250, MII_STR_JMICRON_JMC250 },



CVS commit: src/sys/dev/pci

2011-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 20 00:50:19 UTC 2011

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Intel 82567V, 82580 Quad-1000BaseX and Hanksvill with ICH10.


To generate a diff of this commit:
cvs rdiff -u -r1.1076 -r1.1077 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1076 src/sys/dev/pci/pcidevs:1.1077
--- src/sys/dev/pci/pcidevs:1.1076	Sun May 15 00:59:36 2011
+++ src/sys/dev/pci/pcidevs	Fri May 20 00:50:19 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1076 2011/05/15 00:59:36 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1077 2011/05/20 00:50:19 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2502,6 +2502,8 @@
 product INTEL 82576_NS_SERDES 	0x1518	82576 gigabit Ethernet (SERDES)
 product INTEL 82580_ER 		0x151d	82580 1000BaseT Ethernet
 product INTEL 82580_ER_DUAL 	0x151e	82580 dual-1000BaseT Ethernet
+product INTEL 82801J_D_BM_V	0x1525	82567V LAN Controller
+product INTEL 82580_QUAD_FIBER 	0x1527	82580 quad-1000BaseX Ethernet
 product INTEL 80960_RP		0x1960	ROB-in i960RP Microprocessor
 product INTEL 80960RM_2		0x1962	i960 RM PCI-PCI
 product INTEL 82840_HB		0x1a21	82840 Host
@@ -3046,6 +3048,8 @@
 product INTEL CP_SS_REGS	0xd156	Core Processor Semaphore and Scratchpad Registers
 product INTEL CP_SCS_REGS	0xd157	Core Processor System Control and Status Registers
 product INTEL CP_MISC_REGS	0xd158	Core Processor Miscellaneous Registers
+product INTEL HANKSVILLE	0xF0FE	HANKSVILLE LAN Controller
+
 
 /* Intergraph products */
 product INTERGRAPH 4D50T	0x00e4	Powerstorm 4D50T



CVS commit: src/sys/dev/pci

2011-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 20 00:57:43 UTC 2011

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

Log Message:
- Add PCH2 support.
  - Add 82579 support.
  - Change PBA size for PCH from 10K to 26K as FreeBSD's em-7.1.7
- Add yet another 82567V support.
- Add ICH10+HANKSVILL support.
- Add 82580 quad-1000BaseX support.


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/sys/dev/pci/if_wm.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.220 src/sys/dev/pci/if_wm.c:1.221
--- src/sys/dev/pci/if_wm.c:1.220	Tue Feb 22 21:19:30 2011
+++ src/sys/dev/pci/if_wm.c	Fri May 20 00:57:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.220 2011/02/22 21:19:30 dyoung Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.221 2011/05/20 00:57:42 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.220 2011/02/22 21:19:30 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.221 2011/05/20 00:57:42 msaitoh Exp $);
 
 #include rnd.h
 
@@ -579,6 +579,7 @@
 static int32_t	wm_read_ich8_byte(struct wm_softc *, uint32_t, uint8_t *);
 static int32_t	wm_read_ich8_word(struct wm_softc *, uint32_t, uint16_t *);
 static void	wm_82547_txfifo_stall(void *);
+static void	wm_gate_hw_phy_config_ich8lan(struct wm_softc *, int);
 static int	wm_check_mng_mode(struct wm_softc *);
 static int	wm_check_mng_mode_ich8lan(struct wm_softc *);
 static int	wm_check_mng_mode_82574(struct wm_softc *);
@@ -593,8 +594,11 @@
 static void	wm_igp3_phy_powerdown_workaround_ich8lan(struct wm_softc *);
 #endif
 static void	wm_hv_phy_workaround_ich8lan(struct wm_softc *);
+static void	wm_lv_phy_workaround_ich8lan(struct wm_softc *);
 static void	wm_k1_gig_workaround_hv(struct wm_softc *, int);
+static void	wm_set_mdio_slow_mode_hv(struct wm_softc *);
 static void	wm_configure_k1_ich8lan(struct wm_softc *, int);
+static void	wm_smbustopci(struct wm_softc *);
 static void	wm_set_pcie_completion_timeout(struct wm_softc *);
 static void	wm_reset_init_script_82575(struct wm_softc *);
 static void	wm_release_manageability(struct wm_softc *);
@@ -910,6 +914,12 @@
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82801J_R_BM_V,
 	  82567V-2 LAN Controller,
 	  WM_T_ICH10,		WMP_F_1000T },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82801J_D_BM_V,
+	  82567V-3? LAN Controller,
+	  WM_T_ICH10,		WMP_F_1000T },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_HANKSVILLE,
+	  HANKSVILLE LAN Controller,
+	  WM_T_ICH10,		WMP_F_1000T },
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_PCH_M_LM,
 	  PCH LAN (82577LM) Controller,
 	  WM_T_PCH,		WMP_F_1000T },
@@ -921,6 +931,12 @@
 	  WM_T_PCH,		WMP_F_1000T },
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_PCH_D_DC,
 	  PCH LAN (82578DC) Controller,
+	  WM_T_PCH2,		WMP_F_1000T },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_PCH2_LV_LM,
+	  PCH2 LAN (82579LM) Controller,
+	  WM_T_PCH2,		WMP_F_1000T },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_PCH2_LV_V,
+	  PCH2 LAN (82579V) Controller,
 	  WM_T_PCH,		WMP_F_1000T },
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82575EB_COPPER,
 	  82575EB dual-1000baseT Ethernet,
@@ -988,6 +1004,9 @@
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82580_ER_DUAL,
 	  82580 dual-1000BaseT Ethernet,
 	  WM_T_82580ER,		WMP_F_1000T },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82580_QUAD_FIBER,
+	  82580 quad-1000BaseX Ethernet,
+	  WM_T_82580,		WMP_F_1000X },
 	{ 0,			0,
 	  NULL,
 	  0,			0 },
@@ -1284,9 +1303,10 @@
 		sc-sc_flags |= WM_F_PCIE;
 		if ((sc-sc_type != WM_T_ICH8)  (sc-sc_type != WM_T_ICH9)
 		 (sc-sc_type != WM_T_ICH10)
-		 (sc-sc_type != WM_T_PCH)) {
+		 (sc-sc_type != WM_T_PCH)
+		 (sc-sc_type != WM_T_PCH2)) {
 			sc-sc_flags |= WM_F_EEPROM_SEMAPHORE;
-			/* ICH* and PCH have no PCIe capability registers */
+			/* ICH* and PCH* have no PCIe capability registers */
 			if (pci_get_capability(pa-pa_pc, pa-pa_tag,
 PCI_CAP_PCIEXPRESS, sc-sc_pcixe_capoff,
 NULL) == 0)
@@ -1452,6 +1472,10 @@
 	CSR_READ(sc, WMREG_COLC);
 	CSR_READ(sc, WMREG_RXERRC);
 
+	/* get PHY control from SMBus to PCIe */
+	if ((sc-sc_type == WM_T_PCH) || (sc-sc_type == WM_T_PCH2))
+		wm_smbustopci(sc);
+
 	/*
 	 * Reset the chip to a known state.
 	 */
@@ -1468,6 +1492,7 @@
 	case WM_T_ICH9:
 	case WM_T_ICH10:
 	case WM_T_PCH:
+	case WM_T_PCH2:
 		if (wm_check_mng_mode(sc) != 0)
 			wm_get_hw_control(sc);
 		break;
@@ -1542,6 +1567,7 @@
 	case WM_T_ICH9:
 	case WM_T_ICH10:
 	case WM_T_PCH:
+	case WM_T_PCH2:
 		/* FLASH */
 		sc-sc_flags |= WM_F_EEPROM_FLASH | WM_F_SWFWHW_SYNC;
 		memtype = pci_mapreg_type(pa-pa_pc, pa-pa_tag, WM_ICH8_FLASH);
@@ -1681,6 +1707,7 @@
 	case WM_T_ICH9:
 	case WM_T_ICH10:
 	case WM_T_PCH:
+	case WM_T_PCH2:
 		apme_mask = WUC_APME;
 		eeprom_data = CSR_READ(sc, WMREG_WUC);
 		break;
@@ -1782,7 +1809,7 @@
 	 */
 	if (sc-sc_type == 

CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:22:37 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc: vidc.c wscons.c
Added Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc: wscons.h

Log Message:
add missing includes and prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.c
cvs rdiff -u -r0 -r1.1 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.h

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c:1.6 xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c:1.7
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c:1.6	Mon Aug 14 18:12:59 2006
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c	Thu May 19 21:22:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vidc.c,v 1.6 2006/08/14 22:12:59 bjh21 Exp $	*/
+/*	$NetBSD: vidc.c,v 1.7 2011/05/20 01:22:37 christos Exp $	*/
 
 /*
  * Copyright (c) 1999 Neil A. Carson  Mark Brinicombe
@@ -65,6 +65,9 @@
 #include colormap.h
 #include colormapst.h
 #include resource.h
+#include wscons.h
+#include mi.h
+#include cfb/cfb.h
 
 /* #define DEBUG */
 

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.c:1.4 xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.c:1.5
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.c:1.4	Sun Mar 14 08:36:48 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.c	Thu May 19 21:22:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wscons.c,v 1.4 2004/03/14 13:36:48 bjh21 Exp $	*/
+/*	$NetBSD: wscons.c,v 1.5 2011/05/20 01:22:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001 Ben Harris
@@ -53,6 +53,7 @@
 #include colormap.h
 #include colormapst.h
 #include resource.h
+#include wscons.h
 
 /* NetBSD headers wscons specific */
 #include dev/wscons/wsconsio.h

Added files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.h
diff -u /dev/null xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.h:1.1
--- /dev/null	Thu May 19 21:22:37 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/wscons.h	Thu May 19 21:22:37 2011
@@ -0,0 +1,5 @@
+void wsdisplay_write_palette(int, int, int, int);
+void wsmouse_io(void);
+int wsmouse_init(void);
+int wskbd_init(void);
+void wsdisplay_shutdown(void);



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:28:03 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga: tgamap.h

Log Message:
add missing prototype


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.1	Sat Jan 17 23:13:22 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h	Thu May 19 21:28:02 2011
@@ -18,6 +18,9 @@
 #define alphaTgaTEOps		alphaTga32TEOps
 #define alphaTgaNonTEOps	alphaTga32NonTEOps
 
+void alphaTgaDoBitbltSimple(unsigned int *, unsigned int *, unsigned int,
+unsigned int, tga_reg_t **, int, int, int, int, int, int, int, int, int);
+
 #else
 #error Unsupported PSZ
 #endif



CVS commit: src/sys/arch/amiga/stand/loadkmap

2011-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 20 01:28:40 UTC 2011

Modified Files:
src/sys/arch/amiga/stand/loadkmap: loadkmap.c

Log Message:
typo


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/stand/loadkmap/loadkmap.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/amiga/stand/loadkmap/loadkmap.c
diff -u src/sys/arch/amiga/stand/loadkmap/loadkmap.c:1.7 src/sys/arch/amiga/stand/loadkmap/loadkmap.c:1.8
--- src/sys/arch/amiga/stand/loadkmap/loadkmap.c:1.7	Wed May 18 22:54:58 2011
+++ src/sys/arch/amiga/stand/loadkmap/loadkmap.c	Thu May 19 21:28:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadkmap.c,v 1.7 2011/05/19 02:54:58 christos Exp $	*/
+/*	$NetBSD: loadkmap.c,v 1.8 2011/05/20 01:28:40 christos Exp $	*/
 
 #include sys/types.h
 #include sys/stat.h
@@ -8,7 +8,7 @@
 #include stdio.h
 #include stdlib.h
 #include unistd.h
-#Include fcntl.h
+#include fcntl.h
 
 
 void load_kmap(const char *);



CVS commit: src/sys/arch/atari/stand/loadkmap

2011-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 20 01:29:30 UTC 2011

Modified Files:
src/sys/arch/atari/stand/loadkmap: loadkmap.c

Log Message:
add missing include


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/loadkmap/loadkmap.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/atari/stand/loadkmap/loadkmap.c
diff -u src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.9 src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.10
--- src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.9	Wed May 18 22:56:03 2011
+++ src/sys/arch/atari/stand/loadkmap/loadkmap.c	Thu May 19 21:29:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadkmap.c,v 1.9 2011/05/19 02:56:03 christos Exp $	*/
+/*	$NetBSD: loadkmap.c,v 1.10 2011/05/20 01:29:30 christos Exp $	*/
 
 #include sys/types.h
 #include sys/stat.h
@@ -6,6 +6,7 @@
 #include ../../dev/iteioctl.h
 #include ../../dev/kbdmap.h
 #include stdio.h
+#include string.h
 #include stdlib.h
 #include unistd.h
 #include fcntl.h



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:39:25 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k: mac68k.h

Log Message:
add prototypes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h:1.2	Fri Jan  9 22:13:08 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h	Thu May 19 21:39:25 2011
@@ -91,3 +91,7 @@
 extern int mac_scrs;
 
 extern miPointerScreenFuncRec mac_mousefuncs;
+
+
+void mac68k_processkbd(DeviceIntPtr, adb_event_t *);
+void mac68k_processmouse(DeviceIntPtr, adb_event_t *);



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:45:36 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips: newsmips.h
newsmipsFB.c

Log Message:
Add include files and missing prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmips.h \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsFB.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmips.h
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmips.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmips.h:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmips.h:1.1	Sun Aug  1 14:46:49 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmips.h	Thu May 19 21:45:36 2011
@@ -151,6 +151,11 @@
 	FatalError a;			\
 }
 
+void newsmipsColormapInit(ScreenPtr);
+
+/*
+ * newsmipsColormap.c
+ */
 /*
  * newsmipsInit.c
  */
@@ -183,6 +188,7 @@
 pointer newsmipsMemoryMap(size_t, off_t, int);
 Bool newsmipsScreenInit(ScreenPtr);
 newsmipsScreenPtr newsmipsGetScreenPrivate(ScreenPtr);
+Bool newsmipsAllocateScreenPrivate(ScreenPtr);
 
 /*
  * newsmipsFB.c
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsFB.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsFB.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsFB.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsFB.c:1.1	Sun Aug  1 14:46:49 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsFB.c	Thu May 19 21:45:36 2011
@@ -31,6 +31,7 @@
 
 #define	FORCE_SEPARATE_PRIVATE
 #include cfb.h
+#include mi.h
 #include stdio.h
 
 extern BSFuncRec cfbBSFuncRec;



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:48:17 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb: decCfb.c

Log Message:
ansify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c:1.1	Sun Jan 18 00:21:41 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c	Thu May 19 21:48:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: decCfb.c,v 1.1 2004/01/18 05:21:41 rtr Exp $ */
+/* $NetBSD: decCfb.c,v 1.2 2011/05/20 01:48:17 christos Exp $ */
 
 /* XConsortium: sunCfb.c,v 1.15.1.2 95/01/12 18:54:42 kaleb Exp */
 /* XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.2 1995/02/12 02:36:22 dawes Exp */
@@ -89,11 +89,11 @@
 #include dec.h
 #include cfb.h
 
-Bool decCFBInit (screen, pScreen, argc, argv)
-int		  screen;	/* what screen am I going to be */
-ScreenPtr	  pScreen;  	/* The Screen to initialize */
-int		  argc;		/* The number of the Server's arguments. */
-char	  **argv;   	/* The arguments themselves. Don't change! */
+Bool decCFBInit (
+int		  screen,	/* what screen am I going to be */
+ScreenPtr	  pScreen,  	/* The Screen to initialize */
+int		  argc,		/* The number of the Server's arguments. */
+char	  **argv)   	/* The arguments themselves. Don't change! */
 {
 	unsigned char *fb;
 	size_t sz;
@@ -144,13 +144,13 @@
 }
 
 Bool
-decCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)
-register ScreenPtr pScreen;
-pointer pbits;		/* pointer to screen bitmap */
-int xsize, ysize;		/* in pixels */
-int dpix, dpiy;		/* dots per inch */
-int width;			/* pixel width of frame buffer */
-int	bpp;			/* bits per pixel of root */
+decCfbSetupScreen(
+ScreenPtr pScreen,
+pointer pbits,		/* pointer to screen bitmap */
+int xsize, int ysize,	/* in pixels */
+int dpix, int dpiy,		/* dots per inch */
+int width,			/* pixel width of frame buffer */
+int	bpp)			/* bits per pixel of root */
 {
 switch (bpp) {
 case 32:
@@ -172,13 +172,13 @@
 }
 
 Bool
-decCfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)
-register ScreenPtr pScreen;
-pointer pbits;		/* pointer to screen bitmap */
-int xsize, ysize;		/* in pixels */
-int dpix, dpiy;		/* dots per inch */
-int width;			/* pixel width of frame buffer */
-int bpp;			/* bits per pixel of root */
+decCfbFinishScreenInit(
+ScreenPtr pScreen,
+pointer pbits,		/* pointer to screen bitmap */
+int xsize, int ysize,	/* in pixels */
+int dpix, int dpiy,		/* dots per inch */
+int width,			/* pixel width of frame buffer */
+int bpp)			/* bits per pixel of root */
 {
 Bool retval;
 
@@ -209,13 +209,13 @@
 }
 
 Bool
-decCfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)
-register ScreenPtr pScreen;
-pointer pbits;		/* pointer to screen bitmap */
-int xsize, ysize;		/* in pixels */
-int dpix, dpiy;		/* dots per inch */
-int width;			/* pixel width of frame buffer */
-int bpp;			/* bits per pixel of root */
+decCfbScreenInit(
+ScreenPtr pScreen,
+pointer pbits,		/* pointer to screen bitmap */
+int xsize, int ysize,	/* in pixels */
+int dpix, int dpiy,		/* dots per inch */
+int width,			/* pixel width of frame buffer */
+int bpp)			/* bits per pixel of root */
 {
 if (!decCfbSetupScreen(pScreen, pbits, xsize, ysize, dpix,
 	dpiy, width, bpp))



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

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:49:48 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src: crime_cursor.c

Log Message:
add missing include


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_cursor.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-crime/dist/src/crime_cursor.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_cursor.c:1.2 xsrc/external/mit/xf86-video-crime/dist/src/crime_cursor.c:1.3
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_cursor.c:1.2	Wed Jun 24 20:58:46 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_cursor.c	Thu May 19 21:49:48 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_cursor.c,v 1.2 2009/06/25 00:58:46 macallan Exp $ */
+/* $NetBSD: crime_cursor.c,v 1.3 2011/05/20 01:49:48 christos Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -40,6 +40,7 @@
 #include sys/types.h
 #include sys/time.h
 #include sys/endian.h
+#include sys/ioctl.h
 #include dev/wscons/wsconsio.h
 #include errno.h
 



CVS commit: src/sys/dev/pci

2011-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 20 01:51:36 UTC 2011

Modified Files:
src/sys/dev/pci: if_wmreg.h if_wmvar.h

Log Message:
Add PCH2 support.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/if_wmreg.h
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_wmvar.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/pci/if_wmreg.h
diff -u src/sys/dev/pci/if_wmreg.h:1.44 src/sys/dev/pci/if_wmreg.h:1.45
--- src/sys/dev/pci/if_wmreg.h:1.44	Wed Jul 14 00:11:06 2010
+++ src/sys/dev/pci/if_wmreg.h	Fri May 20 01:51:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.44 2010/07/14 00:11:06 msaitoh Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.45 2011/05/20 01:51:36 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -192,6 +192,8 @@
 #define CTRL_D_UD_POL	(1U  14)	/* Defined polarity of Dock/Undock indication in SDP[0] */
 #define CTRL_F_PHY_R 	(1U  15)	/* Reset both PHY ports, through PHYRST_N pin */
 #define CTRL_EXT_LINK_EN (1U  16)	/* enable link status from external LINK_0 and LINK_1 pins */
+#define CTRL_LANPHYPC_OVERRIDE (1U  16) /* SW control of LANPHYPC */
+#define CTRL_LANPHYPC_VALUE (1U  17)	/* SW value of LANPHYPC */
 #define	CTRL_SWDPINS_SHIFT	18
 #define	CTRL_SWDPINS_MASK	0x0f
 #define	CTRL_SWDPIN(x)		(1U  (CTRL_SWDPINS_SHIFT + (x)))
@@ -675,6 +677,7 @@
 #define	PBA_20K		0x0014
 #define	PBA_22K		0x0016
 #define	PBA_24K		0x0018
+#define	PBA_26K		0x001a
 #define	PBA_30K		0x001e
 #define	PBA_32K		0x0020
 #define	PBA_35K		0x0023
@@ -856,7 +859,8 @@
 #define	FWSM_MODE_SHIFT		0x1
 #define	MNG_ICH_IAMT_MODE	0x2	/* PT mode? */
 #define	MNG_IAMT_MODE		0x3
-#define FWSM_RSPCIPHY	0x0040	/* Reset PHY on PCI reset */
+#define FWSM_RSPCIPHY		0x0040	/* Reset PHY on PCI reset */
+#define FWSM_FW_VALID		0x8000 /* FW established a valid mode */
 
 #define	WMREG_SW_FW_SYNC 0x5b5c	/* software-firmware semaphore */
 #define	SWFW_EEP_SM		0x0001 /* eeprom access */
@@ -878,6 +882,7 @@
 #define EXTCNFCTR_D_UD_OWNER		0x0010
 #define EXTCNFCTR_MDIO_SW_OWNERSHIP	0x0020
 #define EXTCNFCTR_MDIO_HW_OWNERSHIP	0x0040
+#define EXTCNFCTR_GATE_PHY_CFG		0x0080
 #define EXTCNFCTR_EXT_CNF_POINTER	0x0FFF
 #define E1000_EXTCNF_CTRL_SWFLAG	EXTCNFCTR_MDIO_SW_OWNERSHIP
 

Index: src/sys/dev/pci/if_wmvar.h
diff -u src/sys/dev/pci/if_wmvar.h:1.11 src/sys/dev/pci/if_wmvar.h:1.12
--- src/sys/dev/pci/if_wmvar.h:1.11	Sun Mar  7 09:05:19 2010
+++ src/sys/dev/pci/if_wmvar.h	Fri May 20 01:51:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmvar.h,v 1.11 2010/03/07 09:05:19 msaitoh Exp $	*/
+/*	$NetBSD: if_wmvar.h,v 1.12 2011/05/20 01:51:36 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -123,6 +123,7 @@
 	WM_T_ICH9,			/* ICH9 LAN */
 	WM_T_ICH10,			/* ICH10 LAN */
 	WM_T_PCH,			/* PCH LAN */
+	WM_T_PCH2,			/* PCH2 LAN */
 } wm_chip_type;
 
 typedef enum {
@@ -135,8 +136,9 @@
 	WMPHY_IGP_3,
 	WMPHY_IFE,
 	WMPHY_BM,
+	WMPHY_82577,
 	WMPHY_82578,
-	WMPHY_82577
+	WMPHY_82579
 } wm_phy_type;
 
 



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

2011-05-19 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Fri May 20 01:51:52 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-igs/dist/src: igs.h

Log Message:
add missing include


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-video-igs/dist/src/igs.h

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-igs/dist/src/igs.h
diff -u xsrc/external/mit/xf86-video-igs/dist/src/igs.h:1.2 xsrc/external/mit/xf86-video-igs/dist/src/igs.h:1.3
--- xsrc/external/mit/xf86-video-igs/dist/src/igs.h:1.2	Thu May 20 03:55:19 2010
+++ xsrc/external/mit/xf86-video-igs/dist/src/igs.h	Thu May 19 21:51:52 2011
@@ -1,5 +1,5 @@
 /* $OpenBSD: wsfb_driver.c,v 1.18 2003/04/02 16:42:13 jason Exp $ */
-/* $NetBSD: igs.h,v 1.2 2010/05/20 07:55:19 macallan Exp $ */
+/* $NetBSD: igs.h,v 1.3 2011/05/20 01:51:52 christos Exp $ */
 /*
  * Copyright (c) 2001 Matthieu Herrb
  *		 2009 Michael Lorenz
@@ -325,6 +325,10 @@
 
 #define IGS_MIN_VCO	115000
 
+#ifdef __NetBSD__
+#include arm/pio.h
+#endif
+
 static __inline uint8_t
 igs_idx_read(u_int idxport, uint8_t idx)
 {



CVS commit: src

2011-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 20 01:59:15 UTC 2011

Modified Files:
src/distrib/sets/lists/base: mi
src/external/intel-fw-public: Makefile
src/sys/dev/pci: if_iwn.c
Added Files:
src/external/intel-fw-public/iwl6005: Makefile
src/external/intel-fw-public/iwl6005/dist:
LICENSE.iwlwifi-6000g2a-ucode README.iwlwifi-6000g2a-ucode
iwlwifi-6000g2a-5.ucode
src/external/intel-fw-public/iwl6050: Makefile
src/external/intel-fw-public/iwl6050/dist: LICENSE.iwlwifi-6050-ucode
README.iwlwifi-6050-ucode iwlwifi-6050-5.ucode

Log Message:
Add support for 6050(6250 and 6150) and 6005(6205).
TODO: update iwn.4 manpage.


To generate a diff of this commit:
cvs rdiff -u -r1.938 -r1.939 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.5 -r1.6 src/external/intel-fw-public/Makefile
cvs rdiff -u -r0 -r1.1 src/external/intel-fw-public/iwl6005/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/intel-fw-public/iwl6005/dist/LICENSE.iwlwifi-6000g2a-ucode \
src/external/intel-fw-public/iwl6005/dist/README.iwlwifi-6000g2a-ucode \
src/external/intel-fw-public/iwl6005/dist/iwlwifi-6000g2a-5.ucode
cvs rdiff -u -r0 -r1.1 src/external/intel-fw-public/iwl6050/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/intel-fw-public/iwl6050/dist/LICENSE.iwlwifi-6050-ucode \
src/external/intel-fw-public/iwl6050/dist/README.iwlwifi-6050-ucode \
src/external/intel-fw-public/iwl6050/dist/iwlwifi-6050-5.ucode
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/pci/if_iwn.c

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/mi
diff -u src/distrib/sets/lists/base/mi:1.938 src/distrib/sets/lists/base/mi:1.939
--- src/distrib/sets/lists/base/mi:1.938	Mon May  9 17:13:19 2011
+++ src/distrib/sets/lists/base/mi	Fri May 20 01:59:14 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.938 2011/05/09 17:13:19 manu Exp $
+# $NetBSD: mi,v 1.939 2011/05/20 01:59:14 msaitoh Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -152,6 +152,12 @@
 ./libdata/firmware/if_iwn/LICENSE.iwlwifi-6000-ucode	base-firmware-root
 ./libdata/firmware/if_iwn/README.iwlwifi-6000-ucode	base-firmware-root
 ./libdata/firmware/if_iwn/iwlwifi-6000-4.ucode	base-firmware-root
+./libdata/firmware/if_iwn/LICENSE.iwlwifi-6000g2a-ucode	base-firmware-root
+./libdata/firmware/if_iwn/README.iwlwifi-6000g2a-ucode	base-firmware-root
+./libdata/firmware/if_iwn/iwlwifi-6000g2a-5.ucode	base-firmware-root
+./libdata/firmware/if_iwn/LICENSE.iwlwifi-6050-ucode	base-firmware-root
+./libdata/firmware/if_iwn/README.iwlwifi-6050-ucode	base-firmware-root
+./libdata/firmware/if_iwn/iwlwifi-6050-5.ucode	base-firmware-root
 ./libdata/firmware/if_otus			base-firmware-root
 ./libdata/firmware/if_otus/otus-init		base-firmware-root
 ./libdata/firmware/if_otus/otus-license		base-firmware-root

Index: src/external/intel-fw-public/Makefile
diff -u src/external/intel-fw-public/Makefile:1.5 src/external/intel-fw-public/Makefile:1.6
--- src/external/intel-fw-public/Makefile:1.5	Thu Jul  1 17:25:27 2010
+++ src/external/intel-fw-public/Makefile	Fri May 20 01:59:14 2011
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2010/07/01 17:25:27 christos Exp $
+# $NetBSD: Makefile,v 1.6 2011/05/20 01:59:14 msaitoh Exp $
 
-SUBDIR+=	ipw3945 iwl1000 iwl4965 iwl5000 iwl5150 iwl6000
+SUBDIR+=	ipw3945 iwl1000 iwl4965 iwl5000 iwl5150 iwl6000 iwl6005 \
+		iwl6050
 
 .include bsd.subdir.mk

Index: src/sys/dev/pci/if_iwn.c
diff -u src/sys/dev/pci/if_iwn.c:1.54 src/sys/dev/pci/if_iwn.c:1.55
--- src/sys/dev/pci/if_iwn.c:1.54	Wed May 18 01:02:43 2011
+++ src/sys/dev/pci/if_iwn.c	Fri May 20 01:59:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwn.c,v 1.54 2011/05/18 01:02:43 dyoung Exp $	*/
+/*	$NetBSD: if_iwn.c,v 1.55 2011/05/20 01:59:15 msaitoh Exp $	*/
 /*	$OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwn.c,v 1.54 2011/05/18 01:02:43 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwn.c,v 1.55 2011/05/20 01:59:15 msaitoh Exp $);
 
 #define IWN_USE_RBUF	/* Use local storage for RX */
 #undef IWN_HWCRYPTO	/* XXX does not even compile yet */
@@ -156,7 +156,6 @@
 static int	iwn_read_eeprom(struct iwn_softc *);
 static void	iwn4965_read_eeprom(struct iwn_softc *);
 
-#define IWN_DEBUG 1
 #ifdef IWN_DEBUG
 static void	iwn4965_print_power_group(struct iwn_softc *, int);
 #endif
@@ -724,11 +723,11 @@
 		break;
 	case IWN_HW_REV_TYPE_6050:
 		sc-limits = iwn6000_sensitivity_limits;
-		sc-fwname = iwlwifi-6050-2.ucode;
+		sc-fwname = iwlwifi-6050-5.ucode;
 		break;
 	case IWN_HW_REV_TYPE_6005:
 		sc-limits = iwn6000_sensitivity_limits;
-		sc-fwname = iwlwifi-6005-2.ucode;
+		sc-fwname = iwlwifi-6000g2a-5.ucode;
 		break;
 	default:
 		aprint_normal(: adapter type 

CVS commit: src/usr.bin/error

2011-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 20 02:00:45 UTC 2011

Modified Files:
src/usr.bin/error: touch.c

Log Message:
counting was off, and setting things to themselves does not work very welll.


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

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

Modified files:

Index: src/usr.bin/error/touch.c
diff -u src/usr.bin/error/touch.c:1.23 src/usr.bin/error/touch.c:1.24
--- src/usr.bin/error/touch.c:1.23	Thu May 19 18:55:53 2011
+++ src/usr.bin/error/touch.c	Thu May 19 22:00:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: touch.c,v 1.23 2011/05/19 22:55:53 christos Exp $	*/
+/*	$NetBSD: touch.c,v 1.24 2011/05/20 02:00:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)touch.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: touch.c,v 1.23 2011/05/19 22:55:53 christos Exp $);
+__RCSID($NetBSD: touch.c,v 1.24 2011/05/20 02:00:45 christos Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -92,7 +92,7 @@
 {
 	const char *p;
 
-	if (level-- == 0)
+	if (level == 0)
 		return name;
 
 	if (*name == '/') {
@@ -172,7 +172,7 @@
 			filelevel);
 			if (strcmp(fname, name) != 0) {
 my_nfiles++;
-name = name;
+name = fname;
 			}
 		}
 	}
@@ -215,10 +215,10 @@
 my_nfiles, plural(my_nfiles), verbform(my_nfiles));
 		if (!terse) {
 			FILEITERATE(fi, 1, my_nfiles) {
+const char *fname = makename(
+(*my_files[fi])-error_text[0], filelevel);
 fprintf(stdout, %s\%s\ (%d),
-	sep, makename(
-	(*my_files[fi])-error_text[0],
-	filelevel),
+	sep, fname,
 	(int)(my_files[fi+1] - my_files[fi]));
 sep = , ;
 			}



CVS commit: src/crypto/external/bsd/heimdal/lib/libkrb5

2011-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 20 02:04:59 UTC 2011

Modified Files:
src/crypto/external/bsd/heimdal/lib/libkrb5: Makefile

Log Message:
Let's see if we can get away with this for the sun2 port or we are going
to need to:
1. put the contents of libipc.a in libkrb5.a
or
2. install libipc.a [perhaps call it libkrbipc.a?]


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile

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

Modified files:

Index: src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile
diff -u src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile:1.1 src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile:1.2
--- src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile:1.1	Wed Apr 13 15:16:53 2011
+++ src/crypto/external/bsd/heimdal/lib/libkrb5/Makefile	Thu May 19 22:04:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/04/13 19:16:53 elric Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/20 02:04:59 christos Exp $
 
 USE_FORT?= yes	# network protocol library
 
@@ -17,6 +17,7 @@
 		crypto		${SSLBASE}/lib/libcrypto	\
 		asn1		${HEIMBASE}/lib/libasn1		\
 		com_err		${HEIMBASE}/lib/libcom_err	\
+		ipc		${HEIMBASE}/lib/libipc		\
 		roken		${HEIMBASE}/lib/libroken	\
 		wind		${HEIMBASE}/lib/libwind		\
 		heimbase	${HEIMBASE}/lib/libheimbase



CVS commit: src/distrib/utils/tls

2011-05-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May 20 02:12:39 UTC 2011

Modified Files:
src/distrib/utils/tls: tls.c

Log Message:
a little better.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/tls/tls.c

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

Modified files:

Index: src/distrib/utils/tls/tls.c
diff -u src/distrib/utils/tls/tls.c:1.5 src/distrib/utils/tls/tls.c:1.6
--- src/distrib/utils/tls/tls.c:1.5	Thu May 19 18:14:15 2011
+++ src/distrib/utils/tls/tls.c	Thu May 19 22:12:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.5 2011/05/19 22:14:15 tsutsui Exp $	*/
+/*	$NetBSD: tls.c,v 1.6 2011/05/20 02:12:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -26,19 +26,20 @@
  */
 
 #include sys/types.h
+#include sys/param.h
 #include sys/stat.h
 
 #include dirent.h
 #include err.h
 #include stdio.h
 #include stdlib.h
+#include unistd.h
 #include time.h
 #include unistd.h
 
-int iflag;
+static int iflag;
 
-int main(int, char *[]);
-void show_long(char *fname);
+static void show_long(const char *);
 
 int
 main(int argc, char *argv[])
@@ -48,28 +49,25 @@
 
 	/* If given an arg, just cd there first. */
 	if (argc  1) {
-		if (chdir(argv[1])) {
-			perror(argv[1]);
-			exit(1);
-		}
+		if (chdir(argv[1]))
+			err(1, chdir `%s', argv[1]);
 	}
 	if (argc  2)
 		fprintf(stderr, extra args ignored\n);
 
 	dfp = opendir(.);
-	if (dfp == NULL) {
+	if (dfp == NULL)
 		err(EXIT_FAILURE, opendir);
-	}
 
 	while ((d = readdir(dfp)) != NULL)
 		show_long(d-d_name);
 
 	closedir(dfp);
-	exit(EXIT_SUCCESS);
+	return EXIT_SUCCESS;
 }
 
 /* XXX - This is system dependent... */
-const char ifmt_name[16] = {
+static const char ifmt_name[16] = {
 	'?',	/* 0: nothing */
 	'P',	/* 1: fifo (pipe) */
 	'C',	/* 2: chr device */
@@ -88,8 +86,8 @@
 	'?' 	/* F: ? */
 };
 
-void
-show_long(char *fname)
+static void
+show_long(const char *fname)
 {
 	struct stat st;
 	int ifmt;
@@ -97,7 +95,7 @@
 	char *date;
 
 	if (lstat(fname, st)) {
-		perror(fname);
+		warn(lstat `%s', fname);
 		return;
 	}
 	ifmt = (st.st_mode  12)  15;
@@ -138,12 +136,12 @@
 	printf(%s, fname);
 
 	if (ifmt_c == 'L') {
-		char linkto[256];
+		char linkto[MAXPATHLEN];
 		int n;
 
 		n = readlink(fname, linkto, sizeof(linkto)-1);
 		if (n  0) {
-			perror(fname);
+			warn(readlink `%s', fname);
 			return;
 		}
 		linkto[n] = '\0';



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips

2011-05-19 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Fri May 20 04:28:40 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips: newsmipsIo.c
newsmipsKbd.c newsmipsMouse.c

Log Message:
Include mi.h for more prototype decls.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsIo.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsIo.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsIo.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsIo.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsIo.c:1.1	Sun Aug  1 18:46:49 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsIo.c	Fri May 20 04:28:40 2011
@@ -50,6 +50,7 @@
 
 #define	NEED_EVENTS
 #include newsmips.h
+#include mi.h
 
 void
 newsmipsCleanupFd(int fd)

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c:1.2	Sun Oct 10 05:35:33 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c	Fri May 20 04:28:40 2011
@@ -43,6 +43,7 @@
 #define	NEED_EVENTS
 #include newsmips.h
 #include keysym.h
+#include mi.h
 #include stdio.h
 #include sys/time.h
 #include X11/extensions/XKB.h

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c:1.4
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c:1.3	Sun Oct 10 05:28:50 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c	Fri May 20 04:28:40 2011
@@ -53,6 +53,7 @@
 
 #define	NEED_EVENTS
 #include newsmips.h
+#include mi.h
 #include stdio.h
 
 static Bool newsmipsCursorOffScreen();



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips

2011-05-19 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Fri May 20 04:29:27 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips: ews4800mipsFB.c
ews4800mipsIo.c ews4800mipsKbd.c ews4800mipsMouse.c

Log Message:
Use mi.h as other sources rather than mi/mi.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c:1.2	Thu May 19 21:29:12 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsFB.c	Fri May 20 04:29:27 2011
@@ -31,8 +31,8 @@
 
 #define	FORCE_SEPARATE_PRIVATE
 #include cfb.h
+#include mi.h
 #include stdio.h
-#include mi/mi.h
 
 extern BSFuncRec cfbBSFuncRec;
 Bool ews4800mips8ScreenInit(ScreenPtr, pointer,	int, int, int, int, int);
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c:1.2	Thu May 19 21:29:12 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsIo.c	Fri May 20 04:29:27 2011
@@ -47,10 +47,10 @@
 /
 
 #include stdio.h
-#include mi/mi.h
 
 #define	NEED_EVENTS
 #include ews4800mips.h
+#include mi.h
 
 void
 ews4800mipsCleanupFd(int fd)

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c:1.4
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c:1.3	Thu May 19 21:29:12 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c	Fri May 20 04:29:27 2011
@@ -43,10 +43,10 @@
 #define	NEED_EVENTS
 #include ews4800mips.h
 #include keysym.h
+#include mi.h
 #include stdio.h
 #include sys/time.h
 #include X11/extensions/XKB.h
-#include mi/mi.h
 
 extern KeySymsRec ews4800mipsKeySyms[];
 extern ews4800mipsModmapRec *ews4800mipsModMaps[];

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.4 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.5
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.4	Thu May 19 21:29:12 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c	Fri May 20 04:29:27 2011
@@ -53,8 +53,8 @@
 
 #define	NEED_EVENTS
 #include ews4800mips.h
+#include mi.h
 #include stdio.h
-#include mi/mi.h
 
 static Bool ews4800mipsCursorOffScreen();
 static void ews4800mipsCrossScreen();



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k

2011-05-19 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Fri May 20 04:30:01 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k: x68kGraph.c x68kInit.c
x68kIo.c x68kKbd.c x68kMouse.c

Log Message:
Use mi.h as other sources rather than mi/mi.h.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c
cvs rdiff -u -r1.5 -r1.6 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c:1.4
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c:1.3	Wed May 18 21:51:04 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c	Fri May 20 04:30:00 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kGraph.c,v 1.3 2011/05/18 21:51:04 tsutsui Exp $ */
+/* $NetBSD: x68kGraph.c,v 1.4 2011/05/20 04:30:00 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -118,7 +118,7 @@
 /* cfb */
 #define PSZ 16
 #include cfb.h
-#include mi/mi.h
+#include mi.h
 
 /* in x68kConfig.c */
 X68kScreenRec *x68kGetScreenRecByType(int type);
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c:1.4
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c:1.3	Wed May 18 21:51:04 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c	Fri May 20 04:30:00 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kKbd.c,v 1.3 2011/05/18 21:51:04 tsutsui Exp $ */
+/* $NetBSD: x68kKbd.c,v 1.4 2011/05/20 04:30:00 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -71,7 +71,7 @@
 /
 
 #include x68k.h
-#include mi/mi.h
+#include mi.h
 
 #ifdef XKB
 #include X11/extensions/XKB.h

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c:1.5 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c:1.6
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c:1.5	Wed May 18 21:51:04 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c	Fri May 20 04:30:00 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kInit.c,v 1.5 2011/05/18 21:51:04 tsutsui Exp $ */
+/* $NetBSD: x68kInit.c,v 1.6 2011/05/20 04:30:00 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -75,7 +75,7 @@
 
 #include Xos.h
 #include x68k.h
-#include mi/mi.h
+#include mi.h
 
 static int nscreens;
 

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c:1.2	Wed May 18 21:51:04 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c	Fri May 20 04:30:00 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kIo.c,v 1.2 2011/05/18 21:51:04 tsutsui Exp $ */
+/* $NetBSD: x68kIo.c,v 1.3 2011/05/20 04:30:00 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -73,8 +73,8 @@
 
 /
 
-#includex68k.h
-#include mi/mi.h
+#include x68k.h
+#include mi.h
 
 static void x68kEnqueueEvents();
 extern Firm_event* x68kMouseGetEvents( int fd, int *pNumEvents, Bool *pAgain );
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c:1.2	Wed May 18 21:51:04 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c	Fri May 20 04:30:00 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kMouse.c,v 1.2 2011/05/18 21:51:04 tsutsui Exp $ */
+/* $NetBSD: x68kMouse.c,v 1.3 2011/05/20 04:30:00 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -81,8 +81,8 @@
  * implied warranty.
  */
 
-#includex68k.h
-#include mi/mi.h
+#include x68k.h
+#include mi.h
 
 

CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k

2011-05-19 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Fri May 20 05:12:42 UTC 2011

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k: x68k.h x68kConfig.c
x68kFb.c x68kGraph.c x68kInit.c x68kIo.c x68kKbd.c x68kMouse.c
x68kText.c

Log Message:
More WARNSfy.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68k.h \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kFb.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kText.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kConfig.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kIo.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kMouse.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kGraph.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kKbd.c
cvs rdiff -u -r1.6 -r1.7 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kInit.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68k.h
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68k.h:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68k.h:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68k.h:1.2	Wed May 18 21:51:04 2011
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68k.h	Fri May 20 05:12:42 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: x68k.h,v 1.2 2011/05/18 21:51:04 tsutsui Exp $ */
+/* $NetBSD: x68k.h,v 1.3 2011/05/20 05:12:42 tsutsui Exp $ */
 /*-
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -94,17 +94,18 @@
  * frame buffer procedures
  */
 typedef struct _X68kFbProcRec {
-Bool (*open)( X68kScreenRec *fb );/* open procedure   */
-Bool (*init)( int screen, ScreenPtr pScreen,  /* initialize procedure */
-  int argc, char *argv[] );
-void (*close)( X68kScreenRec *fb );   /* close procedure  */
+Bool (*open)(X68kScreenRec *);		 /* open procedure   */
+Bool (*init)(int, ScreenPtr, int, char *[]); /* initialize procedure */
+void (*close)(X68kScreenRec *);		 /* close procedure  */
 } X68kFbProcRec;
 
 /* frame buffer types */
 #define X68K_FB_NULL0
 #define X68K_FB_TEXT1   /* text VRAM frame buffer */
 #define X68K_FB_GRAPHIC 2   /* graphic VRAM frame buffer */
-/* #define X68K_FB_CIRRUS  3   /* not yet */
+#if 0
+#define X68K_FB_CIRRUS  3   /* not yet */
+#endif
 #define X68K_FB_TYPES   2
 
 typedef struct _X68kMousePriv {
@@ -125,24 +126,51 @@
 #define MAXEVENTS 32
 #define TVTOMILLI(tv) (((tv).tv_usec/1000)+((tv).tv_sec*1000))
 
-int x68kScreenIndex;
-int x68kGeneration;
 #define GetScreenPrivate(s) ((X68kScreenRec *) \
 ((s)-devPrivates[x68kScreenIndex].ptr))
 #define SetupScreen(s) X68kScreenRec *pPriv = GetScreenPrivate(s)
 
+/* in x68kConfig.c */
+X68kScreenRec *x68kGetScreenRec(int);
+X68kScreenRec *x68kGetScreenRecByType(int);
+X68kFbProcRec *x68kGetFbProcRec(int index);
+void x68kRegisterPixmapFormats(ScreenInfo *);
+int x68kConfig(void);
+extern char *configFilename;
+
 /* x68kFB.c */
 Bool x68kFbCommonOpen(X68kScreenRec *, char *);
 void x68kFbCommonClose(X68kScreenRec *);
+Bool x68kSaveScreen(ScreenPtr, Bool);
+extern int x68kScreenIndex;
+extern int x68kGeneration;
+
+/* x68kGraph.c */
+Bool x68kGraphOpen(X68kScreenRec *);
+Bool x68kGraphInit(int, ScreenPtr, int, char *[]);
+void x68kGraphClose(X68kScreenRec *);
+
+/* in x68kIo.c */
+void x68kSigIOHandler(int);
+
+/* in x68kMouse.c */
+int x68kMouseProc(DeviceIntPtr, int);
+Firm_event *x68kMouseGetEvents(int, int *, Bool *);
+void x68kMouseEnqueueEvent(DeviceIntPtr, Firm_event *);
+extern miPointerScreenFuncRec x68kPointerScreenFuncs;
+
+/* in x68kKbd.c */
+int x68kKbdProc(DeviceIntPtr, int);
+Firm_event *x68kKbdGetEvents(int, int *, Bool *);
+void x68kKbdEnqueueEvent(DeviceIntPtr, Firm_event *);
+extern X68kKbdPriv x68kKbdPriv;
+
+/* in x68kKeyMap.c */
+extern KeySymsRec jisKeySyms, asciiKeySyms, *x68kKeySyms;
 
 /* x68kText.c */
-Bool x68kTextOpen(X68kScreenRec *fb);
-Bool x68kTextInit(int screen, ScreenPtr pScreen, int arg, char *argv[]);
-void x68kTextClose(X68kScreenRec *fb);
+Bool x68kTextOpen(X68kScreenRec *);
+Bool x68kTextInit(int, ScreenPtr, int, char *[]);
+void x68kTextClose(X68kScreenRec *);
 
-/* x68kGraph.c */
-Bool x68kGraphOpen(X68kScreenRec *fb);
-Bool x68kGraphInit(int screen, ScreenPtr pScreen, int arg, char *argv[]);
-void x68kGraphClose(X68kScreenRec *fb);
-
 /* EOF x68k.h */
Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kFb.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kFb.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kFb.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/x68k/x68kFb.c:1.2	Fri Dec  9 05:44:51 2005