CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 06:05:56 UTC 2010

Modified Files:
src/share/man/man9: cpu_switchto.9

Log Message:
Improvements to wording and markup.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/cpu_switchto.9

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/man9/cpu_switchto.9
diff -u src/share/man/man9/cpu_switchto.9:1.10 src/share/man/man9/cpu_switchto.9:1.11
--- src/share/man/man9/cpu_switchto.9:1.10	Sun May 25 20:00:30 2008
+++ src/share/man/man9/cpu_switchto.9	Tue Apr 13 06:05:56 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpu_switchto.9,v 1.10 2008/05/25 20:00:30 wiz Exp $
+.\	$NetBSD: cpu_switchto.9,v 1.11 2010/04/13 06:05:56 jruoho Exp $
 .\
 .\ Copyright (c)2007 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -25,13 +25,15 @@
 .\ SUCH DAMAGE.
 .\
 .\ 
-.Dd May 21, 2007
+.Dd April 13, 2010
 .Dt CPU_SWITCHTO 9
 .Os
 .\ 
 .Sh NAME
 .Nm cpu_switchto
-.Nd machine-dependent LWP context switching interface
+.Nd machine-dependent
+.Tn LWP
+context switching interface
 .\ 
 .Sh SYNOPSIS
 .In sys/cpu.h
@@ -41,72 +43,97 @@
 lwp_t *oldlwp lwp_t *newlwp bool returning
 .\ 
 .Sh DESCRIPTION
+The
 .Fn cpu_switchto
-saves the context of the LWP which is currently running on the processor,
-and restores the context of the LWP specified by
+function saves the context of the
+.Tn LWP
+which is currently running on the processor,
+and restores the context of the
+.Tn LWP
+specified by
 .Fa newlwp .
 .Pp
+Remarks:
+.Bl -enum -offset indent
+.It
 .Fn cpu_switchto
-doesn't switch address spaces.
-.Pp
+does not switch address spaces.
+.It
 .Fn cpu_switchto
 sets
-.Dv curlwp
+.Xr curlwp 9
 to
 .Fa newlwp .
-.Pp
+.It
 .Fn cpu_switchto
 should be called at
 .Dv IPL_SCHED .
-When
-.Fn cpu_switchto
-returns, the caller should lower the priority level as soon as possible.
-.Pp
+When the function returns, the caller should lower
+the priority level as soon as possible.
+.It
 .Fn cpu_switchto
 might be called with spin mutexes held.
+.El
 .Pp
-It takes the following arguments.
-.Bl -tag -width oldlwp
+The function takes the following arguments.
+.Bl -tag -width returning  -offset indent
 .It Fa oldlwp
-Specify the lwp from which we are going to switch, i.e.,
-the calling LWP.
+Specify the
+.Tn LWP
+from which the switch is going to be made, i.e., the calling
+.Tn LWP .
 If it was
 .Dv NULL ,
-the context of the LWP currently running on this processor is not saved.
+the context of the
+.Tn LWP
+currently running on this processor is not saved.
 .It Fa newlwp
-Specify the lwp to which we are going to switch.
+Specify the
+.Tn LWP
+to which to switch.
 It must not be
 .Dv NULL .
 .It Fa returning
 Only meaningful if the architecture implements fast software interrupts.
 If true, it indicates that
 .Fa oldlwp
-is a soft interrupt LWP that is blocking.
-It's a good indication that any kind of address space or user activity
+is a soft interrupt
+.Tn LWP
+that is blocking.
+It is a good indication that any kind of address space or user activity
 can be completely ignored.
 For example:
-.Fn ras_lookup ,
-cache flushes, TLB wirings, adjusting lazy FPU
+.Xr ras_lookup 9 ,
+cache flushes, TLB wirings, adjusting lazy
+.Tn FPU
 state.
 All that is required is to restore the register state and stack, and
-return to the interrupted LWP.
+return to the interrupted
+.Tn LWP .
 .El
 .\ 
 .Sh RETURN VALUES
+The
 .Fn cpu_switchto
-does not return until another LWP calls
-.Fn cpu_switchto
-to switch to us.
+function does not return until another
+.Tn LWP
+calls
+.Fn cpu_switchto .
 It returns the
-.Dv oldlwp
+.Vt oldlwp
 argument of the
 .Fn cpu_switchto
-which is called to switch back to our LWP.
-It's either an LWP which called
-.Fa cpu_switchto
+which is called to switch back to our
+.Tn LWP .
+It is either a
+.Tn LWP
+which called
+.Fn cpu_switchto
 to switch to us or
 .Dv NULL
-in the case that the LWP was exiting.
+in case the
+.Tn LWP
+was exiting.
 .\ 
 .Sh SEE ALSO
 .Xr swapcontext 3 ,



CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 06:21:40 UTC 2010

Modified Files:
src/share/man/man9: cpu_number.9

Log Message:
Cosmetics.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/cpu_number.9

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/man9/cpu_number.9
diff -u src/share/man/man9/cpu_number.9:1.3 src/share/man/man9/cpu_number.9:1.4
--- src/share/man/man9/cpu_number.9:1.3	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/cpu_number.9	Tue Apr 13 06:21:40 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: cpu_number.9,v 1.3 2008/04/30 13:10:58 martin Exp $
+.\ $NetBSD: cpu_number.9,v 1.4 2010/04/13 06:21:40 jruoho Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,20 +27,27 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd May 23, 2002
+.Dd April 13, 2010
 .Dt CPU_NUMBER 9
 .Os
 .Sh NAME
 .Nm cpu_number
-.Nd unique CPU identification number
+.Nd unique
+.Tn CPU
+identification number
 .Sh SYNOPSIS
 .In sys/types.h
 .In machine/cpu.h
 .Ft cpuid_t
 .Fn cpu_number void
 .Sh DESCRIPTION
+The
 .Fn cpu_number
-returns the unique CPU identification number for the CPU that this
-thread is running on.
+function returns an unique
+.Tn CPU
+identification number for the
+.Tn CPU
+that this thread is running on.
+It may also be implemented as a macro.
 .Sh SEE ALSO
 .Xr curcpu 9



CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 07:14:45 UTC 2010

Modified Files:
src/share/man/man9: veriexec.9

Log Message:
Provide prototypes in SYNOPSIS; use only parameter names in FUNCTIONS.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/veriexec.9

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/man9/veriexec.9
diff -u src/share/man/man9/veriexec.9:1.22 src/share/man/man9/veriexec.9:1.23
--- src/share/man/man9/veriexec.9:1.22	Wed May 13 22:43:58 2009
+++ src/share/man/man9/veriexec.9	Tue Apr 13 07:14:45 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: veriexec.9,v 1.22 2009/05/13 22:43:58 wiz Exp $
+.\ $NetBSD: veriexec.9,v 1.23 2010/04/13 07:14:45 jruoho Exp $
 .\
 .\ Copyright 2006 Elad Efrat e...@netbsd.org
 .\ Copyright 2006 Brett Lymn bl...@netbsd.org
@@ -35,9 +35,47 @@
 .Nd in-kernel file integrity subsystem KPI
 .Sh SYNOPSIS
 .In sys/verified_exec.h
+.Ft void
+.Fn veriexec_init void
+.Ft bool
+.Fn veriexec_lookup struct vnode *vp
+.Ft int
+.Fn veriexec_verify struct lwp *l struct vnode *vp \
+const u_char *name int flag bool *found
+.Ft void
+.Fn veriexec_purge struct vnode *vp
+.Ft int
+.Fn veriexec_fpops_add const char *fp_type size_t hash_len \
+size_t ctx_size veriexec_fpop_init_t init veriexec_fpop_update_t update \
+veriexec_fpop_final_t final
+.Ft int
+.Fn veriexec_file_add struct lwp *l prop_dictionary_t dict
+.Ft int
+.Fn veriexec_file_delete struct lwp *l struct vnode *vp
+.Ft int
+.Fn veriexec_table_delete struct lwp *l struct mount *mp
+.Ft int
+.Fn veriexec_flush struct lwp *l
+.Ft int
+.Fn veriexec_openchk struct lwp *l struct vnode *vp \
+const char *path int fmode
+.Ft int
+.Fn veriexec_renamechk struct lwp *l struct vnode *fromvp \
+const char *fromname struct vnode *tovp const char *toname
+.Ft int
+.Fn veriexec_removechk struct lwp *l struct vnode *vp \
+const char *name
+.Ft int
+.Fn veriexec_unmountchk struct mount *mp
+.Ft int
+.Fn veriexec_convert struct vnode *vp prop_dictionary_t rdict
+.Ft int
+.Fn veriexec_dump struct lwp *l prop_array_t rarray
 .Sh DESCRIPTION
 .Nm
-is the KPI for
+is the
+.Tn KPI
+for
 .Em Veriexec ,
 the
 .Nx
@@ -47,26 +85,25 @@
 enforce the
 .Em Veriexec
 policy.
+.Sh FUNCTIONS
 .Ss Core Routines
 .Bl -tag -width compact
-.It Ft void Fn veriexec_init void
+.It Fn veriexec_init void
 Initialize the
 .Em Veriexec
 subsystem.
 Called only once during system startup.
-.It Ft bool Fn veriexec_lookup struct vnode *vp
+.It Fn veriexec_lookup vp
 Check if
 .Ar vp
 is monitored by
-.Em Veriexec
-or not.
+.Em Veriexec .
 Returns
 .Dv true
 if it is, or
 .Dv false
 otherwise.
-.It Ft int Fn veriexec_verify struct lwp *l struct vnode *vp \
-const u_char *name int flag bool *found
+.It Fn veriexec_verify l vp name flag found
 Verifies the digital fingerprint of
 .Ar vp .
 .Ar name
@@ -94,7 +131,7 @@
 in the
 .Em Veriexec
 tables.
-.It Ft void Fn veriexec_purge struct vnode *vp
+.It Fn veriexec_purge vp
 Purge the file entry for
 .Ar vp .
 This invalidates the fingerprint so it will be evaluated next time the file
@@ -103,9 +140,8 @@
 .El
 .Ss Fingerprint Related Routines
 .Bl -tag -width compact
-.It Ft int Fn veriexec_fpops_add const char *fp_type size_t hash_len \
-size_t ctx_size veriexec_fpop_init_t init veriexec_fpop_update_t update \
-veriexec_fpop_final_t final
+.It Fn veriexec_fpops_add fp_type hash_len ctx_size \
+init update final
 Add support for fingerprinting algorithm
 .Ar fp_type
 with binary hash length
@@ -123,8 +159,7 @@
 .El
 .Ss Table Management Routines
 .Bl -tag -width compact
-.It Ft int Fn veriexec_file_add struct lwp *l \
-prop_dictionary_t dict
+.It Fn veriexec_file_add l dict
 Add a
 .Em Veriexec
 entry for the file described by
@@ -139,25 +174,24 @@
 .It fp-type	string	fingerprint hashing algorithm
 .It fp	data	the fingerprint
 .El
-.It Ft int Fn veriexec_file_delete struct lwp *l struct vnode *vp
+.It Fn veriexec_file_delete l vp
 Remove
 .Em Veriexec
 entry for
 .Ar vp .
-.It Ft int Fn veriexec_table_delete struct lwp *l struct mount *mp
+.It Fn veriexec_table_delete l mp
 Remove
 .Em Veriexec
 table for mount-point
 .Ar mp .
-.It Ft int Fn veriexec_flush struct lwp *l
+.It Fn veriexec_flush l
 Delete all
 .Em Veriexec
 tables.
 .El
 .Ss Hook Handlers
 .Bl -tag -width compact
-.It Ft int Fn veriexec_openchk struct lwp *l struct vnode *vp \
-const char *path int fmode
+.It Fn veriexec_openchk l vp path fmode
 Called when a file is opened.
 .Pp
 .Ar l
@@ -172,8 +206,7 @@
 is the pathname for the file (not necessarily a full path), and
 .Ar fmode
 are the mode bits with which the file was opened.
-.It Ft int Fn veriexec_renamechk struct lwp *l struct vnode *fromvp \
-const char *fromname struct vnode *tovp const char *toname
+.It Fn veriexec_renamechk l fromvp fromname tovp toname
 Called when a file is renamed.
 .Pp
 .Ar fromvp
@@ -190,8 +223,7 @@
 Depending on the strict 

CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 07:16:31 UTC 2010

Modified Files:
src/share/man/man9: veriexec.9

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/veriexec.9

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/man9/veriexec.9
diff -u src/share/man/man9/veriexec.9:1.23 src/share/man/man9/veriexec.9:1.24
--- src/share/man/man9/veriexec.9:1.23	Tue Apr 13 07:14:45 2010
+++ src/share/man/man9/veriexec.9	Tue Apr 13 07:16:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: veriexec.9,v 1.23 2010/04/13 07:14:45 jruoho Exp $
+.\ $NetBSD: veriexec.9,v 1.24 2010/04/13 07:16:31 jruoho Exp $
 .\
 .\ Copyright 2006 Elad Efrat e...@netbsd.org
 .\ Copyright 2006 Brett Lymn bl...@netbsd.org
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 10, 2008
+.Dd April 13, 2010
 .Dt VERIEXEC 9
 .Os
 .Sh NAME



CVS commit: src/sys/dev

2010-04-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Apr 13 07:58:55 UTC 2010

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

Log Message:
fss_softc_free: don't detach a disk that is not attached.  Disk is
attached only if the backing store thread is running.

