CVS commit: src/sys/arch/sparc64

2010-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Mar  4 08:01:35 UTC 2010

Modified Files:
src/sys/arch/sparc64/include: pmap.h
src/sys/arch/sparc64/sparc64: locore.s machdep.c pmap.c

Log Message:
- in _bus_dmamap_unload(), pmap_page_protect() and pmap_clear_reference()
  switch the dcache_flush_page() into a dcache_flush_page_all()
- in both pmap_kremove()/pmap_remove(), remove the blast_dcache() call
  and replace it with dcache_flush_page_all()
- in pmap_get_page() [used to allocate PTP's], always call pmap_zero_page(pa)
- flush the dcache of the dst page in pmap_{copy,zero}_page() by redirecting
  throught a C function that calls the (renamed) asm.  the old asm code had a
  comment about needing to do this...
- add a couple of membar #Sync's that the USIII manual recommends

based on discussions with chuq@, skrll@ and mar...@.

these help my SB2000 / SB2500 with both disk / nfs builds and other tasks,
sometimes lasting for several hours before failing or asserting.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/sparc64/include/pmap.h
cvs rdiff -u -r1.321 -r1.322 src/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -u -r1.251 -r1.252 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.254 -r1.255 src/sys/arch/sparc64/sparc64/pmap.c

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



CVS commit: src/sys/arch/sparc64

2010-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Mar  4 08:01:35 UTC 2010

Modified Files:
src/sys/arch/sparc64/include: pmap.h
src/sys/arch/sparc64/sparc64: locore.s machdep.c pmap.c

Log Message:
- in _bus_dmamap_unload(), pmap_page_protect() and pmap_clear_reference()
  switch the dcache_flush_page() into a dcache_flush_page_all()
- in both pmap_kremove()/pmap_remove(), remove the blast_dcache() call
  and replace it with dcache_flush_page_all()
- in pmap_get_page() [used to allocate PTP's], always call pmap_zero_page(pa)
- flush the dcache of the dst page in pmap_{copy,zero}_page() by redirecting
  throught a C function that calls the (renamed) asm.  the old asm code had a
  comment about needing to do this...
- add a couple of membar #Sync's that the USIII manual recommends

based on discussions with chuq@, skrll@ and mar...@.

these help my SB2000 / SB2500 with both disk / nfs builds and other tasks,
sometimes lasting for several hours before failing or asserting.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/sparc64/include/pmap.h
cvs rdiff -u -r1.321 -r1.322 src/sys/arch/sparc64/sparc64/locore.s
cvs rdiff -u -r1.251 -r1.252 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.254 -r1.255 src/sys/arch/sparc64/sparc64/pmap.c

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

Modified files:

Index: src/sys/arch/sparc64/include/pmap.h
diff -u src/sys/arch/sparc64/include/pmap.h:1.50 src/sys/arch/sparc64/include/pmap.h:1.51
--- src/sys/arch/sparc64/include/pmap.h:1.50	Wed Feb 24 04:48:28 2010
+++ src/sys/arch/sparc64/include/pmap.h	Thu Mar  4 08:01:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.50 2010/02/24 04:48:28 mrg Exp $	*/
+/*	$NetBSD: pmap.h,v 1.51 2010/03/04 08:01:35 mrg Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -204,6 +204,10 @@
 void		switchexit(struct lwp *, int);
 void		pmap_kprotect(vaddr_t, vm_prot_t);
 
+/* SPARC64 specific */
+void		pmap_copy_page_phys(paddr_t, paddr_t);
+void		pmap_zero_page_phys(paddr_t);
+
 /* Installed physical memory, as discovered during bootstrap. */
 extern int phys_installed_size;
 extern struct mem_region *phys_installed;

Index: src/sys/arch/sparc64/sparc64/locore.s
diff -u src/sys/arch/sparc64/sparc64/locore.s:1.321 src/sys/arch/sparc64/sparc64/locore.s:1.322
--- src/sys/arch/sparc64/sparc64/locore.s:1.321	Wed Feb 24 09:49:36 2010
+++ src/sys/arch/sparc64/sparc64/locore.s	Thu Mar  4 08:01:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.321 2010/02/24 09:49:36 mrg Exp $	*/
+/*	$NetBSD: locore.s,v 1.322 2010/03/04 08:01:35 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -203,10 +203,10 @@
  */
 #ifdef DCACHE_BUG
 #define DLFLUSH(a,t) \
-	andn	a, 0x1f, t; \
+	andn	a, 0x3f, t; \
 	stxa	%g0, [ t ] ASI_DCACHE_TAG; \
 	membar	#Sync
-/* The following can be used if the pointer is 16-byte aligned */
+/* The following can be used if the pointer is 32-byte aligned */
 #define DLFLUSH2(t) \
 	stxa	%g0, [ t ] ASI_DCACHE_TAG; \
 	membar	#Sync
@@ -775,7 +775,6 @@
 	TA32
 ufast_DMMU_miss:			! 068 = fast data access MMU miss
 	ldxa	[%g0] ASI_DMMU_8KPTR, %g2! Load DMMU 8K TSB pointer
-
 #ifdef NO_TSB
 	ba,a	%icc, data_miss
 #endif
@@ -4947,11 +4946,15 @@
 	membar	#Sync
 	or	%o0, DEMAP_PAGE_PRIMARY, %o0
 	stxa	%o0, [%o0] ASI_DMMU_DEMAP		! Do the demap
+	membar	#Sync
 	stxa	%o0, [%o0] ASI_IMMU_DEMAP		! to both TLBs
+	membar	#Sync
 #ifdef TLB_FLUSH_LOWVA
 	srl	%o0, 0, %o0! and make sure it's both 32- and 64-bit entries
 	stxa	%o0, [%o0] ASI_DMMU_DEMAP		! Do the demap
+	membar	#Sync
 	stxa	%o0, [%o0] ASI_IMMU_DEMAP		! Do the demap
+	membar	#Sync
 #endif
 	flush	%o1
 	stxa	%o5, [%o2] ASI_DMMU			! Restore primary context
@@ -5050,6 +5053,7 @@
 	wrpr	%o4, 0, %pstate
 
 	stxa	%o2, [%o2] ASI_IMMU_DEMAP
+	membar	#Sync
 	stxa	%o2, [%o2] ASI_DMMU_DEMAP
 
 	sethi	%hi(KERNBASE), %o4
@@ -6566,22 +6570,19 @@
 	 membar	#StoreStore|#StoreLoad
 
 /*
- * pmap_zero_page(pa)
+ * pmap_zero_page_phys(pa)
  *
  * Zero one page physically addressed
  *
  * Block load/store ASIs do not exist for physical addresses,
  * so we won't use them.
  *
- * While we do the zero operation, we also need to blast away
- * the contents of the D$.  We will execute a flush at the end
- * to sync the I$.
+ * We will execute a flush at the end to sync the I$.
+ *
+ * This version expects to have the dcache_flush_page_all(pa)
+ * to have been called before calling into here.
  */
-	.data
-paginuse:
-	.word	0
-	.text
-ENTRY(pmap_zero_page)
+ENTRY(pmap_zero_page_phys)
 #ifndef _LP64
 	COMBINE(%o0, %o1, %o0)
 #endif
@@ -6625,7 +6626,7 @@
 	 wr	%g0, ASI_PRIMARY_NOFAULT, %asi	! Make C code happy
 
 /*
- * pmap_copy_page(paddr_t src, paddr_t dst)
+ * pmap_copy_page_phys(paddr_t src, paddr_t dst)
  *
  * Copy one page physically addressed
  * We need to use a global reg for ldxa/stxa
@@ -6634,10 +6635,11 @@
  * 32-bit stack.  We will unroll the loop by 4 

CVS commit: src/share/man/man9

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 08:09:52 UTC 2010

Modified Files:
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: roundup.9

Log Message:
Document the counting and rounding macros from sys/param.h.


To generate a diff of this commit:
cvs rdiff -u -r1.318 -r1.319 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/roundup.9

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



CVS commit: src/share/man/man9

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 08:09:52 UTC 2010

Modified Files:
src/share/man/man9: Makefile
Added Files:
src/share/man/man9: roundup.9

Log Message:
Document the counting and rounding macros from sys/param.h.


To generate a diff of this commit:
cvs rdiff -u -r1.318 -r1.319 src/share/man/man9/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man9/roundup.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/Makefile
diff -u src/share/man/man9/Makefile:1.318 src/share/man/man9/Makefile:1.319
--- src/share/man/man9/Makefile:1.318	Mon Mar  1 19:09:41 2010
+++ src/share/man/man9/Makefile	Thu Mar  4 08:09:51 2010
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.318 2010/03/01 19:09:41 jruoho Exp $
+#   $NetBSD: Makefile,v 1.319 2010/03/04 08:09:51 jruoho Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -41,8 +41,8 @@
 	pcmcia.9 pcq.9 percpu.9 pfil.9 physio.9 pmap.9 pmatch.9 pmc.9 pmf.9 \
 	pool.9 pool_cache.9 powerhook_establish.9 ppsratecheck.9 \
 	preempt.9 putter.9 \
-	radio.9 ras.9 rasops.9 ratecheck.9 resettodr.9 rnd.9 rssadapt.9 \
-	rt_timer.9 rwlock.9 RUN_ONCE.9 \
+	radio.9 ras.9 rasops.9 ratecheck.9 resettodr.9 rnd.9 roundup.9 \
+	rssadapt.9 rt_timer.9 rwlock.9 RUN_ONCE.9 \
 	sched_4bsd.9 scsipi.9 \
 	secmodel.9 secmodel_bsd44.9 secmodel_overlay.9 secmodel_securelevel.9 \
 	secmodel_suser.9 setbit.9 setjmp.9 shutdownhook_establish.9 \
@@ -577,6 +577,10 @@
 	rasops.9 rasops_reconfig.9
 MLINKS+=rnd.9 rnd_attach_source.9 rnd.9 rnd_detach_source.9 \
 	rnd.9 rnd_add_data.9 rnd.9 rnd_add_uint32.9
+MLINKS+=roundup.9 howmany.9 \
+	roundup.9 rounddown.9 \
+	roundup.9 roundup2.9 \
+	roundup.9 powerof2.9
 MLINKS+=rssadapt.9 ieee80211_rssadapt_choose.9 \
 	rssadapt.9 ieee80211_rssadapt_input.9 \
 	rssadapt.9 ieee80211_rssadapt_lower_rate.9 \

Added files:

Index: src/share/man/man9/roundup.9
diff -u /dev/null src/share/man/man9/roundup.9:1.1
--- /dev/null	Thu Mar  4 08:09:52 2010
+++ src/share/man/man9/roundup.9	Thu Mar  4 08:09:52 2010
@@ -0,0 +1,96 @@
+.\ $NetBSD: roundup.9,v 1.1 2010/03/04 08:09:52 jruoho Exp $
+.\
+.\ Copyright (c) 2010 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Jukka Ruohonen.
+.\
+.\ 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.
+.\
+.Dd March 4, 2010
+.Dt ROUNDUP 9
+.Os
+.Sh NAME
+.Nm roundup
+.Nd macros for counting and rounding
+.Sh SYNOPSIS
+.In sys/param.h
+.Ft size
+.Fn howmany x size
+.Ft size
+.Fn roundup x size
+.Ft size
+.Fn rounddown x size
+.Ft size
+.Fn roundup2 x size
+.Ft int
+.Fn powerof2 x
+.Sh DESCRIPTION
+The
+.Fn roundup
+and
+.Fn rounddown
+macros return an integer from rounding
+.Fa x
+up and down, respectively, to the next
+.Fa size .
+The
+.Fn howmany
+macro in turn reveals how many times
+.Fa size
+fits into
+.Fa x ,
+rounding the residual up.
+.Pp
+The
+.Fn roundup2
+macro also rounds up, but with the assumption that
+.Fa x
+is a power of two.
+If
+.Fa x
+is indeed a power of two,
+.Fn powerof2
+return 1.
+.Sh RETURN VALUES
+The return value is an integer from the respective operation.
+If
+.Fa x
+is 0, all macros except
+.Fn powerof2
+return 0.
+The behavior is undefined if
+.Fa size
+is 0.
+.Sh EXAMPLES
+.Bd -literal -offset indent
+uint16_t rx;
+
+\...
+
+/* Round up to 32-bit boundary. */
+rx = roundup2(rx, sizeof(uint32_t));
+.Ed
+.Sh CAVEATS
+All described macros make no assumptions about the type of the parameters.
+These are implicitly assumed to be unsigned integers.



CVS commit: src/sys/arch/sparc64/sparc64

2010-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Mar  4 08:11:42 UTC 2010

Modified Files:
src/sys/arch/sparc64/sparc64: pmap.c

Log Message:
avoid a build error in the previous for !DEBUG kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/sys/arch/sparc64/sparc64/pmap.c

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



CVS commit: src/sys/arch/sparc64/sparc64

2010-03-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Mar  4 08:11:42 UTC 2010

Modified Files:
src/sys/arch/sparc64/sparc64: pmap.c

Log Message:
avoid a build error in the previous for !DEBUG kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/sys/arch/sparc64/sparc64/pmap.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.255 src/sys/arch/sparc64/sparc64/pmap.c:1.256
--- src/sys/arch/sparc64/sparc64/pmap.c:1.255	Thu Mar  4 08:01:35 2010
+++ src/sys/arch/sparc64/sparc64/pmap.c	Thu Mar  4 08:11:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.255 2010/03/04 08:01:35 mrg Exp $	*/
+/*	$NetBSD: pmap.c,v 1.256 2010/03/04 08:11:42 mrg Exp $	*/
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.255 2010/03/04 08:01:35 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.256 2010/03/04 08:11:42 mrg Exp $);
 
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define	HWREF
@@ -308,8 +308,8 @@
 	int pvfirst;
 	int pvsearch;
 } remove_stats;
-#define	ENTER_STAT(x)	enter_stats.x ++
-#define	REMOVE_STAT(x)	remove_stats.x ++
+#define	ENTER_STAT(x)	do { enter_stats.x ++; } while (0)
+#define	REMOVE_STAT(x)	do { remove_stats.x ++; } while (0)
 
 #define	PDB_CREATE		0x01
 #define	PDB_DESTROY		0x02
