CVS commit: src/sys/kern

2013-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 16 09:25:56 UTC 2013

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

Log Message:
Fix inverted ktrop() return value - oops!
Noted by Nicolas Joly.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/kern/kern_ktrace.c

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

Modified files:

Index: src/sys/kern/kern_ktrace.c
diff -u src/sys/kern/kern_ktrace.c:1.162 src/sys/kern/kern_ktrace.c:1.163
--- src/sys/kern/kern_ktrace.c:1.162	Sat Sep 14 20:20:09 2013
+++ src/sys/kern/kern_ktrace.c	Mon Sep 16 09:25:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ktrace.c,v 1.162 2013/09/14 20:20:09 martin Exp $	*/
+/*	$NetBSD: kern_ktrace.c,v 1.163 2013/09/16 09:25:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_ktrace.c,v 1.162 2013/09/14 20:20:09 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ktrace.c,v 1.163 2013/09/16 09:25:56 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1322,7 +1322,7 @@ ktrops(lwp_t *curl, struct proc *p, int 
  	mutex_exit(ktrace_lock);
  	mutex_exit(p-p_lock);
 
-	return error ? 1 : 0;
+	return error ? 0 : 1;
 }
 
 int



CVS commit: src/sys/ufs/ffs

2013-09-16 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Sep 16 12:36:54 UTC 2013

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Function ffs_reload() works on a read-only mount, so remove the call
to ffs_snapshot_mount() as it would panic later with already on list
when remounting read-write.

Should fix PR kern/48211 (Unclean shutdown with active snapshot causes
panic during reboot)


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/ufs/ffs/ffs_vfsops.c

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

Modified files:

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.287 src/sys/ufs/ffs/ffs_vfsops.c:1.288
--- src/sys/ufs/ffs/ffs_vfsops.c:1.287	Sun Aug 11 04:36:17 2013
+++ src/sys/ufs/ffs/ffs_vfsops.c	Mon Sep 16 12:36:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.287 2013/08/11 04:36:17 dholland Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.288 2013/09/16 12:36:54 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.287 2013/08/11 04:36:17 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.288 2013/09/16 12:36:54 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -803,8 +803,6 @@ ffs_reload(struct mount *mp, kauth_cred_
 		space = (char *)space + bsize;
 		brelse(bp, 0);
 	}
-	if (fs-fs_snapinum[0] != 0)
-		ffs_snapshot_mount(mp);
 	/*
 	 * We no longer know anything about clusters per cylinder group.
 	 */



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

2013-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 16 15:22:52 UTC 2013

Modified Files:
src/tests/lib/libc/gen: t_isnan.c

Log Message:
Make it compile on archs where NAN is not defined - previously it only
compiled by chance (and details of the __isnan macro) on vax.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_isnan.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/gen/t_isnan.c
diff -u src/tests/lib/libc/gen/t_isnan.c:1.1 src/tests/lib/libc/gen/t_isnan.c:1.2
--- src/tests/lib/libc/gen/t_isnan.c:1.1	Mon Sep 19 05:25:50 2011
+++ src/tests/lib/libc/gen/t_isnan.c	Mon Sep 16 15:22:51 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_isnan.c,v 1.1 2011/09/19 05:25:50 jruoho Exp $ */
+/* $NetBSD: t_isnan.c,v 1.2 2013/09/16 15:22:51 martin Exp $ */
 
 /*
  * This file is in the Public Domain.
@@ -21,9 +21,11 @@ ATF_TC_HEAD(isnan_basic, tc)
 
 ATF_TC_BODY(isnan_basic, tc)
 {
+#ifdef NAN
 	/* NAN is meant to be a (float)NaN. */
 	ATF_CHECK(isnan(NAN) != 0);
 	ATF_CHECK(isnan((double)NAN) != 0);
+#endif
 }
 
 ATF_TC(isinf_basic);
@@ -51,10 +53,12 @@ ATF_TP_ADD_TCS(tp)
 
 	arch = atf_config_get(atf_arch);
 