Resolves PR #43153: fss error branch error


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/fss.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/fss.c
diff -u src/sys/dev/fss.c:1.67 src/sys/dev/fss.c:1.68
--- src/sys/dev/fss.c:1.67	Mon Apr 12 22:29:11 2010
+++ src/sys/dev/fss.c	Tue Apr 13 07:58:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fss.c,v 1.67 2010/04/12 22:29:11 pooka Exp $	*/
+/*	$NetBSD: fss.c,v 1.68 2010/04/13 07:58:54 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.67 2010/04/12 22:29:11 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: fss.c,v 1.68 2010/04/13 07:58:54 hannken Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -473,9 +473,9 @@
 		while (sc-sc_bs_lwp != NULL)
 			kpause(fssdetach, false, 1, sc-sc_slock);
 		mutex_exit(sc-sc_slock);
-	}
 
-	disk_detach(sc-sc_dkdev);
+		disk_detach(sc-sc_dkdev);
+	}
 
 	if (sc-sc_copied != NULL)
 		kmem_free(sc-sc_copied, howmany(sc-sc_clcount, NBBY));



CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 08:24:31 UTC 2010

Modified Files:
src/share/man/man9: SET.9

Log Message:
Add a BUGS section.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/SET.9

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/man9/SET.9
diff -u src/share/man/man9/SET.9:1.1 src/share/man/man9/SET.9:1.2
--- src/share/man/man9/SET.9:1.1	Mon Mar 22 10:32:48 2010
+++ src/share/man/man9/SET.9	Tue Apr 13 08:24:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: SET.9,v 1.1 2010/03/22 10:32:48 jruoho Exp $
+.\ $NetBSD: SET.9,v 1.2 2010/04/13 08:24:31 jruoho Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 22, 2010
+.Dd April 13, 2010
 .Dt SET 9
 .Os
 .Sh NAME
@@ -64,8 +64,8 @@
 is set in
 .Fa val .
 .El
-.Pp
-The rationale is to provide clarity in the source code,
-but arguably these operations are clear enough without the use of the macros.
 .Sh SEE ALSO
 .Xr bits 3
+.Sh BUGS
+The rationale is to provide clarity in the source code,
+but arguably these operations are clear enough without the use of the macros.



CVS commit: src

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 08:40:19 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: ctod.9

Log Message:
Document the ctod-family of macros from sys/param.h.

XXX: Someone may want to check if there is anything to add or correct.


To generate a diff of this commit:
cvs rdiff -u -r1.1428 -r1.1429 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.325 -r1.326 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/ctod.9

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1428 src/distrib/sets/lists/comp/mi:1.1429
--- src/distrib/sets/lists/comp/mi:1.1428	Tue Apr 13 07:32:31 2010
+++ src/distrib/sets/lists/comp/mi	Tue Apr 13 08:40:19 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1428 2010/04/13 07:32:31 jruoho Exp $
+#	$NetBSD: mi,v 1.1429 2010/04/13 08:40:19 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -8660,6 +8660,8 @@
 ./usr/share/man/cat9/bswap16.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bswap32.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bswap64.0			comp-sys-catman		.cat
+./usr/share/man/cat9/btoc.0			comp-sys-catman		.cat
+./usr/share/man/cat9/btodb.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/buffercache.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/bufq.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/bus_dma.0			comp-sys-catman		.cat
@@ -8856,6 +8858,8 @@
 ./usr/share/man/cat9/crypto_register.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/crypto_unregister.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/csf.0			comp-sys-catman		.cat
+./usr/share/man/cat9/ctob.0			comp-sys-catman		.cat
+./usr/share/man/cat9/ctod.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/ctxsw.0			comp-obsolete		obsolete
 ./usr/share/man/cat9/curcpu.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/curproc.0			comp-sys-catman		.cat
@@ -8871,6 +8875,7 @@
 ./usr/share/man/cat9/cv_wait.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/cv_wait_sig.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cv_wakeup.0		comp-obsolete		obsolete
+./usr/share/man/cat9/dbtob.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/ddc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/delay.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/deviter.0			comp-sys-catman		.cat
@@ -8907,6 +8912,7 @@
 ./usr/share/man/cat9/dofilewritev.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/dopowerhooks.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/doshutdownhooks.0		comp-sys-catman		.cat
+./usr/share/man/cat9/dtoc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/driver.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/dumpsys.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/dupfdopen.0		comp-sys-catman		.cat
@@ -14350,6 +14356,8 @@
 ./usr/share/man/html9/bswap16.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bswap32.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bswap64.html		comp-sys-htmlman	html
+./usr/share/man/html9/btoc.html			comp-sys-htmlman	html
+./usr/share/man/html9/btodb.html		comp-sys-htmlman	html
 ./usr/share/man/html9/buffercache.html		comp-sys-htmlman	html
 ./usr/share/man/html9/bufq.html			comp-sys-htmlman	html
 ./usr/share/man/html9/bus_dma.html		comp-sys-htmlman	html
@@ -14529,6 +14537,8 @@
 ./usr/share/man/html9/crypto_register.html	comp-sys-htmlman	html
 ./usr/share/man/html9/crypto_unregister.html	comp-sys-htmlman	html
 ./usr/share/man/html9/csf.html			comp-sys-htmlman	html
+./usr/share/man/html9/ctob.html			comp-sys-htmlman	html
+./usr/share/man/html9/ctod.html			comp-sys-htmlman	html
 ./usr/share/man/html9/curcpu.html		comp-sys-htmlman	html
 ./usr/share/man/html9/curproc.html		comp-sys-htmlman	html
 ./usr/share/man/html9/curlwp.html		comp-sys-htmlman	html
@@ -14543,6 +14553,7 @@
 ./usr/share/man/html9/cv_wait.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cv_wait_sig.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cv_wakeup.html		comp-obsolete		obsolete
+./usr/share/man/html9/dbtob.html		comp-sys-htmlman	html
 ./usr/share/man/html9/ddc.html			comp-sys-htmlman	html
 ./usr/share/man/html9/delay.html		comp-sys-htmlman	html
 ./usr/share/man/html9/deviter.html		comp-sys-htmlman	html
@@ -14577,6 +14588,7 @@
 ./usr/share/man/html9/dofilewritev.html		comp-sys-htmlman	html
 ./usr/share/man/html9/dopowerhooks.html		comp-sys-htmlman	html
 ./usr/share/man/html9/doshutdownhooks.html	comp-sys-htmlman	html
+./usr/share/man/html9/dtoc.html			comp-sys-htmlman	html
 ./usr/share/man/html9/driver.html		comp-sys-htmlman	html
 ./usr/share/man/html9/dumpsys.html		comp-sys-htmlman	html
 ./usr/share/man/html9/dupfdopen.html		comp-sys-htmlman	html
@@ -20151,6 +20163,8 @@
 ./usr/share/man/man9/bswap16.9			comp-sys-man		.man
 ./usr/share/man/man9/bswap32.9			comp-sys-man		.man
 ./usr/share/man/man9/bswap64.9			

CVS commit: src/usr.bin/genassym

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 09:01:10 UTC 2010

Modified Files:
src/usr.bin/genassym: genassym.1

Log Message:
Split overly large paragraph.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/genassym/genassym.1

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/genassym/genassym.1
diff -u src/usr.bin/genassym/genassym.1:1.4 src/usr.bin/genassym/genassym.1:1.5
--- src/usr.bin/genassym/genassym.1:1.4	Sun Oct 18 18:14:00 2009
+++ src/usr.bin/genassym/genassym.1	Tue Apr 13 09:01:10 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: genassym.1,v 1.4 2009/10/18 18:14:00 snj Exp $
+.\	$NetBSD: genassym.1,v 1.5 2010/04/13 09:01:10 jruoho Exp $
 .\
 .\ Copyright (c) 1997 Matthias Pfaller.
 .\ All rights reserved.
@@ -23,7 +23,7 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd August 18, 2005
+.Dd April 13, 2010
 .Dt GENASSYM 1
 .Os
 .Sh NAME
@@ -44,6 +44,7 @@
 reads from stdin. The generated file is used by kernel sources
 written in assembler to gain access to information (e.g. structure
 offsets and sizes) normally only known to the C compiler.
+.Pp
 Arguments to
 .Nm
 are usually of the form
@@ -56,7 +57,9 @@
 .Ar ${CPPFLAGS}
 are flag arguments to the C compiler. The script creates a C source file
 from its input. Then the C compiler is called according to the script's
-arguments to compile this file. Normally
+arguments to compile this file.
+.Pp
+Normally
 .Nm
 instructs the C compiler to create an assembler source from the constructed
 C source. The resulting file is then processed to extract the information
@@ -81,7 +84,9 @@
 .Nm
 command appeared in
 .Nx 1.3
-as genassym.sh in
+as
+.Dq genassym.sh
+in
 .Pa /usr/src/sys/kern .
 It became a userland utility in
 .Nx 4.0 .



CVS commit: src/lib/libc/sys

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 09:24:09 UTC 2010

Modified Files:
src/lib/libc/sys: kqueue.2

Log Message:
Add the USENIX paper of Jonathan Lemon to SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/lib/libc/sys/kqueue.2

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/sys/kqueue.2
diff -u src/lib/libc/sys/kqueue.2:1.27 src/lib/libc/sys/kqueue.2:1.28
--- src/lib/libc/sys/kqueue.2:1.27	Mon Mar 22 19:30:55 2010
+++ src/lib/libc/sys/kqueue.2	Tue Apr 13 09:24:09 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: kqueue.2,v 1.27 2010/03/22 19:30:55 joerg Exp $
+.\	$NetBSD: kqueue.2,v 1.28 2010/04/13 09:24:09 jruoho Exp $
 .\
 .\ Copyright (c) 2000 Jonathan Lemon
 .\ All rights reserved.
@@ -32,7 +32,7 @@
 .\
 .\ $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.22 2001/06/27 19:55:57 dd Exp $
 .\
-.Dd October 24, 2009
+.Dd April 13, 2010
 .Dt KQUEUE 2
 .Os
 .Sh NAME
@@ -600,6 +600,14 @@
 .Xr signal 3 ,
 .Xr kfilter_register 9 ,
 .Xr knote 9
+.Rs
+.%A Jonathan Lemon
+.%T Kqueue: A Generic and Scalable Event Notification Facility
+.%I USENIX Association
+.%B Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference
+.%D June 25-30, 2001
+.\.http://www.usenix.org/event/usenix01/freenix01/full_papers/lemon/lemon.pdf
+.Re
 .Sh HISTORY
 The
 .Fn kqueue



CVS commit: src/sys/ufs/ufs

2010-04-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Tue Apr 13 09:27:59 UTC 2010

Modified Files:
src/sys/ufs/ufs: ufs_vnops.c

Log Message:
Add fstrans transactions to ufs_close(), ufs_getattr(), ufs_chmod()
and ufs_chown().  These functions change file system state.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/sys/ufs/ufs/ufs_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/ufs/ufs/ufs_vnops.c
diff -u src/sys/ufs/ufs/ufs_vnops.c:1.181 src/sys/ufs/ufs/ufs_vnops.c:1.182
--- src/sys/ufs/ufs/ufs_vnops.c:1.181	Mon Mar 29 13:11:34 2010
+++ src/sys/ufs/ufs/ufs_vnops.c	Tue Apr 13 09:27:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_vnops.c,v 1.181 2010/03/29 13:11:34 pooka Exp $	*/
+/*	$NetBSD: ufs_vnops.c,v 1.182 2010/04/13 09:27:58 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_vnops.c,v 1.181 2010/03/29 13:11:34 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_vnops.c,v 1.182 2010/04/13 09:27:58 hannken Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -267,8 +267,10 @@
 
 	vp = ap-a_vp;
 	ip = VTOI(vp);
+	fstrans_start(vp-v_mount, FSTRANS_SHARED);
 	if (vp-v_usecount  1)
 		UFS_ITIMES(vp, NULL, NULL, NULL);
+	fstrans_done(vp-v_mount);
 	return (0);
 }
 
@@ -371,6 +373,7 @@
 	vp = ap-a_vp;
 	ip = VTOI(vp);
 	vap = ap-a_vap;
+	fstrans_start(vp-v_mount, FSTRANS_SHARED);
 	UFS_ITIMES(vp, NULL, NULL, NULL);
 
 	/*
@@ -420,6 +423,7 @@
 		vap-va_blocksize = vp-v_mount-mnt_stat.f_iosize;
 	vap-va_type = vp-v_type;
 	vap-va_filerev = ip-i_modrev;
+	fstrans_done(vp-v_mount);
 	return (0);
 }
 
@@ -671,11 +675,13 @@
 	if (error)
 		return (error);
 
+	fstrans_start(vp-v_mount, FSTRANS_SHARED);
 	ip-i_mode = ~ALLPERMS;
 	ip-i_mode |= (mode  ALLPERMS);
 	ip-i_flag |= IN_CHANGE;
 	DIP_ASSIGN(ip, mode, ip-i_mode);
 	UFS_WAPBL_UPDATE(vp, NULL, NULL, 0);
+	fstrans_done(vp-v_mount);
 	return (0);
 }
 
@@ -706,6 +712,7 @@
 	if (error)
 		return (error);
 
+	fstrans_start(vp-v_mount, FSTRANS_SHARED);
 #ifdef QUOTA
 	ogid = ip-i_gid;
 	ouid = ip-i_uid;
@@ -730,11 +737,13 @@
 	DIP_ASSIGN(ip, uid, ouid);
 	(void) chkdq(ip, change, cred, FORCE);
 	(void) chkiq(ip, 1, cred, FORCE);
+	fstrans_done(vp-v_mount);
 	return (error);
  good:
 #endif /* QUOTA */
 	ip-i_flag |= IN_CHANGE;
 	UFS_WAPBL_UPDATE(vp, NULL, NULL, 0);
+	fstrans_done(vp-v_mount);
 	return (0);
 }
 



CVS commit: src/sys/arch/atari/atari

2010-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 09:49:54 UTC 2010

Modified Files:
src/sys/arch/atari/atari: pmap_bootstrap.c

Log Message:
Remove a declaration of unused variable.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/atari/pmap_bootstrap.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/atari/atari/pmap_bootstrap.c
diff -u src/sys/arch/atari/atari/pmap_bootstrap.c:1.6 src/sys/arch/atari/atari/pmap_bootstrap.c:1.7
--- src/sys/arch/atari/atari/pmap_bootstrap.c:1.6	Sun Dec  6 06:41:29 2009
+++ src/sys/arch/atari/atari/pmap_bootstrap.c	Tue Apr 13 09:49:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.6 2009/12/06 06:41:29 tsutsui Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.7 2010/04/13 09:49:54 tsutsui Exp $	*/
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -83,9 +83,6 @@
 
 extern paddr_t	avail_start;
 extern paddr_t	avail_end;
-#if defined(M68040) || defined(M68060)
-extern u_int	protostfree;
-#endif
 
 extern paddr_t	msgbufpa;
 



CVS commit: src/sys/arch/atari

2010-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 09:51:07 UTC 2010

Modified Files:
src/sys/arch/atari/dev: clock.c grf.c hdfd.c ite.c lpt.c nvram.c
src/sys/arch/atari/vme: et4000.c leo.c

Log Message:
Include ioconf.h to declare struct cfdriver foo_cd.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/atari/dev/clock.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/atari/dev/lpt.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/atari/dev/nvram.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/atari/vme/et4000.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/vme/leo.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/atari/dev/clock.c
diff -u src/sys/arch/atari/dev/clock.c:1.50 src/sys/arch/atari/dev/clock.c:1.51
--- src/sys/arch/atari/dev/clock.c:1.50	Sun Aug 23 13:46:48 2009
+++ src/sys/arch/atari/dev/clock.c	Tue Apr 13 09:51:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.50 2009/08/23 13:46:48 tsutsui Exp $	*/
+/*	$NetBSD: clock.c,v 1.51 2010/04/13 09:51:07 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.50 2009/08/23 13:46:48 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.51 2010/04/13 09:51:07 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -103,6 +103,8 @@
 #include machine/profile.h
 #endif
 
+#include ioconf.h
+
 static int	atari_rtc_get(todr_chip_handle_t, struct clock_ymdhms *);
 static int	atari_rtc_set(todr_chip_handle_t, struct clock_ymdhms *);
 
@@ -156,8 +158,6 @@
 CFATTACH_DECL(clock, sizeof(struct clock_softc),
 clockmatch, clockattach, NULL, NULL);
 
-extern struct cfdriver clock_cd;
-
 const struct cdevsw rtc_cdevsw = {
 	rtcopen, rtcclose, rtcread, rtcwrite, noioctl,
 	nostop, notty, nopoll, nommap, nokqfilter,

Index: src/sys/arch/atari/dev/grf.c
diff -u src/sys/arch/atari/dev/grf.c:1.41 src/sys/arch/atari/dev/grf.c:1.42
--- src/sys/arch/atari/dev/grf.c:1.41	Sun Jul 19 05:43:22 2009
+++ src/sys/arch/atari/dev/grf.c	Tue Apr 13 09:51:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf.c,v 1.41 2009/07/19 05:43:22 tsutsui Exp $	*/
+/*	$NetBSD: grf.c,v 1.42 2010/04/13 09:51:07 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -85,7 +85,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: grf.c,v 1.41 2009/07/19 05:43:22 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: grf.c,v 1.42 2010/04/13 09:51:07 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -110,6 +110,8 @@
 #include atari/dev/viewioctl.h
 #include atari/dev/viewvar.h
 
+#include ioconf.h
+
 #include grfcc.h
 #include grfet.h
 #define	NGRF	(NGRFCC + NGRFET)
@@ -139,8 +141,6 @@
 CFATTACH_DECL(grfbus, sizeof(struct device),
 grfbusmatch, grfbusattach, NULL, NULL);
 
-extern struct cfdriver grfbus_cd;
-
 dev_type_open(grfopen);
 dev_type_close(grfclose);
 dev_type_ioctl(grfioctl);

Index: src/sys/arch/atari/dev/hdfd.c
diff -u src/sys/arch/atari/dev/hdfd.c:1.71 src/sys/arch/atari/dev/hdfd.c:1.72
--- src/sys/arch/atari/dev/hdfd.c:1.71	Wed Jul  8 12:23:09 2009
+++ src/sys/arch/atari/dev/hdfd.c	Tue Apr 13 09:51:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdfd.c,v 1.71 2009/07/08 12:23:09 tsutsui Exp $	*/
+/*	$NetBSD: hdfd.c,v 1.72 2010/04/13 09:51:07 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hdfd.c,v 1.71 2009/07/08 12:23:09 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: hdfd.c,v 1.72 2010/04/13 09:51:07 tsutsui Exp $);
 
 #include opt_ddb.h
 
@@ -125,6 +125,7 @@
 #include atari/dev/hdfdreg.h
 #include atari/atari/device.h
 
+#include ioconf.h
 #include locators.h
 
 /*
@@ -284,8 +285,6 @@
 CFATTACH_DECL(hdfd, sizeof(struct fd_softc),
 fdprobe, fdattach, NULL, NULL);
 
-extern struct cfdriver hdfd_cd;
-
 const struct bdevsw fd_bdevsw = {
 	fdopen, fdclose, fdstrategy, fdioctl, nodump, nosize, D_DISK
 };

Index: src/sys/arch/atari/dev/ite.c
diff -u src/sys/arch/atari/dev/ite.c:1.66 src/sys/arch/atari/dev/ite.c:1.67
--- src/sys/arch/atari/dev/ite.c:1.66	Sun Jul 19 05:43:22 2009
+++ src/sys/arch/atari/dev/ite.c	Tue Apr 13 09:51:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.66 2009/07/19 05:43:22 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.67 2010/04/13 09:51:07 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.66 2009/07/19 05:43:22 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.67 2010/04/13 09:51:07 tsutsui Exp $);
 
 #include opt_ddb.h
 
@@ -114,6 +114,8 @@
 #include atari/dev/viewioctl.h
 #include atari/dev/viewvar.h
 
+#include 

CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 09:57:05 UTC 2010

Modified Files:
src/share/man/man9: ctod.9

Log Message:
Fix roff warnings. Note btop() and btopr() on Solaris as an example.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/ctod.9

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/man9/ctod.9
diff -u src/share/man/man9/ctod.9:1.1 src/share/man/man9/ctod.9:1.2
--- src/share/man/man9/ctod.9:1.1	Tue Apr 13 08:40:19 2010
+++ src/share/man/man9/ctod.9	Tue Apr 13 09:57:05 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: ctod.9,v 1.1 2010/04/13 08:40:19 jruoho Exp $
+.\ $NetBSD: ctod.9,v 1.2 2010/04/13 09:57:05 jruoho Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -57,13 +57,21 @@
 The following table lists the possible conversions:
 .Bl -column -offset indent disk blocks  disk blocks  disk blocks 
 .It Sy Macro Ta Sy From Ta Sy To
-.It Li Fn ctod Ta pages Ta disk blocks
-.It Li Fn dtoc Ta disk blocks Ta pages
-.It Li Fn ctob Ta pages Ta bytes
-.It Li Fn btoc Ta bytes Ta pages
-.It Li Fn dbtob Ta disk blocks Ta bytes
-.It Li Fn btodb Ta bytes Ta disk blocks
+.It Fn ctod Ta pages Ta disk blocks
+.It Fn dtoc Ta disk blocks Ta pages
+.It Fn ctob Ta pages Ta bytes
+.It Fn btoc Ta bytes Ta pages
+.It Fn dbtob Ta disk blocks Ta bytes
+.It Fn btodb Ta bytes Ta disk blocks
 .El
+.Pp
+These are typical macros that may appear
+with different names in other operating systems.
+Examples include
+.Fn btop
+and
+.Fn btopr
+in Solaris.
 .Sh CAVEATS
 The described macros make no assumptions
 about the type of the input parameter.



CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 10:06:43 UTC 2010

Modified Files:
src/share/man/man9: physio.9

Log Message:
Minor markup nits.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/physio.9

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/man9/physio.9
diff -u src/share/man/man9/physio.9:1.10 src/share/man/man9/physio.9:1.11
--- src/share/man/man9/physio.9:1.10	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/physio.9	Tue Apr 13 10:06:43 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: physio.9,v 1.10 2008/04/30 13:10:58 martin Exp $
+.\	$NetBSD: physio.9,v 1.11 2010/04/13 10:06:43 jruoho Exp $
 .\
 .\ Copyright (c) 1996 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd June 15, 1996
+.Dd April 13, 2010
 .Dt PHYSIO 9
 .Os
 .Sh NAME
@@ -47,7 +47,9 @@
 The
 .Fn physio
 is a helper function typically called from character device read and write
-routines to start I/O on a user process buffer.
+routines to start
+.Tn I/O
+on a user process buffer.
 It calls back on the provided
 .Fa strategy
 routine one or more times to complete the transfer described by
@@ -57,18 +59,21 @@
 is determined by the
 .Fa minphys
 routine.
+.Pp
 Since
 .Fa uio
 normally describes user space addresses,
 .Fn physio
 needs to lock the appropriate data area into memory before each transaction
 with
-.Fa strategy ( see
+.Fa strategy
+(see
 .Xr uvm_vslock 9
 and
 .Xr uvm_vsunlock 9 ) .
+The
 .Fn physio
-always awaits the completion of the entire requested transfer before
+function always awaits the completion of the entire requested transfer before
 returning, unless an error condition is detected earlier.
 In all cases, the buffer passed in
 .Fa bp
@@ -77,10 +82,11 @@
 for the duration of the entire transfer.
 .Pp
 A break-down of the arguments follows:
-.Bl -tag -width indent
+.Bl -tag -width strategy 
 .It Fa strategy
 The device strategy routine to call for each chunk of data to initiate
-device I/O.
+device
+.Tn I/O .
 .It Fa bp
 The buffer to use with the strategy routine.
 The buffer flags will have



CVS commit: src/sys/fs/msdosfs

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 10:11:08 UTC 2010

Modified Files:
src/sys/fs/msdosfs: msdosfs_vfsops.c

Log Message:
If getdisksize() fails (happens e.g. on fss block devices), don't
give up if we don't really need the information provided by it.


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/fs/msdosfs/msdosfs_vfsops.c

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

Modified files:

Index: src/sys/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.83 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.84
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.83	Sun Apr 11 10:26:25 2010
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Apr 13 10:11:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.83 2010/04/11 10:26:25 mlelstv Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.84 2010/04/13 10:11:08 pooka Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.83 2010/04/11 10:26:25 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.84 2010/04/13 10:11:08 pooka Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -489,8 +489,12 @@
 		goto error_exit;
 
 	error = getdisksize(devvp, psize, secsize);
-	if (error)
-		goto error_exit;
+	if (error) {
+		if (argp-flags  MSDOSFSMNT_GEMDOSFS)
+			goto error_exit;
+		secsize = DEV_BSIZE;
+		psize = 0;
+	}
 
 	if (argp-flags  MSDOSFSMNT_GEMDOSFS) {
 		bsize = secsize;



CVS commit: src/tests/fs

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 10:19:25 UTC 2010

Modified Files:
src/tests/fs/ffs: t_snapshot.c
Added Files:
src/tests/fs/common: snapshot.c

Log Message:
Split snapshot test into fs-independent backend and fs-specific frontend.

I really wish all our fs tests were like this (in principle, that
is.  I'm not talking about this hacky implementation).  I've been
wishing this for quite a few years now.  Seems like my wishes don't
come true.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/fs/common/snapshot.c
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/ffs/t_snapshot.c

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

Modified files:

Index: src/tests/fs/ffs/t_snapshot.c
diff -u src/tests/fs/ffs/t_snapshot.c:1.2 src/tests/fs/ffs/t_snapshot.c:1.3
--- src/tests/fs/ffs/t_snapshot.c:1.2	Mon Apr 12 23:15:24 2010
+++ src/tests/fs/ffs/t_snapshot.c	Tue Apr 13 10:19:25 2010
@@ -1,11 +1,8 @@
-/*	$NetBSD: t_snapshot.c,v 1.2 2010/04/12 23:15:24 pooka Exp $	*/
+/*	$NetBSD: t_snapshot.c,v 1.3 2010/04/13 10:19:25 pooka Exp $	*/
 
 #include sys/types.h
