CVS commit: src

2012-06-16 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sat Jun 16 14:38:55 UTC 2012

Modified Files:
src/doc: CHANGES CHANGES.prev
src/share/man/man4: urtw.4 urtwn.4

Log Message:
urtw(4) and urtwn(4) first appeared in NetBSD 6.0.


To generate a diff of this commit:
cvs rdiff -u -r1.1709 -r1.1710 src/doc/CHANGES
cvs rdiff -u -r1.106 -r1.107 src/doc/CHANGES.prev
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/urtw.4
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/urtwn.4

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.1709 src/doc/CHANGES:1.1710
--- src/doc/CHANGES:1.1709	Sun Jun 10 06:26:21 2012
+++ src/doc/CHANGES	Sat Jun 16 14:38:54 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1709 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1710 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -34,9 +34,6 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	dhcpcd(8): Import dhcpcd-5.5.5 [roy 20120323]
 	ipf: upgrade to 5.1.1 with new build framework, no module and
 		test support yet [christos 20120323]
-	kernel: Add urtwn(4), a driver for Realtek RTL8188CU/RTL8192CU USB IEEE
-		802.11b/g/n wireless network devices, ported from OpenBSD.
-		[nonaka 20120325]
 	pcc: upgrade to 1.1.0.DEVEL 20120325 [plunky 20120325]
 	openresolv(8): Import openresolv-3.5.1 [roy 20120327]
 	dhcpcd(8): Import dhcpcd-5.5.6 [roy 20120328]

Index: src/doc/CHANGES.prev
diff -u src/doc/CHANGES.prev:1.106 src/doc/CHANGES.prev:1.107
--- src/doc/CHANGES.prev:1.106	Sat Mar 10 16:56:33 2012
+++ src/doc/CHANGES.prev	Sat Jun 16 14:38:54 2012
@@ -1,4 +1,4 @@
-LIST OF CHANGES FROM PREVIOUS RELEASES:			$Revision: 1.106 $
+LIST OF CHANGES FROM PREVIOUS RELEASES:			$Revision: 1.107 $
 
 
 Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8:
@@ -11166,3 +11166,6 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	re(4): Add support for RTL8168E-VL. [nonaka 20120302]
 	amdtemp(4): Add support for Family 12h. [nonaka 20120302]
 	postfix(1): Add support for SQLite tables. [tron 20120304]
+	kernel: Add urtwn(4), a driver for Realtek RTL8188CU/RTL8192CU USB IEEE
+		802.11b/g/n wireless network devices, ported from OpenBSD.
+		[nonaka 20120325]

Index: src/share/man/man4/urtw.4
diff -u src/share/man/man4/urtw.4:1.2 src/share/man/man4/urtw.4:1.3
--- src/share/man/man4/urtw.4:1.2	Wed May 30 20:15:56 2012
+++ src/share/man/man4/urtw.4	Sat Jun 16 14:38:54 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: urtw.4,v 1.2 2012/05/30 20:15:56 wiz Exp $
+.\	$NetBSD: urtw.4,v 1.3 2012/06/16 14:38:54 nonaka Exp $
 .\ Copyright (c) 2008 Weongyo Jeong
 .\ All rights reserved.
 .\
@@ -105,7 +105,7 @@ The
 device driver first appeared in
 .Fx 8.0
 and
-.Nx 7.0 .
+.Nx 6.0 .
 .Sh AUTHORS
 .An -nosplit
 The

Index: src/share/man/man4/urtwn.4
diff -u src/share/man/man4/urtwn.4:1.4 src/share/man/man4/urtwn.4:1.5
--- src/share/man/man4/urtwn.4:1.4	Thu Jun 14 04:14:36 2012
+++ src/share/man/man4/urtwn.4	Sat Jun 16 14:38:54 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: urtwn.4,v 1.4 2012/06/14 04:14:36 riz Exp $
+.\ $NetBSD: urtwn.4,v 1.5 2012/06/16 14:38:54 nonaka Exp $
 .\ $OpenBSD: urtwn.4,v 1.15 2011/11/26 06:39:33 ckuethe Exp $
 .\
 .\ Copyright (c) 2010 Damien Bergamini damien.bergam...@free.fr
@@ -161,7 +161,7 @@ The
 device driver first appeared in
 .Ox 4.9
 and in
-.Nx 7.0 .
+.Nx 6.0 .
 .Sh AUTHORS
 .An -nosplit
 The



CVS commit: src/sys/arch/amd64/amd64