-	if (strcmp(vax, arch) == 0 || strcmp(m68000, arch) == 0)
+	if (strcmp(m68000, arch) == 0)
 		atf_tc_skip(Test not applicable on %s, arch);
 	else {
+#ifdef NAN
 		ATF_TP_ADD_TC(tp, isnan_basic);
+#endif
 		ATF_TP_ADD_TC(tp, isinf_basic);
 	}
 



CVS commit: src/distrib/utils/embedded/conf

2013-09-16 Thread Adrian Steinmann
Module Name:src
Committed By:   ast
Date:   Mon Sep 16 15:23:57 UTC 2013

Modified Files:
src/distrib/utils/embedded/conf: beagleboard.conf rpi.conf
rpi_inst.conf

Log Message:
After discussions with cristos regarding the previous commit, he
convinced me it was sufficient to define GZIP_CMD only in
distrib/utils/embedded/mkimage and not again in the config files
beagleboard.conf, rpi.conf, and rpi_inst.conf similar to how the
other variables $src, $release, $mnt, ... are only defined there.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/distrib/utils/embedded/conf/beagleboard.conf
cvs rdiff -u -r1.22 -r1.23 src/distrib/utils/embedded/conf/rpi.conf
cvs rdiff -u -r1.3 -r1.4 src/distrib/utils/embedded/conf/rpi_inst.conf

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

Modified files:

Index: src/distrib/utils/embedded/conf/beagleboard.conf
diff -u src/distrib/utils/embedded/conf/beagleboard.conf:1.16 src/distrib/utils/embedded/conf/beagleboard.conf:1.17
--- src/distrib/utils/embedded/conf/beagleboard.conf:1.16	Sat Sep 14 12:51:27 2013
+++ src/distrib/utils/embedded/conf/beagleboard.conf	Mon Sep 16 15:23:57 2013
@@ -1,10 +1,8 @@
-# $NetBSD: beagleboard.conf,v 1.16 2013/09/14 12:51:27 ast Exp $
+# $NetBSD: beagleboard.conf,v 1.17 2013/09/16 15:23:57 ast Exp $
 # BeagleBoard customization script used by mkimage
 #
 board=beagleboard
 
-GZIP_CMD=${TOOL_GZIP:-gzip} # ${GZIP} is special to gzip(1)
-
 . ${DIR}/conf/evbarm.conf
 
 bboard_kernelimg=bboard.ub

Index: src/distrib/utils/embedded/conf/rpi.conf
diff -u src/distrib/utils/embedded/conf/rpi.conf:1.22 src/distrib/utils/embedded/conf/rpi.conf:1.23
--- src/distrib/utils/embedded/conf/rpi.conf:1.22	Sat Sep 14 12:51:27 2013
+++ src/distrib/utils/embedded/conf/rpi.conf	Mon Sep 16 15:23:57 2013
@@ -1,12 +1,10 @@
-# $NetBSD: rpi.conf,v 1.22 2013/09/14 12:51:27 ast Exp $
+# $NetBSD: rpi.conf,v 1.23 2013/09/16 15:23:57 ast Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
 board=rpi
 kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI.bin
 
-GZIP_CMD=${TOOL_GZIP:-gzip} # ${GZIP} is special to gzip(1)
-
 . ${DIR}/conf/evbarm.conf
 
 firmwaredir=$src/external/broadcom/rpi-firmware/dist

Index: src/distrib/utils/embedded/conf/rpi_inst.conf
diff -u src/distrib/utils/embedded/conf/rpi_inst.conf:1.3 src/distrib/utils/embedded/conf/rpi_inst.conf:1.4
--- src/distrib/utils/embedded/conf/rpi_inst.conf:1.3	Sat Sep 14 12:51:27 2013
+++ src/distrib/utils/embedded/conf/rpi_inst.conf	Mon Sep 16 15:23:57 2013
@@ -1,12 +1,10 @@
-# $NetBSD: rpi_inst.conf,v 1.3 2013/09/14 12:51:27 ast Exp $
+# $NetBSD: rpi_inst.conf,v 1.4 2013/09/16 15:23:57 ast Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
 board=rpi_inst
 kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI_INSTALL.bin
 