-#include sys/ioctl.h
 #include sys/mount.h
 
-#include dev/fssvar.h
-
 #include rump/rump.h
 #include rump/rump_syscalls.h
 
@@ -22,115 +19,25 @@
 
 #define IMGNAME ffs.img
 #define NEWFS newfs -F -s 1  IMGNAME
-#define BAKNAME /mnt/bak.img
-
-ATF_TC_WITH_CLEANUP(snapshot);
-ATF_TC_HEAD(snapshot, tc)
-{
-
-	atf_tc_set_md_var(tc, descr, basic snapshot features);
-}
+#define BAKNAME /mnt/le_snapp
 
 static void
-makefile(const char *path)
+mount_diskfs(const char *fspec, const char *path)
 {
-	int fd;
+	struct ufs_args uargs;
 
-	fd = rump_sys_open(path, O_CREAT | O_RDWR, 0777);
-	if (fd == -1)
-		atf_tc_fail_errno(create %s, path);
-	rump_sys_close(fd);
-}
+	uargs.fspec = __UNCONST(fspec);
 
-ATF_TC_BODY(snapshot, tc)
-{
-	char buf[1024];
-	struct ufs_args uargs;
-	struct fss_set fss;
-	int fssfd;
-	int fd, fd2;
-
-	if (system(NEWFS) == -1)
-		atf_tc_fail_errno(cannot create file system);
-
-	rump_init();
-
-	if (rump_sys_mkdir(/mnt, 0777) == -1)
-		atf_tc_fail_errno(mount point create);
-	if (rump_sys_mkdir(/snap, 0777) == -1)
-		atf_tc_fail_errno(mount point 2 create);
-
-	rump_pub_etfs_register(./ffs.img, ./ffs.img, RUMP_ETFS_BLK);
-
-	uargs.fspec = __UNCONST(./ffs.img);
-
-	if (rump_sys_mount(MOUNT_FFS, /mnt, 0, uargs, sizeof(uargs)) == -1)
-		atf_tc_fail_errno(mount ffs);
-
-#define TESTSTR1 huihai\n
-#define TESTSZ1 (sizeof(TESTSTR1)-1)
-#define TESTSTR2 baana liten\n
-#define TESTSZ2 (sizeof(TESTSTR2)-1)
-
-	fd = rump_sys_open(/mnt/myfile, O_RDWR | O_CREAT, 0777);
-	if (fd == -1)
-		atf_tc_fail_errno(create file);
-	if (rump_sys_write(fd, TESTSTR1, TESTSZ1) != TESTSZ1)
-		atf_tc_fail_errno(write fail);
-
-	fssfd = rump_sys_open(/dev/rfss0, O_RDWR);
-	if (fd == -1)
-		atf_tc_fail_errno(cannot open fss);
-	makefile(BAKNAME);
-	memset(fss, 0, sizeof(fss));
-	fss.fss_mount = __UNCONST(/mnt);
-	fss.fss_bstore = __UNCONST(BAKNAME);
-	fss.fss_csize = 0;
-	if (rump_sys_ioctl(fssfd, FSSIOCSET, fss) == -1)
-		atf_tc_fail_errno(create snapshot);
-
-	if (rump_sys_pwrite(fd, TESTSTR2, TESTSZ2, 0) != TESTSZ2)
-		atf_tc_fail_errno(write fail);
-	rump_sys_sync();
-
-	uargs.fspec = __UNCONST(/dev/fss0);
-
-	/* technically we should fsck it first? */
-	if (rump_sys_mount(MOUNT_FFS, /snap, 0, uargs, sizeof(uargs)) == -1)
-		atf_tc_fail_errno(mount snapshot);
-
-	/* check for old contents */
-	fd2 = rump_sys_open(/snap/myfile, O_RDONLY);
-	if (fd2 == -1)
-		atf_tc_fail_errno(fail);
-	memset(buf, 0, sizeof(buf));
-	if (rump_sys_read(fd2, buf, sizeof(buf)) == -1)
-		atf_tc_fail_errno(read snap);
-	ATF_CHECK(strcmp(buf, TESTSTR1) == 0);
-
-	/* check that new files are invisible in the snapshot */
-	makefile(/mnt/newfile);
-	if (rump_sys_open(/snap/newfile, O_RDONLY) != -1)
-		atf_tc_fail(newfile exists in snapshot);
-	if (errno != ENOENT)
-		atf_tc_fail_errno(newfile open should fail with ENOENT);
-
-	/* check that removed files are still visible in the snapshot */
-	rump_sys_unlink(/mnt/myfile);
-	if (rump_sys_open(/snap/myfile, O_RDONLY) == -1)
-		atf_tc_fail_errno(unlinked file no longer in snapshot);
+	if (rump_sys_mount(MOUNT_FFS, path, 0, uargs, sizeof(uargs)) == -1)
+		atf_tc_fail_errno(mount ffs %s\n, path);
 
-	/* done for now */
 }
 
-ATF_TC_CLEANUP(snapshot, tc)
+static void
+begin(void)
 {
 
-	unlink(IMGNAME);
+	/* empty */
 }
 
-ATF_TP_ADD_TCS(tp)
-{
-	ATF_TP_ADD_TC(tp, snapshot);
-	return 0;
-}
+#include ../common/snapshot.c

Added files:

Index: src/tests/fs/common/snapshot.c
diff -u /dev/null src/tests/fs/common/snapshot.c:1.1
--- /dev/null	Tue Apr 13 10:19:25 2010
+++ src/tests/fs/common/snapshot.c	Tue Apr 13 10:19:25 2010
@@ -0,0 +1,121 @@
+/*	$NetBSD: snapshot.c,v 1.1 2010/04/13 10:19:25 pooka Exp $	*/
+
+#include sys/types.h
+#include sys/ioctl.h
+#include sys/mount.h
+
+#include dev/fssvar.h
+
+#include atf-c.h
+#include fcntl.h

CVS commit: src/tests/fs/msdosfs

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 10:21:47 UTC 2010

Added Files:
src/tests/fs/msdosfs: Atffile Makefile t_snapshot.c

Log Message:
Add msdosfs snapshot test.  This one just slightly different from
the ffs test because msdosfs doesn't support VFS_SNAPSHOT, only
VFS_SUSPEND, i.e. we need external storage for the snapshot instead
of internal storage.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/fs/msdosfs/Atffile \
src/tests/fs/msdosfs/Makefile src/tests/fs/msdosfs/t_snapshot.c

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

Added files:

Index: src/tests/fs/msdosfs/Atffile
diff -u /dev/null src/tests/fs/msdosfs/Atffile:1.1
--- /dev/null	Tue Apr 13 10:21:47 2010
+++ src/tests/fs/msdosfs/Atffile	Tue Apr 13 10:21:47 2010
@@ -0,0 +1,6 @@
+Content-Type: application/X-atf-atffile; version=1
+X-NetBSD-Id: $NetBSD: Atffile,v 1.1 2010/04/13 10:21:47 pooka Exp $
+
+prop: test-suite = NetBSD
+
+tp-glob: t_*
Index: src/tests/fs/msdosfs/Makefile
diff -u /dev/null src/tests/fs/msdosfs/Makefile:1.1
--- /dev/null	Tue Apr 13 10:21:47 2010
+++ src/tests/fs/msdosfs/Makefile	Tue Apr 13 10:21:47 2010
@@ -0,0 +1,14 @@
+#	$NetBSD: Makefile,v 1.1 2010/04/13 10:21:47 pooka Exp $
+#
+
+TESTSDIR=	${TESTSBASE}/fs/msdosfs
+WARNS=		4
+
+TESTS_C=	t_snapshot
+
+LDADD+=-lrumpfs_msdos -lrumpfs_tmpfs# fs drivers
+LDADD+=-lrumpdev_fss		# snapshot dev
+LDADD+=-lrumpdev_disk -lrumpdev	# disk device
+LDADD+=-lrumpvfs -lrump -lrumpuser -lpthread			# base
+
+.include bsd.test.mk
Index: src/tests/fs/msdosfs/t_snapshot.c
diff -u /dev/null src/tests/fs/msdosfs/t_snapshot.c:1.1
--- /dev/null	Tue Apr 13 10:21:47 2010
+++ src/tests/fs/msdosfs/t_snapshot.c	Tue Apr 13 10:21:47 2010
@@ -0,0 +1,52 @@
+/*	$NetBSD: t_snapshot.c,v 1.1 2010/04/13 10:21:47 pooka Exp $	*/
+
+#include sys/types.h
+#include sys/mount.h
+
+#include rump/rump.h
+#include rump/rump_syscalls.h
+
+#include fs/tmpfs/tmpfs_args.h
+#include msdosfs/msdosfsmount.h
+
+#include atf-c.h
+#include err.h
+#include fcntl.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+#include ../../h_macros.h
+
+#define IMGNAME msdosfs.img
+#define NEWFS newfs_msdos -C 5M  IMGNAME
+#define BAKNAME /stor/snap
+
+static void
+mount_diskfs(const char *fspec, const char *path)
+{
+	struct msdosfs_args margs;
+
+	memset(margs, 0, sizeof(margs));
+	margs.fspec = __UNCONST(fspec);
+	margs.version = MSDOSFSMNT_VERSION;
+
+	if (rump_sys_mount(MOUNT_MSDOS, path, 0, margs, sizeof(margs)) == -1)
+		err(1, mount msdosfs %s, path);
+}
+
+static void
+begin(void)
+{
+	struct tmpfs_args targs;
+
+	targs.ta_version = TMPFS_ARGS_VERSION;
+
+	if (rump_sys_mkdir(/stor, 0777) == -1)
+		atf_tc_fail_errno(mkdir /stor);
+	if (rump_sys_mount(MOUNT_TMPFS, /stor, 0, targs,sizeof(targs)) == -1)
+		atf_tc_fail_errno(mount storage);
+}
+
+#include ../common/snapshot.c



CVS commit: src

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 10:27:52 UTC 2010

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.base
src/tests/fs: Makefile

Log Message:
Build  install msdosfs snapshot test and deal with the happy happy
joy joy setlistdist etcetc. stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.15 -r1.16 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.8 -r1.9 src/tests/fs/Makefile

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.69 src/distrib/sets/lists/tests/mi:1.70
--- src/distrib/sets/lists/tests/mi:1.69	Mon Apr 12 22:59:49 2010
+++ src/distrib/sets/lists/tests/mi	Tue Apr 13 10:27:52 2010
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.69 2010/04/12 22:59:49 pooka Exp $
+# $NetBSD: mi,v 1.70 2010/04/13 10:27:52 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -116,6 +116,8 @@
 ./usr/libdata/debug/usr/tests/fs/ffs/t_snapshot.debug			tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/kernfs	tests-fs-debug
 ./usr/libdata/debug/usr/tests/fs/kernfs/t_basic.debug			tests-fs-debug		debug,atf
+./usr/libdata/debug/usr/tests/fs/msdosfstests-fs-debug
+./usr/libdata/debug/usr/tests/fs/msdosfs/t_snapshot.debug		tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/nullfs	tests-fs-debug
 ./usr/libdata/debug/usr/tests/fs/nullfs/t_basic.debug			tests-fs-debug		debug,atf
 ./usr/libdata/debug/usr/tests/fs/puffs	tests-fs-debug
@@ -570,6 +572,9 @@
 ./usr/tests/fs/kernfstests-fs-tests
 ./usr/tests/fs/kernfs/Atffile			tests-fs-tests		atf
 ./usr/tests/fs/kernfs/t_basic			tests-fs-tests		atf