@@ -339,8 +339,8 @@
 #define	BDPRINTF(n, f)	if (pmapdebug  (n)) prom_printf f
 #define	DPRINTF(n, f)	if (pmapdebug  (n)) printf f
 #else
-#define	ENTER_STAT(x)
-#define	REMOVE_STAT(x)
+#define	ENTER_STAT(x)	do { /* nothing */ } while (0)
+#define	REMOVE_STAT(x)	do { /* nothing */ } while (0)
 #define	BDPRINTF(n, f)
 #define	DPRINTF(n, f)
 #endif



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

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 08:13:29 UTC 2010

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

Log Message:
Add roundup(9).


To generate a diff of this commit:
cvs rdiff -u -r1.1401 -r1.1402 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.



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 08:44:55 UTC 2010

Modified Files:
src/sys/dev/acpi: atk0110.c

Log Message:
Provide the _COMPONENT definition and use ACPI_FREE(x) instead of
AcpiOsFree(). If the memory tracking of ACPICA is enabled, the latter is
guaranteed to leak memory, possibly also corrupting kernel memory.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/atk0110.c

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



CVS commit: src/share/man/man9

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 09:57:12 UTC 2010

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

Log Message:
Instead of int hz, use extern int hz.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/hz.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/hz.9
diff -u src/share/man/man9/hz.9:1.6 src/share/man/man9/hz.9:1.7
--- src/share/man/man9/hz.9:1.6	Wed Apr 30 13:10:58 2008
+++ src/share/man/man9/hz.9	Thu Mar  4 09:57:12 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: hz.9,v 1.6 2008/04/30 13:10:58 martin Exp $
+.\	$NetBSD: hz.9,v 1.7 2010/03/04 09:57:12 jruoho Exp $
 .\
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -35,7 +35,8 @@
 .Nd system clock frequency
 .Sh SYNOPSIS
 .In sys/kernel.h
-.Va int hz;
+.Pp
+.Va extern int hz;
 .Sh DESCRIPTION
 .Nm
 specifies the number of times the



CVS commit: src/share/man/man9

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 09:57:12 UTC 2010

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

Log Message:
Instead of int hz, use extern int hz.


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

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



Re: CVS commit: src/sys/kern

2010-03-04 Thread Antti Kantee
On Thu Mar 04 2010 at 14:55:46 +1100, matthew green wrote:
 
Module Name:   src
Committed By:  pooka
Date:  Wed Mar  3 17:58:37 UTC 2010

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

Log Message:
Replace unsafe use of TAILQ_FOREACH: as the comment says, the
structures are pulled off the list in the loop and it's anyone's
guess where they go after that.
 
 
 ... i recommend using TAILQ_FOREACH_SAFE().  :-)

Yes.  If only someone had requested a pullup of the documentation to
netbsd-5 ... ;)


CVS commit: src/sys/dev/acpi

2010-03-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  4 13:07:01 UTC 2010

Modified Files:
src/sys/dev/acpi: smbus_acpi.c

Log Message:
Fix this correctly.  Thanks jruoho@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/smbus_acpi.c

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



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  4 13:07:01 UTC 2010

Modified Files:
src/sys/dev/acpi: smbus_acpi.c

Log Message:
Fix this correctly.  Thanks jruoho@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/smbus_acpi.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/acpi/smbus_acpi.c
diff -u src/sys/dev/acpi/smbus_acpi.c:1.4 src/sys/dev/acpi/smbus_acpi.c:1.5
--- src/sys/dev/acpi/smbus_acpi.c:1.4	Thu Mar  4 03:10:18 2010
+++ src/sys/dev/acpi/smbus_acpi.c	Thu Mar  4 13:07:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: smbus_acpi.c,v 1.4 2010/03/04 03:10:18 pgoyette Exp $ */
+/* $NetBSD: smbus_acpi.c,v 1.5 2010/03/04 13:07:01 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smbus_acpi.c,v 1.4 2010/03/04 03:10:18 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: smbus_acpi.c,v 1.5 2010/03/04 13:07:01 pgoyette Exp $);
+
+#define _COMPONENT		ACPI_RESOURCE_COMPONENT
+ACPI_MODULE_NAME		(smbus_acpi)
 
 #include sys/param.h
 #include sys/systm.h
@@ -163,7 +166,7 @@
 	}
 done:
 	if (smi_buf.Pointer != NULL)
-		AcpiOsFree(smi_buf.Pointer);
+		ACPI_FREE(smi_buf.Pointer);
 
 	return r;
 }
@@ -212,7 +215,7 @@
 		}
 	}
 	if (smi_buf.Pointer != NULL)
-		AcpiOsFree(smi_buf.Pointer);
+		ACPI_FREE(smi_buf.Pointer);
 
 	/* Install notify handler if possible */
 	rv = AcpiInstallNotifyHandler(sc-sc_devnode-ad_handle,
@@ -419,7 +422,7 @@
 		}
 	}
 	if (smbuf.Pointer)
-		AcpiOsFree(smbuf.Pointer);
+		ACPI_FREE(smbuf.Pointer);
 
 	return r;
 }
@@ -464,7 +467,7 @@
 		}
 done:
 		if (alert.Pointer != NULL)
-			AcpiOsFree(alert.Pointer);
+			ACPI_FREE(alert.Pointer);
 	} while (status == 0);
 }
 



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  4 13:11:15 UTC 2010

Modified Files:
src/sys/dev/acpi: smbus_acpi.c

Log Message:
This really should be ACPI_BUS_COMPONENT

Maybe I should stay out the acpi stuff?  :)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/smbus_acpi.c

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



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Mar  4 13:11:15 UTC 2010

Modified Files:
src/sys/dev/acpi: smbus_acpi.c

Log Message:
This really should be ACPI_BUS_COMPONENT

Maybe I should stay out the acpi stuff?  :)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/smbus_acpi.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/acpi/smbus_acpi.c
diff -u src/sys/dev/acpi/smbus_acpi.c:1.5 src/sys/dev/acpi/smbus_acpi.c:1.6
--- src/sys/dev/acpi/smbus_acpi.c:1.5	Thu Mar  4 13:07:01 2010
+++ src/sys/dev/acpi/smbus_acpi.c	Thu Mar  4 13:11:14 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: smbus_acpi.c,v 1.5 2010/03/04 13:07:01 pgoyette Exp $ */
+/* $NetBSD: smbus_acpi.c,v 1.6 2010/03/04 13:11:14 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -36,9 +36,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smbus_acpi.c,v 1.5 2010/03/04 13:07:01 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: smbus_acpi.c,v 1.6 2010/03/04 13:11:14 pgoyette Exp $);
 
-#define _COMPONENT		ACPI_RESOURCE_COMPONENT
+#define _COMPONENT		ACPI_BUS_COMPONENT
 ACPI_MODULE_NAME		(smbus_acpi)
 
 #include sys/param.h



Re: CVS commit: src/sys/dev/acpi

2010-03-04 Thread Paul Goyette

On Thu, 4 Mar 2010, Jukka Ruohonen wrote:


Well, this is wrong in the sense that the _COMPONENT definition was
incorrect to begin with, and in the sense that we have explicitly tried to
recently add the _COMPONENT definitions.

Also: now it does BadThings(tm) if the memory tracking of ACPICA is enabled.

The right solution is to e.g. #define _COMPONENT ACPI_BUS_COMPONENT.
The components that can be used are defined in dev/acpi/acpireg.h.


Yes - I've just fixed this.  I wan't sure if BUS or RESOURCE was the 
correct component to use...


Thanks.


-
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:  |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |  | pgoyette at netbsd.org  |
-


Re: CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
On Thu, Mar 04, 2010 at 05:12:43AM -0800, Paul Goyette wrote:
 On Thu, 4 Mar 2010, Jukka Ruohonen wrote:
 
 Well, this is wrong in the sense that the _COMPONENT definition was
 incorrect to begin with, and in the sense that we have explicitly tried to
 recently add the _COMPONENT definitions.
 
 Also: now it does BadThings(tm) if the memory tracking of ACPICA is 
 enabled.
 
 The right solution is to e.g. #define _COMPONENT ACPI_BUS_COMPONENT.
 The components that can be used are defined in dev/acpi/acpireg.h.
 
 Yes - I've just fixed this.  I wan't sure if BUS or RESOURCE was the 
 correct component to use...

It doesn't really matter whether it is RESOURCE or BUS. These are only
heuristics for debugging.

- Jukka.


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

2010-03-04 Thread VANHULLEBUS Yvan
Module Name:src
Committed By:   vanhu
Date:   Thu Mar  4 15:13:53 UTC 2010

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

Log Message:
From Pierre POMES: fixed admin port initialization


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/crypto/dist/ipsec-tools/src/racoon/session.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/session.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/session.c:1.26 src/crypto/dist/ipsec-tools/src/racoon/session.c:1.27
--- src/crypto/dist/ipsec-tools/src/racoon/session.c:1.26	Wed Jun 24 11:28:48 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/session.c	Thu Mar  4 15:13:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: session.c,v 1.26 2009/06/24 11:28:48 tteras Exp $	*/
+/*	$NetBSD: session.c,v 1.27 2010/03/04 15:13:53 vanhu Exp $	*/
 
 /*	$KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $	*/
 
@@ -170,11 +170,6 @@
 	if (pfkey_init()  0)
 		errx(1, failed to initialize pfkey socket);
 
-#ifdef ENABLE_ADMINPORT
-	if (admin_init()  0)
-		errx(1, failed to initialize admin port socket);
-#endif
-
 	if (isakmp_init()  0)
 		errx(1, failed to initialize ISAKMP structures);
 
@@ -204,6 +199,12 @@
 		errx(1, failed to parse configuration file.);
 	restore_params();
 
+#ifdef ENABLE_ADMINPORT
+	if (admin_init()  0)
+		errx(1, failed to initialize admin port socket);
+#endif
+
+
 #ifdef ENABLE_HYBRID
 	if(isakmp_cfg_config.network4  isakmp_cfg_config.pool_size == 0)
 		if ((error = isakmp_cfg_resize_pool(ISAKMP_CFG_MAX_CNX)) != 0)



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

2010-03-04 Thread VANHULLEBUS Yvan
Module Name:src
Committed By:   vanhu
Date:   Thu Mar  4 15:13:53 UTC 2010

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

Log Message:
From Pierre POMES: fixed admin port initialization


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/crypto/dist/ipsec-tools/src/racoon/session.c

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



CVS commit: src/lib/libterminfo

2010-03-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Mar  4 15:16:39 UTC 2010

Modified Files:
src/lib/libterminfo: termcap.c

Log Message:
Convert padding and give terminfo some default assumptions about termcap.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/termcap.c

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

Modified files:

Index: src/lib/libterminfo/termcap.c
diff -u src/lib/libterminfo/termcap.c:1.5 src/lib/libterminfo/termcap.c:1.6
--- src/lib/libterminfo/termcap.c:1.5	Tue Mar  2 14:11:11 2010
+++ src/lib/libterminfo/termcap.c	Thu Mar  4 15:16:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: termcap.c,v 1.5 2010/03/02 14:11:11 roy Exp $ */
+/* $NetBSD: termcap.c,v 1.6 2010/03/04 15:16:39 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: termcap.c,v 1.5 2010/03/02 14:11:11 roy Exp $);
+__RCSID($NetBSD: termcap.c,v 1.6 2010/03/04 15:16:39 roy Exp $);
 
 #include assert.h
 #include ctype.h
@@ -229,6 +229,7 @@
 strval(const char *val)
 {
 	char *info, *ip, c;
+	const char *ps, *pe;
 	int p;
 	size_t len, l, n;
 
@@ -237,6 +238,22 @@
 	if (info == NULL)
 		return 0;
 
+	/* Move the = */
+	*ip++ = *val++;
+
+	/* Set ps and pe to point to the start and end of the padding */
+	if (isdigit((unsigned char)*val)) {
+		for (ps = pe = val;
+		 isdigit((unsigned char)*val) || *val == '.';
+		 val++)
+			pe++;
+		if (*val == '*') {
+			val++;
+			pe++;
+		}
+	} else
+		ps = pe  = NULL;
+
 	l = 0;
 	p = 1;
 	for (; *val != '\0'; val++) {
@@ -287,6 +304,19 @@
 		*ip++ = '\\';
 	}
 
+	/* Add our padding at the end. */
+	if (ps != NULL) {
+		n = pe - ps;
+		if (l + n + 4  len)
+			goto elen;
+		*ip++ = '$';
+		*ip++ = '';
+		strncpy(ip, ps, n);
+		ip += n;
+		*ip++ = '/';
+		*ip++ = '';
+	}
+
 	*ip = '\0';
 	return info;
 
@@ -296,20 +326,38 @@
 	return NULL;
 }
 
+static struct def_info {
+	const char *name;
+	const char *cap;
+} def_infos[] = {
+	{ bel,	^G },
+	{ cr,		^M },
+	{ cud1,	^J },
+	{ ht,		^I },
+	{ ind,	^J },
+	{ kbs,	^H },
+	{ kcub1,	^H },
+	{ kcud1,	^J },
+	{ nel,	^M^J }
+};
+
 char *
 captoinfo(char *cap)
 {
 	char *info, *ip, *token, *val, *p, tok[3];
 	const char *name;
 	size_t len, lp, nl, vl, rl;
+	int defs[__arraycount(def_infos)];
 
 	_DIAGASSERT(cap != NULL);
 
 	len = strlen(cap) * 2;
+	len += __arraycount(def_infos) * (5 + 4 + 3); /* reserve for defs */
 	info = ip = malloc(len);
 	if (info == NULL)
 		return NULL;
 
+	memset(defs, 0, sizeof(defs));
 	lp = 0;
 	tok[2] = '\0';
 	for (token = _ti_get_token(cap, ':');
@@ -334,6 +382,16 @@
 val = strval(token + 2);
 			}
 		}