-GZIP_CMD=${TOOL_GZIP:-gzip} # ${GZIP} is special to gzip(1)
-
 image=$HOME/${board}.img
 
 specialdirs=/kern /proc



CVS commit: src/include

2013-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 16 15:54:42 UTC 2013

Modified Files:
src/include: math.h

Log Message:
Allow archs to provide __isinf() and __isnan() as inline functions instead
of macros.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/include/math.h

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

Modified files:

Index: src/include/math.h
diff -u src/include/math.h:1.62 src/include/math.h:1.63
--- src/include/math.h:1.62	Fri Apr 19 16:40:59 2013
+++ src/include/math.h	Mon Sep 16 15:54:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.62 2013/04/19 16:40:59 joerg Exp $	*/
+/*	$NetBSD: math.h,v 1.63 2013/09/16 15:54:42 martin Exp $	*/
 
 /*
  * 
@@ -472,14 +472,14 @@ long double fminl(long double, long doub
 ((_POSIX_C_SOURCE - 0) = 200112L) || \
 defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
 /* 7.12.3.3 int isinf(real-floating x) */
-#ifdef __isinf
+#if defined(__isinf) || defined(__HAVE_INLINE___ISINF)
 #define	isinf(__x)	__isinf(__x)
 #else
 #define	isinf(__x)	__fpmacro_unary_floating(isinf, __x)
 #endif
 
 /* 7.12.3.4 int isnan(real-floating x) */
-#ifdef __isnan
+#if defined(__isnan) || defined(__HAVE_INLINE___ISNAN)
 #define	isnan(__x)	__isnan(__x)
 #else
 #define	isnan(__x)	__fpmacro_unary_floating(isnan, __x)



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

2013-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 16 15:56:24 UTC 2013

Modified Files:
src/sys/arch/vax/include: math.h

Log Message:
Change __isinf and __isnan from macros to inline functions. The macros do
collide with newer gcc libstdc++.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/vax/include/math.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/vax/include/math.h
diff -u src/sys/arch/vax/include/math.h:1.6 src/sys/arch/vax/include/math.h:1.7
--- src/sys/arch/vax/include/math.h:1.6	Sun Feb  5 17:45:38 2012
+++ src/sys/arch/vax/include/math.h	Mon Sep 16 15:56:24 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.6 2012/02/05 17:45:38 matt Exp $	*/
+/*	$NetBSD: math.h,v 1.7 2013/09/16 15:56:24 martin Exp $	*/
 
 #ifndef _VAX_MATH_H_
 #define _VAX_MATH_H_
@@ -11,8 +11,10 @@
 #define	__INFINITY	1.0E+39F
 #endif
 
-#define	__isinf(__x)	(0)
-#define	__isnan(__x)	(0)
+static inline int __isinf(double __x) { return 0; }
+static inline int __isnan(double __x) { return 0; }
+#define	__HAVE_INLINE___ISINF
+#define	__HAVE_INLINE___ISNAN
 
 #if !defined(_ANSI_SOURCE)  !defined(_POSIX_C_SOURCE)  \
 !defined(_XOPEN_SOURCE) || \



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

2013-09-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Sep 16 15:33:24 UTC 2013

Modified Files:
src/tests/lib/libc/gen: t_isnan.c

Log Message:
Retry previous


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_isnan.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/gen/t_isnan.c
diff -u src/tests/lib/libc/gen/t_isnan.c:1.2 src/tests/lib/libc/gen/t_isnan.c:1.3
--- src/tests/lib/libc/gen/t_isnan.c:1.2	Mon Sep 16 15:22:51 2013
+++ src/tests/lib/libc/gen/t_isnan.c	Mon Sep 16 15:33:24 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_isnan.c,v 1.2 2013/09/16 15:22:51 martin Exp $ */
+/* $NetBSD: t_isnan.c,v 1.3 2013/09/16 15:33:24 martin Exp $ */
 
 /*
  * This file is in the Public Domain.
@@ -25,6 +25,8 @@ ATF_TC_BODY(isnan_basic, tc)
 	/* NAN is meant to be a (float)NaN. */
 	ATF_CHECK(isnan(NAN) != 0);
 	ATF_CHECK(isnan((double)NAN) != 0);