+./usr/tests/fs/msdosfstests-fs-tests
+./usr/tests/fs/msdosfs/Atffile			tests-fs-tests		atf
+./usr/tests/fs/msdosfs/t_snapshot		tests-fs-tests		atf
 ./usr/tests/fs/nullfstests-fs-tests
 ./usr/tests/fs/nullfs/Atffile			tests-fs-tests		atf
 ./usr/tests/fs/nullfs/t_basic			tests-fs-tests		atf

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.15 src/etc/mtree/NetBSD.dist.base:1.16
--- src/etc/mtree/NetBSD.dist.base:1.15	Wed Mar 31 19:18:39 2010
+++ src/etc/mtree/NetBSD.dist.base	Tue Apr 13 10:27:52 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.15 2010/03/31 19:18:39 pooka Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.16 2010/04/13 10:27:52 pooka Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -199,6 +199,7 @@
 ./usr/libdata/debug/usr/tests/fs
 ./usr/libdata/debug/usr/tests/fs/ffs
 ./usr/libdata/debug/usr/tests/fs/kernfs
+./usr/libdata/debug/usr/tests/fs/msdosfs
 ./usr/libdata/debug/usr/tests/fs/nullfs
 ./usr/libdata/debug/usr/tests/fs/puffs
 ./usr/libdata/debug/usr/tests/fs/tmpfs
@@ -1088,6 +1089,7 @@
 ./usr/tests/fs
 ./usr/tests/fs/ffs
 ./usr/tests/fs/kernfs
+./usr/tests/fs/msdosfs
 ./usr/tests/fs/nullfs
 ./usr/tests/fs/puffs
 ./usr/tests/fs/tmpfs

Index: src/tests/fs/Makefile
diff -u src/tests/fs/Makefile:1.8 src/tests/fs/Makefile:1.9
--- src/tests/fs/Makefile:1.8	Wed Mar 31 19:14:30 2010
+++ src/tests/fs/Makefile	Tue Apr 13 10:27:52 2010
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.8 2010/03/31 19:14:30 pooka Exp $
+# $NetBSD: Makefile,v 1.9 2010/04/13 10:27:52 pooka Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/fs
 
-SUBDIR+=	ffs kernfs nullfs puffs tmpfs umapfs union
+SUBDIR+=	ffs kernfs msdosfs nullfs puffs tmpfs umapfs union
 
 FILES= h_funcs.subr
 FILESDIR= ${TESTSDIR}



CVS commit: src/lib/libc/sys

2010-04-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 13 10:45:46 UTC 2010

Modified Files:
src/lib/libc/sys: kqueue.2

Log Message:
Uncomment pdf link for paper.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/kqueue.2

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/sys/kqueue.2
diff -u src/lib/libc/sys/kqueue.2:1.28 src/lib/libc/sys/kqueue.2:1.29
--- src/lib/libc/sys/kqueue.2:1.28	Tue Apr 13 09:24:09 2010
+++ src/lib/libc/sys/kqueue.2	Tue Apr 13 10:45:46 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: kqueue.2,v 1.28 2010/04/13 09:24:09 jruoho Exp $
+.\	$NetBSD: kqueue.2,v 1.29 2010/04/13 10:45:46 wiz Exp $
 .\
 .\ Copyright (c) 2000 Jonathan Lemon
 .\ All rights reserved.
@@ -606,7 +606,7 @@
 .%I USENIX Association
 .%B Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference
 .%D June 25-30, 2001
-.\.http://www.usenix.org/event/usenix01/freenix01/full_papers/lemon/lemon.pdf
+.%U http://www.usenix.org/event/usenix01/freenix01/full_papers/lemon/lemon.pdf
 .Re
 .Sh HISTORY
 The



CVS commit: src

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 10:46:10 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man3: Makefile

Log Message:
Hook rb(3) to the build.


To generate a diff of this commit:
cvs rdiff -u -r1.1429 -r1.1430 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.46 -r1.47 src/share/man/man3/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1429 src/distrib/sets/lists/comp/mi:1.1430
--- src/distrib/sets/lists/comp/mi:1.1429	Tue Apr 13 08:40:19 2010
+++ src/distrib/sets/lists/comp/mi	Tue Apr 13 10:46:10 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1429 2010/04/13 08:40:19 jruoho Exp $
+#	$NetBSD: mi,v 1.1430 2010/04/13 10:46:10 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -7633,6 +7633,13 @@
 ./usr/share/man/cat3/randomid_delete.0		comp-c-catman		.cat
 ./usr/share/man/cat3/randomid_new.0		comp-c-catman		.cat
 ./usr/share/man/cat3/raw.0			comp-c-catman		.cat
+./usr/share/man/cat3/rb.0			comp-c-catman		.cat
+./usr/share/man/cat3/rb_tree_find_node.0	comp-c-catman		.cat
+./usr/share/man/cat3/rb_tree_find_node_geq.0	comp-c-catman		.cat
+./usr/share/man/cat3/rb_tree_find_node_leq.0	comp-c-catman		.cat
+./usr/share/man/cat3/rb_tree_init.0		comp-c-catman		.cat
+./usr/share/man/cat3/rb_tree_insert_node.0	comp-c-catman		.cat
+./usr/share/man/cat3/rb_tree_iterate.0		comp-c-catman		.cat
 ./usr/share/man/cat3/rc4.0			comp-obsolete		obsolete
 ./usr/share/man/cat3/rcmd.0			comp-c-catman		.cat
 ./usr/share/man/cat3/rcmd_af.0			comp-c-catman		.cat
@@ -13387,6 +13394,13 @@
 ./usr/share/man/html3/randomid_delete.html	comp-c-htmlman		html
 ./usr/share/man/html3/randomid_new.html		comp-c-htmlman		html
 ./usr/share/man/html3/raw.html			comp-c-htmlman		html
+./usr/share/man/html3/rb.html			comp-c-htmlman		html
+./usr/share/man/html3/rb_tree_find_node.html	comp-c-htmlman		html
+./usr/share/man/html3/rb_tree_find_node_geq.html	comp-c-htmlman		html
+./usr/share/man/html3/rb_tree_find_node_leq.html	comp-c-htmlman		html
+./usr/share/man/html3/rb_tree_init.html		comp-c-htmlman		html
+./usr/share/man/html3/rb_tree_insert_node.html	comp-c-htmlman		html
+./usr/share/man/html3/rb_tree_iterate.html	comp-c-htmlman		html
 ./usr/share/man/html3/rcmd.html			comp-c-htmlman		html
 ./usr/share/man/html3/rcmd_af.html		comp-c-htmlman		html
 ./usr/share/man/html3/re_comp.html		comp-c-htmlman		html
@@ -19141,6 +19155,13 @@
 ./usr/share/man/man3/randomid_delete.3		comp-c-man		.man
 ./usr/share/man/man3/randomid_new.3		comp-c-man		.man
 ./usr/share/man/man3/raw.3			comp-c-man		.man
+./usr/share/man/man3/rb.3			comp-c-man		.man
+./usr/share/man/man3/rb_tree_find_node.3	comp-c-man		.man
+./usr/share/man/man3/rb_tree_find_node_geq.3	comp-c-man		.man
+./usr/share/man/man3/rb_tree_find_node_leq.3	comp-c-man		.man
+./usr/share/man/man3/rb_tree_init.3		comp-c-man		.man
+./usr/share/man/man3/rb_tree_insert_node.3	comp-c-man		.man
+./usr/share/man/man3/rb_tree_iterate.3		comp-c-man		.man
 ./usr/share/man/man3/rc4.3			comp-obsolete		obsolete
 ./usr/share/man/man3/rcmd.3			comp-c-man		.man
 ./usr/share/man/man3/rcmd_af.3			comp-c-man		.man

Index: src/share/man/man3/Makefile
diff -u src/share/man/man3/Makefile:1.46 src/share/man/man3/Makefile:1.47
--- src/share/man/man3/Makefile:1.46	Thu Mar 25 06:56:20 2010
+++ src/share/man/man3/Makefile	Tue Apr 13 10:46:10 2010
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.46 2010/03/25 06:56:20 jruoho Exp $
+#	$NetBSD: Makefile,v 1.47 2010/04/13 10:46:10 jruoho Exp $
 #	@(#)Makefile	8.2 (Berkeley) 12/13/93
 
 MAN=	_DIAGASSERT.3 __UNCONST.3 CMSG_DATA.3 \
 	__arraycount.3 assert.3 bits.3 bitstring.3 dlfcn.3 end.3 \
 	fast_divide32.3 gcq.3 intro.3 inttypes.3 iso646.3 offsetof.3 queue.3 \
-	stdarg.3 stdbool.3 stddef.3 stdint.3 stdlib.3 sysexits.3 \
+	rb.3 stdarg.3 stdbool.3 stddef.3 stdint.3 stdlib.3 sysexits.3 \
 	tgmath.3 timeradd.3 tree.3 varargs.3
 
 USETBL=	# used by queue.3
@@ -188,6 +188,12 @@
 	queue.3 CIRCLEQ_PREV.3 \
 	queue.3 CIRCLEQ_LOOP_NEXT.3 \
 	queue.3 CIRCLEQ_LOOP_PREV.3
+MLINKS+=rb.3 rb_tree_init.3 \
+	rb.3 rb_tree_insert_node.3 \
+	rb.3 rb_tree_find_node.3 \
+	rb.3 rb_tree_find_node_geq.3 \
+	rb.3 rb_tree_find_node_leq.3 \
+	rb.3 rb_tree_iterate.3
 MLINKS+=stdarg.3 va_arg.3 stdarg.3 va_copy.3 \
 	stdarg.3 va_end.3 stdarg.3 va_start.3
 MLINKS+=dlfcn.3 dlopen.3 dlfcn.3 dlclose.3 dlfcn.3 dlsym.3 dlfcn.3 dlctl.3 \



CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 11:01:22 UTC 2010

Modified Files:
src/share/man/man9: ctod.9

Log Message:
Add HISTORY.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/ctod.9

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/man9/ctod.9
diff -u src/share/man/man9/ctod.9:1.2 src/share/man/man9/ctod.9:1.3
--- src/share/man/man9/ctod.9:1.2	Tue Apr 13 09:57:05 2010
+++ src/share/man/man9/ctod.9	Tue Apr 13 11:01:22 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: ctod.9,v 1.2 2010/04/13 09:57:05 jruoho Exp $
+.\ $NetBSD: ctod.9,v 1.3 2010/04/13 11:01:22 jruoho Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -72,6 +72,9 @@
 and
 .Fn btopr
 in Solaris.
+.Sh HISTORY
+Some of these macros appeared in
+.At v7 .
 .Sh CAVEATS
 The described macros make no assumptions
 about the type of the input parameter.



CVS commit: src/sys/arch/atari/atari

2010-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 11:22:22 UTC 2010

Modified Files:
src/sys/arch/atari/atari: atari_init.c bus.c disksubr.c intr.c
machdep.c stalloc.c

Log Message:
Misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/atari/atari/bus.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/atari/atari/disksubr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/atari/atari/intr.c
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/atari/atari/stalloc.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/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.92 src/sys/arch/atari/atari/atari_init.c:1.93
--- src/sys/arch/atari/atari/atari_init.c:1.92	Fri Dec 11 22:23:08 2009
+++ src/sys/arch/atari/atari/atari_init.c	Tue Apr 13 11:22:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.92 2009/12/11 22:23:08 tsutsui Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.93 2010/04/13 11:22:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: atari_init.c,v 1.92 2009/12/11 22:23:08 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: atari_init.c,v 1.93 2010/04/13 11:22:22 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_mbtype.h
@@ -525,7 +525,7 @@
 		lp = (paddr_t *)0;
 		le = (paddr_t *)pstart;
 		fp = (paddr_t *)kbase;
-		while(lp  le)
+		while (lp  le)
 			*fp++ = *lp++;
 	}
 #if defined(M68040) || defined(M68060)
@@ -747,7 +747,7 @@
 #else
 	pg_proto  = STIO_PHYS | PG_RW | PG_CI | PG_V;
 #endif
-	while(pg  epg) {
+	while (pg  epg) {
 		*pg++ = pg_proto;
 		pg_proto += PAGE_SIZE;
 	}

Index: src/sys/arch/atari/atari/bus.c
diff -u src/sys/arch/atari/atari/bus.c:1.52 src/sys/arch/atari/atari/bus.c:1.53
--- src/sys/arch/atari/atari/bus.c:1.52	Wed Mar 31 13:15:52 2010
+++ src/sys/arch/atari/atari/bus.c	Tue Apr 13 11:22:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.52 2010/03/31 13:15:52 tsutsui Exp $	*/
+/*	$NetBSD: bus.c,v 1.53 2010/04/13 11:22:22 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus.c,v 1.52 2010/03/31 13:15:52 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus.c,v 1.53 2010/04/13 11:22:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -110,7 +110,7 @@
 	pg_proto = pa | PG_RW | PG_V;
 	if (!(flags  BUS_SPACE_MAP_CACHEABLE))
 		pg_proto |= PG_CI;
-	while(pg  epg) {
+	while (pg  epg) {
 		*pg++ = pg_proto;
 		pg_proto += PAGE_SIZE;
 #if defined(M68040) || defined(M68060)
@@ -245,7 +245,7 @@
 
 	*bshp = va + (bpa  PGOFSET);
 
-	for(; pa  endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
+	for (; pa  endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
 		u_int	*ptep, npte;
 
 		pmap_enter(pmap_kernel(), (vaddr_t)va, pa,

Index: src/sys/arch/atari/atari/disksubr.c
diff -u src/sys/arch/atari/atari/disksubr.c:1.42 src/sys/arch/atari/atari/disksubr.c:1.43
--- src/sys/arch/atari/atari/disksubr.c:1.42	Wed Mar 31 14:12:55 2010
+++ src/sys/arch/atari/atari/disksubr.c	Tue Apr 13 11:22:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.42 2010/03/31 14:12:55 tsutsui Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.43 2010/04/13 11:22:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.42 2010/03/31 14:12:55 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.43 2010/04/13 11:22:22 tsutsui Exp $);
 
 #ifndef DISKLABEL_NBDA
 #define	DISKLABEL_NBDA	/* required */
@@ -509,7 +509,7 @@
 break;
 		}
 		if (pno  0) {
-			if((pno = user_part + 1) = MAXPARTITIONS)
+			if ((pno = user_part + 1) = MAXPARTITIONS)
 continue;
 			user_part = pno;
 		}

Index: src/sys/arch/atari/atari/intr.c
diff -u src/sys/arch/atari/atari/intr.c:1.21 src/sys/arch/atari/atari/intr.c:1.22
--- src/sys/arch/atari/atari/intr.c:1.21	Wed Mar 31 14:12:55 2010
+++ src/sys/arch/atari/atari/intr.c	Tue Apr 13 11:22:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.21 2010/03/31 14:12:55 tsutsui Exp $	*/
+/*	$NetBSD: intr.c,v 1.22 2010/04/13 11:22:22 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.21 2010/03/31 14:12:55 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.22 2010/04/13 11:22:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -226,7 +226,7 @@
 	struct intrhand	*cur_vec;
 
 	vector = ih-ih_vector;
-	switch(ih-ih_type  (AUTO_VEC|USER_VEC)) {
+	switch (ih-ih_type  (AUTO_VEC|USER_VEC)) {
 	case AUTO_VEC:
 		if (vector  AVEC_MIN || vector  AVEC_MAX)
 			return 0;

Index: src/sys/arch/atari/atari/machdep.c
diff -u 

CVS commit: src/sys/arch/atari

2010-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 11:31:11 UTC 2010

Modified Files:
src/sys/arch/atari/dev: fd.c grf.c grfabs_et.c grfabs_fal.c grfabs_tt.c
hdfd.c ite.c ite_et.c kbd.c view.c
src/sys/arch/atari/isa: isa_machdep.c
src/sys/arch/atari/pci: pci_machdep.c
src/sys/arch/atari/vme: et4000.c if_le_vme.c vme_machdep.c

Log Message:
Misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/atari/dev/grfabs_et.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/dev/grfabs_fal.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/dev/grfabs_tt.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/atari/dev/kbd.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/atari/dev/view.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/atari/isa/isa_machdep.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/atari/pci/pci_machdep.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/atari/vme/et4000.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/vme/if_le_vme.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/atari/vme/vme_machdep.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/atari/dev/fd.c
diff -u src/sys/arch/atari/dev/fd.c:1.75 src/sys/arch/atari/dev/fd.c:1.76
--- src/sys/arch/atari/dev/fd.c:1.75	Wed Apr  7 13:53:05 2010
+++ src/sys/arch/atari/dev/fd.c	Tue Apr 13 11:31:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.75 2010/04/07 13:53:05 tsutsui Exp $	*/
+/*	$NetBSD: fd.c,v 1.76 2010/04/13 11:31:11 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.75 2010/04/07 13:53:05 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.76 2010/04/13 11:31:11 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -487,7 +487,7 @@
 		tsleep((void *)sc, PRIBIO, fdopen, 0);
 	splx(s);
 
-	if((sc-flags  FLPF_ISOPEN) == 0) {
+	if ((sc-flags  FLPF_ISOPEN) == 0) {
 		/*
 		 * Initialise some driver values.
 		 */

