CVS commit: src/sys/rump/net/lib/libshmif

2014-08-16 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Aug 16 06:18:01 UTC 2014

Modified Files:
src/sys/rump/net/lib/libshmif: shmifvar.h

Log Message:
Bump SHMIF_VERSION


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/net/lib/libshmif/shmifvar.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/rump/net/lib/libshmif/shmifvar.h
diff -u src/sys/rump/net/lib/libshmif/shmifvar.h:1.8 src/sys/rump/net/lib/libshmif/shmifvar.h:1.9
--- src/sys/rump/net/lib/libshmif/shmifvar.h:1.8	Fri Aug 15 15:03:03 2014
+++ src/sys/rump/net/lib/libshmif/shmifvar.h	Sat Aug 16 06:18:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: shmifvar.h,v 1.8 2014/08/15 15:03:03 ozaki-r Exp $	*/
+/*	$NetBSD: shmifvar.h,v 1.9 2014/08/16 06:18:01 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 #define _RUMP_NET_SHMIFVAR_H_
 
 #define SHMIF_MAGIC 0xca11d054
-#define SHMIF_VERSION 2
+#define SHMIF_VERSION 3
 
 struct shmif_mem {
 	uint32_t shm_magic;



CVS commit: src/sys/fs/ptyfs

2014-08-16 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Aug 16 07:22:30 UTC 2014

Modified Files:
src/sys/fs/ptyfs: ptyfs_subr.c

Log Message:
Needs HASH_SLIST, not HASH_LIST.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/fs/ptyfs/ptyfs_subr.c

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

Modified files:

Index: src/sys/fs/ptyfs/ptyfs_subr.c
diff -u src/sys/fs/ptyfs/ptyfs_subr.c:1.31 src/sys/fs/ptyfs/ptyfs_subr.c:1.32
--- src/sys/fs/ptyfs/ptyfs_subr.c:1.31	Fri Aug 15 13:40:39 2014
+++ src/sys/fs/ptyfs/ptyfs_subr.c	Sat Aug 16 07:22:30 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_subr.c,v 1.31 2014/08/15 13:40:39 hannken Exp $	*/
+/*	$NetBSD: ptyfs_subr.c,v 1.32 2014/08/16 07:22:30 hannken Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -73,7 +73,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ptyfs_subr.c,v 1.31 2014/08/15 13:40:39 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ptyfs_subr.c,v 1.32 2014/08/16 07:22:30 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -124,7 +124,7 @@ void
 ptyfs_hashinit(void)
 {
 
-	ptyfs_node_tbl = hashinit(16, HASH_LIST, true, ptyfs_node_mask);
+	ptyfs_node_tbl = hashinit(16, HASH_SLIST, true, ptyfs_node_mask);
 	mutex_init(ptyfs_hashlock, MUTEX_DEFAULT, IPL_NONE);
 }
 
@@ -136,7 +136,7 @@ ptyfs_hashdone(void)
 {
 	
 	mutex_destroy(ptyfs_hashlock);
-	hashdone(ptyfs_node_tbl, HASH_LIST, ptyfs_node_mask);
+	hashdone(ptyfs_node_tbl, HASH_SLIST, ptyfs_node_mask);
 }
 
 /*



CVS commit: src/share/man/man8

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 08:43:12 UTC 2014

Modified Files:
src/share/man/man8: boot.8
src/share/man/man8/man8.cobalt: boot.8
src/share/man/man8/man8.x68k: boot.8
src/share/man/man8/man8.x86: boot.8 dosboot.8 pxeboot.8

Log Message:
To get no space between [device:] and [filename],
the mdoc input needs ... Oc Ns Oo ..., not ... Ns Oc Oo 


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man8/boot.8
cvs rdiff -u -r1.8 -r1.9 src/share/man/man8/man8.cobalt/boot.8
cvs rdiff -u -r1.14 -r1.15 src/share/man/man8/man8.x68k/boot.8
cvs rdiff -u -r1.1 -r1.2 src/share/man/man8/man8.x86/boot.8 \
src/share/man/man8/man8.x86/dosboot.8 \
src/share/man/man8/man8.x86/pxeboot.8

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/man8/boot.8
diff -u src/share/man/man8/boot.8:1.13 src/share/man/man8/boot.8:1.14
--- src/share/man/man8/boot.8:1.13	Thu Aug 14 15:50:42 2014
+++ src/share/man/man8/boot.8	Sat Aug 16 08:43:12 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.13 2014/08/14 15:50:42 apb Exp $
+.\	$NetBSD: boot.8,v 1.14 2014/08/16 08:43:12 apb Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\
-.Dd August 14, 2014
+.Dd August 16, 2014
 .Dt BOOT 8
 .Os
 .Sh NAME
@@ -62,7 +62,7 @@ input of these commands:
 .\ man pages (man8/man8.*/*boot*.8);
 .\ please try to keep all relevant files synchronized.
 .Bl -tag -width 04n -offset 04n
-.It Ic boot Oo Va device : Ns Oc Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
+.It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
 The default
 .Va device
 will be set to the disk that the boot loader was

Index: src/share/man/man8/man8.cobalt/boot.8
diff -u src/share/man/man8/man8.cobalt/boot.8:1.8 src/share/man/man8/man8.cobalt/boot.8:1.9
--- src/share/man/man8/man8.cobalt/boot.8:1.8	Sun Feb 21 13:33:03 2010
+++ src/share/man/man8/man8.cobalt/boot.8	Sat Aug 16 08:43:12 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.8 2010/02/21 13:33:03 wiz Exp $
+.\	$NetBSD: boot.8,v 1.9 2014/08/16 08:43:12 apb Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\
-.Dd November 6, 2008
+.Dd August 16, 2014
 .Dt BOOT 8 cobalt
 .Os
 .Sh NAME
@@ -343,7 +343,7 @@ Cobalt: bfd /boot/boot.gz [options]
 .Pp
 The boot loader allows the following options:
 .Bl -tag -width 04n -offset 04n
-.It Ic nbsd= Oo Va device : Ns Oc Oo Va filename Oc Oo Fl acdqsv Oc
+.It Ic nbsd= Oo Va device : Oc Ns Oo Va filename Oc Oo Fl acdqsv Oc
 .Pp
 The device, filename and options on the bfd prompt are same with the boot
 loader.

Index: src/share/man/man8/man8.x68k/boot.8
diff -u src/share/man/man8/man8.x68k/boot.8:1.14 src/share/man/man8/man8.x68k/boot.8:1.15
--- src/share/man/man8/man8.x68k/boot.8:1.14	Sat Sep  5 11:37:53 2009
+++ src/share/man/man8/man8.x68k/boot.8	Sat Aug 16 08:43:12 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.14 2009/09/05 11:37:53 wiz Exp $
+.\	$NetBSD: boot.8,v 1.15 2014/08/16 08:43:12 apb Exp $
 .\
 .\ Copyright (c) 1980, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\
-.Dd April 8, 2003
+.Dd August 16, 2014
 .Dt BOOT 8 x68k
 .Os
 .Sh NAME
@@ -124,7 +124,7 @@ Pressing a key within the time limit wil
 In interactive mode, the boot loader will present a prompt, allowing
 input of these commands:
 .Bl -tag -width helpx -offset indent
-.It Ic boot Oo Ar device : Ns Oc Oo Ar filename Oc Oo Fl adqsv Oc
+.It Ic boot Oo Ar device : Oc Ns Oo Ar filename Oc Oo Fl adqsv Oc
 The default
 .Ar device
 will be set to the disk that the boot loader was

Index: src/share/man/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.1 src/share/man/man8/man8.x86/boot.8:1.2
--- src/share/man/man8/man8.x86/boot.8:1.1	Wed Jul 31 21:01:13 2013
+++ src/share/man/man8/man8.x86/boot.8	Sat Aug 16 08:43:12 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.1 2013/07/31 21:01:13 soren Exp $
+.\	$NetBSD: boot.8,v 1.2 2014/08/16 08:43:12 apb Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
 .\
-.Dd July 31, 2013
+.Dd August 16, 2014
 .Dt BOOT 8 x86
 .Os
 .Sh NAME
@@ -170,7 +170,7 @@ input of these commands:
 .\ also duplicated in the x86-specific dosboot.8 and pxeboot.8;
 .\ please try to keep all relevant files synchronized.
 .Bl -tag -width 04n -offset 04n
-.It Ic boot Oo Va device : Ns Oc Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
+.It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
 The default
 .Va device
 

CVS commit: src/lib/libc/time

2014-08-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 16 10:38:43 UTC 2014

Modified Files:
src/lib/libc/time: zic.c

Log Message:
gcc on the sparc needs help with variables it thinks are unitialized, but are 
not.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/lib/libc/time/zic.c

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

Modified files:

Index: src/lib/libc/time/zic.c
diff -u src/lib/libc/time/zic.c:1.47 src/lib/libc/time/zic.c:1.48
--- src/lib/libc/time/zic.c:1.47	Fri Aug 15 07:04:07 2014
+++ src/lib/libc/time/zic.c	Sat Aug 16 06:38:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zic.c,v 1.47 2014/08/15 11:04:07 christos Exp $	*/
+/*	$NetBSD: zic.c,v 1.48 2014/08/16 10:38:43 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: zic.c,v 1.47 2014/08/15 11:04:07 christos Exp $);
+__RCSID($NetBSD: zic.c,v 1.48 2014/08/16 10:38:43 christos Exp $);
 #endif /* !defined lint */
 
 #include version.h