2012-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 16 16:42:27 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
Annotate tautological if, so that clang doesn't warn about the dt usage
later on.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/arch/amd64/amd64/machdep.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.184 src/sys/arch/amd64/amd64/machdep.c:1.185
--- src/sys/arch/amd64/amd64/machdep.c:1.184	Tue Jun 12 22:16:05 2012
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Jun 16 16:42:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.184 2012/06/12 22:16:05 bouyer Exp $	*/
+/*	$NetBSD: machdep.c,v 1.185 2012/06/16 16:42:26 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.184 2012/06/12 22:16:05 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.185 2012/06/16 16:42:26 joerg Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -2206,6 +2206,7 @@ memseg_baseaddr(struct lwp *l, uint64_t 
 	} else {
 		if (seg != GUDATA_SEL || seg != GUDATA32_SEL)
 			return EINVAL;
+		__builtin_unreachable();
 	}
 
 	sdp = (struct mem_segment_descriptor *)(dt + off);



CVS commit: src

2012-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 16 17:01:04 UTC 2012

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/comp: ad.powerpc md.amd64 md.i386
src/etc/mtree: NetBSD.dist.base
src/external/bsd/llvm: Makefile.inc
src/external/bsd/llvm/bin/tblgen: Makefile
src/external/bsd/llvm/config/clang/Config: config.h
src/external/bsd/llvm/config/llvm/Config: config.h
src/external/bsd/llvm/include: Makefile
src/external/bsd/llvm/lib/libLLVMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMMipsCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMPowerPCCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMScalarOpts: Makefile
src/external/bsd/llvm/lib/libclangRewrite: Makefile
src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers: Makefile
src/external/bsd/llvm/lib/libclangTooling: Makefile
src/tools/llvm: Makefile

Log Message:
Update LLVM/Clang snapshot to r158533. This brings in support for
stack-realignment in functions using alloca on x86. Move to
/usr/include/clang-3.2 to reflect the version.


To generate a diff of this commit:
cvs rdiff -u -r1.997 -r1.998 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/comp/ad.powerpc
cvs rdiff -u -r1.165 -r1.166 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.124 -r1.125 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.101 -r1.102 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.35 -r1.36 src/external/bsd/llvm/Makefile.inc
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/llvm/bin/tblgen/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/config/clang/Config/config.h
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/llvm/config/llvm/Config/config.h
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/llvm/include/Makefile
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/llvm/lib/libLLVMCodeGen/Makefile
cvs rdiff -u -r1.9 -r1.10 \
src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/llvm/lib/libLLVMPowerPCCodeGen/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/llvm/lib/libclangRewrite/Makefile
cvs rdiff -u -r1.13 -r1.14 \
src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/lib/libclangTooling/Makefile
cvs rdiff -u -r1.13 -r1.14 src/tools/llvm/Makefile

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.997 src/distrib/sets/lists/base/mi:1.998
--- src/distrib/sets/lists/base/mi:1.997	Thu Jun 14 04:14:35 2012
+++ src/distrib/sets/lists/base/mi	Sat Jun 16 17:01:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.997 2012/06/14 04:14:35 riz Exp $
+# $NetBSD: mi,v 1.998 2012/06/16 17:01:02 joerg Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -782,7 +782,8 @@
 ./usr/include/altqbase-c-usr
 ./usr/include/arpabase-c-usr
 ./usr/include/cdkbase-obsolete		obsolete
-./usr/include/clang-3.0base-c-usr
+./usr/include/clang-3.0base-obsolete		obsolete
+./usr/include/clang-3.2base-c-usr
 ./usr/include/compatbase-obsolete		obsolete
 ./usr/include/cryptobase-c-usr
 ./usr/include/devbase-c-usr

Index: src/distrib/sets/lists/comp/ad.powerpc
diff -u src/distrib/sets/lists/comp/ad.powerpc:1.58 src/distrib/sets/lists/comp/ad.powerpc:1.59
--- src/distrib/sets/lists/comp/ad.powerpc:1.58	Wed Oct 12 04:17:33 2011
+++ src/distrib/sets/lists/comp/ad.powerpc	Sat Jun 16 17:01:02 2012
@@ -1,8 +1,9 @@
-# $NetBSD: ad.powerpc,v 1.58 2011/10/12 04:17:33 mrg Exp $
+# $NetBSD: ad.powerpc,v 1.59 2012/06/16 17:01:02 joerg Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
 ./usr/bin/psim	comp-debug-bin		gdb
 ./usr/include/altivec.hcomp-obsolete		obsolete
-./usr/include/clang-3.0/altivec.h		comp-c-include		llvm
+./usr/include/clang-3.0/altivec.h		comp-obsolete		obsolete
+./usr/include/clang-3.2/altivec.h		comp-c-include		llvm
 ./usr/include/gcc-4.1/altivec.h			comp-c-include		gcccmds,gcc=4
 ./usr/include/gcc-4.1/altivec.h			comp-obsolete		gcc=45,obsolete
 ./usr/include/gcc-4.5/altivec.h			comp-c-include		gcccmds,gcc=45

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.165 src/distrib/sets/lists/comp/md.amd64:1.166
--- src/distrib/sets/lists/comp/md.amd64:1.165	Tue Jun  5 00:37:52 2012
+++ src/distrib/sets/lists/comp/md.amd64	Sat Jun 16 17:01:03 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.165 2012/06/05 00:37:52 christos Exp $
+# $NetBSD: md.amd64,v 1.166 2012/06/16 17:01:03 joerg Exp $
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -67,25 +67,47 @@

CVS commit: src/external/bsd/atf/usr.bin

2012-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 16 17:02:33 UTC 2012

Modified Files:
src/external/bsd/atf/usr.bin/atf-report: Makefile
src/external/bsd/atf/usr.bin/atf-run: Makefile

Log Message:
Don't bail out on unused private fields.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/usr.bin/atf-report/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/atf/usr.bin/atf-run/Makefile

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

Modified files:

Index: src/external/bsd/atf/usr.bin/atf-report/Makefile
diff -u src/external/bsd/atf/usr.bin/atf-report/Makefile:1.5 src/external/bsd/atf/usr.bin/atf-report/Makefile:1.6
--- src/external/bsd/atf/usr.bin/atf-report/Makefile:1.5	Sun Feb 20 20:18:57 2011
+++ src/external/bsd/atf/usr.bin/atf-report/Makefile	Sat Jun 16 17:02:33 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2011/02/20 20:18:57 jmmv Exp $
+# $NetBSD: Makefile,v 1.6 2012/06/16 17:02:33 joerg Exp $
 
 .include bsd.own.mk
 
@@ -18,4 +18,6 @@ CPPFLAGS+=	-I${SRCDIR}
 
 WARNS?=		2
 
+CWARNFLAGS.clang+=	-Wno-error=unused-private-field
+
 .include bsd.prog.mk

Index: src/external/bsd/atf/usr.bin/atf-run/Makefile
diff -u src/external/bsd/atf/usr.bin/atf-run/Makefile:1.10 src/external/bsd/atf/usr.bin/atf-run/Makefile:1.11
--- src/external/bsd/atf/usr.bin/atf-run/Makefile:1.10	Thu Mar 31 16:45:45 2011
+++ src/external/bsd/atf/usr.bin/atf-run/Makefile	Sat Jun 16 17:02:33 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2011/03/31 16:45:45 jmmv Exp $
+# $NetBSD: Makefile,v 1.11 2012/06/16 17:02:33 joerg Exp $
 
 .include bsd.own.mk
 
@@ -20,6 +20,8 @@ CPPFLAGS+=	-I${.CURDIR}/../../lib/libatf
 LDADD+=		-latf-c++ -latf-c
 DPADD+=		${LIBATF_CXX} ${LIBATF_C}
 
+CWARNFLAGS.clang+=	-Wno-error=unused-private-field
+
 COPTS.atf-run.cpp+=	-Wno-stack-protector
 
 WARNS?=		2



CVS commit: src/sys/arch

2012-06-16 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Jun 16 17:30:19 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: locore.S
src/sys/arch/i386/i386: locore.S
src/sys/arch/x86/include: cpu.h
src/sys/arch/x86/x86: identcpu.c

Log Message:
rename the global variable cpu to cputype to avoid conflicting with
dtrace, which wants to use cpu as a local variable.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x86/x86/identcpu.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/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.68 src/sys/arch/amd64/amd64/locore.S:1.69
--- src/sys/arch/amd64/amd64/locore.S:1.68	Thu Apr 19 18:00:34 2012
+++ src/sys/arch/amd64/amd64/locore.S	Sat Jun 16 17:30:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.68 2012/04/19 18:00:34 jym Exp $	*/
+/*	$NetBSD: locore.S,v 1.69 2012/06/16 17:30:19 chs Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -236,9 +236,9 @@ _C_LABEL(lapic_isr):
 	.globl	_C_LABEL(bootinfo),_C_LABEL(atdevbase)
 	.globl	_C_LABEL(PDPpaddr)
 	.globl	_C_LABEL(biosbasemem),_C_LABEL(biosextmem)
-	.globl	_C_LABEL(gdtstore),_C_LABEL(cpu)
+	.globl	_C_LABEL(gdtstore),_C_LABEL(cputype)
 
-_C_LABEL(cpu):		.long	0	# are we 386, 386sx, or 486,
+_C_LABEL(cputype):	.long	0	# are we 386, 386sx, or 486,
 	#   or Pentium, or..
 _C_LABEL(cpu_id):	.long	0	# saved from `cpuid' instruction
 _C_LABEL(cpuid_level):	.long	-1	# max. level accepted by 'cpuid'

Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.99 src/sys/arch/i386/i386/locore.S:1.100
--- src/sys/arch/i386/i386/locore.S:1.99	Thu Apr 19 18:07:05 2012
+++ src/sys/arch/i386/i386/locore.S	Sat Jun 16 17:30:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.99 2012/04/19 18:07:05 jym Exp $	*/
+/*	$NetBSD: locore.S,v 1.100 2012/06/16 17:30:19 chs Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -129,7 +129,7 @@
  */
 
 #include machine/asm.h