Index: src/sys/arch/atari/dev/grf.c
diff -u src/sys/arch/atari/dev/grf.c:1.42 src/sys/arch/atari/dev/grf.c:1.43
--- src/sys/arch/atari/dev/grf.c:1.42	Tue Apr 13 09:51:07 2010
+++ src/sys/arch/atari/dev/grf.c	Tue Apr 13 11:31:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf.c,v 1.42 2010/04/13 09:51:07 tsutsui Exp $	*/
+/*	$NetBSD: grf.c,v 1.43 2010/04/13 11:31:11 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -85,7 +85,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: grf.c,v 1.42 2010/04/13 09:51:07 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: grf.c,v 1.43 2010/04/13 11:31:11 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -159,36 +159,38 @@
 int
 grfbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
 {
-	if(strcmp(auxp, grfbus_cd.cd_name))
-		return(0);
 
-	if(atari_realconfig == 0)
+	if (strcmp(auxp, grfbus_cd.cd_name))
+		return 0;
+
+	if (atari_realconfig == 0)
 		cfdata_gbus = cfp;
-	return(1);	/* Always there	*/
+	return 1;	/* Always there	*/
 }
 
 void
 grfbusattach(struct device *pdp, struct device *dp, void *auxp)
 {
-grf_auxp_t	grf_auxp;
+	grf_auxp_t	grf_auxp;
 
-grf_auxp.busprint   = grfbusprint;
-grf_auxp.from_bus_match = 1;
+	grf_auxp.busprint   = grfbusprint;
+	grf_auxp.from_bus_match = 1;
 
-if(dp == NULL) /* Console init	*/
-	atari_config_found(cfdata_gbus, NULL, (void*)grf_auxp, grfbusprint);
-else {
-	printf(\n);
-	config_found(dp, (void*)grf_auxp, grfbusprint);
-}
+	if (dp == NULL) /* Console init	*/
+		atari_config_found(cfdata_gbus, NULL, grf_auxp, grfbusprint);
+	else {
+		printf(\n);
+		config_found(dp, grf_auxp, grfbusprint);
+	}
 }
 
 int
 grfbusprint(void *auxp, const char *name)
 {
-	if(name == NULL)
-		return(UNCONF);
-	return(QUIET);
+
+	if (name == NULL)
+		return UNCONF;
+	return QUIET;
 }
 
 /*ARGSUSED*/
@@ -198,20 +200,20 @@
 	struct grf_softc *gp;
 
 	if (GRFUNIT(dev) = NGRF)
-		return(ENXIO);
+		return ENXIO;
 
 	gp = grfsp[GRFUNIT(dev)];
 	if (gp == NULL)
-		return(ENXIO);
+		return ENXIO;
 
 	if ((gp-g_flags  GF_ALIVE) == 0)
-		return(ENXIO);
+		return ENXIO;
 
 	if ((gp-g_flags  (GF_OPEN|GF_EXCLUDE)) == (GF_OPEN|GF_EXCLUDE))
-		return(EBUSY);
+		return EBUSY;
 	grf_viewsync(gp);
 
-	return(0);
+	return 0;
 }
 
 /*ARGSUSED*/
@@ -223,7 +225,7 @@
 	gp = grfsp[GRFUNIT(dev)];
 	(void)grfoff(dev);
 	gp-g_flags = GF_ALIVE;
-	return(0);
+	return 0;
 }
 
 /*ARGSUSED*/
@@ -255,14 +257,14 @@
 		error = grfsinfo(dev, (struct grfdyninfo *) data);
 		break;
 	case GRFGETVMODE:
-		return(gp-g_mode(gp, GM_GRFGETVMODE, data, 0, 0));
+		return gp-g_mode(gp, GM_GRFGETVMODE, data, 0, 0);
 	case GRFSETVMODE:
 		error = 

CVS commit: src/sys/dist/pf/net

2010-04-13 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Apr 13 11:53:18 UTC 2010

Modified Files:
src/sys/dist/pf/net: pf_ioctl.c

Log Message:
change module class to driver.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dist/pf/net/pf_ioctl.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/dist/pf/net/pf_ioctl.c
diff -u src/sys/dist/pf/net/pf_ioctl.c:1.39 src/sys/dist/pf/net/pf_ioctl.c:1.40
--- src/sys/dist/pf/net/pf_ioctl.c:1.39	Tue Apr 13 01:02:43 2010
+++ src/sys/dist/pf/net/pf_ioctl.c	Tue Apr 13 11:53:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pf_ioctl.c,v 1.39 2010/04/13 01:02:43 ahoka Exp $	*/
+/*	$NetBSD: pf_ioctl.c,v 1.40 2010/04/13 11:53:18 ahoka Exp $	*/
 /*	$OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pf_ioctl.c,v 1.39 2010/04/13 01:02:43 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pf_ioctl.c,v 1.40 2010/04/13 11:53:18 ahoka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -3343,7 +3343,7 @@
 #endif /* __NetBSD__ */
 
 #if defined(__NetBSD__)
-MODULE(MODULE_CLASS_MISC, pf, bpf);
+MODULE(MODULE_CLASS_DRIVER, pf, bpf);
 
 static int
 pf_modcmd(modcmd_t cmd, void *opaque)



CVS commit: src/sys/miscfs/specfs

2010-04-13 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Apr 13 11:54:43 UTC 2010

Modified Files:
src/sys/miscfs/specfs: spec_vnops.c

Log Message:
Revert my last change, it's not The Right Thing [tm].


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/miscfs/specfs/spec_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/miscfs/specfs/spec_vnops.c
diff -u src/sys/miscfs/specfs/spec_vnops.c:1.128 src/sys/miscfs/specfs/spec_vnops.c:1.129
--- src/sys/miscfs/specfs/spec_vnops.c:1.128	Tue Apr 13 01:15:56 2010
+++ src/sys/miscfs/specfs/spec_vnops.c	Tue Apr 13 11:54:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec_vnops.c,v 1.128 2010/04/13 01:15:56 ahoka Exp $	*/
+/*	$NetBSD: spec_vnops.c,v 1.129 2010/04/13 11:54:43 ahoka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: spec_vnops.c,v 1.128 2010/04/13 01:15:56 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: spec_vnops.c,v 1.129 2010/04/13 11:54:43 ahoka Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -460,7 +460,7 @@
 			
 			/* Try to autoload device module */
 			mutex_enter(module_lock);
-			(void) module_autoload(name, MODULE_CLASS_ANY);
+			(void) module_autoload(name, MODULE_CLASS_DRIVER);
 			mutex_exit(module_lock);
 		} while (gen != module_gen);
 



CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 12:04:25 UTC 2010

Modified Files:
src/share/man/man9: cpu_configure.9 cpu_startup.9

Log Message:
Small changes to wording and markup.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/cpu_configure.9
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/cpu_startup.9

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/man9/cpu_configure.9
diff -u src/share/man/man9/cpu_configure.9:1.5 src/share/man/man9/cpu_configure.9:1.6
--- src/share/man/man9/cpu_configure.9:1.5	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/cpu_configure.9	Tue Apr 13 12:04:25 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: cpu_configure.9,v 1.5 2008/04/30 13:10:58 martin Exp $
+.\ $NetBSD: cpu_configure.9,v 1.6 2010/04/13 12:04:25 jruoho Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd May 23, 2002
+.Dd April 13, 2010
 .Dt CPU_CONFIGURE 9
 .Os
 .Sh NAME
@@ -38,28 +38,36 @@
 .Ft void
 .Fn cpu_configure void
 .Sh DESCRIPTION
+The machine-dependent
 .Fn cpu_configure
 is called during system bootstrap to perform the machine-dependent
 portion of device autoconfiguration.
-It sets the configuration machinery in motion by finding the root
-bus (mainbus).
+It sets the configuration machinery in motion by finding the root bus
+.Pq Dq mainbus .
 When this function returns, interrupts must be enabled.
 .Pp
-.Fn cpu_configure
-performs the following tasks:
-.Bl -bullet
+The following tasks are performed by
+.Fn cpu_configure :
+.Bl -bullet -offset indent
 .It
 initialize soft interrupts (see
-.Xr softintr 9 )
+.Xr softintr 9 ) ;
 .It
-initialize CPU interrupts and SPLs
+initialize
+.Tn CPU
+interrupts and
+.Tn SPLs
+(see
+.Xr spl 9 ) ;
 .It
 call
 .Fn config_rootfound
-for mainbus
+for
+.Dq mainbus ;
+and
 .It
 complete any initialization deferred from
-.Fn cpu_startup .
+.Xr cpu_startup 9 .
 .El
 .Sh SEE ALSO
 .Xr autoconf 9 ,

Index: src/share/man/man9/cpu_startup.9
diff -u src/share/man/man9/cpu_startup.9:1.6 src/share/man/man9/cpu_startup.9:1.7
--- src/share/man/man9/cpu_startup.9:1.6	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/cpu_startup.9	Tue Apr 13 12:04:25 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: cpu_startup.9,v 1.6 2008/04/30 13:10:58 martin Exp $
+.\ $NetBSD: cpu_startup.9,v 1.7 2010/04/13 12:04:25 jruoho Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,31 +27,36 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 27, 2006
+.Dd April 13, 2010
 .Dt CPU_STARTUP 9
 .Os
 .Sh NAME
 .Nm cpu_startup
-.Nd machine-dependent CPU startup
+.Nd machine-dependent
+.Tn CPU
+startup
 .Sh SYNOPSIS
 .In sys/systm.h
 .Ft void
 .Fn cpu_startup void
 .Sh DESCRIPTION
+The machine-dependent
 .Fn cpu_startup
 is invoked early during system bootstrap, after the console
 has been set up and immediately after
 .Xr uvm 9
 has been initialized.
-.Fn cpu_startup
-performs the following tasks:
-.Bl -bullet
+.Pp
+The following tasks are performed by
+.Fn cpu_startup :
+.Bl -bullet -offset indent
 .It
-prints the initial copyright message
+print the initial copyright message;
 .It
-allocate memory and buffers for kernel tables
+allocate memory and buffers for kernel tables; and
 .It
-initialize the CPU
+initialize the
+.Tn CPU .
 .El
 .Sh SEE ALSO
 .Xr autoconf 9 ,



CVS commit: src/sys/dist/pf/net

2010-04-13 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Apr 13 13:08:16 UTC 2010

Modified Files:
src/sys/dist/pf/net: pf_ioctl.c

Log Message:
Do not unload pf when enabled, not even manually.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dist/pf/net/pf_ioctl.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/dist/pf/net/pf_ioctl.c
diff -u src/sys/dist/pf/net/pf_ioctl.c:1.40 src/sys/dist/pf/net/pf_ioctl.c:1.41
--- src/sys/dist/pf/net/pf_ioctl.c:1.40	Tue Apr 13 11:53:18 2010
+++ src/sys/dist/pf/net/pf_ioctl.c	Tue Apr 13 13:08:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pf_ioctl.c,v 1.40 2010/04/13 11:53:18 ahoka Exp $	*/
+/*	$NetBSD: pf_ioctl.c,v 1.41 2010/04/13 13:08:16 ahoka Exp $	*/
 /*	$OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pf_ioctl.c,v 1.40 2010/04/13 11:53:18 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pf_ioctl.c,v 1.41 2010/04/13 13:08:16 ahoka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -3364,15 +3364,12 @@
 		pflogattach(1);
 		return 0;
 	case MODULE_CMD_FINI:
-		pfdetach();
-		pflogdetach();
-		return devsw_detach(NULL, pf_cdevsw);
-	case MODULE_CMD_AUTOUNLOAD:
-		/* Do not auto unload pf if it's enabled. */
 		if (pf_status.running) {
 			return EBUSY;
 		} else {
-			return ENOTTY;
+			pfdetach();
+			pflogdetach();
+			return devsw_detach(NULL, pf_cdevsw);
 		}
 	default:
 		return ENOTTY;



CVS commit: src/sys/modules/pf

2010-04-13 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Tue Apr 13 13:09:46 UTC 2010

Removed Files:
src/sys/modules/pf: bpfilter.h

Log Message:
Remove bpfilter.h as not needed.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/modules/pf/bpfilter.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/atari/dev

2010-04-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 13 13:29:35 UTC 2010

Modified Files:
src/sys/arch/atari/dev: ite_cc.c

Log Message:
Misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/atari/dev/ite_cc.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/atari/dev/ite_cc.c
diff -u src/sys/arch/atari/dev/ite_cc.c:1.35 src/sys/arch/atari/dev/ite_cc.c:1.36
--- src/sys/arch/atari/dev/ite_cc.c:1.35	Tue Feb  9 23:05:16 2010
+++ src/sys/arch/atari/dev/ite_cc.c	Tue Apr 13 13:29:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_cc.c,v 1.35 2010/02/09 23:05:16 wiz Exp $	*/
+/*	$NetBSD: ite_cc.c,v 1.36 2010/04/13 13:29:35 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1996 Leo Weppelman
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ite_cc.c,v 1.35 2010/02/09 23:05:16 wiz Exp $);
+__KERNEL_RCSID(0, $NetBSD: ite_cc.c,v 1.36 2010/04/13 13:29:35 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -130,9 +130,9 @@
 int
 grfccmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
 {
-	static int	did_consinit = 0;
-	static int	must_probe = 1;
-	grf_auxp_t	*grf_auxp = auxp;
+	static int did_consinit = 0;
+	static int must_probe = 1;
+	grf_auxp_t *grf_auxp = auxp;
 	extern const struct cdevsw view_cdevsw;
 
 	if (must_probe) {
@@ -140,15 +140,15 @@
 		 * Check if the layers we depend on exist
 		 */
 		if (!(machineid  (ATARI_TT|ATARI_FALCON)))
-			return (0);
+			return 0;
 #ifdef TT_VIDEO
 		if ((machineid  ATARI_TT)  !grfabs_probe(tt_probe_video))
-			return (0);
+			return 0;
 #endif /* TT_VIDEO */
 #ifdef FALCON_VIDEO
-		if ((machineid  ATARI_FALCON)
-		 !grfabs_probe(falcon_probe_video))
-			return (0);
+		if ((machineid  ATARI_FALCON) 
+		!grfabs_probe(falcon_probe_video))
+			return 0;
 #endif /* FALCON_VIDEO */
 
 		viewprobe();
@@ -160,12 +160,12 @@
 		 * Early console init. Only match first unit.
 		 */
 		if (did_consinit)
-			return(0);
+			return 0;
 		if ((*view_cdevsw.d_open)(cfp-cf_unit, 0, 0, NULL))
-			return(0);
+			return 0;
 		cfdata_grf = cfp;
 		did_consinit = 1;
-		return (1);
+		return 1;
 	}
 
 	/*
@@ -174,20 +174,20 @@
 	 * the other configured units.
 	 */
 	if (grf_auxp-from_bus_match  (did_consinit  1))
-		return (0);
+		return 0;
 
 	if (!grf_auxp-from_bus_match  (grf_auxp-unit != cfp-cf_unit))
-		return (0);
+		return 0;
 
 	/*
 	 * Final constraint: each grf needs a view
 	 */
-	if((cfdata_grf == NULL) || (did_consinit  1)) {
-	if((*view_cdevsw.d_open)(cfp-cf_unit, 0, 0, NULL))
-		return(0);
+	if ((cfdata_grf == NULL) || (did_consinit  1)) {
+	if ((*view_cdevsw.d_open)(cfp-cf_unit, 0, 0, NULL))
+		return 0;
 	}
 	did_consinit = 2;
-	return(1);
+	return 1;
 }
 
 /*
@@ -197,12 +197,12 @@
 void
 grfccattach(struct device *pdp, struct device *dp, void *auxp)
 {
-	static struct grf_softc		congrf;
-	static int			first_attach = 1;
-	   grf_auxp_t		*grf_bus_auxp = auxp;
-	   grf_auxp_t		grf_auxp;
-	   struct grf_softc		*gp;
-	   int			maj;
+	static struct grf_softc congrf;
+	static int first_attach = 1;
+	grf_auxp_t *grf_bus_auxp = auxp;
+	grf_auxp_t grf_auxp;
+	struct grf_softc *gp;
+	int maj;
 	extern const struct cdevsw grf_cdevsw;
 
 	/*
@@ -213,7 +213,7 @@
 	/*
 	 * Handle exception case: early console init
 	 */
