CVS commit: [netbsd-6] src/sys/dev/usb

2013-02-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Feb 15 08:21:21 UTC 2013

Modified Files:
src/sys/dev/usb [netbsd-6]: dwc_otg.c

Log Message:
Fix a locking error in the last commit for ticket #813.


To generate a diff of this commit:
cvs rdiff -u -r1.45.2.2 -r1.45.2.3 src/sys/dev/usb/dwc_otg.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/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.45.2.2 src/sys/dev/usb/dwc_otg.c:1.45.2.3
--- src/sys/dev/usb/dwc_otg.c:1.45.2.2	Wed Feb 13 01:36:16 2013
+++ src/sys/dev/usb/dwc_otg.c	Fri Feb 15 08:21:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.45.2.2 2013/02/13 01:36:16 riz Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.45.2.3 2013/02/15 08:21:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.45.2.2 2013/02/13 01:36:16 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.45.2.3 2013/02/15 08:21:21 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -607,6 +607,7 @@ dwc_otg_abort_xfer(usbd_xfer_handle xfer
 			tsleep(xfer-hcflags, PZERO, dotgaw, 0);
 		return;
 	}
+	mutex_spin_enter(sc-sc_intr_lock);
 	xfer-hcflags |= UXFER_ABORTING;
 
 	/*



CVS commit: [netbsd-6] src/doc

2013-02-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Feb 15 08:23:17 UTC 2013

Modified Files:
src/doc [netbsd-6]: CHANGES-6.1

Log Message:
Ticket #813.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.97 -r1.1.2.98 src/doc/CHANGES-6.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-6.1
diff -u src/doc/CHANGES-6.1:1.1.2.97 src/doc/CHANGES-6.1:1.1.2.98
--- src/doc/CHANGES-6.1:1.1.2.97	Fri Feb 15 03:36:32 2013
+++ src/doc/CHANGES-6.1	Fri Feb 15 08:23:17 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1,v 1.1.2.97 2013/02/15 03:36:32 riz Exp $
+# $NetBSD: CHANGES-6.1,v 1.1.2.98 2013/02/15 08:23:17 msaitoh Exp $
 
 A complete list of changes from the 6.0 release until the 6.1 release:
 
@@ -8504,3 +8504,6 @@ sys/kern/uipc_syscalls.c			1.160
 	not set SS_NBIO.
 	[christos, ticket #822]
 
+sys/dev/usb/dwc_otg.cpatch
+	Fix a locking error in the last commit
+	[skrll, ticket #813]



CVS commit: src/lib/libc/arch/sparc64/softfloat

2013-02-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 15 09:24:05 UTC 2013

Modified Files:
src/lib/libc/arch/sparc64/softfloat: qp.c

Log Message:
Make all conversions from 128bit (long double) floats to integral types
use rounding towards zero (casts to int/long are not affected by current
rounding mode).
Fixes PR port-sparc64/47535.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/sparc64/softfloat/qp.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/arch/sparc64/softfloat/qp.c
diff -u src/lib/libc/arch/sparc64/softfloat/qp.c:1.9 src/lib/libc/arch/sparc64/softfloat/qp.c:1.10
--- src/lib/libc/arch/sparc64/softfloat/qp.c:1.9	Sat Mar 17 20:48:59 2012
+++ src/lib/libc/arch/sparc64/softfloat/qp.c	Fri Feb 15 09:24:05 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: qp.c,v 1.9 2012/03/17 20:48:59 martin Exp $ */
+/* $NetBSD: qp.c,v 1.10 2013/02/15 09:24:05 martin Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -194,7 +194,7 @@ _Qp_qtod(float128 *a)
 int
 _Qp_qtoi(float128 *a)
 {
-	return float128_to_int32(*a);
+	return float128_to_int32_round_to_zero(*a);
 }
 
 
@@ -215,7 +215,7 @@ float
 unsigned int
 _Qp_qtoui(float128 *a)
 {
-	return (unsigned int)float128_to_int64(*a);
+	return (unsigned int)float128_to_int64_round_to_zero(*a);
 }
 
 



CVS commit: src/lib/libc/resolv

2013-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 14:08:25 UTC 2013

Modified Files:
src/lib/libc/resolv: res_send.c

Log Message:
- make all filedescriptors close-on-exec
- use SOCK_NOSIGPIPE.
- add kqueue handling (not enabled by default, from FreeBSD)
- add RES_INSECURE1 handling (from FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/resolv/res_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/lib/libc/resolv/res_send.c
diff -u src/lib/libc/resolv/res_send.c:1.25 src/lib/libc/resolv/res_send.c:1.26
--- src/lib/libc/resolv/res_send.c:1.25	Tue Mar 20 20:34:54 2012
+++ src/lib/libc/resolv/res_send.c	Fri Feb 15 09:08:25 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_send.c,v 1.25 2012/03/21 00:34:54 christos Exp $	*/
+/*	$NetBSD: res_send.c,v 1.26 2013/02/15 14:08:25 christos Exp $	*/
 
 /*
  * Portions Copyright (C) 2004-2009  Internet Systems Consortium, Inc. (ISC)
@@ -93,7 +93,7 @@
 static const char sccsid[] = @(#)res_send.c	8.1 (Berkeley) 6/4/93;
 static const char rcsid[] = Id: res_send.c,v 1.22 2009/01/22 23:49:23 tbox Exp;
 #else
-__RCSID($NetBSD: res_send.c,v 1.25 2012/03/21 00:34:54 christos Exp $);
+__RCSID($NetBSD: res_send.c,v 1.26 2013/02/15 14:08:25 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -104,13 +104,18 @@ __RCSID($NetBSD: res_send.c,v 1.25 2012
 
 #include namespace.h
 #include port_before.h
+#ifndef USE_KQUEUE
 #include fd_setsize.h
+#endif /* USE_KQUEUE */
 
 #include sys/types.h
 #include sys/param.h
 #include sys/time.h
 #include sys/socket.h
 #include sys/uio.h
+#ifdef USE_KQUEUE
+#include sys/event.h
+#endif /* USE_KQUEUE */
 
 #include netinet/in.h
 #include arpa/nameser.h