-__KERNEL_RCSID(0, $NetBSD: locore.S,v 1.99 2012/04/19 18:07:05 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: locore.S,v 1.100 2012/06/16 17:30:19 chs Exp $);
 
 #include opt_compat_oldboot.h
 #include opt_ddb.h
@@ -196,7 +196,7 @@ __KERNEL_RCSID(0, $NetBSD: locore.S,v 1
  */
 	.data
 
-	.globl	_C_LABEL(cpu)
+	.globl	_C_LABEL(cputype)
 	.globl	_C_LABEL(cpuid_level)
 	.globl	_C_LABEL(esym)
 	.globl	_C_LABEL(eblob)
@@ -229,7 +229,7 @@ _C_LABEL(lapic_tpr):
 	.long 0
 #endif
 
-_C_LABEL(cpu):		.long	0	# are we 80486, Pentium, or..
+_C_LABEL(cputype):	.long	0	# are we 80486, Pentium, or..
 _C_LABEL(cpuid_level):	.long	0
 _C_LABEL(atdevbase):	.long	0	# location of start of iomem in virtual
 _C_LABEL(lwp0uarea):	.long	0
@@ -346,11 +346,11 @@ isnx586:
 	 * Don't try cpuid, as Nx586s reportedly don't support the
 	 * PSL_ID bit.
 	 */
-	movl	$CPU_NX586,RELOC(cpu)
+	movl	$CPU_NX586,RELOC(cputype)
 	jmp	2f
 
 is386:
-	movl	$CPU_386,RELOC(cpu)
+	movl	$CPU_386,RELOC(cputype)
 	jmp	2f
 
 try486:	/* Try to toggle identification flag; does not exist on early 486s. */
@@ -369,7 +369,7 @@ try486:	/* Try to toggle identification 
 
 	testl	%eax,%eax
 	jnz	try586
-is486:	movl	$CPU_486,RELOC(cpu)
+is486:	movl	$CPU_486,RELOC(cputype)
 	/*
 	 * Check Cyrix CPU
 	 * Cyrix CPUs do not change the undefined flags following
@@ -387,7 +387,7 @@ is486:	movl	$CPU_486,RELOC(cpu)
 	popfl
 	jmp 2f
 trycyrix486:
-	movl	$CPU_6x86,RELOC(cpu) 	# set CPU type
+	movl	$CPU_6x86,RELOC(cputype)	# set CPU type
 	/*
 	 * Check for Cyrix 486 CPU by seeing if the flags change during a
 	 * divide. This is documented in the Cx486SLC/e SMM Programmer's
@@ -405,7 +405,7 @@ trycyrix486:
 	xorl	%ecx,%eax		# are the flags different?
 	testl	$0x8d5,%eax		# only check C|PF|AF|Z|N|V
 	jne	2f			# yes; must be Cyrix 6x86 CPU
-	movl	$CPU_486DLC,RELOC(cpu) 	# set CPU type
+	movl	$CPU_486DLC,RELOC(cputype) 	# set CPU type
 
 #ifndef CYRIX_CACHE_WORKS
 	/* Disable caching of the ISA hole only. */

Index: src/sys/arch/x86/include/cpu.h
diff -u src/sys/arch/x86/include/cpu.h:1.50 src/sys/arch/x86/include/cpu.h:1.51
--- src/sys/arch/x86/include/cpu.h:1.50	Fri Apr 20 22:23:24 2012
+++ src/sys/arch/x86/include/cpu.h	Sat Jun 16 17:30:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.50 2012/04/20 22:23:24 rmind Exp $	*/
+/*	$NetBSD: cpu.h,v 1.51 2012/06/16 17:30:18 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -360,7 +360,7 @@ struct timeval;
 
 extern int biosbasemem;
 extern int biosextmem;
-extern int cpu;
+extern int cputype;
 extern int cpuid_level;
 extern int cpu_class;
 extern char cpu_brand_string[];

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.31 src/sys/arch/x86/x86/identcpu.c:1.32
--- 

CVS commit: src/external/cddl/osnet

2012-06-16 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sat Jun 16 17:31:47 UTC 2012

Modified Files:
src/external/cddl/osnet/dev/dtrace: dtrace_debug.c
src/external/cddl/osnet/dev/dtrace/amd64: dtrace_subr.c
src/external/cddl/osnet/dev/dtrace/i386: dtrace_subr.c
src/external/cddl/osnet/dev/fbt: fbt.c
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c

Log Message:
reduce diff to freebsd:
rename xcpu back to cpu now that the conflicting global variable
has been renamed out of the way.  this also fixes some cases
where references to the local variable cpu had not been renamed
and thus were accidentally referring to the former global cpu.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/dtrace/dtrace_debug.c
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c
cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/dev/fbt/fbt.c
cvs rdiff -u -r1.19 -r1.20 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.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/dev/dtrace/dtrace_debug.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_debug.c:1.4 src/external/cddl/osnet/dev/dtrace/dtrace_debug.c:1.5
--- src/external/cddl/osnet/dev/dtrace/dtrace_debug.c:1.4	Wed Aug 31 21:57:16 2011
+++ src/external/cddl/osnet/dev/dtrace/dtrace_debug.c	Sat Jun 16 17:31:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_debug.c,v 1.4 2011/08/31 21:57:16 christos Exp $	*/
+/*	$NetBSD: dtrace_debug.c,v 1.5 2012/06/16 17:31:47 chs Exp $	*/
 
 /*-
  * Copyright (C) 2008 John Birrell j...@freebsd.org.
@@ -94,17 +94,17 @@ static char dtrace_debug_bufr[DTRACE_DEB
 static volatile u_long	dtrace_debug_flag[MAXCPUS];
 
 static void
-dtrace_debug_lock(int xcpu)
+dtrace_debug_lock(int cpu)
 {
-	while (dtrace_cmpset_long(dtrace_debug_flag[xcpu], 0, 1) == 0)
+	while (dtrace_cmpset_long(dtrace_debug_flag[cpu], 0, 1) == 0)
 		/* Loop until the lock is obtained. */
 		;
 }
 
 static void