-	if(dp == NULL) {
+	if (dp == NULL) {
 		congrf.g_unit= cfdata_grf-cf_unit;
 		congrf.g_grfdev  = makedev(maj, congrf.g_unit);
 		congrf.g_itedev  = (dev_t)-1;
@@ -233,15 +233,14 @@
 	gp-g_unit = device_unit(gp-g_device);
 	grfsp[gp-g_unit] = gp;
 
-	if((cfdata_grf != NULL)  (gp-g_unit == congrf.g_unit)) {
+	if ((cfdata_grf != NULL)  (gp-g_unit == congrf.g_unit)) {
 		/*
 		 * We inited earlier just copy the info, take care
 		 * not to copy the device struct though.
 		 */
 		memcpy(gp-g_display, congrf.g_display,
 			(char *)gp[1] - (char *)gp-g_display);
-	}
-	else {
+	} else {
 		gp-g_grfdev  = makedev(maj, gp-g_unit);
 		gp-g_itedev  = (dev_t)-1;
 		gp-g_flags   = GF_ALIVE;
@@ -254,9 +253,10 @@
 
 	printf(: width %d height %d, gp-g_display.gd_dwidth,
 		gp-g_display.gd_dheight);
-	if(gp-g_display.gd_colors == 2)
+	if (gp-g_display.gd_colors == 2)
 		printf( monochrome\n);
-	else printf( colors %d\n, gp-g_display.gd_colors);
+	else
+		printf( colors %d\n, gp-g_display.gd_colors);
 	
 	/*
 	 * try and attach an ite
@@ -270,7 +270,7 @@
 		first_attach = 0;
 		grf_auxp.from_bus_match = 0;
 		for (grf_auxp.unit=1; grf_auxp.unit  NGRFCC; grf_auxp.unit++) {
-		config_found(pdp, (void*)grf_auxp, grf_bus_auxp-busprint);
+			config_found(pdp, grf_auxp, grf_bus_auxp-busprint);
 		}
 	}
 }
@@ -278,9 +278,10 @@
 int
 grfccprint(void *auxp, const char *pnp)
 {
-	if(pnp)
+
+	if (pnp)
 		aprint_normal(ite at %s, pnp);
-	return(UNCONF);
+	return UNCONF;
 }
 
 /*
@@ -289,7 +290,7 @@
 int
 grfcc_cnprobe(void)
 {
-	return(CN_INTERNAL);
+	return CN_INTERNAL;
 }
 /*
 

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

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 17:08:45 UTC 2010

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

Log Message:
Sort.


To generate a diff of this commit:
cvs rdiff -u -r1.1430 -r1.1431 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1430 src/distrib/sets/lists/comp/mi:1.1431
--- src/distrib/sets/lists/comp/mi:1.1430	Tue Apr 13 10:46:10 2010
+++ src/distrib/sets/lists/comp/mi	Tue Apr 13 17:08:45 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1430 2010/04/13 10:46:10 jruoho Exp $
+#	$NetBSD: mi,v 1.1431 2010/04/13 17:08:45 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -8869,8 +8869,8 @@
 ./usr/share/man/cat9/ctod.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/ctxsw.0			comp-obsolete		obsolete
 ./usr/share/man/cat9/curcpu.0			comp-sys-catman		.cat
-./usr/share/man/cat9/curproc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/curlwp.0			comp-sys-catman		.cat
+./usr/share/man/cat9/curproc.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/cv.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/cv_broadcast.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cv_destroy.0		comp-sys-catman		.cat
@@ -14554,8 +14554,8 @@
 ./usr/share/man/html9/ctob.html			comp-sys-htmlman	html
 ./usr/share/man/html9/ctod.html			comp-sys-htmlman	html
 ./usr/share/man/html9/curcpu.html		comp-sys-htmlman	html
-./usr/share/man/html9/curproc.html		comp-sys-htmlman	html
 ./usr/share/man/html9/curlwp.html		comp-sys-htmlman	html
+./usr/share/man/html9/curproc.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cv.html			comp-sys-htmlman	html
 ./usr/share/man/html9/cv_broadcast.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cv_destroy.html		comp-sys-htmlman	html
@@ -20386,8 +20386,8 @@
 ./usr/share/man/man9/ctod.9			comp-sys-man		.man
 ./usr/share/man/man9/ctxsw.9			comp-obsolete		obsolete
 ./usr/share/man/man9/curcpu.9			comp-sys-man		.man
-./usr/share/man/man9/curproc.9			comp-sys-man		.man
 ./usr/share/man/man9/curlwp.9			comp-sys-man		.man
+./usr/share/man/man9/curproc.9			comp-sys-man		.man
 ./usr/share/man/man9/cv.9			comp-sys-man		.man
 ./usr/share/man/man9/cv_broadcast.9		comp-sys-man		.man
 ./usr/share/man/man9/cv_destroy.9		comp-sys-man		.man



CVS commit: src

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 17:34:18 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile
Removed Files:
src/share/man/man9: cpu_swapout.9

Log Message:
cpu_swapout(9) is no more.


To generate a diff of this commit:
cvs rdiff -u -r1.1431 -r1.1432 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.326 -r1.327 src/share/man/man9/Makefile
cvs rdiff -u -r1.6 -r0 src/share/man/man9/cpu_swapout.9

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1431 src/distrib/sets/lists/comp/mi:1.1432
--- src/distrib/sets/lists/comp/mi:1.1431	Tue Apr 13 17:08:45 2010
+++ src/distrib/sets/lists/comp/mi	Tue Apr 13 17:34:18 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1431 2010/04/13 17:08:45 jruoho Exp $
+#	$NetBSD: mi,v 1.1432 2010/04/13 17:34:18 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -8839,8 +8839,8 @@
 ./usr/share/man/cat9/cpu_reboot.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cpu_rootconf.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cpu_startup.0		comp-sys-catman		.cat
-./usr/share/man/cat9/cpu_swapin.0		comp-sys-catman		.cat
-./usr/share/man/cat9/cpu_swapout.0		comp-sys-catman		.cat
+./usr/share/man/cat9/cpu_swapin.0		comp-obsolete		obsolete
+./usr/share/man/cat9/cpu_swapout.0		comp-obsolete		obsolete
 ./usr/share/man/cat9/cpu_switch.0		comp-obsolete		obsolete
 ./usr/share/man/cat9/cpu_switchto.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/cpu_sysctl.0		comp-obsolete		obsolete
@@ -14535,8 +14535,8 @@
 ./usr/share/man/html9/cpu_reboot.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cpu_rootconf.html		comp-sys-htmlman	html
 ./usr/share/man/html9/cpu_startup.html		comp-sys-htmlman	html
-./usr/share/man/html9/cpu_swapin.html		comp-sys-htmlman	html
-./usr/share/man/html9/cpu_swapout.html		comp-sys-htmlman	html
+./usr/share/man/html9/cpu_swapin.html		comp-obsolete		obsolete
+./usr/share/man/html9/cpu_swapout.html		comp-obsolete		obsolete
 ./usr/share/man/html9/cpu_switchto.html		comp-sys-htmlman	html
 ./usr/share/man/html9/crypto_dispatch.html	comp-sys-htmlman	html
 ./usr/share/man/html9/crypto_done.html		comp-sys-htmlman	html
@@ -20356,8 +20356,8 @@
 ./usr/share/man/man9/cpu_reboot.9		comp-sys-man		.man
 ./usr/share/man/man9/cpu_rootconf.9		comp-sys-man		.man
 ./usr/share/man/man9/cpu_startup.9		comp-sys-man		.man
-./usr/share/man/man9/cpu_swapin.9		comp-sys-man		.man
-./usr/share/man/man9/cpu_swapout.9		comp-sys-man		.man
+./usr/share/man/man9/cpu_swapin.9		comp-obsolete		obsolete
+./usr/share/man/man9/cpu_swapout.9		comp-obsolete		obsolete
 ./usr/share/man/man9/cpu_switch.9		comp-obsolete		obsolete
 ./usr/share/man/man9/cpu_switchto.9		comp-sys-man		.man
 ./usr/share/man/man9/cpu_sysctl.9		comp-obsolete		obsolete

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.326 src/share/man/man9/Makefile:1.327
--- src/share/man/man9/Makefile:1.326	Tue Apr 13 08:40:19 2010
+++ src/share/man/man9/Makefile	Tue Apr 13 17:34:18 2010
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.326 2010/04/13 08:40:19 jruoho Exp $
+#   $NetBSD: Makefile,v 1.327 2010/04/13 17:34:18 jruoho Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -12,7 +12,7 @@
 	cpu_lwp_fork.9 \
 	cpu_idle.9 cpu_initclocks.9 cpu_need_resched.9 \
 	cpu_number.9 cpu_reboot.9 cpu_rootconf.9 \
-	cpu_startup.9 cpu_swapout.9 cpu_switchto.9 \
+	cpu_startup.9 cpu_switchto.9 \
 	csf.9 ctod.9 \
 	curproc.9 \
 	delay.9 disk.9 ddc.9 disklabel.9 dofileread.9 \
@@ -223,7 +223,6 @@
 	cpu_dumpconf.9 dumpsys.9
 MLINKS+=cpu_lwp_fork.9 child_return.9 cpu_lwp_fork.9 proc_trampoline.9
 MLINKS+=cpu_rootconf.9 setroot.9
-MLINKS+=cpu_swapout.9 cpu_swapin.9
 MLINKS+=ctod.9 dtoc.9 \
 	ctod.9 ctob.9 \
 	ctod.9 btoc.9 \



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Apr 13 18:04:03 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_fmn.c

Log Message:
improve names to avoid confusion between storage and pointers


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_fmn.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/mips/rmi/rmixl_fmn.c
diff -u src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.2 src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.3
--- src/sys/arch/mips/rmi/rmixl_fmn.c:1.1.2.2	Mon Mar 29 23:34:32 2010
+++ src/sys/arch/mips/rmi/rmixl_fmn.c	Tue Apr 13 18:04:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_fmn.c,v 1.1.2.2 2010/03/29 23:34:32 cliff Exp $	*/
+/*	$NetBSD: rmixl_fmn.c,v 1.1.2.3 2010/04/13 18:04:03 cliff Exp $	*/
 
 #include opt_ddb.h
 
@@ -223,14 +223,14 @@
 	fmn_intrhand_t			fmn_intrhand[RMIXL_FMN_NSTID];
 } fmn_t;
 
-static fmn_t fmn[1  10];	/* index by cpuid) *//* XXX assumes 1 node */
-#define NFMN	(sizeof(fmn) / sizeof(fmn[0]))
+static fmn_t fmn_store[1  10];	/* index by cpuid) *//* XXX assumes 1 node */
+#define NFMN	(sizeof(fmn_store) / sizeof(fmn_store[0]))
 
 static fmn_t *
 fmn_lookup(cpuid_t cpuid)
 {
 	KASSERT(cpuid  (cpuid_t)NFMN);
-	return fmn[cpuid];
+	return fmn_store[cpuid];
 }
 
 static void rmixl_fmn_init_core_xlr(fmn_t *);
@@ -453,6 +453,7 @@
 	kmutex_t *lk;
 
 	fmnp = fmn_lookup(cpu_number());
+	KASSERT(fmnp != NULL);
 	KASSERT(fmnp-fmn_core == RMIXL_CPU_CORE(cpu_number()));
 	KASSERT(fmnp-fmn_thread == RMIXL_CPU_THREAD(cpu_number()));
 
@@ -468,13 +469,16 @@
 	 */
 	switch(cpu_rmixl_chip_type(mips_options.mips_cpu)) {
 	case CIDFL_RMI_TYPE_XLR:
-		rmixl_fmn_init_core_xlr(fmn);
+		rmixl_fmn_init_core_xlr(fmnp);
 		break;
 	case CIDFL_RMI_TYPE_XLS:
-		rmixl_fmn_init_core_xls(fmn);
+		rmixl_fmn_init_core_xls(fmnp);
 		break;
 	case CIDFL_RMI_TYPE_XLP:
 		panic(%s: RMI XLP not yet supported, __func__);
+	default:
+		panic(%s: RMI chip type %#x unknown, __func__,
+			cpu_rmixl_chip_type(mips_options.mips_cpu));
 	}
 
 	/*
@@ -495,7 +499,7 @@
 static void
 rmixl_fmn_config_noncore(fmn_t *fmnp)
 {
-	for (u_int sid=0; sid  fmn-fmn_nstid; sid++) {
+	for (u_int sid=0; sid  fmnp-fmn_nstid; sid++) {
 		u_int regoff = fmnp-fmn_stinfo[sid].si_regbase;
 		if (regoff != 0) {
 			u_int buckets_max = fmnp-fmn_stinfo[sid].si_buckets_max;
@@ -604,9 +608,9 @@
 	fmnp = fmn_lookup(cpu_number());
 	mutex_enter(fmnp-fmn_lock);
 
-	for (int i=0; i  fmn-fmn_nstid; i++)
+	for (int i=0; i  fmnp-fmn_nstid; i++)
 		evcnt_attach_dynamic(fmnp-fmn_intrhand[i].ih_count,
-			EVCNT_TYPE_INTR, NULL, rmixl_fmn, fmn-fmn_stinfo[i].si_name);
+			EVCNT_TYPE_INTR, NULL, rmixl_fmn, fmnp-fmn_stinfo[i].si_name);
 
 #ifdef NOTYET
 	/*



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Tue Apr 13 18:15:16 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpucorevar.h
rmixl_cpunodevar.h rmixl_cpuvar.h rmixl_fmn.c rmixl_fmnvar.h
rmixl_intr.h rmixl_obiovar.h rmixl_pcievar.h rmixl_pcixvar.h
rmixl_subr.S

Log Message:
add TNF License and copyright.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_cpucorevar.h \
src/sys/arch/mips/rmi/rmixl_fmnvar.h src/sys/arch/mips/rmi/rmixl_intr.h
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_cpunodevar.h \
src/sys/arch/mips/rmi/rmixl_cpuvar.h \
src/sys/arch/mips/rmi/rmixl_pcixvar.h
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/mips/rmi/rmixl_fmn.c
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixl_obiovar.h
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/mips/rmi/rmixl_pcievar.h \
src/sys/arch/mips/rmi/rmixl_subr.S

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/mips/rmi/rmixl_cpucorevar.h
diff -u src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.1.2.2 src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.1.2.3
--- src/sys/arch/mips/rmi/rmixl_cpucorevar.h:1.1.2.2	Tue Feb 23 20:33:48 2010
+++ src/sys/arch/mips/rmi/rmixl_cpucorevar.h	Tue Apr 13 18:15:16 2010
@@ -1,4 +1,32 @@
-/*	$NetBSD: rmixl_cpucorevar.h,v 1.1.2.2 2010/02/23 20:33:48 matt Exp $	q*/
+/*	$NetBSD: rmixl_cpucorevar.h,v 1.1.2.3 2010/04/13 18:15:16 cliff Exp $	*/
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Cliff Neighbors.
+ *
+ * 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 disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #ifndef _ARCH_MIPS_RMI_RMIXL_CPUCOREVAR_H_
 #define _ARCH_MIPS_RMI_RMIXL_CPUCOREVAR_H_
Index: src/sys/arch/mips/rmi/rmixl_fmnvar.h
diff -u src/sys/arch/mips/rmi/rmixl_fmnvar.h:1.1.2.2 src/sys/arch/mips/rmi/rmixl_fmnvar.h:1.1.2.3
--- src/sys/arch/mips/rmi/rmixl_fmnvar.h:1.1.2.2	Mon Mar 29 23:34:09 2010
+++ src/sys/arch/mips/rmi/rmixl_fmnvar.h	Tue Apr 13 18:15:16 2010
@@ -1,4 +1,32 @@
-/*	$Id: rmixl_fmnvar.h,v 1.1.2.2 2010/03/29 23:34:09 cliff Exp $	*/
+/*	$Id: rmixl_fmnvar.h,v 1.1.2.3 2010/04/13 18:15:16 cliff Exp $	*/
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Cliff Neighbors.
+ *
+ * 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 disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR 

CVS commit: src/share/man/man9

2010-04-13 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Apr 13 18:33:44 UTC 2010

Modified Files:
src/share/man/man9: suspendsched.9

Log Message:
Remove dead reference to scheduler(9).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/suspendsched.9

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/man9/suspendsched.9
diff -u src/share/man/man9/suspendsched.9:1.4 src/share/man/man9/suspendsched.9:1.5
--- src/share/man/man9/suspendsched.9:1.4	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/suspendsched.9	Tue Apr 13 18:33:44 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: suspendsched.9,v 1.4 2008/04/30 13:10:58 martin Exp $
+.\ $NetBSD: suspendsched.9,v 1.5 2010/04/13 18:33:44 jruoho Exp $
 .\
 .\ Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -47,5 +47,4 @@
 The
 .Fn suspendsched
 function must not be called with the scheduler lock held.
-.Sh SEE ALSO
-.Xr scheduler 9
+.\.Sh SEE ALSO



CVS commit: src/sys/dev/rasops

2010-04-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Apr 13 20:10:38 UTC 2010

Modified Files:
src/sys/dev/rasops: rasops1.c

Log Message:
fix a bunch of typos, now 8 bit fonts work properly


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops1.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/rasops/rasops1.c
diff -u src/sys/dev/rasops/rasops1.c:1.21 src/sys/dev/rasops/rasops1.c:1.22
--- src/sys/dev/rasops/rasops1.c:1.21	Thu Apr  8 16:45:53 2010
+++ src/sys/dev/rasops/rasops1.c	Tue Apr 13 20:10:38 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops1.c,v 1.21 2010/04/08 16:45:53 macallan Exp $	*/
+/* 	$NetBSD: rasops1.c,v 1.22 2010/04/13 20:10:38 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rasops1.c,v 1.21 2010/04/08 16:45:53 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: rasops1.c,v 1.22 2010/04/13 20:10:38 macallan Exp $);
 
 #include opt_rasops.h
 
@@ -297,7 +297,7 @@
 
 	rp = ri-ri_bits + row * ri-ri_yscale + col * ri-ri_xscale;
 	if (ri-ri_hwbits)
-		hrp = ri-ri_bits + row * ri-ri_yscale + col * ri-ri_xscale;
+		hrp = ri-ri_hwbits + row * ri-ri_yscale + col * ri-ri_xscale;
 	height = ri-ri_font-fontheight;
 	rs = ri-ri_stride;
 
@@ -346,10 +346,12 @@
 	}
 
 	/* Do underline */
-	if ((attr  1) != 0)
+	if ((attr  1) != 0) {
 		rp[-(ri-ri_stride  1)] = fg;
-		if (ri-ri_hwbits)
-			hrp[-(ri-ri_stride  1)] = fg;		
+		if (ri-ri_hwbits) {
+			hrp[-(ri-ri_stride  1)] = fg;
+		}
+	}
 }
 
 /*



CVS commit: src/sys/kern

2010-04-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 13 22:46:10 UTC 2010

Modified Files:
src/sys/kern: kern_ntptime.c kern_tc.c

Log Message:
Refactor #include opt_ntp.h into a separate file.

... no, wait, #ifdef _KERNEL_OPT.
(not that I think it's a particularly good solution as opposed to
improving config, but it's the current best practice)


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/kern/kern_ntptime.c
cvs rdiff -u -r1.41 -r1.42 src/sys/kern/kern_tc.c

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

Modified files:

Index: src/sys/kern/kern_ntptime.c
diff -u src/sys/kern/kern_ntptime.c:1.53 src/sys/kern/kern_ntptime.c:1.54
--- src/sys/kern/kern_ntptime.c:1.53	Fri Apr  2 23:31:42 2010
+++ src/sys/kern/kern_ntptime.c	Tue Apr 13 22:46:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ntptime.c,v 1.53 2010/04/02 23:31:42 tsutsui Exp $	*/
+/*	$NetBSD: kern_ntptime.c,v 1.54 2010/04/13 22:46:10 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -60,9 +60,11 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/sys/kern/kern_ntptime.c,v 1.59 2005/05/28 14:34:41 rwatson Exp $); */
-__KERNEL_RCSID(0, $NetBSD: kern_ntptime.c,v 1.53 2010/04/02 23:31:42 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ntptime.c,v 1.54 2010/04/13 22:46:10 pooka Exp $);
 
+#ifdef _KERNEL_OPT
 #include opt_ntp.h
+#endif
 
 #include sys/param.h
 #include sys/resourcevar.h

Index: src/sys/kern/kern_tc.c
diff -u src/sys/kern/kern_tc.c:1.41 src/sys/kern/kern_tc.c:1.42
--- src/sys/kern/kern_tc.c:1.41	Sat Feb  6 12:10:59 2010
+++ src/sys/kern/kern_tc.c	Tue Apr 13 22:46:10 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.41 2010/02/06 12:10:59 uebayasi Exp $ */
+/* $NetBSD: kern_tc.c,v 1.42 2010/04/13 22:46:10 pooka Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -40,9 +40,11 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $); */
-__KERNEL_RCSID(0, $NetBSD: kern_tc.c,v 1.41 2010/02/06 12:10:59 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_tc.c,v 1.42 2010/04/13 22:46:10 pooka Exp $);
 
+#ifdef _KERNEL_OPT
 #include opt_ntp.h
+#endif
 
 #include sys/param.h
 #include sys/kernel.h



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:18:46 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: writer.c

Log Message:
Don't warn about erroneous errors in skey_checksum_finaliser().

Allocate space for the checkhash before attempting to use it - a
long-standing bug from openpgpsdk.  Part of the fix for PR 42435 from
Jukka Ruohonen.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/crypto/external/bsd/netpgp/dist/src/lib/writer.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/writer.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/writer.c:1.19 src/crypto/external/bsd/netpgp/dist/src/lib/writer.c:1.20
--- src/crypto/external/bsd/netpgp/dist/src/lib/writer.c:1.19	Fri Mar  5 16:01:10 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/writer.c	Wed Apr 14 00:18:46 2010
@@ -58,7 +58,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: writer.c,v 1.19 2010/03/05 16:01:10 agc Exp $);
+__RCSID($NetBSD: writer.c,v 1.20 2010/04/14 00:18:46 agc Exp $);
 #endif
 
 #include sys/types.h
@@ -1351,10 +1351,10 @@
 	skey_checksum_t *sum;
 
 	sum = __ops_writer_get_arg(writer);
-	if (errors) {
+	if (errors  *errors) {
 		printf(errors in skey_checksum_finaliser\n);
 	}
-	sum-hash.finish(sum-hash, sum-hashed);
+	(*sum-hash.finish)(sum-hash, sum-hashed);
 	return 1;
 }
 
@@ -1384,7 +1384,9 @@
 	} else {
 		/* configure the arg */
 		sum-hash_alg = seckey-hash_alg;
-		sum-hashed = seckey-checkhash;
+		if ((sum-hashed = seckey-checkhash) == NULL) {
+			sum-hashed = seckey-checkhash = calloc(1, OPS_CHECKHASH_SIZE);
+		}
 		/* init the hash */
 		__ops_hash_any(sum-hash, sum-hash_alg);
 		if (!sum-hash.init(sum-hash)) {



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:19:22 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: validate.c

Log Message:
remove a comment which makes no sense any longer - subkey logic is done 
elsewhere


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 \
src/crypto/external/bsd/netpgp/dist/src/lib/validate.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/validate.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.31 src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.32
--- src/crypto/external/bsd/netpgp/dist/src/lib/validate.c:1.31	Fri Mar  5 16:01:10 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/validate.c	Wed Apr 14 00:19:22 2010
@@ -54,7 +54,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: validate.c,v 1.31 2010/03/05 16:01:10 agc Exp $);
+__RCSID($NetBSD: validate.c,v 1.32 2010/04/14 00:19:22 agc Exp $);
 #endif
 
 #include sys/types.h
@@ -347,7 +347,6 @@
 __ops_get_pubkey(signer),
 key-reader-key-packets[
 	key-reader-packet].raw);