+#else
+	atf_tc_skip(Test not applicable);
 #endif
 }
 
@@ -56,9 +58,7 @@ ATF_TP_ADD_TCS(tp)
 	if (strcmp(m68000, arch) == 0)
 		atf_tc_skip(Test not applicable on %s, arch);
 	else {
-#ifdef NAN
 		ATF_TP_ADD_TC(tp, isnan_basic);
-#endif
 		ATF_TP_ADD_TC(tp, isinf_basic);
 	}
 



CVS commit: src/sys/rump/dev

2013-09-16 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Sep 17 00:50:19 UTC 2013

Modified Files:
src/sys/rump/dev: files.rump

Log Message:
allow pcibus to attach to a rump kernel mainbus


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/files.rump

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

Modified files:

Index: src/sys/rump/dev/files.rump
diff -u src/sys/rump/dev/files.rump:1.3 src/sys/rump/dev/files.rump:1.4
--- src/sys/rump/dev/files.rump:1.3	Tue Aug 24 11:23:35 2010
+++ src/sys/rump/dev/files.rump	Tue Sep 17 00:50:19 2013
@@ -1,7 +1,7 @@
-#	$NetBSD: files.rump,v 1.3 2010/08/24 11:23:35 pooka Exp $
+#	$NetBSD: files.rump,v 1.4 2013/09/17 00:50:19 pooka Exp $
 #
 
-device mainbus { }
+device mainbus { }: pcibus
 attach mainbus at root
 
 device ugenhc: usbus, usbroothub



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

2013-09-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Sep 17 01:16:45 UTC 2013

Modified Files:
src/sys/arch/x86/pci: ichlpcib.c

Log Message:
Use '\n' at the end of all aprint_error_dev() format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/pci/ichlpcib.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/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.39 src/sys/arch/x86/pci/ichlpcib.c:1.40
--- src/sys/arch/x86/pci/ichlpcib.c:1.39	Tue Jun  4 13:59:16 2013
+++ src/sys/arch/x86/pci/ichlpcib.c	Tue Sep 17 01:16:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.39 2013/06/04 13:59:16 msaitoh Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.40 2013/09/17 01:16:45 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.39 2013/06/04 13:59:16 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.40 2013/09/17 01:16:45 jakllsch Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -315,7 +315,7 @@ lpcibattach(device_t parent, device_t se
 	 */
 	if (pci_mapreg_map(pa, LPCIB_PCI_PMBASE, PCI_MAPREG_TYPE_IO, 0,
 			   sc-sc_iot, sc-sc_ioh, NULL, sc-sc_iosize)) {
-		aprint_error_dev(self, can't map power management i/o space);
+		aprint_error_dev(self, can't map power management i/o space\n);
 		return;
 	}
 
@@ -331,14 +331,14 @@ lpcibattach(device_t parent, device_t se
 		rcba = pci_conf_read(sc-sc_pcib.sc_pc, sc-sc_pcib.sc_tag,
 		 LPCIB_RCBA);
 		if ((rcba  LPCIB_RCBA_EN) == 0) {
-			aprint_error_dev(self, RCBA is not enabled);
+			aprint_error_dev(self, RCBA is not enabled\n);
 			return;
 		}
 		rcba = ~LPCIB_RCBA_EN;
 
 		if (bus_space_map(sc-sc_rcbat, rcba, LPCIB_RCBA_SIZE, 0,
   sc-sc_rcbah)) {
-			aprint_error_dev(self, RCBA could not be mapped);
+			aprint_error_dev(self, RCBA could not be mapped\n);
 			return;
 		}
 	}