@@ -122,6 +127,7 @@ __RCSID($NetBSD: res_send.c,v 1.25 2012
 #include resolv.h
 #include signal.h
 #include stdio.h
+#include fcntl.h
 #include stdlib.h
 #include string.h
 #include unistd.h
@@ -139,6 +145,12 @@ __weak_alias(res_nsend,__res_nsend)
 #endif
 #endif
 
+#ifndef SOCK_NOSIGPIPE
+#define SOCK_NOSIGPIPE 0
+#endif
+#ifndef SOCK_NOCLOEXEC
+#define SOCK_NOCLOEXEC 0
+#endif
 
 #ifdef USE_POLL
 #ifdef HAVE_STROPTS_H
@@ -156,7 +168,7 @@ __weak_alias(res_nsend,__res_nsend)
 
 #define EXT(res) ((res)-_u._ext)
 
-#ifndef USE_POLL
+#if !defined(USE_POLL)  !defined(USE_KQUEUE)
 static const int highestFD = FD_SETSIZE - 1;
 #endif
 
@@ -166,14 +178,18 @@ static int		get_salen(const struct socka
 static struct sockaddr * get_nsaddr(res_state, size_t);
 static int		send_vc(res_state, const u_char *, int,
 u_char *, int, int *, int);
-static int		send_dg(res_state, const u_char *, int,
+static int		send_dg(res_state,
+#ifdef USE_KQUEUE
+int,
+#endif
+const u_char *, int,
 u_char *, int, int *, int, int,
 int *, int *);
 static void		Aerror(const res_state, FILE *, const char *, int,
 			   const struct sockaddr *, int);
 static void		Perror(const res_state, FILE *, const char *, int);
 static int		sock_eq(struct sockaddr *, struct sockaddr *);
-#if defined(NEED_PSELECT)  !defined(USE_POLL)
+#if defined(NEED_PSELECT)  !defined(USE_POLL)  !defined(USE_KQUEUE)
 static int		pselect(int, void *, void *, void *,
 struct timespec *,
 const sigset_t *);
@@ -330,6 +346,9 @@ res_nsend(res_state statp,
 	  const u_char *buf, int buflen, u_char *ans, int anssiz)
 {
 	int gotsomewhere, terrno, tries, v_circuit, resplen, ns, n;
+#ifdef USE_KQUEUE
+	int kq;
+#endif
 	char abuf[NI_MAXHOST];
 
 	(void)res_check(statp, NULL);
@@ -349,6 +368,12 @@ res_nsend(res_state statp,
 	gotsomewhere = 0;
 	terrno = ETIMEDOUT;
 
+#ifdef USE_KQUEUE
+	if ((kq = kqueue1(O_CLOEXEC)) == -1) {
+		return (-1);
+	}
+#endif
+
 	/*
 	 * If the ns_addr_list in the resolver context has changed, then
 	 * invalidate our cached copy and the associated timing data.
@@ -464,6 +489,9 @@ res_nsend(res_state statp,
 	res_nclose(statp);
 	goto next_ns;
 case res_done:
+#ifdef USE_KQUEUE
+	close(kq);
+#endif
 	return (resplen);
 case res_modified:
 	/* give the hook another try */
@@ -497,8 +525,12 @@ res_nsend(res_state statp,
 			resplen = n;
 		} else {
 			/* Use datagrams. */
-			n = send_dg(statp, buf, buflen, ans, anssiz, terrno,
-ns, tries, v_circuit, gotsomewhere);
+			n = send_dg(statp,
+#ifdef USE_KQUEUE
+			kq,
+#endif
+			buf, buflen, ans, anssiz, terrno,
+			ns, tries, v_circuit, gotsomewhere);
 			if (n  0)
 goto fail;
 			if (n == 0)
@@ -556,11 +588,17 @@ res_nsend(res_state statp,
 			} while (!done);
 
 		}
+#ifdef USE_KQUEUE
+		close(kq);
+#endif
 		return (resplen);
  next_ns: ;
 	   } /*foreach ns*/
 	} /*foreach retry*/
 	res_nclose(statp);
+#ifdef USE_KQUEUE
+	close(kq);
+#endif
 	if (!v_circuit) {
 		if (!gotsomewhere)
 			errno = ECONNREFUSED;	/*% no nameservers found */
@@ -571,6 +609,9 @@ res_nsend(res_state statp,
 	return (-1);
  fail:
 	res_nclose(statp);
+#ifdef USE_KQUEUE
+	

CVS commit: src/doc

2013-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 15:01:18 UTC 2013

Modified Files:
src/doc: TODO.kqueue

Log Message:
res_send has been done


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/doc/TODO.kqueue

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

Modified files:

Index: src/doc/TODO.kqueue
diff -u src/doc/TODO.kqueue:1.8 src/doc/TODO.kqueue:1.9
--- src/doc/TODO.kqueue:1.8	Wed Nov 12 07:35:52 2008
+++ src/doc/TODO.kqueue	Fri Feb 15 10:01:18 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: TODO.kqueue,v 1.8 2008/11/12 12:35:52 ad Exp $
+#	$NetBSD: TODO.kqueue,v 1.9 2013/02/15 15:01:18 christos Exp $
 
 items todo:
 	- dir watched - what happens if something is mounted over it?
@@ -17,7 +17,8 @@ items todo:
 
 merge in from FreeBSD:
 	pkgsrc/net/bsdproxy
-	lib/libc/net/res_send.c
+	lib/libc/net/res_send.c, this has been merged but not turned on
+	   I don't think it gains anything performance-wise
 	sys/netinet/tcp_subr.c	1.93 (?)
 	libc/libc_r/uthread (?)
 	pkgsrc/security/l0pht-watch (?)



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

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:04:22 UTC 2013

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

Log Message:
Import atf 0.17:

Experimental version released on February 14th, 2013.

* Added the atf_utils_cat_file, atf_utils_compare_file,
  atf_utils_copy_file, atf_utils_create_file, atf_utils_file_exists,
  atf_utils_fork, atf_utils_grep_file, atf_utils_grep_string,
  atf_utils_readline, atf_utils_redirect and atf_utils_wait utility
  functions to atf-c-api.  Documented the already-public
  atf_utils_free_charpp function.

* Added the cat_file, compare_file, copy_file, create_file, file_exists,
  fork, grep_collection, grep_file, grep_string, redirect and wait
  functions to the atf::utils namespace of atf-c++-api.  These are
  wrappers around the same functions added to the atf-c-api library.

* Added the ATF_CHECK_MATCH, ATF_CHECK_MATCH_MSG, ATF_REQUIRE_MATCH and
  ATF_REQUIRE_MATCH_MSG macros to atf-c to simplify the validation of a
  string against a regular expression.

* Miscellaneous fixes for manpage typos and compilation problems with
  clang.

* Added caching of the results of those configure tests that rely on
  executing a test program.  This should help crossbuild systems by
  providing a mechanism to pre-specify what the results should be.

* PR bin/45690: Make atf-report convert any non-printable characters to
  a plain-text representation (matching their corresponding hexadecimal
  entities) in XML output files.  This is to prevent the output of test
  cases from breaking xsltproc later.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-17

U src/external/bsd/atf/dist/README
U src/external/bsd/atf/dist/Kyuafile
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/Atffile
U src/external/bsd/atf/dist/atf-c/error_fwd.h
U src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/error.h
C src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/utils.h
U src/external/bsd/atf/dist/atf-c/pkg_config_test.sh
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
U src/external/bsd/atf/dist/atf-c/error.c
U src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c/utils.c
U src/external/bsd/atf/dist/atf-c/h_build.h
U src/external/bsd/atf/dist/atf-c/atf_c_test.c
U src/external/bsd/atf/dist/atf-c/build_test.c
U src/external/bsd/atf/dist/atf-c/check_test.c
U src/external/bsd/atf/dist/atf-c/config_test.c
U src/external/bsd/atf/dist/atf-c/tc_test.c
U src/external/bsd/atf/dist/atf-c/error_test.c
C src/external/bsd/atf/dist/atf-c/macros_test.c
U src/external/bsd/atf/dist/atf-c/tp_test.c
U src/external/bsd/atf/dist/atf-c/utils_test.c
U src/external/bsd/atf/dist/atf-c/atf-c.pc.in
U src/external/bsd/atf/dist/atf-c/Atffile
U src/external/bsd/atf/dist/atf-c/Kyuafile
U src/external/bsd/atf/dist/atf-c/macros_h_test.c
U src/external/bsd/atf/dist/atf-c/unused_test.c
U src/external/bsd/atf/dist/atf-c/detail/process_helpers.c
C src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
U src/external/bsd/atf/dist/atf-c/detail/test_helpers.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr.c
U src/external/bsd/atf/dist/atf-c/detail/dynstr.h
U src/external/bsd/atf/dist/atf-c/detail/env.c
U src/external/bsd/atf/dist/atf-c/detail/env.h
U src/external/bsd/atf/dist/atf-c/detail/fs.c
U src/external/bsd/atf/dist/atf-c/detail/fs.h
U src/external/bsd/atf/dist/atf-c/detail/list.c
U src/external/bsd/atf/dist/atf-c/detail/list.h
U src/external/bsd/atf/dist/atf-c/detail/map.c
U src/external/bsd/atf/dist/atf-c/detail/map.h
U src/external/bsd/atf/dist/atf-c/detail/process.c
U src/external/bsd/atf/dist/atf-c/detail/process.h
U src/external/bsd/atf/dist/atf-c/detail/sanity.c
U src/external/bsd/atf/dist/atf-c/detail/sanity.h
U src/external/bsd/atf/dist/atf-c/detail/text.c
U src/external/bsd/atf/dist/atf-c/detail/text.h
U src/external/bsd/atf/dist/atf-c/detail/tp_main.c
U src/external/bsd/atf/dist/atf-c/detail/user.c
U src/external/bsd/atf/dist/atf-c/detail/user.h
U src/external/bsd/atf/dist/atf-c/detail/dynstr_test.c
U src/external/bsd/atf/dist/atf-c/detail/env_test.c
U src/external/bsd/atf/dist/atf-c/detail/fs_test.c
U src/external/bsd/atf/dist/atf-c/detail/list_test.c
U src/external/bsd/atf/dist/atf-c/detail/map_test.c
C src/external/bsd/atf/dist/atf-c/detail/process_test.c
U src/external/bsd/atf/dist/atf-c/detail/sanity_test.c
U src/external/bsd/atf/dist/atf-c/detail/text_test.c

CVS commit: src/sys/dev/usb

2013-02-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Feb 15 17:07:10 UTC 2013

Modified Files:
src/sys/dev/usb: dwc_otg.c dwc_otgvar.h

Log Message:
Track transfer state better to avoid races between the workqueue and
aborting.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/dwc_otg.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/usb/dwc_otgvar.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/usb/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.45 src/sys/dev/usb/dwc_otg.c:1.46
--- src/sys/dev/usb/dwc_otg.c:1.45	Mon Feb  4 21:37:05 2013
+++ src/sys/dev/usb/dwc_otg.c	Fri Feb 15 17:07:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.45 2013/02/04 21:37:05 skrll Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.46 2013/02/15 17:07:09 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.45 2013/02/04 21:37:05 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.46 2013/02/15 17:07:09 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -423,13 +423,20 @@ dwc_otg_softintr(void *v)
 
 	mutex_spin_enter(sc-sc_intr_lock);
 	while ((dxfer = TAILQ_FIRST(sc-sc_complete)) != NULL) {
-		TAILQ_REMOVE(sc-sc_complete, dxfer, xnext);
+		KASSERT(dxfer-state == DXFER_COMPLETING);
 
+		/*
+		 * dwc_otg_abort_xfer will remove this transfer from the
+		 * sc_complete queue
+		 */
 		if (dxfer-xfer.hcflags  UXFER_ABORTING) {
 			cv_broadcast(dxfer-xfer.hccv);
 			continue;
 		}
 
+		TAILQ_REMOVE(sc-sc_complete, dxfer, xnext);
+		dxfer-state = DXFER_DONE;
+
 		mutex_spin_exit(sc-sc_intr_lock);
 		usb_transfer_complete(dxfer-xfer);
 		mutex_spin_enter(sc-sc_intr_lock);
@@ -641,9 +648,23 @@ dwc_otg_abort_xfer(usbd_xfer_handle xfer
 	xfer-status = status;	/* make software ignore it */
 	callout_stop(xfer-timeout_handle);
 
-	if (dxfer-active) {
+	switch (dxfer-state) {
+	case DXFER_INIT:
+		dxfer-state = DXFER_ABORTING;
+		break;
+	case DXFER_WORKQ:
+		/* Give the workqueue a chance */
+		break;
+	case DXFER_ACTIVE:
 		TAILQ_REMOVE(sc-sc_active, dxfer, xnext);
-		dxfer-active = false;
+		dxfer-state = DXFER_ABORTING;
+		break;
+	case DXFER_COMPLETING:
+		TAILQ_REMOVE(sc-sc_complete, dxfer, xnext);
+		dxfer-state = DXFER_ABORTING;
+		break;
+	default:
+		KASSERT(false);
 	}
 	mutex_spin_exit(sc-sc_intr_lock);
 
@@ -651,10 +672,11 @@ dwc_otg_abort_xfer(usbd_xfer_handle xfer
 		dwc_otg_host_channel_free(dxfer-td_transfer_cache);
 	}
 
-	while (dxfer-queued) {
+	while (dxfer-state != DXFER_ABORTING) {
 		cv_wait(xfer-hccv, sc-sc_lock);
 	}
 
+	dxfer-state = DXFER_DONE;
 	/*
 	 * Step 2: Execute callback.
 	 */
@@ -1671,13 +1693,14 @@ dwc_otg_worker(struct work *wk, void *pr
 		dwc_otg_timer(sc);
 	} else {
 		KASSERT(dwork-xfer != NULL);
-		KASSERT(dxfer-queued == true);
+		KASSERT(dxfer-state == DXFER_WORKQ);
 
 		if (!(xfer-hcflags  UXFER_ABORTING)) {
 			dwc_otg_start_standard_chain(xfer);
+		} else {
+			dxfer-state = DXFER_ABORTING;
+			cv_broadcast(xfer-hccv);
 		}
-		dxfer-queued = false;
-		cv_broadcast(xfer-hccv);
 	}
 	mutex_exit(sc-sc_lock);
 }
@@ -3853,7 +3876,7 @@ dwc_otg_setup_standard_chain(usbd_xfer_h
 
 // 	DPRINTF((%s: xfer-length %d\n, __func__, xfer-length));
 
-	dxfer-queued = false;
+	dxfer-state = DXFER_INIT;
 
 	/* get first again */
 	td = dxfer-td_transfer_first;
@@ -3962,12 +3985,14 @@ dwc_otg_start_standard_chain(usbd_xfer_h
 
 	/* poll one time - will turn on interrupts */
 	mutex_spin_enter(sc-sc_intr_lock);
+	dxfer-state = DXFER_STARTED;
+
 	if (dwc_otg_xfer_do_fifo(xfer)) {
 
 		KASSERT(mutex_owned(sc-sc_lock));
 		/* put transfer on interrupt queue */
 
-		dxfer-active = true;
+		dxfer-state = DXFER_ACTIVE;
 		TAILQ_INSERT_TAIL(sc-sc_active, dxfer, xnext);
 
 		/* start timeout, if any */
@@ -4059,12 +4084,12 @@ dwc_otg_standard_done(usbd_xfer_handle x
 		dwc_otg_host_channel_free(td);
 
 	xfer-status = err;
-	if (dxfer-active) {
+	if (dxfer-state == DXFER_ACTIVE) {
 		TAILQ_REMOVE(sc-sc_active, dxfer, xnext);
-		dxfer-active = false;
 	}
 	callout_stop(xfer-timeout_handle);
 
+	dxfer-state = DXFER_COMPLETING;
 	TAILQ_INSERT_TAIL(sc-sc_complete, dxfer, xnext);
 
 	usb_schedsoftintr(sc-sc_bus);
@@ -4406,8 +4431,8 @@ dwc_otg_xfer_start(usbd_xfer_handle xfer
 	if (sc-sc_bus.use_polling) {
 		dwc_otg_start_standard_chain(xfer);
 	} else {
-		KASSERT(dxfer-queued == false);
-		dxfer-queued = true;
+		KASSERT(dxfer-state == DXFER_INIT);
+		dxfer-state = DXFER_WORKQ;
 		workqueue_enqueue(sc-sc_wq, (struct work *)dxfer-work, NULL);
 	}
 }

Index: src/sys/dev/usb/dwc_otgvar.h
diff -u src/sys/dev/usb/dwc_otgvar.h:1.11 src/sys/dev/usb/dwc_otgvar.h:1.12
--- src/sys/dev/usb/dwc_otgvar.h:1.11	Mon Feb  4 21:29:14 2013
+++ src/sys/dev/usb/dwc_otgvar.h	Fri Feb 15 17:07:09 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otgvar.h,v 1.11 2013/02/04 21:29:14 skrll Exp $ */

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

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:08:01 UTC 2013

Modified Files:
src/external/bsd/atf/dist/atf-c: atf-c-api.3 macros_test.c
src/external/bsd/atf/dist/atf-c++: tests.cpp tests.hpp
src/external/bsd/atf/dist/atf-c++/detail: process.hpp
src/external/bsd/atf/dist/atf-c/detail: process_test.c test_helpers.c
src/external/bsd/atf/dist/atf-report: atf-report.cpp
src/external/bsd/atf/dist/atf-run: fs.cpp timer.hpp
src/external/bsd/atf/dist/atf-sh: atf-check.cpp atf-check_test.sh
src/external/bsd/atf/dist/doc: atf-test-case.4
Removed Files:
src/external/bsd/atf/dist/atf-c/detail: test_helpers_test.c
src/external/bsd/atf/dist/test-programs: fork_test.sh

Log Message:
Fix merge conflicts after import of atf 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/atf-c-api.3 \
src/external/bsd/atf/dist/atf-c/macros_test.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/atf/dist/atf-c++/tests.cpp
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-c++/tests.hpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c++/detail/process.hpp
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/atf/dist/atf-c/detail/process_test.c
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers.c
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/bsd/atf/dist/atf-c/detail/test_helpers_test.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/atf-report/atf-report.cpp
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/atf-run/fs.cpp
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-run/timer.hpp
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/dist/atf-sh/atf-check.cpp
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/doc/atf-test-case.4
cvs rdiff -u -r1.1.1.3 -r0 \
src/external/bsd/atf/dist/test-programs/fork_test.sh

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/atf/dist/atf-c/atf-c-api.3
diff -u src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.2 src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.3
--- src/external/bsd/atf/dist/atf-c/atf-c-api.3:1.2	Wed Sep 26 23:27:34 2012
+++ src/external/bsd/atf/dist/atf-c/atf-c-api.3	Fri Feb 15 17:07:59 2013
@@ -26,14 +26,17 @@
 .\ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 26, 2010
+.Dd November 30, 2012
 .Dt ATF-C-API 3
 .Os
 .Sh NAME
+.Nm atf-c-api ,
 .Nm ATF_CHECK ,
 .Nm ATF_CHECK_MSG ,
 .Nm ATF_CHECK_EQ ,
 .Nm ATF_CHECK_EQ_MSG ,
+.Nm ATF_CHECK_MATCH ,
+.Nm ATF_CHECK_MATCH_MSG ,
 .Nm ATF_CHECK_STREQ ,
 .Nm ATF_CHECK_STREQ_MSG ,
 .Nm ATF_CHECK_ERRNO ,
@@ -41,6 +44,8 @@
 .Nm ATF_REQUIRE_MSG ,
 .Nm ATF_REQUIRE_EQ ,
 .Nm ATF_REQUIRE_EQ_MSG ,
+.Nm ATF_REQUIRE_MATCH ,
+.Nm ATF_REQUIRE_MATCH_MSG ,
 .Nm ATF_REQUIRE_STREQ ,
 .Nm ATF_REQUIRE_STREQ_MSG ,
 .Nm ATF_REQUIRE_ERRNO ,
@@ -72,7 +77,19 @@
 .Nm atf_tc_fail ,
 .Nm atf_tc_fail_nonfatal ,
 .Nm atf_tc_pass ,
-.Nm atf_tc_skip
+.Nm atf_tc_skip ,
+.Nm atf_utils_cat_file ,
+.Nm atf_utils_compare_file ,
+.Nm atf_utils_copy_file ,
+.Nm atf_utils_create_file ,
+.Nm atf_utils_file_exists ,
+.Nm atf_utils_fork ,
+.Nm atf_utils_free_charpp ,
+.Nm atf_utils_grep_file ,
+.Nm atf_utils_grep_string ,
+.Nm atf_utils_readline ,
+.Nm atf_utils_redirect ,
+.Nm atf_utils_wait
 .Nd C API to write ATF-based test programs
 .Sh SYNOPSIS
 .In atf-c.h
@@ -80,6 +97,8 @@
 .Fn ATF_CHECK_MSG expression fail_msg_fmt ...
 .Fn ATF_CHECK_EQ expression_1 expression_2
 .Fn ATF_CHECK_EQ_MSG expression_1 expression_2 fail_msg_fmt ...
+.Fn ATF_CHECK_MATCH regexp string
+.Fn ATF_CHECK_MATCH_MSG regexp string fail_msg_fmt ...
 .Fn ATF_CHECK_STREQ string_1 string_2
 .Fn ATF_CHECK_STREQ_MSG string_1 string_2 fail_msg_fmt ...
 .Fn ATF_CHECK_ERRNO exp_errno bool_expression
@@ -87,6 +106,8 @@
 .Fn ATF_REQUIRE_MSG expression fail_msg_fmt ...
 .Fn ATF_REQUIRE_EQ expression_1 expression_2
 .Fn ATF_REQUIRE_EQ_MSG expression_1 expression_2 fail_msg_fmt ...
+.Fn ATF_REQUIRE_MATCH regexp string
+.Fn ATF_REQUIRE_MATCH_MSG regexp string fail_msg_fmt ...
 .Fn ATF_REQUIRE_STREQ string_1 string_2
 .Fn ATF_REQUIRE_STREQ_MSG string_1 string_2 fail_msg_fmt ...
 .Fn ATF_REQUIRE_ERRNO exp_errno bool_expression
@@ -119,6 +140,67 @@
 .Fn atf_tc_fail_nonfatal reason
 .Fn atf_tc_pass
 .Fn atf_tc_skip reason
+.Ft void
+.Fo atf_utils_cat_file
+.Fa const char *file
+.Fa const char *prefix
+.Fc
+.Ft bool
+.Fo atf_utils_compare_file
+.Fa const char *file
+.Fa const char *contents
+.Fc
+.Ft void
+.Fo atf_utils_copy_file
+.Fa const char *source
+.Fa const char *destination
+.Fc
+.Ft void
+.Fo atf_utils_create_file
+.Fa const char *file
+.Fa const char *contents
+.Fa ...
+.Fc
+.Ft void
+.Fo atf_utils_file_exists
+.Fa const char *file
+.Fc
+.Ft pid_t
+.Fo atf_utils_fork
+.Fa 

CVS commit: src/external/bsd/atf

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:08:35 UTC 2013

Modified Files:
src/external/bsd/atf/lib/libatf-c: bconfig.h
src/external/bsd/atf/lib/libatf-c++: Makefile
src/external/bsd/atf/tests/atf/atf-c++/detail: Makefile
src/external/bsd/atf/tests/atf/atf-c/detail: Makefile
src/external/bsd/atf/tests/atf/test-programs: Makefile

Log Message:
Update reachover Makefiles for atf 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/lib/libatf-c/bconfig.h
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/atf/lib/libatf-c++/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/atf/tests/atf/atf-c++/detail/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/tests/atf/atf-c/detail/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/external/bsd/atf/tests/atf/test-programs/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/atf/lib/libatf-c/bconfig.h
diff -u src/external/bsd/atf/lib/libatf-c/bconfig.h:1.11 src/external/bsd/atf/lib/libatf-c/bconfig.h:1.12
--- src/external/bsd/atf/lib/libatf-c/bconfig.h:1.11	Wed Jul 11 22:40:16 2012
+++ src/external/bsd/atf/lib/libatf-c/bconfig.h	Fri Feb 15 17:08:34 2013
@@ -23,7 +23,7 @@
 #define HAVE_MEMORY_H 1
 
 /* Define to 1 if getopt has optreset */
-/* #undef HAVE_OPTRESET */
+#define HAVE_OPTRESET 1
 
 /* Define to 1 if you have the `putenv' function. */
 #define HAVE_PUTENV 1
@@ -96,7 +96,7 @@
 #define PACKAGE_NAME Automated Testing Framework
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING Automated Testing Framework 0.16
+#define PACKAGE_STRING Automated Testing Framework 0.17
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME atf
@@ -105,10 +105,10 @@
 #define PACKAGE_URL http://code.google.com/p/kyua/wiki/ATF;
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION 0.16
+#define PACKAGE_VERSION 0.17
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION 0.16
+#define VERSION 0.17

Index: src/external/bsd/atf/lib/libatf-c++/Makefile
diff -u src/external/bsd/atf/lib/libatf-c++/Makefile:1.16 src/external/bsd/atf/lib/libatf-c++/Makefile:1.17
--- src/external/bsd/atf/lib/libatf-c++/Makefile:1.16	Sun Jul 15 00:05:51 2012
+++ src/external/bsd/atf/lib/libatf-c++/Makefile	Fri Feb 15 17:08:35 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2012/07/15 00:05:51 abs Exp $
+# $NetBSD: Makefile,v 1.17 2013/02/15 17:08:35 jmmv Exp $
 
 NOLINT=		# defined
 
@@ -40,12 +40,14 @@ SRCS=		application.cpp \
 		process.cpp \
 		tests.cpp \
 		text.cpp \
-		ui.cpp
+		ui.cpp \
+		utils.cpp
 
 INCS=		build.hpp \
 		check.hpp \
 		config.hpp \
 		macros.hpp \
+		noncopyable.hpp \
 		tests.hpp \
 		utils.hpp
 INCSDIR=	/usr/include/atf-c++

Index: src/external/bsd/atf/tests/atf/atf-c++/detail/Makefile
diff -u src/external/bsd/atf/tests/atf/atf-c++/detail/Makefile:1.1 src/external/bsd/atf/tests/atf/atf-c++/detail/Makefile:1.2
--- src/external/bsd/atf/tests/atf/atf-c++/detail/Makefile:1.1	Wed Oct 20 09:20:11 2010
+++ src/external/bsd/atf/tests/atf/atf-c++/detail/Makefile	Fri Feb 15 17:08:35 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/10/20 09:20:11 jmmv Exp $
+# $NetBSD: Makefile,v 1.2 2013/02/15 17:08:35 jmmv Exp $
 
 .include bsd.own.mk
 
@@ -13,6 +13,7 @@ CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/libatf-
 
 TESTS_CXX=
 .for test in	application_test \
+		auto_array_test \
 		env_test \
 		exceptions_test \
 		expand_test \

Index: src/external/bsd/atf/tests/atf/atf-c/detail/Makefile
diff -u src/external/bsd/atf/tests/atf/atf-c/detail/Makefile:1.3 src/external/bsd/atf/tests/atf/atf-c/detail/Makefile:1.4
--- src/external/bsd/atf/tests/atf/atf-c/detail/Makefile:1.3	Fri Aug 10 17:12:11 2012
+++ src/external/bsd/atf/tests/atf/atf-c/detail/Makefile	Fri Feb 15 17:08:35 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2012/08/10 17:12:11 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2013/02/15 17:08:35 jmmv Exp $
 
 .include bsd.own.mk
 
@@ -24,7 +24,6 @@ TESTS_C=
 		map_test \
 		process_test \
 		sanity_test \
-		test_helpers_test \
 		text_test \
 		user_test
 TESTS_C+=	${test}

Index: src/external/bsd/atf/tests/atf/test-programs/Makefile
diff -u src/external/bsd/atf/tests/atf/test-programs/Makefile:1.2 src/external/bsd/atf/tests/atf/test-programs/Makefile:1.3
--- src/external/bsd/atf/tests/atf/test-programs/Makefile:1.2	Tue Jul 13 21:12:39 2010
+++ src/external/bsd/atf/tests/atf/test-programs/Makefile	Fri Feb 15 17:08:35 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2010/07/13 21:12:39 jmmv Exp $
+# $NetBSD: Makefile,v 1.3 2013/02/15 17:08:35 jmmv Exp $
 
 .include bsd.own.mk
 
@@ -16,8 +16,7 @@ TESTS_C=	c_helpers
 TESTS_CXX=	cpp_helpers
 
 TESTS_SH=	sh_helpers
-.for t in config_test expect_test fork_test meta_data_test result_test \
- 

CVS commit: src/distrib/sets/lists

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:09:10 UTC 2013

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

Log Message:
Update file lists for atf 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.1801 -r1.1802 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.515 -r1.516 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1801 src/distrib/sets/lists/comp/mi:1.1802
--- src/distrib/sets/lists/comp/mi:1.1801	Fri Feb  8 02:32:32 2013
+++ src/distrib/sets/lists/comp/mi	Fri Feb 15 17:09:07 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1801 2013/02/08 02:32:32 christos Exp $
+#	$NetBSD: mi,v 1.1802 2013/02/15 17:09:07 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -139,6 +139,7 @@
 ./usr/include/atf-c++/fs.hpp			comp-obsolete		obsolete
 ./usr/include/atf-c++/io.hpp			comp-obsolete		obsolete
 ./usr/include/atf-c++/macros.hpp		comp-atf-include	atf
+./usr/include/atf-c++/noncopyable.hpp		comp-atf-include	atf
 ./usr/include/atf-c++/parser.hpp		comp-obsolete		obsolete
 ./usr/include/atf-c++/process.hpp		comp-obsolete		obsolete
 ./usr/include/atf-c++/sanity.hpp		comp-obsolete		obsolete

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.515 src/distrib/sets/lists/tests/mi:1.516
--- src/distrib/sets/lists/tests/mi:1.515	Wed Jan 16 16:01:08 2013
+++ src/distrib/sets/lists/tests/mi	Fri Feb 15 17:09:09 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.515 2013/01/16 16:01:08 christos Exp $
+# $NetBSD: mi,v 1.516 2013/02/15 17:09:09 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -187,7 +187,7 @@
 ./usr/tests/atf/atf-c/detail/process_helpers	tests-atf-tests		atf
 ./usr/tests/atf/atf-c/detail/process_test	tests-atf-tests		atf
 ./usr/tests/atf/atf-c/detail/sanity_test	tests-atf-tests		atf
-./usr/tests/atf/atf-c/detail/test_helpers_test	tests-atf-tests		atf
+./usr/tests/atf/atf-c/detail/test_helpers_test	tests-obsolete		obsolete
 ./usr/tests/atf/atf-c/detail/text_test		tests-atf-tests		atf
 ./usr/tests/atf/atf-c/detail/user_test		tests-atf-tests		atf
 ./usr/tests/atf/atf-c/dynstr_test		tests-obsolete		obsolete
@@ -268,6 +268,7 @@
 ./usr/tests/atf/atf-c++/detail			tests-atf-tests
 ./usr/tests/atf/atf-c++/detail/Atffile		tests-atf-tests		atf
 ./usr/tests/atf/atf-c++/detail/application_test	tests-atf-tests		atf
+./usr/tests/atf/atf-c++/detail/auto_array_test	tests-atf-tests		atf
 ./usr/tests/atf/atf-c++/detail/env_test		tests-atf-tests		atf
 ./usr/tests/atf/atf-c++/detail/exceptions_test	tests-atf-tests		atf
 ./usr/tests/atf/atf-c++/detail/expand_test	tests-atf-tests		atf
@@ -649,7 +650,7 @@
 ./usr/tests/atf/test-programs/config_test	tests-atf-tests		atf
 ./usr/tests/atf/test-programs/cpp_helpers	tests-atf-tests		atf
 ./usr/tests/atf/test-programs/expect_test	tests-atf-tests		atf
-./usr/tests/atf/test-programs/fork_test		tests-atf-tests		atf
+./usr/tests/atf/test-programs/fork_test		tests-obsolete		obsolete
 ./usr/tests/atf/test-programs/meta_data_test	tests-atf-tests		atf
 ./usr/tests/atf/test-programs/result_test	tests-atf-tests		atf
 ./usr/tests/atf/test-programs/sh_helpers	tests-atf-tests		atf



CVS commit: src/doc

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 17:09:38 UTC 2013

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of atf 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.1001 -r1.1002 src/doc/3RDPARTY
cvs rdiff -u -r1.1790 -r1.1791 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1001 src/doc/3RDPARTY:1.1002
--- src/doc/3RDPARTY:1.1001	Fri Feb 15 03:56:11 2013
+++ src/doc/3RDPARTY	Fri Feb 15 17:09:38 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1001 2013/02/15 03:56:11 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1002 2013/02/15 17:09:38 jmmv Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -68,8 +68,8 @@ Fix symbolic links before import.
 Check external/bsd/am-utils/include/config.h is correct after import.
 
 Package:	Automated Testing Framework (ATF)
-Version:	0.16
-Current Vers:	0.16
+Version:	0.17
+Current Vers:	0.17
 Maintainer:	Julio Merino j...@netbsd.org
 Archive site:	http://code.google.com/p/kyua/downloads/list?can=1
 Home page:	http://code.google.com/p/kyua/wiki/ATF

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1790 src/doc/CHANGES:1.1791
--- src/doc/CHANGES:1.1790	Fri Feb 15 03:55:50 2013
+++ src/doc/CHANGES	Fri Feb 15 17:09:38 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1790 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1791 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -189,3 +189,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	sparc: Add hardware acceleration for cgfourteen(4) using SX
 		[macallan 20130207]
 	openssl: update to 1.0.1e [christos 20130212]
+	atf(7): Import 0.17.  [jmmv 20130215]



CVS commit: src/sys/dev/spi

2013-02-15 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Fri Feb 15 17:44:41 UTC 2013

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

Log Message:
Fix usage of uninitialised variable holding number of slave devices.
The sc_nslaves has to be initialised before it is used in allocation of a 
memory holding save devices' configuration, otherwise slave drivers are causing 
kernel crashes.

Patch from Semihalf.
Author: Michal Dubiel m...@semihalf.com


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/spi/spi.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/spi/spi.c
diff -u src/sys/dev/spi/spi.c:1.7 src/sys/dev/spi/spi.c:1.8
--- src/sys/dev/spi/spi.c:1.7	Fri Jan  4 22:23:06 2013
+++ src/sys/dev/spi/spi.c	Fri Feb 15 17:44:40 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: spi.c,v 1.7 2013/01/04 22:23:06 jakllsch Exp $ */
+/* $NetBSD: spi.c,v 1.8 2013/02/15 17:44:40 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: spi.c,v 1.7 2013/01/04 22:23:06 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: spi.c,v 1.8 2013/02/15 17:44:40 rkujawa Exp $);
 
 #include locators.h
 
@@ -143,6 +143,7 @@ spi_attach(device_t parent, device_t sel
 	aprint_normal(: SPI bus\n);
 
 	sc-sc_controller = *sba-sba_controller;
+	sc-sc_nslaves = sba-sba_controller-sct_nslaves;
 	/* allocate slave structures */
 	sc-sc_slaves = malloc(sizeof (struct spi_handle) * sc-sc_nslaves,
 	M_DEVBUF, M_WAITOK | M_ZERO);
@@ -153,7 +154,6 @@ spi_attach(device_t parent, device_t sel
 	/*
 	 * Initialize slave handles
 	 */
-	sc-sc_nslaves = sba-sba_controller-sct_nslaves;
 	for (i = 0; i  sc-sc_nslaves; i++) {
 		sc-sc_slaves[i].sh_slave = i;
 		sc-sc_slaves[i].sh_sc = sc;



CVS commit: src/sys/dev/spi

2013-02-15 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Fri Feb 15 17:46:53 UTC 2013

Modified Files:
src/sys/dev/spi: spiflash.c

Log Message:
Fix wrong calculation of destination pointer in writes.

Existing calculation of destination pointer was always causing unnecessary 
erases of SPI Flash memory and was always writing each consecutive 2048 byte 
blocks of data into the same address of the SPI Flash memory. This commit fixes 
issue with writes of multiple blocks using 'dd' tool.

Patch from Semihalf.
Author: Michal Dubiel m...@semihalf.com


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/spi/spiflash.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/spi/spiflash.c
diff -u src/sys/dev/spi/spiflash.c:1.10 src/sys/dev/spi/spiflash.c:1.11
--- src/sys/dev/spi/spiflash.c:1.10	Tue Jan 13 13:35:54 2009
+++ src/sys/dev/spi/spiflash.c	Fri Feb 15 17:46:53 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: spiflash.c,v 1.10 2009/01/13 13:35:54 yamt Exp $ */
+/* $NetBSD: spiflash.c,v 1.11 2013/02/15 17:46:53 rkujawa Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: spiflash.c,v 1.10 2009/01/13 13:35:54 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: spiflash.c,v 1.11 2013/02/15 17:46:53 rkujawa Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -436,7 +436,7 @@ spiflash_process_write(spiflash_handle_t
 			(unsigned)bp-b_blkno, bp-b_bcount, resid));
 
 		data = bp-b_data;
-		dst = save + (bp-b_blkno - blkno) * DEV_BSIZE;
+		dst = save + (bp-b_blkno * DEV_BSIZE) - base;
 
 		/*
 		 * NOR flash bits.  We can clear a bit, but we cannot



CVS commit: src

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 19:49:49 UTC 2013

Modified Files:
src/distrib/sets: sets.subr
src/share/man/man5: mk.conf.5
src/share/mk: bsd.README bsd.own.mk

Log Message:
Add the MKKYUA knob.

MKKYUA defaults to no and will remain as such until the import is complete
and validated.

This knob does not currently have any effects on the build as nothing relies
on it yet.  Upcoming imports and changes in this area will all be guarded by
this flag.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/distrib/sets/sets.subr
cvs rdiff -u -r1.64 -r1.65 src/share/man/man5/mk.conf.5
cvs rdiff -u -r1.311 -r1.312 src/share/mk/bsd.README
cvs rdiff -u -r1.723 -r1.724 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/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.143 src/distrib/sets/sets.subr:1.144
--- src/distrib/sets/sets.subr:1.143	Mon Jan 28 13:46:47 2013
+++ src/distrib/sets/sets.subr	Fri Feb 15 19:49:48 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.143 2013/01/28 13:46:47 nakayama Exp $
+#	$NetBSD: sets.subr,v 1.144 2013/02/15 19:49:48 jmmv Exp $
 #
 
 #
@@ -179,7 +179,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.143 2013/01/28 13:46:47 nakayama Exp $
+# 	# $NetBSD: sets.subr,v 1.144 2013/02/15 19:49:48 jmmv Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -225,6 +225,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 #	iscsi			${MKISCSI} != no
 #	kerberos		${MKKERBEROS} != no
 #	kmod			${MKKMOD} != no
+#	kyua			${MKKYUA} != no
 #	ldap			${MKLDAP} != no
 #	lint			${MKLINT} != no
 #	llvm			${MKLLVM} != no

Index: src/share/man/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.64 src/share/man/man5/mk.conf.5:1.65
--- src/share/man/man5/mk.conf.5:1.64	Sun Sep 30 06:00:26 2012
+++ src/share/man/man5/mk.conf.5	Fri Feb 15 19:49:48 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk.conf.5,v 1.64 2012/09/30 06:00:26 jkoshy Exp $
+.\	$NetBSD: mk.conf.5,v 1.65 2013/02/15 19:49:48 jmmv Exp $
 .\
 .\  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\  All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd September 30, 2012
+.Dd Feburary 15, 2013
 .Dt MK.CONF 5
 .Os
 .\ turn off hyphenation
@@ -222,6 +222,8 @@ flag.
 .It Sy MKATF
 .YorN
 Indicates whether the Automated Testing Framework is built and installed.
+This also controls whether the NetBSD test suite is built and installed,
+as the tests rely on ATF and cannot be built without it.
 .DFLTy
 .
 .It Sy MKBINUTILS
@@ -504,6 +506,19 @@ Otherwise all logins will fail.
 Indicates whether kernel modules are built and installed.
 .DFLTy
 .
+.It Sy MKKYUA
+.YorN
+Indicates whether Kyua (the testing infrastructure used by NetBSD) is built
+and installed.
+Note that
+.Em this does not control the installation of the tests themselves .
+The tests rely on the ATF libraries and therefore their build is controlled
+by the
+.Sy MKATF
+knob.
+.DFLTn
+until the import of Kyua is done and validated.
+.
 .It Sy MKLDAP
 .YorN
 Indicates whether the Lightweight Directory Access Protocol (LDAP)

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.311 src/share/mk/bsd.README:1.312
--- src/share/mk/bsd.README:1.311	Sun Feb 10 22:05:51 2013
+++ src/share/mk/bsd.README	Fri Feb 15 19:49:48 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.311 2013/02/10 22:05:51 jmcneill Exp $
+#	$NetBSD: bsd.README,v 1.312 2013/02/15 19:49:48 jmmv Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -113,8 +113,11 @@ MAKEVERBOSE	Control how verbose the st
 		3	Ignore the effect of the @ prefix in make commands
 		4	Trace shell commands using the shell's -x flag
 
-MKATF		If no, don't build libatf-c, libatf-c++ libraries associated
-		with the Automated Testing Framework (ATF).
+MKATF		If no, don't build the Automated Testing Framework (ATF),
+		which includes the libatf-c, libatf-c++ and libatf-sh libraries
+		and the various command line tools.  Also, because the build of
+		the libraries is disabled, don't build the NetBSD test suite
+		either.
 		Default: yes
 
 MKBFD		Obsolete, use MKBINUTILS
@@ -226,6 +229,12 @@ MKKERBEROS	If no, disables building of
 MKKMOD		If no, disables building of kernel modules.
 		Default: yes
 
+MKKYUA		If no, don't build Kyua nor its dependent library Lutok.
+		Note that setting this to no does not disable the build of
+		the NetBSD test suite itself; the build of the tests is
+		controlled by the MKATF knob.
+		Default: no (until the import is done and validated)
+
 MKLDAP		If no, disables building of LDAP 

CVS commit: src

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 20:07:06 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: mi
src/external/mit/lua/lib/liblua: Makefile

Log Message:
Install lua.hpp.


To generate a diff of this commit:
cvs rdiff -u -r1.1802 -r1.1803 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.3 -r1.4 src/external/mit/lua/lib/liblua/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.1802 src/distrib/sets/lists/comp/mi:1.1803
--- src/distrib/sets/lists/comp/mi:1.1802	Fri Feb 15 17:09:07 2013
+++ src/distrib/sets/lists/comp/mi	Fri Feb 15 20:07:00 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1802 2013/02/15 17:09:07 jmmv Exp $
+#	$NetBSD: mi,v 1.1803 2013/02/15 20:07:00 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1743,6 +1743,7 @@
 ./usr/include/locale.hcomp-c-include
 ./usr/include/login_cap.h			comp-c-include
 ./usr/include/lua.hcomp-c-include
+./usr/include/lua.hppcomp-c-include
 ./usr/include/luaconf.hcomp-c-include
 ./usr/include/lualib.hcomp-c-include
 ./usr/include/lwp.hcomp-c-include

Index: src/external/mit/lua/lib/liblua/Makefile
diff -u src/external/mit/lua/lib/liblua/Makefile:1.3 src/external/mit/lua/lib/liblua/Makefile:1.4
--- src/external/mit/lua/lib/liblua/Makefile:1.3	Tue Feb 28 22:07:16 2012
+++ src/external/mit/lua/lib/liblua/Makefile	Fri Feb 15 20:07:06 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2012/02/28 22:07:16 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2013/02/15 20:07:06 jmmv Exp $
 
 LIB=		lua
 SRCS=		lapi.c lauxlib.c lbaselib.c lcode.c ldblib.c ldebug.c ldo.c \
@@ -9,12 +9,13 @@ SRCS=		lapi.c lauxlib.c lbaselib.c lcode
 
 .include bsd.own.mk
 
-INCS=		lauxlib.h lua.h luaconf.h lualib.h
+INCS=		lauxlib.h lua.h lua.hpp luaconf.h lualib.h
 INCSDIR=	/usr/include
 
 CFLAGS+=	-DLUA_USE_POSIX -DLUA_USE_DLOPEN
 CWARNFLAGS.clang+=	-Wno-empty-body
 
+.PATH:		${NETBSDSRCDIR}/external/mit/lua/dist/etc
 .PATH:		${NETBSDSRCDIR}/external/mit/lua/dist/src
 
 .include bsd.lib.mk



CVS commit: src/share/man/man5

2013-02-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 15 21:03:18 UTC 2013

Modified Files:
src/share/man/man5: mk.conf.5

Log Message:
Use Nx, fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/share/man/man5/mk.conf.5

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/man5/mk.conf.5
diff -u src/share/man/man5/mk.conf.5:1.65 src/share/man/man5/mk.conf.5:1.66
--- src/share/man/man5/mk.conf.5:1.65	Fri Feb 15 19:49:48 2013
+++ src/share/man/man5/mk.conf.5	Fri Feb 15 21:03:17 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk.conf.5,v 1.65 2013/02/15 19:49:48 jmmv Exp $
+.\	$NetBSD: mk.conf.5,v 1.66 2013/02/15 21:03:17 wiz Exp $
 .\
 .\  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\  All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd Feburary 15, 2013
+.Dd February 15, 2013
 .Dt MK.CONF 5
 .Os
 .\ turn off hyphenation
@@ -222,7 +222,9 @@ flag.
 .It Sy MKATF
 .YorN
 Indicates whether the Automated Testing Framework is built and installed.
-This also controls whether the NetBSD test suite is built and installed,
+This also controls whether the
+.Nx
+test suite is built and installed,
 as the tests rely on ATF and cannot be built without it.
 .DFLTy
 .
@@ -508,8 +510,9 @@ Indicates whether kernel modules are bui
 .
 .It Sy MKKYUA
 .YorN
-Indicates whether Kyua (the testing infrastructure used by NetBSD) is built
-and installed.
+Indicates whether Kyua (the testing infrastructure used by
+.Nx )
+is built and installed.
 Note that
 .Em this does not control the installation of the tests themselves .
 The tests rely on the ATF libraries and therefore their build is controlled



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

2013-02-15 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Fri Feb 15 22:14:21 UTC 2013

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

Log Message:
Fix debug entries after the import of atf 0.17.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/debug/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/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.4 src/distrib/sets/lists/debug/mi:1.5
--- src/distrib/sets/lists/debug/mi:1.4	Thu Jan 17 21:42:18 2013
+++ src/distrib/sets/lists/debug/mi	Fri Feb 15 22:14:21 2013
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.4 2013/01/17 21:42:18 christos Exp $
+# $NetBSD: mi,v 1.5 2013/02/15 22:14:21 jmmv Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/libdata/debug/bin/cat.debug		comp-util-debug		debug
 ./usr/libdata/debug/bin/chio.debug		comp-util-debug		debug
@@ -1031,7 +1031,7 @@
 ./usr/libdata/debug/usr/tests/atf/atf-c/detail/process_helpers.debug	tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/detail/process_test.debug	tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/detail/sanity_test.debug	tests-atf-debug		debug,atf
-./usr/libdata/debug/usr/tests/atf/atf-c/detail/test_helpers_test.debug	tests-atf-debug		debug,atf
+./usr/libdata/debug/usr/tests/atf/atf-c/detail/test_helpers_test.debug	tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/atf/atf-c/detail/text_test.debug		tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/detail/user_test.debug		tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/dynstr_test.debug		tests-obsolete		obsolete
@@ -1081,6 +1081,7 @@
 ./usr/libdata/debug/usr/tests/atf/atf-c++/check_test.debug		tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c++/config_test.debug		tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c++/detail/application_test.debug	tests-atf-debug		debug,atf
+./usr/libdata/debug/usr/tests/atf/atf-c++/detail/auto_array_test.debug	tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c++/detail/env_test.debug		tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c++/detail/exceptions_test.debug	tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c++/detail/expand_test.debug	tests-atf-debug		debug,atf



CVS commit: src/common/lib/libc/arch/arm/string

2013-02-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 15 22:35:39 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: memcpy.S

Log Message:
#include arm/cdefs.h to get _ARM_ARCH_DWORD_OK


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/memcpy.S

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/arch/arm/string/memcpy.S
diff -u src/common/lib/libc/arch/arm/string/memcpy.S:1.3 src/common/lib/libc/arch/arm/string/memcpy.S:1.4
--- src/common/lib/libc/arch/arm/string/memcpy.S:1.3	Fri Feb  8 01:41:35 2013
+++ src/common/lib/libc/arch/arm/string/memcpy.S	Fri Feb 15 22:35:39 2013
@@ -1,4 +1,6 @@
-/*	$NetBSD: memcpy.S,v 1.3 2013/02/08 01:41:35 matt Exp $	*/
+/*	$NetBSD: memcpy.S,v 1.4 2013/02/15 22:35:39 matt Exp $	*/
+
+#include arm/cdefs.h
 
 #if !defined(_ARM_ARCH_DWORD_OK) || defined(_STANDALONE)
 #include memcpy_arm.S



CVS commit: [matt-nb6-plus] src/common/lib/libc/arch/arm/string

2013-02-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 15 22:38:51 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string [matt-nb6-plus]: memcpy.S

Log Message:
#include arm/cdefs.h to get _ARM_ARCH_DWORD_OK


To generate a diff of this commit:
cvs rdiff -u -r1.1.54.2 -r1.1.54.3 \
src/common/lib/libc/arch/arm/string/memcpy.S

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/arch/arm/string/memcpy.S
diff -u src/common/lib/libc/arch/arm/string/memcpy.S:1.1.54.2 src/common/lib/libc/arch/arm/string/memcpy.S:1.1.54.3
--- src/common/lib/libc/arch/arm/string/memcpy.S:1.1.54.2	Fri Feb  8 01:41:49 2013
+++ src/common/lib/libc/arch/arm/string/memcpy.S	Fri Feb 15 22:38:51 2013
@@ -1,4 +1,6 @@
-/*	$NetBSD: memcpy.S,v 1.1.54.2 2013/02/08 01:41:49 matt Exp $	*/
+/*	$NetBSD: memcpy.S,v 1.1.54.3 2013/02/15 22:38:51 matt Exp $	*/
+
+#include arm/cdefs.h
 
 #if !defined(_ARM_ARCH_DWORD_OK) || defined(_STANDALONE)
 #include memcpy_arm.S



CVS commit: src/tests/lib/libc/stdio

2013-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 23:27:19 UTC 2013

Modified Files:
src/tests/lib/libc/stdio: t_popen.c

Log Message:
look at my index finger


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/stdio/t_popen.c

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

Modified files:

Index: src/tests/lib/libc/stdio/t_popen.c
diff -u src/tests/lib/libc/stdio/t_popen.c:1.3 src/tests/lib/libc/stdio/t_popen.c:1.4
--- src/tests/lib/libc/stdio/t_popen.c:1.3	Wed Jul 13 07:17:03 2011
+++ src/tests/lib/libc/stdio/t_popen.c	Fri Feb 15 18:27:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_popen.c,v 1.3 2011/07/13 11:17:03 jruoho Exp $ */
+/*	$NetBSD: t_popen.c,v 1.4 2013/02/15 23:27:19 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@ __COPYRIGHT(@(#) Copyright (c) 1999\
 #endif /* not lint */
 
 #ifndef lint
-__RCSID($NetBSD: t_popen.c,v 1.3 2011/07/13 11:17:03 jruoho Exp $);
+__RCSID($NetBSD: t_popen.c,v 1.4 2013/02/15 23:27:19 christos Exp $);
 #endif /* not lint */
 
 #include atf-c.h
@@ -73,7 +73,7 @@ ATF_TC_HEAD(popen_zeropad, tc)
 ATF_TC_BODY(popen_zeropad, tc)
 {
 	char *buffer, command[MAXPATHLEN];
-	int index, in;
+	int idx, in;
 	FILE *my_pipe;
 
 	if ((buffer = malloc(BUFSIZE)) == NULL)
@@ -81,8 +81,8 @@ ATF_TC_BODY(popen_zeropad, tc)
 
 	srand ((unsigned int)time(NULL));
 
-	for (index = 0; index  BUFSIZE; index++)
-		buffer[index]=(char)rand();
+	for (idx = 0; idx  BUFSIZE; idx++)
+		buffer[idx]=(char)rand();
 
 	(void)snprintf(command, sizeof(command), %s %s,
 	_PATH_CAT, DATAFILE);
@@ -101,18 +101,18 @@ ATF_TC_BODY(popen_zeropad, tc)
 	if ((my_pipe = popen(command, r)) == NULL)
 		TEST_ERROR(popen read);
 
-	index = 0;
+	idx = 0;
 	while ((in = fgetc(my_pipe)) != EOF)
-		if (index == BUFSIZE) {
+		if (idx == BUFSIZE) {
 			errno = EFBIG;
 			TEST_ERROR(read);
 		}
-		else if ((char)in != buffer[index++]) {
+		else if ((char)in != buffer[idx++]) {
 			errno = EINVAL;
 			TEST_ERROR(read);
 		}
 
-	if (index  BUFSIZE) {
+	if (idx  BUFSIZE) {
 		errno = EIO;
 		TEST_ERROR(read);
 	}



CVS commit: src/tests/lib/libc/string

2013-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 15 23:56:32 UTC 2013

Modified Files:
src/tests/lib/libc/string: t_stresep.c

Log Message:
don't brk the build.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_stresep.c

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

Modified files:

Index: src/tests/lib/libc/string/t_stresep.c
diff -u src/tests/lib/libc/string/t_stresep.c:1.2 src/tests/lib/libc/string/t_stresep.c:1.3
--- src/tests/lib/libc/string/t_stresep.c:1.2	Thu Jul  7 04:27:36 2011
+++ src/tests/lib/libc/string/t_stresep.c	Fri Feb 15 18:56:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_stresep.c,v 1.2 2011/07/07 08:27:36 jruoho Exp $ */
+/*	$NetBSD: t_stresep.c,v 1.3 2013/02/15 23:56:32 christos Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -51,9 +51,9 @@ ATF_TC_HEAD(stresep_basic, tc)
 
 ATF_TC_BODY(stresep_basic, tc)
 {
-	char brk[] = foo\\ \\ bar baz bar\\ foo\\  bar\\ \\ foo \\ \\ \\ 
+	char brkstr[] = foo\\ \\ bar baz bar\\ foo\\  bar\\ \\ foo \\ \\ \\ 
 		 baz bar\\ \\ ;
-	char *p, *q = brk;
+	char *p, *q = brkstr;
 
 	expect(foo  bar);
 	expect(baz);



CVS commit: src/usr.bin/make

2013-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 16 02:11:11 UTC 2013

Modified Files:
src/usr.bin/make: main.c

Log Message:
Set .MAKE.OS to utsname.sysname so we can tell bogus OS's apart early in
the build process.


To generate a diff of this commit:
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/make/main.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/make/main.c
diff -u src/usr.bin/make/main.c:1.205 src/usr.bin/make/main.c:1.206
--- src/usr.bin/make/main.c:1.205	Sat Jan 26 10:53:00 2013
+++ src/usr.bin/make/main.c	Fri Feb 15 21:11:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.206 2013/02/16 02:11:11 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $;
+static char rcsid[] = $NetBSD: main.c,v 1.206 2013/02/16 02:11:11 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.206 2013/02/16 02:11:11 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -817,6 +817,12 @@ main(int argc, char **argv)
 	}
 #endif
 
+	if (uname(utsname) == -1) {
+	(void)fprintf(stderr, %s: uname failed (%s).\n, progname,
+		strerror(errno));
+	exit(2);
+	}
+
 	/*
 	 * Get the name of this type of MACHINE from utsname
 	 * so we can share an executable for similar machines.
@@ -827,11 +833,6 @@ main(int argc, char **argv)
 	 */
 	if (!machine) {
 #ifdef MAKE_NATIVE
-	if (uname(utsname) == -1) {
-		(void)fprintf(stderr, %s: uname failed (%s).\n, progname,
-		strerror(errno));
-		exit(2);
-	}
 	machine = utsname.machine;
 #else
 #ifdef MAKE_MACHINE
@@ -861,6 +862,7 @@ main(int argc, char **argv)
 	 */
 	Var_Init();		/* Initialize the lists of variables for
  * parsing arguments */
+	Var_Set(.MAKE.OS, utsname.sysname, VAR_GLOBAL, 0);
 	Var_Set(MACHINE, machine, VAR_GLOBAL, 0);
 	Var_Set(MACHINE_ARCH, machine_arch, VAR_GLOBAL, 0);
 #ifdef MAKE_VERSION



CVS commit: src/usr.bin/make

2013-02-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Feb 16 02:39:27 UTC 2013

Modified Files:
src/usr.bin/make: main.c

Log Message:
we need utsname all the time.


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/usr.bin/make/main.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/make/main.c
diff -u src/usr.bin/make/main.c:1.206 src/usr.bin/make/main.c:1.207
--- src/usr.bin/make/main.c:1.206	Fri Feb 15 21:11:11 2013
+++ src/usr.bin/make/main.c	Fri Feb 15 21:39:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.206 2013/02/16 02:11:11 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.207 2013/02/16 02:39:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: main.c,v 1.206 2013/02/16 02:11:11 christos Exp $;
+static char rcsid[] = $NetBSD: main.c,v 1.207 2013/02/16 02:39:27 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.3 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: main.c,v 1.206 2013/02/16 02:11:11 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.207 2013/02/16 02:39:27 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -119,9 +119,7 @@ __RCSID($NetBSD: main.c,v 1.206 2013/02
 #include sys/resource.h
 #include sys/signal.h
 #include sys/stat.h
-#ifdef MAKE_NATIVE
 #include sys/utsname.h
-#endif
 #include sys/wait.h
 
 #include errno.h
@@ -782,9 +780,7 @@ main(int argc, char **argv)
 	static char defsyspath[] = _PATH_DEFSYSPATH;
 	char found_path[MAXPATHLEN + 1];	/* for searching for sys.mk */
 	struct timeval rightnow;		/* to initialize random seed */
-#ifdef MAKE_NATIVE
 	struct utsname utsname;
-#endif
 
 	/* default to writing debug to stderr */
 	debug_file = stderr;



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

2013-02-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 16 06:49:59 UTC 2013

Modified Files:
src/sys/arch/arm/include: bus_defs.h

Log Message:
Add PRIxBUSADDR, etal


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/include/bus_defs.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/arm/include/bus_defs.h
diff -u src/sys/arch/arm/include/bus_defs.h:1.8 src/sys/arch/arm/include/bus_defs.h:1.9
--- src/sys/arch/arm/include/bus_defs.h:1.8	Sun Jan 27 19:00:08 2013
+++ src/sys/arch/arm/include/bus_defs.h	Sat Feb 16 06:49:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_defs.h,v 1.8 2013/01/27 19:00:08 matt Exp $	*/
+/*	$NetBSD: bus_defs.h,v 1.9 2013/02/16 06:49:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -74,12 +74,18 @@
 typedef u_long bus_addr_t;
 typedef u_long bus_size_t;
 
+#define	PRIxBUSADDR	lx
+#define	PRIxBUSSIZE	lx
+#define	PRIuBUSSIZE	lu
+
 /*
  * Access methods for bus space.
  */
 typedef struct bus_space *bus_space_tag_t;
 typedef u_long bus_space_handle_t;
 
+#define	PRIxBSH		lx
+
 /*
  *	int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
  *	bus_size_t size, int flags, bus_space_handle_t *bshp);