-			/* XXX - agc - put subkey logic here */
 			break;
 
 		case OPS_SIG_DIRECT:



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:19:52 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: reader.c

Log Message:
optimise one function a bit


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 \
src/crypto/external/bsd/netpgp/dist/src/lib/reader.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/reader.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.32 src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.33
--- src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.32	Sat Mar 13 23:30:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c	Wed Apr 14 00:19:52 2010
@@ -54,7 +54,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: reader.c,v 1.32 2010/03/13 23:30:41 agc Exp $);
+__RCSID($NetBSD: reader.c,v 1.33 2010/04/14 00:19:52 agc Exp $);
 #endif
 
 #include sys/types.h
@@ -2032,24 +2032,20 @@
 int 
 __ops_setup_file_append(__ops_output_t **output, const char *filename)
 {
-	int fd;
+	int	fd;
+
 	/*
  * initialise needed structures for writing to file
  */
-
 #ifdef O_BINARY
 	fd = open(filename, O_WRONLY | O_APPEND | O_BINARY, 0600);
 #else
 	fd = open(filename, O_WRONLY | O_APPEND, 0600);
 #endif
-	if (fd  0) {
-		perror(filename);
-		return fd;
+	if (fd = 0) {
+		*output = __ops_output_new();
+		__ops_writer_set_fd(*output, fd);
 	}
-	*output = __ops_output_new();
-
-	__ops_writer_set_fd(*output, fd);
-
 	return fd;
 }
 



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:21:40 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: openssl_crypto.c

Log Message:
Fixes to make key generation work properly - duplicate the public key RSA
BIGNUM fields - part of long-standing bug inherited from openpgpsdk.

Part of the fix for PR 42435 from Jukka Ruohonen.

Also pass the desired hash algorithm down, so that SHA1 is no longer
hardcoded.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c:1.20 src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c:1.21
--- src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c:1.20	Fri Mar  5 16:01:09 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/openssl_crypto.c	Wed Apr 14 00:21:40 2010
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: openssl_crypto.c,v 1.20 2010/03/05 16:01:09 agc Exp $);
+__RCSID($NetBSD: openssl_crypto.c,v 1.21 2010/04/14 00:21:40 agc Exp $);
 #endif
 
 #ifdef HAVE_OPENSSL_DSA_H
@@ -621,13 +621,13 @@
 	int n;
 
 	orsa = RSA_new();
-	orsa-n = pubkey-n;	/* XXX: do we need n? */
+	orsa-n = BN_dup(pubkey-n);	/* XXX: do we need n? */
 	orsa-d = seckey-d;
 	orsa-p = seckey-q;
 	orsa-q = seckey-p;
 
 	/* debug */
-	orsa-e = pubkey-e;
+	orsa-e = BN_dup(pubkey-e);
 	/* If this isn't set, it's very likely that the programmer hasn't */
 	/* decrypted the secret key. RSA_check_key segfaults in that case. */
 	/* Use __ops_decrypt_seckey() to do that. */
