Re: CVS commit: src/usr.bin/make

2012-11-03 Thread David Laight
On Sat, Nov 03, 2012 at 02:25:14AM +, Simon J. Gerraty wrote:
 Module Name:  src
 Committed By: sjg
 Date: Sat Nov  3 02:25:13 UTC 2012
 
 Modified Files:
   src/usr.bin/make: cond.c
 
 Log Message:
 Allow cond_state[] to grow.
 The need is rare, but real.

128 nested conditional was expected to be far more than imaginable.

There is also an off-by-one error is the new code.
The original code had:
static enum if_states cond_state[MAXIF + 1] = { IF_ACTIVE };
(note the +1)
This isn't allowed for in the new code - and it will overwrite
the end of the malloced area.

You need to move the realloc() below the cond_depth+++

I'm then not sure that 128+n*32 is a sane sequence.
Possibly just n*32 - since I suspect 32 is plenty for most makefiles.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/sys/arch/x68k/conf

2012-11-03 Thread J. Hannken-Illjes
On Nov 3, 2012, at 3:44 PM, Izumi Tsutsui wrote:

 Module Name:  src
 Committed By: tsutsui
 Date: Sat Nov  3 14:44:29 UTC 2012
 
 Modified Files:
   src/sys/arch/x68k/conf: GENERIC
 
 Log Message:
 Comment out pseudo-device fss.  We already has options FFS_NO_SNAPSHOT.

This is not the same:

- having fss makes it possible to use file system external or already
  configured snapshots while

- FFS_NO_SNAPSHOT doesn't allow the creation of file system internal
  snapshots.  It was requested to reduce the size of INSTALL kernels only.

--
Juergen Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)


Re: CVS commit: src/sys/arch/x68k/conf

2012-11-03 Thread Izumi Tsutsui
hannken@ wrote:

  Modified Files:
  src/sys/arch/x68k/conf: GENERIC
  
  Log Message:
  Comment out pseudo-device fss.  We already has options FFS_NO_SNAPSHOT.
 
 This is not the same:
 
 - having fss makes it possible to use file system external or already
   configured snapshots while
 
 - FFS_NO_SNAPSHOT doesn't allow the creation of file system internal
   snapshots.  It was requested to reduce the size of INSTALL kernels only.

Hmm.

Then, is pseudo-device fss still useful with options FFS_NO_SNAPSHOT?
(most x68k has only 8~12MB)

---
Izumi Tsutsui


Re: CVS commit: src/sys/arch/x68k/conf

2012-11-03 Thread J. Hannken-Illjes
On Nov 3, 2012, at 4:51 PM, Izumi Tsutsui wrote:

 hannken@ wrote:
 
 Modified Files:
 src/sys/arch/x68k/conf: GENERIC
 
 Log Message:
 Comment out pseudo-device fss.  We already has options FFS_NO_SNAPSHOT.
 
 This is not the same:
 
 - having fss makes it possible to use file system external or already
  configured snapshots while
 
 - FFS_NO_SNAPSHOT doesn't allow the creation of file system internal
  snapshots.  It was requested to reduce the size of INSTALL kernels only.
 
 Hmm.
 
 Then, is pseudo-device fss still useful with options FFS_NO_SNAPSHOT?
 (most x68k has only 8~12MB)

Hmm -- depends, what is the size of fss.o here?

--
Juergen Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germany)


re: CVS commit: src/sys/arch/sparc/sparc

2012-11-03 Thread matthew green

 Module Name:  src
 Committed By: chs
 Date: Sun Nov  4 00:32:47 UTC 2012
 
 Modified Files:
   src/sys/arch/sparc/sparc: locore.s pmap.c
 
 Log Message:
 in cpu_switchto(), remove the MP-unsafe code to mark a pmap active on a CPU,
 pmap_activate() already does this.  add MP locking to pmap_activate()
 and pmap_deactivate().  move flushing of user windows and virtual caches
 from pamp_activate() to pmap_deactivate().


hmm.  this makes pmap_deactivate() do things in UP that weren't being
done before at all.  switching to/from kernel/lwp for the same lwp will
now be flushing the ctx every time.  that seems suboptimal?

we should really update PMAP_LOCK() to not be kernel lock.


.mrg.


CVS commit: src/distrib

2012-11-03 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Nov  3 07:59:46 UTC 2012

Modified Files:
src/distrib/notes/common: main
src/distrib/notes/evbarm: prep
src/distrib/sets: regpkg

Log Message:
Remove duplicate word (the the - the)


To generate a diff of this commit:
cvs rdiff -u -r1.492 -r1.493 src/distrib/notes/common/main
cvs rdiff -u -r1.10 -r1.11 src/distrib/notes/evbarm/prep
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/regpkg

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.492 src/distrib/notes/common/main:1.493
--- src/distrib/notes/common/main:1.492	Mon Oct 15 18:15:28 2012
+++ src/distrib/notes/common/main	Sat Nov  3 07:59:45 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.492 2012/10/15 18:15:28 palle Exp $
+.\	$NetBSD: main,v 1.493 2012/11/03 07:59:45 mbalmer Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -651,7 +651,7 @@ range of operating systems can check the
 .item)
 .Pp
 Other directories provide unpacked source trees e.g. for distribution via
-the the software update protocol (SUP) or the
+the software update protocol (SUP) or the
 concurrent version system (CVS). For more information see:
 .Lk http://www.NetBSD.org/mirrors/
 .\}

Index: src/distrib/notes/evbarm/prep
diff -u src/distrib/notes/evbarm/prep:1.10 src/distrib/notes/evbarm/prep:1.11
--- src/distrib/notes/evbarm/prep:1.10	Thu Apr 23 01:56:49 2009
+++ src/distrib/notes/evbarm/prep	Sat Nov  3 07:59:46 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: prep,v 1.10 2009/04/23 01:56:49 snj Exp $
+.\	$NetBSD: prep,v 1.11 2012/11/03 07:59:46 mbalmer Exp $
 .\
 .\ Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -35,7 +35,7 @@ serial port and the on-chip Ethernet.
 These notes assume that the Ethernet will be used to load the kernel.
 RedBoot can either use TFTP or HTTP to load the kernel via the network.
 .Pp
-These notes also assume the the TS-7200 will be run from the CompactFlash;
+These notes also assume the TS-7200 will be run from the CompactFlash;
 that a FFS filesystem on the CompactFlash card will provide the root file
 system.  The minimum size of the CompactFlash card is 64MB with 512MB being
 the recommended minimum size if attempting a full installation.

Index: src/distrib/sets/regpkg
diff -u src/distrib/sets/regpkg:1.19 src/distrib/sets/regpkg:1.20
--- src/distrib/sets/regpkg:1.19	Wed Dec  2 15:52:14 2009
+++ src/distrib/sets/regpkg	Sat Nov  3 07:59:46 2012
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $NetBSD: regpkg,v 1.19 2009/12/02 15:52:14 apb Exp $
+# $NetBSD: regpkg,v 1.20 2012/11/03 07:59:46 mbalmer Exp $
 #
 # Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -628,7 +628,7 @@ EOF
 	# @name line and a lot of @comment MD5: lines.
 	#
 	{
-		rcsid='$NetBSD: regpkg,v 1.19 2009/12/02 15:52:14 apb Exp $'
+		rcsid='$NetBSD: regpkg,v 1.20 2012/11/03 07:59:46 mbalmer Exp $'
 		utcdate=$(${ENV_CMD} TZ=UTC LOCALE=C \
 			${DATE} '+%Y-%m-%d %H:%M')
 		user=${USER:-root}
@@ -992,7 +992,7 @@ do_register_syspkg()
 }
 
 #
-# do_create_syspkg_tgz() creates the the binary pkg (*.tgz) if
+# do_create_syspkg_tgz() creates the binary pkg (*.tgz) if
 # appropriate.
 #
 # If binpkgfile already exists, that might be an error, depending on



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

2012-11-03 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  3 08:01:36 UTC 2012

Removed Files:
src/sys/arch/x68k/stand/bootlogo: MANIFEST netbsd.xpm setbootimg.c
xpm2bootimg.c

Log Message:
Remove x68k/stand/bootlogo/ directory.
It was a tool before the bootloader becomes multi-stage (10 years ago),
and it does not work anymore today.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/arch/x68k/stand/bootlogo/MANIFEST \
src/sys/arch/x68k/stand/bootlogo/netbsd.xpm
cvs rdiff -u -r1.4 -r0 src/sys/arch/x68k/stand/bootlogo/setbootimg.c
cvs rdiff -u -r1.5 -r0 src/sys/arch/x68k/stand/bootlogo/xpm2bootimg.c

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



CVS commit: src/lib/libpthread

2012-11-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  3 09:20:36 UTC 2012

Modified Files:
src/lib/libpthread: pthread_condattr.3

Log Message:
Fix pasto.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libpthread/pthread_condattr.3

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

Modified files:

Index: src/lib/libpthread/pthread_condattr.3
diff -u src/lib/libpthread/pthread_condattr.3:1.8 src/lib/libpthread/pthread_condattr.3:1.9
--- src/lib/libpthread/pthread_condattr.3:1.8	Sat Nov  3 03:10:50 2012
+++ src/lib/libpthread/pthread_condattr.3	Sat Nov  3 09:20:36 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: pthread_condattr.3,v 1.8 2012/11/03 03:10:50 christos Exp $
+.\ $NetBSD: pthread_condattr.3,v 1.9 2012/11/03 09:20:36 wiz Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -63,7 +63,7 @@
 .Ft int
 .Fn pthread_condattr_init pthread_condattr_t *attr
 .Ft int
-.Fn pthread_condattr_init pthread_condattr_t *attr clockid_t clock
+.Fn pthread_condattr_setclock pthread_condattr_t *attr clockid_t clock
 .Ft int
 .Fn pthread_condattr_destroy pthread_condattr_t *attr
 .Sh DESCRIPTION



CVS commit: src/sys/modules/nand

2012-11-03 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sat Nov  3 11:48:55 UTC 2012

Modified Files:
src/sys/modules/nand: Makefile

Log Message:
Add nand_samsung.c to the module build too!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/nand/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/modules/nand/Makefile
diff -u src/sys/modules/nand/Makefile:1.3 src/sys/modules/nand/Makefile:1.4
--- src/sys/modules/nand/Makefile:1.3	Tue Jun 28 18:14:12 2011
+++ src/sys/modules/nand/Makefile	Sat Nov  3 11:48:54 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2011/06/28 18:14:12 ahoka Exp $
+# $NetBSD: Makefile,v 1.4 2012/11/03 11:48:54 ahoka Exp $
 
 .include ../Makefile.inc
 
@@ -11,5 +11,6 @@ SRCS+=	nand_bbt.c
 SRCS+=	nand_crc.c
 SRCS+=	hamming.c
 SRCS+=	nand_micron.c
+SRCS+=	nand_samsung.c
 
 .include bsd.kmodule.mk



CVS commit: src/sys/dev/nand

2012-11-03 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sat Nov  3 12:12:48 UTC 2012

Modified Files:
src/sys/dev/nand: nand.c nand.h nand_micron.c nand_samsung.c

Log Message:
Make nc_block_pages go aways, its redundant and unused.
Print more info on attach including the width.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/nand/nand.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nand/nand_micron.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nand/nand_samsung.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/nand/nand.c
diff -u src/sys/dev/nand/nand.c:1.20 src/sys/dev/nand/nand.c:1.21
--- src/sys/dev/nand/nand.c:1.20	Fri Nov  2 19:50:22 2012
+++ src/sys/dev/nand/nand.c	Sat Nov  3 12:12:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand.c,v 1.20 2012/11/02 19:50:22 pgoyette Exp $	*/
+/*	$NetBSD: nand.c,v 1.21 2012/11/03 12:12:48 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -34,7 +34,7 @@
 /* Common driver for NAND chips implementing the ONFI 2.2 specification */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.20 2012/11/02 19:50:22 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.21 2012/11/03 12:12:48 ahoka Exp $);
 
 #include locators.h
 
@@ -412,11 +412,10 @@ nand_scan_media(device_t self, struct na
 	chip-nc_lun_blocks, chip-nc_num_luns,
 	chip-nc_size / 1024 / 1024);
 