+
+		/* See if this sets a default. */
+		for (nl = 0; nl  __arraycount(def_infos); nl++) {
+			if (strcmp(name, def_infos[nl].name) == 0) {
+printf (matched %s\n, name);
+defs[nl] = 1;
+break;
+			}
+		}
+
 		nl = strlen(name);
 		if (val == NULL)
 			vl = 0;
@@ -367,6 +425,19 @@
 		}
 	}
 
+	/* Add any defaults not set above. */
+	for (nl = 0; nl  __arraycount(def_infos); nl++) {
+		if (defs[nl] == 0) {
+			*ip++ = ',';
+			*ip++ = ' ';
+			strcpy(ip, def_infos[nl].name);
+			ip += strlen(def_infos[nl].name);
+			*ip++ = '=';
+			strcpy(ip, def_infos[nl].cap);
+			ip += strlen(def_infos[nl].cap);
+		}
+	}
+
 	*ip = '\0';
 	return info;
 }



CVS commit: src/lib/libterminfo

2010-03-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Mar  4 15:16:39 UTC 2010

Modified Files:
src/lib/libterminfo: termcap.c

Log Message:
Convert padding and give terminfo some default assumptions about termcap.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/termcap.c

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



CVS commit: src/lib/libterminfo

2010-03-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Mar  4 15:35:26 UTC 2010

Modified Files:
src/lib/libterminfo: termcap.c

Log Message:
Convert padding for unknown capabilities as well.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libterminfo/termcap.c

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

Modified files:

Index: src/lib/libterminfo/termcap.c
diff -u src/lib/libterminfo/termcap.c:1.6 src/lib/libterminfo/termcap.c:1.7
--- src/lib/libterminfo/termcap.c:1.6	Thu Mar  4 15:16:39 2010
+++ src/lib/libterminfo/termcap.c	Thu Mar  4 15:35:26 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: termcap.c,v 1.6 2010/03/04 15:16:39 roy Exp $ */
+/* $NetBSD: termcap.c,v 1.7 2010/03/04 15:35:26 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: termcap.c,v 1.6 2010/03/04 15:16:39 roy Exp $);
+__RCSID($NetBSD: termcap.c,v 1.7 2010/03/04 15:35:26 roy Exp $);
 
 #include assert.h
 #include ctype.h
@@ -347,7 +347,7 @@
 	char *info, *ip, *token, *val, *p, tok[3];
 	const char *name;
 	size_t len, lp, nl, vl, rl;
-	int defs[__arraycount(def_infos)];
+	int defs[__arraycount(def_infos)], fv;
 
 	_DIAGASSERT(cap != NULL);
 
@@ -367,10 +367,12 @@
 		if (token[0] == '\0')
 			continue;
 		name = token;
-		val = NULL;
+		val = p = NULL;
+		fv = nl = 0;
 		if (token[1] != '\0') {
 			tok[0] = token[0];
 			tok[1] = token[1];
+			nl = 1;
 			if (token[2] == '\0') {
 name = flagname(tok);
 val = NULL;
@@ -380,13 +382,23 @@
 			} else if (token[2] == '=') {
 name = strname(tok);
 val = strval(token + 2);
+fv = 1;
+			} else
+nl = 0;
+		}
+		/* If not matched we may need to convert padding still. */
+		if (nl == 0) {
+			p = strchr(name, '=');
+			if (p != NULL) {
+val = strval(p);
+*p = '\0';
+fv = 1;
 			}
 		}
 
 		/* See if this sets a default. */
 		for (nl = 0; nl  __arraycount(def_infos); nl++) {
 			if (strcmp(name, def_infos[nl].name) == 0) {
-printf (matched %s\n, name);
 defs[nl] = 1;
 break;
 			}
@@ -420,7 +432,7 @@
 		if (val != NULL) {
 			strcpy(ip, val);
 			ip += vl;
-			if (token[2] == '=')
+			if (fv == 1)
 free(val);
 		}
 	}



CVS commit: src/lib/libterminfo

2010-03-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Mar  4 15:35:26 UTC 2010

Modified Files:
src/lib/libterminfo: termcap.c

Log Message:
Convert padding for unknown capabilities as well.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libterminfo/termcap.c

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



CVS commit: src/doc

2010-03-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Mar  4 15:47:12 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Note about proper support for NE2000 8 bit mode.


To generate a diff of this commit:
cvs rdiff -u -r1.1366 -r1.1367 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/CHANGES
diff -u src/doc/CHANGES:1.1366 src/doc/CHANGES:1.1367
--- src/doc/CHANGES:1.1366	Wed Mar  3 02:09:51 2010
+++ src/doc/CHANGES	Thu Mar  4 15:47:12 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1366 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1367 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -561,3 +561,4 @@
 	wcfb: A driver for 3Dlabs Wildcat graphics cards [macallan 20100224]
 	ld.so_elf: Implement negative symbol lookup cache [roy 20100227]	  
 	dhcpcd(8): Import dhcpcd-5.2.1. [roy 20100227]
+	ne(4): Add proper support for NE2000 8 bit mode. [tsutsui 20090303]



CVS commit: src/doc

2010-03-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Mar  4 15:47:12 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
Note about proper support for NE2000 8 bit mode.


To generate a diff of this commit:
cvs rdiff -u -r1.1366 -r1.1367 src/doc/CHANGES

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



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 16:40:54 UTC 2010

Modified Files:
src/sys/dev/cardbus: siisata_cardbus.c

Log Message:
Simplify interrupt (dis)establishment by two source transformations:

-   cardbus_intr_disestablish(cc, cf, ih);
+   Cardbus_intr_disestablish(ct, ih);

-   ih = cardbus_intr_establish(cc, cf, ...);
+   ih = Cardbus_intr_establish(ct, ...);

Tested by kiyoh...@.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/cardbus/siisata_cardbus.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/cardbus/siisata_cardbus.c
diff -u src/sys/dev/cardbus/siisata_cardbus.c:1.10 src/sys/dev/cardbus/siisata_cardbus.c:1.11
--- src/sys/dev/cardbus/siisata_cardbus.c:1.10	Fri Feb 26 00:57:02 2010
+++ src/sys/dev/cardbus/siisata_cardbus.c	Thu Mar  4 16:40:54 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata_cardbus.c,v 1.10 2010/02/26 00:57:02 dyoung Exp $ */
+/* $NetBSD: siisata_cardbus.c,v 1.11 2010/03/04 16:40:54 dyoung Exp $ */
 /* Id: siisata_pci.c,v 1.11 2008/05/21 16:20:11 jakllsch Exp  */
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: siisata_cardbus.c,v 1.10 2010/02/26 00:57:02 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: siisata_cardbus.c,v 1.11 2010/03/04 16:40:54 dyoung Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -225,7 +225,7 @@
 	sc-sc_dmat = ca-ca_dmat;
 
 	/* map interrupt */
-	csc-sc_ih = cardbus_intr_establish(cc, cf, ca-ca_intrline, IPL_BIO,
+	csc-sc_ih = Cardbus_intr_establish(ct, ca-ca_intrline, IPL_BIO,
 	siisata_intr, sc);
 	if (csc-sc_ih == NULL) {
 		Cardbus_conf_write(ct, ca-ca_tag, SIISATA_CARDBUS_BAR0, 0);
@@ -287,7 +287,7 @@
 	if (rv)
 		return (rv);
 	if (csc-sc_ih != NULL) {
-		cardbus_intr_disestablish(csc-sc_cc, csc-sc_cf, csc-sc_ih);
+		Cardbus_intr_disestablish(ct, csc-sc_ih);
 		csc-sc_ih = NULL;
 	}
 	if (csc-sc_grsize) {



CVS commit: src/doc

2010-03-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  4 17:57:26 UTC 2010

Modified Files:
src/doc: 3RDPARTY

Log Message:
binutils-2.20.1 out.


To generate a diff of this commit:
cvs rdiff -u -r1.749 -r1.750 src/doc/3RDPARTY

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.749 src/doc/3RDPARTY:1.750
--- src/doc/3RDPARTY:1.749	Sat Feb 27 16:04:33 2010
+++ src/doc/3RDPARTY	Thu Mar  4 17:57:26 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.749 2010/02/27 16:04:33 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.750 2010/03/04 17:57:26 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -132,7 +132,7 @@
 
 Package:	binutils
 Version:	2.16.1
-Current Vers:	2.20
+Current Vers:	2.20.1
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/binutils/
 Home Page:	http://www.gnu.org/software/binutils/



CVS commit: src/doc

2010-03-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  4 17:57:26 UTC 2010

Modified Files:
src/doc: 3RDPARTY

Log Message:
binutils-2.20.1 out.


To generate a diff of this commit:
cvs rdiff -u -r1.749 -r1.750 src/doc/3RDPARTY

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



Re: CVS commit: src/sys/kern

2010-03-04 Thread Antti Kantee
On Thu Mar 04 2010 at 14:11:27 +0200, Antti Kantee wrote:
 On Thu Mar 04 2010 at 14:55:46 +1100, matthew green wrote:
  
 Module Name: src
 Committed By:pooka
 Date:Wed Mar  3 17:58:37 UTC 2010
 
 Modified Files:
  src/sys/kern: kern_module.c
 
 Log Message:
 Replace unsafe use of TAILQ_FOREACH: as the comment says, the
 structures are pulled off the list in the loop and it's anyone's
 guess where they go after that.
  
  
  ... i recommend using TAILQ_FOREACH_SAFE().  :-)
 
 Yes.  If only someone had requested a pullup of the documentation to
 netbsd-5 ... ;)

actually that's not safe there ...


Re: CVS commit: src/sys/kern

2010-03-04 Thread Antti Kantee
On Thu Mar 04 2010 at 20:05:08 +0200, Antti Kantee wrote:
 On Thu Mar 04 2010 at 14:11:27 +0200, Antti Kantee wrote:
  On Thu Mar 04 2010 at 14:55:46 +1100, matthew green wrote:
   
  Module Name:   src
  Committed By:  pooka
  Date:  Wed Mar  3 17:58:37 UTC 2010
  
  Modified Files:
 src/sys/kern: kern_module.c
  
  Log Message:
  Replace unsafe use of TAILQ_FOREACH: as the comment says, the
  structures are pulled off the list in the loop and it's anyone's
  guess where they go after that.
   
   
   ... i recommend using TAILQ_FOREACH_SAFE().  :-)
  
  Yes.  If only someone had requested a pullup of the documentation to
  netbsd-5 ... ;)
 
 actually that's not safe there ...

err, is safe, like even the original before my change was.  i'll stop
writing random emails now.


CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 18:31:57 UTC 2010

Modified Files:
src/sys/dev/cardbus: rbus_ppb.c

Log Message:
Delete unfinished and unreachable code: ppb_cardbus_setup(),
ppb_cardbus_enable(), ppb_cardbus_disable().


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/cardbus/rbus_ppb.c

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



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 18:31:57 UTC 2010

Modified Files:
src/sys/dev/cardbus: rbus_ppb.c

Log Message:
Delete unfinished and unreachable code: ppb_cardbus_setup(),
ppb_cardbus_enable(), ppb_cardbus_disable().


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/cardbus/rbus_ppb.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/cardbus/rbus_ppb.c
diff -u src/sys/dev/cardbus/rbus_ppb.c:1.36 src/sys/dev/cardbus/rbus_ppb.c:1.37
--- src/sys/dev/cardbus/rbus_ppb.c:1.36	Wed Mar  3 00:56:41 2010
+++ src/sys/dev/cardbus/rbus_ppb.c	Thu Mar  4 18:31:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbus_ppb.c,v 1.36 2010/03/03 00:56:41 dyoung Exp $	*/
+/*	$NetBSD: rbus_ppb.c,v 1.37 2010/03/04 18:31:57 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rbus_ppb.c,v 1.36 2010/03/03 00:56:41 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: rbus_ppb.c,v 1.37 2010/03/04 18:31:57 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -78,9 +78,6 @@
 static int  ppb_cardbus_match(device_t, cfdata_t, void *);
 static void ppb_cardbus_attach(device_t, device_t, void *);
 static int  ppb_cardbus_detach(device_t  self, int flags);
-/*static*/ void ppb_cardbus_setup(struct ppb_softc * sc);
-/*static*/ int  ppb_cardbus_enable(struct ppb_softc * sc);
-/*static*/ void ppb_cardbus_disable(struct ppb_softc * sc);
 static int  ppb_activate(device_t, enum devact);
 int rppbprint(void *, const char *);
 int rbus_intr_fixup(pci_chipset_tag_t, int, int, int);
@@ -729,83 +726,6 @@
 	config_found_ia(self, pcibus, pba, rppbprint);
 }
 