-dtrace_debug_unlock(int xcpu)
+dtrace_debug_unlock(int cpu)
 {
-	dtrace_debug_flag[xcpu] = 0;
+	dtrace_debug_flag[cpu] = 0;
 }
 
 static void

Index: src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c
diff -u src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.6 src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.7
--- src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.6	Mon Jun 11 15:18:05 2012
+++ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c	Sat Jun 16 17:31:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_subr.c,v 1.6 2012/06/11 15:18:05 chs Exp $	*/
+/*	$NetBSD: dtrace_subr.c,v 1.7 2012/06/16 17:31:47 chs Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -129,11 +129,11 @@ xcall_func(void *arg0, void *arg1)
 }
 
 void
-dtrace_xcall(processorid_t xcpu, dtrace_xcall_t func, void *arg)
+dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg)
 {
 	uint64_t where;
 
-	if (xcpu == DTRACE_CPUALL) {
+	if (cpu == DTRACE_CPUALL) {
 		where = xc_broadcast(0, xcall_func, func, arg);
 	} else {
 		struct cpu_info *cinfo = cpu_lookup(cpu);

Index: src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c
diff -u src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.6 src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.7
--- src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.6	Fri Sep  9 17:48:39 2011
+++ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c	Sat Jun 16 17:31:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_subr.c,v 1.6 2011/09/09 17:48:39 christos Exp $	*/
+/*	$NetBSD: dtrace_subr.c,v 1.7 2012/06/16 17:31:47 chs Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -131,11 +131,11 @@ xcall_func(void *arg0, void *arg1)
 }
 
 void
-dtrace_xcall(processorid_t xcpu, dtrace_xcall_t func, void *arg)
+dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg)
 {
 	uint64_t where;
 
-	if (xcpu == DTRACE_CPUALL) {
+	if (cpu == DTRACE_CPUALL) {
 		where = xc_broadcast(0, xcall_func, func, arg);
 	} else {
 		struct cpu_info *cinfo = cpu_lookup(cpu);

Index: src/external/cddl/osnet/dev/fbt/fbt.c
diff -u src/external/cddl/osnet/dev/fbt/fbt.c:1.10 src/external/cddl/osnet/dev/fbt/fbt.c:1.11
--- src/external/cddl/osnet/dev/fbt/fbt.c:1.10	Wed Oct 19 10:55:50 2011
+++ src/external/cddl/osnet/dev/fbt/fbt.c	Sat Jun 16 17:31:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fbt.c,v 1.10 2011/10/19 10:55:50 yamt Exp $	*/
+/*	$NetBSD: fbt.c,v 1.11 2012/06/16 17:31:47 chs Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -182,7 +182,7 @@ fbt_doubletrap(void)
 static int
 fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval)
 {
-	solaris_cpu_t *xcpu = solaris_cpu[cpu_number()];
+	solaris_cpu_t *cpu = solaris_cpu[cpu_number()];
 	uintptr_t stack0, stack1, stack2, stack3, stack4;
 	fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)];
 
@@ -199,7 +199,7 @@ fbt_invop(uintptr_t 

CVS commit: src/lib/csu

2012-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 16 18:19:39 UTC 2012

Modified Files:
src/lib/csu: Makefile

Log Message:
Allow USE_COMPILERCRTSTUFF=yes for platforms that use MACHINE_CPU !=
MACHINE_ARCH.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/csu/Makefile

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

Modified files:

Index: src/lib/csu/Makefile
diff -u src/lib/csu/Makefile:1.29 src/lib/csu/Makefile:1.30
--- src/lib/csu/Makefile:1.29	Mon Jan 31 17:54:20 2011
+++ src/lib/csu/Makefile	Sat Jun 16 18:19:39 2012
@@ -1,12 +1,17 @@
-#	$NetBSD: Makefile,v 1.29 2011/01/31 17:54:20 drochner Exp $
+#	$NetBSD: Makefile,v 1.30 2012/06/16 18:19:39 joerg Exp $
 
 .include bsd.own.mk
 
-CSU_MACHINE_ARCH?=	${MACHINE_ARCH}
-
 .if ${USE_COMPILERCRTSTUFF} != yes
 
-ARCHDIR:=	${.CURDIR}/arch/${CSU_MACHINE_ARCH}
+.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc)
+ARCHDIR:=	${.CURDIR}/arch/${MACHINE_ARCH}
+.elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc)
+ARCHDIR:=	${.CURDIR}/arch/${MACHINE_CPU}
+.else
+.error Architecture (${MACHINE_ARCH} or ${MACHINE_CPU}) unsupported
+.endif
+
 .PATH:	${ARCHDIR}
 .  include ${ARCHDIR}/Makefile.inc
 
@@ -14,6 +19,8 @@ ARCHDIR:=	${.CURDIR}/arch/${CSU_MACHINE_
 
 .else
 
+CSU_MACHINE_ARCH?=	${MACHINE_ARCH}
+
 .  if exists(${CSU_MACHINE_ARCH}_elf/Makefile)
 SUBDIR=	${CSU_MACHINE_ARCH}_elf
 .  elif exists(${CSU_MACHINE_ARCH}/Makefile)



CVS commit: src/lib/csu

2012-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 16 19:19:14 UTC 2012

Modified Files:
src/lib/csu: Makefile

Log Message:
Unbreak compat.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/csu/Makefile

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

Modified files:

Index: src/lib/csu/Makefile
diff -u src/lib/csu/Makefile:1.30 src/lib/csu/Makefile:1.31
--- src/lib/csu/Makefile:1.30	Sat Jun 16 18:19:39 2012
+++ src/lib/csu/Makefile	Sat Jun 16 19:19:14 2012
@@ -1,17 +1,23 @@
-#	$NetBSD: Makefile,v 1.30 2012/06/16 18:19:39 joerg Exp $
+#	$NetBSD: Makefile,v 1.31 2012/06/16 19:19:14 joerg Exp $
 
 .include bsd.own.mk
 
 .if ${USE_COMPILERCRTSTUFF} != yes
 
-.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc)
-ARCHDIR:=	${.CURDIR}/arch/${MACHINE_ARCH}
+.if defined(CSU_MACHINE_ARCH)
+.  if !exists(${.CURDIR}/arch/${CSU_MACHINE_ARCH}/Makefile.inc)
+.  error CSU_MACHINE_ARCH (${CSU_MACHINE_ARCH}) is unsupported
+.  endif
+.elif exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc)
+CSU_MACHINE_ARCH=	${MACHINE_ARCH}
 .elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc)
-ARCHDIR:=	${.CURDIR}/arch/${MACHINE_CPU}
+CSU_MACHINE_ARCH=	${MACHINE_CPU}
 .else
 .error Architecture (${MACHINE_ARCH} or ${MACHINE_CPU}) unsupported
 .endif
 
+ARCHDIR:=	${.CURDIR}/arch/${CSU_MACHINE_ARCH}
+
 .PATH:	${ARCHDIR}
 .  include ${ARCHDIR}/Makefile.inc
 



CVS commit: src/sys/dev/pci/ixgbe

2012-06-16 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Jun 16 19:54:01 UTC 2012

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

Log Message:
Add explicit (void *) casts for when sysctl_createv() is passed
CTLTYPE_INT but the address of a structure (and a function).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ixgbe/ixgbe.c

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

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.3 src/sys/dev/pci/ixgbe/ixgbe.c:1.4
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.3	Sat Jun  2 21:36:45 2012
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Sat Jun 16 19:54:01 2012
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/
-/*$NetBSD: ixgbe.c,v 1.3 2012/06/02 21:36:45 dsl Exp $*/
+/*$NetBSD: ixgbe.c,v 1.4 2012/06/16 19:54:01 dsl Exp $*/
 
 #include opt_inet.h
 
