CVS commit: src/external/mit/xorg/server/drivers/xf86-video-mach64

2009-12-22 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Tue Dec 22 09:12:42 UTC 2009

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-mach64: Makefile

Log Message:
Add -DAVOID_CPIO on sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/server/drivers/xf86-video-mach64/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/mit/xorg/server/drivers/xf86-video-mach64/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-mach64/Makefile:1.4 src/external/mit/xorg/server/drivers/xf86-video-mach64/Makefile:1.5
--- src/external/mit/xorg/server/drivers/xf86-video-mach64/Makefile:1.4	Sat Feb 14 13:32:13 2009
+++ src/external/mit/xorg/server/drivers/xf86-video-mach64/Makefile	Tue Dec 22 09:12:42 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2009/02/14 13:32:13 abs Exp $
+#	$NetBSD: Makefile,v 1.5 2009/12/22 09:12:42 nakayama Exp $
 
 DRIVER=		xf86-video-mach64
 DRIVER_NAME=	mach64_drv
@@ -20,7 +20,8 @@
 
 CPPFLAGS+=	-DUSE_XAA
 
-.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == sparc64
+.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == sparc64 || \
+${MACHINE_ARCH} == sparc
 CPPFLAGS+= -DAVOID_CPIO
 .endif
 



CVS commit: src/etc/etc.landisk

2009-12-22 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Dec 22 11:12:41 UTC 2009

Modified Files:
src/etc/etc.landisk: MAKEDEV.conf

Log Message:
delete makedev init from all_md entry.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/etc/etc.landisk/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.landisk/MAKEDEV.conf
diff -u src/etc/etc.landisk/MAKEDEV.conf:1.4 src/etc/etc.landisk/MAKEDEV.conf:1.5
--- src/etc/etc.landisk/MAKEDEV.conf:1.4	Mon Dec  7 10:03:37 2009
+++ src/etc/etc.landisk/MAKEDEV.conf	Tue Dec 22 11:12:40 2009
@@ -1,7 +1,6 @@
-# $NetBSD: MAKEDEV.conf,v 1.4 2009/12/07 10:03:37 nonaka Exp $
+# $NetBSD: MAKEDEV.conf,v 1.5 2009/12/22 11:12:40 nonaka Exp $
 
 all_md)
-	makedev init
 	makedev std
 	makedev wscons
 	makedev wd0 wd1 sd0 sd1 sd2 sd3



CVS commit: src/distrib/landisk/ramdisk

2009-12-22 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Dec 22 11:15:25 UTC 2009

Modified Files:
src/distrib/landisk/ramdisk: list

Log Message:
Add /usr/bin/{tset,more}.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/landisk/ramdisk/list

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

Modified files:

Index: src/distrib/landisk/ramdisk/list
diff -u src/distrib/landisk/ramdisk/list:1.13 src/distrib/landisk/ramdisk/list:1.14
--- src/distrib/landisk/ramdisk/list:1.13	Mon Dec 21 11:22:41 2009
+++ src/distrib/landisk/ramdisk/list	Tue Dec 22 11:15:25 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.13 2009/12/21 11:22:41 nonaka Exp $
+#	$NetBSD: list,v 1.14 2009/12/22 11:15:25 nonaka Exp $
 
 SRCDIRS	bin sbin usr.bin usr.sbin
 
@@ -42,7 +42,9 @@
 
 PROG	usr/bin/ftp
 PROG	usr/bin/gzip	usr/bin/gzcat usr/bin/gunzip
+PROG	usr/bin/more
 PROG	usr/bin/sed
+PROG	usr/bin/tset
 
 PROG	usr/sbin/chown	usr/bin/chgrp
 PROG	usr/sbin/chroot
@@ -50,6 +52,7 @@
 
 SPECIAL	ed		srcdir	distrib/utils/x_ed
 SPECIAL	ifconfig	srcdir	distrib/utils/x_ifconfig
+SPECIAL	more		srcdir  distrib/utils/more
 SPECIAL	ping		srcdir	distrib/utils/x_ping
 SPECIAL	route		srcdir	distrib/utils/x_route
 SPECIAL	umount		srcdir	distrib/utils/x_umount



CVS commit: src/distrib/landisk/ramdisk

2009-12-22 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Dec 22 11:15:52 UTC 2009

Modified Files:
src/distrib/landisk/ramdisk: dot.profile

Log Message:
remove mount -t kernfs line.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/landisk/ramdisk/dot.profile

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

Modified files:

Index: src/distrib/landisk/ramdisk/dot.profile
diff -u src/distrib/landisk/ramdisk/dot.profile:1.1 src/distrib/landisk/ramdisk/dot.profile:1.2
--- src/distrib/landisk/ramdisk/dot.profile:1.1	Mon Apr 14 17:24:56 2008
+++ src/distrib/landisk/ramdisk/dot.profile	Tue Dec 22 11:15:52 2009
@@ -58,9 +58,6 @@
 	# mount the ramdisk read write
 	mount -u $ROOTDEV /
 
-	# mount the kern_fs so that we can examine the dmesg state
-	mount -t kernfs /kern /kern
-
 	# run the installation program
 	sysinst
 fi



CVS commit: src/share/man/man9

2009-12-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Dec 22 11:56:15 UTC 2009

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

Log Message:
Remove trailing whitespace, make HTML-ready, sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/vmem.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/vmem.9
diff -u src/share/man/man9/vmem.9:1.7 src/share/man/man9/vmem.9:1.8
--- src/share/man/man9/vmem.9:1.7	Mon Dec 21 22:49:18 2009
+++ src/share/man/man9/vmem.9	Tue Dec 22 11:56:14 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: vmem.9,v 1.7 2009/12/21 22:49:18 dyoung Exp $
+.\	$NetBSD: vmem.9,v 1.8 2009/12/22 11:56:14 wiz Exp $
 .\
 .\ Copyright (c)2006 YAMAMOTO Takashi,
 .\ All rights reserved.
@@ -91,7 +91,7 @@
 .It Fa allocfn
 The callback function used to import spans from the backend arena.
 Set both
-.Fa allocfn 
+.Fa allocfn
 and
 .Fa freefn
 to
@@ -102,13 +102,13 @@
 .Fo (*allocfn)
 .Fa source
 .Fa size
-.Fa actualsize
+.Fa \*[Am]actualsize
 .Fa flags
 .Fc
 to import a span of size at least
 .Fa size .
 .Fa allocfn
-should accept the same 
+should accept the same
 .Fa flags
 as
 .Fn vmem_alloc .
@@ -386,6 +386,11 @@
 .%D 2001
 .Re
 .\ 
+.Sh AUTHORS
+This implementation of
+.Nm
+was written by
+.An YAMAMOTO Takashi .
 .Sh BUGS
 .Nm
 cannot manage a resource that starts at 0, because it reserves the
@@ -407,8 +412,3 @@
 .Xr RUN_ONCE 9 ,
 so it cannot be used as early during system bootstrap as
 .Xr extent 9 .
-.Sh AUTHORS
-This implementation of
-.Nm
-was written by
-.An YAMAMOTO Takashi .



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

2009-12-22 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Tue Dec 22 13:26:15 UTC 2009

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

Log Message:
Import atf 0.7.  Changes in this release:

* Added build-time checks to atf-c and atf-c++.  A binding for atf-sh
  will come later.

* Migrated all build-time checks for header files to proper ATF tests.
  This demonstrates the use of the new feature described above.

* Added an internal API for child process management.

* Converted all plain-text distribution documents to a Docbook canonical
  version, and include pre-generated plain text and HTML copies in the
  distribution file.

* Simplified the contents of the Makefile.am by regenerating it from a
  canonical Makefile.am.m4 source.  As a side-effect, some dependency
  specifications were fixed.

* Migrated all checks from the check target to installcheck, as these
  require ATF to be installed.

* Fixed sign comparison mismatches triggered by the now-enabled
  -Wsign-compare.

* Fixed many memory and object leaks.

Status:

Vendor Tag: TNF
Release Tags:   atf-0-7

U src/external/bsd/atf/dist/configure.ac
U src/external/bsd/atf/dist/README
N src/external/bsd/atf/dist/Makefile.am.m4
U src/external/bsd/atf/dist/aclocal.m4
U src/external/bsd/atf/dist/atf-c.h
U src/external/bsd/atf/dist/atf-c++.hpp
U src/external/bsd/atf/dist/Makefile.am
U src/external/bsd/atf/dist/Makefile.in
U src/external/bsd/atf/dist/bconfig.h.in
U src/external/bsd/atf/dist/configure
U src/external/bsd/atf/dist/AUTHORS
U src/external/bsd/atf/dist/COPYING
U src/external/bsd/atf/dist/INSTALL
U src/external/bsd/atf/dist/NEWS
U src/external/bsd/atf/dist/revision.h
U src/external/bsd/atf/dist/admin/config.guess
U src/external/bsd/atf/dist/admin/compile
U src/external/bsd/atf/dist/admin/check-install.sh
U src/external/bsd/atf/dist/admin/config.sub
U src/external/bsd/atf/dist/admin/depcomp
U src/external/bsd/atf/dist/admin/install-sh
U src/external/bsd/atf/dist/admin/ltmain.sh
U src/external/bsd/atf/dist/admin/missing
U src/external/bsd/atf/dist/admin/check-style-common.awk
U src/external/bsd/atf/dist/admin/check-style-c.awk
U src/external/bsd/atf/dist/admin/check-style-cpp.awk
U src/external/bsd/atf/dist/admin/check-style-man.awk
U src/external/bsd/atf/dist/admin/check-style-shell.awk
U src/external/bsd/atf/dist/admin/check-style.sh
N src/external/bsd/atf/dist/admin/choose-revision.sh
N src/external/bsd/atf/dist/admin/generate-makefile.sh
N src/external/bsd/atf/dist/admin/generate-revision.sh
U src/external/bsd/atf/dist/admin/revision-dist.h
N src/external/bsd/atf/dist/admin/generate-revision-dist.sh
U src/external/bsd/atf/dist/atf-c/error_fwd.h
N src/external/bsd/atf/dist/atf-c/build.h
U src/external/bsd/atf/dist/atf-c/check.h
U src/external/bsd/atf/dist/atf-c/config.h
U src/external/bsd/atf/dist/atf-c/dynstr.h
U src/external/bsd/atf/dist/atf-c/env.h
U src/external/bsd/atf/dist/atf-c/error.h
U src/external/bsd/atf/dist/atf-c/process.h
U src/external/bsd/atf/dist/atf-c/expand.h
U src/external/bsd/atf/dist/atf-c/fs.h
U src/external/bsd/atf/dist/atf-c/io.h
U src/external/bsd/atf/dist/atf-c/list.h
U src/external/bsd/atf/dist/atf-c/macros.h
U src/external/bsd/atf/dist/atf-c/map.h
U src/external/bsd/atf/dist/atf-c/object.h
U src/external/bsd/atf/dist/atf-c/signals.h
U src/external/bsd/atf/dist/atf-c/sanity.h
U src/external/bsd/atf/dist/atf-c/tcr.h
U src/external/bsd/atf/dist/atf-c/tc.h
U src/external/bsd/atf/dist/atf-c/atf-c-api.3
U src/external/bsd/atf/dist/atf-c/defs.h.in
U src/external/bsd/atf/dist/atf-c/text.h
U src/external/bsd/atf/dist/atf-c/tp.h
U src/external/bsd/atf/dist/atf-c/ui.h
U src/external/bsd/atf/dist/atf-c/user.h
U src/external/bsd/atf/dist/atf-c/process.c
N src/external/bsd/atf/dist/atf-c/build.c
U src/external/bsd/atf/dist/atf-c/check.c
U src/external/bsd/atf/dist/atf-c/config.c
C src/external/bsd/atf/dist/atf-c/dynstr.c
U src/external/bsd/atf/dist/atf-c/env.c
U src/external/bsd/atf/dist/atf-c/error.c
U src/external/bsd/atf/dist/atf-c/expand.c
C src/external/bsd/atf/dist/atf-c/fs.c
C src/external/bsd/atf/dist/atf-c/io.c
U src/external/bsd/atf/dist/atf-c/list.c
U src/external/bsd/atf/dist/atf-c/map.c
U src/external/bsd/atf/dist/atf-c/object.c
U src/external/bsd/atf/dist/atf-c/signals.c
U src/external/bsd/atf/dist/atf-c/sanity.c
U src/external/bsd/atf/dist/atf-c/tp_main.c
U src/external/bsd/atf/dist/atf-c/text.c
U src/external/bsd/atf/dist/atf-c/ui.c
U src/external/bsd/atf/dist/atf-c/user.c
C src/external/bsd/atf/dist/atf-c/tc.c
U src/external/bsd/atf/dist/atf-c/tcr.c
U src/external/bsd/atf/dist/atf-c/tp.c
U src/external/bsd/atf/dist/atf-c++/application.hpp
U src/external/bsd/atf/dist/atf-c++/atffile.hpp
N src/external/bsd/atf/dist/atf-c++/build.hpp
U src/external/bsd/atf/dist/atf-c++/check.hpp
U src/external/bsd/atf/dist/atf-c++/config.hpp
U src/external/bsd/atf/dist/atf-c++/env.hpp
U src/external/bsd/atf/dist/atf-c++/exceptions.hpp
U 