-void
-ppb_cardbus_setup(struct ppb_softc * sc)
-{
-	struct ppb_cardbus_softc *csc = (struct ppb_cardbus_softc *) sc;
-#if 0
-	cardbus_chipset_tag_t cc  = psc-sc_cc;
-	cardbus_function_tag_t cf = psc-sc_cf;
-#endif
-
-	/* shut up compiler */
-	csc-foo=2;
-
-	printf(ppb_cardbus_setup called\n);
-#if 0
-	/* not sure what to do here */
-	pcitag_t tag = csc-sc_tag;
-
-	command = Cardbus_conf_read(csc-ct, tag, PCI_COMMAND_STATUS_REG);
-	if (csc-base0_reg) {
-		Cardbus_conf_write(csc-ct, tag,
-		PCI_BAR0, csc-base0_reg);
-		command |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE;
-	} else if (csc-base1_reg) {
-		Cardbus_conf_write(csc-ct, tag,
-		PCI_BAR1, csc-base1_reg);
-		command |= (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MASTER_ENABLE);
-	}
-
-	/* enable the card */
-	Cardbus_conf_write(csc-ct, tag, PCI_COMMAND_STATUS_REG, command);
-#endif
-}
-
-int
-ppb_cardbus_enable(struct ppb_softc * sc)
-{
-#if 0
-	struct ppb_cardbus_softc *csc = (struct ppb_cardbus_softc *) sc;
-	struct cardbus_softc *psc = device_private(device_parent(sc-sc_dev));
-	cardbus_chipset_tag_t cc = psc-sc_cc;
-	cardbus_function_tag_t cf = psc-sc_cf;
-
-	Cardbus_function_enable(csc-ct);
-
-	fxp_cardbus_setup(sc);
-
-	/* Map and establish the interrupt. */
-
-	sc-sc_ih = Cardbus_intr_establish(ct, psc-sc_intrline, IPL_NET,
-	fxp_intr, sc);
-	if (NULL == sc-sc_ih) {
-		aprint_error_dev(sc-sc_dev, couldn't establish interrupt\n);
-		return 1;
-	}
-
-	printf(%s: interrupting at %d\n, device_xname(sc-sc_dev),
-	psc-sc_intrline);
-
-#endif
-	return 0;
-}
-
-void
-ppb_cardbus_disable(struct ppb_softc * sc)
-{
-#if 0
-	struct cardbus_softc *psc = device_private(device_parent(sc-sc_dev));
-	cardbus_chipset_tag_t cc = psc-sc_cc;
-	cardbus_function_tag_t cf = psc-sc_cf;
-
-	/* Remove interrupt handler. */
-	Cardbus_intr_disestablish(ct, sc-sc_ih);
-
-	Cardbus_function_disable(((struct fxp_cardbus_softc *) sc)-ct);
-#endif
-}
-
 static int
 ppb_cardbus_detach(device_t self, int flags)
 {



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 18:49:14 UTC 2010

Modified Files:
src/sys/dev/cardbus: rbus_ppb.c

Log Message:
It turns out that ppb at cardbus was not even in ALL.  It has probably
not been compiled in a very long time.  With some minor changes, it was
possible to make it compile:

Use kmem_zalloc()/kmem_free() instead of alloca()/memset().

Use %zu and %zx for printf'ing bus_size_t.

Delete the declaration of an unused local variable.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/cardbus/rbus_ppb.c

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



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 18:49:14 UTC 2010

Modified Files:
src/sys/dev/cardbus: rbus_ppb.c

Log Message:
It turns out that ppb at cardbus was not even in ALL.  It has probably
not been compiled in a very long time.  With some minor changes, it was
possible to make it compile:

Use kmem_zalloc()/kmem_free() instead of alloca()/memset().

Use %zu and %zx for printf'ing bus_size_t.

Delete the declaration of an unused local variable.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/cardbus/rbus_ppb.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/cardbus/rbus_ppb.c
diff -u src/sys/dev/cardbus/rbus_ppb.c:1.37 src/sys/dev/cardbus/rbus_ppb.c:1.38
--- src/sys/dev/cardbus/rbus_ppb.c:1.37	Thu Mar  4 18:31:57 2010
+++ src/sys/dev/cardbus/rbus_ppb.c	Thu Mar  4 18:49:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbus_ppb.c,v 1.37 2010/03/04 18:31:57 dyoung Exp $	*/
+/*	$NetBSD: rbus_ppb.c,v 1.38 2010/03/04 18:49:14 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rbus_ppb.c,v 1.37 2010/03/04 18:31:57 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: rbus_ppb.c,v 1.38 2010/03/04 18:49:14 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -45,6 +45,7 @@
 #include sys/ioctl.h
 #include sys/errno.h
 #include sys/device.h
+#include sys/kmem.h
 
 #if NRND  0
 #include sys/rnd.h
@@ -231,10 +232,11 @@
 		struct cardbus_softc *sc,
 		pci_chipset_tag_t pc,
 		struct cardbus_attach_args *caa,
-		int minbus, int maxbus)
+		int minbus, const int maxbus)
 {
 	struct rbus_pci_addr_fixup_context rct;
-	intsize, busnum;
+	const size_t size = sizeof(bus_size_t[maxbus+1]);
+	int busnum;
 	bus_addr_t start;
 	bus_space_handle_t handle;
 	u_int32_t reg;
@@ -245,14 +247,13 @@
 	rct.caa=caa;
 	rct.minbus = minbus;
 	rct.maxbus = maxbus;
-	size = sizeof(bus_size_t)*(maxbus+1);
-	rct.bussize_ioreqs  = alloca(size);
-	rct.bussize_memreqs = alloca(size);
-	rct.iobustags = alloca(maxbus * sizeof(rbus_tag_t));
-	rct.membustags = alloca(maxbus * sizeof(rbus_tag_t));
-
-	memset(rct.bussize_ioreqs, 0, size);
-	memset(rct.bussize_memreqs, 0, size);
+	if ((rct.bussize_ioreqs  = kmem_zalloc(size, KM_SLEEP)) == NULL ||
+	(rct.bussize_memreqs = kmem_zalloc(size, KM_SLEEP)) == NULL ||
+	(rct.iobustags =
+	 kmem_zalloc(maxbus * sizeof(rbus_tag_t), KM_SLEEP)) == NULL ||
+	(rct.membustags =
+	 kmem_zalloc(maxbus * sizeof(rbus_tag_t), KM_SLEEP)) == NULL)
+		panic(%s: memory allocation failed, __func__);
 
 	printf(%s: sizing buses %d-%d\n,
 	   device_xname(rct.csc-sc_dev),
@@ -297,7 +298,7 @@
 	rct.bussize_memreqs[minbus] =
 	  rbus_round_up(rct.bussize_memreqs[minbus], 8);
 
-	printf(%s: total needs IO %08lx and MEM %08lx\n,
+	printf(%s: total needs IO %08zx and MEM %08zx\n,
 	   device_xname(rct.csc-sc_dev),
 	   rct.bussize_ioreqs[minbus], rct.bussize_memreqs[minbus]);
 
@@ -313,7 +314,7 @@
 			  /* flags */ 0,
 			  start,
 			  handle) != 0) {
-	panic(rbus_ppb: can not allocate %ld bytes in IO bus %d,
+	panic(rbus_ppb: can not allocate %zu bytes in IO bus %d,
 		  rct.bussize_ioreqs[minbus], minbus);
 	  }
 	  rct.iobustags[minbus]=rbus_new(caa-ca_rbus_iot,
@@ -332,7 +333,7 @@
 			  /* flags */ 0,
 			  start,
 			  handle) != 0) {
-	panic(%s: can not allocate %ld bytes in MEM bus %d,
+	panic(%s: can not allocate %zu bytes in MEM bus %d,
 		  device_xname(rct.csc-sc_dev),
 		  rct.bussize_memreqs[minbus], minbus);
 	  }
@@ -350,7 +351,7 @@
 
 	  busparent = pci_bus_parent[busnum];
 
-	  printf(%s: bus %d (parent=%d) needs IO %08lx and MEM %08lx\n,
+	  printf(%s: bus %d (parent=%d) needs IO %08zx and MEM %08zx\n,
 		 device_xname(rct.csc-sc_dev),
 		 busnum,
 		 busparent,
@@ -370,7 +371,7 @@
 /* flags */ 0,
 start,
 handle) != 0) {
-	  panic(rbus_ppb: can not allocate %ld bytes in IO bus %d,
+	  panic(rbus_ppb: can not allocate %zu bytes in IO bus %d,
 		rct.bussize_ioreqs[busnum], busnum);
 	}
 	rct.iobustags[busnum]=rbus_new(rct.iobustags[busparent],
@@ -407,7 +408,7 @@
 /* flags */ 0,
 start,
 handle) != 0) {
-	  panic(rbus_ppb: can not allocate %ld bytes in MEM bus %d,
+	  panic(rbus_ppb: can not allocate %zu bytes in MEM bus %d,
 		rct.bussize_memreqs[busnum], busnum);
 	}
 	rct.membustags[busnum]=rbus_new(rct.membustags[busparent],
@@ -453,6 +454,11 @@
 	   minbus, maxbus);
 	pci_device_foreach_min(pc, minbus, maxbus,
 			   rbus_pci_phys_allocate, rct);
+
+	kmem_free(rct.bussize_ioreqs, size);
+	kmem_free(rct.bussize_memreqs, size);
+	kmem_free(rct.iobustags, maxbus * sizeof(rbus_tag_t));
+	kmem_free(rct.membustags, maxbus * sizeof(rbus_tag_t));
 }
 
 static void
@@ -624,7 +630,6 @@
 	struct 

Re: CVS commit: src/sys/dev/cardbus

2010-03-04 Thread Jason Thorpe

On Mar 4, 2010, at 10:49 AM, David Young wrote:

 Use %zu and %zx for printf'ing bus_size_t.

These aren't quite right.  We should probably define PRIxxx macros for the 
bus.h scalar types.

-- thorpej



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 20:17:30 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c atk0110.c smbus_acpi.c

Log Message:
Fix ACPI_DEBUG build failures reported by Greg A. Woods.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/atk0110.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/smbus_acpi.c

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



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 20:17:30 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi.c atk0110.c smbus_acpi.c

Log Message:
Fix ACPI_DEBUG build failures reported by Greg A. Woods.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/atk0110.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/smbus_acpi.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/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.152 src/sys/dev/acpi/acpi.c:1.153
--- src/sys/dev/acpi/acpi.c:1.152	Wed Mar  3 06:57:05 2010
+++ src/sys/dev/acpi/acpi.c	Thu Mar  4 20:17:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.152 2010/03/03 06:57:05 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.153 2010/03/04 20:17:30 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.152 2010/03/03 06:57:05 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.153 2010/03/04 20:17:30 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_pcifixup.h
@@ -822,8 +822,8 @@
 	ACPI_DEVICE_INFO *newdi;
 
 #ifdef ACPI_DEBUG
-	aprint_normal(acpi_activate_device: %s, old status=%x\n,
-	   (*di)-HardwareId.Value, (*di)-CurrentStatus);
+	aprint_normal(%s: %s, old status=%x\n, __func__,
+	   (*di)-HardwareId.String, (*di)-CurrentStatus);
 #endif
 
 	rv = acpi_allocate_resources(handle);
@@ -840,8 +840,8 @@
 	*di = newdi;
 
 #ifdef ACPI_DEBUG
-	aprint_normal(acpi_activate_device: %s, new status=%x\n,
-	   (*di)-HardwareId.Value, (*di)-CurrentStatus);
+	aprint_normal(%s: %s, new status=%x\n, __func__,
+	   (*di)-HardwareId.String, (*di)-CurrentStatus);
 #endif
 }
 #endif /* ACPI_ACTIVATE_DEV */

Index: src/sys/dev/acpi/atk0110.c
diff -u src/sys/dev/acpi/atk0110.c:1.7 src/sys/dev/acpi/atk0110.c:1.8
--- src/sys/dev/acpi/atk0110.c:1.7	Thu Mar  4 08:44:55 2010
+++ src/sys/dev/acpi/atk0110.c	Thu Mar  4 20:17:30 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: atk0110.c,v 1.7 2010/03/04 08:44:55 jruoho Exp $	*/
+/*	$NetBSD: atk0110.c,v 1.8 2010/03/04 20:17:30 jruoho Exp $	*/
 /*	$OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: atk0110.c,v 1.7 2010/03/04 08:44:55 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: atk0110.c,v 1.8 2010/03/04 20:17:30 jruoho Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -27,8 +27,8 @@
 
 #include dev/sysmon/sysmonvar.h
 
-#include acpi.h
-#include acpivar.h
+#include dev/acpi/acpireg.h
+#include dev/acpi/acpivar.h
 
 /*
  * ASUSTeK AI Booster (ACPI ASOC ATK0110).

Index: src/sys/dev/acpi/smbus_acpi.c
diff -u src/sys/dev/acpi/smbus_acpi.c:1.6 src/sys/dev/acpi/smbus_acpi.c:1.7
--- src/sys/dev/acpi/smbus_acpi.c:1.6	Thu Mar  4 13:11:14 2010
+++ src/sys/dev/acpi/smbus_acpi.c	Thu Mar  4 20:17:30 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: smbus_acpi.c,v 1.6 2010/03/04 13:11:14 pgoyette Exp $ */
+/* $NetBSD: smbus_acpi.c,v 1.7 2010/03/04 20:17:30 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -36,10 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smbus_acpi.c,v 1.6 2010/03/04 13:11:14 pgoyette Exp $);
-
-#define _COMPONENT		ACPI_BUS_COMPONENT
-ACPI_MODULE_NAME		(smbus_acpi)
+__KERNEL_RCSID(0, $NetBSD: smbus_acpi.c,v 1.7 2010/03/04 20:17:30 jruoho Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -58,6 +55,9 @@
 
 #include dev/i2c/i2cvar.h
 
+#define _COMPONENT		ACPI_BUS_COMPONENT
+ACPI_MODULE_NAME		(smbus_acpi)
+
 /*
  * ACPI SMBus CMI protocol codes
  */



Re: CVS commit: src/sys/dev/cardbus

2010-03-04 Thread Matt Thomas

On Mar 4, 2010, at 11:13 AM, Jason Thorpe wrote:

 
 On Mar 4, 2010, at 10:49 AM, David Young wrote:
 
 Use %zu and %zx for printf'ing bus_size_t.
 
 These aren't quite right.  We should probably define PRIxxx macros for the 
 bus.h scalar types.

For mips, I made bus_space_handle_t intptr_t and defined PRIxBSH as PRIxPTR and 
PRIxBUSADDR as PRIxPADDR.

CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 20:46:18 UTC 2010

Modified Files:
src/sys/dev/acpi: smbus_acpi.c

Log Message:
Fix two memory leaks.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/smbus_acpi.c

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



CVS commit: src/usr.bin/ftp

2010-03-04 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Mar  4 21:40:53 UTC 2010

Modified Files:
src/usr.bin/ftp: extern.h fetch.c util.c