@@ -799,7 +799,8 @@
 static unsigned 
 rsa_generate_keypair(__ops_key_t *keydata,
 			const int numbits,
-			const unsigned long e)
+			const unsigned long e,
+			const char *hashalg)
 {
 	__ops_seckey_t *seckey;
 	RSA*rsa;
@@ -829,7 +830,9 @@
 	seckey-s2k_specifier = OPS_S2KS_SALTED;
 	/* seckey-s2k_specifier=OPS_S2KS_SIMPLE; */
 	seckey-alg = OPS_SA_CAST5;	/* \todo make param */
-	seckey-hash_alg = OPS_HASH_SHA1;	/* \todo make param */
+	if ((seckey-hash_alg = __ops_str_to_hash_alg(hashalg)) == OPS_HASH_UNKNOWN) {
+		seckey-hash_alg = OPS_HASH_SHA1;
+	}
 	seckey-octetc = 0;
 	seckey-checksum = 0;
 
@@ -845,8 +848,7 @@
 
 	RSA_free(rsa);
 
-	__ops_keyid(keydata-key_id, OPS_KEY_ID_SIZE, 
-			keydata-key.seckey.pubkey);
+	__ops_keyid(keydata-key_id, OPS_KEY_ID_SIZE, keydata-key.seckey.pubkey);
 	__ops_fingerprint(keydata-fingerprint, keydata-key.seckey.pubkey);
 
 	/* Generate checksum */
@@ -910,12 +912,13 @@
 __ops_key_t  *
 __ops_rsa_new_selfsign_key(const int numbits,
 const unsigned long e,
-__ops_userid_t *userid)
+__ops_userid_t *userid,
+const char *hashalg)
 {
 	__ops_key_t  *keydata;
 
 	keydata = __ops_keydata_new();
-	if (!rsa_generate_keypair(keydata, numbits, e) ||
+	if (!rsa_generate_keypair(keydata, numbits, e, hashalg) ||
 	!__ops_add_selfsigned_userid(keydata, userid)) {
 		__ops_keydata_free(keydata);
 		return NULL;



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:22:21 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

Log Message:
Fix (RSA) key generation.

Part of the fix for PR 42435 from Jukka Ruohonen.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 \
src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.44 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.45
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.44	Tue Mar 16 04:14:29 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Wed Apr 14 00:22:21 2010
@@ -34,7 +34,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: netpgp.c,v 1.44 2010/03/16 04:14:29 agc Exp $);
+__RCSID($NetBSD: netpgp.c,v 1.45 2010/04/14 00:22:21 agc Exp $);
 #endif
 
 #include sys/types.h
@@ -706,8 +706,7 @@
 		done = __ops_keyring_fileread(netpgp-pubring, armor, f);
 	}
 	if (!done) {
-		(void) fprintf(io-errs, Cannot import key from file %s\n,
-f);
+		(void) fprintf(io-errs, Cannot import key from file %s\n, f);
 		return 0;
 	}
 	return __ops_keyring_list(io, netpgp-pubring, 0);
@@ -717,27 +716,48 @@
 int
 netpgp_generate_key(netpgp_t *netpgp, char *id, int numbits)
 {
-	__ops_key_t		*keypair;
 	__ops_userid_t		 uid;
 	__ops_output_t		*create;
 	const unsigned		 noarmor = 0;
+	__ops_key_t		*key;
 	__ops_io_t		*io;
+	char			 newid[1024];
+	char			 filename[MAXPATHLEN];
+	char			 dir[MAXPATHLEN];
+	char			*cp;
 	char			*ringfile;
 	int 	 fd;
 
 	(void) memset(uid, 0x0, sizeof(uid));
 	io = netpgp-io;
-	/* generate a new key for 'id' */
-	uid.userid = (uint8_t *) id;
-	keypair = __ops_rsa_new_selfsign_key(numbits, 65537UL, uid);
-	if (keypair == NULL) {
+	/* generate a new key */
+	if (id) {
+		(void) snprintf(newid, sizeof(newid), %s, id);
+	} else {
+		(void) snprintf(newid, sizeof(newid), RSA %d-bit key %...@localhost, numbits, getenv(LOGNAME));
+	}
+	uid.userid = (uint8_t *)newid;
+	key = __ops_rsa_new_selfsign_key(numbits, 65537UL, uid, netpgp_getvar(netpgp, hash));
+	if (key == NULL) {
 		(void) fprintf(io-errs, Cannot generate key\n);
 		return 0;
 	}
+	cp = NULL;
+	__ops_sprint_keydata(netpgp-io, NULL, key, cp, pub, key-key.seckey.pubkey, 0);
+	(void) fprintf(stdout, %s, cp);
 	/* write public key, and try to re-read it */
-	ringfile = netpgp_getvar(netpgp, pubring); 
-	fd = __ops_setup_file_append(create, ringfile);
-	if (!__ops_write_xfer_pubkey(create, keypair, noarmor)) {
+	(void) snprintf(dir, sizeof(dir), %s/%.16s, netpgp_getvar(netpgp, homedir), cp[31]);
+	(void) mkdir(dir, 0700);
+	(void) fprintf(io-errs, netpgp: generated keys in directory %s\n, dir);
+	(void) snprintf(ringfile = filename, sizeof(filename), %s/pubring.gpg, dir);
+	if ((fd = __ops_setup_file_append(create, ringfile))  0) {
+		fd = __ops_setup_file_write(create, ringfile, 0);
+	}
+	if (fd  0) {
+		(void) fprintf(io-errs, can't open pubring '%s'\n, ringfile);
+		return 0;
+	}
+	if (!__ops_write_xfer_pubkey(create, key, noarmor)) {
 		(void) fprintf(io-errs, Cannot write pubkey\n);
 		return 0;
 	}
@@ -748,9 +768,15 @@
 		return 0;
 	}
 	/* write secret key, and try to re-read it */
-	ringfile = netpgp_getvar(netpgp, sec ring file); 
-	fd = __ops_setup_file_append(create, ringfile);
-	if (!__ops_write_xfer_seckey(create, keypair, NULL, 0, noarmor)) {
+	(void) snprintf(ringfile = filename, sizeof(filename), %s/secring.gpg, dir);
+	if ((fd = __ops_setup_file_append(create, ringfile))  0) {
+		fd = __ops_setup_file_write(create, ringfile, 0);
+	}
+	if (fd  0) {
+		(void) fprintf(io-errs, can't append secring '%s'\n, ringfile);
+		return 0;
+	}
+	if (!__ops_write_xfer_seckey(create, key, NULL, 0, noarmor)) {
 		(void) fprintf(io-errs, Cannot write seckey\n);
 		return 0;
 	}
@@ -760,7 +786,8 @@
 		(void) fprintf(io-errs, Can't read secring %s\n, ringfile);
 		return 0;
 	}
-	__ops_keydata_free(keypair);
+	__ops_keydata_free(key);
+	free(cp);
 	return 1;
 }
 



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:23:09 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c

Log Message:
use a better name for a key in a function - no functional change


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 \
src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.33 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.34
--- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.33	Sat Mar 13 23:30:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c	Wed Apr 14 00:23:09 2010
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: keyring.c,v 1.33 2010/03/13 23:30:41 agc Exp $);
+__RCSID($NetBSD: keyring.c,v 1.34 2010/04/14 00:23:09 agc Exp $);
 #endif
 
 #ifdef HAVE_FCNTL_H
@@ -486,7 +486,7 @@
 \return 1 if OK; else 0
 */
 unsigned 
-__ops_add_selfsigned_userid(__ops_key_t *keydata, __ops_userid_t *userid)
+__ops_add_selfsigned_userid(__ops_key_t *key, __ops_userid_t *userid)
 {
 	__ops_create_sig_t	*sig;
 	__ops_subpacket_t	 sigpacket;
@@ -505,24 +505,22 @@
 
 	/* create sig for this pkt */
 	sig = __ops_create_sig_new();
-	__ops_sig_start_key_sig(sig, keydata-key.seckey.pubkey, userid,
-	OPS_CERT_POSITIVE);
+	__ops_sig_start_key_sig(sig, key-key.seckey.pubkey, userid, OPS_CERT_POSITIVE);
 	__ops_add_birthtime(sig, time(NULL));
-	__ops_add_issuer_keyid(sig, keydata-key_id);
+	__ops_add_issuer_keyid(sig, key-key_id);
 	__ops_add_primary_userid(sig, 1);
 	__ops_end_hashed_subpkts(sig);
 
 	__ops_setup_memory_write(sigoutput, mem_sig, 128);
-	__ops_write_sig(sigoutput, sig, keydata-key.seckey.pubkey,
-keydata-key.seckey);
+	__ops_write_sig(sigoutput, sig, key-key.seckey.pubkey, key-key.seckey);
 
-	/* add this packet to keydata */
+	/* add this packet to key */
 	sigpacket.length = __ops_mem_len(mem_sig);
 	sigpacket.raw = __ops_mem_data(mem_sig);
 
-	/* add userid to keydata */
-	(void) __ops_add_userid(keydata, userid);
-	(void) __ops_add_subpacket(keydata, sigpacket);
+	/* add userid to key */
+	(void) __ops_add_userid(key, userid);
+	(void) __ops_add_subpacket(key, sigpacket);
 
 	/* cleanup */
 	__ops_create_sig_delete(sig);



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:24:00 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: crypto.h

Log Message:
allow the desired hash algorithm to be passed down from the user to the place
where it matters - change the required prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h:1.17 src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h:1.18
--- src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h:1.17	Fri Mar  5 16:01:09 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.h	Wed Apr 14 00:24:00 2010
@@ -211,7 +211,7 @@
 
 /* Keys */
 __ops_key_t  *__ops_rsa_new_selfsign_key(const int,
-			const unsigned long, __ops_userid_t *);
+			const unsigned long, __ops_userid_t *, const char *);
 
 int __ops_dsa_size(const __ops_dsa_pubkey_t *);
 DSA_SIG *__ops_dsa_sign(uint8_t *, unsigned,



CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:25:10 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: create.c

Log Message:
get rid of a hardcoded test for the hash agorithm being SHA1, which was just
plain wrong these days.

don't duplicate functionality needlessly.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 \
src/crypto/external/bsd/netpgp/dist/src/lib/create.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/create.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/create.c:1.24 src/crypto/external/bsd/netpgp/dist/src/lib/create.c:1.25
--- src/crypto/external/bsd/netpgp/dist/src/lib/create.c:1.24	Sat Mar 13 23:30:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/lib/create.c	Wed Apr 14 00:25:10 2010
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.);
-__RCSID($NetBSD: create.c,v 1.24 2010/03/13 23:30:41 agc Exp $);
+__RCSID($NetBSD: create.c,v 1.25 2010/04/14 00:25:10 agc Exp $);
 #endif
 
 #include sys/types.h
@@ -313,11 +313,6 @@
 	if (!__ops_write_scalar(output, (unsigned)key-s2k_specifier, 1)) {
 		return 0;
 	}
-
-	if (key-hash_alg != OPS_HASH_SHA1) {
-		(void) fprintf(stderr, write_seckey_body: hash alg\n);
-		return 0;
-	}
 	if (!__ops_write_scalar(output, (unsigned)key-hash_alg, 1)) {
 		return 0;
 	}
@@ -1087,7 +1082,6 @@
 			__ops_write_pk_sesskey: bad algorithm\n);
 		return 0;
 	}
-
 	return __ops_write_ptag(output, OPS_PTAG_CT_PK_SESSION_KEY) 
 		__ops_write_length(output, (unsigned)(1 + 8 + 1 +
 			BN_num_bytes(pksk-params.rsa.encrypted_m) + 2)) 
@@ -1161,19 +1155,15 @@
 {
 	__ops_memory_t	*mem;
 	unsigned   	 ret;
-	size_t		 len;
+	int		 len;
 
 	mem = __ops_memory_new();
 	if (!__ops_mem_readfile(mem, filename)) {
+		(void) fprintf(stderr, __ops_mem_readfile of '%s' failed\n, filename);
 		return 0;
 	}
-	len = __ops_mem_len(mem);
-	ret = __ops_write_ptag(output, OPS_PTAG_CT_LITDATA) 
-		__ops_write_length(output, 1 + 1 + 4 + len) 
-		__ops_write_scalar(output, (unsigned)type, 1) 
-		__ops_write_scalar(output, 0, 1) /* filename */ 
-		__ops_write_scalar(output, 0, 4) /* date */ 
-		__ops_write(output, __ops_mem_data(mem), len);
+	len = (size_t)__ops_mem_len(mem);
+	ret = __ops_write_litdata(output, __ops_mem_data(mem), len, type);
 	__ops_memory_free(mem);
 	return ret;
 }



CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 00:26:25 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.c

Log Message:
allow the user to pass the equivalent of the gecos information into the
key generation function.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.9 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.10
--- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c:1.9	Sat Mar 13 23:30:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.c	Wed Apr 14 00:26:25 2010
@@ -101,7 +101,7 @@
 	{find-key,	no_argument,		NULL,	FIND_KEY},
 	{export-key,	no_argument,		NULL,	EXPORT_KEY},
 	{import-key,	no_argument,		NULL,	IMPORT_KEY},
-	{generate-key, no_argument,		NULL,	GENERATE_KEY},
+	{generate-key, optional_argument,	NULL,	GENERATE_KEY},
 	{get-key, 	no_argument,		NULL,	GET_KEY},
 	/* debugging commands */
 	{help,	no_argument,		NULL,	HELP_CMD},
@@ -157,8 +157,7 @@
 	case FIND_KEY:
 		return netpgp_find_key(netpgp, netpgp_getvar(netpgp, userid));
 	case EXPORT_KEY:
-		key = netpgp_export_key(netpgp,
-netpgp_getvar(netpgp, userid));
+		key = netpgp_export_key(netpgp, netpgp_getvar(netpgp, userid));
 		if (key) {
 			printf(%s, key);
 			return 1;
@@ -168,8 +167,7 @@
 	case IMPORT_KEY:
 		return netpgp_import_key(netpgp, f);
 	case GENERATE_KEY:
-		return netpgp_generate_key(netpgp,
-netpgp_getvar(netpgp, userid), p-numbits);
+		return netpgp_generate_key(netpgp, f, p-numbits);
 	case GET_KEY:
 		key = netpgp_get_key(netpgp, f, human);
 		if (key) {



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2010-04-13 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr 14 01:23:15 UTC 2010

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_spl.S

Log Message:
insert nop in delay slots
- at end of _splsw_splvm and
- inside _splsw_splint


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/mips/rmi/rmixl_spl.S

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/mips/rmi/rmixl_spl.S
diff -u src/sys/arch/mips/rmi/rmixl_spl.S:1.1.2.1 src/sys/arch/mips/rmi/rmixl_spl.S:1.1.2.2
--- src/sys/arch/mips/rmi/rmixl_spl.S:1.1.2.1	Sun Mar 21 21:17:01 2010
+++ src/sys/arch/mips/rmi/rmixl_spl.S	Wed Apr 14 01:23:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_spl.S,v 1.1.2.1 2010/03/21 21:17:01 cliff Exp $	*/
+/*	$NetBSD: rmixl_spl.S,v 1.1.2.2 2010/04/14 01:23:15 cliff Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #include mips/asm.h
 #include mips/cpuregs.h
 
-RCSID($NetBSD: rmixl_spl.S,v 1.1.2.1 2010/03/21 21:17:01 cliff Exp $);
+RCSID($NetBSD: rmixl_spl.S,v 1.1.2.2 2010/04/14 01:23:15 cliff Exp $);
 
 #include assym.h
 
@@ -263,6 +263,7 @@
 	REG_L	a0, _C_LABEL(ipl_eimr_map) + 8*IPL_VM
 	li	a1, IPL_VM
 	b	_splraise
+	 nop
 END(_splsw_splvm)
 
 STATIC_LEAF(_splsw_splsoftserial)
@@ -318,6 +319,7 @@
 	addiu	v0, 1#  increase ipl by 1
 	move	v1, ta2# reduce down pending intrs
 	b	1b# and check them
+	 nop
 
 2:
 	/*



CVS commit: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys

2010-04-13 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Wed Apr 14 04:01:55 UTC 2010

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.1

Log Message:
sync manual page with reality, catch up with key generation


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1
diff -u src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.6 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.7
--- src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1:1.6	Sat Mar 13 23:30:41 2010
+++ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1	Wed Apr 14 04:01:55 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: netpgpkeys.1,v 1.6 2010/03/13 23:30:41 agc Exp $
+.\ $NetBSD: netpgpkeys.1,v 1.7 2010/04/14 04:01:55 agc Exp $
 .\
 .\ Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 13, 2010
+.Dd April 13, 2010
 .Dt NETPGPKEYS 1
 .Os
 .Sh NAME
@@ -160,8 +160,16 @@
 If no keyring is provided, the user's public keyring is used.
 .It Fl Fl generate-key
 This command is used to generate a new public and private key pair.
-The user id is taken from the command line, and the user will be
-prompted to provide a suitable pass phrase.
+If provided on the command line, the argument will be given to the
+key generation routine to be used as the identity of the key.
+This is usually the email address and full name, but can be
+any identification token.
+The newly-generated keys are placed in a sub-directory of the
+.Dq home directory
+which is created at key generation time.
+At present, only RSA keys can be generated.
+The hash algorithm and keysize can be specified on the command
+line.
 .It Fl Fl import-key
 Import a public key as retrieved from one of the public key servers.
 This is in the form of a file which has previously been
@@ -293,6 +301,30 @@
 uid  netbsd-vm1.crowthorne.alistaircrooks.co.uk (/etc/ssh/ssh_host_rsa_key.pub) \*[lt]r...@netbsd-vm1.crowthorne.alistaircrooks.co.uk\*[gt]
 %
 .Ed
+.Pp
+The following is an example of RSA key generation:
+.Bd -literal
+% netpgpkeys --generate-key
+netpgp: default key set to C0596823
+pub 2048/RSA (Encrypt or Sign) 5bc707d1b495aaf2 2010-04-14 
+Key fingerprint: 08cb 4867 eeed 454c ce30 610d 5bc7 07d1 b495 aaf2 
+uid  RSA 2048-bit key \*[lt]...@localhost\*[gt]
+netpgp: generated keys in directory /home/agc/.gnupg/5bc707d1b495aaf2
+% ls -al /home/agc/.gnupg/5bc707d1b495aaf2
+total 8
+drwx--  2 agc  agc   512 Apr 13 18:25 .
+drwx--  6 agc  agc   512 Apr 13 18:25 ..
+-rw---  1 agc  agc   596 Apr 13 18:25 pubring.gpg
+-rw---  1 agc  agc  1284 Apr 13 18:25 secring.gpg
+%
+% netpgpkeys --list-keys --home ~/.gnupg/5bc707d1b495aaf2
+1 key
+pub 2048/RSA (Encrypt or Sign) 5bc707d1b495aaf2 2010-04-14 
+Key fingerprint: 08cb 4867 eeed 454c ce30 610d 5bc7 07d1 b495 aaf2 
+uid  RSA 2048-bit key \*[lt]...@localhost\*[gt]
+
+%
+.Ed
 .Sh SEE ALSO
 .Xr netpgp 1 ,
 .Xr ssh 1 ,



CVS commit: src/sys/dev/sbus

2010-04-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Apr 14 04:37:11 UTC 2010

Modified Files:
src/sys/dev/sbus: cgtwelve.c cgtwelvereg.h

Log Message:
add the missing bits to allow X to run in 24bit with the wsfb driver
still no hardware acceleration though


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/sbus/cgtwelve.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/sbus/cgtwelvereg.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/sbus/cgtwelve.c
diff -u src/sys/dev/sbus/cgtwelve.c:1.2 src/sys/dev/sbus/cgtwelve.c:1.3
--- src/sys/dev/sbus/cgtwelve.c:1.2	Thu Apr  8 16:49:34 2010
+++ src/sys/dev/sbus/cgtwelve.c	Wed Apr 14 04:37:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgtwelve.c,v 1.2 2010/04/08 16:49:34 macallan Exp $ */
+/*	$NetBSD: cgtwelve.c,v 1.3 2010/04/14 04:37:11 macallan Exp $ */
 
 /*-
  * Copyright (c) 2010 Michael Lorenz
@@ -29,7 +29,7 @@
 /* a console driver for the Sun CG12 / Matrox SG3 graphics board */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgtwelve.c,v 1.2 2010/04/08 16:49:34 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgtwelve.c,v 1.3 2010/04/14 04:37:11 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -62,8 +62,12 @@
 struct cgtwelve_softc {
 	device_t	sc_dev;
 	bus_space_tag_t sc_tag;
+	bus_space_handle_t sc_regh;
+	bus_addr_t	sc_paddr;
 	void		*sc_fbaddr;
 	void		*sc_shadow;
+	uint8_t		*sc_wids;
+	void		*sc_int;
 	int		sc_width;
 	int		sc_height;
 	int		sc_stride;
@@ -79,6 +83,15 @@
 static paddr_t	cgtwelve_mmap(void *, void *, off_t, int);
 static void	cgtwelve_init_screen(void *, struct vcons_screen *, int,
  long *);
+static void	cgtwelve_write_wid(struct cgtwelve_softc *, int, uint8_t);
+static void	cgtwelve_select_ovl(struct cgtwelve_softc *, int);
+#define CG12_SEL_OVL	0
+#define CG12_SEL_ENABLE	1
+#define CG12_SEL_8BIT	2
+#define CG12_SEL_24BIT	3
+#define CG12_SEL_WID	4
+static void	cgtwelve_write_dac(struct cgtwelve_softc *, int, int, int, int);
+static void	cgtwelve_setup(struct cgtwelve_softc *, int);
 
 CFATTACH_DECL_NEW(cgtwelve, sizeof(struct cgtwelve_softc),
 cgtwelve_match, cgtwelve_attach, NULL, NULL);
@@ -143,6 +156,8 @@
 	sc-sc_dev = self;
 	sc-sc_tag = sa-sa_bustag;
 
+	sc-sc_paddr = sbus_bus_addr(sa-sa_bustag, sa-sa_slot, sa-sa_offset);
+
 	/* read geometry information from the device tree */
 	sc-sc_width = prom_getpropint(sa-sa_node, width, 1152);
 	sc-sc_height = prom_getpropint(sa-sa_node, height, 900);
@@ -164,6 +179,40 @@
 		
 	aprint_normal_dev(self, %d x %d\n, sc-sc_width, sc-sc_height);
 
+
+	if (sbus_bus_map(sa-sa_bustag,
+			 sa-sa_slot,
+			 sa-sa_offset + CG12_OFF_REGISTERS,
+			 0xc, 0, sc-sc_regh) != 0) {
+		aprint_error(%s: couldn't map registers\n, 
+		device_xname(sc-sc_dev));
+		return;
+	}
+
+	if (sbus_bus_map(sa-sa_bustag,
+			 sa-sa_slot,
+			 sa-sa_offset + CG12_OFF_WID, 0x10, 
+			 BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_LARGE,
+			 bh) != 0) {
+		aprint_error(%s: couldn't map WID\n, 
+		device_xname(sc-sc_dev));
+		return;
+	}
+	sc-sc_wids = bus_space_vaddr(sa-sa_bustag, bh);
+
+	if (sbus_bus_map(sa-sa_bustag,
+			 sa-sa_slot,
+			 sa-sa_offset + CG12_OFF_INTEN, 0x40, 
+			 BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_LARGE,
+			 bh) != 0) {
+		aprint_error(%s: couldn't map colour fb\n, 
+		device_xname(sc-sc_dev));
+		return;
+	}
+	sc-sc_int = bus_space_vaddr(sa-sa_bustag, bh);
+
+	cgtwelve_setup(sc, 1);
+
 	sc-sc_shadow = kmem_alloc(sc-sc_fbsize, KM_SLEEP);
 	isconsole = fb_is_console(node);
 
@@ -176,8 +225,6 @@
 	vcons_init_screen(sc-vd, cgtwelve_console_screen, 1, defattr);
 	cgtwelve_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
 
-	memset(sc-sc_fbaddr, 0, sc-sc_fbsize);
-
 	ri = cgtwelve_console_screen.scr_ri;
 
 	cgtwelve_defscreendesc.nrows = ri-ri_rows;
@@ -196,11 +243,9 @@
 	aa.accesscookie = sc-vd;
 
 	config_found(self, aa, wsemuldisplaydevprint);
-#if 0
-	if (sbus_bus_map(sa-sa_bustag,
-			 sa-sa_slot,
-			 sa-sa_offset + CG12_OFF_REGISTERS,
-			 0xc, 0, bh) == 0) {
+#if 0	
+	{
+		bus_space_handle_r bh = sc-sc_regh;
 		int i, j;
 
 		bus_space_write_4(sa-sa_bustag, bh, CG12_EIC_RESET, 0);
@@ -260,12 +305,157 @@
 			}
 			printf(\n);
 		}
-		bus_space_unmap(sa-sa_bustag, bh, 0xc);
 	}
 	panic(poof);
 #endif
 }
 
+/* 0 - overlay plane, 1 - enable plane, 2 - 8bit fb, 3 - 24bit fb, 4 - WIDs */
+static void
+cgtwelve_select_ovl(struct cgtwelve_softc *sc, int which)
+{
+	switch(which) {
+		case 0:
+			bus_space_write_4(sc-sc_tag, sc-sc_regh,
+			CG12DPU_PLN_RDMSK_HOST, CG12_PLN_RD_OVERLAY);
+			bus_space_write_4(sc-sc_tag, sc-sc_regh,
+			CG12DPU_PLN_WRMSK_HOST, CG12_PLN_WR_OVERLAY);
+			bus_space_write_4(sc-sc_tag, sc-sc_regh,
+			CG12DPU_PLN_SL_HOST, CG12_PLN_SL_OVERLAY);
+			bus_space_write_4(sc-sc_tag, sc-sc_regh,
+			CG12APU_HPAGE, CG12_HPAGE_OVERLAY);
+			bus_space_write_4(sc-sc_tag, sc-sc_regh,
+