CVS commit: src/libexec/ftpd

2012-06-19 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Jun 19 06:06:34 UTC 2012

Modified Files:
src/libexec/ftpd: cmds.c ftpd.c

Log Message:
Pass WARNS=5


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/libexec/ftpd/cmds.c
cvs rdiff -u -r1.197 -r1.198 src/libexec/ftpd/ftpd.c

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

Modified files:

Index: src/libexec/ftpd/cmds.c
diff -u src/libexec/ftpd/cmds.c:1.30 src/libexec/ftpd/cmds.c:1.31
--- src/libexec/ftpd/cmds.c:1.30	Sun Mar 15 07:48:36 2009
+++ src/libexec/ftpd/cmds.c	Tue Jun 19 06:06:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmds.c,v 1.30 2009/03/15 07:48:36 lukem Exp $	*/
+/*	$NetBSD: cmds.c,v 1.31 2012/06/19 06:06:34 dholland Exp $	*/
 
 /*
  * Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: cmds.c,v 1.30 2009/03/15 07:48:36 lukem Exp $);
+__RCSID($NetBSD: cmds.c,v 1.31 2012/06/19 06:06:34 dholland Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -845,9 +845,7 @@ replydirname(const char *name, const cha
 }
 
 static void
-discover_path(last_path, new_path) 
-	char *last_path;
-	const char *new_path;
+discover_path(char *last_path, const char *new_path) 
 {
 	char tp[MAXPATHLEN + 1] = ;
 	char tq[MAXPATHLEN + 1] = ;

Index: src/libexec/ftpd/ftpd.c
diff -u src/libexec/ftpd/ftpd.c:1.197 src/libexec/ftpd/ftpd.c:1.198
--- src/libexec/ftpd/ftpd.c:1.197	Fri Sep 16 16:13:17 2011
+++ src/libexec/ftpd/ftpd.c	Tue Jun 19 06:06:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftpd.c,v 1.197 2011/09/16 16:13:17 plunky Exp $	*/
+/*	$NetBSD: ftpd.c,v 1.198 2012/06/19 06:06:34 dholland Exp $	*/
 
 /*
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@ __COPYRIGHT(@(#) Copyright (c) 1985, 19
 #if 0
 static char sccsid[] = @(#)ftpd.c	8.5 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: ftpd.c,v 1.197 2011/09/16 16:13:17 plunky Exp $);
+__RCSID($NetBSD: ftpd.c,v 1.198 2012/06/19 06:06:34 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -2938,7 +2938,7 @@ statxfer(void)
  * by setting transflag to 0. (c.f., ABOR).
  */
 static int