CVS commit: src/sys/rump/dev/wip/libumass

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 13:34:35 UTC 2009

Modified Files:
src/sys/rump/dev/wip/libumass: sd_at_scsibus_at_umass.c

Log Message:
Create sashimi nodes too.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c

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

Modified files:

Index: src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c
diff -u src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.5 src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.6
--- src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c:1.5	Sat Dec 19 11:55:23 2009
+++ src/sys/rump/dev/wip/libumass/sd_at_scsibus_at_umass.c	Tue Dec 22 13:34:35 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.5 2009/12/19 11:55:23 pooka Exp $	*/
+/*	$NetBSD: sd_at_scsibus_at_umass.c,v 1.6 2009/12/22 13:34:35 pooka Exp $	*/
 
 /*
  * MACHINE GENERATED: DO NOT EDIT
@@ -503,4 +503,6 @@
 
 	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, /dev/sd0, 'a',
 	bmaj, 0, 8));
+	FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, /dev/rsd0, 'a',
+	cmaj, 0, 8));
 }



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

2009-12-22 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Tue Dec 22 13:36:57 UTC 2009

Modified Files:
src/external/bsd/atf/dist/atf-c: dynstr.c fs.c io.c tc.c
Removed Files:
src/external/bsd/atf/dist: ChangeLog ROADMAP
src/external/bsd/atf/dist/tests/atf/atf-c: h_check.c h_macros.h
src/external/bsd/atf/dist/tests/build: t_include_atf_c++_hpp.cpp
t_include_atf_c_h.cpp
src/external/bsd/atf/dist/tests/build/atf-c: t_include_check_h.c
t_include_config_h.c t_include_dynstr_h.c t_include_env_h.c
t_include_error_fwd_h.c t_include_error_h.c t_include_expand_h.c
t_include_fs_h.c t_include_io_h.c t_include_list_h.c
t_include_macros_h.c t_include_map_h.c t_include_object_h.c
t_include_process_h.c t_include_sanity_h.c t_include_signals_h.c
t_include_tc_h.c t_include_tcr_h.c t_include_text_h.c
t_include_tp_h.c t_include_ui_h.c t_use_macros_h.c
src/external/bsd/atf/dist/tests/build/atf-c++:
t_include_application_hpp.cpp t_include_atffile_hpp.cpp
t_include_check_hpp.cpp t_include_config_hpp.cpp
t_include_env_hpp.cpp t_include_exceptions_hpp.cpp
t_include_expand_hpp.cpp t_include_formats_hpp.cpp
t_include_fs_hpp.cpp t_include_io_hpp.cpp t_include_macros_hpp.cpp
t_include_parser_hpp.cpp t_include_process_hpp.cpp
t_include_sanity_hpp.cpp t_include_signals_hpp.cpp
t_include_tests_hpp.cpp t_include_text_hpp.cpp t_include_ui_hpp.cpp
t_include_user_hpp.cpp t_include_utils_hpp.cpp t_use_macros_hpp.cpp

Log Message:
Merge atf 0.7.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/atf/dist/ChangeLog \
src/external/bsd/atf/dist/ROADMAP
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/atf-c/dynstr.c \
src/external/bsd/atf/dist/atf-c/fs.c src/external/bsd/atf/dist/atf-c/io.c \
src/external/bsd/atf/dist/atf-c/tc.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/atf/atf-c/h_check.c \
src/external/bsd/atf/dist/tests/atf/atf-c/h_macros.h
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/build/t_include_atf_c++_hpp.cpp \
src/external/bsd/atf/dist/tests/build/t_include_atf_c_h.cpp
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_check_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_config_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_dynstr_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_env_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_error_fwd_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_error_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_expand_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_fs_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_io_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_list_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_macros_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_map_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_object_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_process_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_sanity_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_signals_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_tc_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_tcr_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_text_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_tp_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_include_ui_h.c \
src/external/bsd/atf/dist/tests/build/atf-c/t_use_macros_h.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_application_hpp.cpp 
\
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_atffile_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_check_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_config_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_env_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_exceptions_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_expand_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_formats_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_fs_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_io_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_macros_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_parser_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_process_hpp.cpp \
src/external/bsd/atf/dist/tests/build/atf-c++/t_include_sanity_hpp.cpp \

CVS commit: src/distrib/sets/lists

2009-12-22 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Tue Dec 22 13:38:41 UTC 2009

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

Log Message:
Update file sets to match atf 0.7.


To generate a diff of this commit:
cvs rdiff -u -r1.1351 -r1.1352 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.163 -r1.164 src/distrib/sets/lists/misc/mi
cvs rdiff -u -r1.57 -r1.58 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1351 src/distrib/sets/lists/comp/mi:1.1352
--- src/distrib/sets/lists/comp/mi:1.1351	Mon Dec 21 21:09:41 2009
+++ src/distrib/sets/lists/comp/mi	Tue Dec 22 13:38:40 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1351 2009/12/21 21:09:41 dyoung Exp $
+#	$NetBSD: mi,v 1.1352 2009/12/22 13:38:40 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -115,6 +115,7 @@
 ./usr/include/atf-c++.hpp			comp-atf-include	atf
 ./usr/include/atf-c++/application.hpp		comp-atf-include	atf
 ./usr/include/atf-c++/atffile.hpp		comp-atf-include	atf
+./usr/include/atf-c++/build.hpp			comp-atf-include	atf
 ./usr/include/atf-c++/check.hpp			comp-atf-include	atf
 ./usr/include/atf-c++/config.hpp		comp-atf-include	atf
 ./usr/include/atf-c++/env.hpp			comp-atf-include	atf
@@ -134,6 +135,7 @@
 ./usr/include/atf-c++/user.hpp			comp-atf-include	atf
 ./usr/include/atf-c++/utils.hpp			comp-atf-include	atf
 ./usr/include/atf-c.hcomp-atf-include	atf
+./usr/include/atf-c/build.h			comp-atf-include	atf
 ./usr/include/atf-c/check.h			comp-atf-include	atf
 ./usr/include/atf-c/config.h			comp-atf-include	atf
 ./usr/include/atf-c/defs.h			comp-atf-include	atf

Index: src/distrib/sets/lists/misc/mi
diff -u src/distrib/sets/lists/misc/mi:1.163 src/distrib/sets/lists/misc/mi:1.164
--- src/distrib/sets/lists/misc/mi:1.163	Tue Dec 15 03:01:16 2009
+++ src/distrib/sets/lists/misc/mi	Tue Dec 22 13:38:40 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.163 2009/12/15 03:01:16 mrg Exp $
+# $NetBSD: mi,v 1.164 2009/12/22 13:38:40 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -19,7 +19,7 @@
 ./usr/share/doc/atf/COPYING			misc-atf-doc		doc,atf
 ./usr/share/doc/atf/NEWS			misc-atf-doc		doc,atf
 ./usr/share/doc/atf/README			misc-atf-doc		doc,atf
-./usr/share/doc/atf/ROADMAP			misc-atf-doc		doc,atf
+./usr/share/doc/atf/ROADMAP			misc-atf-doc		obsolete
 ./usr/share/doc/html/bind9/arm/Bv9ARM.ch01.html	misc-bind-htmldoc	doc
 ./usr/share/doc/html/bind9/arm/Bv9ARM.ch02.html	misc-bind-htmldoc	doc
 ./usr/share/doc/html/bind9/arm/Bv9ARM.ch03.html	misc-bind-htmldoc	doc

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.57 src/distrib/sets/lists/tests/mi:1.58
--- src/distrib/sets/lists/tests/mi:1.57	Tue Dec 15 03:01:16 2009
+++ src/distrib/sets/lists/tests/mi	Tue Dec 22 13:38:41 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.57 2009/12/15 03:01:16 mrg Exp $
+# $NetBSD: mi,v 1.58 2009/12/22 13:38:41 jmmv Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -6,7 +6,10 @@
 ./usr/libdata/debug/usr/tests		tests-base-debug
 ./usr/libdata/debug/usr/tests/atf	tests-atf-debug
 ./usr/libdata/debug/usr/tests/atf/atf-c	tests-atf-debug
-./usr/libdata/debug/usr/tests/atf/atf-c/h_check.debug			tests-atf-debug		debug,atf
+./usr/libdata/debug/usr/tests/atf/atf-c/h_check.debug			tests-atf-debug		obsolete
+./usr/libdata/debug/usr/tests/atf/atf-c/h_processes.debug		tests-atf-debug		debug,atf
+./usr/libdata/debug/usr/tests/atf/atf-c/t_atf_c.debug			tests-atf-debug		debug,atf
+./usr/libdata/debug/usr/tests/atf/atf-c/t_build.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_check.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_config.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_dynstr.debug			tests-atf-debug		debug,atf
@@ -14,6 +17,7 @@
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_error.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_expand.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_fs.debug			tests-atf-debug		debug,atf
+./usr/libdata/debug/usr/tests/atf/atf-c/t_h_lib.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_io.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_list.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_macros.debug			tests-atf-debug		debug,atf
@@ -27,18 +31,26 @@
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_ui.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c/t_user.debug			tests-atf-debug		debug,atf
 ./usr/libdata/debug/usr/tests/atf/atf-c++tests-atf-debug

CVS commit: src/doc

2009-12-22 Thread Julio M. Merino Vidal
Module Name:src
Committed By:   jmmv
Date:   Tue Dec 22 13:41:41 UTC 2009

Modified Files:
src/doc: CHANGES

Log Message:
Note import of atf 0.7.


To generate a diff of this commit:
cvs rdiff -u -r1.1331 -r1.1332 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.1331 src/doc/CHANGES:1.1332
--- src/doc/CHANGES:1.1331	Tue Dec 15 06:04:22 2009
+++ src/doc/CHANGES	Tue Dec 22 13:41:41 2009
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1331 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1332 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -504,3 +504,4 @@
 		[pooka 20091205]
 	ntp:	Import ntp-4-2-4p8. [kardel 20091208]
 	zaurus: Add support Xorg. [nonaka 20091213]
+	atf(7): Import 0.7.  [jmmv 20091222]



CVS commit: src/sys/dev/pud

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 14:12:40 UTC 2009

Modified Files:
src/sys/dev/pud: pud_dev.c

Log Message:
fix pasto


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pud/pud_dev.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/pud/pud_dev.c
diff -u src/sys/dev/pud/pud_dev.c:1.4 src/sys/dev/pud/pud_dev.c:1.5
--- src/sys/dev/pud/pud_dev.c:1.4	Thu Nov 22 11:26:27 2007
+++ src/sys/dev/pud/pud_dev.c	Tue Dec 22 14:12:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pud_dev.c,v 1.4 2007/11/22 11:26:27 pooka Exp $	*/
+/*	$NetBSD: pud_dev.c,v 1.5 2009/12/22 14:12:40 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pud_dev.c,v 1.4 2007/11/22 11:26:27 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pud_dev.c,v 1.5 2009/12/22 14:12:40 pooka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -223,7 +223,7 @@
 pud_cdev_close(dev_t dev, int flags, int fmt, lwp_t *l)
 {
 
-	return doopenclose(dev, flags, fmt, PUD_REQ_CDEV, PUD_CDEV_OPEN);
+	return doopenclose(dev, flags, fmt, PUD_REQ_CDEV, PUD_CDEV_CLOSE);
 }
 
 static int



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

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 14:18:33 UTC 2009

Modified Files:
src/sys/rump/librump/rumpvfs: rumpblk.c

Log Message:
Fix block device open for non-REG backends.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/rump/librump/rumpvfs/rumpblk.c

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

Modified files:

Index: src/sys/rump/librump/rumpvfs/rumpblk.c
diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.34 src/sys/rump/librump/rumpvfs/rumpblk.c:1.35
--- src/sys/rump/librump/rumpvfs/rumpblk.c:1.34	Thu Dec  3 14:05:46 2009
+++ src/sys/rump/librump/rumpvfs/rumpblk.c	Tue Dec 22 14:18:33 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpblk.c,v 1.34 2009/12/03 14:05:46 pooka Exp $	*/
+/*	$NetBSD: rumpblk.c,v 1.35 2009/12/22 14:18:33 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.34 2009/12/03 14:05:46 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.35 2009/12/22 14:18:33 pooka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -492,6 +492,8 @@
 break;
 			}
 		}
+	} else {
+		rblk-rblk_fd = fd;
 	}
 
 	KASSERT(rblk-rblk_fd != -1);



CVS commit: src/include

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 14:24:38 UTC 2009

Modified Files:
src/include: paths.h

Log Message:
+_PATH_PUD


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/include/paths.h

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

Modified files:

Index: src/include/paths.h
diff -u src/include/paths.h:1.34 src/include/paths.h:1.35
--- src/include/paths.h:1.34	Sun Sep 28 06:38:02 2008
+++ src/include/paths.h	Tue Dec 22 14:24:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: paths.h,v 1.34 2008/09/28 06:38:02 lukem Exp $	*/
+/*	$NetBSD: paths.h,v 1.35 2009/12/22 14:24:37 pooka Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -82,6 +82,7 @@
 #define	_PATH_MIXER0	/dev/mixer0
 #define	_PATH_NOLOGIN	/etc/nologin
 #define	_PATH_PRINTCAP	/etc/printcap
+#define	_PATH_PUD	/dev/pud
 #define	_PATH_PUFFS	/dev/puffs
 #define	_PATH_RANDOM	/dev/random
 #define	_PATH_SENDMAIL	/usr/sbin/sendmail



CVS commit: [netbsd-5] src/usr.bin/lex

2009-12-22 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue Dec 22 15:34:40 UTC 2009

Modified Files:
src/usr.bin/lex [netbsd-5]: flex.skl initscan.c

Log Message:
Pull up the following revisions(s) (requested by hubertf in ticket #1197):
usr.bin/lex/flex.skl:   revision 1.23-125
usr.bin/lex/initscan.c: revision 1.18

If YY_NO_INPUT is defined, disable not only the declaration but also
the definition of yyinput() to avoid compiler warnings with newer gcc.
Addresses PR#41160.
Introduce ANSI prototypes for yyinput.
Conditionalize the yyinput/input() function definition the same way
as it's always been done in the prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.28.1 src/usr.bin/lex/flex.skl
cvs rdiff -u -r1.17 -r1.17.40.1 src/usr.bin/lex/initscan.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/lex/flex.skl
diff -u src/usr.bin/lex/flex.skl:1.22 src/usr.bin/lex/flex.skl:1.22.28.1
--- src/usr.bin/lex/flex.skl:1.22	Mon Aug  8 01:28:08 2005
+++ src/usr.bin/lex/flex.skl	Tue Dec 22 15:34:40 2009
@@ -1,7 +1,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $NetBSD: flex.skl,v 1.22 2005/08/08 01:28:08 christos Exp $
+ * $NetBSD: flex.skl,v 1.22.28.1 2009/12/22 15:34:40 sborrill Exp $
  */
 
 #define FLEX_SCANNER