Log Message:
Parse HTTP 'Date' entries in the `C' locale rather than the user's.
Fix from [bin/42917] (with minor changes), from KAMADA Ken'ichi.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.191 -r1.192 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.152 -r1.153 src/usr.bin/ftp/util.c

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

Modified files:

Index: src/usr.bin/ftp/extern.h
diff -u src/usr.bin/ftp/extern.h:1.77 src/usr.bin/ftp/extern.h:1.78
--- src/usr.bin/ftp/extern.h:1.77	Mon Jul 13 19:05:41 2009
+++ src/usr.bin/ftp/extern.h	Thu Mar  4 21:40:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.77 2009/07/13 19:05:41 roy Exp $	*/
+/*	$NetBSD: extern.h,v 1.78 2010/03/04 21:40:53 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -166,6 +166,7 @@
 void	opts(int, char **);
 void	newer(int, char **);
 void	page(int, char **);
+const char *parse_rfc2616time(struct tm *, const char *);
 int	parserate(int, char **, int);
 char   *prompt(void);
 void	proxabort(int);

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.191 src/usr.bin/ftp/fetch.c:1.192
--- src/usr.bin/ftp/fetch.c:1.191	Mon Aug 17 09:08:16 2009
+++ src/usr.bin/ftp/fetch.c	Thu Mar  4 21:40:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.191 2009/08/17 09:08:16 christos Exp $	*/
+/*	$NetBSD: fetch.c,v 1.192 2010/03/04 21:40:53 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fetch.c,v 1.191 2009/08/17 09:08:16 christos Exp $);
+__RCSID($NetBSD: fetch.c,v 1.192 2010/03/04 21:40:53 lukem Exp $);
 #endif /* not lint */
 
 /*
@@ -934,28 +934,18 @@
 
 			} else if (match_token(cp, Last-Modified:)) {
 struct tm parsed;
-char *t;
+const char *t;
 
 memset(parsed, 0, sizeof(parsed));
-			/* RFC1123 */
-if ((t = strptime(cp,
-		%a, %d %b %Y %H:%M:%S GMT,
-		parsed))
-			/* RFC0850 */
-|| (t = strptime(cp,
-		%a, %d-%b-%y %H:%M:%S GMT,
-		parsed))
-			/* asctime */
-|| (t = strptime(cp,
-		%a, %b %d %H:%M:%S %Y,
-		parsed))) {
+t = parse_rfc2616time(parsed, cp);
+if (t != NULL) {
 	parsed.tm_isdst = -1;
 	if (*t == '\0')
 		mtime = timegm(parsed);
 #ifndef NO_DEBUG
 	if (ftp_debug  mtime != -1) {
 		fprintf(ttyout,
-		parsed date as: %s,
+		parsed time as: %s,
 		rfc2822time(localtime(mtime)));
 	}
 #endif

Index: src/usr.bin/ftp/util.c
diff -u src/usr.bin/ftp/util.c:1.152 src/usr.bin/ftp/util.c:1.153
--- src/usr.bin/ftp/util.c:1.152	Mon Jul 13 19:05:41 2009
+++ src/usr.bin/ftp/util.c	Thu Mar  4 21:40:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.152 2009/07/13 19:05:41 roy Exp $	*/
+/*	$NetBSD: util.c,v 1.153 2010/03/04 21:40:53 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: util.c,v 1.152 2009/07/13 19:05:41 roy Exp $);
+__RCSID($NetBSD: util.c,v 1.153 2010/03/04 21:40:53 lukem Exp $);
 #endif /* not lint */
 
 /*
@@ -85,6 +85,7 @@
 #include signal.h
 #include libgen.h
 #include limits.h
+#include locale.h
 #include netdb.h
 #include stdio.h
 #include stdlib.h
@@ -756,7 +757,7 @@
 			else
 goto cleanup_parse_time;
 		} else {
-			DPRINTF(remotemodtime: parsed date `%s' as  LLF
+			DPRINTF(remotemodtime: parsed time `%s' as  LLF
 			, %s,
 			timestr, (LLT)rtime,
 			rfc2822time(localtime(rtime)));
@@ -792,6 +793,32 @@
 }
 
 /*
+ * Parse HTTP-date as per RFC 2616.
+ * Return a pointer to the next character of the consumed date string,
+ * or NULL if failed.
+ */
+const char *
+parse_rfc2616time(struct tm *parsed, const char *httpdate)
+{
+	const char *t;
+	const char *curlocale;
+
+	/* The representation of %a depends on the current locale. */
+	curlocale = setlocale(LC_TIME, NULL);
+	(void)setlocale(LC_TIME, C);
+/* RFC1123 */
+	if ((t = strptime(httpdate, %a, %d %b %Y %H:%M:%S GMT, parsed)) ||
+/* RFC0850 */
+	(t = strptime(httpdate, %a, %d-%b-%y %H:%M:%S GMT, parsed)) ||
+/* asctime */
+	(t = strptime(httpdate, %a, %b %d %H:%M:%S %Y, parsed))) {
+		;			/* do nothing */
+	}
+	(void)setlocale(LC_TIME, curlocale);
+	return t;
+}
+
+/*
  * Update global `localcwd', which contains the state of the local cwd
  */
 void



CVS commit: src/usr.bin/ftp

2010-03-04 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Thu Mar  4 21:40:53 UTC 2010

Modified Files:
src/usr.bin/ftp: extern.h fetch.c util.c

Log Message:
Parse HTTP 'Date' entries in the `C' locale rather than the user's.
Fix from [bin/42917] (with minor changes), from KAMADA Ken'ichi.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.191 -r1.192 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.152 -r1.153 src/usr.bin/ftp/util.c

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



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

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 21:47:59 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
Enable (uncomment) ACPI_DEBUG, ACPI_DEBUG_ALLOC, and ACPI_MUTEX_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/arch/i386/conf/ALL

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



CVS commit: src/sys/arch/i386/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 21:54:35 UTC 2010

Modified Files:
src/sys/arch/i386/acpi: vald_acpi.c

Log Message:
Remove VALD_ACPI_DEBUG and AVALD_F_VERBOSE. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/i386/acpi/vald_acpi.c

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



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

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 21:55:32 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
VALD_ACPI_DEBUG is dead.


To generate a diff of this commit:
cvs rdiff -u -r1.246 -r1.247 src/sys/arch/i386/conf/ALL

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



Re: CVS commit: src/share/man/man3

2010-03-04 Thread Greg A. Woods
At Thu, 4 Mar 2010 02:22:35 +, David Holland 
dholland-sourcechan...@netbsd.org wrote:
Subject: Re: CVS commit: src/share/man/man3
 
 On Wed, Mar 03, 2010 at 12:58:33PM -0500, Greg A. Woods wrote:
   I believe that __UNCONST() in particular is _never_ absolutely necessary
   -- it may sometimes save a very few cycles and a few bytes of storage,
   but that's the best it can do.
 
 No such luck, at least not until C grows a stronger type system. See
 for example strchr(3).

I don't think a stronger type system would really change this issue
fundamentally unless it was one which was so radical as to change the
entire language -- All that may really be needed is a new kind of
qualifier, one that tells the compiler a return value (or other internal
variable) has the same const status as some given input parameter
(const_if_{parameter-name}_const or some such similar nonsense).

While strchr()'s interface, and that of strrchr() of course, are indeed
excellent examples this issue, the use of __UNCONST() within their
implementation to hide silly warnings that might be encountered by
compiling their implementations doesn't really fix anything except the
silly warnings.  The code _must_ do what it _should_ not do.  :-) And so
I think what I said about __UNCONST() being unnecessary remains.  The
warning it hides is really still valid.  IMO it's just sad that all
users of those functions won't normally (i.e. by default, with the
ability to turn it off) see a similar warning when they use these
functions so as to be made aware of the limitations of their
declarations.

I.e. the users of strchr() and strrchr() must understand that their
return values really cannot be considered to point to writable storage,
regardless of the lack of a const qualifier on their return type
declarations.

As Harbison and Steele say, The return value of these functions is a
pointer to non-const, but in fact the object designated will be const if
the first argument points to a const object.  In that case, storing a
value into the object designated by the return pointer will result in
undefined behaviour.  The const qualifier on the function's first
parameter is after all just a promise by strchr() that _it_ will not
modify what that pointer points at, and nothing more.  Unfortunately
because of the choices made in the standard, the compiler cannot help
the user make similar promises about the use of the return value when
and if necessary.

A similar warning should probably appear in strchr(3) and strrchr(3) and
the manual pages of any other functions with similar limitations.

Similar kinds of discussion might also be appropriate in __UNCONST(3)
such that users defining functions with similar issues as strchr(3) et
al can also make appropriate choices.

-- 
Greg A. Woods
Planix, Inc.

wo...@planix.com   +1 416 218 0099http://www.planix.com/


pgpmZVDnfMUFT.pgp
Description: PGP signature


CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 22:29:47 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_button.c

Log Message:
Cleanup:

  * Semantics.
  * No need for dev/acpi/acpica.h.
  * Reduce the amount of error reporting.
  * Remove ACPI_BUT_DEBUG and ACPIBUT_F_VERBOSE.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/acpi/acpi_button.c

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



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 22:29:47 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_button.c

Log Message:
Cleanup:

  * Semantics.
  * No need for dev/acpi/acpica.h.
  * Reduce the amount of error reporting.
  * Remove ACPI_BUT_DEBUG and ACPIBUT_F_VERBOSE.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/acpi/acpi_button.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/acpi/acpi_button.c
diff -u src/sys/dev/acpi/acpi_button.c:1.31 src/sys/dev/acpi/acpi_button.c:1.32
--- src/sys/dev/acpi/acpi_button.c:1.31	Sun Feb 28 17:22:41 2010
+++ src/sys/dev/acpi/acpi_button.c	Thu Mar  4 22:29:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_button.c,v 1.31 2010/02/28 17:22:41 jruoho Exp $	*/
+/*	$NetBSD: acpi_button.c,v 1.32 2010/03/04 22:29:47 jruoho Exp $	*/
 
 /*
  * Copyright 2001, 2003 Wasabi Systems, Inc.
@@ -40,26 +40,24 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.31 2010/02/28 17:22:41 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_button.c,v 1.32 2010/03/04 22:29:47 jruoho Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
 #include sys/module.h
 
-#include dev/acpi/acpica.h
 #include dev/acpi/acpireg.h
 #include dev/acpi/acpivar.h
 
 #include dev/sysmon/sysmonvar.h
 
-#define _COMPONENT		ACPI_BUTTON_COMPONENT
-ACPI_MODULE_NAME		(acpi_button)
+#define _COMPONENT		 ACPI_BUTTON_COMPONENT
+ACPI_MODULE_NAME		 (acpi_button)
 
 struct acpibut_softc {
-	struct acpi_devnode *sc_node;	/* our ACPI devnode */
-	struct sysmon_pswitch sc_smpsw;	/* our sysmon glue */
-	int sc_flags;			/* see below */
+	struct acpi_devnode	*sc_node;
+	struct sysmon_pswitch	 sc_smpsw;
 };
 
 static const char * const power_button_hid[] = {
@@ -72,13 +70,11 @@
 	NULL
 };
 
-#define	ACPIBUT_F_VERBOSE		0x01	/* verbose events */
-
 static int	acpibut_match(device_t, cfdata_t, void *);
 static void	acpibut_attach(device_t, device_t, void *);
 static int	acpibut_detach(device_t, int);
 static void	acpibut_pressed_event(void *);
-static void	acpibut_notify_handler(ACPI_HANDLE, UINT32, void *);
+static void	acpibut_notify_handler(ACPI_HANDLE, uint32_t, void *);
 
 CFATTACH_DECL_NEW(acpibut, sizeof(struct acpibut_softc),
 acpibut_match, acpibut_attach, acpibut_detach, NULL);
@@ -126,36 +122,22 @@
 	} else if (acpi_match_hid(aa-aa_node-ad_devinfo, sleep_button_hid)) {
 		sc-sc_smpsw.smpsw_type = PSWITCH_TYPE_SLEEP;
 		desc = Sleep;
-	} else {
-		panic(acpibut_attach: impossible);
-	}
+	} else
+		panic(%s: impossible, __func__);
 
 	aprint_naive(: ACPI %s Button\n, desc);
 	aprint_normal(: ACPI %s Button\n, desc);
 
 	sc-sc_node = aa-aa_node;
 
-	if (sysmon_pswitch_register(sc-sc_smpsw) != 0) {
-		aprint_error_dev(self, unable to register with sysmon\n);
-		return;
-	}
+	(void)pmf_device_register(self, NULL, NULL)
+	(void)sysmon_pswitch_register(sc-sc_smpsw);
 
 	rv = AcpiInstallNotifyHandler(sc-sc_node-ad_handle,
 	ACPI_DEVICE_NOTIFY, acpibut_notify_handler, self);
-	if (ACPI_FAILURE(rv)) {
-		aprint_error_dev(self,
-		unable to register DEVICE NOTIFY handler: %s\n,
-		AcpiFormatException(rv));
-		return;
-	}
-
-#ifdef ACPI_BUT_DEBUG
-	/* Display the current state when it changes. */
-	sc-sc_flags = ACPIBUT_F_VERBOSE;
-#endif
 
-	if (!pmf_device_register(self, NULL, NULL))
-		aprint_error_dev(self, couldn't establish power handler\n);
+	if (ACPI_FAILURE(rv))
+		aprint_error_dev(self, failed to install notify handler\n);
 }
 
 /*
@@ -192,9 +174,7 @@
 	device_t dv = arg;
 	struct acpibut_softc *sc = device_private(dv);
 
-	if (sc-sc_flags  ACPIBUT_F_VERBOSE)
-		aprint_verbose_dev(dv, button pressed\n);
-
+	aprint_debug_dev(dv, button pressed\n);
 	sysmon_pswitch_event(sc-sc_smpsw, PSWITCH_EVENT_PRESSED);
 }
 
@@ -204,32 +184,20 @@
  *	Callback from ACPI interrupt handler to notify us of an event.
  */
 static void
-acpibut_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
+acpibut_notify_handler(ACPI_HANDLE handle, uint32_t notify, void *context)
 {
+	static const int handler = OSL_NOTIFY_HANDLER;
 	device_t dv = context;
-	ACPI_STATUS rv;
 
 	switch (notify) {
+
+ /* case ACPI_NOTIFY_S0SleepButtonPressed: */
 	case ACPI_NOTIFY_S0PowerButtonPressed:
-#if 0
-	case ACPI_NOTIFY_S0SleepButtonPressed: /* same as above */
-#endif
-#ifdef ACPI_BUT_DEBUG
-		aprint_debug_dev(dv, received ButtonPressed message\n);
-#endif
-		rv = AcpiOsExecute(OSL_NOTIFY_HANDLER,
-		acpibut_pressed_event, dv);
-		if (ACPI_FAILURE(rv))
-			aprint_error_dev(dv,
-			WARNING: unable to queue button pressed callback: %s\n,
-			AcpiFormatException(rv));
+		(void)AcpiOsExecute(handler, acpibut_pressed_event, dv);
 		break;
 
-	/* XXX ACPI_NOTIFY_DeviceWake?? */
-
 	default:
-		aprint_error_dev(dv, received unknown notify message: 0x%x\n,
-		notify);
+		aprint_error_dev(dv, unknown 

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

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 22:30:57 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
Remove ACPI_BUT_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/sys/arch/i386/conf/ALL

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



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

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 22:30:57 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
Remove ACPI_BUT_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/sys/arch/i386/conf/ALL

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/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.247 src/sys/arch/i386/conf/ALL:1.248
--- src/sys/arch/i386/conf/ALL:1.247	Thu Mar  4 21:55:32 2010
+++ src/sys/arch/i386/conf/ALL	Thu Mar  4 22:30:57 2010
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.247 2010/03/04 21:55:32 jruoho Exp $
+# $NetBSD: ALL,v 1.248 2010/03/04 22:30:57 jruoho Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.247 $
+#ident 		ALL-$Revision: 1.248 $
 
 maxusers	64		# estimated number of users
 
@@ -1758,7 +1758,6 @@
 options AC97_DEBUG
 options AC97_IO_DEBUG
 options ACPI_APM_DEBUG
-options ACPI_BUT_DEBUG
 #
 # ACPI_DEBUG_ALLOC can not be used with ACPI
 # kernel modules. It requires also ACPI_DEBUG.



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 22:33:12 UTC 2010

Modified Files:
src/sys/dev/cardbus: if_rtw_cardbus.c

Log Message:
Remove unnecessary #ifdef INET-enclosed #includes.

This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/cardbus/if_rtw_cardbus.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/cardbus/if_rtw_cardbus.c
diff -u src/sys/dev/cardbus/if_rtw_cardbus.c:1.38 src/sys/dev/cardbus/if_rtw_cardbus.c:1.39
--- src/sys/dev/cardbus/if_rtw_cardbus.c:1.38	Fri Feb 26 01:12:56 2010
+++ src/sys/dev/cardbus/if_rtw_cardbus.c	Thu Mar  4 22:33:12 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtw_cardbus.c,v 1.38 2010/02/26 01:12:56 dyoung Exp $ */
+/* $NetBSD: if_rtw_cardbus.c,v 1.39 2010/03/04 22:33:12 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2004, 2005 David Young.  All rights reserved.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_rtw_cardbus.c,v 1.38 2010/02/26 01:12:56 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_rtw_cardbus.c,v 1.39 2010/03/04 22:33:12 dyoung Exp $);
 
 #include opt_inet.h
 
@@ -89,12 +89,6 @@
 #include net80211/ieee80211_radiotap.h
 #include net80211/ieee80211_var.h
 
-#ifdef INET
-#include netinet/in.h
-#include netinet/if_inarp.h
-#endif
-
-
 #include sys/bus.h
 #include sys/intr.h
 
@@ -246,10 +240,6 @@
 		RTW_DPRINTF(RTW_DEBUG_ATTACH,
 		(%s: %s mapped % PRIuMAX  bytes mem space\n,
 		 device_xname(self), __func__, (uintmax_t)regs-r_sz));
-#if rbus
-#else
-		(*ct-ct_cf-cardbus_mem_open)(cc, 0, adr, adr+csc-sc_mapsize);
-#endif
 		csc-sc_csr |= PCI_COMMAND_MEM_ENABLE;
 		csc-sc_bar_reg = RTW_PCI_MMBA;
 		csc-sc_bar_val = adr | PCI_MAPREG_TYPE_MEM;
@@ -258,10 +248,6 @@
 		RTW_DPRINTF(RTW_DEBUG_ATTACH,
 		(%s: %s mapped % PRIuMAX  bytes I/O space\n,
 		 device_xname(self), __func__, (uintmax_t)regs-r_sz));
-#if rbus
-#else
-		(*ct-ct_cf-cardbus_io_open)(cc, 0, adr, adr+csc-sc_mapsize);
-#endif
 		csc-sc_csr |= PCI_COMMAND_IO_ENABLE;
 		csc-sc_bar_reg = RTW_PCI_IOBA;
 		csc-sc_bar_val = adr | PCI_MAPREG_TYPE_IO;



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 22:33:12 UTC 2010

Modified Files:
src/sys/dev/cardbus: if_rtw_cardbus.c

Log Message:
Remove unnecessary #ifdef INET-enclosed #includes.

This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/cardbus/if_rtw_cardbus.c

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



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 22:42:22 UTC 2010

Modified Files:
src/sys/dev/cardbus: cardbus_map.c

Log Message:
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/cardbus/cardbus_map.c

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



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 22:42:22 UTC 2010

Modified Files:
src/sys/dev/cardbus: cardbus_map.c

Log Message:
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/cardbus/cardbus_map.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/cardbus/cardbus_map.c
diff -u src/sys/dev/cardbus/cardbus_map.c:1.34 src/sys/dev/cardbus/cardbus_map.c:1.35
--- src/sys/dev/cardbus/cardbus_map.c:1.34	Fri Feb 26 00:57:01 2010
+++ src/sys/dev/cardbus/cardbus_map.c	Thu Mar  4 22:42:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cardbus_map.c,v 1.34 2010/02/26 00:57:01 dyoung Exp $	*/
+/*	$NetBSD: cardbus_map.c,v 1.35 2010/03/04 22:42:22 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1999 and 2000
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cardbus_map.c,v 1.34 2010/02/26 00:57:01 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: cardbus_map.c,v 1.35 2010/03/04 22:42:22 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -231,9 +231,7 @@
 	cardbus_chipset_tag_t cc = sc-sc_cc;
 	cardbus_function_tag_t cf = sc-sc_cf;
 	bus_space_tag_t bustag;
-#if rbus
 	rbus_tag_t rbustag;
-#endif
 	bus_space_handle_t handle;
 	bus_addr_t base;
 	bus_size_t size;
@@ -254,20 +252,15 @@
 			status = 1;
 		}
 		bustag = sc-sc_iot;
-#if rbus
 		rbustag = sc-sc_rbus_iot;
-#endif
 	} else {
 		if (cardbus_mem_find(cc, cf, tag, reg, type, base, size, flags)){
 			status = 1;
 		}
 		bustag = sc-sc_memt;
-#if rbus
 		rbustag = sc-sc_rbus_memt;
-#endif
 	}
 	if (status == 0) {
-#if rbus
 		bus_addr_t mask = size - 1;
 		if (base != 0) {
 			mask = 0x;
@@ -276,17 +269,6 @@
 		size, busflags | flags, base, handle)) {
 			panic(io alloc);
 		}
-#else
-		bus_addr_t start = 0x8300;
-		bus_addr_t end = 0x8400;
-		if (base != 0) {
-			bus_addr_t start = base;
-			bus_addr_t end = base + size;
-		}
-		if (bus_space_alloc(bustag, start, end, size, size, 0, 0, base, handle)) {
-			panic(io alloc);
-		}
-#endif
 	}
 	cardbus_conf_write(cc, cf, tag, reg, base);
 
@@ -332,7 +314,6 @@
 	cardbus_function_tag_t cf = sc-sc_cf;
 	int st = 1;
 	pcitag_t cardbustag;
-#if rbus
 	rbus_tag_t rbustag;
 
 	if (sc-sc_iot == tag) {
@@ -346,15 +327,12 @@
 	} else {
 		return 1;
 	}
-#endif
 
 	cardbustag = cardbus_make_tag(cc, cf, sc-sc_bus, func);
 
 	cardbus_conf_write(cc, cf, cardbustag, reg, 0);
 
-#if rbus
 	(*cf-cardbus_space_free)(cc, rbustag, handle, size);
-#endif
 
 	return st;
 }



CVS commit: src/lib/libc/stdlib

2010-03-04 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Thu Mar  4 22:48:31 UTC 2010

Modified Files:
src/lib/libc/stdlib: jemalloc.c

Log Message:
Fix race condition on reallocation of huge category.

We need to remove the old region before mremap() since if it relesae the
old region, other thread may map it for the same huge category allocation
and insert it to the tree before we acquire a lock after mremap().

Fixes PR/42876.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/stdlib/jemalloc.c

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



CVS commit: src/sys/dev/pci

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Thu Mar  4 22:57:37 UTC 2010

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

Log Message:
Make cosmetic changes in order to reduce differences with
sys/dev/cardbus/if_rtw_cardbus.c: remove an unnecessary #include.
Change a few cut  paste instances of ADM8211 to RTL8180.  Make the
suspend  resume functions static, add declarations for them at the top
of the file, and move the functions themselves to the bottom.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_rtw_pci.c

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



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 23:25:07 UTC 2010

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

Log Message:
Remove ACPI_BUG_DEBUG by using ACPI_DEBUG_PRINT(x) instead.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/acpi/acpi.c

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



CVS commit: src/sys/dev/acpi

2010-03-04 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Mar  4 23:25:07 UTC 2010

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

Log Message:
Remove ACPI_BUG_DEBUG by using ACPI_DEBUG_PRINT(x) instead.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/acpi/acpi.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/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.153 src/sys/dev/acpi/acpi.c:1.154
--- src/sys/dev/acpi/acpi.c:1.153	Thu Mar  4 20:17:30 2010
+++ src/sys/dev/acpi/acpi.c	Thu Mar  4 23:25:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.153 2010/03/04 20:17:30 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.154 2010/03/04 23:25:07 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.153 2010/03/04 20:17:30 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.154 2010/03/04 23:25:07 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_pcifixup.h
@@ -1112,19 +1112,12 @@
 static UINT32
 acpi_fixed_button_handler(void *context)
 {
+	static const int handler = OSL_NOTIFY_HANDLER;
 	struct sysmon_pswitch *smpsw = context;
-	ACPI_STATUS rv;
 
-#ifdef ACPI_BUT_DEBUG
-	printf(%s: fixed button handler\n, smpsw-smpsw_name);
-#endif
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, %s\n, __func__));
 
-	rv = AcpiOsExecute(OSL_NOTIFY_HANDLER,
-	acpi_fixed_button_pressed, smpsw);
-	if (ACPI_FAILURE(rv))
-		printf(%s: WARNING: unable to queue fixed button pressed 
-		callback: %s\n, smpsw-smpsw_name,
-		AcpiFormatException(rv));
+	(void)AcpiOsExecute(handler, acpi_fixed_button_pressed, smpsw);
 
 	return ACPI_INTERRUPT_HANDLED;
 }
@@ -1139,10 +1132,8 @@
 {
 	struct sysmon_pswitch *smpsw = context;
 
-#ifdef ACPI_BUT_DEBUG
-	printf(%s: fixed button pressed, calling sysmon\n,
-	smpsw-smpsw_name);
-#endif
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, %s: %s fixed button pressed\n,
+		__func__, smpsw-smpsw_name));
 
 	sysmon_pswitch_event(smpsw, PSWITCH_EVENT_PRESSED);
 }



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Mar  5 00:36:06 UTC 2010

Modified Files:
src/sys/dev/cardbus: fwohci_cardbus.c

Log Message:
This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Make a few changes of this kind:

-   ih = cardbus_intr_establish(cc, cf, ...);
+   ih = Cardbus_intr_establish(ct, ...);

-   cardbus_intr_disestablish(cc, cf, ih);
+   Cardbus_intr_disestablish(ct, ih);

Tested by plugging a Syba CardBus to FireWire adapter into an HP
Pavilion N3270, adding an address (169.254.0.7/16) to fwip0, attaching
and pinging a MacBook Pro.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/cardbus/fwohci_cardbus.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/cardbus/fwohci_cardbus.c
diff -u src/sys/dev/cardbus/fwohci_cardbus.c:1.30 src/sys/dev/cardbus/fwohci_cardbus.c:1.31
--- src/sys/dev/cardbus/fwohci_cardbus.c:1.30	Fri Feb 26 00:57:01 2010
+++ src/sys/dev/cardbus/fwohci_cardbus.c	Fri Mar  5 00:36:06 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwohci_cardbus.c,v 1.30 2010/02/26 00:57:01 dyoung Exp $	*/
+/*	$NetBSD: fwohci_cardbus.c,v 1.31 2010/03/05 00:36:06 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fwohci_cardbus.c,v 1.30 2010/02/26 00:57:01 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: fwohci_cardbus.c,v 1.31 2010/03/05 00:36:06 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -115,11 +115,6 @@
 	sc-sc_cf = cf;
 	sc-sc_ct = ct;
 
-#if rbus
-#else
-XXX	(ct-ct_cf-cardbus_mem_open)(cc, 0, iob, iob + 0x40);
-#endif
-
 	/* Disable interrupts, so we don't get any spurious ones. */
 	OHCI_CSR_WRITE(sc-sc_sc, FWOHCI_INTMASKCLR, OHCI_INT_EN);
 
@@ -128,7 +123,7 @@
 	Cardbus_conf_write(ct, ca-ca_tag, PCI_COMMAND_STATUS_REG,
 	csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE);
 
-	sc-sc_ih = cardbus_intr_establish(cc, cf, ca-ca_intrline,
+	sc-sc_ih = Cardbus_intr_establish(ct, ca-ca_intrline,
 	   IPL_BIO, fwohci_filt, sc);
 	if (sc-sc_ih == NULL) {
 		aprint_error_dev(self, couldn't establish interrupt\n);
@@ -137,7 +132,7 @@
 
 	/* XXX NULL should be replaced by some call to Cardbus coed */
 	if (fwohci_init(sc-sc_sc, sc-sc_sc.fc.dev) != 0) {
-		cardbus_intr_disestablish(cc, cf, sc-sc_ih);
+		Cardbus_intr_disestablish(ct, sc-sc_ih);
 		sc-sc_ih = NULL;
 	}
 }
@@ -154,7 +149,7 @@
 	if (rv)
 		return (rv);
 	if (sc-sc_ih != NULL) {
-		cardbus_intr_disestablish(ct-ct_cc, ct-ct_cf, sc-sc_ih);
+		Cardbus_intr_disestablish(ct, sc-sc_ih);
 		sc-sc_ih = NULL;
 	}
 	if (sc-sc_sc.bssize) {



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Mar  5 00:54:01 UTC 2010

Modified Files:
src/sys/dev/cardbus: if_rtw_cardbus.c

Log Message:
Simplify this a bit (and reduce differences with if_rtw_pci.c): we
don't have to save the base address or write it to the BAR.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/cardbus/if_rtw_cardbus.c

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



CVS commit: src/sys/dev/cardbus

2010-03-04 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Fri Mar  5 00:54:01 UTC 2010

Modified Files:
src/sys/dev/cardbus: if_rtw_cardbus.c

Log Message:
Simplify this a bit (and reduce differences with if_rtw_pci.c): we
don't have to save the base address or write it to the BAR.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/cardbus/if_rtw_cardbus.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/cardbus/if_rtw_cardbus.c
diff -u src/sys/dev/cardbus/if_rtw_cardbus.c:1.39 src/sys/dev/cardbus/if_rtw_cardbus.c:1.40
--- src/sys/dev/cardbus/if_rtw_cardbus.c:1.39	Thu Mar  4 22:33:12 2010
+++ src/sys/dev/cardbus/if_rtw_cardbus.c	Fri Mar  5 00:54:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: if_rtw_cardbus.c,v 1.39 2010/03/04 22:33:12 dyoung Exp $ */
+/* $NetBSD: if_rtw_cardbus.c,v 1.40 2010/03/05 00:54:01 dyoung Exp $ */
 
 /*-
  * Copyright (c) 2004, 2005 David Young.  All rights reserved.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_rtw_cardbus.c,v 1.39 2010/03/04 22:33:12 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_rtw_cardbus.c,v 1.40 2010/03/05 00:54:01 dyoung Exp $);
 
 #include opt_inet.h
 
@@ -120,8 +120,7 @@
 		 * region
 		 */
 
-	int			sc_bar_reg;	/* which BAR to use */
-	pcireg_t		sc_bar_val;	/* value of the BAR */
+	int			sc_bar;	/* which BAR to use */
 
 	cardbus_intr_line_t	sc_intrline;	/* interrupt line */
 };
@@ -241,16 +240,14 @@
 		(%s: %s mapped % PRIuMAX  bytes mem space\n,
 		 device_xname(self), __func__, (uintmax_t)regs-r_sz));
 		csc-sc_csr |= PCI_COMMAND_MEM_ENABLE;
-		csc-sc_bar_reg = RTW_PCI_MMBA;
-		csc-sc_bar_val = adr | PCI_MAPREG_TYPE_MEM;
+		csc-sc_bar = RTW_PCI_MMBA;
 	} else if (Cardbus_mapreg_map(ct, RTW_PCI_IOBA, PCI_MAPREG_TYPE_IO,
 	0, regs-r_bt, regs-r_bh, adr, regs-r_sz) == 0) {
 		RTW_DPRINTF(RTW_DEBUG_ATTACH,
 		(%s: %s mapped % PRIuMAX  bytes I/O space\n,
 		 device_xname(self), __func__, (uintmax_t)regs-r_sz));
 		csc-sc_csr |= PCI_COMMAND_IO_ENABLE;
-		csc-sc_bar_reg = RTW_PCI_IOBA;
-		csc-sc_bar_val = adr | PCI_MAPREG_TYPE_IO;
+		csc-sc_bar = RTW_PCI_IOBA;
 	} else {
 		aprint_error_dev(self, unable to map device registers\n);
 		return;
@@ -312,8 +309,8 @@
 	/*
 	 * Release bus space and close window.
 	 */
-	if (csc-sc_bar_reg != 0)
-		Cardbus_mapreg_unmap(ct, csc-sc_bar_reg,
+	if (csc-sc_bar != 0)
+		Cardbus_mapreg_unmap(ct, csc-sc_bar,
 		regs-r_bt, regs-r_bh, regs-r_sz);
 
 	return 0;
@@ -386,9 +383,6 @@
 		Cardbus_conf_write(ct, tag, PCI_BHLC_REG, bhlc);
 	}
 
-	/* Program the BAR. */
-	Cardbus_conf_write(ct, tag, csc-sc_bar_reg, csc-sc_bar_val);
-
 	/* Enable the appropriate bits in the PCI CSR. */
 	csr = Cardbus_conf_read(ct, tag, PCI_COMMAND_STATUS_REG);
 	csr = ~(PCI_COMMAND_IO_ENABLE|PCI_COMMAND_MEM_ENABLE);



re: CVS commit: src/sys/dev/cardbus

2010-03-04 Thread matthew green

   
   On Mar 4, 2010, at 10:49 AM, David Young wrote:
   
Use %zu and %zx for printf'ing bus_size_t.
   
   These aren't quite right.  We should probably define PRIxxx macros for the 
bus.h scalar types.

infact, they're quite wrong on IPL32 systems with 64 bit bus addresses.
x86 PAE, sparc*, mips, ppc come to mind...


.mrg.


CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2010-03-04 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Fri Mar  5 01:53:15 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_open.c

Log Message:
DTrace: fix the curthread and mutex data types.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c

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



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2010-03-04 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Fri Mar  5 01:53:15 UTC 2010

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_open.c

Log Message:
DTrace: fix the curthread and mutex data types.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.3 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.4
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.3	Sun Feb 21 01:46:34 2010
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c	Fri Mar  5 01:53:15 2010
@@ -143,7 +143,6 @@
 static char	intmtx_str[MAXPATHLEN];
 static char	threadmtx_str[MAXPATHLEN];
 static char	rwlock_str[MAXPATHLEN];
-static char	sxlock_str[MAXPATHLEN];
 #endif
 
 /*
@@ -432,17 +431,6 @@
 	dt_idops_func, string(const char *, int, [int]) },
 { sum, DT_IDENT_AGGFUNC, 0, DTRACEAGG_SUM, DT_ATTR_STABCMN, DT_VERS_1_0,
 	dt_idops_func, void(@) },
-#if !defined(sun)
-{ sx_isexclusive, DT_IDENT_FUNC, 0, DIF_SUBR_SX_ISEXCLUSIVE,
-	DT_ATTR_EVOLCMN, DT_VERS_1_0,
-	dt_idops_func, sxlock_str },
-{ sx_shared_held, DT_IDENT_FUNC, 0, DIF_SUBR_SX_SHARED_HELD,
-	DT_ATTR_EVOLCMN, DT_VERS_1_0,
-	dt_idops_func, sxlock_str },
-{ sx_exclusive_held, DT_IDENT_FUNC, 0, DIF_SUBR_SX_EXCLUSIVE_HELD,
-	DT_ATTR_EVOLCMN, DT_VERS_1_0,
-	dt_idops_func, sxlock_str },
-#endif
 { sym, DT_IDENT_ACTFUNC, 0, DT_ACT_SYM, DT_ATTR_STABCMN,
 	DT_VERS_1_2, dt_idops_func, _symaddr(uintptr_t) },
 { system, DT_IDENT_ACTFUNC, 0, DT_ACT_SYSTEM, DT_ATTR_STABCMN, DT_VERS_1_0,
@@ -1251,11 +1239,10 @@
 	/*
 	 * Format the global variables based on the kernel module name.
 	 */
-	snprintf(curthread_str, sizeof(curthread_str), %s`struct thread *,p);
-	snprintf(intmtx_str, sizeof(intmtx_str), int(%s`struct mtx *),p);
-	snprintf(threadmtx_str, sizeof(threadmtx_str), struct thread *(%s`struct mtx *),p);
+	snprintf(curthread_str, sizeof(curthread_str), %s`struct lwp *,p);
+	snprintf(intmtx_str, sizeof(intmtx_str), int(%s`struct kmutex *),p);
+	snprintf(threadmtx_str, sizeof(threadmtx_str), struct lwp *(%s`struct kmutex *),p);
 	snprintf(rwlock_str, sizeof(rwlock_str), int(%s`struct rwlock *),p);