-handleoobcmd()
+handleoobcmd(void)
 {
 	char *cp;
 	int ret;



CVS commit: src/libexec/rpc.rstatd

2012-06-19 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Jun 19 06:09:36 UTC 2012

Modified Files:
src/libexec/rpc.rstatd: rstat_proc.c

Log Message:
Pass WARNS=5


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/libexec/rpc.rstatd/rstat_proc.c

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

Modified files:

Index: src/libexec/rpc.rstatd/rstat_proc.c
diff -u src/libexec/rpc.rstatd/rstat_proc.c:1.46 src/libexec/rpc.rstatd/rstat_proc.c:1.47
--- src/libexec/rpc.rstatd/rstat_proc.c:1.46	Fri Sep 16 16:13:17 2011
+++ src/libexec/rpc.rstatd/rstat_proc.c	Tue Jun 19 06:09:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rstat_proc.c,v 1.46 2011/09/16 16:13:17 plunky Exp $	*/
+/*	$NetBSD: rstat_proc.c,v 1.47 2012/06/19 06:09:36 dholland Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char sccsid[] = from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro;
 static char sccsid[] = from: @(#)rstat_proc.c	2.2 88/08/01 4.0 RPCSRC;
 #else
-__RCSID($NetBSD: rstat_proc.c,v 1.46 2011/09/16 16:13:17 plunky Exp $);
+__RCSID($NetBSD: rstat_proc.c,v 1.47 2012/06/19 06:09:36 dholland Exp $);
 #endif
 #endif
 
@@ -131,7 +131,7 @@ static int stat_is_init = 0;
 #endif
 
 void
-stat_init()
+stat_init(void)
 {
 	stat_is_init = 1;
 	setup();
@@ -306,7 +306,7 @@ updatestat(int dummy)
 }
 
 void
-setup_kd_once()
+setup_kd_once(void)
 {
 char errbuf[_POSIX2_LINE_MAX];
 kfd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
@@ -317,7 +317,7 @@ setup_kd_once()
 }
 
 void
-setup()
+setup(void)
 {
 	struct ifnet ifnet;
 	long off;
@@ -361,7 +361,7 @@ setup()
  * returns true if have a disk
  */
 int
-havedisk()
+havedisk(void)
 {
 	return ndrive != 0;
 }



CVS commit: src/sys/dev/usb

2012-06-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun 19 07:15:42 UTC 2012

Modified Files:
src/sys/dev/usb: ehci.c

Log Message:
Typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/dev/usb/ehci.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/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.190 src/sys/dev/usb/ehci.c:1.191
--- src/sys/dev/usb/ehci.c:1.190	Sun Jun 10 06:15:53 2012
+++ src/sys/dev/usb/ehci.c	Tue Jun 19 07:15:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.190 2012/06/10 06:15:53 mrg Exp $ */
+/*	$NetBSD: ehci.c,v 1.191 2012/06/19 07:15:41 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.190 2012/06/10 06:15:53 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.191 2012/06/19 07:15:41 skrll Exp $);
 
 #include ohci.h
 #include uhci.h
@@ -1638,7 +1638,7 @@ ehci_open(usbd_pipe_handle pipe)
 		/*
 		 * When directly attached FS/LS device while doing embedded
 		 * transaction translations and we are the hub, set the hub
-		 * adddress to 0 (us).
+		 * address to 0 (us).
 		 */
 		if (!(sc-sc_flags  EHCIF_ETTF)
 		|| (dev-myhsport-parent-address != sc-sc_addr)) {
@@ -1697,7 +1697,7 @@ ehci_open(usbd_pipe_handle pipe)
 	/*
 	 * For interrupt transfer, nak throttling must be disabled, but for
 	 * the other transfer type, nak throttling should be enabled from the
-	 * veiwpoint that avoids the memory thrashing.
+	 * viewpoint that avoids the memory thrashing.
 	 */
 	naks = (xfertype == UE_INTERRUPT) ? 0
 	: ((speed == EHCI_QH_SPEED_HIGH) ? 4 : 0);



CVS commit: src/doc

2012-06-19 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Tue Jun 19 10:05:54 UTC 2012

Modified Files:
src/doc: CHANGES CHANGES.prev

Log Message:
Postfix 2.8.11 will be in NetBSD 6.0.


To generate a diff of this commit:
cvs rdiff -u -r1.1710 -r1.1711 src/doc/CHANGES
cvs rdiff -u -r1.107 -r1.108 src/doc/CHANGES.prev

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1710 src/doc/CHANGES:1.1711
--- src/doc/CHANGES:1.1710	Sat Jun 16 14:38:54 2012
+++ src/doc/CHANGES	Tue Jun 19 10:05:53 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1710 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1711 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -66,6 +66,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	kernel: Add a new RLIMIT_NTHR limit to limit the number of processes
 		per user and the corresponding kern.maxlwp sysctl. Expose
 		kern.uidinfo.* via sysctl. [christos 20120608]
-	postfix(1): Import version 2.8.11 [tron 20120609]
 	usb(9): Added support for SMP to the USB subsytem.  By Jared D.
 		McNeill and myself.  [mrg 20120609]

Index: src/doc/CHANGES.prev
diff -u src/doc/CHANGES.prev:1.107 src/doc/CHANGES.prev:1.108
--- src/doc/CHANGES.prev:1.107	Sat Jun 16 14:38:54 2012
+++ src/doc/CHANGES.prev	Tue Jun 19 10:05:53 2012
@@ -1,4 +1,4 @@
-LIST OF CHANGES FROM PREVIOUS RELEASES:			$Revision: 1.107 $
+LIST OF CHANGES FROM PREVIOUS RELEASES:			$Revision: 1.108 $
 
 
 Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8:
@@ -11169,3 +11169,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	kernel: Add urtwn(4), a driver for Realtek RTL8188CU/RTL8192CU USB IEEE
 		802.11b/g/n wireless network devices, ported from OpenBSD.
 		[nonaka 20120325]
+	postfix(1): Import version 2.8.11 [tron 20120609]



CVS commit: src/sys/arch/x68k/stand/libsa

2012-06-19 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Jun 19 12:59:17 UTC 2012

Modified Files:
src/sys/arch/x68k/stand/libsa: sdcd.c

Log Message:
Fix CD support (again!).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x68k/stand/libsa/sdcd.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/x68k/stand/libsa/sdcd.c
diff -u src/sys/arch/x68k/stand/libsa/sdcd.c:1.12 src/sys/arch/x68k/stand/libsa/sdcd.c:1.13
--- src/sys/arch/x68k/stand/libsa/sdcd.c:1.12	Tue Mar 20 12:38:53 2012
+++ src/sys/arch/x68k/stand/libsa/sdcd.c	Tue Jun 19 12:59:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdcd.c,v 1.12 2012/03/20 12:38:53 minoura Exp $	*/
+/*	$NetBSD: sdcd.c,v 1.13 2012/06/19 12:59:17 minoura Exp $	*/
 
 /*
  * Copyright (c) 2001 MINOURA Makoto.
@@ -362,6 +362,7 @@ cdstrategy(void *arg, int rw, daddr_t db
 	struct sdcd_softc *sc = arg;
 
 	/* cast dblk to avoid divdi3; 32bit is enough even for BD-ROMs.  */
-	return sdstrategy(arg, rw, (unsigned int) dblk / sc-sc_blocksize,
+	return sdstrategy(arg, rw,
+			  (unsigned int) dblk / (sc-sc_blocksize/DEV_BSIZE),
 	  size, buf, rsize);
 }



CVS commit: src/sys/arch/x68k/stand

2012-06-19 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Jun 19 12:59:51 UTC 2012

Modified Files:
src/sys/arch/x68k/stand: Makefile

Log Message:
Descend to xxboot.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x68k/stand/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/stand/Makefile
diff -u src/sys/arch/x68k/stand/Makefile:1.10 src/sys/arch/x68k/stand/Makefile:1.11
--- src/sys/arch/x68k/stand/Makefile:1.10	Fri Apr  6 02:51:03 2012
+++ src/sys/arch/x68k/stand/Makefile	Tue Jun 19 12:59:51 2012
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.10 2012/04/06 02:51:03 isaki Exp $
+#	$NetBSD: Makefile,v 1.11 2012/06/19 12:59:51 minoura Exp $
 
 SUBDIR= libdos libiocs libsa .WAIT
 SUBDIR+= aout2hux .WAIT
-SUBDIR+= newdisk loadbsd mboot boot boot_ufs boot_ustar installboot
+SUBDIR+= newdisk loadbsd mboot boot boot_ufs boot_ustar xxboot installboot
 
 .include bsd.subdir.mk



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

2012-06-19 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Jun 19 13:00:56 UTC 2012

Modified Files:
src/distrib/sets/lists/base: md.x68k

Log Message:
Add xxboot_?fsv?.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/base/md.x68k

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/md.x68k
diff -u src/distrib/sets/lists/base/md.x68k:1.43 src/distrib/sets/lists/base/md.x68k:1.44
--- src/distrib/sets/lists/base/md.x68k:1.43	Sat Nov 19 12:27:42 2011
+++ src/distrib/sets/lists/base/md.x68k	Tue Jun 19 13:00:55 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.x68k,v 1.43 2011/11/19 12:27:42 isaki Exp $
+# $NetBSD: md.x68k,v 1.44 2012/06/19 13:00:55 minoura Exp $
 ./dev/pow0	base-obsolete		obsolete
 ./dev/pow1	base-obsolete		obsolete
 ./usr/bin/bellctrlbase-util-bin
@@ -18,6 +18,11 @@
 ./usr/mdec/sdboot_ufsbase-sysutil-bin
 ./usr/mdec/xxbootbase-obsolete		obsolete
 ./usr/mdec/xxboot_ufsbase-sysutil-bin
+./usr/mdec/xxboot_cd9660			base-sysutil-bin
+./usr/mdec/xxboot_ffsv1base-sysutil-bin
+./usr/mdec/xxboot_ffsv2base-sysutil-bin
+./usr/mdec/xxboot_lfsv1base-sysutil-bin
+./usr/mdec/xxboot_lfsv2base-sysutil-bin
 ./usr/sbin/memswitchbase-sysutil-bin
 ./usr/sbin/poffdbase-obsolete		obsolete
 ./usr/share/keymaps/x68k/ascii_kmap		base-sys-share



CVS commit: src/distrib/x68k/cdroms/installcd

2012-06-19 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Jun 19 13:01:53 UTC 2012

Modified Files:
src/distrib/x68k/cdroms/installcd: Makefile

Log Message:
The x68k installcd is now bootable.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/x68k/cdroms/installcd/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/x68k/cdroms/installcd/Makefile
diff -u src/distrib/x68k/cdroms/installcd/Makefile:1.1 src/distrib/x68k/cdroms/installcd/Makefile:1.2
--- src/distrib/x68k/cdroms/installcd/Makefile:1.1	Tue Mar  6 21:57:28 2007
+++ src/distrib/x68k/cdroms/installcd/Makefile	Tue Jun 19 13:01:53 2012
@@ -1,5 +1,13 @@
-#	$NetBSD: Makefile,v 1.1 2007/03/06 21:57:28 bouyer Exp $
+#	$NetBSD: Makefile,v 1.2 2012/06/19 13:01:53 minoura Exp $
 CDBASE=		x68kcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
+CDINSTKERNEL=	../../floppies/instkernel
+CDKERNELS=	netbsd-INSTALL.gz	netbsd
+BOOTXX_CD9660=	${DESTDIR}/usr/mdec/xxboot_cd9660
+CDMAKEFSOPTIONS= generic-bootimage=${BOOTXX_CD9660}
+
+prepare_md_post:
+	${CP} ${BOOT} cdrom
+
 
 .include ${.CURDIR}/../../../common/Makefile.bootcd



CVS commit: src/distrib/x68k/floppies/ramdisk

2012-06-19 Thread Minoura Makoto
Module Name:src
Committed By:   minoura
Date:   Tue Jun 19 13:02:48 UTC 2012

Modified Files:
src/distrib/x68k/floppies/ramdisk: list

Log Message:
Recent sysinst seems to require chroot.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/x68k/floppies/ramdisk/list

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

Modified files:

Index: src/distrib/x68k/floppies/ramdisk/list
diff -u src/distrib/x68k/floppies/ramdisk/list:1.31 src/distrib/x68k/floppies/ramdisk/list:1.32
--- src/distrib/x68k/floppies/ramdisk/list:1.31	Sun Jun 19 06:44:04 2011
+++ src/distrib/x68k/floppies/ramdisk/list	Tue Jun 19 13:02:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.31 2011/06/19 06:44:04 tsutsui Exp $
+#	$NetBSD: list,v 1.32 2012/06/19 13:02:47 minoura Exp $
 
 SRCDIRS bin sbin usr.bin usr.sbin sys/arch/x68k/stand
 
@@ -49,7 +49,7 @@ PROG	usr/bin/gzip	usr/bin/gzcat usr/bin/
 PROG	usr/bin/more	usr/bin/less
 PROG	usr/mdec/newdisk
 PROG	usr/mdec/installboot usr/mdec/installboot.new
-#PROG	usr/sbin/chroot
+PROG	usr/sbin/chroot
 PROG	usr/sbin/memswitch
 
 ARGVLN	sh -sh



CVS commit: src/usr.sbin/syslogd

2012-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun 19 13:44:35 UTC 2012

Modified Files:
src/usr.sbin/syslogd: syslogd.c

Log Message:
- fix writev1() to pre-decrement count.
- always open ttys with O_NDELAY.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.110 src/usr.sbin/syslogd/syslogd.c:1.111
--- src/usr.sbin/syslogd/syslogd.c:1.110	Mon Jun 18 15:17:42 2012
+++ src/usr.sbin/syslogd/syslogd.c	Tue Jun 19 09:44:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.110 2012/06/18 19:17:42 christos Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.111 2012/06/19 13:44:35 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)syslogd.c	8.3 (Berkeley) 4/4/94;
 #else
-__RCSID($NetBSD: syslogd.c,v 1.110 2012/06/18 19:17:42 christos Exp $);
+__RCSID($NetBSD: syslogd.c,v 1.111 2012/06/19 13:44:35 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -2422,7 +2422,7 @@ fprintlog(struct filed *f, struct buf_ms
 			 */
 			if ((e == EIO || e == EBADF)  f-f_type != F_FILE) {
 f-f_file = open(f-f_un.f_fname,
-O_WRONLY|O_APPEND|O_NDELAY, 0);
+O_WRONLY|O_APPEND|O_NDELAY|O_NONBLOCK, 0);
 if (f-f_file  0) {
 	f-f_type = F_UNUSED;
 	logerror(%s, f-f_un.f_fname);
@@ -3822,7 +3822,7 @@ cfline(size_t linenum, const char *line,
 			f-f_flags |= FFLAG_SIGN;
 #endif /* !DISABLE_SIGN */
 		(void)strlcpy(f-f_un.f_fname, p, sizeof(f-f_un.f_fname));
-		if ((f-f_file = open(p, O_WRONLY|O_APPEND, 0))  0) {
+		if ((f-f_file = open(p, O_WRONLY|O_APPEND|O_NDELAY, 0))  0) {
 			f-f_type = F_UNUSED;
 			logerror(%s, p);
 			break;
@@ -4708,6 +4708,8 @@ writev1(int fd, struct iovec *iov, size_
 	ssize_t nw = 0, tot = 0;
 	size_t ntries = 5;
 
+	if (count == 0)
+		return 0;
 	while (ntries--) {
 		switch ((nw = writev(fd, iov, count))) {
 		case -1:
@@ -4718,8 +4720,8 @@ writev1(int fd, struct iovec *iov, size_
 pfd.revents = 0;
 (void)poll(pfd, 1, 500);
 continue;
-			} else
-return -1;
+			}
+			return -1;
 		case 0:
 			return 0;
 		default:
@@ -4727,10 +4729,11 @@ writev1(int fd, struct iovec *iov, size_
 			while (nw  0) {
 if (iov-iov_len  (size_t)nw) {
 	iov-iov_len -= nw;
-	iov-iov_base = (char *)iov-iov_base + nw;
+	iov-iov_base =
+	(char *)iov-iov_base + nw;
 	break;
 } else {
-	if (count-- == 0)
+	if (--count == 0)
 		return tot;
 	nw -= iov-iov_len;
 	iov++;



CVS commit: src/sys/dev/iscsi

2012-06-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 19 14:19:46 UTC 2012

Modified Files:
src/sys/dev/iscsi: iscsi_send.c

Log Message:
assemble_login_parameters() has a strange error reporting convention:
errors are positive numbers, so = 0 is good, not = ...
This makes CHAP authenticated iscsi logins work.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/iscsi/iscsi_send.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/iscsi/iscsi_send.c
diff -u src/sys/dev/iscsi/iscsi_send.c:1.3 src/sys/dev/iscsi/iscsi_send.c:1.4
--- src/sys/dev/iscsi/iscsi_send.c:1.3	Sat Jun  9 06:19:58 2012
+++ src/sys/dev/iscsi/iscsi_send.c	Tue Jun 19 14:19:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_send.c,v 1.3 2012/06/09 06:19:58 mlelstv Exp $	*/
+/*	$NetBSD: iscsi_send.c,v 1.4 2012/06/19 14:19:46 martin Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1113,7 +1113,7 @@ send_login(connection_t *conn)
 		return conn-terminating;
 	}
 
-	if ((rc = assemble_login_parameters(conn, ccb, pdu)) = 0) {
+	if ((rc = assemble_login_parameters(conn, ccb, pdu)) = 0) {
 		init_login_pdu(conn, pdu, !rc);
 		setup_tx_uio(pdu, pdu-temp_data_len, pdu-temp_data, FALSE);
 		send_pdu(ccb, pdu, CCBDISP_WAIT, PDUDISP_FREE);



CVS commit: src/sys/arch/arm/marvell

2012-06-19 Thread Hans Rosenfeld
Module Name:src
Committed By:   hans
Date:   Tue Jun 19 16:50:44 UTC 2012

Modified Files:
src/sys/arch/arm/marvell: files.marvell mvsoctmr.c

Log Message:
Add support for the watchdog timer in mvsoctmr.
Tested on DreamPlug system.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/marvell/files.marvell
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/marvell/mvsoctmr.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/arm/marvell/files.marvell
diff -u src/sys/arch/arm/marvell/files.marvell:1.4 src/sys/arch/arm/marvell/files.marvell:1.5
--- src/sys/arch/arm/marvell/files.marvell:1.4	Sat Mar 12 22:34:52 2011
+++ src/sys/arch/arm/marvell/files.marvell	Tue Jun 19 16:50:44 2012
@@ -1,4 +1,4 @@
-#   $NetBSD: files.marvell,v 1.4 2011/03/12 22:34:52 nonaka Exp $
+#   $NetBSD: files.marvell,v 1.5 2012/06/19 16:50:44 hans Exp $
 #
 # Configuration info for Marvell System on Chip support
 #
@@ -24,7 +24,7 @@ file	arch/arm/marvell/kirkwood.c		kirkwo
 include dev/marvell/files.discovery
 
 # Timers
-device	mvsoctmr
+device	mvsoctmr: sysmon_wdog
 attach	mvsoctmr at mvsoc
 file	arch/arm/marvell/mvsoctmr.c		mvsoctmr
 

Index: src/sys/arch/arm/marvell/mvsoctmr.c
diff -u src/sys/arch/arm/marvell/mvsoctmr.c:1.3 src/sys/arch/arm/marvell/mvsoctmr.c:1.4
--- src/sys/arch/arm/marvell/mvsoctmr.c:1.3	Sun Feb 12 16:34:07 2012
+++ src/sys/arch/arm/marvell/mvsoctmr.c	Tue Jun 19 16:50:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsoctmr.c,v 1.3 2012/02/12 16:34:07 matt Exp $	*/
+/*	$NetBSD: mvsoctmr.c,v 1.4 2012/06/19 16:50:44 hans Exp $	*/
 /*
  * Copyright (c) 2007, 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.3 2012/02/12 16:34:07 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.4 2012/06/19 16:50:44 hans Exp $);
+
+#include opt_ddb.h
 
 #include sys/param.h
 #include sys/atomic.h
@@ -36,6 +38,7 @@ __KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v
 #include sys/time.h
 #include sys/timetc.h
 #include sys/systm.h
+#include sys/wdog.h
 
 #include machine/intr.h
 
@@ -47,10 +50,21 @@ __KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v
 
 #include dev/marvell/marvellvar.h
 
+#include dev/sysmon/sysmonvar.h
+
+#ifdef DDB
+#include machine/db_machdep.h
+#include ddb/db_extern.h
+#endif
+
 
 struct mvsoctmr_softc {
 	device_t sc_dev;
 
+	struct sysmon_wdog sc_wdog;
+	uint32_t sc_wdog_period;
+	uint32_t sc_wdog_armed;
+
 	bus_space_tag_t sc_iot;
 	bus_space_handle_t sc_ioh;
 };
@@ -65,6 +79,16 @@ static u_int mvsoctmr_get_timecount(stru
 
 static void mvsoctmr_cntl(struct mvsoctmr_softc *, int, u_int, int, int);
 
+static int mvsoctmr_wdog_tickle(struct sysmon_wdog *);
+static int mvsoctmr_wdog_setmode(struct sysmon_wdog *);
+
+#ifdef DDB
+static struct mvsoctmr_softc *mvsoctmr_softc;
+static void mvsoctmr_wdog_ddb_trap(int);
+#endif
+
+#define MVSOC_WDOG_MAX_PERIOD	21
+
 static struct mvsoctmr_softc *mvsoctmr_sc;
 static struct timecounter mvsoctmr_timecounter = {
 	mvsoctmr_get_timecount,	/* get_timecount */
@@ -102,6 +126,7 @@ mvsoctmr_attach(device_t parent, device_
 {
 struct mvsoctmr_softc *sc = device_private(self);
 	struct marvell_attach_args *mva = aux;
+	uint32_t rstoutn;
 
 	aprint_naive(\n);
 	aprint_normal(: Marvell SoC Timer\n);
@@ -117,6 +142,29 @@ mvsoctmr_attach(device_t parent, device_
 
 	mvsoctmr_timecounter.tc_name = device_xname(self);
 	mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, 0x, 1, 1);
+
+	/*
+	 * stop watchdog timer, enable watchdog timer resets
+	 */
+	mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0, 0, 0);
+	rstoutn = read_mlmbreg(MVSOC_MLMB_RSTOUTNMASKR);
+	write_mlmbreg(MVSOC_MLMB_RSTOUTNMASKR,
+		  rstoutn | MVSOC_MLMB_RSTOUTNMASKR_WDRSTOUTEN);
+
+#ifdef DDB
+	mvsoctmr_softc = sc;
+	db_trap_callback = mvsoctmr_wdog_ddb_trap;
+#endif
+
+	sc-sc_wdog.smw_name = device_xname(self);
+	sc-sc_wdog.smw_cookie = sc;
+	sc-sc_wdog.smw_setmode = mvsoctmr_wdog_setmode;
+	sc-sc_wdog.smw_tickle = mvsoctmr_wdog_tickle;
+	sc-sc_wdog.smw_period = MVSOC_WDOG_MAX_PERIOD;
+
+	if (sysmon_wdog_register(sc-sc_wdog) != 0)
+		aprint_error_dev(self,
+ unable to register watchdog with sysmon\n);
 }
 
 /*
@@ -257,3 +305,54 @@ mvsoctmr_cntl(struct mvsoctmr_softc *sc,
 		ctrl = ~MVSOCTMR_CTCR_CPUTIMERAUTO(num);
 	bus_space_write_4(sc-sc_iot, sc-sc_ioh, MVSOCTMR_CTCR, ctrl);
 }
+
+static int
+mvsoctmr_wdog_setmode(struct sysmon_wdog *smw)
+{
+	struct mvsoctmr_softc *sc = smw-smw_cookie;
+
+	if ((smw-smw_mode  WDOG_MODE_MASK) == WDOG_MODE_DISARMED) {
+		sc-sc_wdog_armed = 0;
+		mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0, 0, 0);
+	} else {
+		sc-sc_wdog_armed = 1;
+		if (smw-smw_period == WDOG_PERIOD_DEFAULT)
+			smw-smw_period = MVSOC_WDOG_MAX_PERIOD;
+		else if (smw-smw_period  MVSOC_WDOG_MAX_PERIOD ||
+			 smw-smw_period = 0)
+			return (EOPNOTSUPP);
+		sc-sc_wdog_period = smw-smw_period 

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

2012-06-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jun 19 21:25:26 UTC 2012

Modified Files:
src/external/cddl/osnet/sys/kern: kstat.c

Log Message:
Use CTLTYPE_QUAD for uint64_t type in sysctl_createv.


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

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

Modified files:

Index: src/external/cddl/osnet/sys/kern/kstat.c
diff -u src/external/cddl/osnet/sys/kern/kstat.c:1.1 src/external/cddl/osnet/sys/kern/kstat.c:1.2
--- src/external/cddl/osnet/sys/kern/kstat.c:1.1	Fri Aug  7 20:57:57 2009
+++ src/external/cddl/osnet/sys/kern/kstat.c	Tue Jun 19 21:25:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kstat.c,v 1.1 2009/08/07 20:57:57 haad Exp $	*/
+/*	$NetBSD: kstat.c,v 1.2 2012/06/19 21:25:26 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -113,7 +113,7 @@ kstat_install(kstat_t *ks)
 		KASSERT(ksent-data_type == KSTAT_DATA_UINT64);
 		sysctl_createv(ks-ks_clog, 0, ks-ks_node, NULL,
 			CTLFLAG_PERMANENT | CTLFLAG_READONLY,
-			CTLTYPE_INT, ksent-name, NULL,
+			CTLTYPE_QUAD, ksent-name, NULL,
 			NULL, 0, ksent-value.ui64, 0,
 			CTL_CREATE, CTL_EOL);
 	}



CVS commit: src/tools

2012-06-19 Thread Hans Rosenfeld
Module Name:src
Committed By:   hans
Date:   Tue Jun 19 21:48:34 UTC 2012

Modified Files:
src/tools: Makefile.gnuhost

Log Message:
Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/tools/Makefile.gnuhost

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

Modified files:

Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.38 src/tools/Makefile.gnuhost:1.39
--- src/tools/Makefile.gnuhost:1.38	Wed Apr 18 11:28:30 2012
+++ src/tools/Makefile.gnuhost	Tue Jun 19 21:48:33 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gnuhost,v 1.38 2012/04/18 11:28:30 tsutsui Exp $
+#	$NetBSD: Makefile.gnuhost,v 1.39 2012/06/19 21:48:33 hans Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -103,7 +103,7 @@ CONFIGURE_PLATFORM!= if [ -s .configure_
 configure_cleanup:
 	@mkdir build 2/dev/null || true
 	@(echo Cleaning stale cache files ${BUILD_PLATFORM} != ${CONFIGURE_PLATFORM})
-	@(cd build  find . -name config.cache -print0 | xargs -0 rm -f)
+	@(cd build  find . -name config.cache | xargs rm -f)
 configure_cleanup=configure_cleanup
 .endif
 



CVS commit: src/share/man/man4

2012-06-19 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jun 19 22:12:03 UTC 2012

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

Log Message:
Remove extra Ed macro.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/urtwn.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/urtwn.4
diff -u src/share/man/man4/urtwn.4:1.5 src/share/man/man4/urtwn.4:1.6
--- src/share/man/man4/urtwn.4:1.5	Sat Jun 16 14:38:54 2012
+++ src/share/man/man4/urtwn.4	Tue Jun 19 22:12:03 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: urtwn.4,v 1.5 2012/06/16 14:38:54 nonaka Exp $
+.\ $NetBSD: urtwn.4,v 1.6 2012/06/19 22:12:03 njoly Exp $
 .\ $OpenBSD: urtwn.4,v 1.15 2011/11/26 06:39:33 ckuethe Exp $
 .\
 .\ Copyright (c) 2010 Damien Bergamini damien.bergam...@free.fr
@@ -84,7 +84,6 @@ which are loaded when an interface is at
 .It /libdata/firmware/if_urtwn/rtl8192cfw.bin
 .It /libdata/firmware/if_urtwn/rtl8192cfwU.bin
 .El
-.Ed
 .Sh HARDWARE
 The following adapters should work:
 .Pp



CVS commit: src/usr.bin/make/unit-tests

2012-06-19 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Jun 19 23:25:53 UTC 2012

Modified Files:
src/usr.bin/make/unit-tests: Makefile test.exp
Added Files:
src/usr.bin/make/unit-tests: forloop

Log Message:
Add unit-tests for .for


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/forloop
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/make/unit-tests/test.exp

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/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.33 src/usr.bin/make/unit-tests/Makefile:1.34
--- src/usr.bin/make/unit-tests/Makefile:1.33	Thu Sep 29 23:38:04 2011
+++ src/usr.bin/make/unit-tests/Makefile	Tue Jun 19 23:25:53 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2011/09/29 23:38:04 sjg Exp $
+# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $
 #
 # Unit tests for make(1)
 # The main targets are:
@@ -26,6 +26,7 @@ SUBFILES= \
 	export-all \
 	doterror \
 	dotwait \
+	forloop \
 	forsubst \
 	hash \
 	misc \

Index: src/usr.bin/make/unit-tests/test.exp
diff -u src/usr.bin/make/unit-tests/test.exp:1.39 src/usr.bin/make/unit-tests/test.exp:1.40
--- src/usr.bin/make/unit-tests/test.exp:1.39	Thu Sep 29 23:38:04 2011
+++ src/usr.bin/make/unit-tests/test.exp	Tue Jun 19 23:25:53 2012
@@ -80,6 +80,24 @@ make: Graph cycles through `cycle.2.98'
 make: Graph cycles through `cycle.2.97'
 cycle.1.99
 cycle.1.99
+x=one
+x=two and three
+x=four
+x=five
+x=-I/this
+x=-IThis or that
+x=-Ithat
+x=-DTHIS=\this and that\
+cfl=-I/this -IThis or that -Ithat -DTHIS=\this and that\
+a=one b=two and three
+a=four b=five
+a=ONE b=TWO AND THREE
+a=FOUR b=FIVE
+We expect an error next:
+make: forloop line 38: Wrong number of words (9) in .for substitution list with 2 vars
+make: Fatal errors encountered -- cannot continue
+make: stopped in unit-tests
+OK
 .for with :S;... OK
 b2af338b
 3360ac65

Added files:

Index: src/usr.bin/make/unit-tests/forloop
diff -u /dev/null src/usr.bin/make/unit-tests/forloop:1.1
--- /dev/null	Tue Jun 19 23:25:53 2012
+++ src/usr.bin/make/unit-tests/forloop	Tue Jun 19 23:25:53 2012
@@ -0,0 +1,45 @@
+# $Id: forloop,v 1.1 2012/06/19 23:25:53 sjg Exp $
+
+all: for-loop
+
+LIST = one two and three four five
+
+.if make(for-fail)
+for-fail:
+
+XTRA_LIST = xtra
+.else
+
+.for x in ${LIST}
+X!= echo 'x=$x' 2; echo
+.endfor
+
+CFL = -I/this -IThis or that -Ithat -DTHIS=\this and that\
+cfl=
+.for x in ${CFL}
+X!= echo 'x=$x' 2; echo
+.if empty(cfl)
+cfl= $x
+.else
+cfl+= $x
+.endif
+.endfor
+X!= echo 'cfl=${cfl}' 2; echo
+
+.if ${cfl} != ${CFL}
+.error ${.newline}'${cfl}' != ${.newline}'${CFL}'
+.endif
+
+.for a b in ${EMPTY}
+X!= echo 'a=$a b=$b' 2; echo
+.endfor
+.endif
+
+.for a b in ${LIST} ${LIST:tu} ${XTRA_LIST}
+X!= echo 'a=$a b=$b' 2; echo
+.endfor
+
+for-loop:
+	@echo We expect an error next:
+	@(cd ${.CURDIR}  ${.MAKE} -f ${MAKEFILE} for-fail)  \
+	{ echo Oops that should have failed!; exit 1; } || echo OK



CVS commit: src/usr.sbin/syslogd

2012-06-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 20 01:39:35 UTC 2012

Modified Files:
src/usr.sbin/syslogd: syslogd.c

Log Message:
remove dup O_NDELAY.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.111 src/usr.sbin/syslogd/syslogd.c:1.112
--- src/usr.sbin/syslogd/syslogd.c:1.111	Tue Jun 19 09:44:35 2012
+++ src/usr.sbin/syslogd/syslogd.c	Tue Jun 19 21:39:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.111 2012/06/19 13:44:35 christos Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.112 2012/06/20 01:39:34 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)syslogd.c	8.3 (Berkeley) 4/4/94;
 #else
-__RCSID($NetBSD: syslogd.c,v 1.111 2012/06/19 13:44:35 christos Exp $);
+__RCSID($NetBSD: syslogd.c,v 1.112 2012/06/20 01:39:34 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -2422,7 +2422,7 @@ fprintlog(struct filed *f, struct buf_ms
 			 */
 			if ((e == EIO || e == EBADF)  f-f_type != F_FILE) {
 f-f_file = open(f-f_un.f_fname,
-O_WRONLY|O_APPEND|O_NDELAY|O_NONBLOCK, 0);
+O_WRONLY|O_APPEND|O_NONBLOCK, 0);
 if (f-f_file  0) {
 	f-f_type = F_UNUSED;
 	logerror(%s, f-f_un.f_fname);
@@ -3822,7 +3822,7 @@ cfline(size_t linenum, const char *line,
 			f-f_flags |= FFLAG_SIGN;
 #endif /* !DISABLE_SIGN */
 		(void)strlcpy(f-f_un.f_fname, p, sizeof(f-f_un.f_fname));
-		if ((f-f_file = open(p, O_WRONLY|O_APPEND|O_NDELAY, 0))  0) {
+		if ((f-f_file = open(p, O_WRONLY|O_APPEND, 0))  0) {
 			f-f_type = F_UNUSED;
 			logerror(%s, p);
 			break;



CVS commit: src/share/man/man4

2012-06-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 20 04:57:56 UTC 2012

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

Log Message:
Modify about PCH*.

It seems that 82579 with Intel 7 series chipset is the same as
82579 with Intel 6 series chipset.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/wm.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/wm.4
diff -u src/share/man/man4/wm.4:1.23 src/share/man/man4/wm.4:1.24
--- src/share/man/man4/wm.4:1.23	Sat May 26 06:56:18 2012
+++ src/share/man/man4/wm.4	Wed Jun 20 04:57:56 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: wm.4,v 1.23 2012/05/26 06:56:18 wiz Exp $
+.\	$NetBSD: wm.4,v 1.24 2012/06/20 04:57:56 msaitoh Exp $
 .\
 .\ Copyright 2002, 2003 Wasabi Systems, Inc.
 .\ All rights reserved.
@@ -33,7 +33,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd May 25, 2012
+.Dd Jun 20, 2012
 .Dt WM 4
 .Os
 .Sh NAME
@@ -132,9 +132,9 @@ Intel i82801I (ICH9 LAN) 1000BASE-T Ethe
 .It
 Intel i82801J (ICH10 LAN) 1000BASE-T Ethernet
 .It
-Intel PCH 1000BASE-T Ethernet
+Intel 82578 with Intel 5 series chipset (PCH)
 .It
-Intel PCH2 1000BASE-T Ethernet
+Intel 82579 with Intel 6 or 7 series chipset (PCH2)
 .It
 Intel 82580 Ethernet (Copper, Fiber)
 .It