@@ -987,13 +987,14 @@
 
 
 %-
+#ifndef YY_NO_INPUT
 #ifdef __cplusplus
-static int yyinput()
+static int yyinput YY_PROTO(( void ))
 #else
-static int input()
+static int input YY_PROTO(( void ))
 #endif
 %+
-int yyFlexLexer::yyinput()
+int yyFlexLexer::yyinput(void)
 %*
 	{
 	int c;
@@ -1062,6 +1063,9 @@
 
 	return c;
 	}
+%-
+#endif /* ifndef YY_NO_INPUT */
+%*
 
 
 %-

Index: src/usr.bin/lex/initscan.c
diff -u src/usr.bin/lex/initscan.c:1.17 src/usr.bin/lex/initscan.c:1.17.40.1
--- src/usr.bin/lex/initscan.c:1.17	Tue Dec  2 06:22:14 2003
+++ src/usr.bin/lex/initscan.c	Tue Dec 22 15:34:40 2009
@@ -2,7 +2,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $NetBSD: initscan.c,v 1.17 2003/12/02 06:22:14 lukem Exp $
+ * $NetBSD: initscan.c,v 1.17.40.1 2009/12/22 15:34:40 sborrill Exp $
  */
 
 #define FLEX_SCANNER
@@ -1274,7 +1274,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-/* $NetBSD: initscan.c,v 1.17 2003/12/02 06:22:14 lukem Exp $ */
+/* $NetBSD: initscan.c,v 1.17.40.1 2009/12/22 15:34:40 sborrill Exp $ */
 
 #include flexdef.h
 #include parse.h
@@ -3141,9 +3141,9 @@
 
 
 #ifdef __cplusplus
-static int yyinput()
+static int yyinput(void)
 #else
