CVS commit: src/lib/libevent

2009-04-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 28 07:52:00 UTC 2009

Modified Files:
src/lib/libevent: evdns.3

Log Message:
Use Xr for strtok_r reference. Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libevent/evdns.3

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

Modified files:

Index: src/lib/libevent/evdns.3
diff -u src/lib/libevent/evdns.3:1.4 src/lib/libevent/evdns.3:1.5
--- src/lib/libevent/evdns.3:1.4	Tue Apr 28 03:11:45 2009
+++ src/lib/libevent/evdns.3	Tue Apr 28 07:51:59 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: evdns.3,v 1.4 2009/04/28 03:11:45 reed Exp $
+.\"	$NetBSD: evdns.3,v 1.5 2009/04/28 07:51:59 wiz Exp $
 .\"
 .\" Copyright (c) 2006 Niels Provos 
 .\" All rights reserved.
@@ -102,7 +102,7 @@
 code.
 You statically link with it.
 You should also test for the existence of
-.Dv strtok_r
+.Xr strtok_r 3
 and define
 .Dv HAVE_STRTOK_R
 if you have it.
@@ -146,7 +146,7 @@
 .Pp
 When the lookup is complete the callback function is called.
 The first argument will be one of the DNS_ERR_* defines in evdns.h.
-Hopefully it will be 
+Hopefully it will be
 .Dv DNS_ERR_NONE ,
 in which case type will be
 .Dv DNS_IPv4_A ,



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

2009-04-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 28 07:56:19 UTC 2009

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

Log Message:
Fix xrefs, comment out the one to libbz2 (no man page exists for that).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.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/bin/netpgp.1
diff -u src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1:1.1.1.1 src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1:1.2
--- src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1:1.1.1.1	Thu Apr 23 06:32:02 2009
+++ src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1	Tue Apr 28 07:56:19 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: netpgp.1,v 1.1.1.1 2009/04/23 06:32:02 agc Exp $
+.\" $NetBSD: netpgp.1,v 1.2 2009/04/28 07:56:19 wiz Exp $
 .\"
 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -134,7 +134,7 @@
 is verified, checking the contents against the user's public signature.
 .It Fl -version
 Print the version information from the
-.Xr libnetpgpsdk 3
+.Xr libnetpgp 3
 library.
 .El
 .Pp
@@ -253,10 +253,10 @@
 or 2 if any other error occurs.
 .Sh SEE ALSO
 .Xr getpass 3 ,
-.Xr libbz2 3 ,
+.\" .Xr libbz2 3 ,
 .Xr libnetpgp 3 ,
-.Xr libz 3 ,
-.Xr ssl 3
+.Xr ssl 3 ,
+.Xr zlib 3
 .Sh STANDARDS
 The
 .Nm



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

2009-04-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 28 07:59:35 UTC 2009

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

Log Message:
Fix In argument (no <> needed). Use .Pa for paths. Drop trailing space.
Punctuation nits.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3

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/libnetpgp.3
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.2 src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.3
--- src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.2	Tue Apr 28 00:40:45 2009
+++ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3	Tue Apr 28 07:59:35 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgp.3,v 1.2 2009/04/28 00:40:45 agc Exp $
+.\" $NetBSD: libnetpgp.3,v 1.3 2009/04/28 07:59:35 wiz Exp $
 .\"
 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -36,7 +36,7 @@
 .Sh LIBRARY
 .Lb libnetpgp
 .Sh SYNOPSIS
-.In 
+.In netpgp.h
 .Ft int
 .Fo netpgp_init
 .Fa "netpgp_t *netpgp" "char *userid" "char *pubringfile" "char *secringfile"
@@ -115,12 +115,12 @@
 argument passed to the function.
 If no public key ring file is provided, initial values will be taken from those
 in the
-.Ar .gnupg/pubring.gpg
+.Pa .gnupg/pubring.gpg
 file in the user's home directory.
 Similarily, if no secret key ring file is provided,
 initial values will be taken from those
 in the
-.Ar .gnupg/secring.gpg
+.Pa .gnupg/secring.gpg
 file in the user's home directory.
 The
 .Fn netpgp_init
@@ -141,7 +141,7 @@
 The name of the file containing the key to be imported is provided
 as the filename argument.
 .Pp
-To generate a key, the 
+To generate a key, the
 .Fn netpgp_generate_key
 is used.
 It takes an argument of the number of bits to use in the key.
@@ -199,8 +199,8 @@
 library first appeared in
 .Nx 6.0 .
 .Sh AUTHORS
-.An Ben Laurie
-.An Rachel Willmer.
+.An Ben Laurie ,
+.An Rachel Willmer .
 .An Alistair Crooks
 wrote this high-level interface.
 .Pp



CVS commit: [nick-hppapmap] src/sys/arch/hppa

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 08:03:46 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c
src/sys/arch/hppa/include [nick-hppapmap]: pmap.h


To generate a diff of this commit:
cvs rdiff -u -r1.43.8.57 -r1.43.8.58 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.16.18.12 -r1.16.18.13 src/sys/arch/hppa/include/pmap.h

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

Modified files:

Index: src/sys/arch/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.43.8.57 src/sys/arch/hppa/hppa/pmap.c:1.43.8.58
--- src/sys/arch/hppa/hppa/pmap.c:1.43.8.57	Tue Apr 28 07:34:06 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Tue Apr 28 08:03:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.43.8.57 2009/04/28 07:34:06 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.43.8.58 2009/04/28 08:03:46 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.43.8.57 2009/04/28 07:34:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.43.8.58 2009/04/28 08:03:46 skrll Exp $");
 
 #include 
 #include 
@@ -200,7 +200,7 @@
 static inline struct pv_entry *pmap_pv_alloc(void);
 static inline void pmap_pv_free(struct pv_entry *);
 static inline void pmap_pv_enter(struct vm_page *, struct pv_entry *, pmap_t,
-vaddr_t , struct vm_page *, pt_entry_t *);
+vaddr_t , struct vm_page *, u_int);
 static inline struct pv_entry *pmap_pv_remove(struct vm_page *, pmap_t,
 vaddr_t);
 
@@ -493,7 +493,8 @@
 	printf("pg %p attr 0x%08x aliases %d\n", pg, pg->mdpage.pvh_attrs,
 	pg->mdpage.pvh_aliases);
 	for (pve = pg->mdpage.pvh_list; pve; pve = pve->pv_next)
-		printf("%x:%lx\n", pve->pv_pmap->pm_space, pve->pv_va);
+		printf("%x:%lx\n", pve->pv_pmap->pm_space,
+		pve->pv_va & PV_VAMASK);
 	mutex_exit(&pg->mdpage.pvh_lock);
 }
 #endif
@@ -543,17 +544,18 @@
 	 */
 	for (tpve = pve; tpve; tpve = tpve->pv_next) {
 		pt_entry_t pte;
+		vaddr_t tva = tpve->pv_va & PV_VAMASK;
 
 		/* XXX LOCK */
-		pte = pmap_vp_find(tpve->pv_pmap, tpve->pv_va);
+		pte = pmap_vp_find(tpve->pv_pmap, tva);
 		attrs |= pmap_pvh_attrs(pte);
 
-		if (((va ^ tpve->pv_va) & HPPA_PGAOFF) != 0)
+		if (((va ^ tva) & HPPA_PGAOFF) != 0)
 			nonequiv = true;
 
 		DPRINTF(PDB_FOLLOW|PDB_ALIAS,
 		("%s: va 0x%08x:0x%08x attrs 0x%08x %s\n", __func__,
-		(int)tpve->pv_pmap->pm_space, (int)tpve->pv_va,
+		(int)tpve->pv_pmap->pm_space, (int)tpve->pv_va & PV_VAMASK,
 		pmap_pvh_attrs(pte), nonequiv ? "alias" : ""));
 	}
 
@@ -628,27 +630,26 @@
 {
 
 	if (pv->pv_ptp)
-		pmap_pde_release(pv->pv_pmap, pv->pv_va, pv->pv_ptp);
+		pmap_pde_release(pv->pv_pmap, pv->pv_va & PV_VAMASK,
+		pv->pv_ptp);
 
 	pool_put(&pmap_pv_pool, pv);
 }
 
 static inline void
 pmap_pv_enter(struct vm_page *pg, struct pv_entry *pve, pmap_t pm,
-vaddr_t va, struct vm_page *pdep, pt_entry_t *ptep)
+vaddr_t va, struct vm_page *pdep, u_int flags)
 {
-	DPRINTF(PDB_FOLLOW|PDB_PV, ("%s(%p, %p, %p, 0x%x, %p)\n", __func__,
-	pg, pve, pm, (int)va, pdep));
+	DPRINTF(PDB_FOLLOW|PDB_PV, ("%s(%p, %p, %p, 0x%x, %p, 0x%x)\n",
+	__func__, pg, pve, pm, (int)va, pdep, flags));
 
 	KASSERT(mutex_owned(&pg->mdpage.pvh_lock));
 
 	pve->pv_pmap = pm;
-	pve->pv_va = va;
+	pve->pv_va = va | flags;
 	pve->pv_ptp = pdep;
 	pve->pv_next = pg->mdpage.pvh_list;
 	pg->mdpage.pvh_list = pve;
-
-	pmap_check_alias(pg, pve, va, ptep);
 }
 
 static inline struct pv_entry *
@@ -660,7 +661,7 @@
 
 	for (pv = *(pve = &pg->mdpage.pvh_list);
 	pv; pv = *(pve = &(*pve)->pv_next))