@@ -5468,14 +5468,14 @@ ixgbe_add_hw_stats(struct adapter *adapt
 		if (sysctl_createv(log, 0, rnode, cnode,
 		CTLFLAG_READONLY, CTLTYPE_INT,
 		txd_head, SYSCTL_DESCR(Transmit Descriptor Head),
-		ixgbe_sysctl_tdh_handler, 0, txr,
+		ixgbe_sysctl_tdh_handler, 0, (void *)txr,
 		0, CTL_CREATE, CTL_EOL) != 0)
 			break;
 
 		if (sysctl_createv(log, 0, rnode, cnode,
 		CTLFLAG_READONLY, CTLTYPE_INT,
 		txd_tail, SYSCTL_DESCR(Transmit Descriptor Tail),
-		ixgbe_sysctl_tdt_handler, 0, txr,
+		ixgbe_sysctl_tdt_handler, 0, (void *)txr,
 		0, CTL_CREATE, CTL_EOL) != 0)
 			break;
 
@@ -5494,7 +5494,7 @@ ixgbe_add_hw_stats(struct adapter *adapt
 		CTLFLAG_READONLY,
 		CTLTYPE_INT,
 		rxd_head, SYSCTL_DESCR(Receive Descriptor Head),
-		ixgbe_sysctl_rdh_handler, 0, rxr, 0,
+		ixgbe_sysctl_rdh_handler, 0, (void *)rxr, 0,
 		CTL_CREATE, CTL_EOL) != 0)
 			break;
 