-#ifdef NAND_VERBOSE
 	aprint_normal_dev(self, column cycles: % PRIu8 , row cycles: %
-	PRIu8 \n,
-	chip-nc_addr_cycles_column, chip-nc_addr_cycles_row);
-#endif
+	PRIu8 , width: %s\n,
+	chip-nc_addr_cycles_column, chip-nc_addr_cycles_row,
+	(chip-nc_flags  NC_BUSWIDTH_16) ? x16 : x8);
 
 	ecc = chip-nc_ecc = sc-nand_if-ecc;
 
@@ -563,7 +562,6 @@ nand_fill_chip_structure(device_t self, 
 	params.param_lunsize * params.param_numluns;
 
 	chip-nc_page_size = params.param_pagesize;
-	chip-nc_block_pages = params.param_blocksize;
 	chip-nc_block_size = params.param_blocksize * params.param_pagesize;
 	chip-nc_spare_size = params.param_sparesize;
 	chip-nc_lun_blocks = params.param_lunsize;

Index: src/sys/dev/nand/nand.h
diff -u src/sys/dev/nand/nand.h:1.15 src/sys/dev/nand/nand.h:1.16
--- src/sys/dev/nand/nand.h:1.15	Fri Nov  2 17:14:41 2012
+++ src/sys/dev/nand/nand.h	Sat Nov  3 12:12:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand.h,v 1.15 2012/11/02 17:14:41 ahoka Exp $	*/
+/*	$NetBSD: nand.h,v 1.16 2012/11/03 12:12:48 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -113,9 +113,7 @@ struct nand_chip {
 	uint8_t *nc_ecc_cache;		/* buffer for ecc */
 	uint64_t nc_size;		/* storage size in bytes */
 	uint32_t nc_page_size;		/* page size in bytes */
-	uint32_t nc_block_pages;	/* block size in pages */
 	uint32_t nc_block_size;		/* block size in bytes */
-	uint32_t nc_spare_size;		/* spare (oob) size in bytes */
 	uint32_t nc_lun_blocks;		/* LUN size in blocks */
 	uint32_t nc_flags;		/* bitfield flags */
 	uint32_t nc_quirks;		/* bitfield quirks */
@@ -123,6 +121,7 @@ struct nand_chip {
 	uint32_t nc_page_mask;		/* page mask for page alignment */
 	uint32_t nc_block_shift;	/* write shift */
 	uint32_t nc_block_mask;		/* write mask */
+	uint16_t nc_spare_size;		/* spare (oob) size in bytes */
 	uint8_t nc_num_luns;		/* number of LUNs */
 	uint8_t nc_manf_id;		/* manufacturer id */
 	uint8_t nc_dev_id;		/* device id  */

Index: src/sys/dev/nand/nand_micron.c
diff -u src/sys/dev/nand/nand_micron.c:1.7 src/sys/dev/nand/nand_micron.c:1.8
--- src/sys/dev/nand/nand_micron.c:1.7	Fri Nov  2 17:14:41 2012
+++ src/sys/dev/nand/nand_micron.c	Sat Nov  3 12:12:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand_micron.c,v 1.7 2012/11/02 17:14:41 ahoka Exp $	*/
+/*	$NetBSD: nand_micron.c,v 1.8 2012/11/03 12:12:48 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nand_micron.c,v 1.7 2012/11/02 17:14:41 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: nand_micron.c,v 1.8 2012/11/03 12:12:48 ahoka Exp $);
 
 #include nand.h
 #include onfi.h
@@ -151,7 +151,6 @@ mt29fxgx_parameters(device_t self, struc
 	if (dp-width == 16)
 		chip-nc_flags |= NC_BUSWIDTH_16;
 	chip-nc_page_size = MT29FxG_PAGESIZE;
-	chip-nc_block_pages = MT29FxG_BLOCK_PAGES;
 	chip-nc_block_size = MT29FxG_BLOCK_PAGES * MT29FxG_PAGESIZE;
 	chip-nc_spare_size = MT29FxG_SPARESIZE;
 	chip-nc_lun_blocks = dp-lun_blocks;

Index: src/sys/dev/nand/nand_samsung.c
diff -u src/sys/dev/nand/nand_samsung.c:1.8 src/sys/dev/nand/nand_samsung.c:1.9
--- src/sys/dev/nand/nand_samsung.c:1.8	Fri Nov  2 21:38:29 2012
+++ src/sys/dev/nand/nand_samsung.c	Sat Nov  3 12:12:48 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand_samsung.c,v 1.8 2012/11/02 21:38:29 ahoka Exp $	*/
+/*	$NetBSD: nand_samsung.c,v 1.9 2012/11/03 12:12:48 ahoka Exp $	*/
 
 /*-
  * 

CVS commit: src/sys/dev/nand

2012-11-03 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sat Nov  3 12:45:28 UTC 2012

Modified Files:
src/sys/dev/nand: nand.c nandemulator.c

Log Message:
Endiannes fixes from Brett Slager in ONFI Param page parsing.
Similar changes in nandemulator by me.
Remove panic about more than one LUNs.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/nand/nandemulator.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/nand/nand.c
diff -u src/sys/dev/nand/nand.c:1.21 src/sys/dev/nand/nand.c:1.22
--- src/sys/dev/nand/nand.c:1.21	Sat Nov  3 12:12:48 2012
+++ src/sys/dev/nand/nand.c	Sat Nov  3 12:45:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand.c,v 1.21 2012/11/03 12:12:48 ahoka Exp $	*/
+/*	$NetBSD: nand.c,v 1.22 2012/11/03 12:45:28 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -34,7 +34,7 @@
 /* Common driver for NAND chips implementing the ONFI 2.2 specification */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.21 2012/11/03 12:12:48 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: nand.c,v 1.22 2012/11/03 12:45:28 ahoka Exp $);
 
 #include locators.h
 
@@ -550,33 +550,29 @@ nand_fill_chip_structure(device_t self, 
 
 	aprint_normal_dev(self, vendor: %s, model: %s\n, vendor, model);
 
-	/* XXX TODO multiple LUNs */
-	if (params.param_numluns != 1) {
-		aprint_error_dev(self,
-		more than one LUNs are not supported yet!\n);
-
-		return 1;
-	}
-
-	chip-nc_size = params.param_pagesize * params.param_blocksize *
-	params.param_lunsize * params.param_numluns;
-
-	chip-nc_page_size = params.param_pagesize;
-	chip-nc_block_size = params.param_blocksize * params.param_pagesize;
-	chip-nc_spare_size = params.param_sparesize;
-	chip-nc_lun_blocks = params.param_lunsize;
+	chip-nc_page_size = le32toh(params.param_pagesize);
+	chip-nc_block_size =
+	le32toh(params.param_blocksize) * chip-nc_page_size;
+	chip-nc_spare_size = le16toh(params.param_sparesize);
+	chip-nc_lun_blocks = le32toh(params.param_lunsize);
 	chip-nc_num_luns = params.param_numluns;
 
+	chip-nc_size =
+	chip-nc_block_size * chip-nc_lun_blocks * chip-nc_num_luns;
+
 	/* the lower 4 bits contain the row address cycles */
 	chip-nc_addr_cycles_row = params.param_addr_cycles  0x07;
 	/* the upper 4 bits contain the column address cycles */
 	chip-nc_addr_cycles_column = (params.param_addr_cycles  ~0x07)  4;
 
-	if (params.param_features  ONFI_FEATURE_16BIT)
+	uint16_t features = le16toh(params.param_features);
+	if (features  ONFI_FEATURE_16BIT) {
 		chip-nc_flags |= NC_BUSWIDTH_16;
+	}
 
-	if (params.param_features  ONFI_FEATURE_EXTENDED_PARAM)
+	if (features  ONFI_FEATURE_EXTENDED_PARAM) {
 		chip-nc_flags |= NC_EXTENDED_PARAM;
+	}
 
 	return 0;
 }

Index: src/sys/dev/nand/nandemulator.c
diff -u src/sys/dev/nand/nandemulator.c:1.5 src/sys/dev/nand/nandemulator.c:1.6
--- src/sys/dev/nand/nandemulator.c:1.5	Tue Jun 28 10:32:45 2011
+++ src/sys/dev/nand/nandemulator.c	Sat Nov  3 12:45:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nandemulator.c,v 1.5 2011/06/28 10:32:45 ahoka Exp $	*/
+/*	$NetBSD: nandemulator.c,v 1.6 2012/11/03 12:45:28 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Department of Software Engineering,
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nandemulator.c,v 1.5 2011/06/28 10:32:45 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: nandemulator.c,v 1.6 2012/11/03 12:45:28 ahoka Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -235,11 +235,11 @@ nandemulator_attach(device_t parent, dev
 	for (i = 0; i  4; i++) {
 		opp = sc-sc_parameter_page[i];
 
-		opp-param_signature = *(uint32_t *)sig;
-		opp-param_pagesize = sc-sc_page_size;
-		opp-param_blocksize = sc-sc_block_size;
-		opp-param_sparesize = sc-sc_spare_size;
-		opp-param_lunsize = sc-sc_lun_size;
+		opp-param_signature = htole32(*(uint32_t *)sig);
+		opp-param_pagesize = htole32(sc-sc_page_size);
+		opp-param_blocksize = htole32(sc-sc_block_size);
+		opp-param_sparesize = htole16(sc-sc_spare_size);
+		opp-param_lunsize = htole32(sc-sc_lun_size);
 		opp-param_numluns = 1;
 
 		opp-param_manufacturer_id = 0x00;
@@ -248,7 +248,8 @@ nandemulator_attach(device_t parent, dev
 		memcpy(opp-param_model,
 		NANDEMULATOR, strlen(NANDEMULATOR));
 
-		opp-param_features = ONFI_FEATURE_16BIT;
+		uint16_t features = ONFI_FEATURE_16BIT;
+		opp-param_features = htole16(features);
 
 		/* the lower 4 bits contain the row address cycles
 		 * the upper 4 bits contain the column address cycles



CVS commit: src/usr.bin/mktemp

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 13:34:08 UTC 2012

Modified Files:
src/usr.bin/mktemp: mktemp.1 mktemp.c

Log Message:
PR/47155: Eitan Adler: add mktemp zero arguments extension


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mktemp/mktemp.1
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/mktemp/mktemp.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/mktemp/mktemp.1
diff -u src/usr.bin/mktemp/mktemp.1:1.19 src/usr.bin/mktemp/mktemp.1:1.20
--- src/usr.bin/mktemp/mktemp.1:1.19	Sat Aug 15 16:44:56 2009
+++ src/usr.bin/mktemp/mktemp.1	Sat Nov  3 09:34:08 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: mktemp.1,v 1.19 2009/08/15 20:44:56 wiz Exp $
+.\ $NetBSD: mktemp.1,v 1.20 2012/11/03 13:34:08 christos Exp $
 .\ From: $FreeBSD: src/usr.bin/mktemp/mktemp.1,v 1.5 1999/08/28 01:04:13 peter Exp $
 .\ From: $OpenBSD: mktemp.1,v 1.8 1998/03/19 06:13:37 millert Exp $
 .\
@@ -115,11 +115,12 @@ arguments, also a single one based on th
 .Fl t
 option value as filename prefix.
 .Pp
-At least one
-.Ar template
-argument or the
-.Fl t
-option must be present.
+If no arguments are passed or if only the
+.Fl d
+flag is passed
+.Nm behaves as if
+.Fl t Li tmp
+was supplied.
 .Pp
 .Nm
 is provided to allow shell scripts to safely use temporary files.

Index: src/usr.bin/mktemp/mktemp.c
diff -u src/usr.bin/mktemp/mktemp.c:1.11 src/usr.bin/mktemp/mktemp.c:1.12
--- src/usr.bin/mktemp/mktemp.c:1.11	Sat Aug 15 16:02:28 2009
+++ src/usr.bin/mktemp/mktemp.c	Sat Nov  3 09:34:08 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mktemp.c,v 1.11 2009/08/15 20:02:28 christos Exp $ */
+/* $NetBSD: mktemp.c,v 1.12 2012/11/03 13:34:08 christos Exp $ */
 
 /*-
  * Copyright (c) 1994, 1995, 1996, 1998 Peter Wemm pe...@netplex.com.au
@@ -50,7 +50,7 @@
 #include unistd.h
 
 #if defined(__RCSID)  !defined(__lint)
-__RCSID($NetBSD: mktemp.c,v 1.11 2009/08/15 20:02:28 christos Exp $);
+__RCSID($NetBSD: mktemp.c,v 1.12 2012/11/03 13:34:08 christos Exp $);
 #endif /* !__lint */
 
 static void usage(void) __dead;
@@ -100,6 +100,9 @@ main(int argc, char **argv)
 	argc -= optind;
 	argv += optind;
 
+	if (tflag == 0  argc  1)
+		tflag = 1;
+
 	if (tflag) {
 		if (tmpdir == NULL)
 			tmpdir = getenv(TMPDIR);



CVS commit: src/usr.bin/make

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 13:59:27 UTC 2012

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

Log Message:
off-by-one


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/usr.bin/make/cond.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/cond.c
diff -u src/usr.bin/make/cond.c:1.66 src/usr.bin/make/cond.c:1.67
--- src/usr.bin/make/cond.c:1.66	Sat Nov  3 00:51:17 2012
+++ src/usr.bin/make/cond.c	Sat Nov  3 09:59:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.66 2012/11/03 04:51:17 pgoyette Exp $	*/
+/*	$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: cond.c,v 1.66 2012/11/03 04:51:17 pgoyette Exp $;
+static char rcsid[] = $NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)cond.c	8.2 (Berkeley) 1/2/94;
 #else
-__RCSID($NetBSD: cond.c,v 1.66 2012/11/03 04:51:17 pgoyette Exp $);
+__RCSID($NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -1227,8 +1227,8 @@ do_Cond_EvalExpression(Boolean *value)
 int
 Cond_Eval(char *line)
 {
-#define	MAXIF  128	/* maximum depth of .if'ing */
-#define	MAXIF_BUMP  32	/* how much to grow by */
+#define	MAXIF  128	/* maximum depth of .if'ing */
+#define	MAXIF_BUMP  32	/* how much to grow by */
 enum if_states {
 	IF_ACTIVE,		/* .if or .elif part active */
 	ELSE_ACTIVE,		/* .else part active */
@@ -1339,15 +1339,15 @@ Cond_Eval(char *line)
 	}
 } else {
 	/* Normal .if */
-	if (cond_depth = max_if_depth) {
+	if (cond_depth + 1 = max_if_depth) {
 	/*
 	 * This is rare, but not impossible.
 	 * In meta mode, dirdeps.mk (only runs at level 0)
 	 * can need more than the default.
 	 */
 	max_if_depth += MAXIF_BUMP;
-	cond_state = bmake_realloc(cond_state,
-max_if_depth * sizeof(*cond_state));
+	cond_state = bmake_realloc(cond_state, max_if_depth *
+		sizeof(*cond_state));
 	}
 	state = cond_state[cond_depth];
 	cond_depth++;



CVS commit: src/distrib

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 14:25:33 UTC 2012

Modified Files:
src/distrib/amd64/installimage: Makefile
src/distrib/amd64/liveimage/emuimage: Makefile
src/distrib/amd64/liveimage/usbimage: Makefile
src/distrib/common/bootimage: Makefile.installimage Makefile.liveimage
src/distrib/i386/installimage: Makefile
src/distrib/i386/liveimage/emuimage: Makefile
src/distrib/i386/liveimage/usbimage: Makefile
src/distrib/pmax/liveimage/emuimage: Makefile
src/distrib/sparc/liveimage/emuimage: Makefile
src/distrib/sparc64/liveimage/emuimage: Makefile
src/distrib/sun2/liveimage/emuimage: Makefile
src/distrib/sun3/liveimage/emuimage: Makefile
src/distrib/vax/liveimage/emuimage: Makefile

Log Message:
Allow overriding live-image and install-image sizes by
INSTIMAGEMB (for install-images), USBIMAGEMB (for x86 sd0root liveimages),
and EMUIMAGEMB (for other liveimages) variables.
Per discussion on current-users@:
http://mail-index.NetBSD.org/current-users/2012/10/29/msg021368.html


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/installimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/liveimage/usbimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/common/bootimage/Makefile.installimage
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/bootimage/Makefile.liveimage
cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/installimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/liveimage/usbimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/pmax/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sparc/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sparc64/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sun2/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sun3/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/vax/liveimage/emuimage/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/amd64/installimage/Makefile
diff -u src/distrib/amd64/installimage/Makefile:1.2 src/distrib/amd64/installimage/Makefile:1.3
--- src/distrib/amd64/installimage/Makefile:1.2	Fri Aug 17 16:56:34 2012
+++ src/distrib/amd64/installimage/Makefile	Sat Nov  3 14:25:32 2012
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2012/08/17 16:56:34 riz Exp $
+#	$NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
 
 .include bsd.own.mk
 
 INSTIMGBASE=	NetBSD-${DISTRIBVER}-amd64-install	# gives ${IMGBASE}.img
 
 BOOTDISK=	sd0			# for USB flash etc.
-IMAGEMB=	550			# for all installation binaries
+INSTIMAGEMB?=	550			# for all installation binaries
 
 PRIMARY_BOOT=		bootxx_ffsv1
 SECONDARY_BOOT=		boot

Index: src/distrib/amd64/liveimage/emuimage/Makefile
diff -u src/distrib/amd64/liveimage/emuimage/Makefile:1.2 src/distrib/amd64/liveimage/emuimage/Makefile:1.3
--- src/distrib/amd64/liveimage/emuimage/Makefile:1.2	Fri Aug 17 16:56:35 2012
+++ src/distrib/amd64/liveimage/emuimage/Makefile	Sat Nov  3 14:25:32 2012
@@ -1,7 +1,10 @@
-#	$NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
+#	$NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
 
 LIVEIMGBASE=	NetBSD-${DISTRIBVER}-amd64-live-wd0root	# gives ${IMGBASE}.img
 
 BOOTDISK=	wd0			# for QEMU etc.
+.if defined(EMUIMAGEMB)
+LIVEIMAGEMB=	${EMUIMAGEMB}
+.endif
 
 .include ${.CURDIR}/../Makefile.liveimage

Index: src/distrib/amd64/liveimage/usbimage/Makefile
diff -u src/distrib/amd64/liveimage/usbimage/Makefile:1.2 src/distrib/amd64/liveimage/usbimage/Makefile:1.3
--- src/distrib/amd64/liveimage/usbimage/Makefile:1.2	Fri Aug 17 16:56:35 2012
+++ src/distrib/amd64/liveimage/usbimage/Makefile	Sat Nov  3 14:25:32 2012
@@ -1,9 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2012/08/17 16:56:35 riz Exp $
+#	$NetBSD: Makefile,v 1.3 2012/11/03 14:25:32 tsutsui Exp $
 
 LIVEIMGBASE=	NetBSD-${DISTRIBVER}-amd64-live-sd0root	# gives ${IMGBASE}.img
 
+USBIMAGEMB?=	1536	# 2GB USB flash memories aren't 2GiB
+
 BOOTDISK=	sd0			# for USB flash etc.
-IMAGEMB=	1536	# 2GB USB flash memories aren't 2GiB
+LIVEIMAGEMB=	${USBIMAGEMB}
 OMIT_SWAPIMG=	yes			# no need to write swap
 
 .include ${.CURDIR}/../Makefile.liveimage

Index: src/distrib/common/bootimage/Makefile.installimage
diff -u src/distrib/common/bootimage/Makefile.installimage:1.3 src/distrib/common/bootimage/Makefile.installimage:1.4
--- src/distrib/common/bootimage/Makefile.installimage:1.3	Sun Apr 22 07:23:42 2012
+++ src/distrib/common/bootimage/Makefile.installimage	Sat Nov  3 14:25:32 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.installimage,v 1.3 2012/04/22 07:23:42 tsutsui Exp $
+#	$NetBSD: Makefile.installimage,v 1.4 2012/11/03 14:25:32 tsutsui Exp $
 #
 # Common 

CVS commit: src/external/gpl3/gdb/lib

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 14:38:17 UTC 2012

Modified Files:
src/external/gpl3/gdb/lib: Makefile

Log Message:
Tidyup


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/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/gpl3/gdb/lib/Makefile
diff -u src/external/gpl3/gdb/lib/Makefile:1.2 src/external/gpl3/gdb/lib/Makefile:1.3
--- src/external/gpl3/gdb/lib/Makefile:1.2	Sun Oct  9 02:03:19 2011
+++ src/external/gpl3/gdb/lib/Makefile	Sat Nov  3 14:38:17 2012
@@ -1,9 +1,7 @@
-#	$NetBSD: Makefile,v 1.2 2011/10/09 02:03:19 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2012/11/03 14:38:17 skrll Exp $
 
 .include ../Makefile.inc
 
-#SUBDIR+= libsim .WAIT
-
 SUBDIR=		libbfd libiberty libopcodes libgdb libdecnumber
 .if ${USE_LIBEDIT} == no || ${USE_TUI} == yes
 SUBDIR+=	libreadline



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

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 14:44:29 UTC 2012

Modified Files:
src/sys/arch/x68k/conf: GENERIC

Log Message:
Comment out pseudo-device fss.  We already has options FFS_NO_SNAPSHOT.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/x68k/conf/GENERIC

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/conf/GENERIC
diff -u src/sys/arch/x68k/conf/GENERIC:1.163 src/sys/arch/x68k/conf/GENERIC:1.164
--- src/sys/arch/x68k/conf/GENERIC:1.163	Wed Oct 17 14:48:18 2012
+++ src/sys/arch/x68k/conf/GENERIC	Sat Nov  3 14:44:29 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.163 2012/10/17 14:48:18 apb Exp $
+# $NetBSD: GENERIC,v 1.164 2012/11/03 14:44:29 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include 	arch/x68k/conf/std.x68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.163 $
+#ident 		GENERIC-$Revision: 1.164 $
 
 maxusers	8
 
@@ -525,7 +525,7 @@ pseudo-device	clockctl		# user control o
 pseudo-device	ksyms			# /dev/ksyms
 #pseudo-device	pf			# PF packet filter
 #pseudo-device	pflog			# PF log if
-pseudo-device	fss			# file system snapshot device
+#pseudo-device	fss			# file system snapshot device
 
 # Veriexec
 #



CVS commit: src/external/gpl3/gdb/dist/gdb

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 14:59:44 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: mips-tdep.h mipsnbsd-nat.c
src/external/gpl3/gdb/dist/gdb/config/mips: nbsd.mh

Log Message:
Bring across target kvm support for mips from gdb6.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/mips-tdep.h
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/mips-tdep.h
diff -u src/external/gpl3/gdb/dist/gdb/mips-tdep.h:1.1.1.1 src/external/gpl3/gdb/dist/gdb/mips-tdep.h:1.2
--- src/external/gpl3/gdb/dist/gdb/mips-tdep.h:1.1.1.1	Sat Sep 24 20:11:33 2011
+++ src/external/gpl3/gdb/dist/gdb/mips-tdep.h	Sat Nov  3 14:59:44 2012
@@ -118,8 +118,19 @@ enum
   MIPS_AT_REGNUM = 1,
   MIPS_V0_REGNUM = 2,		/* Function integer return value.  */
   MIPS_A0_REGNUM = 4,		/* Loc of first arg during a subr call.  */
+  MIPS_S0_REGNUM = 16,
+  MIPS_S1_REGNUM = 17,
+  MIPS_S2_REGNUM = 18,
+  MIPS_S3_REGNUM = 19,
+  MIPS_S4_REGNUM = 20,
+  MIPS_S5_REGNUM = 21,
+  MIPS_S6_REGNUM = 22,
+  MIPS_S7_REGNUM = 23,
+  MIPS_T8_REGNUM = 24,
   MIPS_T9_REGNUM = 25,		/* Contains address of callee in PIC.  */
+  MIPS_GP_REGNUM = 28,
   MIPS_SP_REGNUM = 29,
+  MIPS_S8_REGNUM = 30,
   MIPS_RA_REGNUM = 31,
   MIPS_PS_REGNUM = 32,		/* Contains processor status.  */
   MIPS_EMBED_LO_REGNUM = 33,

Index: src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c:1.4	Thu Feb  9 15:14:19 2012
+++ src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c	Sat Nov  3 14:59:44 2012
@@ -40,6 +40,9 @@ typedef struct fpreg fpregset_t;
 #include mips-tdep.h
 #include mipsnbsd-tdep.h
 #include inf-ptrace.h
+#include bsd-kvm.h
+
+#include machine/pcb.h
 
 /* Determine if PT_GETREGS fetches this register.  */
 static int
@@ -119,6 +122,43 @@ mipsnbsd_store_inferior_registers (struc
 	perror_with_name (_(Couldn't write floating point status));
 }
 }
+
+static int mipsnbsd_supply_pcb (struct regcache *, struct pcb *);
+
+static int
+mipsnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
+{
+  struct label_t sf;
+
+  sf = pcb-pcb_context;
+
+  /* really should test for n{32,64} abi for this register
+ unless this is purely the n ABI */
+
+  regcache_raw_supply (regcache, MIPS_S0_REGNUM, sf.val[_L_S0]);
+  regcache_raw_supply (regcache, MIPS_S1_REGNUM, sf.val[_L_S1]);
+  regcache_raw_supply (regcache, MIPS_S2_REGNUM, sf.val[_L_S2]);
+  regcache_raw_supply (regcache, MIPS_S3_REGNUM, sf.val[_L_S3]);
+  regcache_raw_supply (regcache, MIPS_S4_REGNUM, sf.val[_L_S4]);
+  regcache_raw_supply (regcache, MIPS_S5_REGNUM, sf.val[_L_S5]);
+  regcache_raw_supply (regcache, MIPS_S6_REGNUM, sf.val[_L_S6]);
+  regcache_raw_supply (regcache, MIPS_S7_REGNUM, sf.val[_L_S7]);
+
+  regcache_raw_supply (regcache, MIPS_S8_REGNUM, sf.val[_L_S8]);
+
+  regcache_raw_supply (regcache, MIPS_T8_REGNUM, sf.val[_L_T8]);
+
+  regcache_raw_supply (regcache, MIPS_GP_REGNUM, sf.val[_L_GP]);
+
+  regcache_raw_supply (regcache, MIPS_SP_REGNUM, sf.val[_L_SP]);
+  regcache_raw_supply (regcache, MIPS_RA_REGNUM, sf.val[_L_RA]);
+  regcache_raw_supply (regcache, MIPS_PS_REGNUM, sf.val[_L_SR]);
+
+  /* provide the return address of the savectx as the current pc */
+  regcache_raw_supply (regcache, MIPS_EMBED_PC_REGNUM, sf.val[_L_RA]);
+
+  return 0;
+}
 
 /* Wrapper functions.  These are only used by nbsd-thread.  */
 void
@@ -159,4 +199,7 @@ _initialize_mipsnbsd_nat (void)
   t-to_fetch_registers = mipsnbsd_fetch_inferior_registers;
   t-to_store_registers = mipsnbsd_store_inferior_registers;
   add_target (t);
+
+  /* Support debugging kernel virtual memory images.  */
+  bsd_kvm_add_target (mipsnbsd_supply_pcb);
 }

Index: src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh:1.3 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh:1.4
--- src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh:1.3	Mon Feb  6 10:46:35 2012
+++ src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh	Sat Nov  3 14:59:44 2012
@@ -1,3 +1,4 @@
 # Host: NetBSD/mips
 NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o mipsnbsd-nat.o \
-	nbsd-thread.o
+	nbsd-thread.o bsd-kvm.o
+LOADLIBS= -lkvm



CVS commit: src/external/gpl3/gdb/dist/gdb

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 15:06:55 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: mipsnbsd-tdep.c

Log Message:
Supply MIPS_ZERO_REGNUM and MIPS_UNUSED_REGNUM (as zero). Idea stolen from
mips-linux-tdep.c


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/mipsnbsd-tdep.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/gpl3/gdb/dist/gdb/mipsnbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/mipsnbsd-tdep.c:1.1.1.1 src/external/gpl3/gdb/dist/gdb/mipsnbsd-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/mipsnbsd-tdep.c:1.1.1.1	Sat Sep 24 20:11:33 2011
+++ src/external/gpl3/gdb/dist/gdb/mipsnbsd-tdep.c	Sat Nov  3 15:06:55 2012
@@ -83,15 +83,23 @@ mipsnbsd_supply_gregset (const struct re
 			 const void *gregs, size_t len)
 {
   size_t regsize = mips_isa_regsize (get_regcache_arch (regcache));
+  char zerobuf[MAX_REGISTER_SIZE];
   const char *regs = gregs;
   int i;
 
+  memset (zerobuf, 0, MAX_REGISTER_SIZE);
+
   gdb_assert (len = MIPSNBSD_NUM_GREGS * regsize);
 
   for (i = 0; i = MIPS_PC_REGNUM; i++)
 {
   if (regnum == i || regnum == -1)
-	regcache_raw_supply (regcache, i, regs + i * regsize);
+{
+  if (i == MIPS_ZERO_REGNUM || i == MIPS_UNUSED_REGNUM)
+regcache_raw_supply (regcache, i, zerobuf);
+  else
+	regcache_raw_supply (regcache, i, regs + i * regsize);
+	}
 }
 
   if (len = (MIPSNBSD_NUM_GREGS + MIPSNBSD_NUM_FPREGS) * regsize)
@@ -144,13 +152,18 @@ void
 mipsnbsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  char zerobuf[MAX_REGISTER_SIZE];
   int i;
 
+  memset (zerobuf, 0, MAX_REGISTER_SIZE);
+
   for (i = 0; i = gdbarch_pc_regnum (gdbarch); i++)
 {
   if (regno == i || regno == -1)
 	{
-	  if (gdbarch_cannot_fetch_register (gdbarch, i))
+  if (i == MIPS_ZERO_REGNUM || i == MIPS_UNUSED_REGNUM)
+regcache_raw_supply (regcache, i, zerobuf);
+	  else if (gdbarch_cannot_fetch_register (gdbarch, i))
 	regcache_raw_supply (regcache, i, NULL);
 	  else
 regcache_raw_supply (regcache, i,



CVS commit: src/external/gpl3/gdb/dist/gdb/config/mips

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 15:07:40 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/mips: nbsd.mh

Log Message:
Typo in previous


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh:1.4 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh:1.5
--- src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh:1.4	Sat Nov  3 14:59:44 2012
+++ src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh	Sat Nov  3 15:07:40 2012
@@ -1,4 +1,4 @@
 # Host: NetBSD/mips
 NATDEPFILES= fork-child.o inf-ptrace.o nbsd-nat.o mipsnbsd-nat.o \
 	nbsd-thread.o bsd-kvm.o
-LOADLIBS= -lkvm
+LOADLIBES= -lkvm



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

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 15:39:24 UTC 2012

Modified Files:
src/external/bsd/cron/dist: config.h crontab.c

Log Message:
use utimensat(2) and correct and centralize file times handling.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/cron/dist/config.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/cron/dist/crontab.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/bsd/cron/dist/config.h
diff -u src/external/bsd/cron/dist/config.h:1.3 src/external/bsd/cron/dist/config.h:1.4
--- src/external/bsd/cron/dist/config.h:1.3	Fri May  7 16:43:27 2010
+++ src/external/bsd/cron/dist/config.h	Sat Nov  3 11:39:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.h,v 1.3 2010/05/07 20:43:27 christos Exp $	*/
+/*	$NetBSD: config.h,v 1.4 2012/11/03 15:39:23 christos Exp $	*/
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -93,6 +93,8 @@
 #define HAVE_TM_GMTOFF		/*-*/
 #define HAVE_FCHOWN		/*-*/
 #define HAVE_UTIMES		/*-*/
+#define HAVE_UTIMENSAT
+#define _INCOMPLETE_XOPEN_C063
 
 			/* if your OS supports a BSD-style login.conf file */
 /* #define LOGIN_CAP			*/

Index: src/external/bsd/cron/dist/crontab.c
diff -u src/external/bsd/cron/dist/crontab.c:1.5 src/external/bsd/cron/dist/crontab.c:1.6
--- src/external/bsd/cron/dist/crontab.c:1.5	Sun Mar  4 13:38:31 2012
+++ src/external/bsd/cron/dist/crontab.c	Sat Nov  3 11:39:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: crontab.c,v 1.5 2012/03/04 18:38:31 tron Exp $	*/
+/*	$NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $	*/
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -25,7 +25,7 @@
 #if 0
 static char rcsid[] = Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp;
 #else
-__RCSID($NetBSD: crontab.c,v 1.5 2012/03/04 18:38:31 tron Exp $);
+__RCSID($NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $);
 #endif
 #endif
 
@@ -138,6 +138,48 @@ main(int argc, char *argv[]) {
 }
 
 static void
+get_time(const struct stat *st, struct timespec *ts)
+{
+	ts[0].tv_sec = st-st_atime;
+	ts[0].tv_nsec = st-st_atimensec;
+	ts[1].tv_sec = st-st_mtime;
+	ts[1].tv_nsec = st-st_mtimensec;
+}
+
+static int
+change_time(const char *name, const struct timespec *ts)
+{
+#if defined(HAVE_UTIMENSAT)
+	return utimensat(AT_FDCWD, name, ts, 0);
+#elif defined(HAVE_UTIMES)
+	struct timeval tv[2];
+	TIMESPEC_TO_TIMEVAL(tv[0], ts[0]);
+	TIMESPEC_TO_TIMEVAL(tv[1], ts[1]);
+	return utimes(name, tvs);
+#else
+	struct utimebuf ut;
+	ut.actime = tv[0].tv_sec;
+	ut.modtime = tv[1].tv_sec;
+	return utime(name, ut);
+#endif
+}
+
+static int
+compare_time(const struct stat *st, const struct timespec *ts2)
+{
+	struct timespec ts1[2];
+	get_time(st, ts1);
+	
+	return ts1[1].tv_sec == ts2[1].tv_sec
+#if defined(HAVE_UTIMENSAT)
+	 ts1[1].tv_nsec == ts2[1].tv_nsec
+#elif defined(HAVE_UTIMES)
+	 ts1[1].tv_nsec / 1000 = ts2[1].tv_nsec / 1000
+#endif
+	;
+}
+
+static void
 parse_args(int argc, char *argv[]) {
 	int argch;
 
@@ -322,10 +364,9 @@ edit_cmd(void) {
 	int ch, t, x;
 	sig_t oint, oabrt, oquit, ohup;
 	struct stat statbuf;
-	struct utimbuf utimebuf;
-	long mtimensec;
 	WAIT_T waiter;
 	PID_T pid, xpid;
+	struct timespec ts[2];
 
 	log_it(RealUser, Pid, BEGIN EDIT, User);
 	if (!glue_strings(n, sizeof n, SPOOL_DIR, User, '/')) {
@@ -345,9 +386,7 @@ edit_cmd(void) {
 		warn(cannot stat crontab file);
 		goto fatal;
 	}
-	utimebuf.actime = statbuf.st_atime;
-	utimebuf.modtime = statbuf.st_mtime;
-	mtimensec = statbuf.st_mtimensec;
+	get_time(statbuf, ts);
 
 	/* Turn off signals. */
 	ohup = signal(SIGHUP, SIG_IGN);
@@ -390,7 +429,8 @@ edit_cmd(void) {
 	if (fflush(NewCrontab)  OK) {
 		err(ERROR_EXIT, cannot flush output for `%s', Filename);
 	}
-	(void)utime(Filename, utimebuf);
+	if (change_time(Filename, ts) == -1)
+		err(ERROR_EXIT, cannot set time info for `%s', Filename);
  again:
 	rewind(NewCrontab);
 	if (ferror(NewCrontab)) {
@@ -473,8 +513,7 @@ edit_cmd(void) {
 		warn(cannot stat `%s', Filename);
 		goto fatal;
 	}
-	if (utimebuf.modtime == statbuf.st_mtime 
-	mtimensec == statbuf.st_mtimensec) {
+	if (compare_time(statbuf, ts)) {
 		warnx(no changes made to crontab);
 		goto remove;
 	}
@@ -599,7 +638,7 @@ replace_cmd(void) {
 	 */
 	(void)fprintf(tmp, # DO NOT EDIT THIS FILE - edit the master and reinstall.\n);
 	(void)fprintf(tmp, # (%s installed on %-24.24s)\n, Filename, ctime(now));
-	(void)fprintf(tmp, # (Cron version %s -- %s)\n, CRON_VERSION, $NetBSD: crontab.c,v 1.5 2012/03/04 18:38:31 tron Exp $);
+	(void)fprintf(tmp, # (Cron version %s -- %s)\n, CRON_VERSION, $NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $);
 
 	/* copy the crontab to the tmp
 	 */
@@ -717,18 +756,13 @@ done:
 
 static void
 poke_daemon(void) {
-#ifdef HAVE_UTIMES
-	struct timeval tvs[2];
-	struct timezone tz;
-
-	(void) gettimeofday(tvs[0], tz);
-	tvs[1] = 

CVS commit: src/distrib/utils/sysinst/arch/x68k

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 15:40:58 UTC 2012

Modified Files:
src/distrib/utils/sysinst/arch/x68k: Makefile
Removed Files:
src/distrib/utils/sysinst/arch/x68k: menus.md.es menus.md.pl msg.md.de
msg.md.es msg.md.pl

Log Message:
Remove unused non-en translation messages.
(src/distrib/x68k/floppies/ramdisk/Makefile specifies list.sysinst.en)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/sysinst/arch/x68k/Makefile
cvs rdiff -u -r1.2 -r0 src/distrib/utils/sysinst/arch/x68k/menus.md.es
cvs rdiff -u -r1.5 -r0 src/distrib/utils/sysinst/arch/x68k/menus.md.pl \
src/distrib/utils/sysinst/arch/x68k/msg.md.de
cvs rdiff -u -r1.4 -r0 src/distrib/utils/sysinst/arch/x68k/msg.md.es
cvs rdiff -u -r1.9 -r0 src/distrib/utils/sysinst/arch/x68k/msg.md.pl

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/sysinst/arch/x68k/Makefile
diff -u src/distrib/utils/sysinst/arch/x68k/Makefile:1.10 src/distrib/utils/sysinst/arch/x68k/Makefile:1.11
--- src/distrib/utils/sysinst/arch/x68k/Makefile:1.10	Sat Feb 19 17:00:40 2005
+++ src/distrib/utils/sysinst/arch/x68k/Makefile	Sat Nov  3 15:40:58 2012
@@ -1,11 +1,8 @@
-#	$NetBSD: Makefile,v 1.10 2005/02/19 17:00:40 dsl Exp $
+#	$NetBSD: Makefile,v 1.11 2012/11/03 15:40:58 tsutsui Exp $
 #
 # Makefile for x68k
 #
 
-# Note: we have no french or german messages, because x68k console does not
-# support ISO-8859-1 (right half) character set.
-
-LANGUAGES=	en pl
+LANGUAGES=	# no translations
 
 .include ../../Makefile.inc



CVS commit: src/lib/libperfuse

2012-11-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Nov  3 15:43:20 UTC 2012

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libperfuse/ops.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/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.59 src/lib/libperfuse/ops.c:1.60
--- src/lib/libperfuse/ops.c:1.59	Sat Jul 21 05:49:42 2012
+++ src/lib/libperfuse/ops.c	Sat Nov  3 15:43:20 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.59 2012/07/21 05:49:42 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.60 2012/11/03 15:43:20 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -433,6 +433,16 @@ node_lookup_common(struct puffs_usermoun
 
 	feo = GET_OUTPAYLOAD(ps, pm, fuse_entry_out);
 
+	/* 
+	 * Starting with ABI 7.4, inode number 0 means ENOENT, 
+	 * with entry_valid / entry_valid_nsec giving negative
+	 * cache timeout (which we do not implement yet).
+	 */
+	if (feo-attr.ino == 0) {
+		ps-ps_destroy_msg(pm);
+		return ENOENT;
+	}
+
 	/*
 	 * Check for a known node, not reclaimed, with another name.
 	 * It may have been moved, or we can lookup ../



CVS commit: src/share/man/man4

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 16:47:54 UTC 2012

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

Log Message:
options FFS_NO_SNAPSHOT disables only the creation of file system
internal snapshot.  Per comment from hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.416 -r1.417 src/share/man/man4/options.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/options.4
diff -u src/share/man/man4/options.4:1.416 src/share/man/man4/options.4:1.417
--- src/share/man/man4/options.4:1.416	Fri May 25 15:54:02 2012
+++ src/share/man/man4/options.4	Sat Nov  3 16:47:54 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.416 2012/05/25 15:54:02 tsutsui Exp $
+.\	$NetBSD: options.4,v 1.417 2012/11/03 16:47:54 tsutsui Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -30,7 +30,7 @@
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
 .\
-.Dd May 25, 2012
+.Dd November 3, 2012
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -957,9 +957,8 @@ See also
 .Xr dumpfs 8
 for file system byte order status and manipulation.
 .It Cd options FFS_NO_SNAPSHOT
-Disable the
-.Dq file system snapshot
-support in FFS file systems.
+Disable support for the creation of file system internal snapshot
+of FFS file systems.
 Maybe useful for install media kernels, small memory systems and
 embedded systems which don't require the snapshot support.
 .It Cd options UFS_EXTATTR



CVS commit: src/external/gpl3/gdb/lib

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 17:07:51 UTC 2012

Modified Files:
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mips64el: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mipseb: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mipsel: bfd_stdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64eb: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64el: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mipsel: gstdint.h
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mips64el: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libgdb/arch/mipsel: defs.mk

Log Message:
Re-run mknative for mips gdb 7.3.1 - not being used just yet.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mipsel/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64eb/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64el/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mipsel/gstdint.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/init.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/init.c
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/lib/libgdb/arch/mipseb/defs.mk
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/lib/libgdb/arch/mipsel/defs.mk

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

Modified files:

Index: src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h
diff -u src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h:1.2 src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h:1.3
--- src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h:1.2	Mon Feb  6 10:55:34 2012
+++ src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h	Sat Nov  3 17:07:49 2012
@@ -2,7 +2,7 @@
 /* Generated from: 	NetBSD: mknative-gdb,v 1.5 2011/11/06 19:46:12 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
-/* generated for  mips64--netbsd-gcc (NetBSD nb2 20111202) 4.5.3 */
+/* generated for  mips64--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */
 
 #ifndef GCC_GENERATED_STDINT_H
 #define GCC_GENERATED_STDINT_H 1

Index: src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h
diff -u src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h:1.2 src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h:1.3
--- src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h:1.2	Mon Feb  6 10:55:34 2012
+++ src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h	Sat Nov  3 17:07:50 2012
@@ -2,7 +2,7 @@
 /* Generated from: 	NetBSD: mknative-gdb,v 1.5 2011/11/06 19:46:12 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
-/* generated for  mips64el--netbsd-gcc (NetBSD nb2 20111202) 4.5.3 */
+/* generated for  mips64el--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */
 
 #ifndef GCC_GENERATED_STDINT_H
 #define GCC_GENERATED_STDINT_H 1

Index: src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h
diff -u src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h:1.2 src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h:1.3
--- src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h:1.2	Mon Feb  6 10:55:34 2012
+++ src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h	Sat Nov  3 17:07:50 2012
@@ -2,7 +2,7 @@
 /* Generated from: 	NetBSD: mknative-gdb,v 1.5 2011/11/06 19:46:12 christos Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp  */
 
-/* generated for  mipseb--netbsd-gcc (NetBSD nb2 20111202) 4.5.3 */
+/* generated for  mipseb--netbsd-gcc (NetBSD nb1 20120916) 4.5.4 */
 
 #ifndef GCC_GENERATED_STDINT_H
 #define GCC_GENERATED_STDINT_H 1

Index: src/external/gpl3/gdb/lib/libbfd/arch/mipsel/bfd_stdint.h
diff -u 

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

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 17:33:01 UTC 2012

Modified Files:
src/external/bsd/cron/dist: crontab.c

Log Message:
make the utime and utimes cases work too.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/cron/dist/crontab.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/bsd/cron/dist/crontab.c
diff -u src/external/bsd/cron/dist/crontab.c:1.6 src/external/bsd/cron/dist/crontab.c:1.7
--- src/external/bsd/cron/dist/crontab.c:1.6	Sat Nov  3 11:39:23 2012
+++ src/external/bsd/cron/dist/crontab.c	Sat Nov  3 13:33:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $	*/
+/*	$NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $	*/
 
 /* Copyright 1988,1990,1993,1994 by Paul Vixie
  * All rights reserved
@@ -25,7 +25,7 @@
 #if 0
 static char rcsid[] = Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp;
 #else
-__RCSID($NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $);
+__RCSID($NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $);
 #endif
 #endif
 
@@ -155,11 +155,11 @@ change_time(const char *name, const stru
 	struct timeval tv[2];
 	TIMESPEC_TO_TIMEVAL(tv[0], ts[0]);
 	TIMESPEC_TO_TIMEVAL(tv[1], ts[1]);
-	return utimes(name, tvs);
+	return utimes(name, tv);
 #else
-	struct utimebuf ut;
-	ut.actime = tv[0].tv_sec;
-	ut.modtime = tv[1].tv_sec;
+	struct utimbuf ut;
+	ut.actime = ts[0].tv_sec;
+	ut.modtime = ts[1].tv_sec;
 	return utime(name, ut);
 #endif
 }
@@ -174,7 +174,7 @@ compare_time(const struct stat *st, cons
 #if defined(HAVE_UTIMENSAT)
 	 ts1[1].tv_nsec == ts2[1].tv_nsec
 #elif defined(HAVE_UTIMES)
-	 ts1[1].tv_nsec / 1000 = ts2[1].tv_nsec / 1000
+	 ts1[1].tv_nsec / 1000 == ts2[1].tv_nsec / 1000
 #endif
 	;
 }
@@ -638,7 +638,7 @@ replace_cmd(void) {
 	 */
 	(void)fprintf(tmp, # DO NOT EDIT THIS FILE - edit the master and reinstall.\n);
 	(void)fprintf(tmp, # (%s installed on %-24.24s)\n, Filename, ctime(now));
-	(void)fprintf(tmp, # (Cron version %s -- %s)\n, CRON_VERSION, $NetBSD: crontab.c,v 1.6 2012/11/03 15:39:23 christos Exp $);
+	(void)fprintf(tmp, # (Cron version %s -- %s)\n, CRON_VERSION, $NetBSD: crontab.c,v 1.7 2012/11/03 17:33:01 christos Exp $);
 
 	/* copy the crontab to the tmp
 	 */



CVS commit: src/sbin/scsictl

2012-11-03 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Nov  3 19:26:53 UTC 2012

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

Log Message:
make a bunch of globals static


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/scsictl/scsictl.c

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

Modified files:

Index: src/sbin/scsictl/scsictl.c
diff -u src/sbin/scsictl/scsictl.c:1.34 src/sbin/scsictl/scsictl.c:1.35
--- src/sbin/scsictl/scsictl.c:1.34	Sat Nov  3 19:14:53 2012
+++ src/sbin/scsictl/scsictl.c	Sat Nov  3 19:26:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsictl.c,v 1.34 2012/11/03 19:14:53 jakllsch Exp $	*/
+/*	$NetBSD: scsictl.c,v 1.35 2012/11/03 19:26:52 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: scsictl.c,v 1.34 2012/11/03 19:14:53 jakllsch Exp $);
+__RCSID($NetBSD: scsictl.c,v 1.35 2012/11/03 19:26:52 jakllsch Exp $);
 #endif
 
 
@@ -68,31 +68,31 @@ struct command {
 
 __dead static void	usage(void);
 
-int	fd;/* file descriptor for device */
-const	char *dvname;			/* device name */
-char	dvname_store[MAXPATHLEN];	/* for opendisk(3) */
-const	char *cmdname;			/* command user issued */
-struct	scsi_addr dvaddr;		/* SCSI device's address */
-
-void	device_defects(int, char *[]);
-void	device_format(int, char *[]);
-void	device_identify(int, char *[]);
-void	device_reassign(int, char *[]);
-void	device_release(int, char *[]);
-void	device_reserve(int, char *[]);
-void	device_reset(int, char *[]);
-void	device_debug(int, char *[]);
-void	device_prevent(int, char *[]);
-void	device_allow(int, char *[]);
-void	device_start(int, char *[]);
-void	device_stop(int, char *[]);
-void	device_tur(int, char *[]);
-void	device_getcache(int, char *[]);
-void	device_setcache(int, char *[]);
-void	device_flushcache(int, char *[]);
-void	device_setspeed(int, char *[]);
+static int	fd;/* file descriptor for device */
+const  char	*dvname;			/* device name */
+static char	dvname_store[MAXPATHLEN];	/* for opendisk(3) */
+static const	char *cmdname;			/* command user issued */
+static struct	scsi_addr dvaddr;		/* SCSI device's address */
+
+static void	device_defects(int, char *[]);
+static void	device_format(int, char *[]);
+static void	device_identify(int, char *[]);
+static void	device_reassign(int, char *[]);
+static void	device_release(int, char *[]);
+static void	device_reserve(int, char *[]);
+static void	device_reset(int, char *[]);
+static void	device_debug(int, char *[]);
+static void	device_prevent(int, char *[]);
+static void	device_allow(int, char *[]);
+static void	device_start(int, char *[]);
+static void	device_stop(int, char *[]);
+static void	device_tur(int, char *[]);
+static void	device_getcache(int, char *[]);
+static void	device_setcache(int, char *[]);
+static void	device_flushcache(int, char *[]);
+static void	device_setspeed(int, char *[]);
 
-struct command device_commands[] = {
+static struct command device_commands[] = {
 	{ defects,	[primary] [grown] [block|byte|physical],
 		device_defects },
 	{ format,	[blocksize [immediate]], 	device_format },
@@ -114,11 +114,11 @@ struct command device_commands[] = {
 	{ NULL,		NULL,			NULL },
 };
 
-void	bus_reset(int, char *[]);
-void	bus_scan(int, char *[]);
-void	bus_detach(int, char *[]);
+static void	bus_reset(int, char *[]);
+static void	bus_scan(int, char *[]);
+static void	bus_detach(int, char *[]);
 
-struct command bus_commands[] = {
+static struct command bus_commands[] = {
 	{ reset,	,			bus_reset },
 	{ scan,	target lun,		bus_scan },
 	{ detach,	target lun,		bus_detach },
@@ -220,11 +220,11 @@ usage(void)
  *	byte READ DEFECT DATA command.
  */
 
-void	print_bf_dd(union scsi_defect_descriptor *);
-void	print_bfif_dd(union scsi_defect_descriptor *);
-void	print_psf_dd(union scsi_defect_descriptor *);
+static void	print_bf_dd(union scsi_defect_descriptor *);
+static void	print_bfif_dd(union scsi_defect_descriptor *);
+static void	print_psf_dd(union scsi_defect_descriptor *);
 
-void
+static void
 device_defects(int argc, char *argv[])
 {
 	struct scsi_read_defect_data cmd;
@@ -380,7 +380,7 @@ device_defects(int argc, char *argv[])
  *
  *	Print a block format defect descriptor.
  */
-void
+static void
 print_bf_dd(union scsi_defect_descriptor *dd)
 {
 	u_int32_t block;
@@ -397,7 +397,7 @@ print_bf_dd(union scsi_defect_descriptor
  *
  *	Print a bytes from index format defect descriptor.
  */
-void
+static void
 print_bfif_dd(union scsi_defect_descriptor *dd)
 {
 	u_int32_t cylinder;
@@ -421,7 +421,7 @@ print_bfif_dd(union scsi_defect_descript
  *
  *	Print a physical sector format defect descriptor.
  */
-void
+static void
 print_psf_dd(union scsi_defect_descriptor *dd)
 {
 	u_int32_t cylinder;
@@ -445,7 +445,7 @@ print_psf_dd(union scsi_defect_descripto
  *
  *	Format a direct access device.
  */
-void
+static void
 

CVS commit: src

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 19:39:21 UTC 2012

Modified Files:
src/lib/libc/gen: Makefile.inc
src/lib/libc/sys: utimes.2
src/sys/sys: stat.h
Added Files:
src/lib/libc/gen: utimens.c

Log Message:
add utimens and lutimens wrappers using utimensat.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/utimens.c
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/sys/utimes.2
cvs rdiff -u -r1.63 -r1.64 src/sys/sys/stat.h

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

Modified files:

Index: src/lib/libc/gen/Makefile.inc
diff -u src/lib/libc/gen/Makefile.inc:1.184 src/lib/libc/gen/Makefile.inc:1.185
--- src/lib/libc/gen/Makefile.inc:1.184	Thu Apr 12 18:08:32 2012
+++ src/lib/libc/gen/Makefile.inc	Sat Nov  3 15:39:21 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.184 2012/04/12 22:08:32 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.185 2012/11/03 19:39:21 christos Exp $
 #	from: @(#)Makefile.inc	8.6 (Berkeley) 5/4/95
 
 # gen sources
@@ -29,8 +29,8 @@ SRCS+= 	_errno.c alarm.c alphasort.c arc
 	sigset.c sigsetops.c sleep.c \
 	stringlist.c sysconf.c sysctl.c sysctlbyname.c sysctlgetmibinfo.c \
 	sysctlnametomib.c syslog.c telldir.c time.c \
-	times.c toascii.c tolower_.c ttyname.c ttyslot.c \
-	toupper_.c ualarm.c ulimit.c uname.c unvis.c usleep.c utime.c utmp.c \
+	times.c toascii.c tolower_.c ttyname.c ttyslot.c toupper_.c ualarm.c \
+	ulimit.c uname.c unvis.c usleep.c utime.c utimens.c utmp.c \
 	utmpx.c valloc.c vis.c wait.c wait3.c waitpid.c warn.c warnx.c \
 	vwarn.c vwarnx.c verr.c verrx.c wordexp.c
 

Index: src/lib/libc/sys/utimes.2
diff -u src/lib/libc/sys/utimes.2:1.30 src/lib/libc/sys/utimes.2:1.31
--- src/lib/libc/sys/utimes.2:1.30	Tue Oct 25 05:26:53 2011
+++ src/lib/libc/sys/utimes.2	Sat Nov  3 15:39:21 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: utimes.2,v 1.30 2011/10/25 09:26:53 wiz Exp $
+.\	$NetBSD: utimes.2,v 1.31 2012/11/03 19:39:21 christos Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -36,6 +36,8 @@
 .Nm utimes ,
 .Nm lutimes ,
 .Nm futimes ,
+.Nm utimens ,
+.Nm lutimens ,
 .Nm futimens ,
 .Nm utimensat
 .Nd set file access and modification times
@@ -48,6 +50,10 @@
 .Ft int
 .Fn lutimes const char *path const struct timeval times[2]
 .Ft int
+.Fn utimens const char *path const struct timeval times[2]
+.Ft int
+.Fn lutimens const char *path const struct timeval times[2]
+.Ft int
 .Fn futimes int fd const struct timeval times[2]
 .Ft int
 .Fn futimens int fd const struct timespec times[2]
@@ -100,10 +106,17 @@ while
 .Fn utimes
 changes the times of the file the link references.
 .Pp
+.Fn utimens ,
+.Fn lutimens ,
+and
 .Fn futimens
 is like
+.Fn utimes ,
+.Fn lutimes ,
+and
 .Fn futimes
-except that time is specified with nanosecond instead of microseconds.
+respectively except that time is specified with nanosecond instead of
+microsecond precision.
 .Pp
 .Fn utimensat
 also allows time to be specifed with nanoseconds.
@@ -117,7 +130,9 @@ is set to
 the symbolic link's dates are changed.
 .Pp
 The nanosecond fields for
-.Fn futimens
+.Fn utimens ,
+.Fn lutimens ,
+.Fn futimens ,
 and
 .Fn utimensat
 can be set to the special value
@@ -143,6 +158,8 @@ is set to indicate the error.
 .Sh ERRORS
 .Fn utimes ,
 .Fn lutimes ,
+.Fn utimens ,
+.Fn lutimens ,
 and
 .Fn utimensat
 will fail if:

Index: src/sys/sys/stat.h
diff -u src/sys/sys/stat.h:1.63 src/sys/sys/stat.h:1.64
--- src/sys/sys/stat.h:1.63	Sun Sep  4 06:02:33 2011
+++ src/sys/sys/stat.h	Sat Nov  3 15:39:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: stat.h,v 1.63 2011/09/04 10:02:33 christos Exp $	*/
+/*	$NetBSD: stat.h,v 1.64 2012/11/03 19:39:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -249,6 +249,10 @@ int fstatat(int, const char *, struc
 int utimensat(int, const char *, const struct timespec *, int);
 #endif
 
+#ifdef _NETBSD_SOURCE
+int utimens(const char *, const struct timespec *);
+int lutimens(const char *, const struct timespec *);
+#endif
 int futimens(int, const struct timespec *);
 #endif
 

Added files:

Index: src/lib/libc/gen/utimens.c
diff -u /dev/null src/lib/libc/gen/utimens.c:1.1
--- /dev/null	Sat Nov  3 15:39:22 2012
+++ src/lib/libc/gen/utimens.c	Sat Nov  3 15:39:21 2012
@@ -0,0 +1,53 @@
+/*	$NetBSD: utimens.c,v 1.1 2012/11/03 19:39:21 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following 

CVS commit: src/sys

2012-11-03 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov  3 23:22:23 UTC 2012

Modified Files:
src/sys/compat/common: kern_time_50.c
src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_wait.c
src/sys/compat/osf1: osf1_resource.c
src/sys/kern: kern_resource.c
src/sys/sys: resourcevar.h

Log Message:
Move rusage computation to a new getrusage1() function. Adjust all
compat/emulations to make use of it.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/common/kern_time_50.c
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/netbsd32/netbsd32_compat_50.c \
src/sys/compat/netbsd32/netbsd32_wait.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/osf1/osf1_resource.c
cvs rdiff -u -r1.169 -r1.170 src/sys/kern/kern_resource.c
cvs rdiff -u -r1.53 -r1.54 src/sys/sys/resourcevar.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/compat/common/kern_time_50.c
diff -u src/sys/compat/common/kern_time_50.c:1.23 src/sys/compat/common/kern_time_50.c:1.24
--- src/sys/compat/common/kern_time_50.c:1.23	Tue Oct  2 01:44:27 2012
+++ src/sys/compat/common/kern_time_50.c	Sat Nov  3 23:22:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_time_50.c,v 1.23 2012/10/02 01:44:27 christos Exp $	*/
+/*	$NetBSD: kern_time_50.c,v 1.24 2012/11/03 23:22:21 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.23 2012/10/02 01:44:27 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_time_50.c,v 1.24 2012/11/03 23:22:21 njoly Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_aio.h
@@ -509,27 +509,15 @@ compat_50_sys_getrusage(struct lwp *l,
 		syscallarg(int) who;
 		syscallarg(struct rusage50 *) rusage;
 	} */
+	int error;
 	struct rusage ru;
 	struct rusage50 ru50;
 	struct proc *p = l-l_proc;
 
-	switch (SCARG(uap, who)) {
-	case RUSAGE_SELF:
-		mutex_enter(p-p_lock);
-		memcpy(ru, p-p_stats-p_ru, sizeof(ru));
-		calcru(p, ru.ru_utime, ru.ru_stime, NULL, NULL);
-		mutex_exit(p-p_lock);
-		break;
-
-	case RUSAGE_CHILDREN:
-		mutex_enter(p-p_lock);
-		memcpy(ru, p-p_stats-p_cru, sizeof(ru));
-		mutex_exit(p-p_lock);
-		break;
+	error = getrusage1(p, SCARG(uap, who), ru);
+	if (error != 0)
+		return error;
 
-	default:
-		return EINVAL;
-	}
 	rusage_to_rusage50(ru, ru50);
 	return copyout(ru50, SCARG(uap, rusage), sizeof(ru50));
 }

Index: src/sys/compat/netbsd32/netbsd32_compat_50.c
diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.21 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.22
--- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.21	Tue Oct  2 01:44:28 2012
+++ src/sys/compat/netbsd32/netbsd32_compat_50.c	Sat Nov  3 23:22:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_compat_50.c,v 1.21 2012/10/02 01:44:28 christos Exp $	*/
+/*	$NetBSD: netbsd32_compat_50.c,v 1.22 2012/11/03 23:22:22 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.21 2012/10/02 01:44:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.22 2012/11/03 23:22:22 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -840,28 +840,17 @@ compat_50_netbsd32_getrusage(struct lwp 
 		syscallarg(int) who;
 		syscallarg(netbsd32_rusage50p_t) rusage;
 	} */
+	int error;
 	struct proc *p = l-l_proc;
-	struct rusage *rup;
-	struct netbsd32_rusage50 ru;
-
-	switch (SCARG(uap, who)) {
-
-	case RUSAGE_SELF:
-		rup = p-p_stats-p_ru;
-		mutex_enter(p-p_lock);
-		calcru(p, rup-ru_utime, rup-ru_stime, NULL, NULL);
-		mutex_exit(p-p_lock);
-		break;
+	struct rusage ru;
+	struct netbsd32_rusage50 ru32;
 
-	case RUSAGE_CHILDREN:
-		rup = p-p_stats-p_cru;
-		break;
+	error = getrusage1(p, SCARG(uap, who), ru);
+	if (error != 0)
+		return error;
 
-	default:
-		return (EINVAL);
-	}
-	netbsd32_from_rusage50(rup, ru);
-	return copyout(ru, SCARG_P32(uap, rusage), sizeof(ru));
+	netbsd32_from_rusage50(ru, ru32);
+	return copyout(ru32, SCARG_P32(uap, rusage), sizeof(ru32));
 }
 
 int
Index: src/sys/compat/netbsd32/netbsd32_wait.c
diff -u src/sys/compat/netbsd32/netbsd32_wait.c:1.21 src/sys/compat/netbsd32/netbsd32_wait.c:1.22
--- src/sys/compat/netbsd32/netbsd32_wait.c:1.21	Wed Nov  4 21:23:03 2009
+++ src/sys/compat/netbsd32/netbsd32_wait.c	Sat Nov  3 23:22:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_wait.c,v 1.21 2009/11/04 21:23:03 rmind Exp $	*/
+/*	$NetBSD: netbsd32_wait.c,v 1.22 2012/11/03 23:22:22 njoly Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_wait.c,v 1.21 2009/11/04 21:23:03 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_wait.c,v 1.22 2012/11/03 23:22:22 njoly Exp $);
 
 #include sys/param.h
 #include 

CVS commit: src/lib/libpthread

2012-11-03 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Nov  3 23:42:27 UTC 2012

Modified Files:
src/lib/libpthread: pthread.c pthread_int.h

Log Message:
libpthread: replace the use of obsolete sys/tree.h interface with rbtree(9).


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.86 -r1.87 src/lib/libpthread/pthread_int.h

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

Modified files:

Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.138 src/lib/libpthread/pthread.c:1.139
--- src/lib/libpthread/pthread.c:1.138	Sat Nov  3 03:10:35 2012
+++ src/lib/libpthread/pthread.c	Sat Nov  3 23:42:27 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.138 2012/11/03 03:10:35 christos Exp $	*/
+/*	$NetBSD: pthread.c,v 1.139 2012/11/03 23:42:27 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread.c,v 1.138 2012/11/03 03:10:35 christos Exp $);
+__RCSID($NetBSD: pthread.c,v 1.139 2012/11/03 23:42:27 rmind Exp $);
 
 #define	__EXPOSE_STACK	1
 
@@ -49,6 +49,7 @@ __RCSID($NetBSD: pthread.c,v 1.138 2012
 #include signal.h
 #include stdio.h
 #include stdlib.h
+#include stddef.h
 #include string.h
 #include syslog.h
 #include ucontext.h
@@ -59,12 +60,16 @@ __RCSID($NetBSD: pthread.c,v 1.138 2012
 #include pthread_int.h
 
 pthread_rwlock_t pthread__alltree_lock = PTHREAD_RWLOCK_INITIALIZER;
-RB_HEAD(__pthread__alltree, __pthread_st) pthread__alltree;
+static rb_tree_t	pthread__alltree;
 
-#ifndef lint
-static int	pthread__cmp(struct __pthread_st *, struct __pthread_st *);
-RB_PROTOTYPE_STATIC(__pthread__alltree, __pthread_st, pt_alltree, pthread__cmp)
-#endif
+static signed int	pthread__cmp(void *, const void *, const void *);
+
+static const rb_tree_ops_t pthread__alltree_ops = {
+	.rbto_compare_nodes = pthread__cmp,
+	.rbto_compare_key = pthread__cmp,
+	.rbto_node_offset = offsetof(struct __pthread_st, pt_alltree),
+	.rbto_context = NULL
+};
 
 static void	pthread__create_tramp(void *);
 static void	pthread__initthread(pthread_t);
@@ -176,7 +181,8 @@ pthread__init(void)
 	pthread_attr_init(pthread_default_attr);
 	PTQ_INIT(pthread__allqueue);
 	PTQ_INIT(pthread__deadqueue);
-	RB_INIT(pthread__alltree);
+
+	rb_tree_init(pthread__alltree, pthread__alltree_ops);
 
 	/* Create the thread structure corresponding to main() */
 	pthread__initmain(first);
@@ -185,7 +191,7 @@ pthread__init(void)
 
 	first-pt_lid = _lwp_self();
 	PTQ_INSERT_HEAD(pthread__allqueue, first, pt_allq);
-	RB_INSERT(__pthread__alltree, pthread__alltree, first);
+	(void)rb_tree_insert_node(pthread__alltree, first);
 
 	if (_lwp_ctl(LWPCTL_FEATURE_CURCPU, first-pt_lwpctl) != 0) {
 		err(1, _lwp_ctl);
@@ -458,7 +464,7 @@ pthread_create(pthread_t *thread, const 
 		/* Add to list of all threads. */
 		pthread_rwlock_wrlock(pthread__alltree_lock);
 		PTQ_INSERT_TAIL(pthread__allqueue, newthread, pt_allq);
-		RB_INSERT(__pthread__alltree, pthread__alltree, newthread);
+		(void)rb_tree_insert_node(pthread__alltree, newthread);
 		pthread_rwlock_unlock(pthread__alltree_lock);
 
 		/* Will be reset by the thread upon exit. */
@@ -933,24 +939,20 @@ pthread_testcancel(void)
 /*
  * POSIX requires that certain functions return an error rather than
  * invoking undefined behavior even when handed completely bogus
- * pthread_t values, e.g. stack garbage or (pthread_t)666. This
- * utility routine searches the list of threads for the pthread_t
- * value without dereferencing it.
+ * pthread_t values, e.g. stack garbage.
  */
 int
 pthread__find(pthread_t id)
 {
 	pthread_t target;
+	int error;
 
 	pthread_rwlock_rdlock(pthread__alltree_lock);
-	/* LINTED */
-	target = RB_FIND(__pthread__alltree, pthread__alltree, id);
+	target = rb_tree_find_node(pthread__alltree, id);
+	error = (target  target-pt_state != PT_STATE_DEAD) ? 0 : ESRCH;
 	pthread_rwlock_unlock(pthread__alltree_lock);
 
-	if (target == NULL || target-pt_state == PT_STATE_DEAD)
-		return ESRCH;
-
-	return 0;
+	return error;
 }
 
 
@@ -1300,20 +1302,18 @@ pthread__initmain(pthread_t *newt)
 	pthread__main.pt_tls-tcb_pthread = pthread__main;
 }
 
-#ifndef lint
-static int
-pthread__cmp(struct __pthread_st *a, struct __pthread_st *b)
+static signed int
+pthread__cmp(void *ctx, const void *n1, const void *n2)
 {
+	const uintptr_t const p1 = (const uintptr_t)n1;
+	const uintptr_t const p2 = (const uintptr_t)n2;
 
-	if ((uintptr_t)a  (uintptr_t)b)
-		return (-1);
-	else if (a == b)
-		return 0;
-	else
+	if (p1  p2)
+		return -1;
+	if (p1  p2)
 		return 1;
+	return 0;
 }
-RB_GENERATE_STATIC(__pthread__alltree, __pthread_st, pt_alltree, pthread__cmp)
-#endif
 
 /* Because getenv() wants to use locks. */
 char *

Index: src/lib/libpthread/pthread_int.h
diff -u src/lib/libpthread/pthread_int.h:1.86 src/lib/libpthread/pthread_int.h:1.87
--- 

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

2012-11-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Nov  4 00:32:47 UTC 2012

Modified Files:
src/sys/arch/sparc/sparc: locore.s pmap.c

Log Message:
in cpu_switchto(), remove the MP-unsafe code to mark a pmap active on a CPU,
pmap_activate() already does this.  add MP locking to pmap_activate()
and pmap_deactivate().  move flushing of user windows and virtual caches
from pamp_activate() to pmap_deactivate().


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/arch/sparc/sparc/locore.s
cvs rdiff -u -r1.348 -r1.349 src/sys/arch/sparc/sparc/pmap.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/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.267 src/sys/arch/sparc/sparc/locore.s:1.268
--- src/sys/arch/sparc/sparc/locore.s:1.267	Fri Nov  2 00:01:19 2012
+++ src/sys/arch/sparc/sparc/locore.s	Sun Nov  4 00:32:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.267 2012/11/02 00:01:19 chs Exp $	*/
+/*	$NetBSD: locore.s,v 1.268 2012/11/04 00:32:47 chs Exp $	*/
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -4935,19 +4935,6 @@ Lnosaveoldlwp:
 	/*
 	 * Now running p.  
 	 */
-#if defined(MULTIPROCESSOR)
-	ld	[%g3 + L_PROC], %o2	! p = l-l_proc;
-	ld	[%o2 + P_VMSPACE], %o3	! vm = p-p_vmspace;
-	ld	[%o3 + VM_PMAP], %o4	! pm = vm-vm_map.vm_pmap;
-	/* Add this CPU to the pmap's CPU set */
-	sethi	%hi(CPUINFO_VA + CPUINFO_CPUNO), %o0
-	ld	[%o0 + %lo(CPUINFO_VA + CPUINFO_CPUNO)], %o1
-	mov	1, %o2
-	ld	[%o4 + PMAP_CPUSET], %o0
-	sll	%o2, %o1, %o2
-	or	%o0, %o2, %o0		! pm-pm_cpuset |= cpu_number();
-	st	%o0, [%o4 + PMAP_CPUSET]
-#endif
 
 	/*
 	 * Check for restartable atomic sequences (RAS)

Index: src/sys/arch/sparc/sparc/pmap.c
diff -u src/sys/arch/sparc/sparc/pmap.c:1.348 src/sys/arch/sparc/sparc/pmap.c:1.349
--- src/sys/arch/sparc/sparc/pmap.c:1.348	Sun Jan 29 11:49:58 2012
+++ src/sys/arch/sparc/sparc/pmap.c	Sun Nov  4 00:32:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.348 2012/01/29 11:49:58 para Exp $ */
+/*	$NetBSD: pmap.c,v 1.349 2012/11/04 00:32:47 chs Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.348 2012/01/29 11:49:58 para Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.349 2012/11/04 00:32:47 chs Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -7440,31 +7440,19 @@ void
 pmap_activate(struct lwp *l)
 {
 	pmap_t pm = l-l_proc-p_vmspace-vm_map.pmap;
-	int s;
 
-	/*
-	 * This is essentially the same thing that happens in cpu_switch()
-	 * when the newly selected process is about to run, except that we
-	 * have to make sure to clean the register windows before we set
-	 * the new context.
-	 */
+	if (pm == pmap_kernel() || l != curlwp) {
+		return;
+	}
 
-	s = splvm();
-	if (l == curlwp) {
-		write_user_windows();
-		if (pm-pm_ctx == NULL) {
-			ctx_alloc(pm);	/* performs setcontext() */
-		} else {
-			/* Do any cache flush needed on context switch */
-			(*cpuinfo.pure_vcache_flush)();
-			setcontext(pm-pm_ctxnum);
-		}
-#if defined(MULTIPROCESSOR)
-		if (pm != pmap_kernel())
-			PMAP_SET_CPUSET(pm, cpuinfo);
-#endif
+	PMAP_LOCK();
+	if (pm-pm_ctx == NULL) {
+		ctx_alloc(pm);	/* performs setcontext() */
+	} else {
+		setcontext(pm-pm_ctxnum);
 	}
-	splx(s);
+	PMAP_SET_CPUSET(pm, cpuinfo);
+	PMAP_UNLOCK();
 }
 
 /*
@@ -7473,22 +7461,27 @@ pmap_activate(struct lwp *l)
 void
 pmap_deactivate(struct lwp *l)
 {
-#if defined(MULTIPROCESSOR)
-	pmap_t pm;
-	struct proc *p;
+	struct proc *p = l-l_proc;
+	pmap_t pm = p-p_vmspace-vm_map.pmap;
+
+	if (pm == pmap_kernel() || l != curlwp) {
+		return;
+	}
+
+	write_user_windows();
+	PMAP_LOCK();
+	if (pm-pm_ctx) {
+		(*cpuinfo.pure_vcache_flush)();
 
-	p = l-l_proc;
-	if (p-p_vmspace 
-	(pm = p-p_vmspace-vm_map.pmap) != pmap_kernel()) {
 #if defined(SUN4M) || defined(SUN4D)
-		if (pm-pm_ctx  CPU_HAS_SRMMU)
+		if (CPU_HAS_SRMMU)
 			sp_tlb_flush(0, pm-pm_ctxnum, ASI_SRMMUFP_L0);
 #endif
-
-		/* we no longer need broadcast tlb flushes for this pmap. */
-		PMAP_CLR_CPUSET(pm, cpuinfo);
 	}
-#endif
+
+	/* we no longer need broadcast tlb flushes for this pmap. */
+	PMAP_CLR_CPUSET(pm, cpuinfo);
+	PMAP_UNLOCK();
 }
 
 #ifdef DEBUG



CVS commit: src/distrib

2012-11-03 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Nov  3 07:59:46 UTC 2012

Modified Files:
src/distrib/notes/common: main
src/distrib/notes/evbarm: prep
src/distrib/sets: regpkg

Log Message:
Remove duplicate word (the the - the)


To generate a diff of this commit:
cvs rdiff -u -r1.492 -r1.493 src/distrib/notes/common/main
cvs rdiff -u -r1.10 -r1.11 src/distrib/notes/evbarm/prep
cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/regpkg

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



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

2012-11-03 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  3 08:01:36 UTC 2012

Removed Files:
src/sys/arch/x68k/stand/bootlogo: MANIFEST netbsd.xpm setbootimg.c
xpm2bootimg.c

Log Message:
Remove x68k/stand/bootlogo/ directory.
It was a tool before the bootloader becomes multi-stage (10 years ago),
and it does not work anymore today.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/arch/x68k/stand/bootlogo/MANIFEST \
src/sys/arch/x68k/stand/bootlogo/netbsd.xpm
cvs rdiff -u -r1.4 -r0 src/sys/arch/x68k/stand/bootlogo/setbootimg.c
cvs rdiff -u -r1.5 -r0 src/sys/arch/x68k/stand/bootlogo/xpm2bootimg.c

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



CVS commit: src/lib/libpthread

2012-11-03 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  3 09:20:36 UTC 2012

Modified Files:
src/lib/libpthread: pthread_condattr.3

Log Message:
Fix pasto.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/libpthread/pthread_condattr.3

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



CVS commit: src/sys/modules/nand

2012-11-03 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sat Nov  3 11:48:55 UTC 2012

Modified Files:
src/sys/modules/nand: Makefile

Log Message:
Add nand_samsung.c to the module build too!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/nand/Makefile

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



CVS commit: src/sys/dev/nand

2012-11-03 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sat Nov  3 12:12:48 UTC 2012

Modified Files:
src/sys/dev/nand: nand.c nand.h nand_micron.c nand_samsung.c

Log Message:
Make nc_block_pages go aways, its redundant and unused.
Print more info on attach including the width.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/nand/nand.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nand/nand_micron.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nand/nand_samsung.c

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



CVS commit: src/sys/dev/nand

2012-11-03 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Sat Nov  3 12:45:28 UTC 2012

Modified Files:
src/sys/dev/nand: nand.c nandemulator.c

Log Message:
Endiannes fixes from Brett Slager in ONFI Param page parsing.
Similar changes in nandemulator by me.
Remove panic about more than one LUNs.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/nand/nandemulator.c

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



CVS commit: src/usr.bin/mktemp

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 13:34:08 UTC 2012

Modified Files:
src/usr.bin/mktemp: mktemp.1 mktemp.c

Log Message:
PR/47155: Eitan Adler: add mktemp zero arguments extension


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mktemp/mktemp.1
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/mktemp/mktemp.c

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



CVS commit: src/usr.bin/make

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 13:59:27 UTC 2012

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

Log Message:
off-by-one


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/usr.bin/make/cond.c

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



CVS commit: src/distrib

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 14:25:33 UTC 2012

Modified Files:
src/distrib/amd64/installimage: Makefile
src/distrib/amd64/liveimage/emuimage: Makefile
src/distrib/amd64/liveimage/usbimage: Makefile
src/distrib/common/bootimage: Makefile.installimage Makefile.liveimage
src/distrib/i386/installimage: Makefile
src/distrib/i386/liveimage/emuimage: Makefile
src/distrib/i386/liveimage/usbimage: Makefile
src/distrib/pmax/liveimage/emuimage: Makefile
src/distrib/sparc/liveimage/emuimage: Makefile
src/distrib/sparc64/liveimage/emuimage: Makefile
src/distrib/sun2/liveimage/emuimage: Makefile
src/distrib/sun3/liveimage/emuimage: Makefile
src/distrib/vax/liveimage/emuimage: Makefile

Log Message:
Allow overriding live-image and install-image sizes by
INSTIMAGEMB (for install-images), USBIMAGEMB (for x86 sd0root liveimages),
and EMUIMAGEMB (for other liveimages) variables.
Per discussion on current-users@:
http://mail-index.NetBSD.org/current-users/2012/10/29/msg021368.html


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/installimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/amd64/liveimage/usbimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/common/bootimage/Makefile.installimage
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/bootimage/Makefile.liveimage
cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/installimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/i386/liveimage/usbimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/pmax/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sparc/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sparc64/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sun2/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/sun3/liveimage/emuimage/Makefile
cvs rdiff -u -r1.2 -r1.3 src/distrib/vax/liveimage/emuimage/Makefile

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



CVS commit: src/external/gpl3/gdb/lib

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 14:38:17 UTC 2012

Modified Files:
src/external/gpl3/gdb/lib: Makefile

Log Message:
Tidyup


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/Makefile

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



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

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 14:44:29 UTC 2012

Modified Files:
src/sys/arch/x68k/conf: GENERIC

Log Message:
Comment out pseudo-device fss.  We already has options FFS_NO_SNAPSHOT.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/x68k/conf/GENERIC

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 14:59:44 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: mips-tdep.h mipsnbsd-nat.c
src/external/gpl3/gdb/dist/gdb/config/mips: nbsd.mh

Log Message:
Bring across target kvm support for mips from gdb6.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/mips-tdep.h
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/mipsnbsd-nat.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh

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



CVS commit: src/external/gpl3/gdb/dist/gdb

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 15:06:55 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: mipsnbsd-tdep.c

Log Message:
Supply MIPS_ZERO_REGNUM and MIPS_UNUSED_REGNUM (as zero). Idea stolen from
mips-linux-tdep.c


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/mipsnbsd-tdep.c

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



CVS commit: src/external/gpl3/gdb/dist/gdb/config/mips

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 15:07:40 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/mips: nbsd.mh

Log Message:
Typo in previous


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh

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



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

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 15:39:24 UTC 2012

Modified Files:
src/external/bsd/cron/dist: config.h crontab.c

Log Message:
use utimensat(2) and correct and centralize file times handling.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/cron/dist/config.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/cron/dist/crontab.c

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



CVS commit: src/distrib/utils/sysinst/arch/x68k

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 15:40:58 UTC 2012

Modified Files:
src/distrib/utils/sysinst/arch/x68k: Makefile
Removed Files:
src/distrib/utils/sysinst/arch/x68k: menus.md.es menus.md.pl msg.md.de
msg.md.es msg.md.pl

Log Message:
Remove unused non-en translation messages.
(src/distrib/x68k/floppies/ramdisk/Makefile specifies list.sysinst.en)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/distrib/utils/sysinst/arch/x68k/Makefile
cvs rdiff -u -r1.2 -r0 src/distrib/utils/sysinst/arch/x68k/menus.md.es
cvs rdiff -u -r1.5 -r0 src/distrib/utils/sysinst/arch/x68k/menus.md.pl \
src/distrib/utils/sysinst/arch/x68k/msg.md.de
cvs rdiff -u -r1.4 -r0 src/distrib/utils/sysinst/arch/x68k/msg.md.es
cvs rdiff -u -r1.9 -r0 src/distrib/utils/sysinst/arch/x68k/msg.md.pl

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



CVS commit: src/lib/libperfuse

2012-11-03 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Nov  3 15:43:20 UTC 2012

Modified Files:
src/lib/libperfuse: ops.c

Log Message:
When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libperfuse/ops.c

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



CVS commit: src/share/man/man4

2012-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  3 16:47:54 UTC 2012

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

Log Message:
options FFS_NO_SNAPSHOT disables only the creation of file system
internal snapshot.  Per comment from hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.416 -r1.417 src/share/man/man4/options.4

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



CVS commit: src/external/gpl3/gdb/lib

2012-11-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Nov  3 17:07:51 UTC 2012

Modified Files:
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mips64el: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mipseb: bfd_stdint.h
src/external/gpl3/gdb/lib/libbfd/arch/mipsel: bfd_stdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64eb: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64el: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb: gstdint.h
src/external/gpl3/gdb/lib/libdecnumber/arch/mipsel: gstdint.h
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mips64el: config.h defs.mk init.c
src/external/gpl3/gdb/lib/libgdb/arch/mipseb: defs.mk
src/external/gpl3/gdb/lib/libgdb/arch/mipsel: defs.mk

Log Message:
Re-run mknative for mips gdb 7.3.1 - not being used just yet.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64eb/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mips64el/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mipseb/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libbfd/arch/mipsel/bfd_stdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64eb/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mips64el/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mipseb/gstdint.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libdecnumber/arch/mipsel/gstdint.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/init.c
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/defs.mk \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/init.c
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/lib/libgdb/arch/mipseb/defs.mk
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/lib/libgdb/arch/mipsel/defs.mk

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



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

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 17:33:01 UTC 2012

Modified Files:
src/external/bsd/cron/dist: crontab.c

Log Message:
make the utime and utimes cases work too.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/cron/dist/crontab.c

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



CVS commit: src/sbin/scsictl

2012-11-03 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Nov  3 19:14:54 UTC 2012

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

Log Message:
drop write-only variable


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sbin/scsictl/scsictl.c

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



CVS commit: src/sbin/scsictl

2012-11-03 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Nov  3 19:26:53 UTC 2012

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

Log Message:
make a bunch of globals static


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/scsictl/scsictl.c

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



CVS commit: src

2012-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  3 19:39:21 UTC 2012

Modified Files:
src/lib/libc/gen: Makefile.inc
src/lib/libc/sys: utimes.2
src/sys/sys: stat.h
Added Files:
src/lib/libc/gen: utimens.c

Log Message:
add utimens and lutimens wrappers using utimensat.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/lib/libc/gen/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/utimens.c
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/sys/utimes.2
cvs rdiff -u -r1.63 -r1.64 src/sys/sys/stat.h

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



CVS commit: src/sys

2012-11-03 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Nov  3 23:22:23 UTC 2012

Modified Files:
src/sys/compat/common: kern_time_50.c
src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_wait.c
src/sys/compat/osf1: osf1_resource.c
src/sys/kern: kern_resource.c
src/sys/sys: resourcevar.h

Log Message:
Move rusage computation to a new getrusage1() function. Adjust all
compat/emulations to make use of it.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/common/kern_time_50.c
cvs rdiff -u -r1.21 -r1.22 src/sys/compat/netbsd32/netbsd32_compat_50.c \
src/sys/compat/netbsd32/netbsd32_wait.c
cvs rdiff -u -r1.14 -r1.15 src/sys/compat/osf1/osf1_resource.c
cvs rdiff -u -r1.169 -r1.170 src/sys/kern/kern_resource.c
cvs rdiff -u -r1.53 -r1.54 src/sys/sys/resourcevar.h

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



CVS commit: src/lib/libpthread

2012-11-03 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Nov  3 23:42:27 UTC 2012

Modified Files:
src/lib/libpthread: pthread.c pthread_int.h

Log Message:
libpthread: replace the use of obsolete sys/tree.h interface with rbtree(9).


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.86 -r1.87 src/lib/libpthread/pthread_int.h

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



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

2012-11-03 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Nov  4 00:32:47 UTC 2012

Modified Files:
src/sys/arch/sparc/sparc: locore.s pmap.c

Log Message:
in cpu_switchto(), remove the MP-unsafe code to mark a pmap active on a CPU,
pmap_activate() already does this.  add MP locking to pmap_activate()
and pmap_deactivate().  move flushing of user windows and virtual caches
from pamp_activate() to pmap_deactivate().


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/arch/sparc/sparc/locore.s
cvs rdiff -u -r1.348 -r1.349 src/sys/arch/sparc/sparc/pmap.c

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