-	snprintf(sxlock_str, sizeof(sxlock_str), int(%s`struct sxlock *),p);
 	}
 #endif
 



CVS commit: src/external/cddl/osnet/dev/sdt

2010-03-04 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Fri Mar  5 02:21:41 UTC 2010

Modified Files:
src/external/cddl/osnet/dev/sdt: sdt.c

Log Message:
DTrace: add a dependency on the dtrace module.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/sdt/sdt.c

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



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

2010-03-04 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Fri Mar  5 06:47:59 UTC 2010

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: ipsec_set_policy.3
src/crypto/dist/ipsec-tools/src/racoon: privsep.c
src/crypto/dist/ipsec-tools/src/racoon/doc: FAQ
src/crypto/dist/ipsec-tools/src/setkey: setkey.8

Log Message:
From Stefan Bauer: Fix multiple typoes and manpage formatting errors.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3
cvs rdiff -u -r1.19 -r1.20 src/crypto/dist/ipsec-tools/src/racoon/privsep.c
cvs rdiff -u -r1.1.1.2 -r1.2 src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ
cvs rdiff -u -r1.22 -r1.23 src/crypto/dist/ipsec-tools/src/setkey/setkey.8

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/libipsec/ipsec_set_policy.3
diff -u src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3:1.14 src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3:1.15
--- src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3:1.14	Wed Oct 14 23:36:55 2009
+++ src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3	Fri Mar  5 06:47:58 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: ipsec_set_policy.3,v 1.14 2009/10/14 23:36:55 joerg Exp $
+.\	$NetBSD: ipsec_set_policy.3,v 1.15 2010/03/05 06:47:58 tteras Exp $
 .\
 .\	$KAME: ipsec_set_policy.3,v 1.16 2003/01/06 21:59:03 sumikawa Exp $
 .\
@@ -126,7 +126,7 @@
 .Bl -tag  -width discard
 .It Ar {priority,prio} offset
 .Ar offset
-is an integer in the range -2147483647..214783648.
+is an integer in the range \-2147483647..214783648.
 .It Ar {priority,prio} base {+,-} offset
 .Ar base
 is either

Index: src/crypto/dist/ipsec-tools/src/racoon/privsep.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/privsep.c:1.19 src/crypto/dist/ipsec-tools/src/racoon/privsep.c:1.20
--- src/crypto/dist/ipsec-tools/src/racoon/privsep.c:1.19	Tue Dec 23 14:03:12 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/privsep.c	Fri Mar  5 06:47:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: privsep.c,v 1.19 2008/12/23 14:03:12 tteras Exp $	*/
+/*	$NetBSD: privsep.c,v 1.20 2010/03/05 06:47:58 tteras Exp $	*/
 
 /* Id: privsep.c,v 1.15 2005/08/08 11:23:44 vanhu Exp */
 
@@ -1465,7 +1465,7 @@
 }
 
 /*
- * Filter unsafe environement variables
+ * Filter unsafe environment variables
  */
 static int
 unsafe_env(envp)
@@ -1486,7 +1486,7 @@
 	return 0;
 found:
 	plog(LLV_ERROR, LOCATION, NULL, 
-	privsep_script_exec: unsafe environement variable\n);
+	privsep_script_exec: unsafe environment variable\n);
 	return -1;
 }
 

Index: src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ
diff -u src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ:1.1.1.2 src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ:1.2
--- src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ:1.1.1.2	Sat Sep  9 16:12:23 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ	Fri Mar  5 06:47:58 2010
@@ -18,7 +18,7 @@
 
 A:
 	Configure both ends exactly the same.  With just a tiny little
-	differnce, you will be in trouble.
+	difference, you will be in trouble.
 
 Q: How to build racoon on my platform?
 

Index: src/crypto/dist/ipsec-tools/src/setkey/setkey.8
diff -u src/crypto/dist/ipsec-tools/src/setkey/setkey.8:1.22 src/crypto/dist/ipsec-tools/src/setkey/setkey.8:1.23
--- src/crypto/dist/ipsec-tools/src/setkey/setkey.8:1.22	Fri Jan 15 19:18:51 2010
+++ src/crypto/dist/ipsec-tools/src/setkey/setkey.8	Fri Mar  5 06:47:58 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: setkey.8,v 1.22 2010/01/15 19:18:51 joerg Exp $
+.\	$NetBSD: setkey.8,v 1.23 2010/03/05 06:47:58 tteras Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
 .\ All rights reserved.
@@ -625,7 +625,7 @@
 addresses to get the correct matching.
 Here is an example:
 .Bd -literal -offset
-spdadd 10.0.11.0/24[any] 10.0.11.33/32[any] any -P out ipsec
+spdadd 10.0.11.0/24[any] 10.0.11.33/32[any] any \-P out ipsec
 esp/tunnel/192.168.0.1[4500]-192.168.1.2[3]/require ;
 
 .Ed
@@ -761,14 +761,14 @@
 .Sh EXAMPLES
 .Bd -literal -offset
 add 3ffe:501:4819::1 3ffe:501:481d::1 esp 123457
-	-E des-cbc 0x3ffe05014819 ;
+	\-E des-cbc 0x3ffe05014819 ;
 
-add -6 myhost.example.com yourhost.example.com ah 123456
-	-A hmac-sha1 AH SA configuration! ;
+add \-6 myhost.example.com yourhost.example.com ah 123456
+	\-A hmac-sha1 AH SA configuration! ;
 
 add 10.0.11.41 10.0.11.33 esp 0x10001
-	-E des-cbc 0x3ffe05014819
-	-A hmac-md5 authentication!! ;
+	\-E des-cbc 0x3ffe05014819
+	\-A hmac-md5 authentication!! ;
 
 get 3ffe:501:4819::1 3ffe:501:481d::1 ah 123456 ;
 
@@ -777,17 +777,17 @@
 dump esp ;
 
 spdadd 10.0.11.41/32[21] 10.0.11.33/32[any] any
-	-P out ipsec esp/tunnel/192.168.0.1-192.168.1.2/require ;
+	\-P out ipsec esp/tunnel/192.168.0.1-192.168.1.2/require ;
 
-add 10.1.10.34 10.1.10.36 tcp 0x1000 -A tcp-md5 TCP-MD5 BGP secret ;
+add 10.1.10.34 

CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src

2010-03-04 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Fri Mar  5 06:51:26 UTC 2010

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec [ipsec-tools-0_7-branch]:
ipsec_set_policy.3
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
privsep.c racoon.conf.5
src/crypto/dist/ipsec-tools/src/racoon/doc [ipsec-tools-0_7-branch]:
FAQ
src/crypto/dist/ipsec-tools/src/setkey [ipsec-tools-0_7-branch]:
setkey.8

Log Message:
From Stefan Bauer: Fix multiple typoes and manpage formatting errors.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.6.1 \
src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3
cvs rdiff -u -r1.6 -r1.6.6.1 src/crypto/dist/ipsec-tools/src/racoon/privsep.c
cvs rdiff -u -r1.34.4.3 -r1.34.4.4 \
src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.6.1 \
src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ
cvs rdiff -u -r1.20 -r1.20.6.1 \
src/crypto/dist/ipsec-tools/src/setkey/setkey.8

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



CVS commit: [ipsec-tools-0_7-branch] src/crypto/dist/ipsec-tools/src

2010-03-04 Thread Timo Ter�s
Module Name:src
Committed By:   tteras
Date:   Fri Mar  5 06:51:26 UTC 2010

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec [ipsec-tools-0_7-branch]:
ipsec_set_policy.3
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
privsep.c racoon.conf.5
src/crypto/dist/ipsec-tools/src/racoon/doc [ipsec-tools-0_7-branch]:
FAQ
src/crypto/dist/ipsec-tools/src/setkey [ipsec-tools-0_7-branch]:
setkey.8

Log Message:
From Stefan Bauer: Fix multiple typoes and manpage formatting errors.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.6.1 \
src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3
cvs rdiff -u -r1.6 -r1.6.6.1 src/crypto/dist/ipsec-tools/src/racoon/privsep.c
cvs rdiff -u -r1.34.4.3 -r1.34.4.4 \
src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.6.1 \
src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ
cvs rdiff -u -r1.20 -r1.20.6.1 \
src/crypto/dist/ipsec-tools/src/setkey/setkey.8

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/libipsec/ipsec_set_policy.3
diff -u src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3:1.13 src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3:1.13.6.1
--- src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3:1.13	Sat Sep  9 16:22:09 2006
+++ src/crypto/dist/ipsec-tools/src/libipsec/ipsec_set_policy.3	Fri Mar  5 06:51:25 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: ipsec_set_policy.3,v 1.13 2006/09/09 16:22:09 manu Exp $
+.\	$NetBSD: ipsec_set_policy.3,v 1.13.6.1 2010/03/05 06:51:25 tteras Exp $
 .\
 .\	$KAME: ipsec_set_policy.3,v 1.16 2003/01/06 21:59:03 sumikawa Exp $
 .\
@@ -128,7 +128,7 @@
 .Ar {priority,prio} offset
 .Xc
 .Ar offset
-is an integer in the range -2147483647..214783648.
+is an integer in the range \-2147483647..214783648.
 .It Xo
 .Ar {priority,prio} base {+,-} offset
 .Xc

Index: src/crypto/dist/ipsec-tools/src/racoon/privsep.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/privsep.c:1.6 src/crypto/dist/ipsec-tools/src/racoon/privsep.c:1.6.6.1
--- src/crypto/dist/ipsec-tools/src/racoon/privsep.c:1.6	Sat Sep  9 16:22:10 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/privsep.c	Fri Mar  5 06:51:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: privsep.c,v 1.6 2006/09/09 16:22:10 manu Exp $	*/
+/*	$NetBSD: privsep.c,v 1.6.6.1 2010/03/05 06:51:25 tteras Exp $	*/
 
 /* Id: privsep.c,v 1.15 2005/08/08 11:23:44 vanhu Exp */
 
@@ -1089,7 +1089,7 @@
 }
 
 /*
- * Filter unsafe environement variables
+ * Filter unsafe environment variables
  */
 static int
 unsafe_env(envp)
@@ -1110,7 +1110,7 @@
 	return 0;
 found:
 	plog(LLV_ERROR, LOCATION, NULL, 
-	privsep_script_exec: unsafe environement variable\n);
+	privsep_script_exec: unsafe environment variable\n);
 	return -1;
 }
 

Index: src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5
diff -u src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.34.4.3 src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.34.4.4
--- src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.34.4.3	Mon Sep  3 18:07:29 2007
+++ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5	Fri Mar  5 06:51:25 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: racoon.conf.5,v 1.34.4.3 2007/09/03 18:07:29 mgrooms Exp $
+.\	$NetBSD: racoon.conf.5,v 1.34.4.4 2010/03/05 06:51:25 tteras Exp $
 .\
 .\	Id: racoon.conf.5,v 1.54 2006/08/22 18:17:17 manubsd Exp
 .\
@@ -819,7 +819,7 @@
 The default size is 16 bytes.
 .\
 .It Ic ph1id Ar number ;
-An optionnal number to identify the remote proposal and to link it
+An optional number to identify the remote proposal and to link it
 only with sainfos who have the same number.
 Defaults to 0.
 .\

Index: src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ
diff -u src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ:1.1.1.2 src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ:1.1.1.2.6.1
--- src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ:1.1.1.2	Sat Sep  9 16:12:23 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/doc/FAQ	Fri Mar  5 06:51:26 2010
@@ -18,7 +18,7 @@
 
 A:
 	Configure both ends exactly the same.  With just a tiny little
-	differnce, you will be in trouble.
+	difference, you will be in trouble.
 
 Q: How to build racoon on my platform?
 

Index: src/crypto/dist/ipsec-tools/src/setkey/setkey.8
diff -u src/crypto/dist/ipsec-tools/src/setkey/setkey.8:1.20 src/crypto/dist/ipsec-tools/src/setkey/setkey.8:1.20.6.1
--- src/crypto/dist/ipsec-tools/src/setkey/setkey.8:1.20	Fri Oct  6 12:02:27 2006
+++ src/crypto/dist/ipsec-tools/src/setkey/setkey.8	Fri Mar  5 06:51:26 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: setkey.8,v 1.20 2006/10/06 12:02:27 manu Exp $
+.\	$NetBSD: setkey.8,v 1.20.6.1 2010/03/05 06:51:26 tteras Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
 .\ All rights reserved.
@@ -677,7 +677,7 @@
 addresses to get the 

CVS commit: src/usr.bin/ftp

2010-03-04 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Fri Mar  5 07:41:10 UTC 2010

Modified Files:
src/usr.bin/ftp: fetch.c ftp.1 ftp.c util.c

Log Message:
Back to using 'RFC ' instead of 'RFC'


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.130 -r1.131 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.159 -r1.160 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.153 -r1.154 src/usr.bin/ftp/util.c

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



CVS commit: src/usr.bin/ftp

2010-03-04 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Fri Mar  5 07:41:10 UTC 2010

Modified Files:
src/usr.bin/ftp: fetch.c ftp.1 ftp.c util.c

Log Message:
Back to using 'RFC ' instead of 'RFC'


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.130 -r1.131 src/usr.bin/ftp/ftp.1
cvs rdiff -u -r1.159 -r1.160 src/usr.bin/ftp/ftp.c
cvs rdiff -u -r1.153 -r1.154 src/usr.bin/ftp/util.c

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

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.192 src/usr.bin/ftp/fetch.c:1.193
--- src/usr.bin/ftp/fetch.c:1.192	Thu Mar  4 21:40:53 2010
+++ src/usr.bin/ftp/fetch.c	Fri Mar  5 07:41:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.192 2010/03/04 21:40:53 lukem Exp $	*/
+/*	$NetBSD: fetch.c,v 1.193 2010/03/05 07:41:10 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fetch.c,v 1.192 2010/03/04 21:40:53 lukem Exp $);
+__RCSID($NetBSD: fetch.c,v 1.193 2010/03/05 07:41:10 lukem Exp $);
 #endif /* not lint */
 
 /*
@@ -281,7 +281,7 @@
 
 
 /*
- * Parse URL of form (per RFC3986):
+ * Parse URL of form (per RFC 3986):
  *	type://[user[:password]...@]host[:port][/path]
  * Returns -1 if a parse error occurred, otherwise 0.
  * It's the caller's responsibility to url_decode() the returned
@@ -291,7 +291,7 @@
  * malloc(3)ed strings of the relevant section, and port to
  * the number given, or ftpport if ftp://, or httpport if http://.
  *
- * XXX: this is not totally RFC3986 compliant; path will have the
+ * XXX: this is not totally RFC 3986 compliant; path will have the
  * leading `/' unless it's an ftp:// URL, as this makes things easier
  * for file:// and http:// URLs.  ftp:// URLs have the `/' between the
  * host and the URL-path removed, but any additional leading slashes
@@ -394,7 +394,7 @@
 #ifdef INET6
 			/*
 			 * Check if thost is an encoded IPv6 address, as per
-			 * RFC3986:
+			 * RFC 3986:
 			 *	`[' ipv6-address ']'
 			 */
 	if (*thost == '[') {
@@ -1520,12 +1520,12 @@
 		 * directories in one step.
 		 *
 		 * If we are dealing with an `ftp://host/path' URL
-		 * (urltype is FTP_URL_T), then RFC3986 says we need to
+		 * (urltype is FTP_URL_T), then RFC 3986 says we need to
 		 * send a separate CWD command for each unescaped /
 		 * in the path, and we have to interpret %hex escaping
 		 * *after* we find the slashes.  It's possible to get
 		 * empty components here, (from multiple adjacent
-		 * slashes in the path) and RFC3986 says that we should
+		 * slashes in the path) and RFC 3986 says that we should
 		 * still do `CWD ' (with a null argument) in such cases.
 		 *
 		 * Many ftp servers don't support `CWD ', so if there's an
@@ -1597,8 +1597,8 @@
 		fprintf(stderr,
 \n
 ftp: The `CWD ' command (without a directory), which is required by\n
- RFC3986 to support the empty directory in the URL pathname (`//'),\n
- conflicts with the server's conformance to RFC0959.\n
+ RFC 3986 to support the empty directory in the URL pathname (`//'),\n
+ conflicts with the server's conformance to RFC 959.\n
  Try the same URL without the `//' in the URL pathname.\n
 \n);
 	goto cleanup_fetch_ftp;

Index: src/usr.bin/ftp/ftp.1
diff -u src/usr.bin/ftp/ftp.1:1.130 src/usr.bin/ftp/ftp.1:1.131
--- src/usr.bin/ftp/ftp.1:1.130	Sat Jul 11 18:35:48 2009
+++ src/usr.bin/ftp/ftp.1	Fri Mar  5 07:41:10 2010
@@ -1,6 +1,6 @@
-.\ 	$NetBSD: ftp.1,v 1.130 2009/07/11 18:35:48 joerg Exp $
+.\ 	$NetBSD: ftp.1,v 1.131 2010/03/05 07:41:10 lukem Exp $
 .\
-.\ Copyright (c) 1996-2008 The NetBSD Foundation, Inc.
+.\ Copyright (c) 1996-2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ This code is derived from software contributed to The NetBSD Foundation
@@ -57,7 +57,7 @@
 .\
 .\	@(#)ftp.1	8.3 (Berkeley) 10/9/94
 .\
-.Dd May 10, 2008
+.Dd March 5, 2010
 .Dt FTP 1
 .Os
 .Sh NAME
@@ -777,7 +777,7 @@
 .Dq stream .
 .It Ic modtime Ar remote-file
 Show the last modification time of the file on the remote machine, in
-.Li RFC2822
+.Li RFC 2822
 format.
 .It Ic more Ar file
 A synonym for
@@ -998,7 +998,7 @@
 servers are required to support the
 .Dv PASV
 command by
-.Li RFC1123 ,
+.Li RFC 1123 ,
 some do not.)
 .It Ic pdir Op Ar remote-path
 Perform
@@ -1591,7 +1591,7 @@
 The default transfer type is binary.
 .Pp
 In order to be compliant with
-.Li RFC3986 ,
+.Li RFC 3986 ,
 .Nm
 interprets the
 .Ar path
@@ -1644,7 +1644,7 @@
 .Sq Li \% Ns Ar XX
 codes
 (per
-.Li RFC3986 )
+.Li RFC 3986 )
 within the path components are decoded, with
 .Ar XX
 representing a character code in hexadecimal.
@@ -2285,7 +2285,7 @@
 or
 .Sq / ) ,
 encode them with
-.Li RFC3986
+.Li RFC 3986
 .Sq Li \% Ns Ar XX
 encoding.
 .Pp
@@ -2330,23 +2330,23 @@
 .Nm
 attempts to be compliant with:
 .Bl -tag -offset indent 

CVS commit: src/usr.bin/ftp

2010-03-04 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Fri Mar  5 07:45:41 UTC 2010

Modified Files:
src/usr.bin/ftp: version.h

Log Message:
ftp 20100305: fix http date parsing


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/usr.bin/ftp/version.h

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/ftp/version.h
diff -u src/usr.bin/ftp/version.h:1.80 src/usr.bin/ftp/version.h:1.81
--- src/usr.bin/ftp/version.h:1.80	Sun Nov 15 10:03:16 2009
+++ src/usr.bin/ftp/version.h	Fri Mar  5 07:45:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.80 2009/11/15 10:03:16 lukem Exp $	*/
+/*	$NetBSD: version.h,v 1.81 2010/03/05 07:45:40 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -34,5 +34,5 @@
 #endif
 
 #ifndef FTP_VERSION
-#define	FTP_VERSION	20090915
+#define	FTP_VERSION	20100305
 #endif