@@ -2318,6 +2318,7 @@ outzone(const struct zone *const zpfirst
 zic_t	offset;
 
 INITIALIZE(ktime);
+ktime = 0; /* XXX: gcc */
 if (useuntil) {
 	/*
 	** Turn untiltime into UT
@@ -2331,7 +2332,8 @@ outzone(const struct zone *const zpfirst
 	if (!zp-z_untilrule.r_todisstd)
 		untiltime = tadd(untiltime,
 			-stdoff);
-}
+} else
+	untiltime = 0;	/* XXX: gcc */
 /*
 ** Find the rule (of those to do, if any)
 ** that takes effect earliest in the year.



CVS commit: src/share/man/man8

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 11:39:47 UTC 2014

Modified Files:
src/share/man/man8: boot.8

Log Message:
Mention that some platforms may have boot menus, and may support
other boot protocols.  Also change some [i386 only] comments to [x86 only].


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man8/boot.8

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/man8/boot.8
diff -u src/share/man/man8/boot.8:1.14 src/share/man/man8/boot.8:1.15
--- src/share/man/man8/boot.8:1.14	Sat Aug 16 08:43:12 2014
+++ src/share/man/man8/boot.8	Sat Aug 16 11:39:47 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.14 2014/08/16 08:43:12 apb Exp $
+.\	$NetBSD: boot.8,v 1.15 2014/08/16 11:39:47 apb Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -47,7 +47,7 @@ Additional information may be found in
 architecture-specific
 .Xr boot 8
 manual pages.
-.Pp
+.Ss Boot Protocol
 In the native
 .Nx
 boot protocol, options are passed from the boot loader
@@ -55,6 +55,10 @@ to the kernel via flag bits in the
 .Va boothowto
 variable (see
 .Xr boothowto 9 ) .
+Some boot loaders may also support other boot protocols.
+.Ss Menu
+Some boot loaders may present a menu, which may be configured via
+.Xr boot.cfg 5 .
 .Ss Interactive mode
 In interactive mode, the boot loader will present a prompt, allowing
 input of these commands:
@@ -226,7 +230,7 @@ is of the form specified in
 .It Ic help
 Print an overview about commands and arguments.
 .\ .It Ic load Va module Op Va arguments
-.\ [i386 only]
+.\ [x86 only]
 .It Ic ls Op Pa path
 Print a directory listing of
 .Pa path ,
@@ -234,9 +238,11 @@ containing inode number, filename, and f
 .Pa path
 can contain a device specification.
 .\ .It Ic multiboot Va kernel Op Va arguments
-.\ [i386 only]
+.\ [x86 only]
 .It Ic quit
 Reboot the system.
+.\ .It Ic userconf Va command
+.\ [x86only]
 .El
 .Pp
 In an emergency, the bootstrap methods described in the
@@ -249,7 +255,7 @@ can be used.
 boot program code loaded by the primary bootstrap
 .\ .It Pa /boot.cfg
 .\ optional configuration file
-.\ (used only on i386 and amd64 architectures)
+.\ [x86 only]
 .It Pa /netbsd
 system code
 .It Pa /netbsd.gz
@@ -272,7 +278,7 @@ manual pages (such as
 .Xr x86/boot 8 ) ,
 .Xr ddb 4 ,
 .Xr userconf 4 ,
-.\ .Xr boot.cfg 5 ,
+.\ .Xr boot.cfg 5 [x86 only] ,
 .Xr halt 8 ,
 .Xr installboot 8 ,
 .Xr reboot 8 ,



CVS commit: src/share/man/man8/man8.x86

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 11:41:38 UTC 2014

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Document fs, menu, rndseed, and splash commands.
Add rescue(8) to SEE ALSO.
Also a little copy editing.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man8/man8.x86/boot.8

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/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.2 src/share/man/man8/man8.x86/boot.8:1.3
--- src/share/man/man8/man8.x86/boot.8:1.2	Sat Aug 16 08:43:12 2014
+++ src/share/man/man8/man8.x86/boot.8	Sat Aug 16 11:41:37 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.2 2014/08/16 08:43:12 apb Exp $
+.\	$NetBSD: boot.8,v 1.3 2014/08/16 11:41:37 apb Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -48,7 +48,9 @@ the
 and its clones
 .Pc
 that can run
-.Nx Ns /x86
+.Nx Ns /i386
+or
+.Nx Ns /amd64
 can use any of the following boot procedures, depending on what the hardware and
 .Tn BIOS
 support:
@@ -137,7 +139,7 @@ setting the timeout, choosing a console 
 text and displaying a menu allowing boot commands to be easily chosen.
 See
 .Xr boot.cfg 5 .
-.Pp
+.Ss Boot Protocol
 The
 .Nx Ns /x86
 boot loader can boot a kernel using either the native
@@ -347,6 +349,13 @@ Without an argument, print the current s
 .Va device
 is of the form specified in
 .Cm boot .
+.It Ic fs Va file
+Load a file system image from the specified
+.Ar file ,
+and request the kernel to use it as the root file system.
+The
+.Xr makefs 8
+utility may be used to create suitable file system images.
 .It Ic help
 Print an overview about commands and arguments.
 .It Ic load Va module Op Ar arguments
@@ -380,7 +389,9 @@ for examples.
 .Pp
 In addition to the
 .Cm boot
-options specified above, the DOM0 kernel accepts
+options specified above, the
+.Tn Xen
+DOM0 kernel accepts
 .Po Ar arguments
 being separated with spaces
 .Pc :
@@ -458,6 +469,10 @@ Print a directory listing of
 containing inode number, filename, and file type.
 .Pa path
 can contain a device specification.
+.It Ic menu
+Display the boot menu and initiate a countdown,
+similarly to what would have happened if interactive mode
+had not been entered.
 .It Ic modules Bro Ar on | off | enabled | disabled Brc
 The values
 .Ar enabled , on
@@ -538,6 +553,32 @@ See the foreign operating system's docum
 .El
 .It Ic quit
 Reboot the system.
+.It Ic rndseed Ar file
+Load the specified
+.Ar file
+and request the kernel to use it as a seed for the
+.Xr rnd 4
+random number generator.
+The
+.Ar file
+should be in the private format used by
+.Xr rndctl 8 ,
+and should have been saved by
+.Ql rndctl -S
+shortly before the previous shutdown.
+See the
+.Va random_seed
+and
+.Va random_file
+variables in
+.Xr rc.conf 5 ,
+and the
+.Pa /etc/rc.d/random_seed
+script, for a way to manage the seed file.
+Using the same seed file on more then one host,
+or for more than one boot on the same host,
+will reduce the quality of random numbers
+and may impact system security.
 .It Ic userconf Va command
 Pass command
 .Va command
@@ -547,6 +588,14 @@ at boot time.
 These commands are processed before the interactive
 .Xr userconf 4
 shell is executed, if requested.
+.It Ic splash Ar file
+Load a graphical image from the specified
+.Ar file
+and request the kernel to use it as a splash screen.
+The
+.Ar file
+should contain an image in one of these formats:
+JPEG, PNG, BMP, GIF, PSD, or PIC.
 .It Ic vesa Bro Va modenum | Ar on | off | enabled | disabled | list Brc
 Initialise the video card to the specified resolution and bit depth.
 The
@@ -600,6 +649,7 @@ partition by
 .Xr multiboot 8 ,
 .Xr pxeboot 8 ,
 .Xr reboot 8 ,
+.Xr rescue 8 ,
 .Xr shutdown 8 ,
 .Xr boothowto 9
 .Sh BUGS



CVS commit: src/share/man/man8/man8.x86

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 12:30:12 UTC 2014

Modified Files:
src/share/man/man8/man8.x86: boot.8

Log Message:
Document supported subsets of image formats,
extracted from comments in src/sys/dev/stbi/stb_image.c.

XXX: This is not the right place to document supported image formats
for splash screens.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man8/man8.x86/boot.8

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/man8/man8.x86/boot.8
diff -u src/share/man/man8/man8.x86/boot.8:1.3 src/share/man/man8/man8.x86/boot.8:1.4
--- src/share/man/man8/man8.x86/boot.8:1.3	Sat Aug 16 11:41:37 2014
+++ src/share/man/man8/man8.x86/boot.8	Sat Aug 16 12:30:12 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: boot.8,v 1.3 2014/08/16 11:41:37 apb Exp $
+.\	$NetBSD: boot.8,v 1.4 2014/08/16 12:30:12 apb Exp $
 .\
 .\ Copyright (c) 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -595,7 +595,14 @@ and request the kernel to use it as a sp
 The
 .Ar file
 should contain an image in one of these formats:
-JPEG, PNG, BMP, GIF, PSD, or PIC.
+JPEG (baseline only, not progressive),
+PNG (8-bit only),
+TGA,
+BMP (non-1bpp, non-RLE),
+GIF,
+PSD (composited view only),
+or
+PIC.
 .It Ic vesa Bro Va modenum | Ar on | off | enabled | disabled | list Brc
 Initialise the video card to the specified resolution and bit depth.
 The



CVS commit: src/sys/dev/isa

2014-08-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat Aug 16 13:01:33 UTC 2014

Modified Files:
src/sys/dev/isa: ess.c essreg.h essvar.h

Log Message:
Add support for Spatializer, 3D audio effects embedded in ES1869
and ES1879 to ess(4).

Tested on my old laptop, mobio NX.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/isa/ess.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/isa/essreg.h
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/isa/essvar.h

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

Modified files:

Index: src/sys/dev/isa/ess.c
diff -u src/sys/dev/isa/ess.c:1.81 src/sys/dev/isa/ess.c:1.82
--- src/sys/dev/isa/ess.c:1.81	Fri Aug 15 19:55:23 2014
+++ src/sys/dev/isa/ess.c	Sat Aug 16 13:01:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ess.c,v 1.81 2014/08/15 19:55:23 nakayama Exp $	*/
+/*	$NetBSD: ess.c,v 1.82 2014/08/16 13:01:33 nakayama Exp $	*/
 
 /*
  * Copyright 1997
@@ -66,7 +66,7 @@
 */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ess.c,v 1.81 2014/08/15 19:55:23 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: ess.c,v 1.82 2014/08/16 13:01:33 nakayama Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -170,7 +170,7 @@ int	ess_reset(struct ess_softc *);
 void	ess_set_gain(struct ess_softc *, int, int);
 int	ess_set_in_port(struct ess_softc *, int);
 int	ess_set_in_ports(struct ess_softc *, int);
-u_int	ess_srtotc(u_int);
+u_int	ess_srtotc(struct ess_softc *, u_int);
 u_int	ess_srtofc(u_int);
 u_char	ess_get_dsp_status(struct ess_softc *);
 u_char	ess_dsp_read_ready(struct ess_softc *);
@@ -994,7 +994,17 @@ essattach(struct ess_softc *sc, int enab
 	if (ESS_USE_AUDIO1(sc-sc_model)) {
 		ess_write_mix_reg(sc, ESS_MREG_ADC_SOURCE, ESS_SOURCE_MIC);
 		sc-in_port = ESS_SOURCE_MIC;
-		sc-ndevs = ESS_1788_NDEVS;
+		if (ESS_IS_ES18X9(sc-sc_model)) {
+			sc-ndevs = ESS_18X9_NDEVS;
+			sc-sc_spatializer = 0;
+			ess_set_mreg_bits(sc, ESS_MREG_MODE,
+			ESS_MODE_ASYNC_MODE | ESS_MODE_NEWREG);
+			ess_set_mreg_bits(sc, ESS_MREG_SPATIAL_CTRL,
+			ESS_SPATIAL_CTRL_RESET);
+			ess_clear_mreg_bits(sc, ESS_MREG_SPATIAL_CTRL,
+			ESS_SPATIAL_CTRL_ENABLE | ESS_SPATIAL_CTRL_MONO);
+		} else
+			sc-ndevs = ESS_1788_NDEVS;
 	} else {
 		/*
 		 * Set hardware record source to use output of the record
@@ -1015,6 +1025,14 @@ essattach(struct ess_softc *sc, int enab
 	 * are set to 50% volume.
 	 */
 	for (i = 0; i  sc-ndevs; i++) {
+		if (ESS_IS_ES18X9(sc-sc_model)) {
+			switch (i) {
+			case ESS_SPATIALIZER:
+			case ESS_SPATIALIZER_ENABLE:
+v = 0;
+goto skip;
+			}
+		}
 		switch (i) {
 		case ESS_MIC_PLAY_VOL:
 		case ESS_LINE_PLAY_VOL:
@@ -1031,6 +1049,7 @@ essattach(struct ess_softc *sc, int enab
 			v = ESS_4BIT_GAIN(AUDIO_MAX_GAIN / 2);
 			break;
 		}
+skip:
 		sc-gain[i][ESS_LEFT] = sc-gain[i][ESS_RIGHT] = v;
 		ess_set_gain(sc, i, 1);
 	}
@@ -1262,11 +1281,12 @@ ess_set_params(
 	else
 		rate = play-sample_rate;
 
-	ess_write_x_reg(sc, ESS_XCMD_SAMPLE_RATE, ess_srtotc(rate));
+	ess_write_x_reg(sc, ESS_XCMD_SAMPLE_RATE, ess_srtotc(sc, rate));
 	ess_write_x_reg(sc, ESS_XCMD_FILTER_CLOCK, ess_srtofc(rate));
 
 	if (!ESS_USE_AUDIO1(sc-sc_model)) {
-		ess_write_mix_reg(sc, ESS_MREG_SAMPLE_RATE, ess_srtotc(rate));
+		ess_write_mix_reg(sc, ESS_MREG_SAMPLE_RATE,
+		ess_srtotc(sc, rate));
 		ess_write_mix_reg(sc, ESS_MREG_FILTER_CLOCK, ess_srtofc(rate));
 	}
 
@@ -1781,6 +1801,35 @@ ess_set_port(void *addr, mixer_ctrl_t *c
 		return 0;
 	}
 
+	if (ESS_IS_ES18X9(sc-sc_model)) {
+
+		switch (cp-dev) {
+		case ESS_SPATIALIZER:
+			if (cp-type != AUDIO_MIXER_VALUE ||
+			cp-un.value.num_channels != 1)
+return EINVAL;
+
+			sc-gain[cp-dev][ESS_LEFT] =
+sc-gain[cp-dev][ESS_RIGHT] = ESS_6BIT_GAIN(
+cp-un.value.level[AUDIO_MIXER_LEVEL_MONO]);
+			ess_set_gain(sc, cp-dev, 1);
+			return 0;
+
+		case ESS_SPATIALIZER_ENABLE:
+			if (cp-type != AUDIO_MIXER_ENUM)
+return EINVAL;
+
+			sc-sc_spatializer = (cp-un.ord != 0);
+			if (sc-sc_spatializer)
+ess_set_mreg_bits(sc, ESS_MREG_SPATIAL_CTRL,
+ESS_SPATIAL_CTRL_ENABLE);
+			else
+ess_clear_mreg_bits(sc, ESS_MREG_SPATIAL_CTRL,
+ESS_SPATIAL_CTRL_ENABLE);
+			return 0;
+		}
+	}
+
 	if (ESS_USE_AUDIO1(sc-sc_model))
 		return EINVAL;
 
@@ -1886,6 +1935,23 @@ ess_get_port(void *addr, mixer_ctrl_t *c
 		return 0;
 	}
 
+	if (ESS_IS_ES18X9(sc-sc_model)) {
+
+		switch (cp-dev) {
+		case ESS_SPATIALIZER:
+			if (cp-un.value.num_channels != 1)
+return EINVAL;
+
+			cp-un.value.level[AUDIO_MIXER_LEVEL_MONO] =
+sc-gain[cp-dev][ESS_LEFT];
+			return 0;
+
+		case ESS_SPATIALIZER_ENABLE:
+			cp-un.ord = sc-sc_spatializer;
+			return 0;
+		}
+	}
+
 	if (ESS_USE_AUDIO1(sc-sc_model))
 		return EINVAL;
 
@@ -2108,6 +2174,34 @@ ess_query_devinfo(void *addr, mixer_devi
 		return 0;
 	}
 
+	if (ESS_IS_ES18X9(sc-sc_model)) {
+
+		switch (dip-index) {
+		case ESS_SPATIALIZER:
+			dip-mixer_class = ESS_OUTPUT_CLASS;
+			dip-prev 

CVS commit: src/share/man/man4

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 15:34:33 UTC 2014

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

Log Message:
Document options COMPAT_40, COMPAT_50, and COMPAT_60.


To generate a diff of this commit:
cvs rdiff -u -r1.439 -r1.440 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.439 src/share/man/man4/options.4:1.440
--- src/share/man/man4/options.4:1.439	Wed Jul 23 21:19:33 2014
+++ src/share/man/man4/options.4	Sat Aug 16 15:34:33 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.439 2014/07/23 21:19:33 wiz Exp $
+.\	$NetBSD: options.4,v 1.440 2014/08/16 15:34:33 apb 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 July 23, 2014
+.Dd August 16, 2014
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -320,6 +320,9 @@ See
 for details about the changes made after the
 .Nx 3.0
 release.
+.It Cd options COMPAT_40
+Enable binary compatibility with
+.Nx 4.0 .
 .It Cd options COMPAT_43
 Enables compatibility with
 .Bx 4.3 .
@@ -348,6 +351,12 @@ It also enables
 support for some older pre
 .Bx 4.4
 socket calls.
+.It Cd options COMPAT_50
+Enable binary compatibility with
+.Nx 5.0 .
+.It Cd options COMPAT_60
+Enable binary compatibility with
+.Nx 6.0 .
 .It Cd options COMPAT_BSDPTY
 This option is currently on by default and enables the pty multiplexer
 .Xr ptm 4



CVS commit: src/sys/fs/puffs

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:19:41 UTC 2014

Modified Files:
src/sys/fs/puffs: puffs_msgif.h puffs_sys.h puffs_vnops.c

Log Message:
Add a oflags input field to open requests so that the filesystem can pass
back information about the file. Implement PUFFS_OPEN_IO_DIRECT, which
will force direct IO (bypassing page cache) for the file.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/fs/puffs/puffs_msgif.h
cvs rdiff -u -r1.84 -r1.85 src/sys/fs/puffs/puffs_sys.h
cvs rdiff -u -r1.182 -r1.183 src/sys/fs/puffs/puffs_vnops.c

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

Modified files:

Index: src/sys/fs/puffs/puffs_msgif.h
diff -u src/sys/fs/puffs/puffs_msgif.h:1.80 src/sys/fs/puffs/puffs_msgif.h:1.81
--- src/sys/fs/puffs/puffs_msgif.h:1.80	Fri Aug 10 16:49:35 2012
+++ src/sys/fs/puffs/puffs_msgif.h	Sat Aug 16 16:19:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.h,v 1.80 2012/08/10 16:49:35 manu Exp $	*/
+/*	$NetBSD: puffs_msgif.h,v 1.81 2014/08/16 16:19:41 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -339,6 +339,9 @@ struct puffs_vfsmsg_suspend {
 
 #define PUFFS_EXTATTRCTL_HASNODE	0x01
 #define PUFFS_EXTATTRCTL_HASATTRNAME	0x02
+
+#define	PUFFS_OPEN_IO_DIRECT	0x01
+
 struct puffs_vfsmsg_extattrctl {
 	struct puffs_req	pvfsr_pr;
 
@@ -399,6 +402,7 @@ struct puffs_vnmsg_open {
 
 	struct puffs_kcred	pvnr_cred;		/* OUT	*/
 	int			pvnr_mode;		/* OUT	*/
+	int			pvnr_oflags;		/* IN	*/
 };
 
 struct puffs_vnmsg_close {

Index: src/sys/fs/puffs/puffs_sys.h
diff -u src/sys/fs/puffs/puffs_sys.h:1.84 src/sys/fs/puffs/puffs_sys.h:1.85
--- src/sys/fs/puffs/puffs_sys.h:1.84	Thu Oct 17 21:03:27 2013
+++ src/sys/fs/puffs/puffs_sys.h	Sat Aug 16 16:19:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_sys.h,v 1.84 2013/10/17 21:03:27 christos Exp $	*/
+/*	$NetBSD: puffs_sys.h,v 1.85 2014/08/16 16:19:41 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -197,6 +197,8 @@ struct puffs_mount {
 #define PNODE_FAF	0x004	/* issue all operations as FAF		*/
 #define PNODE_DOINACT 	0x008	/* if inactive-on-demand, call inactive */
 #define PNODE_SOPEXP	0x100	/* Node reclaim postponed in sop thread	*/
+#define PNODE_RDIRECT	0x200	/* bypass page cache on read		*/
+#define PNODE_WDIRECT	0x400	/* bypass page cache on write		*/
 
 #define PNODE_METACACHE_ATIME	0x10	/* cache atime metadata */
 #define PNODE_METACACHE_CTIME	0x20	/* cache atime metadata */

Index: src/sys/fs/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.182 src/sys/fs/puffs/puffs_vnops.c:1.183
--- src/sys/fs/puffs/puffs_vnops.c:1.182	Fri Jul 25 08:20:52 2014
+++ src/sys/fs/puffs/puffs_vnops.c	Sat Aug 16 16:19:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.182 2014/07/25 08:20:52 dholland Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.183 2014/08/16 16:19:41 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.182 2014/07/25 08:20:52 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.183 2014/08/16 16:19:41 manu Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -893,6 +893,7 @@ puffs_vnop_open(void *v)
 	PUFFS_MSG_VARS(vn, open);
 	struct vnode *vp = ap-a_vp;
 	struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount);
+	struct puffs_node *pn = VPTOPP(vp);
 	int mode = ap-a_mode;
 	int error;
 
@@ -913,6 +914,12 @@ puffs_vnop_open(void *v)
 	PUFFS_MSG_ENQUEUEWAIT2(pmp, park_open, vp-v_data, NULL, error);
 	error = checkerr(pmp, error, __func__);
 
+	if (open_msg-pvnr_oflags  PUFFS_OPEN_IO_DIRECT) {
+		if (mode  FREAD)
+			pn-pn_stat |= PNODE_RDIRECT;
+		if (mode  FWRITE)
+			pn-pn_stat |= PNODE_WDIRECT;
+	}
  out:
 	DPRINTF((puffs_open: returning %d\n, error));
 	PUFFS_MSG_RELEASE(open);
@@ -2181,6 +2188,7 @@ puffs_vnop_read(void *v)
 	} */ *ap = v;
 	PUFFS_MSG_VARS(vn, read);
 	struct vnode *vp = ap-a_vp;
+	struct puffs_node *pn = VPTOPP(vp);
 	struct puffs_mount *pmp = MPTOPUFFSMP(vp-v_mount);
 	struct uio *uio = ap-a_uio;
 	size_t tomove, argsize;
@@ -2196,7 +2204,9 @@ puffs_vnop_read(void *v)
 	if (uio-uio_offset  0)
 		return EINVAL;
 
-	if (vp-v_type == VREG  PUFFS_USE_PAGECACHE(pmp)) {
+	if (vp-v_type == VREG 
+	PUFFS_USE_PAGECACHE(pmp) 
+	!(pn-pn_stat  PNODE_RDIRECT)) {
 		const int advice = IO_ADV_DECODE(ap-a_ioflag);
 
 		while (uio-uio_resid  0) {
@@ -2301,7 +2311,9 @@ puffs_vnop_write(void *v)
 
 	mutex_enter(pn-pn_sizemtx);
 
-	if (vp-v_type == VREG  PUFFS_USE_PAGECACHE(pmp)) {
+	if (vp-v_type == VREG  
+	PUFFS_USE_PAGECACHE(pmp) 
+	!(pn-pn_stat  PNODE_WDIRECT)) {
 		ubcflags = UBC_WRITE | UBC_PARTIALOK | UBC_UNMAP_FLAG(vp);
 
 		/*



CVS commit: src/lib/libc/time

2014-08-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 16 16:22:21 UTC 2014

Modified Files:
src/lib/libc/time: localtime.c private.h zdump.c zic.c

Log Message:
Reduce diffs with upstream by automatically defining INITIALIZE as it was
intended.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/lib/libc/time/localtime.c
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/time/private.h \
src/lib/libc/time/zdump.c
cvs rdiff -u -r1.48 -r1.49 src/lib/libc/time/zic.c

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

Modified files:

Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.84 src/lib/libc/time/localtime.c:1.85
--- src/lib/libc/time/localtime.c:1.84	Fri Aug 15 09:20:29 2014
+++ src/lib/libc/time/localtime.c	Sat Aug 16 12:22:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: localtime.c,v 1.84 2014/08/15 13:20:29 martin Exp $	*/
+/*	$NetBSD: localtime.c,v 1.85 2014/08/16 16:22:21 christos Exp $	*/
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char	elsieid[] = @(#)localtime.c	8.17;
 #else
-__RCSID($NetBSD: localtime.c,v 1.84 2014/08/15 13:20:29 martin Exp $);
+__RCSID($NetBSD: localtime.c,v 1.85 2014/08/16 16:22:21 christos Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -962,13 +962,6 @@ transtime(const int year, const struct r
 		for (i = 0; i  rulep-r_mon - 1; ++i)
 			value += mon_lengths[leapyear][i] * SECSPERDAY;
 		break;
-	default:
-		_DIAGASSERT(
-		rulep-r_type == JULIAN_DAY ||
-		rulep-r_type == DAY_OF_YEAR ||
-		rulep-r_type == MONTH_NTH_DAY_OF_WEEK);
-		value = 0;
-		break;
 	}
 
 	/*

Index: src/lib/libc/time/private.h
diff -u src/lib/libc/time/private.h:1.34 src/lib/libc/time/private.h:1.35
--- src/lib/libc/time/private.h:1.34	Fri Aug 15 07:04:07 2014
+++ src/lib/libc/time/private.h	Sat Aug 16 12:22:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: private.h,v 1.34 2014/08/15 11:04:07 christos Exp $	*/
+/*	$NetBSD: private.h,v 1.35 2014/08/16 16:22:21 christos Exp $	*/
 
 #ifndef PRIVATE_H
 #define PRIVATE_H
@@ -354,7 +354,7 @@ const char *	scheck(const char * string,
 ** INITIALIZE(x)
 */
 
-#ifdef lint
+#if defined(__GNUC__) || defined(__lint__)
 # define INITIALIZE(x)	((x) = 0)
 #else
 # define INITIALIZE(x)
Index: src/lib/libc/time/zdump.c
diff -u src/lib/libc/time/zdump.c:1.34 src/lib/libc/time/zdump.c:1.35
--- src/lib/libc/time/zdump.c:1.34	Fri Aug 15 07:04:07 2014
+++ src/lib/libc/time/zdump.c	Sat Aug 16 12:22:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zdump.c,v 1.34 2014/08/15 11:04:07 christos Exp $	*/
+/*	$NetBSD: zdump.c,v 1.35 2014/08/16 16:22:21 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2009-05-17 by Arthur David Olson.
@@ -6,7 +6,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: zdump.c,v 1.34 2014/08/15 11:04:07 christos Exp $);
+__RCSID($NetBSD: zdump.c,v 1.35 2014/08/16 16:22:21 christos Exp $);
 #endif /* !defined lint */
 
 #include version.h
@@ -175,11 +175,11 @@ enum { SECSPER400YEARS_FITS = SECSPERLYE
 #endif
 
 #ifndef INITIALIZE
-#ifdef GNUC_or_lint
+#if defined(__GNUC__) || defined(__lint__)
 #define INITIALIZE(x)	((x) = 0)
-#else /* !defined GNUC_or_lint */
+#else /* !defined GNUC || lint */
 #define INITIALIZE(x)
-#endif /* !defined GNUC_or_lint */
+#endif /* !defined GNUC || lint */
 #endif /* !defined INITIALIZE */
 
 /*

Index: src/lib/libc/time/zic.c
diff -u src/lib/libc/time/zic.c:1.48 src/lib/libc/time/zic.c:1.49
--- src/lib/libc/time/zic.c:1.48	Sat Aug 16 06:38:43 2014
+++ src/lib/libc/time/zic.c	Sat Aug 16 12:22:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: zic.c,v 1.48 2014/08/16 10:38:43 christos Exp $	*/
+/*	$NetBSD: zic.c,v 1.49 2014/08/16 16:22:21 christos Exp $	*/
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: zic.c,v 1.48 2014/08/16 10:38:43 christos Exp $);
+__RCSID($NetBSD: zic.c,v 1.49 2014/08/16 16:22:21 christos Exp $);
 #endif /* !defined lint */
 
 #include version.h
@@ -2176,7 +2176,6 @@ outzone(const struct zone *const zpfirst
 	envvar = emalloc(max_envvar_len + 1);
 	INITIALIZE(untiltime);
 	INITIALIZE(starttime);
-	starttime = 0; /* XXX: gcc */
 	/*
 	** Now. . .finally. . .generate some useful data!
 	*/
@@ -2318,7 +2317,7 @@ outzone(const struct zone *const zpfirst
 zic_t	offset;
 
 INITIALIZE(ktime);
-ktime = 0; /* XXX: gcc */
+ktime = 0;
 if (useuntil) {
 	/*
 	** Turn untiltime into UT
@@ -2332,8 +2331,7 @@ outzone(const struct zone *const zpfirst
 	if (!zp-z_untilrule.r_todisstd)
 		untiltime = tadd(untiltime,
 			-stdoff);
-} else
-	untiltime = 0;	/* XXX: gcc */
+}
 /*
 ** Find the rule (of those to do, if any)
 ** that takes effect earliest in the year.



CVS commit: src/lib/libpuffs

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:25:44 UTC 2014

Modified Files:
src/lib/libpuffs: dispatcher.c puffs.h puffs_ops.3

Log Message:
Add an open2 method, like open but with an additionnal oflags used
by the filesystem to send back information about the file.
This is used to implement PUFFS_OPEN_IO_DIRECT by which the filesystem
tells the kernel that read/write should bypass the page cache.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libpuffs/dispatcher.c
cvs rdiff -u -r1.124 -r1.125 src/lib/libpuffs/puffs.h
cvs rdiff -u -r1.36 -r1.37 src/lib/libpuffs/puffs_ops.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/libpuffs/dispatcher.c
diff -u src/lib/libpuffs/dispatcher.c:1.46 src/lib/libpuffs/dispatcher.c:1.47
--- src/lib/libpuffs/dispatcher.c:1.46	Wed Nov  6 19:56:38 2013
+++ src/lib/libpuffs/dispatcher.c	Sat Aug 16 16:25:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatcher.c,v 1.46 2013/11/06 19:56:38 christos Exp $	*/
+/*	$NetBSD: dispatcher.c,v 1.47 2014/08/16 16:25:44 manu Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: dispatcher.c,v 1.46 2013/11/06 19:56:38 christos Exp $);
+__RCSID($NetBSD: dispatcher.c,v 1.47 2014/08/16 16:25:44 manu Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -412,6 +412,14 @@ dispatch(struct puffs_cc *pcc)
 			struct puffs_vnmsg_open *auxt = auxbuf;
 			PUFFS_MAKECRED(pcr, auxt-pvnr_cred);
 
+			if (pops-puffs_node_open2 != NULL) {
+error = pops-puffs_node_open2(pu,
+opcookie, auxt-pvnr_mode, pcr, 
+auxt-pvnr_oflags);
+
+break;
+			}
+
 			if (pops-puffs_node_open == NULL) {
 error = 0;
 break;

Index: src/lib/libpuffs/puffs.h
diff -u src/lib/libpuffs/puffs.h:1.124 src/lib/libpuffs/puffs.h:1.125
--- src/lib/libpuffs/puffs.h:1.124	Thu Aug 16 09:25:44 2012
+++ src/lib/libpuffs/puffs.h	Sat Aug 16 16:25:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.h,v 1.124 2012/08/16 09:25:44 manu Exp $	*/
+/*	$NetBSD: puffs.h,v 1.125 2014/08/16 16:25:44 manu Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -250,6 +250,8 @@ struct puffs_ops {
 	uint8_t *, off_t, size_t *, const struct puffs_cred *, int, int);
 	int (*puffs_node_reclaim2)(struct puffs_usermount *,
 	puffs_cookie_t, int);
+	int (*puffs_node_open2)(struct puffs_usermount *,
+	puffs_cookie_t, int, const struct puffs_cred *, int *);
 
 	void *puffs_ops_spare[28];
 };
@@ -410,7 +412,9 @@ enum {
 	puffs_cookie_t, uint8_t *, off_t, size_t *,			\
 	const struct puffs_cred *, int, int);			\
 	int fsname##_node_reclaim2(struct puffs_usermount *,		\
-	puffs_cookie_t, int);
+	puffs_cookie_t, int);	\
+	int fsname##_node_open2(struct puffs_usermount *,		\
+	puffs_cookie_t, int, const struct puffs_cred *, int *);
 
 
 #define PUFFSOP_INIT(ops)		\

Index: src/lib/libpuffs/puffs_ops.3
diff -u src/lib/libpuffs/puffs_ops.3:1.36 src/lib/libpuffs/puffs_ops.3:1.37
--- src/lib/libpuffs/puffs_ops.3:1.36	Thu Aug 16 11:28:38 2012
+++ src/lib/libpuffs/puffs_ops.3	Sat Aug 16 16:25:44 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: puffs_ops.3,v 1.36 2012/08/16 11:28:38 wiz Exp $
+.\	$NetBSD: puffs_ops.3,v 1.37 2014/08/16 16:25:44 manu Exp $
 .\
 .\ Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\
@@ -83,6 +83,11 @@
 .Fa const struct puffs_cred *pcr
 .Fc
 .Ft int
+.Fo puffs_node_open2
+.Fa struct puffs_usermount *pu puffs_cookie_t opc int modep
+.Fa const struct puffs_cred *pcr int *oflags
+.Fc
+.Ft int
 .Fo puffs_node_close
 .Fa struct puffs_usermount *pu puffs_cookie_t opc int flags
 .Fa const struct puffs_cred *pcr
@@ -481,6 +486,7 @@ file, directory and device special file,
 In case of mknod, the device identifier can be found in
 .Fa va-\*[Gt]va_rdev .
 .It Fn puffs_node_open pu opc mode pcr
+.It Fn puffs_node_open2 pu opc mode pcr oflags
 Open the node denoted by the cookie
 .Fa opc .
 The parameter
@@ -491,6 +497,12 @@ was called with, e.g.
 .Dv O_APPEND
 and
 .Dv O_NONBLOCK .
+.Fn puffs_node_open2
+allows the filesystem to pass back information for the file in
+.Fa oflags .
+The only implemented flag for now is
+.Dv PUFFS_OPEN_IO_DIRECT
+that cause file read/write to bypass the page cache.
 .It Fn puffs_node_close pu opc flags pcr
 Close a node.
 The parameter



CVS commit: src/lib/libperfuse

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:28:43 UTC 2014

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_priv.h

Log Message:
Use just introduced open2 PUFFS method and its PUFFS_OPEN_IO_DIRECT oflag
to implement FUSE's OPEN_IO_DIRECT, by which the filesystem tells the kernel
that read/write to the file should bypass the page cache.

Remove a warning about read beyond EOF which will now normally appear when
page cache is bypassed.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libperfuse/perfuse_priv.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/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.66 src/lib/libperfuse/ops.c:1.67
--- src/lib/libperfuse/ops.c:1.66	Sun Aug 10 03:22:33 2014
+++ src/lib/libperfuse/ops.c	Sat Aug 16 16:28:43 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.66 2014/08/10 03:22:33 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.67 2014/08/16 16:28:43 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1338,6 +1338,13 @@ int
 perfuse_node_open(struct puffs_usermount *pu, puffs_cookie_t opc, int mode,
 	const struct puffs_cred *pcr)
 {
+	return perfuse_node_open2(pu, opc, mode, pcr, NULL);
+}
+
+int
+perfuse_node_open2(struct puffs_usermount *pu, puffs_cookie_t opc, int mode,
+	const struct puffs_cred *pcr, int *oflags)
+{
 	struct perfuse_state *ps;
 	struct perfuse_node_data *pnd;
 	perfuse_msg_t *pm;
@@ -1439,6 +1446,12 @@ perfuse_node_open(struct puffs_usermount
 	 */
 	perfuse_new_fh(opc, foo-fh, mode);
 
+	/*
+	 * Set direct I/O if the filesystems forces it
+	 */
+	if ((foo-open_flags  FUSE_FOPEN_DIRECT_IO)  (oflags != NULL))
+		*oflags |= PUFFS_OPEN_IO_DIRECT;
+
 #ifdef PERFUSE_DEBUG
 	if (perfuse_diagflags  (PDF_FH|PDF_FILENAME))
 		DPRINTF(%s: opc = %p, file = \%s\, 
@@ -3031,11 +3044,6 @@ perfuse_node_read(struct puffs_usermount
 	if (vap-va_type == VDIR)
 		return EISDIR;
 
-	if ((u_quad_t)offset + *resid  vap-va_size)
-		DWARNX(%s %p read %lld@%zu beyond EOF % PRIu64 \n,
-		   __func__, (void *)opc, (long long)offset,
-		   *resid, vap-va_size);
-
 	do {
 		size_t max_read;
 

Index: src/lib/libperfuse/perfuse.c
diff -u src/lib/libperfuse/perfuse.c:1.31 src/lib/libperfuse/perfuse.c:1.32
--- src/lib/libperfuse/perfuse.c:1.31	Mon Sep 10 13:56:18 2012
+++ src/lib/libperfuse/perfuse.c	Sat Aug 16 16:28:43 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse.c,v 1.31 2012/09/10 13:56:18 manu Exp $ */
+/*  $NetBSD: perfuse.c,v 1.32 2014/08/16 16:28:43 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -503,6 +503,9 @@ perfuse_init(struct perfuse_callbacks *p
 #ifdef PUFFS_SETATTR_FAF
 	PUFFSOP_SET(pops, perfuse, node, write2);
 #endif /* PUFFS_SETATTR_FAF */
+#ifdef PUFFS_OPEN_IO_DIRECT 
+	PUFFSOP_SET(pops, perfuse, node, open2);
+#endif /* PUFFS_OPEN_IO_DIRECT */
 
 	/*
 	 * PUFFS_KFLAG_NOCACHE_NAME is required so that we can see changes

Index: src/lib/libperfuse/perfuse_priv.h
diff -u src/lib/libperfuse/perfuse_priv.h:1.32 src/lib/libperfuse/perfuse_priv.h:1.33
--- src/lib/libperfuse/perfuse_priv.h:1.32	Sun Aug 10 03:22:33 2014
+++ src/lib/libperfuse/perfuse_priv.h	Sat Aug 16 16:28:43 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse_priv.h,v 1.32 2014/08/10 03:22:33 manu Exp $ */
+/*  $NetBSD: perfuse_priv.h,v 1.33 2014/08/16 16:28:43 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -262,6 +262,8 @@ int perfuse_node_write(struct puffs_user
 uint8_t *, off_t, size_t *, const struct puffs_cred *, int);
 int perfuse_node_write2(struct puffs_usermount *, puffs_cookie_t,
 uint8_t *, off_t, size_t *, const struct puffs_cred *, int, int);
+int perfuse_node_open2(struct puffs_usermount *,
+puffs_cookie_t, int, const struct puffs_cred *, int *);
 void perfuse_cache_write(struct puffs_usermount *,
 puffs_cookie_t, size_t, struct puffs_cacherun *);
 int perfuse_node_getextattr(struct puffs_usermount *, puffs_cookie_t,



CVS commit: src/usr.sbin/perfused

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:32:04 UTC 2014

Modified Files:
src/usr.sbin/perfused: msg.c

Log Message:
Remove a warning that happens when the filesystem cleanly exits. Just
display a message when running in debug mode.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/perfused/msg.c

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

Modified files:

Index: src/usr.sbin/perfused/msg.c
diff -u src/usr.sbin/perfused/msg.c:1.21 src/usr.sbin/perfused/msg.c:1.22
--- src/usr.sbin/perfused/msg.c:1.21	Sat Jul 21 05:49:42 2012
+++ src/usr.sbin/perfused/msg.c	Sat Aug 16 16:32:04 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: msg.c,v 1.21 2012/07/21 05:49:42 manu Exp $ */
+/*  $NetBSD: msg.c,v 1.22 2014/08/16 16:32:04 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -493,7 +493,10 @@ perfused_readframe(struct puffs_usermoun
 
 	switch (readen = recv(fd, data, len, MSG_NOSIGNAL|MSG_PEEK)) {
 	case 0:
-		perfused_panic();
+		DPRINTF(Filesystem exit\n);
+		/* NOTREACHED */
+		exit(0);
+		break;
 	case -1:
 		if (errno == EAGAIN)
 			return 0;



CVS commit: src/lib/libperfuse

2014-08-16 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Aug 16 16:31:16 UTC 2014

Modified Files:
src/lib/libperfuse: ops.c perfuse.c perfuse_priv.h

Log Message:
Removed unimplemented mmap and seek method. seek's declaration caused
seek request to be passed backand forth between kernel and userland
while we did nothing about them.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/lib/libperfuse/ops.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libperfuse/perfuse.c
cvs rdiff -u -r1.33 -r1.34 src/lib/libperfuse/perfuse_priv.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/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.67 src/lib/libperfuse/ops.c:1.68
--- src/lib/libperfuse/ops.c:1.67	Sat Aug 16 16:28:43 2014
+++ src/lib/libperfuse/ops.c	Sat Aug 16 16:31:15 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.67 2014/08/16 16:28:43 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.68 2014/08/16 16:31:15 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1960,17 +1960,6 @@ out:
 	return error;
 }
 
-/* ARGSUSED0 */
-int
-perfuse_node_mmap(struct puffs_usermount *pu, puffs_cookie_t opc, int flags,
-	const struct puffs_cred *pcr)
-{
-	/* 
-	 * Not implemented anymore in libfuse
-	 */
-	return ENOSYS;
-}
-
 /* ARGSUSED2 */
 int
 perfuse_node_fsync(struct puffs_usermount *pu, puffs_cookie_t opc,
@@ -2085,14 +2074,6 @@ out:
 	return error;
 }
 
-/* ARGSUSED0 */
-int
-perfuse_node_seek(struct puffs_usermount *pu, puffs_cookie_t opc,
-	off_t oldoff, off_t newoff, const struct puffs_cred *pcr)
-{
-	return 0;
-}
-
 int
 perfuse_node_remove(struct puffs_usermount *pu, puffs_cookie_t opc,
 	puffs_cookie_t targ, const struct puffs_cn *pcn)

Index: src/lib/libperfuse/perfuse.c
diff -u src/lib/libperfuse/perfuse.c:1.32 src/lib/libperfuse/perfuse.c:1.33
--- src/lib/libperfuse/perfuse.c:1.32	Sat Aug 16 16:28:43 2014
+++ src/lib/libperfuse/perfuse.c	Sat Aug 16 16:31:15 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse.c,v 1.32 2014/08/16 16:28:43 manu Exp $ */
+/*  $NetBSD: perfuse.c,v 1.33 2014/08/16 16:31:15 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -471,11 +471,7 @@ perfuse_init(struct perfuse_callbacks *p
 	PUFFSOP_SET(pops, perfuse, node, getattr);
 	PUFFSOP_SET(pops, perfuse, node, setattr);
 	PUFFSOP_SET(pops, perfuse, node, poll);
-#if 0 
-	PUFFSOP_SET(pops, perfuse, node, mmap);
-#endif
 	PUFFSOP_SET(pops, perfuse, node, fsync);
-	PUFFSOP_SET(pops, perfuse, node, seek);
 	PUFFSOP_SET(pops, perfuse, node, remove);
 	PUFFSOP_SET(pops, perfuse, node, link);
 	PUFFSOP_SET(pops, perfuse, node, rename);

Index: src/lib/libperfuse/perfuse_priv.h
diff -u src/lib/libperfuse/perfuse_priv.h:1.33 src/lib/libperfuse/perfuse_priv.h:1.34
--- src/lib/libperfuse/perfuse_priv.h:1.33	Sat Aug 16 16:28:43 2014
+++ src/lib/libperfuse/perfuse_priv.h	Sat Aug 16 16:31:15 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse_priv.h,v 1.33 2014/08/16 16:28:43 manu Exp $ */
+/*  $NetBSD: perfuse_priv.h,v 1.34 2014/08/16 16:31:15 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -223,12 +223,8 @@ int perfuse_node_getattr(struct puffs_us
 int perfuse_node_setattr(struct puffs_usermount *,
 puffs_cookie_t, const struct vattr *, const struct puffs_cred *);
 int perfuse_node_poll(struct puffs_usermount *, puffs_cookie_t, int *);
-int perfuse_node_mmap(struct puffs_usermount *,
-puffs_cookie_t, vm_prot_t, const struct puffs_cred *);
 int perfuse_node_fsync(struct puffs_usermount *,
 puffs_cookie_t, const struct puffs_cred *, int, off_t, off_t);
-int perfuse_node_seek(struct puffs_usermount *,
-puffs_cookie_t, off_t, off_t, const struct puffs_cred *);
 int perfuse_node_remove(struct puffs_usermount *,
 puffs_cookie_t, puffs_cookie_t, const struct puffs_cn *);
 int perfuse_node_link(struct puffs_usermount *,



CVS commit: src/sys

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 17:24:29 UTC 2014

Modified Files:
src/sys/compat/netbsd32: syscalls.conf
src/sys/conf: files
src/sys/kern: syscalls.conf

Log Message:
Add COMPAT_70 to conf/files; add compat_70 to kern/syscalls.conf
and compat/netbsd32/syscalls.conf.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/netbsd32/syscalls.conf
cvs rdiff -u -r1.1096 -r1.1097 src/sys/conf/files
cvs rdiff -u -r1.20 -r1.21 src/sys/kern/syscalls.conf

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/netbsd32/syscalls.conf
diff -u src/sys/compat/netbsd32/syscalls.conf:1.12 src/sys/compat/netbsd32/syscalls.conf:1.13
--- src/sys/compat/netbsd32/syscalls.conf:1.12	Fri Mar 29 01:04:30 2013
+++ src/sys/compat/netbsd32/syscalls.conf	Sat Aug 16 17:24:29 2014
@@ -1,10 +1,10 @@
-#	$NetBSD: syscalls.conf,v 1.12 2013/03/29 01:04:30 christos Exp $
+#	$NetBSD: syscalls.conf,v 1.13 2014/08/16 17:24:29 apb Exp $
 
 sysnames=netbsd32_syscalls.c
 sysnumhdr=netbsd32_syscall.h
 syssw=netbsd32_sysent.c
 sysarghdr=netbsd32_syscallargs.h
-compatopts=compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60
+compatopts=compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60 compat_70
 libcompatopts=
 
 switchname=netbsd32_sysent

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1096 src/sys/conf/files:1.1097
--- src/sys/conf/files:1.1096	Sun Aug 10 16:44:35 2014
+++ src/sys/conf/files	Sat Aug 16 17:24:28 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1096 2014/08/10 16:44:35 tls Exp $
+#	$NetBSD: files,v 1.1097 2014/08/16 17:24:28 apb Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -122,7 +122,8 @@ defflag opt_rnd_printf.h	RND_PRINTF
 # compatibility options
 #
 defflag opt_compat_netbsd.h	COMPAT_NETBSD
-defflag	opt_compat_netbsd.h	COMPAT_60: COMPAT_NETBSD
+defflag	opt_compat_netbsd.h	COMPAT_70: COMPAT_NETBSD
+defflag	opt_compat_netbsd.h	COMPAT_60: COMPAT_70, COMPAT_NETBSD
 defflag	opt_compat_netbsd.h	COMPAT_50: COMPAT_60, COMPAT_NETBSD
 defflag	opt_compat_netbsd.h	COMPAT_40: COMPAT_50, COMPAT_NETBSD
 defflag	opt_compat_netbsd.h	COMPAT_30: COMPAT_40, COMPAT_NETBSD

Index: src/sys/kern/syscalls.conf
diff -u src/sys/kern/syscalls.conf:1.20 src/sys/kern/syscalls.conf:1.21
--- src/sys/kern/syscalls.conf:1.20	Sun Apr 27 14:50:23 2014
+++ src/sys/kern/syscalls.conf	Sat Aug 16 17:24:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: syscalls.conf,v 1.20 2014/04/27 14:50:23 pooka Exp $
+#	$NetBSD: syscalls.conf,v 1.21 2014/08/16 17:24:29 apb Exp $
 
 sysnames=syscalls.c
 sysnumhdr=../sys/syscall.h
@@ -9,7 +9,7 @@ sysalign=1
 rumpcalls=../rump/librump/rumpkern/rump_syscalls.c
 rumpcallshdr=../rump/include/rump/rump_syscalls.h
 rumpsysmap=../rump/rump.sysmap
-compatopts=compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60
+compatopts=compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60 compat_70
 libcompatopts=
 
 switchname=sysent



CVS commit: src/sys/netinet6

2014-08-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 16 17:27:09 UTC 2014

Modified Files:
src/sys/netinet6: ip6_output.c

Log Message:
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-2

#03-0x02: Memory leak

ok ozaki-r@


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/netinet6/ip6_output.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/netinet6/ip6_output.c
diff -u src/sys/netinet6/ip6_output.c:1.157 src/sys/netinet6/ip6_output.c:1.158
--- src/sys/netinet6/ip6_output.c:1.157	Fri May 30 01:39:03 2014
+++ src/sys/netinet6/ip6_output.c	Sat Aug 16 17:27:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.157 2014/05/30 01:39:03 christos Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.158 2014/08/16 17:27:09 maxv Exp $	*/
 /*	$KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip6_output.c,v 1.157 2014/05/30 01:39:03 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip6_output.c,v 1.158 2014/08/16 17:27:09 maxv Exp $);
 
 #include opt_inet.h
 #include opt_inet6.h
@@ -1601,6 +1601,8 @@ else 	\
 			optp = in6p-in6p_outputopts;
 			error = ip6_pcbopt(optname, optbuf, optbuflen,
 			optp, kauth_cred_get(), uproto);
+
+			free(optbuf, M_IP6OPT);
 			break;
 			}
 #undef OPTSET



CVS commit: src/sys/arch

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 17:57:02 UTC 2014

Modified Files:
src/sys/arch/mac68k/conf: SMALLRAM
src/sys/arch/zaurus/conf: INSTALL

Log Message:
Add no options COMPAT_70 to all kernel configuration files that
already had no options COMPAT_60.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/mac68k/conf/SMALLRAM
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/zaurus/conf/INSTALL

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/mac68k/conf/SMALLRAM
diff -u src/sys/arch/mac68k/conf/SMALLRAM:1.40 src/sys/arch/mac68k/conf/SMALLRAM:1.41
--- src/sys/arch/mac68k/conf/SMALLRAM:1.40	Wed Oct 17 14:48:41 2012
+++ src/sys/arch/mac68k/conf/SMALLRAM	Sat Aug 16 17:57:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: SMALLRAM,v 1.40 2012/10/17 14:48:41 apb Exp $
+#	$NetBSD: SMALLRAM,v 1.41 2014/08/16 17:57:02 apb Exp $
 #
 # This is an example of how to configure a small, efficient kernel for
 # a system with limited RAM. Even so it's capable of doing quite a
@@ -43,6 +43,7 @@ no options 	COMPAT_40
 no options 	COMPAT_43
 no options 	COMPAT_50
 no options 	COMPAT_60
+no options 	COMPAT_70
 
 no options 	COMPAT_AOUT_M68K
 no options 	EXEC_AOUT

Index: src/sys/arch/zaurus/conf/INSTALL
diff -u src/sys/arch/zaurus/conf/INSTALL:1.22 src/sys/arch/zaurus/conf/INSTALL:1.23
--- src/sys/arch/zaurus/conf/INSTALL:1.22	Mon Aug  4 20:59:19 2014
+++ src/sys/arch/zaurus/conf/INSTALL	Sat Aug 16 17:57:02 2014
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.22 2014/08/04 20:59:19 martin Exp $
+# $NetBSD: INSTALL,v 1.23 2014/08/16 17:57:02 apb Exp $
 #
 # INSTALL config file (GENERIC with memory disk root)
 #
@@ -43,6 +43,7 @@ no options		COMPAT_30
 no options		COMPAT_40
 no options		COMPAT_50
 no options		COMPAT_60
+no options		COMPAT_70
 no options		COMPAT_43
 
 no options 		COMPAT_OSSAUDIO



CVS commit: src/sys/arch

2014-08-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Aug 16 17:57:37 UTC 2014

Modified Files:
src/sys/arch/hp300/conf: INSTALL
src/sys/arch/luna68k/conf: INSTALL
src/sys/arch/news68k/conf: INSTALL

Log Message:
Add commented out #options COMPAT_70 to all kernel configuration
files that already had commented out #options COMPAT_60.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/hp300/conf/INSTALL
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/luna68k/conf/INSTALL
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/news68k/conf/INSTALL

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/hp300/conf/INSTALL
diff -u src/sys/arch/hp300/conf/INSTALL:1.58 src/sys/arch/hp300/conf/INSTALL:1.59
--- src/sys/arch/hp300/conf/INSTALL:1.58	Wed Apr 30 17:51:53 2014
+++ src/sys/arch/hp300/conf/INSTALL	Sat Aug 16 17:57:37 2014
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.58 2014/04/30 17:51:53 tsutsui Exp $
+# $NetBSD: INSTALL,v 1.59 2014/08/16 17:57:37 apb Exp $
 #
 # INSTALL machine description file
 #
@@ -57,6 +57,7 @@ maxusers	32
 #options 	COMPAT_40	# compatibility with NetBSD 4.0
 #options 	COMPAT_50	# compatibility with NetBSD 5.0
 #options 	COMPAT_60	# NetBSD 6.0 compatibility.
+#options 	COMPAT_70	# NetBSD 7.0 compatibility.
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 #options 	SYSVSHM		# System V-style shared memory

Index: src/sys/arch/luna68k/conf/INSTALL
diff -u src/sys/arch/luna68k/conf/INSTALL:1.16 src/sys/arch/luna68k/conf/INSTALL:1.17
--- src/sys/arch/luna68k/conf/INSTALL:1.16	Tue Aug  5 15:52:38 2014
+++ src/sys/arch/luna68k/conf/INSTALL	Sat Aug 16 17:57:37 2014
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.16 2014/08/05 15:52:38 martin Exp $
+# $NetBSD: INSTALL,v 1.17 2014/08/16 17:57:37 apb Exp $
 #
 # config for installation ramdisk kernel
 # 
@@ -55,6 +55,7 @@ options 	PIPE_SOCKETPAIR		# smaller, but
 #options 	COMPAT_40	# NetBSD 4.0 compatibility.
 #options 	COMPAT_50	# NetBSD 5.0 compatibility.
 #options 	COMPAT_60	# NetBSD 6.0 compatibility.
+#options 	COMPAT_70	# NetBSD 7.0 compatibility.
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
 #options 	COMPAT_AOUT_M68K # support for NetBSD a.out executables
 #options 	EXEC_AOUT	# support for a.out executables

Index: src/sys/arch/news68k/conf/INSTALL
diff -u src/sys/arch/news68k/conf/INSTALL:1.59 src/sys/arch/news68k/conf/INSTALL:1.60
--- src/sys/arch/news68k/conf/INSTALL:1.59	Sun Jun 30 21:38:58 2013
+++ src/sys/arch/news68k/conf/INSTALL	Sat Aug 16 17:57:37 2014
@@ -1,4 +1,4 @@
-# 	$NetBSD: INSTALL,v 1.59 2013/06/30 21:38:58 rmind Exp $
+# 	$NetBSD: INSTALL,v 1.60 2014/08/16 17:57:37 apb Exp $
 
 #	config for bootable floppy kernel
 #
@@ -48,6 +48,7 @@ options 	PIPE_SOCKETPAIR		# smaller, but
 #options 	COMPAT_40		# NetBSD 4.0 binary compatibility.
 #options 	COMPAT_50		# NetBSD 5.0 binary compatibility.
 #options 	COMPAT_60		# NetBSD 6.0 compatibility.
+#options 	COMPAT_70		# NetBSD 7.0 compatibility.
 options 	COMPAT_BSDPTY		# /dev/[pt]ty?? ptys.
 
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.



CVS commit: src

2014-08-16 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Sat Aug 16 19:27:27 UTC 2014

Modified Files:
src/sbin/ccdconfig: ccdconfig.c
src/sys/dev: ccd.c ccdvar.h

Log Message:
Switch size_t to uint64_t in appropriate places to ensure that ccd(4) works
with component and total sizes of  2TB.
Add COMPAT_60 code for platforms where this alters userland-accessible
structures.
Make kernel print device information when a ccd configured.
Fix some typos in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sbin/ccdconfig/ccdconfig.c
cvs rdiff -u -r1.151 -r1.152 src/sys/dev/ccd.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ccdvar.h

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

Modified files:

Index: src/sbin/ccdconfig/ccdconfig.c
diff -u src/sbin/ccdconfig/ccdconfig.c:1.53 src/sbin/ccdconfig/ccdconfig.c:1.54
--- src/sbin/ccdconfig/ccdconfig.c:1.53	Fri May  3 00:01:15 2013
+++ src/sbin/ccdconfig/ccdconfig.c	Sat Aug 16 19:27:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccdconfig.c,v 1.53 2013/05/03 00:01:15 christos Exp $	*/
+/*	$NetBSD: ccdconfig.c,v 1.54 2014/08/16 19:27:27 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 1996, 1997\
  The NetBSD Foundation, Inc.  All rights reserved.);
-__RCSID($NetBSD: ccdconfig.c,v 1.53 2013/05/03 00:01:15 christos Exp $);
+__RCSID($NetBSD: ccdconfig.c,v 1.54 2014/08/16 19:27:27 sborrill Exp $);
 #endif
 
 #include sys/param.h
@@ -271,7 +271,7 @@ do_single(int argc, char **argv, int act
 			ui == 0 ? '(' : ' ', cp2,
 			ui == ccio.ccio_ndisks - 1 ? ')' : ',');
 		}
-		printf(, %ld blocks , (long)ccio.ccio_size);
+		printf(, %ju blocks , (uintmax_t)ccio.ccio_size);
 		if (ccio.ccio_ileave != 0)
 			printf(interleaved at %d blocks\n, ccio.ccio_ileave);
 		else

Index: src/sys/dev/ccd.c
diff -u src/sys/dev/ccd.c:1.151 src/sys/dev/ccd.c:1.152
--- src/sys/dev/ccd.c:1.151	Fri Jul 25 08:10:35 2014
+++ src/sys/dev/ccd.c	Sat Aug 16 19:27:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccd.c,v 1.151 2014/07/25 08:10:35 dholland Exp $	*/
+/*	$NetBSD: ccd.c,v 1.152 2014/08/16 19:27:27 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ccd.c,v 1.151 2014/07/25 08:10:35 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: ccd.c,v 1.152 2014/08/16 19:27:27 sborrill Exp $);
+
+#if defined(_KERNEL_OPT)
+#include opt_compat_netbsd.h
+#endif
 
 #include sys/param.h
 #include sys/systm.h
@@ -426,6 +430,22 @@ ccdinit(struct ccd_softc *cs, char **cpa
 	ccg-ccg_ntracks = 1;
 	ccg-ccg_nsectors = 1024 * (1024 / ccg-ccg_secsize);
 	ccg-ccg_ncylinders = cs-sc_size / ccg-ccg_nsectors;
+	
+	if (cs-sc_ileave  0)
+	aprint_normal(%s: Interleaving %d component%s 
+	(%d block interleave)\n, cs-sc_xname,
+	cs-sc_nccdisks, (cs-sc_nccdisks != 0 ? s : ),
+	cs-sc_ileave);
+	else
+	aprint_normal(%s: Concatenating %d component%s\n,
+	cs-sc_xname,
+	cs-sc_nccdisks, (cs-sc_nccdisks != 0 ? s : ));
+	for (ix = 0; ix  cs-sc_nccdisks; ix++) {
+		ci = cs-sc_cinfo[ix];
+		aprint_normal(%s: %s (%ju blocks)\n, cs-sc_xname,
+		ci-ci_path, (uintmax_t)ci-ci_size);
+	}
+	aprint_normal(%s: total %ju blocks\n, cs-sc_xname, cs-sc_size);
 
 	/*
 	 * Create thread to handle deferred I/O.
@@ -1053,6 +1073,46 @@ ccdioctl(dev_t dev, u_long cmd, void *da
 		return ENOENT;
 	uc = kauth_cred_get();
 
+/*
+ * Compat code must not be called if on a platform where
+ * sizeof (size_t) == sizeof (uint64_t) as CCDIOCSET will
+ * be the same as CCDIOCSET_60
+ */
+#if defined(COMPAT_60)  !defined(_LP64)
+	switch (cmd) {
+	case CCDIOCSET_60: {
+		struct ccd_ioctl ccionew;
+   		struct ccd_ioctl_60 *ccio60 =
+   		(struct ccd_ioctl_60 *)data;
+		ccionew.ccio_disks = ccio-ccio_disks;
+		ccionew.ccio_ndisks = ccio-ccio_ndisks;
+		ccionew.ccio_ileave = ccio-ccio_ileave;
+		ccionew.ccio_flags = ccio-ccio_flags;
+		ccionew.ccio_unit = ccio-ccio_unit;
+		error = ccdioctl(dev, CCDIOCSET, ccionew, flag, l);
+		if (!error) {
+			/* Copy data back, adjust types if necessary */
+			ccio60-ccio_disks = ccionew.ccio_disks;
+			ccio60-ccio_ndisks = ccionew.ccio_ndisks;
+			ccio60-ccio_ileave = ccionew.ccio_ileave;
+			ccio60-ccio_flags = ccionew.ccio_flags;
+			ccio60-ccio_unit = ccionew.ccio_unit;
+			ccio60-ccio_size = (size_t)ccionew.ccio_size;
+		}
+		return error;
+		}
+		break;
+
+	case CCDIOCCLR_60:
+		/*
+		 * ccio_size member not used, so existing struct OK
+		 * drop through to existing non-compat version
+		 */
+		cmd = CCDIOCCLR;
+		break;
+	}
+#endif /* COMPAT_60  !_LP64*/
+
 	/* Must be open for writes for these commands... */
 	switch (cmd) {
 	case CCDIOCSET:
@@ -1120,7 +1180,7 @@ ccdioctl(dev_t dev, u_long cmd, void *da
 
 		/*
 		 * Allocate 

CVS commit: src/lib/libpuffs

2014-08-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug 16 21:50:15 UTC 2014

Modified Files:
src/lib/libpuffs: puffs_ops.3

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/lib/libpuffs/puffs_ops.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/libpuffs/puffs_ops.3
diff -u src/lib/libpuffs/puffs_ops.3:1.37 src/lib/libpuffs/puffs_ops.3:1.38
--- src/lib/libpuffs/puffs_ops.3:1.37	Sat Aug 16 16:25:44 2014
+++ src/lib/libpuffs/puffs_ops.3	Sat Aug 16 21:50:15 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: puffs_ops.3,v 1.37 2014/08/16 16:25:44 manu Exp $
+.\	$NetBSD: puffs_ops.3,v 1.38 2014/08/16 21:50:15 wiz Exp $
 .\
 .\ Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd August 16, 2012
+.Dd August 16, 2014
 .Dt PUFFS_OPS 3
 .Os
 .Sh NAME



CVS commit: [netbsd-7] src/sys/rump/net/lib/libshmif

2014-08-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Aug 17 03:26:51 UTC 2014

Modified Files:
src/sys/rump/net/lib/libshmif [netbsd-7]: if_shmem.c shmifvar.h

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #28):
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.8
sys/rump/net/lib/libshmif/if_shmem.c: revision 1.63
sys/rump/net/lib/libshmif/shmifvar.h: revision 1.9
Make shmif SIMPLEX
Add a sender field to a packet header on a shmif bus to identify
and ignore packets sent by itself.
This makes shmif work with bridges.
ok pooka@
Bump SHMIF_VERSION


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.62.2.1 src/sys/rump/net/lib/libshmif/if_shmem.c
cvs rdiff -u -r1.7 -r1.7.4.1 src/sys/rump/net/lib/libshmif/shmifvar.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/rump/net/lib/libshmif/if_shmem.c
diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.62 src/sys/rump/net/lib/libshmif/if_shmem.c:1.62.2.1
--- src/sys/rump/net/lib/libshmif/if_shmem.c:1.62	Sat Aug  9 09:43:49 2014
+++ src/sys/rump/net/lib/libshmif/if_shmem.c	Sun Aug 17 03:26:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_shmem.c,v 1.62 2014/08/09 09:43:49 ozaki-r Exp $	*/
+/*	$NetBSD: if_shmem.c,v 1.62.2.1 2014/08/17 03:26:51 riz Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.62 2014/08/09 09:43:49 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_shmem.c,v 1.62.2.1 2014/08/17 03:26:51 riz Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -97,6 +97,8 @@ struct shmif_sc {
 
 	struct lwp *sc_rcvl;
 	bool sc_dying;
+
+	uint64_t sc_uuid;
 };
 
 static void shmif_rcv(void *);
@@ -167,12 +169,13 @@ allocif(int unit, struct shmif_sc **scp)
 	sc = kmem_zalloc(sizeof(*sc), KM_SLEEP);
 	sc-sc_memfd = -1;
 	sc-sc_unit = unit;
+	sc-sc_uuid = cprng_fast64();
 
 	ifp = sc-sc_ec.ec_if;
 
 	snprintf(ifp-if_xname, sizeof(ifp-if_xname), shmif%d, unit);
 	ifp-if_softc = sc;
-	ifp-if_flags = IFF_BROADCAST | IFF_MULTICAST;
+	ifp-if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp-if_init = shmif_init;
 	ifp-if_ioctl = shmif_ioctl;
 	ifp-if_start = shmif_start;
@@ -540,6 +543,7 @@ shmif_start(struct ifnet *ifp)
 		sp.sp_len = pktsize;
 		sp.sp_sec = tv.tv_sec;
 		sp.sp_usec = tv.tv_usec;
+		sp.sp_sender = sc-sc_uuid;
 
 		bpf_mtap(ifp, m0);
 
@@ -743,7 +747,9 @@ shmif_rcv(void *arg)
 		 * Test if we want to pass the packet upwards
 		 */
 		eth = mtod(m, struct ether_header *);
-		if (memcmp(eth-ether_dhost, CLLADDR(ifp-if_sadl),
+		if (sp.sp_sender == sc-sc_uuid) {
+			passup = false;
+		} else if (memcmp(eth-ether_dhost, CLLADDR(ifp-if_sadl),
 		ETHER_ADDR_LEN) == 0) {
 			passup = true;
 		} else if (ETHER_IS_MULTICAST(eth-ether_dhost)) {

Index: src/sys/rump/net/lib/libshmif/shmifvar.h
diff -u src/sys/rump/net/lib/libshmif/shmifvar.h:1.7 src/sys/rump/net/lib/libshmif/shmifvar.h:1.7.4.1
--- src/sys/rump/net/lib/libshmif/shmifvar.h:1.7	Fri Dec 20 09:06:35 2013
+++ src/sys/rump/net/lib/libshmif/shmifvar.h	Sun Aug 17 03:26:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: shmifvar.h,v 1.7 2013/12/20 09:06:35 pooka Exp $	*/
+/*	$NetBSD: shmifvar.h,v 1.7.4.1 2014/08/17 03:26:51 riz Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 #define _RUMP_NET_SHMIFVAR_H_
 
 #define SHMIF_MAGIC 0xca11d054
-#define SHMIF_VERSION 2
+#define SHMIF_VERSION 3
 
 struct shmif_mem {
 	uint32_t shm_magic;
@@ -56,6 +56,8 @@ struct shmif_pkthdr {
 
 	uint32_t sp_sec;
 	uint32_t sp_usec;
+
+	uint64_t sp_sender;
 };
 
 #define BUSMEM_SIZE (1024*1024)



CVS commit: [netbsd-7] src

2014-08-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Aug 17 03:34:02 UTC 2014

Modified Files:
src/sbin/mount_ptyfs [netbsd-7]: mount_ptyfs.8
src/sys/fs/ptyfs [netbsd-7]: ptyfs.h ptyfs_subr.c ptyfs_vfsops.c
ptyfs_vnops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #29):
sbin/mount_ptyfs/mount_ptyfs.8: revision 1.14
sys/fs/ptyfs/ptyfs_vnops.c: revision 1.48
sys/fs/ptyfs/ptyfs_vnops.c: revision 1.49
sys/fs/ptyfs/ptyfs_subr.c: revision 1.30
sys/fs/ptyfs/ptyfs_subr.c: revision 1.31
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.51
sys/fs/ptyfs/ptyfs_subr.c: revision 1.32
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.52
sys/fs/ptyfs/ptyfs_vfsops.c: revision 1.53
sys/fs/ptyfs/ptyfs.h: revision 1.13
sys/fs/ptyfs/ptyfs.h: revision 1.14
Needs HASH_SLIST, not HASH_LIST.
Change ptyfs to vcache.
- Use (type, minor) as key.
- Change ptyfs_allocvp to return a referenced vnode and lock where needed.
- Remove unneeded vnode backpointer ptyfs_vnode.
- Keep a single hashlist for pty nodes to make their attributes persistent.
OK: Christos Zoulas
Overflow if *data_len == OSIZE and args-version = PTYFS_ARGSVERSION.
Sent on tech-kern@, ok christos@
Adapt to reality -- already open BSD style nodes do not appear on
ptyfs mounts (this changed some months ago).
- Add a map of active controlling ptys per mount and no longer abuse
  the vnode lifecycle.
- No longer set recycle on VOP_INACTIVE().
- Make ptyfs_used_get() private to ptyfs_subr.c
- Stop copying device attributes from traditional ptys on first allocation.
- Remove unneeded argument lwp from ptyfs_allocvp() and ptyfs_free_get().
OK: Christos Zoulas


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.4.1 src/sbin/mount_ptyfs/mount_ptyfs.8
cvs rdiff -u -r1.12 -r1.12.4.1 src/sys/fs/ptyfs/ptyfs.h
cvs rdiff -u -r1.29 -r1.29.4.1 src/sys/fs/ptyfs/ptyfs_subr.c
cvs rdiff -u -r1.50 -r1.50.2.1 src/sys/fs/ptyfs/ptyfs_vfsops.c
cvs rdiff -u -r1.47 -r1.47.2.1 src/sys/fs/ptyfs/ptyfs_vnops.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/mount_ptyfs/mount_ptyfs.8
diff -u src/sbin/mount_ptyfs/mount_ptyfs.8:1.13 src/sbin/mount_ptyfs/mount_ptyfs.8:1.13.4.1
--- src/sbin/mount_ptyfs/mount_ptyfs.8:1.13	Fri Apr  4 21:19:35 2014
+++ src/sbin/mount_ptyfs/mount_ptyfs.8	Sun Aug 17 03:34:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_ptyfs.8,v 1.13 2014/04/04 21:19:35 christos Exp $
+.\	$NetBSD: mount_ptyfs.8,v 1.13.4.1 2014/08/17 03:34:02 riz Exp $
 .\
 .\
 .\ Copyright (c) 2004, 2014 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 4, 2014
+.Dd August 13, 2014
 .Dt MOUNT_PTYFS 8
 .Os
 .Sh NAME
@@ -57,8 +57,7 @@ at boot time.
 .Pp
 The filesystem contains pseudo-terminal slave device nodes which are
 allocated dynamically via
-.Xr ptm 4 ,
-or they are already open via traditional BSD style ptys.
+.Xr ptm 4 .
 .Pp
 The options are as follows:
 .Bl -tag -width indent

Index: src/sys/fs/ptyfs/ptyfs.h
diff -u src/sys/fs/ptyfs/ptyfs.h:1.12 src/sys/fs/ptyfs/ptyfs.h:1.12.4.1
--- src/sys/fs/ptyfs/ptyfs.h:1.12	Fri Apr  4 18:10:29 2014
+++ src/sys/fs/ptyfs/ptyfs.h	Sun Aug 17 03:34:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs.h,v 1.12 2014/04/04 18:10:29 christos Exp $	*/
+/*	$NetBSD: ptyfs.h,v 1.12.4.1 2014/08/17 03:34:02 riz Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -87,11 +87,15 @@ typedef enum {
 /*
  * control data for the proc file system.
  */
+struct ptyfskey {
+	ptyfstype	ptk_type;	/* type of ptyfs node */
+	int		ptk_pty;	/* the pty index */
+};
 struct ptyfsnode {
-	LIST_ENTRY(ptyfsnode) ptyfs_hash;	/* hash chain */
-	struct vnode	*ptyfs_vnode;	/* vnode associated with this ptyfsnode */
-	ptyfstype	ptyfs_type;	/* type of ptyfs node */
-	int		ptyfs_pty;	/* the pty index */
+	SLIST_ENTRY(ptyfsnode) ptyfs_hash;	/* hash chain */
+	struct ptyfskey	ptyfs_key;
+#define ptyfs_type	ptyfs_key.ptk_type
+#define ptyfs_pty	ptyfs_key.ptk_pty
 	u_long		ptyfs_fileno;	/* unique file id */
 	int		ptyfs_status;	/* status flag for times */
 #define	PTYFS_ACCESS	1
@@ -106,11 +110,14 @@ struct ptyfsnode {
 };
 
 struct ptyfsmount {
+	kmutex_t pmnt_lock;
 	TAILQ_ENTRY(ptyfsmount) pmnt_le;
 	struct mount *pmnt_mp;
 	gid_t pmnt_gid;
 	mode_t pmnt_mode;
 	int pmnt_flags;
+	int pmnt_bitmap_size;
+	uint8_t *pmnt_bitmap;
 };
 
 #define VFSTOPTY(mp)	((struct ptyfsmount *)(mp)-mnt_data)
@@ -147,15 +154,14 @@ struct ptyfs_args {
  * Convert between ptyfsnode vnode
  */
 #define VTOPTYFS(vp)	((struct ptyfsnode *)(vp)-v_data)
-#define PTYFSTOV(ptyfs)	((ptyfs)-ptyfs_vnode)
 
-int ptyfs_freevp(struct vnode *);
-struct vnode *ptyfs_used_get(ptyfstype, int, struct mount *, int);
-int ptyfs_allocvp(struct mount *, struct vnode **, ptyfstype, int,
-struct lwp *);
+void 

CVS commit: [netbsd-7] src/doc

2014-08-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Aug 17 03:34:59 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets 29, 30


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.11 src/doc/CHANGES-7.0:1.1.2.12
--- src/doc/CHANGES-7.0:1.1.2.11	Fri Aug 15 23:59:39 2014
+++ src/doc/CHANGES-7.0	Sun Aug 17 03:34:59 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.11 2014/08/15 23:59:39 riz Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.12 2014/08/17 03:34:59 riz Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -188,3 +188,33 @@ build.sh	1.295
 	default MACHINE_ARCH for the requested machine.
 	[apb, ticket #27]
 
+sys/rump/net/lib/libshmif/if_shmem.c		1.63
+sys/rump/net/lib/libshmif/shmifvar.h		1.8-1.9
+
+	Make shmif work with bridges.
+	[ozaki-r, ticket #28]
+
+sbin/mount_ptyfs/mount_ptyfs.8			1.14
+sys/fs/ptyfs/ptyfs.h1.13-1.14
+sys/fs/ptyfs/ptyfs_subr.c			1.30-1.32
+sys/fs/ptyfs/ptyfs_vfsops.c			1.51-1.53
+sys/fs/ptyfs/ptyfs_vnops.c			1.48-1.49
+
+	Sync ptyfs with recent changes:
+	 + Change ptyfs to vcache.
+	  - Use (type, minor) as key.
+	  - Change ptyfs_allocvp to return a referenced vnode and lock where
+	needed.
+	  - Remove unneeded vnode backpointer ptyfs_vnode.
+	  - Keep a single hashlist for pty nodes to make their attributes
+	persistent.
+	 + Add a map of active controlling ptys per mount and no longer abuse
+  	   the vnode lifecycle.
+	 + No longer set recycle on VOP_INACTIVE().
+	 + Make ptyfs_used_get() private to ptyfs_subr.c
+	 + Stop copying device attributes from traditional ptys on first
+	   allocation.
+	 + Remove unneeded argument lwp from ptyfs_allocvp() and
+	   ptyfs_free_get().
+	[hannken, ticket #29]
+