-		if (pv->pv_pmap == pmap && pv->pv_va == va) {
+		if (pv->pv_pmap == pmap && (pv->pv_va & PV_VAMASK) == va) {
 			*pve = pv->pv_next;
 			break;
 		}
@@ -1191,7 +1192,8 @@
 	DPRINTF(PDB_FOLLOW, (" 0x%x",
 	(int)haggis->pv_va));
 
-	pmap_remove(pmap, haggis->pv_va,
+	pmap_remove(pmap,
+	haggis->pv_va & PV_VAMASK,
 	haggis->pv_va + PAGE_SIZE);
 
 	/*
@@ -1315,9 +1317,11 @@
  PMAP_UNLOCK(pmap);
 return (ENOMEM);
 			}
-			panic("pmap_enter: no pv entries available");
+			panic("%s: no pv entries available", __func__);
 		}
-		pmap_pv_enter(pg, pve, pmap, va, ptp, &pte);
+		pmap_pv_enter(pg, pve, pmap, va, ptp, 0);
+		pmap_check_alias(pg, pve, va, &pte);
+
 		mutex_exit(&pg->mdpage.pvh_lock);
 	} else if (pve) {
 		pmap_pv_free(pve);
@@ -1466,7 +1470,7 @@
 void
 pmap_page_remove(struct vm_page *pg)
 {
-	struct pv_entry *pve, *npve;
+	struct pv_entry *pve, *npve, **pvp;
 
 	DPRINTF(PDB_FOLLOW|PDB_PV, ("%s(%p)\n", __func__, pg));
 
@@ -1474,9 +1478,10 @@
 		return;
 
 	mutex_enter(&pg->mdpage.pvh_lock);
+	pvp = &pg->mdpage.pvh_list;
 	for (pve = pg->mdpage.pvh_list; pve; pve = npve) {
 		pmap_t pmap = pve->pv_pmap;
-		vaddr_t va = pve->pv_va;
+		vaddr_t va = pve->pv_va & PV_VAMASK;
 		volatile pt_entry_t *pde;
 		pt_entry_t pte;
 
@@ -1484,6 +1489,18 @@
 
 		pde = 

CVS commit: src/usr.sbin/sa

2009-04-28 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Tue Apr 28 08:32:57 UTC 2009

Modified Files:
src/usr.sbin/sa: main.c

Log Message:
Fix issue I introduced in WARNS=4 -- addition of extra argument to default argv.
Found & fixed by Geoff Wing.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sa/main.c

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

Modified files:

Index: src/usr.sbin/sa/main.c
diff -u src/usr.sbin/sa/main.c:1.23 src/usr.sbin/sa/main.c:1.24
--- src/usr.sbin/sa/main.c:1.23	Sat Apr 18 13:37:04 2009
+++ src/usr.sbin/sa/main.c	Tue Apr 28 08:32:56 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.23 2009/04/18 13:37:04 lukem Exp $ */
+/* $NetBSD: main.c,v 1.24 2009/04/28 08:32:56 lukem Exp $ */
 
 /*
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -39,7 +39,7 @@
 __COPYRIGHT("@(#) Copyright (c) 1994\
  Christopher G. Demetriou.  All rights reserved.");
 
-__RCSID("$NetBSD: main.c,v 1.23 2009/04/18 13:37:04 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.24 2009/04/28 08:32:56 lukem Exp $");
 #endif
 
 /*
@@ -76,8 +76,8 @@
 int Kflag, lflag, mflag, qflag, rflag, sflag, tflag, uflag, vflag;
 int cutoff = 1;
 
-static char	*dfltargv[] = { __UNCONST(_PATH_ACCT), 0 };
-static int	dfltargc = (sizeof(dfltargv)/sizeof(char *));
+static const char	*dfltargv[] = { _PATH_ACCT };
+static const int	dfltargc = (sizeof(dfltargv)/sizeof(char *));
 
 /* default to comparing by sum of user + system time */
 cmpf_t   sa_cmp = cmp_usrsys;
@@ -201,7 +201,7 @@
 
 	if (argc == 0) {
 		argc = dfltargc;
-		argv = dfltargv;
+		argv = __UNCONST(dfltargv);
 	}
 
 	/* for each file specified */



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

2009-04-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Apr 28 09:19:15 UTC 2009

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

Log Message:
Use Fl Fl for long flags.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.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/bin/netpgp.1
diff -u src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1:1.2 src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1:1.3
--- src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1:1.2	Tue Apr 28 07:56:19 2009
+++ src/crypto/external/bsd/netpgp/dist/src/bin/netpgp.1	Tue Apr 28 09:19:15 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: netpgp.1,v 1.2 2009/04/28 07:56:19 wiz Exp $
+.\" $NetBSD: netpgp.1,v 1.3 2009/04/28 09:19:15 wiz Exp $
 .\"
 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -35,22 +35,22 @@
 .Nd signing, verification, encryption, and decryption utility
 .Sh SYNOPSIS
 .Nm netpgp
-.Op Fl -armour
-.Op Fl -clearsign
-.Op Fl -decrypt
-.Op Fl -encrypt
-.Op Fl -export-key
-.Op Fl -find-key
-.Op Fl -generate-key
-.Op Fl -homedir Ns = Ns Ar home-directory
-.Op Fl -import-key
-.Op Fl -keyring Ns = Ns Ar keyring
-.Op Fl -list-keys
-.Op Fl -numbits Ns = Ns Ar numbits
-.Op Fl -sign
-.Op Fl -userid Ns = Ns Ar userid
-.Op Fl -verify
-.Op Fl -version
+.Op Fl Fl armour
+.Op Fl Fl clearsign
+.Op Fl Fl decrypt
+.Op Fl Fl encrypt
+.Op Fl Fl export-key
+.Op Fl Fl find-key
+.Op Fl Fl generate-key
+.Op Fl Fl homedir Ns = Ns Ar home-directory
+.Op Fl Fl import-key
+.Op Fl Fl keyring Ns = Ns Ar keyring
+.Op Fl Fl list-keys
+.Op Fl Fl numbits Ns = Ns Ar numbits
+.Op Fl Fl sign
+.Op Fl Fl userid Ns = Ns Ar userid
+.Op Fl Fl verify
+.Op Fl Fl version
 .Ar file ...
 .Sh DESCRIPTION
 The
@@ -83,38 +83,38 @@
 .Pp
 One of the following commands must be present:
 .Bl -tag -width Ar
-.It Fl -clearsign
+.It Fl Fl clearsign
 The signature of the file named on the command line is calculated
 in the same manner as the
-.Fl -sign
+.Fl Fl sign
 command, but the text is added to the file such that
 the text itself is not in binary format, but can be read by mere mortals.
-.It Fl -decrypt
+.It Fl Fl decrypt
 Decrypt the file using the user's private key.
 The pass phrase will be optained by prompting the user
 to type it in, using
 .Xr getpass 3 .
-.It Fl -encrypt
+.It Fl Fl encrypt
 Use the user's public key to encrypt the files named on the command line.
-.It Fl -export-key
+.It Fl Fl export-key
 Display the current public key in a format suitable for export.
 This can be used to place the keyring on one of the
 public key servers, for example.
-.It Fl -find-key
+.It Fl Fl find-key
 Find the appropriate public key from the current keyring.
 If no keyring is provided, the user's public keyring is used.
-.It Fl -generate-key
+.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.
-.It Fl -import-key
+.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
 retrieved from elsewhere.
-.It Fl -list-keys
+.It Fl Fl list-keys
 List all the public keys in the current keyring.
 If no keyring is provided, the user's public keyring is used.
-.It Fl -sign
+.It Fl Fl sign
 The private key is used to digitally sign the files named on the
 command line.
 Extra text is added to the file.
@@ -129,10 +129,10 @@
 extension to the original file name.
 The user will be prompted for their pass phrase using
 .Xr getpass 3 .
-.It Fl -verify
+.It Fl Fl verify
 For each of the files named on the command line, the signature of the file
 is verified, checking the contents against the user's public signature.
-.It Fl -version
+.It Fl Fl version
 Print the version information from the
 .Xr libnetpgp 3
 library.
@@ -141,19 +141,19 @@
 In addition to one of the preceding commands, a number of qualifiers
 or options may be given.
 .Bl -tag -width Ar
-.It Fl -armour , -armor
+.It Fl Fl armour , Fl armor
 This option, however it is spelled, wraps the signature as an
 ASCII-encoded piece of text, for ease of use.
-.It Fl -homedir Ar home-directory
+.It Fl Fl homedir Ar home-directory
 Keyrings are normally located, for historical reasons, within
 the user's home directory in a subdirectory called
 .Dq Pa .gnupg
 and this option specifies an alternative location in which to
 find that sub-directory.
-.It Fl -keyring Ar keyring
+.It Fl Fl keyring Ar keyring
 This option specifies an alternative keyring to be used.
 All keyring operations will be relative to this alternative keyring.
-.It Fl -numbits Ar numbits
+.It Fl Fl numbits Ar numbits
 specifies the number of bits to be used when generating a key.
 The default nu

CVS commit: src/usr.sbin/tpctl

2009-04-28 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Apr 28 10:57:24 UTC 2009

Modified Files:
src/usr.sbin/tpctl: data.c main.c tp.c tpctl.h

Log Message:
Fix WARNS=4 issues.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/tpctl/data.c src/usr.sbin/tpctl/tpctl.h
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/tpctl/main.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/tpctl/tp.c

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

Modified files:

Index: src/usr.sbin/tpctl/data.c
diff -u src/usr.sbin/tpctl/data.c:1.5 src/usr.sbin/tpctl/data.c:1.6
--- src/usr.sbin/tpctl/data.c:1.5	Sat May 10 15:31:05 2008
+++ src/usr.sbin/tpctl/data.c	Tue Apr 28 10:57:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: data.c,v 1.5 2008/05/10 15:31:05 martin Exp $	*/
+/*	$NetBSD: data.c,v 1.6 2009/04/28 10:57:24 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2002 TAKEMRUA Shin
@@ -41,7 +41,7 @@
 
 #ifndef lint
 #include 
-__RCSID("$NetBSD: data.c,v 1.5 2008/05/10 15:31:05 martin Exp $");
+__RCSID("$NetBSD: data.c,v 1.6 2009/04/28 10:57:24 nonaka Exp $");
 #endif /* not lint */
 
 static void *
@@ -86,7 +86,7 @@
 }
 
 int
-read_data(char *filename, struct tpctl_data *data)
+read_data(const char *filename, struct tpctl_data *data)
 {
 	int res, len, n, i, t;
 	char buf[MAXDATALEN + 2], *p, *p2;
@@ -252,32 +252,32 @@
 }
 
 int
-write_data(char *filename, struct tpctl_data *data)
+write_data(const char *filename, struct tpctl_data *data)
 {
 	int res, fd;
 	FILE *fp;
 	struct tpctl_data_elem *elem;
-	char *p, tmpfile[MAXPATHLEN + 1];
+	char *p, tempfile[MAXPATHLEN + 1];
 
 	fd = 0;		/* XXXGCC -Wuninitialized [hpcarm] */
 
 	if (filename == NULL) {
 		fp = stdout;
 	} else {
-		strncpy(tmpfile, filename, MAXPATHLEN);
-		tmpfile[MAXPATHLEN] = '\0';
-		if ((p = strrchr(tmpfile, '/')) == NULL) {
-			strcpy(tmpfile, TPCTL_TMP_FILENAME);
+		strncpy(tempfile, filename, MAXPATHLEN);
+		tempfile[MAXPATHLEN] = '\0';
+		if ((p = strrchr(tempfile, '/')) == NULL) {
+			strcpy(tempfile, TPCTL_TMP_FILENAME);
 		} else {
 			p++;
 			if (MAXPATHLEN <
-			p - tmpfile + strlen(TPCTL_TMP_FILENAME))
+			p - tempfile + strlen(TPCTL_TMP_FILENAME))
 return (ERR_NOFILE);/* file name is too long */
-			strcat(tmpfile, TPCTL_TMP_FILENAME);
+			strcat(tempfile, TPCTL_TMP_FILENAME);
 		}
-		if ((fd = open(tmpfile, O_RDWR|O_CREAT|O_EXCL, 0644)) < 0) {
+		if ((fd = open(tempfile, O_RDWR|O_CREAT|O_EXCL, 0644)) < 0) {
 			fprintf(stderr, "%s: can't create %s\n",
-			getprogname(), tmpfile);
+			getprogname(), tempfile);
 			return (ERR_NOFILE);
 		}
 		if ((fp = fdopen(fd, "w")) == NULL) {
@@ -304,8 +304,8 @@
 	if (filename != NULL) {
 		fclose(fp);
 		close(fd);
-		if (rename(tmpfile, filename) < 0) {
-			unlink(tmpfile);
+		if (rename(tempfile, filename) < 0) {
+			unlink(tempfile);
 			return (ERR_NOFILE);
 		}
 	}
Index: src/usr.sbin/tpctl/tpctl.h
diff -u src/usr.sbin/tpctl/tpctl.h:1.5 src/usr.sbin/tpctl/tpctl.h:1.6
--- src/usr.sbin/tpctl/tpctl.h:1.5	Sat May 10 15:31:05 2008
+++ src/usr.sbin/tpctl/tpctl.h	Tue Apr 28 10:57:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpctl.h,v 1.5 2008/05/10 15:31:05 martin Exp $	*/
+/*	$NetBSD: tpctl.h,v 1.6 2009/04/28 10:57:24 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 TAKEMRUA Shin
@@ -86,8 +86,8 @@
 };
 
 int init_data(struct tpctl_data *);
-int read_data(char *, struct tpctl_data *);
-int write_data(char *, struct tpctl_data *);
+int read_data(const char *, struct tpctl_data *);
+int write_data(const char *, struct tpctl_data *);
 void write_coords(FILE *, char *, struct wsmouse_calibcoords *);
 void free_data(struct tpctl_data *);
 int replace_data(struct tpctl_data *, char *, struct wsmouse_calibcoords *);

Index: src/usr.sbin/tpctl/main.c
diff -u src/usr.sbin/tpctl/main.c:1.4 src/usr.sbin/tpctl/main.c:1.5
--- src/usr.sbin/tpctl/main.c:1.4	Sat May 10 15:31:05 2008
+++ src/usr.sbin/tpctl/main.c	Tue Apr 28 10:57:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.4 2008/05/10 15:31:05 martin Exp $	*/
+/*	$NetBSD: main.c,v 1.5 2009/04/28 10:57:24 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2002 TAKEMRUA Shin
@@ -49,12 +49,12 @@
 
 #ifndef lint
 #include 
-__RCSID("$NetBSD: main.c,v 1.4 2008/05/10 15:31:05 martin Exp $");
+__RCSID("$NetBSD: main.c,v 1.5 2009/04/28 10:57:24 nonaka Exp $");
 #endif /* not lint */
 
-void load_data(char *data_file, struct tpctl_data *);
-void save_data(char *data_file, struct tpctl_data *);
-int do_calibration(char *, struct tp *, struct wsmouse_calibcoords *);
+void load_data(const char *, struct tpctl_data *);
+void save_data(const char *, struct tpctl_data *);
+int do_calibration(const char *, struct tp *, struct wsmouse_calibcoords *);
 void drawcross(struct fb *, int, int, int, fb_pixel_t);
 int check_esc(void *);
 
@@ -79,9 +79,9 @@
 	struct tp tp;
 	struct wsmouse_calibcoords *pref;
 	struct tpctl_data data;
-	char *data_file;
-	char *dev_name;
-	char *dispdev_name;
+	const char *data_file;
+	const char 

CVS commit: src/sys/dev/pci

2009-04-28 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Apr 28 11:49:15 UTC 2009

Modified Files:
src/sys/dev/pci: if_ale.c

Log Message:
on detach, deregister from pmf


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/if_ale.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/pci/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.2 src/sys/dev/pci/if_ale.c:1.3
--- src/sys/dev/pci/if_ale.c:1.2	Sat Apr 25 17:04:40 2009
+++ src/sys/dev/pci/if_ale.c	Tue Apr 28 11:49:15 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ale.c,v 1.2 2009/04/25 17:04:40 tsutsui Exp $	*/
+/*	$NetBSD: if_ale.c,v 1.3 2009/04/28 11:49:15 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon 
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.2 2009/04/25 17:04:40 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.3 2009/04/28 11:49:15 cegger Exp $");
 
 #include "bpfilter.h"
 #include "vlan.h"
@@ -577,6 +577,7 @@
 	struct ifnet *ifp = &sc->sc_ec.ec_if;
 	int s;
 
+	pmf_device_deregister(self);
 	s = splnet();
 	ale_stop(ifp, 0);
 	splx(s);



CVS commit: src/sys/dev/pci

2009-04-28 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Apr 28 11:47:56 UTC 2009

Modified Files:
src/sys/dev/pci: if_age.c

Log Message:
on detach, deregister from pmf and free resource


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/if_age.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/pci/if_age.c
diff -u src/sys/dev/pci/if_age.c:1.27 src/sys/dev/pci/if_age.c:1.28
--- src/sys/dev/pci/if_age.c:1.27	Sun Apr 26 07:01:29 2009
+++ src/sys/dev/pci/if_age.c	Tue Apr 28 11:47:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_age.c,v 1.27 2009/04/26 07:01:29 cegger Exp $ */
+/*	$NetBSD: if_age.c,v 1.28 2009/04/28 11:47:56 cegger Exp $ */
 /*	$OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.27 2009/04/26 07:01:29 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.28 2009/04/28 11:47:56 cegger Exp $");
 
 #include "bpfilter.h"
 #include "vlan.h"
@@ -314,6 +314,7 @@
 	struct ifnet *ifp = &sc->sc_ec.ec_if;
 	int s;
 
+	pmf_device_deregister(self);
 	s = splnet();
 	age_stop(ifp, 0);
 	splx(s);
@@ -331,7 +332,10 @@
 		pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
 		sc->sc_irq_handle = NULL;
 	}
-
+	if (sc->sc_mem_size) {
+		bus_space_unmap(sc->sc_mem_bt, sc->sc_mem_bh, sc->sc_mem_size);
+		sc->sc_mem_size = 0;
+	}
 	return 0;
 }
 



CVS commit: [nick-hppapmap] src/sys/arch/hp700/conf

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 12:35:37 UTC 2009

Modified Files:
src/sys/arch/hp700/conf [nick-hppapmap]: GENERIC

Log Message:
-fno-omit-frame-pointer is dealt with automatically now.


To generate a diff of this commit:
cvs rdiff -u -r1.83.2.7 -r1.83.2.8 src/sys/arch/hp700/conf/GENERIC

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

Modified files:

Index: src/sys/arch/hp700/conf/GENERIC
diff -u src/sys/arch/hp700/conf/GENERIC:1.83.2.7 src/sys/arch/hp700/conf/GENERIC:1.83.2.8
--- src/sys/arch/hp700/conf/GENERIC:1.83.2.7	Tue Apr 28 06:47:00 2009
+++ src/sys/arch/hp700/conf/GENERIC	Tue Apr 28 12:35:37 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.83.2.7 2009/04/28 06:47:00 skrll Exp $
+# $NetBSD: GENERIC,v 1.83.2.8 2009/04/28 12:35:37 skrll Exp $
 #
 # GENERIC machine description file
 # 
@@ -23,7 +23,7 @@
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
-#ident 		"GENERIC-$Revision: 1.83.2.7 $"
+#ident 		"GENERIC-$Revision: 1.83.2.8 $"
 
 maxusers	32		# estimated number of users
 
@@ -72,7 +72,7 @@
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
 #options 	KGDB		# remote debugger
 #options 	KGDB_DEVNAME="\"com\"",KGDBADDR=0xf0822000,KGDBRATE=9600
-#makeoptions	DEBUG="-g -fno-omit-frame-pointer"	# compile full symbol table
+#makeoptions	DEBUG="-g"	# compile full symbol table
 
 # Compatibility options
 options 	COMPAT_20	# compatability with NetBSD 2.0,



CVS commit: [nick-hppapmap] src/sys/sys

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 12:49:33 UTC 2009

Modified Files:
src/sys/sys [nick-hppapmap]: namei.h

Log Message:
Whitespace (Remove diff to HEAD.)


To generate a diff of this commit:
cvs rdiff -u -r1.60.12.2 -r1.60.12.3 src/sys/sys/namei.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/sys/namei.h
diff -u src/sys/sys/namei.h:1.60.12.2 src/sys/sys/namei.h:1.60.12.3
--- src/sys/sys/namei.h:1.60.12.2	Tue Mar  3 18:34:31 2009
+++ src/sys/sys/namei.h	Tue Apr 28 12:49:33 2009
@@ -1,4 +1,5 @@
-/*	$NetBSD: namei.h,v 1.60.12.2 2009/03/03 18:34:31 skrll Exp $	*/
+/*	$NetBSD: namei.h,v 1.60.12.3 2009/04/28 12:49:33 skrll Exp $	*/
+
 
 /*
  * WARNING: GENERATED FILE.  DO NOT EDIT



CVS commit: [nick-hppapmap] src/sys/arch/hp700/hp700

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 12:53:53 UTC 2009

Modified Files:
src/sys/arch/hp700/hp700 [nick-hppapmap]: genassym.cf

Log Message:
G/C some old stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/arch/hp700/hp700/genassym.cf

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/hp700/hp700/genassym.cf
diff -u src/sys/arch/hp700/hp700/genassym.cf:1.16.2.1 src/sys/arch/hp700/hp700/genassym.cf:1.16.2.2
--- src/sys/arch/hp700/hp700/genassym.cf:1.16.2.1	Mon Oct 27 08:02:40 2008
+++ src/sys/arch/hp700/hp700/genassym.cf	Tue Apr 28 12:53:53 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.16.2.1 2008/10/27 08:02:40 skrll Exp $
+#	$NetBSD: genassym.cf,v 1.16.2.2 2009/04/28 12:53:53 skrll Exp $
 
 #	$OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $
 
@@ -90,13 +90,6 @@
 #export	TLB_DIRTY_POS
 #export	TLB_UNMANAGED_POS
 
-# hpt_table fields
-#struct	hpt_entry
-#member	HPT_TLBPROT	hpt_tlbprot
-#member	HPT_TLBPAGE	hpt_tlbpage
-#member	HPT_ENTRY	hpt_entry
-#define	HPT_TAG		0
-
 # struct cpu_info fields
 #define	CI_CPL			offsetof(struct cpu_info, ci_cpl)
 #define	CI_INTR_DEPTH		offsetof(struct cpu_info, ci_intr_depth)
@@ -104,24 +97,6 @@
 define	CI_MTX_COUNT		offsetof(struct cpu_info, ci_mtx_count)
 #define	CI_CURLWP		offsetof(struct cpu_info, ci_curlwp)
 
-# pv_entry fields
-#struct	pv_entry
-#member	PV_HASH	pv_hash
-#member	PV_SPACE	pv_space
-#member	PV_VA		pv_va
-#member	PV_TLBPAGE	pv_tlbpage
-#member	PV_TLBPROT	pv_tlbprot
-#member	PV_NEXT		pv_next
-#member	PV_HPT		pv_hpt
-
-# pv_head fields
-#struct	pv_head
-#member	PV_HEAD_PVS	pv_head_pvs
-#member	PV_HEAD_WRITABLE_DIRTY_REF pv_head_writable_dirty_ref
-#export	PV_HEAD_DIRTY_POS
-#export	PV_HEAD_REF_POS
-#export	PV_HEAD_WRITABLE_POS
-
 define	MTX_IPL			offsetof(struct kmutex, mtx_ipl)
 define	MTX_LOCK		offsetof(struct kmutex, mtx_lock)
 define	MTX_OWNER		offsetof(struct kmutex, mtx_owner)



CVS commit: [nick-hppapmap] src/sys/arch/hp700/dev

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 12:54:40 UTC 2009

Modified Files:
src/sys/arch/hp700/dev [nick-hppapmap]: pdc.c

Log Message:
Remove some unnecessary includes.


To generate a diff of this commit:
cvs rdiff -u -r1.25.4.1 -r1.25.4.2 src/sys/arch/hp700/dev/pdc.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/hp700/dev/pdc.c
diff -u src/sys/arch/hp700/dev/pdc.c:1.25.4.1 src/sys/arch/hp700/dev/pdc.c:1.25.4.2
--- src/sys/arch/hp700/dev/pdc.c:1.25.4.1	Mon Oct 27 08:02:40 2008
+++ src/sys/arch/hp700/dev/pdc.c	Tue Apr 28 12:54:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pdc.c,v 1.25.4.1 2008/10/27 08:02:40 skrll Exp $	*/
+/*	$NetBSD: pdc.c,v 1.25.4.2 2009/04/28 12:54:40 skrll Exp $	*/
 
 /*	$OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $	*/
 
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.25.4.1 2008/10/27 08:02:40 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.25.4.2 2009/04/28 12:54:40 skrll Exp $");
 
 #include 
 #include 
@@ -54,10 +54,6 @@
 
 #include 
 
-#include  /* type definitions */
-#include 
-
-
 typedef
 struct pdc_softc {
 	struct device sc_dv;



CVS commit: src/etc/rc.d

2009-04-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Apr 28 13:08:51 UTC 2009

Modified Files:
src/etc/rc.d: fsck_root

Log Message:
Do nothing if root file system has fs_passno=0 in /etc/fstab.
(It might be better to change fsck(8) so that "fsck -p" always checks
fs_passno, whether or not file systems are specified on the command
line.)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/fsck_root

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

Modified files:

Index: src/etc/rc.d/fsck_root
diff -u src/etc/rc.d/fsck_root:1.1 src/etc/rc.d/fsck_root:1.2
--- src/etc/rc.d/fsck_root:1.1	Tue Apr 21 16:08:57 2009
+++ src/etc/rc.d/fsck_root	Tue Apr 28 13:08:51 2009
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: fsck_root,v 1.1 2009/04/21 16:08:57 joerg Exp $
+# $NetBSD: fsck_root,v 1.2 2009/04/28 13:08:51 apb Exp $
 #
 
 # PROVIDE: fsck_root
@@ -10,6 +10,7 @@
 name="fsck_root"
 start_cmd="fsck_root_start"
 stop_cmd=":"
+fstab_file=/etc/fstab
 
 fsck_root_start()
 {
@@ -20,6 +21,22 @@
 	trap : 2 		# Ignore SIGINT, SIGQUIT, so we
 	trap : 3		# enter single-user mode on failure.
 
+	# Do nothing if root file system has fs_passno=0 in /etc/fstab.
+	while read fs_spec fs_file fs_vfstype fs_mntops fs_freq fs_passno
+	do
+		case "${fs_spec}:${fs_file}:${fs_passno}" in
+		\#*|'':*)
+			continue # skip comment or blank line
+			;;
+		*:/:0)
+			echo "Not checking /: fs_passno = 0 in ${fstab_file}"
+			return
+			;;
+		*:/:*)	break
+			;;
+		esac
+	done <"${fstab_file}"
+
 	echo "Starting root file system check:"
 	fsck $fsck_flags /
 	local fsck_error="$?"



CVS commit: [nick-hppapmap] src/sys/arch/hp700/hp700

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 13:20:06 UTC 2009

Modified Files:
src/sys/arch/hp700/hp700 [nick-hppapmap]: machdep.c

Log Message:
Turn the BTLB stuff off for now.


To generate a diff of this commit:
cvs rdiff -u -r1.48.4.16 -r1.48.4.17 src/sys/arch/hp700/hp700/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/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.48.4.16 src/sys/arch/hp700/hp700/machdep.c:1.48.4.17
--- src/sys/arch/hp700/hp700/machdep.c:1.48.4.16	Tue Apr 28 07:34:02 2009
+++ src/sys/arch/hp700/hp700/machdep.c	Tue Apr 28 13:20:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.48.4.16 2009/04/28 07:34:02 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.48.4.17 2009/04/28 13:20:06 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48.4.16 2009/04/28 07:34:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48.4.17 2009/04/28 13:20:06 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -728,6 +728,7 @@
 			usebtlb = 1;
 		}
 	}
+	usebtlb = 0;
 
 	error = pdc_call((iodcio_t)pdc, 0, PDC_TLB, PDC_TLB_INFO, &pdc_hwtlb);
 	if (error == 0 && pdc_hwtlb.min_size != 0 && pdc_hwtlb.max_size != 0) {



CVS commit: src/sys/dev/mii

2009-04-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Apr 28 13:25:17 UTC 2009

Modified Files:
src/sys/dev/mii: rgephy.c

Log Message:
Remove magic reset sequence except wakeup for rev 2 chips which breaks 8111D.
Problem reported and fix confirmed by Thomas Bieg on current-users.

Also tested on 8111C (no bad side effect) by several users privately.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/mii/rgephy.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/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.26 src/sys/dev/mii/rgephy.c:1.27
--- src/sys/dev/mii/rgephy.c:1.26	Wed Feb 11 23:01:07 2009
+++ src/sys/dev/mii/rgephy.c	Tue Apr 28 13:25:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.26 2009/02/11 23:01:07 cegger Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.27 2009/04/28 13:25:17 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.26 2009/02/11 23:01:07 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.27 2009/04/28 13:25:17 tsutsui Exp $");
 
 
 /*
@@ -607,13 +607,6 @@
 			PHY_WRITE(sc, RGEPHY_MII_SSR, ssr);
 		}
 	} else {
-		PHY_WRITE(sc, 0x1F, 0x0001);
-		PHY_WRITE(sc, 0x09, 0x273a);
-		PHY_WRITE(sc, 0x0e, 0x7bfb);
-		PHY_WRITE(sc, 0x1b, 0x841e);
-
-		PHY_WRITE(sc, 0x1F, 0x0002);
-		PHY_WRITE(sc, 0x01, 0x90D0);
 		PHY_WRITE(sc, 0x1F, 0x);
 		PHY_WRITE(sc, 0x0e, 0x);
 	}



CVS commit: [nick-hppapmap] src/sys/arch/hp700/hp700

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 13:35:44 UTC 2009

Modified Files:
src/sys/arch/hp700/hp700 [nick-hppapmap]: machdep.c

Log Message:
#ifdef DEBUG around printf


To generate a diff of this commit:
cvs rdiff -u -r1.48.4.17 -r1.48.4.18 src/sys/arch/hp700/hp700/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/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.48.4.17 src/sys/arch/hp700/hp700/machdep.c:1.48.4.18
--- src/sys/arch/hp700/hp700/machdep.c:1.48.4.17	Tue Apr 28 13:20:06 2009
+++ src/sys/arch/hp700/hp700/machdep.c	Tue Apr 28 13:35:44 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.48.4.17 2009/04/28 13:20:06 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.48.4.18 2009/04/28 13:35:44 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48.4.17 2009/04/28 13:20:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48.4.18 2009/04/28 13:35:44 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -444,7 +444,9 @@
 #endif
 	error = pdc_call((iodcio_t)pdc, 0, PDC_CACHE, PDC_CACHE_GETSPIDB,
 	&pdc_spidbits, 0, 0, 0, 0);
+#ifdef DEBUG
 	printf("SPID bits: 0x%x, error = %d\n", pdc_spidbits.spidbits, error);
+#endif
 
 	/* Calculate the OS_HPMC handler checksums. */
 	p = &os_hpmc;



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-04-28 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Tue Apr 28 13:54:07 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: handler.c

Log Message:
Reset nat_oa variables too when reusing phase two handler. Otherwise
phase2 rekeying might fail in some scenarios.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/crypto/dist/ipsec-tools/src/racoon/handler.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/dist/ipsec-tools/src/racoon/handler.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.27 src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.28
--- src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.27	Mon Apr 20 13:16:52 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/handler.c	Tue Apr 28 13:54:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: handler.c,v 1.27 2009/04/20 13:16:52 tteras Exp $	*/
+/*	$NetBSD: handler.c,v 1.28 2009/04/28 13:54:07 tteras Exp $	*/
 
 /* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */
 
@@ -736,6 +736,17 @@
 		oakley_delivm(iph2->ivm);
 		iph2->ivm = NULL;
 	}
+
+#ifdef ENABLE_NATT
+	if (iph2->natoa_src) {
+		racoon_free(iph2->natoa_src);
+		iph2->natoa_src = NULL;
+	}
+	if (iph2->natoa_dst) {
+		racoon_free(iph2->natoa_dst);
+		iph2->natoa_dst = NULL;
+	}
+#endif
 }
 
 /*



CVS commit: src/sys/rump/librump/rumpkern

2009-04-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Apr 28 14:00:42 UTC 2009

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
Free uao lock when destroying object.  Fixes tmpfs rename leak
reported by njoly.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/rump/librump/rumpkern/vm.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/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.54 src/sys/rump/librump/rumpkern/vm.c:1.55
--- src/sys/rump/librump/rumpkern/vm.c:1.54	Fri Apr 24 13:27:03 2009
+++ src/sys/rump/librump/rumpkern/vm.c	Tue Apr 28 14:00:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.54 2009/04/24 13:27:03 pooka Exp $	*/
+/*	$NetBSD: vm.c,v 1.55 2009/04/28 14:00:42 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.54 2009/04/24 13:27:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.55 2009/04/28 14:00:42 pooka Exp $");
 
 #include 
 #include 
@@ -239,6 +239,7 @@
 
 	mutex_enter(&uobj->vmobjlock);
 	ao_put(uobj, 0, 0, PGO_ALLPAGES | PGO_FREE);
+	mutex_destroy(&uobj->vmobjlock);
 	kmem_free(uobj, sizeof(*uobj));
 }
 



CVS commit: src/sys/dev/pci

2009-04-28 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Tue Apr 28 14:27:16 UTC 2009

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Mellanox Technologies Infiniband devices.


To generate a diff of this commit:
cvs rdiff -u -r1.983 -r1.984 src/sys/dev/pci/pcidevs

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/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.983 src/sys/dev/pci/pcidevs:1.984
--- src/sys/dev/pci/pcidevs:1.983	Sat Apr 25 15:29:18 2009
+++ src/sys/dev/pci/pcidevs	Tue Apr 28 14:27:16 2009
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.983 2009/04/25 15:29:18 tsutsui Exp $
+$NetBSD: pcidevs,v 1.984 2009/04/28 14:27:16 ginsbach Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -586,6 +586,7 @@
 vendor NETSEC		0x1660	NetSec
 vendor SIBYTE		0x166d	Broadcom (SiByte)
 vendor MYSON		0x1516	Myson-Century Technology
+vendor MELLANOX		0x15b3	Mellanox Technologies
 vendor NDC		0x15e8	National Datacomm
 vendor ACTIONTEC	0x1668	Action Tec Electronics
 vendor ATHEROS		0x168c	Atheros Communications
@@ -2828,6 +2829,21 @@
 /* MediaQ products */
 product MEDIAQ MQ200		0x0200	MQ200
 
+/* Mellanox Technologies */
+product MELLANOX MT23108	0x5a44	InfiniHost (Tavor)
+product MELLANOX MT23108_PCI	0x5a46	InfiniHost PCI Bridge (Tavor)
+product MELLANOX MT25204_OLD	0x5e8c	InfiniHost III Lx (old Sinai)
+product MELLANOX MT25204	0x6274	InfiniHost III Lx (Sinai)
+product MELLANOX MT25208_COMPAT	0x6278	InfiniHost III Ex (Arbel in Tavor compatility)
+product MELLANOX MT25208	0x6282	InfiniHost III Ex (Arbel)
+product MELLANOX MT25408_SDR	0x6340	ConnectX SDR (Hermon)
+product MELLANOX MT25408_DDR	0x634a	ConnectX DDR (Hermon)
+product MELLANOX MT25408_QDR	0x6354	ConnectX QDR PCIe 2.0 2.5GT/s (Hermon)
+product MELLANOX MT25408_EN	0x6368	ConnectX EN 10GigE PCIe 2.0 2.5GT/s (Hermon)
+product MELLANOX MT25408_DDR_2	0x6732	ConnectX DDR PCIe 2.0 5GT/s (Hermon)
+product MELLANOX MT25408_QDR_2	0x673c	ConnectX QDR PCIe 2.0 5GT/s (Hermon)
+product MELLANOX MT25408_EN_2	0x6750	ConnectX EN 10GigE PCIe 2.0 5GT/s (Hermon)
+
 /* Microsoft products */
 product MICROSOFT MN120		0x0001	MN-120 10/100 Ethernet Notebook Adapter
 



CVS commit: [nick-hppapmap] src/sys/arch/hp700

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 15:37:38 UTC 2009

Modified Files:
src/sys/arch/hp700/dev [nick-hppapmap]: cpu.c
src/sys/arch/hp700/hp700 [nick-hppapmap]: machdep.c
src/sys/arch/hp700/include [nick-hppapmap]: cpu.h

Log Message:
Tidy-up turning off the space-identifier hashing and the chip revision
stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.10.86.3 -r1.10.86.4 src/sys/arch/hp700/dev/cpu.c
cvs rdiff -u -r1.48.4.18 -r1.48.4.19 src/sys/arch/hp700/hp700/machdep.c
cvs rdiff -u -r1.28.2.4 -r1.28.2.5 src/sys/arch/hp700/include/cpu.h

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

Modified files:

Index: src/sys/arch/hp700/dev/cpu.c
diff -u src/sys/arch/hp700/dev/cpu.c:1.10.86.3 src/sys/arch/hp700/dev/cpu.c:1.10.86.4
--- src/sys/arch/hp700/dev/cpu.c:1.10.86.3	Sat Feb 14 15:16:08 2009
+++ src/sys/arch/hp700/dev/cpu.c	Tue Apr 28 15:37:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.10.86.3 2009/02/14 15:16:08 skrll Exp $	*/
+/*	$NetBSD: cpu.c,v 1.10.86.4 2009/04/28 15:37:38 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.c,v 1.28 2004/12/28 05:18:25 mickey Exp $	*/
 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10.86.3 2009/02/14 15:16:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10.86.4 2009/04/28 15:37:38 skrll Exp $");
 
 #include 
 #include 
@@ -95,7 +95,7 @@
 	printf(": %s", hppa_cpu_info->hci_chip_name);
 	if (hppa_cpu_info->hci_chip_nickname != NULL)
 		printf(" (%s)", hppa_cpu_info->hci_chip_nickname);
-	printf(" rev %d", (*hppa_cpu_info->desidhash)());
+	printf(" rev %d", cpu_revision);
 
 	/* Print the CPU type, spec, level, category, and speed. */
 	printf("\n%s: %s, PA-RISC %s", self->dv_xname,

Index: src/sys/arch/hp700/hp700/machdep.c
diff -u src/sys/arch/hp700/hp700/machdep.c:1.48.4.18 src/sys/arch/hp700/hp700/machdep.c:1.48.4.19
--- src/sys/arch/hp700/hp700/machdep.c:1.48.4.18	Tue Apr 28 13:35:44 2009
+++ src/sys/arch/hp700/hp700/machdep.c	Tue Apr 28 15:37:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.48.4.18 2009/04/28 13:35:44 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.48.4.19 2009/04/28 15:37:38 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48.4.18 2009/04/28 13:35:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48.4.19 2009/04/28 15:37:38 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -202,6 +202,7 @@
 const struct hppa_cpu_info *hppa_cpu_info;
 enum hppa_cpu_type cpu_type;
 int	cpu_hvers;
+int	cpu_revision;
 
 /*
  * exported methods for cpus
@@ -780,17 +781,14 @@
 	cpu_hpt_init = hppa_cpu_info->hptinit;
 	cpu_desidhash = hppa_cpu_info->desidhash;
 
+	cpu_revision = (*cpu_desidhash)();
+
 	/* force strong ordering for now */
 	if (hppa_cpu_info->hci_features & HPPA_FTRS_W32B) {
 		kpsw |= PSW_O;
 	}
 
 	snprintf(cpu_model, sizeof(cpu_model), "HP9000/%s", model);
-#ifdef DEBUG
-	printf("%s: %s, %s level %d\n", __func__, cpu_model, hppa_cpu_info->hci_chip_name, (*cpu_desidhash)() + 0xa);
-#endif
-
-	printf("HP9000/... level %0x\n", (*cpu_desidhash)() + 0xa);
 
 #define	LDILDO(t,f) ((t)[0] = (f)[0], (t)[1] = (f)[1]);
 	LDILDO(trap_ep_T_TLB_DIRTY , hppa_cpu_info->tlbdh);

Index: src/sys/arch/hp700/include/cpu.h
diff -u src/sys/arch/hp700/include/cpu.h:1.28.2.4 src/sys/arch/hp700/include/cpu.h:1.28.2.5
--- src/sys/arch/hp700/include/cpu.h:1.28.2.4	Sat Feb 14 13:57:13 2009
+++ src/sys/arch/hp700/include/cpu.h	Tue Apr 28 15:37:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.28.2.4 2009/02/14 13:57:13 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.28.2.5 2009/04/28 15:37:38 skrll Exp $	*/
 
 /*	$OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $	*/
 
@@ -109,6 +109,7 @@
 #ifdef _KERNEL
 extern const struct hppa_cpu_info *hppa_cpu_info;
 extern int cpu_hvers;
+extern int cpu_revision;
 extern register_t kpsw;
 #endif
 #endif



CVS commit: src/gnu/usr.bin/groff/tmac

2009-04-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Tue Apr 28 15:41:52 UTC 2009

Modified Files:
src/gnu/usr.bin/groff/tmac: mdoc.local

Log Message:
Add a definition for libnetpgp


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/gnu/usr.bin/groff/tmac/mdoc.local

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

Modified files:

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.49 src/gnu/usr.bin/groff/tmac/mdoc.local:1.50
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.49	Tue Apr 28 03:07:53 2009
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Tue Apr 28 15:41:52 2009
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.49 2009/04/28 03:07:53 reed Exp $
+.\" $NetBSD: mdoc.local,v 1.50 2009/04/28 15:41:52 agc Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -73,6 +73,7 @@
 .\" Bluetooth libraries
 .ds doc-str-Lb-libarchive   Reading and Writing Streaming Archives Library (libarchive, \-larchive)
 .ds doc-str-Lb-libbluetooth Bluetooth Host Lookup Library (libbluetooth, \-lbluetooth)
+.ds doc-str-Lb-libnetpgpNetpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp)
 .ds doc-str-Lb-libopenpgpsdkOpenpgp signing, verification, encryption and decryption (libopenpgpsdk, \-lopenpgpsdk)
 .ds doc-str-Lb-libprop  Property Container Object Library (libprop, \-lprop)
 .ds doc-str-Lb-libpuffs puffs Convenience Library (libpuffs, \-lpuffs)



CVS commit: src/sys/kern

2009-04-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Apr 28 17:57:00 UTC 2009

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

Log Message:
copyin the modctl_load_t for the non-x86 world. Fixes PR/41294.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/sys_module.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/sys_module.c
diff -u src/sys/kern/sys_module.c:1.8 src/sys/kern/sys_module.c:1.9
--- src/sys/kern/sys_module.c:1.8	Wed Oct 22 11:16:29 2008
+++ src/sys/kern/sys_module.c	Tue Apr 28 17:57:00 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_module.c,v 1.8 2008/10/22 11:16:29 ad Exp $	*/
+/*	$NetBSD: sys_module.c,v 1.9 2009/04/28 17:57:00 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sys_module.c,v 1.8 2008/10/22 11:16:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_module.c,v 1.9 2009/04/28 17:57:00 skrll Exp $");
 
 #include 
 #include 
@@ -44,10 +44,8 @@
 #include 
 
 static int
-handle_modctl_load(void *arg)
+handle_modctl_load(modctl_load_t *ml)
 {
-	modctl_load_t *ml = (modctl_load_t *)arg;
-
 	char *path;
 	char *props;
 	int error;
@@ -111,6 +109,7 @@
 	vaddr_t addr;
 	size_t size;
 	struct iovec iov;
+	modctl_load_t ml;
 	int error;
 	void *arg;
 
@@ -118,7 +117,10 @@
 
 	switch (SCARG(uap, cmd)) {
 	case MODCTL_LOAD:
-		error = handle_modctl_load(arg);
+		error = copyin(arg, &ml, sizeof(ml));
+		if (error != 0)
+			break;
+		error = handle_modctl_load(&ml);
 		break;
 
 	case MODCTL_UNLOAD:



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

2009-04-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Tue Apr 28 20:49:57 UTC 2009

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

Log Message:
Don't try to be clever here - sizeof(uint32_t) will always be 4...


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.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/packet-parse.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.3 src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.4
--- src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.3	Tue Apr 28 00:41:40 2009
+++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c	Tue Apr 28 20:49:57 2009
@@ -544,7 +544,7 @@
  * Cannot assume that time_t is 4 octets long -
 	 * SunOS 5.10 and NetBSD both have 64-bit time_ts.
  */
-	if (/* CONSTCOND */sizeof(time_t) == sizeof(uint32_t)) {
+	if (/* CONSTCOND */sizeof(time_t) == 4) {
 		return limited_read_scalar((unsigned *)(void *)dest, 4, region, pinfo);
 	}
 	for (i = 0; i < 4; i++) {



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

2009-04-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Tue Apr 28 20:50:48 UTC 2009

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

Log Message:
Sync the portable autoconf Makefile with reality


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/netpgp/dist/src/lib/Makefile.in

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/Makefile.in
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/Makefile.in:1.1.1.1 src/crypto/external/bsd/netpgp/dist/src/lib/Makefile.in:1.2
--- src/crypto/external/bsd/netpgp/dist/src/lib/Makefile.in:1.1.1.1	Thu Apr 23 06:32:03 2009
+++ src/crypto/external/bsd/netpgp/dist/src/lib/Makefile.in	Tue Apr 28 20:50:48 2009
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1.1.1 2009/04/23 06:32:03 agc Exp $
+# $Id: Makefile.in,v 1.2 2009/04/28 20:50:48 agc Exp $
 
 @SET_MAKE@
 SHELL = @SHELL@
@@ -40,7 +40,7 @@
 LIBS= @LIBS@
 CPPFLAGS= @CPPFLAGS@
 DEFS= @DEFS@ -I. -...@srcdir@ -DHOST=\"$(CANONICAL_HOST)\" -DNETPGP_AUTOCONF_VERSION=\"$(PACKAGE_VERSION)\"
-DEFS+= -DNETPGP_MAINTAINER=\"$(PACKAGE_BUGREPORT)\" -...@srcdir@/../../include
+DEFS+= -...@srcdir@/../../include
 CFLAGS= @CFLAGS@
 LDFLAGS= @LDFLAGS@
 
@@ -61,11 +61,10 @@
 config.guess config.h.in config.sub configure configure.ac install-sh \
 missing mkinstalldirs regress.sh
 
-LIB=	libnetpgpsdk.a
+LIB=	libnetpgp.a
 
 .c.o:
-	t=`date +%Y%m%d`; \
-	${LIBTOOL} --mode=compile ${COMPILE} -c -DNETPGP_BUILD_TIME=\"$$t\" $< -o $@
+	${LIBTOOL} --mode=compile ${COMPILE} -c $< -o $@
 
 all: ${LIB}
 
@@ -86,14 +85,14 @@
 	rm -f configure config.h.in
 
 install: ${LIB}
-	$(srcdir)/mkinstalldirs ${DESTDIR}$(libdir) ${DESTDIR}$(prefix)/include/netpgpsdk ${DESTDIR}$(mandir)/man3
+	$(srcdir)/mkinstalldirs ${DESTDIR}$(libdir) ${DESTDIR}$(prefix)/include ${DESTDIR}$(mandir)/man3
 	${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${LIB:.a=.la} ${DESTDIR}${libdir}
 	@f=`echo libnetpgp.3|sed '$(transform)'`; \
 	echo "$(INSTALL_DATA) libnetpgp.3 $(DESTDIR)$(mandir)/man3/$$f"; \
-	$(INSTALL_DATA) libnetpgp.3 $(DESTDIR)$(mandir)/man3/$$f
-	(cd ../../include/netpgpsdk && \
+		$(INSTALL_DATA) libnetpgp.3 $(DESTDIR)$(mandir)/man3/$$f
+	(cd ../../include && \
 		for f in *.h; do \
-			${INSTALL_DATA} $$f ${DESTDIR}${prefix}/include/netpgpsdk; \
+			${INSTALL_DATA} $$f ${DESTDIR}${prefix}/include; \
 		done)
 
 uninstall:



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

2009-04-28 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Tue Apr 28 20:51:16 UTC 2009

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/bin: Makefile.in

Log Message:
Sync the portable autoconfed Makefile with reality


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/netpgp/dist/src/bin/Makefile.in

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/bin/Makefile.in
diff -u src/crypto/external/bsd/netpgp/dist/src/bin/Makefile.in:1.1.1.1 src/crypto/external/bsd/netpgp/dist/src/bin/Makefile.in:1.2
--- src/crypto/external/bsd/netpgp/dist/src/bin/Makefile.in:1.1.1.1	Thu Apr 23 06:32:02 2009
+++ src/crypto/external/bsd/netpgp/dist/src/bin/Makefile.in	Tue Apr 28 20:51:16 2009
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1.1.1 2009/04/23 06:32:02 agc Exp $
+# $Id: Makefile.in,v 1.2 2009/04/28 20:51:16 agc Exp $
 
 @SET_MAKE@
 SHELL = @SHELL@
@@ -48,7 +48,7 @@
 
 SRCS+= netpgp.c
 
-LIBS= -L${prefix}/lib -L../lib -lnetpgpsdk
+LIBS= -L${prefix}/lib -L../lib -lnetpgp
 
 DISTFILES= $(SRCS) AUTHORS COPYING DESCR INSTALL Makefile.in NEWS aclocal.m4 \
 config.guess config.h.in config.sub configure configure.ac install-sh \
@@ -76,10 +76,10 @@
 	rm -f configure config.h.in
 
 install: netpgp
-	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	$(mkinstalldirs) $(DESTDIR)$(bindir) ${DESTDIR}${mandir}/man1
 	@f=`echo netpgp|sed '$(transform)'`; \
 		echo "$(INSTALL_PROGRAM) netpgp $(DESTDIR)$(bindir)/$$f"; \
-		$(INSTALL_PROGRAM) netpgp $(DESTDIR)$(bindir)/$$f
+		${LIBTOOL} --mode=install $(INSTALL_PROGRAM) netpgp $(DESTDIR)$(bindir)/$$f
 	$(mkinstalldirs) $(DESTDIR)$(mandir)/man1
 	@f=`echo netpgp.1|sed '$(transform)'`; \
 		echo "$(INSTALL_DATA) netpgp.1 $(DESTDIR)$(mandir)/man1/$$f"; \



CVS commit: src/sys

2009-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Apr 28 20:54:50 UTC 2009

Modified Files:
src/sys/kern: uipc_domain.c
src/sys/sys: socket.h

Log Message:
Extract sockaddr_any_by_family() from sockaddr_any() for looking up a
wildcard ("any") address by protocol family instead of by sockaddr.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/kern/uipc_domain.c
cvs rdiff -u -r1.94 -r1.95 src/sys/sys/socket.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/kern/uipc_domain.c
diff -u src/sys/kern/uipc_domain.c:1.79 src/sys/kern/uipc_domain.c:1.80
--- src/sys/kern/uipc_domain.c:1.79	Sun Mar 15 17:14:40 2009
+++ src/sys/kern/uipc_domain.c	Tue Apr 28 20:54:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_domain.c,v 1.79 2009/03/15 17:14:40 cegger Exp $	*/
+/*	$NetBSD: uipc_domain.c,v 1.80 2009/04/28 20:54:50 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.79 2009/03/15 17:14:40 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.80 2009/04/28 20:54:50 dyoung Exp $");
 
 #include 
 #include 
@@ -216,16 +216,22 @@
 }
 
 const struct sockaddr *
-sockaddr_any(const struct sockaddr *sa)
+sockaddr_any_by_family(int family)
 {
 	const struct domain *dom;
 	
-	if ((dom = pffinddomain(sa->sa_family)) == NULL)
+	if ((dom = pffinddomain(family)) == NULL)
 		return NULL;
 
 	return dom->dom_sa_any;
 }
 
+const struct sockaddr *
+sockaddr_any(const struct sockaddr *sa)
+{
+	return sockaddr_any_by_family(sa->sa_family);
+}
+
 const void *
 sockaddr_anyaddr(const struct sockaddr *sa, socklen_t *slenp)
 {

Index: src/sys/sys/socket.h
diff -u src/sys/sys/socket.h:1.94 src/sys/sys/socket.h:1.95
--- src/sys/sys/socket.h:1.94	Mon Jan 19 02:27:57 2009
+++ src/sys/sys/socket.h	Tue Apr 28 20:54:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.h,v 1.94 2009/01/19 02:27:57 christos Exp $	*/
+/*	$NetBSD: socket.h,v 1.95 2009/04/28 20:54:50 dyoung Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -577,6 +577,7 @@
 const void *sockaddr_const_addr(const struct sockaddr *, socklen_t *);
 void *sockaddr_addr(struct sockaddr *, socklen_t *);
 const struct sockaddr *sockaddr_any(const struct sockaddr *);
+const struct sockaddr *sockaddr_any_by_family(int);
 const void *sockaddr_anyaddr(const struct sockaddr *, socklen_t *);
 int sockaddr_cmp(const struct sockaddr *, const struct sockaddr *);
 struct sockaddr *sockaddr_dup(const struct sockaddr *, int);



CVS commit: src/sys/kern

2009-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Apr 28 20:56:40 UTC 2009

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

Log Message:
Cosmetic: remove unnecessary parentheses.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/kern/uipc_domain.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/uipc_domain.c
diff -u src/sys/kern/uipc_domain.c:1.80 src/sys/kern/uipc_domain.c:1.81
--- src/sys/kern/uipc_domain.c:1.80	Tue Apr 28 20:54:50 2009
+++ src/sys/kern/uipc_domain.c	Tue Apr 28 20:56:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_domain.c,v 1.80 2009/04/28 20:54:50 dyoung Exp $	*/
+/*	$NetBSD: uipc_domain.c,v 1.81 2009/04/28 20:56:40 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.80 2009/04/28 20:54:50 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.81 2009/04/28 20:56:40 dyoung Exp $");
 
 #include 
 #include 
@@ -145,8 +145,8 @@
 
 	DOMAIN_FOREACH(dp)
 		if (dp->dom_family == family)
-			return (dp);
-	return (NULL);
+			return dp;
+	return NULL;
 }
 
 const struct protosw *
@@ -157,13 +157,13 @@
 
 	dp = pffinddomain(family);
 	if (dp == NULL)
-		return (NULL);
+		return NULL;
 
 	for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
 		if (pr->pr_type && pr->pr_type == type)
-			return (pr);
+			return pr;
 
-	return (NULL);
+	return NULL;
 }
 
 const struct protosw *
@@ -174,21 +174,21 @@
 	const struct protosw *maybe = NULL;
 
 	if (family == 0)
-		return (NULL);
+		return NULL;
 
 	dp = pffinddomain(family);
 	if (dp == NULL)
-		return (NULL);
+		return NULL;
 
 	for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) {
 		if ((pr->pr_protocol == protocol) && (pr->pr_type == type))
-			return (pr);
+			return pr;
 
 		if (type == SOCK_RAW && pr->pr_type == SOCK_RAW &&
 		pr->pr_protocol == 0 && maybe == NULL)
 			maybe = pr;
 	}
-	return (maybe);
+	return maybe;
 }
 
 void *
@@ -392,10 +392,10 @@
 	int error, elem_count, pf, type, pf2;
 
 	if (namelen == 1 && name[0] == CTL_QUERY)
-		return (sysctl_query(SYSCTLFN_CALL(rnode)));
+		return sysctl_query(SYSCTLFN_CALL(rnode));
 
 	if (namelen != 4)
-		return (EINVAL);
+		return EINVAL;
 
 	if (oldp != NULL) {
 		len = *oldlenp;
@@ -416,7 +416,7 @@
 	needed = 0;
 
 	if (name - oname != 4)
-		return (EINVAL);
+		return EINVAL;
 
 	pf = oname[1];
 	type = oname[2];
@@ -477,7 +477,7 @@
 		*oldlenp += PCB_SLOP * sizeof(struct kinfo_pcb);
  	sysctl_relock();
 
-	return (error);
+	return error;
 }
 
 static void



CVS commit: src/sys/net

2009-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Apr 28 21:26:52 UTC 2009

Modified Files:
src/sys/net: if_ethersubr.c

Log Message:
Let this build with 'no options INET'.

(I don't know why I bothered, either.)


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/sys/net/if_ethersubr.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/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.170 src/sys/net/if_ethersubr.c:1.171
--- src/sys/net/if_ethersubr.c:1.170	Fri Nov  7 00:20:13 2008
+++ src/sys/net/if_ethersubr.c	Tue Apr 28 21:26:51 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.170 2008/11/07 00:20:13 dyoung Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.171 2009/04/28 21:26:51 dyoung Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.170 2008/11/07 00:20:13 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.171 2009/04/28 21:26:51 dyoung Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -1448,7 +1448,6 @@
 {
 	struct ethercom *ec = (void *) ifp;
 	struct ifreq *ifr = (struct ifreq *)data;
-	struct ifaddr *ifa = (struct ifaddr *)data;
 	struct if_laddrreq *iflr = data;
 	const struct sockaddr_dl *sdl;
 	static const uint8_t zero[ETHER_ADDR_LEN];
@@ -1463,8 +1462,12 @@
 return error;
 		}
 #ifdef INET
-		if (ifa->ifa_addr->sa_family == AF_INET)
-			arp_ifinit(ifp, ifa);
+		{
+			struct ifaddr *ifa = (struct ifaddr *)data;
+
+			if (ifa->ifa_addr->sa_family == AF_INET)
+arp_ifinit(ifp, ifa);
+		}
 #endif /* INET */
 		return 0;
 



CVS commit: othersrc/zfs/external/cddl/osnet/dist/uts/common/os

2009-04-28 Thread Andrew Doran
Module Name:othersrc
Committed By:   ad
Date:   Tue Apr 28 22:03:07 UTC 2009

Removed Files:
othersrc/zfs/external/cddl/osnet/dist/uts/common/os: callb.c taskq.c

Log Message:
Two unneeded files accidentally imported.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
othersrc/zfs/external/cddl/osnet/dist/uts/common/os/callb.c \
othersrc/zfs/external/cddl/osnet/dist/uts/common/os/taskq.c

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



CVS commit: othersrc/zfs/sys/modules/solaris

2009-04-28 Thread Andrew Doran
Module Name:othersrc
Committed By:   ad
Date:   Tue Apr 28 22:04:09 UTC 2009

Modified Files:
othersrc/zfs/sys/modules/solaris: Makefile

Log Message:
Resolving import mistakes: fix a typo.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/zfs/sys/modules/solaris/Makefile

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

Modified files:

Index: othersrc/zfs/sys/modules/solaris/Makefile
diff -u othersrc/zfs/sys/modules/solaris/Makefile:1.1.1.1 othersrc/zfs/sys/modules/solaris/Makefile:1.2
--- othersrc/zfs/sys/modules/solaris/Makefile:1.1.1.1	Thu Mar 26 22:14:24 2009
+++ othersrc/zfs/sys/modules/solaris/Makefile	Tue Apr 28 22:04:09 2009
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.1.1.1 2009/03/26 22:14:24 ad Exp $
+#	$NetBSD: Makefile,v 1.2 2009/04/28 22:04:09 ad Exp $
 
 .include "../Makefile.inc"
 
 KMOD=	solaris
 
-ZFSDIR=	${S}/../external/cddl/os
+ZFSDIR=	${S}/../external/cddl/osnet
 
 .PATH:	${ZFSDIR}/dist/common/avl
 



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

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 22:14:23 UTC 2009

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

Log Message:
Import dhcpcd-5.0.0

Major changes from dhcpcd-4 include
 * Single daemon can now run DHCP on multiple interfaces at the same time
 * Configuration profiles per interface, ssid, arping and fallback
 * Listens to 3rd party programs changing routing information
 * Supports DHCP INFORM over PPP
 * Can configure static options for destination address
 * Control socket so 3rd party program can control or listen directly
   to dhcpcd events
 * Is also a BOOTP client

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-0-0

U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/bpf.c
N src/external/bsd/dhcpcd/dist/ipv4ll.c
N src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/dhcp.c
N src/external/bsd/dhcpcd/dist/ipv4ll.h
N src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/configure.c
N src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/dhcp.h
N src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
N src/external/bsd/dhcpcd/dist/control.h
N src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/configure.h
N src/external/bsd/dhcpcd/dist/arp.h
N src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
N src/external/bsd/dhcpcd/dist/duid.h
N src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/signals.c
N src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/signals.h
N src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/README
U src/external/bsd/dhcpcd/dist/dhcpcd.8.in
N src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/net.c
N src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname

No conflicts created by this import



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 22:31:52 UTC 2009

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Update to dhcpcd-5.0.0


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile

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

Modified files:

Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.3 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.4
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.3	Sat Oct 25 22:27:34 2008
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Tue Apr 28 22:31:52 2009
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.3 2008/10/25 22:27:34 apb Exp $
+# $NetBSD: Makefile,v 1.4 2009/04/28 22:31:52 roy Exp $
 #
 
 PROG=		dhcpcd
-SRCS=		bpf.c client.c common.c configure.c dhcp.c dhcpcd.c \
-		if-bsd.c logger.c net.c signals.c
+SRCS=		arp.c bind.c common.c control.c configure.c dhcp.c dhcpcd.c \
+		duid.c eloop.c if-options.c ipv4ll.c if-pref.c ipv4ll.c \
+		net.c signals.c
+SRCS+=		bpf.c if-bsd.c
 
 .include 
 



CVS commit: src/doc

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 22:34:05 UTC 2009

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Update to dhcpcd-5.0.0


To generate a diff of this commit:
cvs rdiff -u -r1.689 -r1.690 src/doc/3RDPARTY
cvs rdiff -u -r1.1216 -r1.1217 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.689 src/doc/3RDPARTY:1.690
--- src/doc/3RDPARTY:1.689	Wed Apr 22 13:31:44 2009
+++ src/doc/3RDPARTY	Tue Apr 28 22:34:04 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.689 2009/04/22 13:31:44 wiz Exp $
+#	$NetBSD: 3RDPARTY,v 1.690 2009/04/28 22:34:04 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -258,8 +258,8 @@
 top of the current tree.
 
 Package:	dhcpcd
-Version:	4.0.13
-Current Vers:	4.0.13
+Version:	5.0.0
+Current Vers:	5.0.0
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1216 src/doc/CHANGES:1.1217
--- src/doc/CHANGES:1.1216	Thu Apr 23 20:48:09 2009
+++ src/doc/CHANGES	Tue Apr 28 22:34:04 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1216 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1217 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -185,3 +185,4 @@
 		[cegger 20090420]
 	sdmmc(4): Add a driver for SD/MMC from OpenBSD. [nonaka 20090421]
 	zx(4): Add wscons support [macallan 20090423]
+	dhcpcd(8): Import dhcpcd-5.0.0. [roy 20090428]



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

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 22:43:11 UTC 2009

Removed Files:
src/external/bsd/dhcpcd/dist: client.c client.h logger.c logger.h

Log Message:
Punt old files


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r0 src/external/bsd/dhcpcd/dist/client.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/dhcpcd/dist/client.h
cvs rdiff -u -r1.1.1.2 -r0 src/external/bsd/dhcpcd/dist/logger.c \
src/external/bsd/dhcpcd/dist/logger.h

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



CVS commit: src/sys/dev/pci

2009-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Apr 28 22:43:51 UTC 2009

Modified Files:
src/sys/dev/pci: hifn7751.c

Log Message:
Use device_t, cfdata_t, and device_private().


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/hifn7751.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/pci/hifn7751.c
diff -u src/sys/dev/pci/hifn7751.c:1.41 src/sys/dev/pci/hifn7751.c:1.42
--- src/sys/dev/pci/hifn7751.c:1.41	Sat Apr 18 14:58:03 2009
+++ src/sys/dev/pci/hifn7751.c	Tue Apr 28 22:43:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751.c,v 1.41 2009/04/18 14:58:03 tsutsui Exp $	*/
+/*	$NetBSD: hifn7751.c,v 1.42 2009/04/28 22:43:50 dyoung Exp $	*/
 /*	$FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*	$OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $	*/
 
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.41 2009/04/18 14:58:03 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.42 2009/04/28 22:43:50 dyoung Exp $");
 
 #include "rnd.h"
 
@@ -105,9 +105,9 @@
 #ifdef __OpenBSD__
 static int hifn_probe((struct device *, void *, void *);
 #else
-static int hifn_probe(struct device *, struct cfdata *, void *);
+static int hifn_probe(device_t, cfdata_t, void *);
 #endif
-static void hifn_attach(struct device *, struct device *, void *);
+static void hifn_attach(device_t, device_t, void *);
 
 CFATTACH_DECL(hifn, sizeof(struct hifn_softc),
 hifn_probe, hifn_attach, NULL, NULL);
@@ -227,21 +227,20 @@
 }
 
 static int
-hifn_probe(struct device *parent, struct cfdata *match,
-void *aux)
+hifn_probe(device_t parent, cfdata_t match, void *aux)
 {
-	struct pci_attach_args *pa = (struct pci_attach_args *) aux;
+	struct pci_attach_args *pa = aux;
 
 	if (hifn_lookup(pa) != NULL)
-		return (1);
+		return 1;
 
-	return (0);
+	return 0;
 }
 
 static void
-hifn_attach(struct device *parent, struct device *self, void *aux)
+hifn_attach(device_t parent, device_t self, void *aux)
 {
-	struct hifn_softc *sc = (struct hifn_softc *)self;
+	struct hifn_softc *sc = device_private(self);
 	struct pci_attach_args *pa = aux;
 	const struct hifn_product *hp;
 	pci_chipset_tag_t pc = pa->pa_pc;



CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 22:47:23 UTC 2009

Modified Files:
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile

Log Message:
Fix compile


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile

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

Modified files:

Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.4 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.5
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.4	Tue Apr 28 22:31:52 2009
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Tue Apr 28 22:47:23 2009
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2009/04/28 22:31:52 roy Exp $
+# $NetBSD: Makefile,v 1.5 2009/04/28 22:47:23 roy Exp $
 #
 
 PROG=		dhcpcd
 SRCS=		arp.c bind.c common.c control.c configure.c dhcp.c dhcpcd.c \
-		duid.c eloop.c if-options.c ipv4ll.c if-pref.c ipv4ll.c \
-		net.c signals.c
+		duid.c eloop.c if-options.c if-pref.c ipv4ll.c net.c \
+		signals.c
 SRCS+=		bpf.c if-bsd.c
 
 .include 



CVS commit: src/usr.sbin/makefs

2009-04-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Apr 28 22:49:26 UTC 2009

Modified Files:
src/usr.sbin/makefs: ffs.c

Log Message:
Create images with 0666 - umask, not 0777 - umask (e.g. without x bits).


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/makefs/ffs.c

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

Modified files:

Index: src/usr.sbin/makefs/ffs.c
diff -u src/usr.sbin/makefs/ffs.c:1.43 src/usr.sbin/makefs/ffs.c:1.44
--- src/usr.sbin/makefs/ffs.c:1.43	Thu Apr 16 18:54:16 2009
+++ src/usr.sbin/makefs/ffs.c	Tue Apr 28 22:49:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.c,v 1.43 2009/04/16 18:54:16 dyoung Exp $	*/
+/*	$NetBSD: ffs.c,v 1.44 2009/04/28 22:49:26 joerg Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.43 2009/04/16 18:54:16 dyoung Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.44 2009/04/28 22:49:26 joerg Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -477,7 +477,7 @@
 	assert (fsopts != NULL);
 
 		/* create image */
-	if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0777))
+	if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666))
 	== -1) {
 		warn("Can't open `%s' for writing", image);
 		return (-1);



CVS commit: src/sys/net

2009-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Apr 28 23:05:26 UTC 2009

Modified Files:
src/sys/net: if_gre.c

Log Message:
Let this build even if 'no options INET'.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/net/if_gre.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/net/if_gre.c
diff -u src/sys/net/if_gre.c:1.139 src/sys/net/if_gre.c:1.140
--- src/sys/net/if_gre.c:1.139	Fri Nov  7 00:20:13 2008
+++ src/sys/net/if_gre.c	Tue Apr 28 23:05:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gre.c,v 1.139 2008/11/07 00:20:13 dyoung Exp $ */
+/*	$NetBSD: if_gre.c,v 1.140 2009/04/28 23:05:25 dyoung Exp $ */
 
 /*
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -45,13 +45,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.139 2008/11/07 00:20:13 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.140 2009/04/28 23:05:25 dyoung Exp $");
 
+#include "opt_atalk.h"
 #include "opt_gre.h"
 #include "opt_inet.h"
 #include "bpfilter.h"
 
-#ifdef INET
 #include 
 #include 
 #include 
@@ -66,11 +66,9 @@
 #include 
 #include 
 #include 
-#if __NetBSD__
 #include 
 #include 
 #include 
-#endif
 
 #include 
 #include 
@@ -85,16 +83,18 @@
 #include 
 #include 
 
-#ifdef INET
-#include 
 #include 
+#include 
+#include  /* we always need this for sizeof(struct ip) */
+
+#ifdef INET
 #include 
-#include 
 #include 
-#else
-#error "Huh? if_gre without inet?"
 #endif
 
+#ifdef INET6
+#include 
+#endif
 
 #ifdef NETATALK
 #include 
@@ -317,6 +317,11 @@
 	int rc;
 	struct gre_softc *sc;
 	struct gre_soparm *sp;
+	const struct sockaddr *any;
+
+	if ((any = sockaddr_any_by_family(AF_INET)) == NULL &&
+	(any = sockaddr_any_by_family(AF_INET6)) == NULL)
+		return -1;
 
 	sc = malloc(sizeof(struct gre_softc), M_DEVBUF, M_WAITOK|M_ZERO);
 	mutex_init(&sc->sc_mtx, MUTEX_DRIVER, IPL_SOFTNET);
@@ -334,10 +339,8 @@
 	sc->sc_if.if_output = gre_output;
 	sc->sc_if.if_ioctl = gre_ioctl;
 	sp = &sc->sc_soparm;
-	sockaddr_copy(sstosa(&sp->sp_dst), sizeof(sp->sp_dst),
-	sintocsa(&in_any));
-	sockaddr_copy(sstosa(&sp->sp_src), sizeof(sp->sp_src),
-	sintocsa(&in_any));
+	sockaddr_copy(sstosa(&sp->sp_dst), sizeof(sp->sp_dst), any);
+	sockaddr_copy(sstosa(&sp->sp_src), sizeof(sp->sp_src), any);
 	sp->sp_proto = IPPROTO_GRE;
 	sp->sp_type = SOCK_RAW;
 
@@ -531,6 +534,7 @@
  		GRE_DPRINTF(sc, "so_setsockopt ttl failed\n");
   		rc = 0;
   	}
+
  	val = 1;
  	rc = so_setsockopt(curlwp, so, SOL_SOCKET, SO_NOHEADER,
 	&val, sizeof(val));
@@ -881,11 +885,13 @@
 		hlen += 4;
 
 	switch (ntohs(gh->ptype)) { /* ethertypes */
+#ifdef INET
 	case ETHERTYPE_IP:
 		ifq = &ipintrq;
 		isr = NETISR_IP;
 		af = AF_INET;
 		break;
+#endif
 #ifdef NETATALK
 	case ETHERTYPE_ATALK:
 		ifq = &atintrq1;
@@ -946,8 +952,6 @@
 	int error = 0;
 	struct gre_softc *sc = ifp->if_softc;
 	struct gre_h *gh;
-	struct ip *ip;
-	uint8_t ip_tos = 0;
 	uint16_t etype = 0;
 
 	if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) {
@@ -965,11 +969,14 @@
 
 	GRE_DPRINTF(sc, "dst->sa_family=%d\n", dst->sa_family);
 	switch (dst->sa_family) {
+#ifdef INET
 	case AF_INET:
-		ip = mtod(m, struct ip *);
-		ip_tos = ip->ip_tos;
+		/* TBD Extract the IP ToS field and set the
+		 * encapsulating protocol's ToS to suit.
+		 */
 		etype = htons(ETHERTYPE_IP);
 		break;
+#endif
 #ifdef NETATALK
 	case AF_APPLETALK:
 		etype = htons(ETHERTYPE_ATALK);
@@ -1537,15 +1544,11 @@
 	return error;
 }
 
-#endif
-
 void	greattach(int);
 
 /* ARGSUSED */
 void
 greattach(int count)
 {
-#ifdef INET
 	if_clone_attach(&gre_cloner);
-#endif
 }



CVS commit: src/etc

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 23:30:34 UTC 2009

Modified Files:
src/etc/defaults: rc.conf
src/etc/rc.d: Makefile
Added Files:
src/etc/rc.d: dhcpcd

Log Message:
Add an rc.d script for dhcpcd(8)


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/etc/defaults/rc.conf
cvs rdiff -u -r1.77 -r1.78 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/dhcpcd

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.102 src/etc/defaults/rc.conf:1.103
--- src/etc/defaults/rc.conf:1.102	Fri Apr 10 16:18:04 2009
+++ src/etc/defaults/rc.conf	Tue Apr 28 23:30:34 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.102 2009/04/10 16:18:04 joerg Exp $
+#	$NetBSD: rc.conf,v 1.103 2009/04/28 23:30:34 roy Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -159,6 +159,7 @@
 auto_ifconfig=YES# config all avail. interfaces
 net_interfaces=""# used only if above is NO
 flushroutes=YES	# flush routes in netstart
+dhcpcd=NO
 dhcpcd_flags="-q"# For ifconfig_XXX=dhcp.
 dhclient=NO	# behave as a DHCP client
 			dhclient_flags=""	# blank: config all interfaces

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.77 src/etc/rc.d/Makefile:1.78
--- src/etc/rc.d/Makefile:1.77	Tue Apr 21 16:08:57 2009
+++ src/etc/rc.d/Makefile	Tue Apr 28 23:30:34 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2009/04/21 16:08:57 joerg Exp $
+# $NetBSD: Makefile,v 1.78 2009/04/28 23:30:34 roy Exp $
 
 .include 
 
@@ -18,7 +18,7 @@
 		accounting altqd amd apmd \
 		bootconf.sh bootparams btattach btconfig btdevctl bthcid \
 		ccd cgd cleartmp cron \
-		dhclient dhcpd dhcrelay dmesg downinterfaces envsys \
+		dhclient dhcpcd dhcpd dhcrelay dmesg downinterfaces envsys \
 		fsck fsck_root ftp_proxy ftpd \
 		hostapd httpd \
 		identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \

Added files:

Index: src/etc/rc.d/dhcpcd
diff -u /dev/null src/etc/rc.d/dhcpcd:1.1
--- /dev/null	Tue Apr 28 23:30:34 2009
+++ src/etc/rc.d/dhcpcd	Tue Apr 28 23:30:34 2009
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# PROVIDE: dhcpcd
+# REQUIRE: network mountcritlocal
+# BEFORE:  NETWORKING
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name=dhcpcd
+rcvar=$name
+command=/sbin/$name
+pidfile=/var/run/$name.pid
+
+load_rc_config $name
+run_rc_command "$1"



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

2009-04-28 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Apr 28 23:31:52 UTC 2009

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

Log Message:
Add an rc.d script for dhcpcd(8)


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/distrib/sets/lists/etc/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/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.208 src/distrib/sets/lists/etc/mi:1.209
--- src/distrib/sets/lists/etc/mi:1.208	Tue Apr 21 16:08:57 2009
+++ src/distrib/sets/lists/etc/mi	Tue Apr 28 23:31:52 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.208 2009/04/21 16:08:57 joerg Exp $
+# $NetBSD: mi,v 1.209 2009/04/28 23:31:52 roy Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -181,6 +181,7 @@
 ./etc/rc.d/cleartmpetc-sys-rc
 ./etc/rc.d/cron	etc-cron-rc
 ./etc/rc.d/dhclientetc-dhclient-rc
+./etc/rc.d/dhcpcdetc-dhcpcd-rc
 ./etc/rc.d/dhcpdetc-dhcpd-rc
 ./etc/rc.d/dhcrelayetc-dhcpd-rc
 ./etc/rc.d/dmesgetc-sys-rc



CVS commit: src/sys/kern

2009-04-28 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Wed Apr 29 01:03:43 UTC 2009

Modified Files:
src/sys/kern: vfs_subr.c vfs_syscalls.c

Log Message:
Extract common code from vfs_rootmountalloc(9) and mount_domount() into
a new struct mount-allocation routine, vfs_mountalloc(9).  Documentation
updates will follow.

Attention: Synchronization Oversight Committee!  In mount_domount(),
I postpone the call mutex_enter(&mp->mnt_updating) until right before
the VFS_MOUNT(9) call because (1) that looks to me like the earliest
possible opportunity for mp to become visible to any other LWP, because
it was just kmem_zalloc(9)'d and (2) it made extracting the common code
much easier.  Tell me if my reasoning is faulty.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.392 -r1.393 src/sys/kern/vfs_syscalls.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/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.375 src/sys/kern/vfs_subr.c:1.376
--- src/sys/kern/vfs_subr.c:1.375	Sat Apr 25 18:53:44 2009
+++ src/sys/kern/vfs_subr.c	Wed Apr 29 01:03:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.375 2009/04/25 18:53:44 elad Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.376 2009/04/29 01:03:43 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.375 2009/04/25 18:53:44 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.376 2009/04/29 01:03:43 dyoung Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -455,6 +455,30 @@
 	}
 }
 
+struct mount *
+vfs_mountalloc(struct vfsops *vfsops, struct vnode *vp)
+{
+	int error;
+	struct mount *mp;
+
+	mp = kmem_zalloc(sizeof(*mp), KM_SLEEP);
+	if (mp == NULL)
+		return NULL;
+
+	mp->mnt_op = vfsops;
+	mp->mnt_refcnt = 1;
+	TAILQ_INIT(&mp->mnt_vnodelist);
+	rw_init(&mp->mnt_unmounting);
+	mutex_init(&mp->mnt_renamelock, MUTEX_DEFAULT, IPL_NONE);
+	mutex_init(&mp->mnt_updating, MUTEX_DEFAULT, IPL_NONE);
+	error = vfs_busy(mp, NULL);
+	KASSERT(error == 0);
+	mp->mnt_vnodecovered = vp;
+	mount_initspecific(mp);
+
+	return mp;
+}
+
 /*
  * Lookup a filesystem type, and if found allocate and initialize
  * a mount structure for it.
@@ -480,18 +504,9 @@
 	vfsp->vfs_refcount++;
 	mutex_exit(&vfs_list_lock);
 
-	mp = kmem_zalloc(sizeof(*mp), KM_SLEEP);
-	if (mp == NULL)
+	if ((mp = vfs_mountalloc(vfsp, NULL)) == NULL)
 		return ENOMEM;
-	mp->mnt_refcnt = 1;
-	rw_init(&mp->mnt_unmounting);
-	mutex_init(&mp->mnt_updating, MUTEX_DEFAULT, IPL_NONE);
-	mutex_init(&mp->mnt_renamelock, MUTEX_DEFAULT, IPL_NONE);
-	(void)vfs_busy(mp, NULL);
-	TAILQ_INIT(&mp->mnt_vnodelist);
-	mp->mnt_op = vfsp;
 	mp->mnt_flag = MNT_RDONLY;
-	mp->mnt_vnodecovered = NULL;
 	(void)strlcpy(mp->mnt_stat.f_fstypename, vfsp->vfs_name,
 	sizeof(mp->mnt_stat.f_fstypename));
 	mp->mnt_stat.f_mntonname[0] = '/';
@@ -500,7 +515,6 @@
 	'\0';
 	(void)copystr(devname, mp->mnt_stat.f_mntfromname,
 	sizeof(mp->mnt_stat.f_mntfromname) - 1, 0);
-	mount_initspecific(mp);
 	*mpp = mp;
 	return (0);
 }

Index: src/sys/kern/vfs_syscalls.c
diff -u src/sys/kern/vfs_syscalls.c:1.392 src/sys/kern/vfs_syscalls.c:1.393
--- src/sys/kern/vfs_syscalls.c:1.392	Tue Apr 28 03:01:15 2009
+++ src/sys/kern/vfs_syscalls.c	Wed Apr 29 01:03:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls.c,v 1.392 2009/04/28 03:01:15 yamt Exp $	*/
+/*	$NetBSD: vfs_syscalls.c,v 1.393 2009/04/29 01:03:43 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.392 2009/04/28 03:01:15 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.393 2009/04/29 01:03:43 dyoung Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -332,24 +332,10 @@
 	if (vp->v_mountedhere != NULL)
 		return EBUSY;
 
-	mp = kmem_zalloc(sizeof(*mp), KM_SLEEP);
-	if (mp == NULL)
+	if ((mp = vfs_mountalloc(vfsops, vp)) == NULL)
 		return ENOMEM;
 
-	mp->mnt_op = vfsops;
-	mp->mnt_refcnt = 1;
-
-	TAILQ_INIT(&mp->mnt_vnodelist);
-	rw_init(&mp->mnt_unmounting);
- 	mutex_init(&mp->mnt_renamelock, MUTEX_DEFAULT, IPL_NONE);
-	mutex_init(&mp->mnt_updating, MUTEX_DEFAULT, IPL_NONE);
-	error = vfs_busy(mp, NULL);
-	KASSERT(error == 0);
-	mutex_enter(&mp->mnt_updating);
-
-	mp->mnt_vnodecovered = vp;
 	mp->mnt_stat.f_owner = kauth_cred_geteuid(l->l_cred);
-	mount_initspecific(mp);
 
 	/*
 	 * The underlying file system may refuse the mount for
@@ -363,6 +349,7 @@
 	MNT_NOATIME | MNT_NODEVMTIME | MNT_SYMPERM | MNT_SOFTDEP |
 	MNT_LOG | MNT_IGNORE | MNT_RDONLY);
 
+	mutex_enter(&mp->mnt_updating);
 	error = VFS_MOUNT(mp, path, data, data_len);
 	mp->mnt_flag &= ~MNT_OP_FLAGS;