-static int input()
+static int input(void)
 #endif
 	{
 	int c;



CVS commit: [netbsd-5] src/doc

2009-12-22 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue Dec 22 15:35:07 UTC 2009

Modified Files:
src/doc [netbsd-5]: CHANGES-5.1

Log Message:
Ticket 1197


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.163 -r1.1.2.164 src/doc/CHANGES-5.1

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-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.163 src/doc/CHANGES-5.1:1.1.2.164
--- src/doc/CHANGES-5.1:1.1.2.163	Mon Dec 21 09:19:39 2009
+++ src/doc/CHANGES-5.1	Tue Dec 22 15:35:07 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.163 2009/12/21 09:19:39 sborrill Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.164 2009/12/22 15:35:07 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -15657,3 +15657,14 @@
 	completely separate userspace VA.
 	[martin, ticket #1200]
 
+usr.bin/lex/flex.skl1.23-1.25
+usr.bin/lex/initscan.c1.18
+
+	If YY_NO_INPUT is defined, disable not only the declaration but
+	also the definition of yyinput() to avoid compiler warnings with
+	newer gcc. Addresses PR#41160.
+	Introduce ANSI prototypes for yyinput.
+	Conditionalize the yyinput/input() function definition the same
+	way as it's always been done in the prototype.
+	[hubertf, ticket #1197]
+



CVS commit: src/sys/dev/pci

2009-12-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Dec 22 16:32:41 UTC 2009

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

Log Message:
Don't forget to initialize data32iot and data32ioh in via_sata_chip_map_new().
This makes 32bit UDMA xfer work properly on VIA VT6421.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/pci/viaide.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/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.64 src/sys/dev/pci/viaide.c:1.65
--- src/sys/dev/pci/viaide.c:1.64	Sat Nov 21 23:44:25 2009
+++ src/sys/dev/pci/viaide.c	Tue Dec 22 16:32:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.64 2009/11/21 23:44:25 jakllsch Exp $	*/
+/*	$NetBSD: viaide.c,v 1.65 2009/12/22 16:32:41 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.64 2009/11/21 23:44:25 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.65 2009/12/22 16:32:41 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1074,6 +1074,8 @@
 			return;
 		}
 		wdc_init_shadow_regs(wdc_cp);
+		wdr-data32iot = wdr-cmd_iot;
+		wdr-data32ioh = wdr-cmd_iohs[wd_data];
 		wdcattach(wdc_cp);
 	}
 }



CVS commit: src/sys/dev/pud

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 17:32:03 UTC 2009

Modified Files:
src/sys/dev/pud: pud_dev.c

Log Message:
Handle DIOCGPART in-kernel because a userspace server doesn't have
a chance in phobos of handling it.  This makes it possible to do a
kernel mount of most file systems with the block device backed by
a pud userspace server.

-  i'm too young to compile
-  hey, no tty rough
-  hurd me plenty
= abstraction-violence
-  nightmare!


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pud/pud_dev.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/pud/pud_dev.c
diff -u src/sys/dev/pud/pud_dev.c:1.5 src/sys/dev/pud/pud_dev.c:1.6
--- src/sys/dev/pud/pud_dev.c:1.5	Tue Dec 22 14:12:40 2009
+++ src/sys/dev/pud/pud_dev.c	Tue Dec 22 17:32:03 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pud_dev.c,v 1.5 2009/12/22 14:12:40 pooka Exp $	*/
+/*	$NetBSD: pud_dev.c,v 1.6 2009/12/22 17:32:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pud_dev.c,v 1.5 2009/12/22 14:12:40 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pud_dev.c,v 1.6 2009/12/22 17:32:03 pooka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -57,13 +57,37 @@
 	return pud_request(dev, pc_oc, sizeof(pc_oc), class, type);
 }
 
+#include sys/disklabel.h
+/*
+ * XXX: this is not reentrant.  But then again, partinfo isn't
+ * exactly safe in any case.
+ */
+static struct disklabel dl_partinfo;
+
 static int
 doioctl(dev_t dev, u_long cmd, void *data, int flag, int class, int type)
 {
 	struct pud_req_ioctl *pc_ioctl;
 	size_t dlen, allocsize;
+	u_long origcmd = cmd;
+	void *origdata = NULL; /* XXXgcc */
 	int error;
 
+	/*
+	 * XXX: kludge.  This is a horrible abstraction violation, but
+	 * then again DIOCGPART is a horrible ioctl (even more horrible
+	 * than the generic ioctl).  We handle it specially here since
+	 * the server in userspace has no chance to handle it.  And it's
+	 * a common operation used by most file systems.  But really, it
+	 * should be replaced by something a bit more ... transactional.
+	 */
+	if (cmd == DIOCGPART) {
+		cmd = DIOCGDINFO;
+		origdata = data;
+		flag = 0;
+		data = dl_partinfo;
+	}
+
 	dlen = IOCPARM_LEN(cmd);
 	allocsize = sizeof(struct pud_req_ioctl) + dlen;
 	pc_ioctl = kmem_zalloc(allocsize, KM_SLEEP);
@@ -79,6 +103,39 @@
 	if (cmd  IOC_OUT)
 		memcpy(data, pc_ioctl-pm_data, dlen);
 
+	/*
+	 * In case doing the infamous DIOCGPART, issue the real
+	 * ioctl and do pointer arithmetic to figure out the right
+	 * partition.  We could use DISKPART() too, but this seems
+	 * better.
+	 */
+	if (origcmd == DIOCGPART) {
+		struct partinfo *pi, *pi_user;
+		int labidx;
+
+		CTASSERT(sizeof(struct partinfo) = sizeof(struct disklabel));
+
+		pc_ioctl-pm_iocmd = DIOCGPART;
+		pc_ioctl-pm_flag = 0;
+
+		error = pud_request(dev, pc_ioctl, allocsize, class, type);
+		if (error)
+			goto out;
+
+		pi_user = (struct partinfo *)pc_ioctl-pm_data;
+		labidx = pi_user-part - pi_user-disklab-d_partitions[0];
+		/* userspace error, but punish caller, since we have no infra */
+		if (labidx = MAXPARTITIONS) {
+			error = E2BIG;
+			goto out;
+		}
+
+		pi = origdata;
+		pi-disklab = dl_partinfo;
+		pi-part = dl_partinfo.d_partitions[labidx];
+
+	}
+
  out:
 	kmem_free(pc_ioctl, allocsize);
 	return error;



CVS commit: src/sbin/mount_msdos

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 17:50:22 UTC 2009

Modified Files:
src/sbin/mount_msdos: Makefile

Log Message:
Don't -I from $S/sys.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sbin/mount_msdos/Makefile

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

Modified files:

Index: src/sbin/mount_msdos/Makefile
diff -u src/sbin/mount_msdos/Makefile:1.21 src/sbin/mount_msdos/Makefile:1.22
--- src/sbin/mount_msdos/Makefile:1.21	Tue Aug  5 20:57:45 2008
+++ src/sbin/mount_msdos/Makefile	Tue Dec 22 17:50:22 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2008/08/05 20:57:45 pooka Exp $
+#	$NetBSD: Makefile,v 1.22 2009/12/22 17:50:22 pooka Exp $
 
 .include bsd.own.mk
 
@@ -7,7 +7,7 @@
 MAN=	mount_msdos.8
 
 MOUNT=	${NETBSDSRCDIR}/sbin/mount
-CPPFLAGS+= -I${MOUNT} -I${NETBSDSRCDIR}/sys
+CPPFLAGS+= -I${MOUNT}
 .PATH:	${MOUNT}
 
 DPADD+=${LIBUTIL}



CVS commit: src/share/examples/rump/umserv

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 18:36:02 UTC 2009

Added Files:
src/share/examples/rump/umserv: Makefile umserv.c

Log Message:
Add a simple example of how to run the kernel umass/USB in userspace
and attach it back to the host kernel using pud(4).  The result is
pretty much indistinguisable from if kernel drivers were used.

It's possible to e.g. mount a file system backed by the userspace
block device driver:

golem disklabel ./rumpsd0d
[...]
5 partitions:
#sizeoffset fstype [fsize bsize cpg/sgs]
 d:   1994752 0 unused  0 0# (Cyl.  0 -   3895)
 e:   1994512   240  MSDOS # (Cyl.  0*-   3895)

golem s mount_msdos ./rumpsd0a /mnt
mount_msdos: ./rumpsd0a is a non-resolved or relative path.
mount_msdos: using /usr/home/pooka/src/umserv/rumpsd0a instead.
mount_msdos: /usr/home/pooka/src/umserv/rumpsd0a on /mnt: Device not configured

golem s mount_msdos ./rumpsd0e /mnt
mount_msdos: ./rumpsd0e is a non-resolved or relative path.
mount_msdos: using /usr/home/pooka/src/umserv/rumpsd0e instead.
golem df -h /mnt
Filesystem   Size   Used  Avail %Cap 
Mounted on
/usr/home/pooka/src/umserv/rumpsd0e  974M   5.2M   968M   0% /mnt

etcetc.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/examples/rump/umserv/Makefile \
src/share/examples/rump/umserv/umserv.c

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

Added files:

Index: src/share/examples/rump/umserv/Makefile
diff -u /dev/null src/share/examples/rump/umserv/Makefile:1.1
--- /dev/null	Tue Dec 22 18:36:02 2009
+++ src/share/examples/rump/umserv/Makefile	Tue Dec 22 18:36:02 2009
@@ -0,0 +1,10 @@
+PROG=umserv
+NOMAN=
+LDADD+=-lrumpdev_usbhc -lrumpdev_umass -lrumpdev_usb -lrumpdev_disk -lrumpdev
+LDADD+=-lrumpvfs
+LDADD+=-lrump -lrumpuser -lpthread
+
+WARNS=4
+DBG=-g
+
+.include bsd.prog.mk
Index: src/share/examples/rump/umserv/umserv.c
diff -u /dev/null src/share/examples/rump/umserv/umserv.c:1.1
--- /dev/null	Tue Dec 22 18:36:02 2009
+++ src/share/examples/rump/umserv/umserv.c	Tue Dec 22 18:36:02 2009
@@ -0,0 +1,224 @@
+/*	$NetBSD: umserv.c,v 1.1 2009/12/22 18:36:02 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
+ *
+ * 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 AUTHOR ``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 AUTHOR 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.
+ */
+
+/*
+ * This is a [quick, simple  dirty] userspace s...@umass server.
+ * We probe USB devices using rump and attach them to the host kernel
+ * using pud(4).  The resulting block devices can be e.g. read
+ * and/or mounted.
+ *
+ * Since there is no devfs support in NetBSD, we create crudo  cotto
+ * device nodes in the current directory.  Operating on these in the
+ * host OS will direct operations to this userspace server, e.g.:
+ *   golem disklabel ./rumpsd0d
+ *   golem mount_msdos ./rumpsd0e /mnt
+ * will cause file system access to /mnt be backed by the umass server
+ * in userspace.  Due to the relatively experimental nature of this
+ * server, rump file servers are recommended for mounting experiments.
+ */
+
+#include sys/types.h
+#include sys/syslimits.h
+
+#include dev/pud/pud_msgif.h
+
+#include rump/rump.h
+
+#include assert.h
+#include err.h
+#include errno.h
+#include fcntl.h
+#include paths.h
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include unistd.h
+
+/*
+ * No devfs?  No problem.  We just hack a bit  wait for the dust to settle.
+ */
+#define NODEBASE rumpsd0
+#define MYMAJOR 411
+static int
+makenodes(void)
+{
+	char path[PATH_MAX];
+	struct stat sb;
+	int i, j, rv;
+
+	for (i = 0; i  2; i++) {
+		int minnum = 0;
+
+		for (j = 0; j  8; j++, minnum++) {
+			

CVS commit: src/sys/sys

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Dec 22 18:55:26 UTC 2009

Modified Files:
src/sys/sys: disklabel.h dkio.h

Log Message:
Limit DIOCGPART and struct partinfo visibility to _KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/sys/disklabel.h
cvs rdiff -u -r1.14 -r1.15 src/sys/sys/dkio.h

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

Modified files:

Index: src/sys/sys/disklabel.h
diff -u src/sys/sys/disklabel.h:1.106 src/sys/sys/disklabel.h:1.107
--- src/sys/sys/disklabel.h:1.106	Fri Nov 20 17:43:35 2009
+++ src/sys/sys/disklabel.h	Tue Dec 22 18:55:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.h,v 1.106 2009/11/20 17:43:35 pooka Exp $	*/
+/*	$NetBSD: disklabel.h,v 1.107 2009/12/22 18:55:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -425,6 +425,7 @@
 	int	 df_reg[8];		/* result */
 };
 
+#ifdef _KERNEL
 /*
  * Structure used internally to retrieve information about a partition
  * on a disk.
@@ -434,8 +435,6 @@
 	struct partition *part;
 };
 
-#ifdef _KERNEL
-
 struct disk;
 
 int disk_read_sectors(void (*)(struct buf *), const struct disklabel *,

Index: src/sys/sys/dkio.h
diff -u src/sys/sys/dkio.h:1.14 src/sys/sys/dkio.h:1.15
--- src/sys/sys/dkio.h:1.14	Fri Aug 17 11:05:03 2007
+++ src/sys/sys/dkio.h	Tue Dec 22 18:55:25 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkio.h,v 1.14 2007/08/17 11:05:03 pavel Exp $	*/
+/*	$NetBSD: dkio.h,v 1.15 2009/12/22 18:55:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 1987, 1988, 1993
@@ -42,7 +42,10 @@
 #define DIOCGDINFO	_IOR('d', 101, struct disklabel)/* get */
 #define DIOCSDINFO	_IOW('d', 102, struct disklabel)/* set */
 #define DIOCWDINFO	_IOW('d', 103, struct disklabel)/* set, update disk */
+
+#ifdef _KERNEL
 #define DIOCGPART	_IOW('d', 104, struct partinfo)	/* get partition */
+#endif
 
 #if defined(__HAVE_OLD_DISKLABEL)  defined(_KERNEL)
 #define ODIOCGDINFO	_IOR('d', 101, struct olddisklabel)/* get */



CVS commit: src/sys/kern

2009-12-22 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Tue Dec 22 20:50:47 UTC 2009

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

Log Message:
Use sizeof correct type, not pointer to wrong type.
Fixes PR/42498.
This has been wrong since the initial import!


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/kern/kern_event.c

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

Modified files:

Index: src/sys/kern/kern_event.c
diff -u src/sys/kern/kern_event.c:1.68 src/sys/kern/kern_event.c:1.69
--- src/sys/kern/kern_event.c:1.68	Sun Dec 20 09:36:05 2009
+++ src/sys/kern/kern_event.c	Tue Dec 22 20:50:46 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_event.c,v 1.68 2009/12/20 09:36:05 dsl Exp $	*/
+/*	$NetBSD: kern_event.c,v 1.69 2009/12/22 20:50:46 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_event.c,v 1.68 2009/12/20 09:36:05 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_event.c,v 1.69 2009/12/22 20:50:46 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -318,7 +318,7 @@
 	if (user_kfilterc + 1  user_kfiltermaxc) {
 		/* Grow in KFILTER_EXTENT chunks. */
 		user_kfiltermaxc += KFILTER_EXTENT;
-		len = user_kfiltermaxc * sizeof(struct filter *);
+		len = user_kfiltermaxc * sizeof(*kfilter);
 		kfilter = kmem_alloc(len, KM_SLEEP);
 		memset((char *)kfilter + user_kfiltersz, 0, len - user_kfiltersz);
 		if (user_kfilters != NULL) {



CVS commit: src/sbin/fdisk

2009-12-22 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Tue Dec 22 21:04:38 UTC 2009

Modified Files:
src/sbin/fdisk: fdisk.c

Log Message:
Editing partitions larger than 1TB works better if 'decimal' returns
64 bit integer values!


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.127 src/sbin/fdisk/fdisk.c:1.128
--- src/sbin/fdisk/fdisk.c:1.127	Sun Dec 20 17:32:09 2009
+++ src/sbin/fdisk/fdisk.c	Tue Dec 22 21:04:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.127 2009/12/20 17:32:09 dsl Exp $ */
+/*	$NetBSD: fdisk.c,v 1.128 2009/12/22 21:04:37 dsl Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.127 2009/12/20 17:32:09 dsl Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.128 2009/12/22 21:04:37 dsl Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -284,7 +284,7 @@
 int	read_gpt(daddr_t, struct gpt_hdr *);
 int	delete_gpt(struct gpt_hdr *);
 int	yesno(const char *, ...);
-int	decimal(const char *, int64_t, int, int64_t, int64_t);
+int64_t	decimal(const char *, int64_t, int, int64_t, int64_t);
 #define DEC_SEC		1		/* asking for a sector number */
 #define	DEC_RND		2		/* round to end of first track */
 #define	DEC_RND_0	4		/* round 0 to size of a track */
@@ -2682,7 +2682,7 @@
 	return (first == 'y' || first == 'Y');
 }
 
-int
+int64_t
 decimal(const char *prompt, int64_t dflt, int flags, int64_t minval, int64_t maxval)
 {
 	int64_t acc = 0;



CVS commit: src/sbin/fdisk

2009-12-22 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Tue Dec 22 21:55:12 UTC 2009

Modified Files:
src/sbin/fdisk: fdisk.c

Log Message:
Add support for partition being aligned on non-cylinder boundaries.
Info can be specified with -A parameter.
Default is based on how the first partition is defined.
For empty disks larger than 128GB (arbitrary figure) use 1MB alignment.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sbin/fdisk/fdisk.c

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.128 src/sbin/fdisk/fdisk.c:1.129
--- src/sbin/fdisk/fdisk.c:1.128	Tue Dec 22 21:04:37 2009
+++ src/sbin/fdisk/fdisk.c	Tue Dec 22 21:55:12 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.128 2009/12/22 21:04:37 dsl Exp $ */
+/*	$NetBSD: fdisk.c,v 1.129 2009/12/22 21:55:12 dsl Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.128 2009/12/22 21:04:37 dsl Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.129 2009/12/22 21:55:12 dsl Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -150,12 +150,12 @@
 char *boot_path = 0;			/* name of file we actually opened */
 
 #ifdef BOOTSEL
-
-#define OPTIONS			0123BFSafiluvs:b:c:E:r:w:t:T:
+#define BOOTSEL_OPTIONS	B
 #else
+#define BOOTSEL_OPTIONS	
 #define change_part(e, p, id, st, sz, bm) change__part(e, p, id, st, sz)
-#define OPTIONS			0123FSafiluvs:b:c:E:r:w:
 #endif
+#define OPTIONS	BOOTSEL_OPTIONS 0123FSafiluvA:b:c:E:r:s:w:
 
 /*
  * Disk geometry and partition alignment.
@@ -215,8 +215,8 @@
 int partition = -1;
 
 /* Alignment of partition, and offset if first sector unusable */
-#define	ptn_alignment	dos_cylindersectors
-#define	ptn_offset	dos_sectors
+unsigned int ptn_alignment;	/* default dos_cylindersectors */
+unsigned int ptn_offset;	/* default dos_sectors */
 
 int fd = -1, wfd = -1, *rfd = fd;
 char *disk_file = NULL;
@@ -264,16 +264,17 @@
 int	read_boot(const char *, void *, size_t, int);
 void	init_sector0(int);
 void	intuit_translated_geometry(void);
-void	get_geometry(void);
+void	get_bios_geometry(void);
 void	get_extended_ptn(void);
+static void get_ptn_alignmemt(void);
 #if (defined(__i386__) || defined(__x86_64__))  !HAVE_NBTOOL_CONFIG_H
 void	get_diskname(const char *, char *, size_t);
 #endif /* (defined(__i386__) || defined(__x86_64__))  !HAVE_NBTOOL_CONFIG_H */
 int	change_part(int, int, int, daddr_t, daddr_t, char *);
-void	print_params(void);
+void	print_geometry(void);
 int	first_active(void);
 void	change_active(int);
-void	get_params_to_use(void);
+void	change_bios_geometry(void);
 void	dos(int, unsigned char *, unsigned char *, unsigned char *);
 int	open_disk(int);
 int	read_disk(daddr_t, void *);
@@ -287,7 +288,7 @@
 int64_t	decimal(const char *, int64_t, int, int64_t, int64_t);
 #define DEC_SEC		1		/* asking for a sector number */
 #define	DEC_RND		2		/* round to end of first track */
-#define	DEC_RND_0	4		/* round 0 to size of a track */
+#define	DEC_RND_0	4		/* convert 0 to size of a track */
 #define DEC_RND_DOWN	8		/* subtract 1 track */
 #define DEC_RND_DOWN_2	16		/* subtract 2 tracks */
 void	string(const char *, int, char *);
@@ -341,7 +342,7 @@
 	v_flag = 0;
 	E_flag = 0;
 	csysid = cstart = csize = 0;
-	while ((ch = getopt(argc, argv, OPTIONS)) != -1)
+	while ((ch = getopt(argc, argv, OPTIONS)) != -1) {
 		switch (ch) {
 		case '0':
 			partition = 0;
@@ -415,6 +416,15 @@
 			if (b_cyl  MAXCYL)
 b_cyl = MAXCYL;
 			break;
+		case 'A':	/* Partition alignment[/offset] */
+			if (sscanf(optarg, %u/%u%n, ptn_alignment,
+ptn_offset, n)  1
+			|| optarg[n] != 0
+			|| ptn_offset  ptn_alignment)
+errx(1, Bad argument to the -A flag.);
+			if (ptn_offset == 0)
+ptn_offset = ptn_alignment;
+			break;
 		case 'c':	/* file/directory containing boot code */
 			if (strchr(optarg, '/') != NULL 
 			stat(optarg, sb) == 0 
@@ -442,6 +452,7 @@
 		default:
 			usage();
 		}
+	}
 	argc -= optind;
 	argv += optind;
 
@@ -489,11 +500,17 @@
 	read_gpt(GPT_HDR_BLKNO, gpt1);
 	read_gpt(disksectors - 1, gpt2);
 
-#if (defined(__i386__) || defined(__x86_64__))  !HAVE_NBTOOL_CONFIG_H
-	get_geometry();
-#else
-	intuit_translated_geometry();
-#endif
+	if (b_flag) {
+		dos_cylinders = b_cyl;
+		dos_heads = b_head;
+		dos_sectors = b_sec;
+	} else {
+		get_bios_geometry();
+	}
+
+	if (ptn_alignment == 0)
+		get_ptn_alignmemt();
+
 	get_extended_ptn();
 
 #ifdef BOOTSEL
@@ -503,11 +520,11 @@
 	if (E_flag  !u_flag  partition = ext.num_ptn)
 		errx(1, Extended partition %d is not defined., partition);
 
-	if (u_flag  (!f_flag || b_flag))
-		get_params_to_use();
-
 	/* Do the update stuff! */
 	if (u_flag) {
+		if (!f_flag  !b_flag)
+			change_bios_geometry();
+
 		if (s_flag)
 			change_part(E_flag, partition, csysid, cstart, csize,
 cbootmenu);
@@ -527,11 +544,12 @@
 prompt = 

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

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:03:27 UTC 2009

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

Log Message:
Import libdwarf from FreeBSD 8.0-RC1.
ok t...@.

Status:

Vendor Tag: FreeBSD
Release Tags:   FreeBSD-8-0-RC1

N src/external/bsd/libdwarf/dist/Makefile
N src/external/bsd/libdwarf/dist/dwarf_loc.c
N src/external/bsd/libdwarf/dist/dwarf_init.c
N src/external/bsd/libdwarf/dist/dwarf_form.c
N src/external/bsd/libdwarf/dist/dwarf_finish.c
N src/external/bsd/libdwarf/dist/dwarf_errno.c
N src/external/bsd/libdwarf/dist/dwarf_errmsg.c
N src/external/bsd/libdwarf/dist/dwarf_dump.c
N src/external/bsd/libdwarf/dist/dwarf_die.c
N src/external/bsd/libdwarf/dist/dwarf_dealloc.c
N src/external/bsd/libdwarf/dist/dwarf_cu.c
N src/external/bsd/libdwarf/dist/dwarf_attrval.c
N src/external/bsd/libdwarf/dist/dwarf_attr.c
N src/external/bsd/libdwarf/dist/dwarf_abbrev.c
N src/external/bsd/libdwarf/dist/dwarf.h
N src/external/bsd/libdwarf/dist/_libdwarf.h
N src/external/bsd/libdwarf/dist/libdwarf.h

No conflicts created by this import



CVS commit: src/external/bsd/libdwarf

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:06:54 UTC 2009

Added Files:
src/external/bsd/libdwarf: prepare-import.sh

Log Message:
Add a script to prepare libdwarf for import.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libdwarf/prepare-import.sh

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

Added files:

Index: src/external/bsd/libdwarf/prepare-import.sh
diff -u /dev/null src/external/bsd/libdwarf/prepare-import.sh:1.1
--- /dev/null	Wed Dec 23 00:06:54 2009
+++ src/external/bsd/libdwarf/prepare-import.sh	Wed Dec 23 00:06:53 2009
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $NetBSD: prepare-import.sh,v 1.1 2009/12/23 00:06:53 darran Exp $
+
+# Copy the FreeBSD src/lib/libdwarf directory contents to dist.  Run
+# this script and you're done.
+#
+# lib/ is built as SUBDIR from external/lib/Makefile.
+#
+# Use the following template to import
+#  cvs import src/external/bsd/libdwarf/dist FreeBSD FreeBSD-X-Y-Z
+#
+# don't forget to bump the lib/shlib_version if necessary
+#
+
+set -e
+
+echo Adding RCS tags ..
+for f in $(grep -RL '\$NetBSD.*\$' dist | grep -v CVS); do
+case $f in
+*.[ch] | *.m4)
+	cat -  ${f}_tmp - EOF
+		/*	\$NetBSD\$	*/
+
+	EOF
+	sed -e 's,^__FBSDID.*,\/\*  \*\/\
+__RCSID\(\\$NetBSD\$\\)\;,g' ${f}  ${f}_tmp
+	mv ${f}_tmp ${f}
+	;;
+*.[0-9])
+	cat - ${f}  ${f}_tmp - EOF
+		.\	\$NetBSD\$
+		.\
+	EOF
+	mv ${f}_tmp ${f}
+	;;
+*)
+	echo No RCS tag added to ${f}
+	;;
+esac
+done
+
+echo prepare-import done



CVS commit: src/external/bsd/libdwarf

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:10:15 UTC 2009

Added Files:
src/external/bsd/libdwarf: Makefile Makefile.inc
src/external/bsd/libdwarf/lib: Makefile shlib_version

Log Message:
Add build glue.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/libdwarf/Makefile \
src/external/bsd/libdwarf/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/libdwarf/lib/Makefile \
src/external/bsd/libdwarf/lib/shlib_version

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

Added files:

Index: src/external/bsd/libdwarf/Makefile
diff -u /dev/null src/external/bsd/libdwarf/Makefile:1.1
--- /dev/null	Wed Dec 23 00:10:15 2009
+++ src/external/bsd/libdwarf/Makefile	Wed Dec 23 00:10:15 2009
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/23 00:10:15 darran Exp $
+
+SUBDIR=		lib
+
+.include bsd.subdir.mk
Index: src/external/bsd/libdwarf/Makefile.inc
diff -u /dev/null src/external/bsd/libdwarf/Makefile.inc:1.1
--- /dev/null	Wed Dec 23 00:10:15 2009
+++ src/external/bsd/libdwarf/Makefile.inc	Wed Dec 23 00:10:15 2009
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile.inc,v 1.1 2009/12/23 00:10:15 darran Exp $
+
+.include bsd.own.mk
+
+LIBDWARF_DIR=	${NETBSDSRCDIR}/external/bsd/libdwarf/dist
+
+CPPFLAGS+=	-I${LIBDWARF_DIR}
+
+WARNS?=		4
+
+.PATH:		${LIBDWARF_DIR}

Index: src/external/bsd/libdwarf/lib/Makefile
diff -u /dev/null src/external/bsd/libdwarf/lib/Makefile:1.1
--- /dev/null	Wed Dec 23 00:10:15 2009
+++ src/external/bsd/libdwarf/lib/Makefile	Wed Dec 23 00:10:15 2009
@@ -0,0 +1,28 @@
+#	$NetBSD: Makefile,v 1.1 2009/12/23 00:10:15 darran Exp $
+
+.include bsd.init.mk
+
+LIB=	dwarf
+
+SRCS=	dwarf_abbrev.c		\
+	dwarf_attr.c		\
+	dwarf_attrval.c		\
+	dwarf_cu.c		\
+	dwarf_dealloc.c		\
+	dwarf_die.c		\
+	dwarf_dump.c		\
+	dwarf_errmsg.c		\
+	dwarf_errno.c		\
+	dwarf_finish.c		\
+	dwarf_form.c		\
+	dwarf_init.c		\
+	dwarf_loc.c
+
+INCS=		dwarf.h libdwarf.h
+INCSDIR=	/usr/include
+
+CPPFLAGS+=	-I${.CURDIR}
+
+WITHOUT_MAN=	yes
+
+.include bsd.lib.mk
Index: src/external/bsd/libdwarf/lib/shlib_version
diff -u /dev/null src/external/bsd/libdwarf/lib/shlib_version:1.1
--- /dev/null	Wed Dec 23 00:10:15 2009
+++ src/external/bsd/libdwarf/lib/shlib_version	Wed Dec 23 00:10:15 2009
@@ -0,0 +1,6 @@
+#	$NetBSD: shlib_version,v 1.1 2009/12/23 00:10:15 darran Exp $
+#	Remember to update distrib/sets/lists/base/shl.* when changing
+#
+
+major=0
+minor=0



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

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:11:30 UTC 2009

Modified Files:
src/external/bsd/libdwarf/dist: _libdwarf.h

Log Message:
while (0) - while (/*CONSTCOND*/0)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libdwarf/dist/_libdwarf.h

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/libdwarf/dist/_libdwarf.h
diff -u src/external/bsd/libdwarf/dist/_libdwarf.h:1.1.1.1 src/external/bsd/libdwarf/dist/_libdwarf.h:1.2
--- src/external/bsd/libdwarf/dist/_libdwarf.h:1.1.1.1	Wed Dec 23 00:03:27 2009
+++ src/external/bsd/libdwarf/dist/_libdwarf.h	Wed Dec 23 00:11:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: _libdwarf.h,v 1.1.1.1 2009/12/23 00:03:27 darran Exp $	*/
+/*	$NetBSD: _libdwarf.h,v 1.2 2009/12/23 00:11:30 darran Exp $	*/
 
 /*-
  * Copyright (c) 2007 John Birrell (j...@freebsd.org)
@@ -66,7 +66,7 @@
 	_e-err_func  = __func__;			\
 	_e-err_line  = __LINE__;			\
 	_e-err_msg[0] = '\0';\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 #define	DWARF_SET_ELF_ERROR(_e, _err)	do { 		\
 	_e-err_error = DWARF_E_ELF;			\
@@ -74,7 +74,7 @@
 	_e-err_func  = __func__;			\
 	_e-err_line  = __LINE__;			\
 	_e-err_msg[0] = '\0';\
-	} while (0)
+	} while (/*CONSTCOND*/0)
 
 struct _Dwarf_AttrValue {
 	uint64_t	av_attrib;	/* DW_AT_ */



CVS commit: src/sys/dev/pci

2009-12-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec 23 00:11:36 UTC 2009

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

Log Message:
enable mem space if it isn't already enabled.  several bioses leave
this not enabled, and viaide kind of depends upon it.

fixes viaide(4) on several machines.

idea from PR 38011, but reworked a little.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/viaide.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/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.65 src/sys/dev/pci/viaide.c:1.66
--- src/sys/dev/pci/viaide.c:1.65	Tue Dec 22 16:32:41 2009
+++ src/sys/dev/pci/viaide.c	Wed Dec 23 00:11:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.65 2009/12/22 16:32:41 tsutsui Exp $	*/
+/*	$NetBSD: viaide.c,v 1.66 2009/12/23 00:11:36 mrg Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.65 2009/12/22 16:32:41 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.66 2009/12/23 00:11:36 mrg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -851,6 +851,18 @@
 	pciide_mapreg_dma(sc, pa);
 	aprint_verbose(\n);
 
+	/*
+	 * Enable memory-space access if it isn't already there.
+	 */
+	if (pa-pa_memt  (pa-pa_flags  PCI_FLAGS_MEM_ENABLED) == 0) {
+		pcireg_t csr;
+
+		pa-pa_flags |= PCI_FLAGS_MEM_ENABLED;
+		csr = pci_conf_read(pa-pa_pc, pa-pa_tag, PCI_COMMAND_STATUS_REG);
+		pci_conf_write(pa-pa_pc, pa-pa_tag, PCI_COMMAND_STATUS_REG,
+		   csr | PCI_COMMAND_MEM_ENABLE);
+	}
+
 	if (sc-sc_dma_ok) {
 		sc-sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_UDMA | ATAC_CAP_DMA;
 		sc-sc_wdcdev.irqack = pciide_irqack;



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

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:12:57 UTC 2009

Modified Files:
src/external/bsd/libdwarf/dist: dwarf_init.c

Log Message:
Fix a signed vrs unsigned cast.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/libdwarf/dist/dwarf_init.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/bsd/libdwarf/dist/dwarf_init.c
diff -u src/external/bsd/libdwarf/dist/dwarf_init.c:1.1.1.1 src/external/bsd/libdwarf/dist/dwarf_init.c:1.2
--- src/external/bsd/libdwarf/dist/dwarf_init.c:1.1.1.1	Wed Dec 23 00:03:22 2009
+++ src/external/bsd/libdwarf/dist/dwarf_init.c	Wed Dec 23 00:12:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwarf_init.c,v 1.1.1.1 2009/12/23 00:03:22 darran Exp $	*/
+/*	$NetBSD: dwarf_init.c,v 1.2 2009/12/23 00:12:57 darran Exp $	*/
 
 /*-
  * Copyright (c) 2007 John Birrell (j...@freebsd.org)
@@ -247,7 +247,7 @@
 {
 	uint8_t *ret;
 
-	uint8_t *src = (char *) (*dp)-d_buf + *offsetp;
+	uint8_t *src = (uint8_t *) (*dp)-d_buf + *offsetp;
 
 	ret = src;
 



CVS commit: src/external/lib

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:17:41 UTC 2009

Modified Files:
src/external/lib: Makefile

Log Message:
Add libdwarf to the build.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/lib/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/lib/Makefile
diff -u src/external/lib/Makefile:1.14 src/external/lib/Makefile:1.15
--- src/external/lib/Makefile:1.14	Sun Dec 20 05:52:41 2009
+++ src/external/lib/Makefile	Wed Dec 23 00:17:40 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2009/12/20 05:52:41 thorpej Exp $
+#	$NetBSD: Makefile,v 1.15 2009/12/23 00:17:40 darran Exp $
 
 #
 # This Makefile exists to provide a single point to build
@@ -32,6 +32,7 @@
 SUBDIR+= ../bsd/libarchive/lib
 SUBDIR+= ../bsd/libevent/lib
 SUBDIR+= ../bsd/libelf/lib
+SUBDIR+= ../bsd/libdwarf/lib
 SUBDIR+= ../bsd/am-utils/lib
 SUBDIR+= ../bsd/bind/lib
 SUBDIR+= ../bsd/file/lib



CVS commit: src/sys/kern

2009-12-22 Thread Elad Efrat
Module Name:src
Committed By:   elad
Date:   Wed Dec 23 00:21:39 UTC 2009

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

Log Message:
Including sysctl.h once is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.412 -r1.413 src/sys/kern/init_main.c

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

Modified files:

Index: src/sys/kern/init_main.c
diff -u src/sys/kern/init_main.c:1.412 src/sys/kern/init_main.c:1.413
--- src/sys/kern/init_main.c:1.412	Thu Dec 17 01:25:10 2009
+++ src/sys/kern/init_main.c	Wed Dec 23 00:21:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.412 2009/12/17 01:25:10 rmind Exp $	*/
+/*	$NetBSD: init_main.c,v 1.413 2009/12/23 00:21:38 elad Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.412 2009/12/17 01:25:10 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.413 2009/12/23 00:21:38 elad Exp $);
 
 #include opt_ddb.h
 #include opt_ipsec.h
@@ -152,7 +152,6 @@
 #include sys/pset.h
 #include sys/sysctl.h
 #include sys/reboot.h
-#include sys/sysctl.h
 #include sys/event.h
 #include sys/mbuf.h
 #include sys/sched.h



CVS commit: src/distrib/sets/lists

2009-12-22 Thread Darran Hunt
Module Name:src
Committed By:   darran
Date:   Wed Dec 23 00:33:26 UTC 2009

Modified Files:
src/distrib/sets/lists/base: shl.elf shl.mi
src/distrib/sets/lists/comp: mi shl.mi

Log Message:
Add libdwarf files.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/distrib/sets/lists/base/shl.elf
cvs rdiff -u -r1.508 -r1.509 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.1352 -r1.1353 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/base/shl.elf
diff -u src/distrib/sets/lists/base/shl.elf:1.194 src/distrib/sets/lists/base/shl.elf:1.195
--- src/distrib/sets/lists/base/shl.elf:1.194	Sun Dec 20 05:53:34 2009
+++ src/distrib/sets/lists/base/shl.elf	Wed Dec 23 00:33:25 2009
@@ -1,4 +1,4 @@
-# $NetBSD: shl.elf,v 1.194 2009/12/20 05:53:34 thorpej Exp $
+# $NetBSD: shl.elf,v 1.195 2009/12/23 00:33:25 darran Exp $
 #
 # Note:	Do not mark old major and major.minor shared libraries as
 #	obsolete; just remove the entry, as third-party applications
@@ -124,6 +124,8 @@
 ./usr/lib/libdns.so.5base-bind-shlib
 ./usr/lib/libdns_sd.sobase-mdns-shlib		mdns
 ./usr/lib/libdns_sd.so.0			base-mdns-shlib		mdns
+./usr/lib/libdwarf.sobase-sys-shlib
+./usr/lib/libdwarf.so.0base-sys-shlib
 ./usr/lib/libedit.sobase-sys-shlib
 ./usr/lib/libedit.so.3base-sys-shlib
 ./usr/lib/libelf.sobase-sys-shlib

Index: src/distrib/sets/lists/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.508 src/distrib/sets/lists/base/shl.mi:1.509
--- src/distrib/sets/lists/base/shl.mi:1.508	Sun Dec 20 05:53:34 2009
+++ src/distrib/sets/lists/base/shl.mi	Wed Dec 23 00:33:25 2009
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.508 2009/12/20 05:53:34 thorpej Exp $
+# $NetBSD: shl.mi,v 1.509 2009/12/23 00:33:25 darran Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -70,6 +70,7 @@
 ./usr/lib/libdevmapper.so.1.0			base-lvm-shlib		lvm
 ./usr/lib/libdns.so.5.0base-bind-shlib
 ./usr/lib/libdns_sd.so.0.0			base-mdns-shlib		mdns
+./usr/lib/libdwarf.so.0.0			base-sys-shlib
 ./usr/lib/libedit.so.3.0			base-sys-shlib
 ./usr/lib/libelf.so.0.0base-sys-shlib
 ./usr/lib/libevent.so.3.2			base-sys-shlib

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1352 src/distrib/sets/lists/comp/mi:1.1353
--- src/distrib/sets/lists/comp/mi:1.1352	Tue Dec 22 13:38:40 2009
+++ src/distrib/sets/lists/comp/mi	Wed Dec 23 00:33:25 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1352 2009/12/22 13:38:40 jmmv Exp $
+#	$NetBSD: mi,v 1.1353 2009/12/23 00:33:25 darran Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -613,6 +613,7 @@
 ./usr/include/disktab.hcomp-c-include
 ./usr/include/dlfcn.hcomp-c-include
 ./usr/include/dns_sd.hcomp-mdns-include	mdns
+./usr/include/dwarf.hcomp-c-include
 ./usr/include/elf.hcomp-c-include
 ./usr/include/err.hcomp-c-include
 ./usr/include/errno.hcomp-c-include
@@ -1375,6 +1376,7 @@
 ./usr/include/ldap_features.h			comp-ldap-include	ldap
 ./usr/include/ldap_schema.h			comp-ldap-include	ldap
 ./usr/include/ldap_utf8.h			comp-ldap-include	ldap
+./usr/include/libdwarf.h			comp-c-include
 ./usr/include/libelf.hcomp-c-include
 ./usr/include/libgen.hcomp-c-include
 ./usr/include/libintl.hcomp-c-include
@@ -2364,6 +2366,9 @@
 ./usr/lib/libdns_sd.acomp-mdns-lib		mdns
 ./usr/lib/libdns_sd_g.a-unknown-		debuglib,mdns
 ./usr/lib/libdns_sd_p.acomp-mdns-proflib	profile,mdns
+./usr/lib/libdwarf.acomp-c-lib
+./usr/lib/libdwarf_g.a-unknown-		debuglib
+./usr/lib/libdwarf_p.acomp-c-proflib		profile
 ./usr/lib/libedit.acomp-c-lib
 ./usr/lib/libedit_g.a-unknown-		debuglib
 ./usr/lib/libedit_p.acomp-c-proflib		profile

Index: src/distrib/sets/lists/comp/shl.mi
diff -u src/distrib/sets/lists/comp/shl.mi:1.95 src/distrib/sets/lists/comp/shl.mi:1.96
--- src/distrib/sets/lists/comp/shl.mi:1.95	Sun Dec 20 05:53:35 2009
+++ src/distrib/sets/lists/comp/shl.mi	Wed Dec 23 00:33:26 2009
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.95 2009/12/20 05:53:35 thorpej Exp $
+# $NetBSD: shl.mi,v 1.96 2009/12/23 00:33:26 darran Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -24,6 +24,7 @@
 ./usr/lib/libdevmapper_pic.a			comp-lvm-piclib		lvm
 ./usr/lib/libdns_pic.acomp-bind-piclib
 ./usr/lib/libdns_sd_pic.a			comp-mdns-piclib	mdns
+./usr/lib/libdwarf_pic.a			comp-c-piclib
 ./usr/lib/libedit_pic.acomp-c-piclib
 ./usr/lib/libelf_pic.acomp-c-piclib
 ./usr/lib/libevent_pic.a			comp-c-piclib



CVS commit: src

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 23 01:04:46 UTC 2009

Modified Files:
src/share/man/man4: ugen.4
src/sys/arch/amd64/conf: GENERIC
src/sys/arch/evbarm/conf: MPCSA_GENERIC
src/sys/arch/evbppc/conf: OPENBLOCKS266_OPT
src/sys/arch/i386/conf: ALL GENERIC XBOX
src/sys/arch/iyonix/conf: GENERIC
src/sys/dev/usb: files.usb ugen.c

Log Message:
unifdef -D UGEN_BULK_RA_WB

Default behaviour unchanged, the feature must still be explicitly
enabled for a ugen fd.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/man/man4/ugen.4
cvs rdiff -u -r1.259 -r1.260 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT
cvs rdiff -u -r1.222 -r1.223 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.954 -r1.955 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/conf/XBOX
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/usb/ugen.c

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

Modified files:

Index: src/share/man/man4/ugen.4
diff -u src/share/man/man4/ugen.4:1.28 src/share/man/man4/ugen.4:1.29
--- src/share/man/man4/ugen.4:1.28	Mon Dec 21 19:04:36 2009
+++ src/share/man/man4/ugen.4	Wed Dec 23 01:04:45 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: ugen.4,v 1.28 2009/12/21 19:04:36 gdt Exp $
+.\ $NetBSD: ugen.4,v 1.29 2009/12/23 01:04:45 pooka Exp $
 .\
 .\ Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -35,7 +35,6 @@
 .Nd USB generic device support
 .Sh SYNOPSIS
 .Cd ugen* at uhub? flags N
-.Cd options UGEN_BULK_RA_WB
 .Sh DESCRIPTION
 The
 .Nm
@@ -109,29 +108,22 @@
 .Xr write 2
 should be used.
 All IO operations on a bulk endpoint are normally unbuffered.
-On kernels built with the
-.Dv UGEN_BULK_RA_WB
-option, the
+The
 .Dv USB_SET_BULK_RA
 and
 .Dv USB_SET_BULK_WB
 .Xr ioctl 2
-calls are available, and enable read-ahead and write-behind buffering
-respectively.
+calls enable read-ahead and write-behind buffering, respectively.
 This buffering supports fixed-sized USB transfers and is intended for
 devices with regular and continuing data transfers.
 When read-ahead or write-behind are enabled, the file descriptor
 may be set to use non-blocking IO.
 .Pp
-When in a
-.Dv UGEN_BULK_RA_WB
-mode,
+When in a read-ahead/writeback mode,
 .Xr select 2
 for read and write operates normally, returning true if there is data
 in the read buffer and space in the write buffer, respectively.
-When not in a
-.Dv UGEN_BULK_RA_WB
-mode,
+When not,
 .Xr select 2
 always returns true, because there is no way to predict how the device
 will respond to a read or write request.

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.259 src/sys/arch/amd64/conf/GENERIC:1.260
--- src/sys/arch/amd64/conf/GENERIC:1.259	Sat Dec  5 20:11:03 2009
+++ src/sys/arch/amd64/conf/GENERIC	Wed Dec 23 01:04:45 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.259 2009/12/05 20:11:03 pooka Exp $
+# $NetBSD: GENERIC,v 1.260 2009/12/23 01:04:45 pooka Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.259 $
+#ident 		GENERIC-$Revision: 1.260 $
 
 maxusers	64		# estimated number of users
 
@@ -905,8 +905,6 @@
 
 # USB Generic driver
 ugen*	at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-options	UGEN_BULK_RA_WB
 
 # USB 3G datacards
 u3g*	at uhub? port ?

Index: src/sys/arch/evbarm/conf/MPCSA_GENERIC
diff -u src/sys/arch/evbarm/conf/MPCSA_GENERIC:1.11 src/sys/arch/evbarm/conf/MPCSA_GENERIC:1.12
--- src/sys/arch/evbarm/conf/MPCSA_GENERIC:1.11	Sat Dec  5 20:11:11 2009
+++ src/sys/arch/evbarm/conf/MPCSA_GENERIC	Wed Dec 23 01:04:46 2009
@@ -1,4 +1,4 @@
-# $NetBSD: MPCSA_GENERIC,v 1.11 2009/12/05 20:11:11 pooka Exp $
+# $NetBSD: MPCSA_GENERIC,v 1.12 2009/12/23 01:04:46 pooka Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.11 $
+#ident 		GENERIC-$Revision: 1.12 $
 
 maxusers	32		# estimated number of users
 
@@ -574,8 +574,6 @@
 
 # USB Generic driver
 #ugen*	at uhub? port ?
-# On ugen bulk endpoints, perform read-ahead and write-behind.
-#options UGEN_BULK_RA_WB
 
 
 # IrDA and Consumer Ir devices

Index: src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT
diff -u src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT:1.10 src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT:1.11
--- src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT:1.10	Sat Jan  3 17:47:24 2009
+++ src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT	Wed Dec 23 01:04:46 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: OPENBLOCKS266_OPT,v 1.10 2009/01/03 17:47:24 

CVS commit: src/sys

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 23 01:09:57 UTC 2009

Modified Files:
src/sys/rump/include/rump: rump_namei.h
src/sys/sys: namei.h

Log Message:
regen: INRENAME


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/include/rump/rump_namei.h
cvs rdiff -u -r1.67 -r1.68 src/sys/sys/namei.h

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

Modified files:

Index: src/sys/rump/include/rump/rump_namei.h
diff -u src/sys/rump/include/rump/rump_namei.h:1.6 src/sys/rump/include/rump/rump_namei.h:1.7
--- src/sys/rump/include/rump/rump_namei.h:1.6	Sun Sep 27 17:24:32 2009
+++ src/sys/rump/include/rump/rump_namei.h	Wed Dec 23 01:09:57 2009
@@ -1,11 +1,11 @@
-/*	$NetBSD: rump_namei.h,v 1.6 2009/09/27 17:24:32 dholland Exp $	*/
+/*	$NetBSD: rump_namei.h,v 1.7 2009/12/23 01:09:57 pooka Exp $	*/
 
 
 /*
  * WARNING: GENERATED FILE.  DO NOT EDIT
  * (edit namei.src and run make namei in src/sys/sys)
  *   by:   NetBSD: gennameih.awk,v 1.4 2008/12/03 10:54:27 ad Exp 
- *   from: NetBSD: namei.src,v 1.13 2009/09/27 17:23:54 dholland Exp 
+ *   from: NetBSD: namei.src,v 1.14 2009/12/23 01:09:24 pooka Exp 
  */
 
 #ifndef _RUMP_RUMP_NAMEI_H_
@@ -38,6 +38,7 @@
 #define RUMP_NAMEI_DOWHITEOUT	0x004
 #define RUMP_NAMEI_REQUIREDIR	0x008
 #define RUMP_NAMEI_CREATEDIR	0x020
-#define RUMP_NAMEI_PARAMASK	0x02fff00
+#define RUMP_NAMEI_INRENAME	0x040
+#define RUMP_NAMEI_PARAMASK	0x06fff00
 
 #endif /* _RUMP_RUMP_NAMEI_H_ */

Index: src/sys/sys/namei.h
diff -u src/sys/sys/namei.h:1.67 src/sys/sys/namei.h:1.68
--- src/sys/sys/namei.h:1.67	Sun Sep 27 17:24:31 2009
+++ src/sys/sys/namei.h	Wed Dec 23 01:09:57 2009
@@ -1,11 +1,11 @@
-/*	$NetBSD: namei.h,v 1.67 2009/09/27 17:24:31 dholland Exp $	*/
+/*	$NetBSD: namei.h,v 1.68 2009/12/23 01:09:57 pooka Exp $	*/
 
 
 /*
  * WARNING: GENERATED FILE.  DO NOT EDIT
  * (edit namei.src and run make namei in src/sys/sys)
  *   by:   NetBSD: gennameih.awk,v 1.4 2008/12/03 10:54:27 ad Exp 
- *   from: NetBSD: namei.src,v 1.13 2009/09/27 17:23:54 dholland Exp 
+ *   from: NetBSD: namei.src,v 1.14 2009/12/23 01:09:24 pooka Exp 
  */
 
 /*
@@ -147,7 +147,8 @@
 #define	DOWHITEOUT	0x004	/* do whiteouts */
 #define	REQUIREDIR	0x008	/* must be a directory */
 #define	CREATEDIR	0x020	/* trailing slashes are ok */
-#define	PARAMASK	0x02fff00	/* mask of parameter descriptors */
+#define	INRENAME	0x040	/* operation is a part of ``rename'' */
+#define	PARAMASK	0x06fff00	/* mask of parameter descriptors */
 
 /*
  * Initialization of an nameidata structure.
@@ -306,6 +307,7 @@
 #define NAMEI_DOWHITEOUT	0x004
 #define NAMEI_REQUIREDIR	0x008
 #define NAMEI_CREATEDIR	0x020
-#define NAMEI_PARAMASK	0x02fff00
+#define NAMEI_INRENAME	0x040
+#define NAMEI_PARAMASK	0x06fff00
 
 #endif /* !_SYS_NAMEI_H_ */



CVS commit: src/lib/libp2k

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 23 01:11:40 UTC 2009

Modified Files:
src/lib/libp2k: p2k.c

Log Message:
Use NAMEI_INRENAME to improve the situation with detecting on when
to save componentname instead of looking at SAVESTART.  Not perfect,
but better.  Also, try to be more forgiving of kernel bugs.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/lib/libp2k/p2k.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/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.31 src/lib/libp2k/p2k.c:1.32
--- src/lib/libp2k/p2k.c:1.31	Wed Dec 16 17:20:19 2009
+++ src/lib/libp2k/p2k.c	Wed Dec 23 01:11:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.31 2009/12/16 17:20:19 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.32 2009/12/23 01:11:39 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -617,30 +617,37 @@
 	RUMP_VOP_UNLOCK(dvp, 0);
 	if (rump_pub_checksavecn(cn)) {
 		/*
-		 * XXX: detect RENAME by SAVESTART, both src and targ lookups
-		 *
-		 * XXX part deux: rename syscall actually does two lookups
-		 * for the source, the second without SAVESTART.  So detect
-		 * this also and compensate.
+		 * XXX the rename lookup protocol is currently horribly
+		 * broken.  We get 1) DELETE with SAVESTART 2) DELETE
+		 * without SAVESTART 3) RENAME.  Hold on to this like
+		 * it were the absolute truth for now.  However, do
+		 * not sprinkle asserts based on this due to abovementioned
+		 * brokenness -- some file system drivers might not
+		 * even issue ABORT properly, so just free resources
+		 * on the fly and hope for the best.  PR kern/42348
 		 */
-		if (pcn-pcn_flags  NAMEI_SAVESTART) {
+		if (pcn-pcn_flags  NAMEI_INRENAME) {
 			if (pcn-pcn_nameiop == NAMEI_DELETE) {
-assert(p2n_dir-p2n_cn_ren_src == NULL);
-p2n_dir-p2n_cn_ren_src = cn;
+/* save path from the first lookup */
+if (pcn-pcn_flags  NAMEI_SAVESTART) {
+	if (p2n_dir-p2n_cn_ren_src)
+		freecn(p2n_dir-p2n_cn_ren_src,
+		RUMPCN_FORCEFREE);
+	p2n_dir-p2n_cn_ren_src = cn;
+} else {
+	freecn(cn, RUMPCN_FORCEFREE);
+	cn = NULL;
+}
 			} else {
 assert(pcn-pcn_nameiop == NAMEI_RENAME);
-assert(p2n_dir-p2n_cn_ren_targ == NULL);
+if (p2n_dir-p2n_cn_ren_targ)
+	freecn(p2n_dir-p2n_cn_ren_targ,
+	RUMPCN_FORCEFREE);
 p2n_dir-p2n_cn_ren_targ = cn;
 			}
 		} else {
-			if (pcn-pcn_nameiop == NAMEI_DELETE
-			 p2n_dir-p2n_cn_ren_src) {
-freecn(cn, RUMPCN_FORCEFREE);
-cn = NULL;
-			} else {
-assert(p2n_dir-p2n_cn == NULL);
-p2n_dir-p2n_cn = cn;
-			}
+			assert(p2n_dir-p2n_cn == NULL);
+			p2n_dir-p2n_cn = cn;
 		}
 	} else {
 		freecn(cn, 0);
@@ -656,7 +663,7 @@
 
 	p2n = getp2n(p2m, vp, false, NULL);
 	if (p2n == NULL) {
-		if (pcn-pcn_flags  NAMEI_SAVESTART) {
+		if (pcn-pcn_flags  NAMEI_INRENAME) {
 			if (pcn-pcn_nameiop == NAMEI_DELETE) {
 p2n_dir-p2n_cn_ren_src = NULL;
 			} else {



CVS commit: src/lib/libp2k

2009-12-22 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 23 01:15:11 UTC 2009

Modified Files:
src/lib/libp2k: p2k.c

Log Message:
Technically we're supposed to use flags from the RUMP_NAMEI namespace
instead of NAMEI directly.  Probably doesn't matter in practise,
since the chances of this running on non-NetBSD are low.  But make
it correct anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libp2k/p2k.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/libp2k/p2k.c
diff -u src/lib/libp2k/p2k.c:1.32 src/lib/libp2k/p2k.c:1.33
--- src/lib/libp2k/p2k.c:1.32	Wed Dec 23 01:11:39 2009
+++ src/lib/libp2k/p2k.c	Wed Dec 23 01:15:11 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.32 2009/12/23 01:11:39 pooka Exp $	*/
+/*	$NetBSD: p2k.c,v 1.33 2009/12/23 01:15:11 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -626,10 +626,10 @@
 		 * even issue ABORT properly, so just free resources
 		 * on the fly and hope for the best.  PR kern/42348
 		 */
-		if (pcn-pcn_flags  NAMEI_INRENAME) {
-			if (pcn-pcn_nameiop == NAMEI_DELETE) {
+		if (pcn-pcn_flags  RUMP_NAMEI_INRENAME) {
+			if (pcn-pcn_nameiop == RUMP_NAMEI_DELETE) {
 /* save path from the first lookup */
-if (pcn-pcn_flags  NAMEI_SAVESTART) {
+if (pcn-pcn_flags  RUMP_NAMEI_SAVESTART) {
 	if (p2n_dir-p2n_cn_ren_src)
 		freecn(p2n_dir-p2n_cn_ren_src,
 		RUMPCN_FORCEFREE);
@@ -639,7 +639,7 @@
 	cn = NULL;
 }
 			} else {
-assert(pcn-pcn_nameiop == NAMEI_RENAME);
+assert(pcn-pcn_nameiop == RUMP_NAMEI_RENAME);
 if (p2n_dir-p2n_cn_ren_targ)
 	freecn(p2n_dir-p2n_cn_ren_targ,
 	RUMPCN_FORCEFREE);
@@ -663,8 +663,8 @@
 
 	p2n = getp2n(p2m, vp, false, NULL);
 	if (p2n == NULL) {
-		if (pcn-pcn_flags  NAMEI_INRENAME) {
-			if (pcn-pcn_nameiop == NAMEI_DELETE) {
+		if (pcn-pcn_flags  RUMP_NAMEI_INRENAME) {
+			if (pcn-pcn_nameiop == RUMP_NAMEI_DELETE) {
 p2n_dir-p2n_cn_ren_src = NULL;
 			} else {
 p2n_dir-p2n_cn_ren_targ = NULL;



CVS commit: src/sys/dev/acpi

2009-12-22 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Dec 23 02:29:46 UTC 2009

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

Log Message:
Since we're using the active cooling levels as warning threshold, we
should store the value in the correct location.  We're already setting
the correct flag bit.

Should resolve problem reported by Frank Wille on current-users...


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/acpi/acpi_tz.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_tz.c
diff -u src/sys/dev/acpi/acpi_tz.c:1.50 src/sys/dev/acpi/acpi_tz.c:1.51
--- src/sys/dev/acpi/acpi_tz.c:1.50	Sun Nov 29 18:08:22 2009
+++ src/sys/dev/acpi/acpi_tz.c	Wed Dec 23 02:29:46 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.50 2009/11/29 18:08:22 uebayasi Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.51 2009/12/23 02:29:46 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill jmcne...@invisible.ca
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_tz.c,v 1.50 2009/11/29 18:08:22 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_tz.c,v 1.51 2009/12/23 02:29:46 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -745,7 +745,7 @@
 		}
 		for (i = 0; i  ATZ_NLEVELS; i++) {
 			if (sc-sc_zone.ac[i] != ATZ_TMP_INVALID) {
-limits-sel_critmax =
+limits-sel_warnmax =
 ATZ2UKELVIN(sc-sc_zone.ac[i]);
 limits-sel_flags |= PROP_WARNMAX;
 break;



CVS commit: [matt-nb5-mips64] src/usr.bin/ldd

2009-12-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec 23 03:14:47 UTC 2009

Modified Files:
src/usr.bin/ldd [matt-nb5-mips64]: Makefile Makefile.inc ldd.c ldd.h
src/usr.bin/ldd/elf64 [matt-nb5-mips64]: Makefile
Added Files:
src/usr.bin/ldd/elf32_compat [matt-nb5-mips64]: Makefile

Log Message:
pull across from -current:
 Log Message:
 - adjust the logic for compat ldd: add an elf32_compat module and arrange
   for mips64 to build this with MLIBDIR set to o32
 - make mips64 ldd call elf32_compat_ldd as well
 - make mips64 elf64 set MLIBDIR to 64
 - don't need ld.elf_so's Makefile.ld32 files anymore (they are going away
   soon anyway)

 tested on amd64 and sparc64, and an earlier version tested on mips64.

 Log Message:
 make this actually build on mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.7.52.1.4.2 -r1.7.52.1.4.3 src/usr.bin/ldd/Makefile
cvs rdiff -u -r1.1 -r1.1.58.1 src/usr.bin/ldd/Makefile.inc
cvs rdiff -u -r1.2.12.2 -r1.2.12.2.4.1 src/usr.bin/ldd/ldd.c
cvs rdiff -u -r1.1.2.3 -r1.1.2.3.4.1 src/usr.bin/ldd/ldd.h
cvs rdiff -u -r0 -r1.1.2.2 src/usr.bin/ldd/elf32_compat/Makefile
cvs rdiff -u -r1.4.2.2.4.2 -r1.4.2.2.4.3 src/usr.bin/ldd/elf64/Makefile

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/ldd/Makefile
diff -u src/usr.bin/ldd/Makefile:1.7.52.1.4.2 src/usr.bin/ldd/Makefile:1.7.52.1.4.3
--- src/usr.bin/ldd/Makefile:1.7.52.1.4.2	Sat Sep  5 18:53:57 2009
+++ src/usr.bin/ldd/Makefile	Wed Dec 23 03:14:47 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7.52.1.4.2 2009/09/05 18:53:57 matt Exp $
+#	$NetBSD: Makefile,v 1.7.52.1.4.3 2009/12/23 03:14:47 mrg Exp $
 
 .include bsd.own.mk		# for MKDYNAMICROOT definition
 
@@ -6,7 +6,8 @@
 SRCS=	ldd.c
 MAN=	ldd.1
 
-SUBDIR=	aout elf32 elf64
+SUBDIR=	aout elf32 elf64 elf32_compat
+
 LIB_AOUTDIR!=	cd ${.CURDIR}/aout  ${PRINTOBJDIR}
 EXTRA_LIBS+=	${LIB_AOUTDIR}/libldd_aout.a
 
@@ -15,13 +16,14 @@
 EXTRA_LIBS+=	${LIB_ELF32DIR}/libldd_elf32.a
 .endif
 
-.if (${MACHINE_ARCH} == mips64eb) || (${MACHINE_ARCH} == mips64el)
-ABI64:= ${CPUFLAGS:M-mabi=64:M-mabi=o64}
+.if (${MACHINE_ARCH} == mips64el) || (${MACHINE_ARCH} == mips64eb)
+LIB_ELF32COMPATDIR!=	cd ${.CURDIR}/elf32_compat  ${PRINTOBJDIR}
+EXTRA_LIBS+=		${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
 .endif
 
 .if (${MACHINE_ARCH} == alpha) || (${MACHINE_ARCH} == sparc64) || \
 (${MACHINE_ARCH} == x86_64) || (${MACHINE_ARCH} == powerpc64) || \
-((${MACHINE_ARCH:Mmips64*} != )  !empty(ABI64))
+(${MACHINE_ARCH} == mips64el) || (${MACHINE_ARCH} == mips64eb)
 LIB_ELF64DIR!=	cd ${.CURDIR}/elf64  ${PRINTOBJDIR}
 EXTRA_LIBS+=	${LIB_ELF64DIR}/libldd_elf64.a
 CPPFLAGS.ldd.c= -DELFSIZE=64

Index: src/usr.bin/ldd/Makefile.inc
diff -u src/usr.bin/ldd/Makefile.inc:1.1 src/usr.bin/ldd/Makefile.inc:1.1.58.1
--- src/usr.bin/ldd/Makefile.inc:1.1	Tue Dec 15 22:07:11 1998
+++ src/usr.bin/ldd/Makefile.inc	Wed Dec 23 03:14:47 2009
@@ -1,4 +1,23 @@
-#	$NetBSD: Makefile.inc,v 1.1 1998/12/15 22:07:11 pk Exp $
+#	$NetBSD: Makefile.inc,v 1.1.58.1 2009/12/23 03:14:47 mrg Exp $
+  
+.if ${MACHINE_ARCH} == sparc64
+MLIBDIR=	sparc
+.endif
+
+.if ${MACHINE_ARCH} == x86_64
+MLIBDIR=	i386
+.endif
+
+.if ${MACHINE_ARCH} == powerpc64
+MLIBDIR=	powerpc
+.endif
+
+# For now make elf32 look for native (n32)
+.if (${MACHINE_ARCH} == mips64eb) || (${MACHINE_ARCH} == mips64el)
+MLIBDIR=	64
+COMPAT_MLIBDIR=	o32
+CPPFLAGS+= -DLDD_ELF64
+.endif
 
 .if exists(${.CURDIR}/../../Makefile.inc)
 .include ${.CURDIR}/../../Makefile.inc

Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.2.12.2 src/usr.bin/ldd/ldd.c:1.2.12.2.4.1
--- src/usr.bin/ldd/ldd.c:1.2.12.2	Wed Feb 25 03:09:31 2009
+++ src/usr.bin/ldd/ldd.c	Wed Dec 23 03:14:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.c,v 1.2.12.2 2009/02/25 03:09:31 snj Exp $	*/
+/*	$NetBSD: ldd.c,v 1.2.12.2.4.1 2009/12/23 03:14:47 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ldd.c,v 1.2.12.2 2009/02/25 03:09:31 snj Exp $);
+__RCSID($NetBSD: ldd.c,v 1.2.12.2.4.1 2009/12/23 03:14:47 mrg Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -156,6 +156,9 @@
 		/* Alpha never had 32 bit support. */
 #if defined(_LP64)  !defined(__alpha__)
 		elf32_ldd(fd, *argv, fmt1, fmt2) == -1 
+#ifdef __mips__
+		 elf32_ldd_compat(fd, *argv, fmt1, fmt2) == -1
+#endif
 #endif
 		aout_ldd(fd, *argv, fmt1, fmt2) == -1)
 			warnx(%s, error_message);

Index: src/usr.bin/ldd/ldd.h
diff -u src/usr.bin/ldd/ldd.h:1.1.2.3 src/usr.bin/ldd/ldd.h:1.1.2.3.4.1
--- src/usr.bin/ldd/ldd.h:1.1.2.3	Wed Feb 25 03:09:31 2009
+++ src/usr.bin/ldd/ldd.h	Wed Dec 23 03:14:47 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.h,v 1.1.2.3 2009/02/25 03:09:31 snj Exp $	*/
+/*	$NetBSD: ldd.h,v 1.1.2.3.4.1 2009/12/23 03:14:47 mrg Exp $	*/
 
 /*
  * Copyright (c) 2008 Matthew R. Green
@@ -32,8 +32,14