@@ -5502,7 +5502,7 @@ ixgbe_add_hw_stats(struct adapter *adapt
 		CTLFLAG_READONLY,
 		CTLTYPE_INT,
 		rxd_tail, SYSCTL_DESCR(Receive Descriptor Tail),
-		ixgbe_sysctl_rdt_handler, 0, rxr, 0,
+		ixgbe_sysctl_rdt_handler, 0, (void *)rxr, 0,
 		CTL_CREATE, CTL_EOL) != 0)
 			break;
 



CVS commit: src/sys/arch/amd64

2012-06-16 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Jun 16 20:47:04 UTC 2012

Modified Files:
src/sys/arch/amd64/amd64: machdep.c
src/sys/arch/amd64/include: segments.h

Log Message:
memseg_baseaddr() is only called from valid_user_selector() and
both only locally.
Make static, remove one of the functions, and remove the never-set args.
Code is still very dubious.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/include/segments.h

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

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.185 src/sys/arch/amd64/amd64/machdep.c:1.186
--- src/sys/arch/amd64/amd64/machdep.c:1.185	Sat Jun 16 16:42:26 2012
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Jun 16 20:47:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.185 2012/06/16 16:42:26 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.186 2012/06/16 20:47:04 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.185 2012/06/16 16:42:26 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.186 2012/06/16 20:47:04 dsl Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -332,6 +332,8 @@ int dumpsys_seg(paddr_t, paddr_t);
 
 void	init_x86_64(paddr_t);
 
+static int valid_user_selector(struct lwp *, uint64_t);
+
 /*
  * Machine-dependent startup code
  */
@@ -2093,28 +2095,28 @@ cpu_mcontext_validate(struct lwp *l, con
 		return EINVAL;
 
 	if (__predict_false(pmap-pm_ldt != NULL)) {
-		error = valid_user_selector(l, gr[_REG_ES], NULL, 0);
+		error = valid_user_selector(l, gr[_REG_ES]);
 		if (error != 0)
 			return error;
 
-		error = valid_user_selector(l, gr[_REG_FS], NULL, 0);
+		error = valid_user_selector(l, gr[_REG_FS]);
 		if (error != 0)
 			return error;
 
-		error = valid_user_selector(l, gr[_REG_GS], NULL, 0);
+		error = valid_user_selector(l, gr[_REG_GS]);
 		if (error != 0)
 			return error;
 
 		if ((gr[_REG_DS]  0x) == 0)
 			return EINVAL;
-		error = valid_user_selector(l, gr[_REG_DS], NULL, 0);
+		error = valid_user_selector(l, gr[_REG_DS]);
 		if (error != 0)
 			return error;
 
 #ifndef XEN
 		if ((gr[_REG_SS]  0x) == 0)
 			return EINVAL;
-		error = valid_user_selector(l, gr[_REG_SS], NULL, 0);
+		error = valid_user_selector(l, gr[_REG_SS]);
 		if (error != 0)
 			return error;
 #endif
@@ -2169,9 +2171,8 @@ cpu_initclocks(void)
 	(*initclock_func)();
 }
 
-int
-memseg_baseaddr(struct lwp *l, uint64_t seg, char *ldtp, int llen,
-		uint64_t *addr)
+static int
+valid_user_selector(struct lwp *l, uint64_t seg)
 {
 	int off, len;
 	char *dt;
@@ -2182,18 +2183,12 @@ memseg_baseaddr(struct lwp *l, uint64_t 
 
 	seg = 0x;
 
-	if (seg == 0) {
-		if (addr != NULL)
-			*addr = 0;
+	if (seg == 0)
 		return 0;
-	}
 
 	off = (seg  0xfff8);
 	if (seg  SEL_LDT) {
-		if (ldtp != NULL) {
-			dt = ldtp;
-			len = llen;
-		} else if (pmap-pm_ldt != NULL) {
+		if (pmap-pm_ldt != NULL) {
 			len = pmap-pm_ldt_len; /* XXX broken */
 			dt = (char *)pmap-pm_ldt;
 		} else {
@@ -2220,21 +2215,10 @@ memseg_baseaddr(struct lwp *l, uint64_t 
 	if (base = VM_MAXUSER_ADDRESS)
 		return EINVAL;
 
-	if (addr == NULL)
-		return 0;
-
-	*addr = base;
-
 	return 0;
 }
 
 int
-valid_user_selector(struct lwp *l, uint64_t seg, char *ldtp, int len)
-{
-	return memseg_baseaddr(l, seg, ldtp, len, NULL);
-}
-
-int
 mm_md_kernacc(void *ptr, vm_prot_t prot, bool *handled)
 {
 	extern int start, __data_start;

Index: src/sys/arch/amd64/include/segments.h
diff -u src/sys/arch/amd64/include/segments.h:1.22 src/sys/arch/amd64/include/segments.h:1.23
--- src/sys/arch/amd64/include/segments.h:1.22	Mon Feb  7 03:54:45 2011
+++ src/sys/arch/amd64/include/segments.h	Sat Jun 16 20:47:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.22 2011/02/07 03:54:45 chs Exp $	*/
+/*	$NetBSD: segments.h,v 1.23 2012/06/16 20:47:04 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -256,8 +256,6 @@ void idt_vec_free(int);
 #endif
 
 struct lwp;
-int memseg_baseaddr(struct lwp *, uint64_t, char *, int, uint64_t *);
-int valid_user_selector(struct lwp *, uint64_t, char *, int);
 void cpu_fsgs_zero(struct lwp *);
 void cpu_fsgs_reload(struct lwp *, int, int);
 



CVS commit: src/etc/rc.d

2012-06-16 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Jun 17 02:13:13 UTC 2012

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

Log Message:
Remove unnecessary checkyesno which I commited before.
${rcvar}_start is skipped if rcvar is not set to YES.
Pointed out by joerg@ and tsutsui@.
Should be pulled up to netbsd-6.


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

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

Modified files:

Index: src/etc/rc.d/makemandb
diff -u src/etc/rc.d/makemandb:1.2 src/etc/rc.d/makemandb:1.3
--- src/etc/rc.d/makemandb:1.2	Tue Jun 12 02:25:29 2012
+++ src/etc/rc.d/makemandb	Sun Jun 17 02:13:13 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: makemandb,v 1.2 2012/06/12 02:25:29 isaki Exp $
+# $NetBSD: makemandb,v 1.3 2012/06/17 02:13:13 isaki Exp $
 #
 
 # PROVIDE: makemandb
@@ -17,10 +17,8 @@ stop_cmd=:
 
 makemandb_start()
 {
-	if checkyesno $rcvar; then
-		# Initiate update build in the background
-		nice -n 5 /usr/sbin/makemandb -q  /dev/null 21 
-	fi
+	# Initiate update build in the background
+	nice -n 5 /usr/sbin/makemandb -q  /dev/null 21 
 }
 
 load_rc_config $name



CVS commit: src/usr.bin/newsyslog

2012-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 17 03:52:33 UTC 2012

Modified Files:
src/usr.bin/newsyslog: newsyslog.8 newsyslog.c

Log Message:
PR/46608: Jim Bernard: Add xz conversion X


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/newsyslog/newsyslog.8
cvs rdiff -u -r1.59 -r1.60 src/usr.bin/newsyslog/newsyslog.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/newsyslog/newsyslog.8
diff -u src/usr.bin/newsyslog/newsyslog.8:1.36 src/usr.bin/newsyslog/newsyslog.8:1.37
--- src/usr.bin/newsyslog/newsyslog.8:1.36	Fri Dec 21 14:45:33 2007
+++ src/usr.bin/newsyslog/newsyslog.8	Sat Jun 16 23:52:32 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: newsyslog.8,v 1.36 2007/12/21 19:45:33 snj Exp $
+.\	$NetBSD: newsyslog.8,v 1.37 2012/06/17 03:52:32 christos Exp $
 .\
 .\ Copyright (c) 1999, 2000 Andrew Doran a...@netbsd.org
 .\ All rights reserved.
@@ -40,7 +40,7 @@
 .\
 .\ from FreeBSD: newsyslog.8,v 1.14.2.1 1999/02/25 18:38:33 wollman Exp
 .\
-.Dd December 21, 2007
+.Dd June 16, 2012
 .Dt NEWSYSLOG 8
 .Os
 .Sh NAME
@@ -334,6 +334,10 @@ should not be compressed.
 Archived log files should be compressed with
 .Xr bzip2 1
 to save space.
+.It Sy x
+Archived log files should be compressed with
+.Xr xz 1
+to save space.
 .It Sy z
 Archived log files should be compressed with
 .Xr gzip 1

Index: src/usr.bin/newsyslog/newsyslog.c
diff -u src/usr.bin/newsyslog/newsyslog.c:1.59 src/usr.bin/newsyslog/newsyslog.c:1.60
--- src/usr.bin/newsyslog/newsyslog.c:1.59	Fri Aug 21 04:20:19 2009
+++ src/usr.bin/newsyslog/newsyslog.c	Sat Jun 16 23:52:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: newsyslog.c,v 1.59 2009/08/21 08:20:19 manu Exp $	*/
+/*	$NetBSD: newsyslog.c,v 1.60 2012/06/17 03:52:32 christos Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Andrew Doran a...@netbsd.org
@@ -55,7 +55,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: newsyslog.c,v 1.59 2009/08/21 08:20:19 manu Exp $);
+__RCSID($NetBSD: newsyslog.c,v 1.60 2012/06/17 03:52:32 christos Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -121,6 +121,7 @@ static struct compressor compress[] =
 	{NULL, , , }, /* 0th compressor is no compression */
 	{/usr/bin/gzip, -f, .gz, Z},
 	{/usr/bin/bzip2, -9f, .bz2, J},
+	{/usr/bin/xz, -f, .xz, X},
 };
 
 #define _PATH_NEWSYSLOGCONF	/etc/newsyslog.conf
@@ -377,7 +378,7 @@ parse_cfgline(struct conf_entry *log, FI
 		case 'P':
 			log-flags |= CE_PLAIN0;
 			break;
-		case 'J': case 'Z':
+		case 'J': case 'X': case 'Z':
 			for (ziptype = __arraycount(compress); --ziptype; ) {
 if (*compress[ziptype].flag == qq)
 break;