CVS commit: src/lib/libc/compat/gen

2012-02-07 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb  8 03:24:30 UTC 2012

Modified Files:
src/lib/libc/compat/gen: compat_readdir.c

Log Message:
Restore binary compatibility with netbsd-1.x for readdir(3). Tested with
a shark tcsh dynamic binary:

tcsh: ELF 32-bit LSB executable, ARM, version 1, dynamically linked \
(uses shared libs), for NetBSD, not stripped
-rwxr-xr-x  1 root  wheel  994170 Jun 24  2004 /bin/tcsh

This would infinite loop on ls-F /dev


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/gen/compat_readdir.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/libc/compat/gen/compat_readdir.c
diff -u src/lib/libc/compat/gen/compat_readdir.c:1.1 src/lib/libc/compat/gen/compat_readdir.c:1.2
--- src/lib/libc/compat/gen/compat_readdir.c:1.1	Mon Sep 12 21:44:09 2005
+++ src/lib/libc/compat/gen/compat_readdir.c	Tue Feb  7 22:24:30 2012
@@ -1,8 +1,12 @@
-/*	$NetBSD: compat_readdir.c,v 1.1 2005/09/13 01:44:09 christos Exp $	*/
+/*	$NetBSD: compat_readdir.c,v 1.2 2012/02/08 03:24:30 christos Exp $	*/
 
 #define __LIBC12_SOURCE__
 #include "namespace.h"
+#include 
 #include 
+#include 
+#include 
+#include 
 #include 
 
 #ifdef __weak_alias
@@ -17,6 +21,42 @@ __warn_references(readdir_r,
 "warning: reference to compatibility readdir_r(); include  for correct reference")
 #endif
 
-#define dirent dirent12
+static struct dirent12 *
+direnttodirent12(struct dirent12 *d12, const struct dirent *d)
+{
+	if (d == NULL)
+		return NULL;
 
-#include "gen/readdir.c"
+	if (d->d_fileno > UINT_MAX || d->d_namlen >= sizeof(d12->d_name)) {
+		errno = ERANGE;
+		return NULL;
+	}
+	d12->d_fileno = (uint32_t)d->d_fileno;
+	d12->d_reclen = (uint16_t)d->d_reclen;
+	d12->d_namlen = (uint8_t)MIN(d->d_namlen, sizeof(d->d_name) - 1);
+	d12->d_type = (uint8_t)d->d_type;
+	memcpy(d12->d_name, d->d_name, d12->d_namlen);
+	d12->d_name[d12->d_namlen] = '\0';
+	return d12;
+}
+
+struct dirent12 *
+readdir(DIR *dirp)
+{
+	static struct dirent12 d12;
+	return direnttodirent12(&d12, __readdir30(dirp));
+}
+
+int
+readdir_r(DIR *dirp, struct dirent12 *entry, struct dirent12 **result)
+{
+	int error;
+	struct dirent e, *ep;
+
+	if ((error = __readdir_r30(dirp, &e, &ep)) != 0)
+		return error;
+
+	*result = entry;
+	(void)direnttodirent12(entry, &e);
+	return 0;
+}



CVS commit: src/etc

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 23:15:33 UTC 2012

Modified Files:
src/etc: man.conf

Log Message:
Include argument in command line


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/etc/man.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/man.conf
diff -u src/etc/man.conf:1.27 src/etc/man.conf:1.28
--- src/etc/man.conf:1.27	Tue Feb  7 21:13:34 2012
+++ src/etc/man.conf	Tue Feb  7 23:15:33 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: man.conf,v 1.27 2012/02/07 21:13:34 joerg Exp $
+#	$NetBSD: man.conf,v 1.28 2012/02/07 23:15:33 joerg Exp $
 
 # Sheer, raging paranoia...
 _version	BSD.2
@@ -21,7 +21,7 @@ _build		.0.gz		/usr/bin/gunzip -c %s
 _build		.[1-9ln]	/usr/bin/mandoc %s
 _build		.[1-9ln].Z	/usr/bin/zcat %s | /usr/bin/mandoc
 _build		.[1-9ln].gz	/usr/bin/gunzip -c %s | /usr/bin/mandoc
-_build		.tbl		/usr/bin/mandoc
+_build		.tbl		/usr/bin/mandoc %s
 _build		.tbl.Z		/usr/bin/zcat %s | /usr/bin/mandoc
 _build		.tbl.gz		/usr/bin/gunzip -c %s | /usr/bin/mandoc
 



CVS commit: src/usr.sbin/makemandb

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 23:03:34 UTC 2012

Modified Files:
src/usr.sbin/makemandb: apropos.c

Log Message:
Kill bad magic invocation.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/makemandb/apropos.c

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

Modified files:

Index: src/usr.sbin/makemandb/apropos.c
diff -u src/usr.sbin/makemandb/apropos.c:1.3 src/usr.sbin/makemandb/apropos.c:1.4
--- src/usr.sbin/makemandb/apropos.c:1.3	Tue Feb  7 22:59:32 2012
+++ src/usr.sbin/makemandb/apropos.c	Tue Feb  7 23:03:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apropos.c,v 1.3 2012/02/07 22:59:32 joerg Exp $	*/
+/*	$NetBSD: apropos.c,v 1.4 2012/02/07 23:03:34 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay 
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: apropos.c,v 1.3 2012/02/07 22:59:32 joerg Exp $");
+__RCSID("$NetBSD: apropos.c,v 1.4 2012/02/07 23:03:34 joerg Exp $");
 
 #include 
 #include 
@@ -103,7 +103,7 @@ main(int argc, char *argv[])
 		case '7':
 		case '8':
 		case '9':
-			aflags.sec_nums[atoi(&ch) - 1] = 1;
+			aflags.sec_nums[ch - '1'] = 1;
 			break;
 		case 'C':
 			aflags.no_context = 1;



CVS commit: src/usr.sbin/makemandb

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 22:59:32 UTC 2012

Modified Files:
src/usr.sbin/makemandb: apropos.c

Log Message:
getopt returns int, not char.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makemandb/apropos.c

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

Modified files:

Index: src/usr.sbin/makemandb/apropos.c
diff -u src/usr.sbin/makemandb/apropos.c:1.2 src/usr.sbin/makemandb/apropos.c:1.3
--- src/usr.sbin/makemandb/apropos.c:1.2	Tue Feb  7 19:17:16 2012
+++ src/usr.sbin/makemandb/apropos.c	Tue Feb  7 22:59:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: apropos.c,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
+/*	$NetBSD: apropos.c,v 1.3 2012/02/07 22:59:32 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay 
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: apropos.c,v 1.2 2012/02/07 19:17:16 joerg Exp $");
+__RCSID("$NetBSD: apropos.c,v 1.3 2012/02/07 22:59:32 joerg Exp $");
 
 #include 
 #include 
@@ -73,10 +73,9 @@ main(int argc, char *argv[])
 #endif
 	query_args args;
 	char *query = NULL;	// the user query
-	char ch;
 	char *errmsg = NULL;
 	char *str;
-	int rc = 0;
+	int ch, rc = 0;
 	callback_data cbdata;
 	cbdata.out = stdout;		// the default output stream
 	cbdata.count = 0;



CVS commit: src/share/mk

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 22:58:49 UTC 2012

Modified Files:
src/share/mk: bsd.README

Log Message:
Sync with reality for MKCATPAGES and MKMANDOC.


To generate a diff of this commit:
cvs rdiff -u -r1.291 -r1.292 src/share/mk/bsd.README

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.291 src/share/mk/bsd.README:1.292
--- src/share/mk/bsd.README:1.291	Sat Jan 28 21:32:13 2012
+++ src/share/mk/bsd.README	Tue Feb  7 22:58:49 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.291 2012/01/28 21:32:13 christos Exp $
+#	$NetBSD: bsd.README,v 1.292 2012/02/07 22:58:49 joerg Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -128,7 +128,7 @@ MKBSDTAR	If "yes", use the libarchive ba
 		Default: no
 
 MKCATPAGES	If "no", don't build or install the catman pages.
-		Default: yes
+		Default: no
 
 MKCOMPAT  	If "no", don't build or install the src/compat.
 		Default: yes on amd64/sparc64, no elsewhere.
@@ -253,7 +253,7 @@ MKMANDOC	If "yes", mandoc is built as to
 		catman or html pages.  A directory can be exempted by
 		defining NOMANDOC.  Individual man pages are exempted
 		if NOMANDOC.${target} is set to "yes".
-		Default: no
+		Default: yes
 
 MKMANZ		If not "no", compress manual pages at installation time.
 		Default: no



CVS commit: src/etc

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 21:13:34 UTC 2012

Modified Files:
src/etc: man.conf

Log Message:
Kill one more invocation of tbl. Noticed by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/etc/man.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/man.conf
diff -u src/etc/man.conf:1.26 src/etc/man.conf:1.27
--- src/etc/man.conf:1.26	Tue Feb  7 19:33:19 2012
+++ src/etc/man.conf	Tue Feb  7 21:13:34 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: man.conf,v 1.26 2012/02/07 19:33:19 joerg Exp $
+#	$NetBSD: man.conf,v 1.27 2012/02/07 21:13:34 joerg Exp $
 
 # Sheer, raging paranoia...
 _version	BSD.2
@@ -21,7 +21,7 @@ _build		.0.gz		/usr/bin/gunzip -c %s
 _build		.[1-9ln]	/usr/bin/mandoc %s
 _build		.[1-9ln].Z	/usr/bin/zcat %s | /usr/bin/mandoc
 _build		.[1-9ln].gz	/usr/bin/gunzip -c %s | /usr/bin/mandoc
-_build		.tbl		/usr/bin/tbl %s | /usr/bin/mandoc
+_build		.tbl		/usr/bin/mandoc
 _build		.tbl.Z		/usr/bin/zcat %s | /usr/bin/mandoc
 _build		.tbl.gz		/usr/bin/gunzip -c %s | /usr/bin/mandoc
 



CVS commit: src/usr.sbin/makemandb

2012-02-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  7 21:02:33 UTC 2012

Modified Files:
src/usr.sbin/makemandb: run_query_html.3 run_query_pager.3

Log Message:
No leading zeroes in date.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/run_query_html.3 \
src/usr.sbin/makemandb/run_query_pager.3

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

Modified files:

Index: src/usr.sbin/makemandb/run_query_html.3
diff -u src/usr.sbin/makemandb/run_query_html.3:1.1 src/usr.sbin/makemandb/run_query_html.3:1.2
--- src/usr.sbin/makemandb/run_query_html.3:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/run_query_html.3	Tue Feb  7 21:02:33 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: run_query_html.3,v 1.1 2012/02/07 19:13:32 joerg Exp $
+.\" $NetBSD: run_query_html.3,v 1.2 2012/02/07 21:02:33 wiz Exp $
 .\"
 .\" Copyright (c) 2011 Abhinav Upadhyay 
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 03, 2011
+.Dd December 3, 2011
 .Dt RUN_QUERY_HTML 3
 .Os
 .Sh NAME
Index: src/usr.sbin/makemandb/run_query_pager.3
diff -u src/usr.sbin/makemandb/run_query_pager.3:1.1 src/usr.sbin/makemandb/run_query_pager.3:1.2
--- src/usr.sbin/makemandb/run_query_pager.3:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/run_query_pager.3	Tue Feb  7 21:02:33 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: run_query_pager.3,v 1.1 2012/02/07 19:13:32 joerg Exp $
+.\" $NetBSD: run_query_pager.3,v 1.2 2012/02/07 21:02:33 wiz Exp $
 .\"
 .\" Copyright (c) 2011 Abhinav Upadhyay 
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 03, 2011
+.Dd December 3, 2011
 .Dt RUN_QUERY_PAGER 3
 .Os
 .Sh NAME



CVS commit: src/usr.sbin/makemandb

2012-02-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Feb  7 21:02:23 UTC 2012

Modified Files:
src/usr.sbin/makemandb: run_query.3

Log Message:
No leading zeroes in date. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/run_query.3

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

Modified files:

Index: src/usr.sbin/makemandb/run_query.3
diff -u src/usr.sbin/makemandb/run_query.3:1.1 src/usr.sbin/makemandb/run_query.3:1.2
--- src/usr.sbin/makemandb/run_query.3:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/run_query.3	Tue Feb  7 21:02:23 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: run_query.3,v 1.1 2012/02/07 19:13:32 joerg Exp $
+.\" $NetBSD: run_query.3,v 1.2 2012/02/07 21:02:23 wiz Exp $
 .\"
 .\" Copyright (c) 2011 Abhinav Upadhyay 
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 03, 2011
+.Dd December 3, 2011
 .Dt RUN_QUERY 3
 .Os
 .Sh NAME
@@ -113,7 +113,8 @@ as to search in all the sections.
 This specifies the number of matching rows to fetch from the database.
 Specifiy a negative value to fetch all the matching rows.
 .It Li int offset
-This specifies the offset within the result-set. Use it to specify the position
+This specifies the offset within the result-set.
+Use it to specify the position
 from where to start processing the result-set.
 For example if the value of nrec is m and value of offset is n, then the first
 n records from the result-set will be omitted and rest m-n (or less) records will



CVS commit: src

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 19:37:14 UTC 2012

Modified Files:
src: UPDATING
src/doc: CHANGES

Log Message:
Add note about new apropos and mandoc for formatting. Document failing
update builds due to the cat page removal.


To generate a diff of this commit:
cvs rdiff -u -r1.232 -r1.233 src/UPDATING
cvs rdiff -u -r1.1667 -r1.1668 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/UPDATING
diff -u src/UPDATING:1.232 src/UPDATING:1.233
--- src/UPDATING:1.232	Tue Dec 27 16:54:51 2011
+++ src/UPDATING	Tue Feb  7 19:37:14 2012
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.232 2011/12/27 16:54:51 christos Exp $
+$NetBSD: UPDATING,v 1.233 2012/02/07 19:37:14 joerg Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -16,6 +16,10 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
+20120207:
+	Default for MKCATPAGES changed to NO. Update builds with fail
+	unless DESTDIR is cleaned manually.
+
 20111227:
 	If you built between 20111225 and 20111227 you need to remove
 	/usr/lib/libpam.so.4* and /usr/lib/security/*.so.4, since the

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1667 src/doc/CHANGES:1.1668
--- src/doc/CHANGES:1.1667	Mon Feb  6 15:58:56 2012
+++ src/doc/CHANGES	Tue Feb  7 19:37:14 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1667 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1668 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1237,4 +1237,7 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 		[kardel 20120201]
 	dhcpcd(8): Import dhcpcd-5.5.3 [roy 20120202]
 	dhcpcd(8): Import dhcpcd-5.5.4 [roy 20120206]
-
+	userland: New apropos implementation using SQLite Full Text Index
+		[joerg 20120207]
+	userland: Man pages are formatted with mandoc by default.
+		[joerg 20120207]



CVS commit: src

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 19:33:20 UTC 2012

Modified Files:
src/etc: man.conf
src/share/mk: bsd.own.mk

Log Message:
Switch to using mandoc for formatting man pages as new default.
Stop building catpages by default.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/etc/man.conf
cvs rdiff -u -r1.694 -r1.695 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/etc/man.conf
diff -u src/etc/man.conf:1.25 src/etc/man.conf:1.26
--- src/etc/man.conf:1.25	Fri Jul  9 15:08:09 2010
+++ src/etc/man.conf	Tue Feb  7 19:33:19 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: man.conf,v 1.25 2010/07/09 15:08:09 christos Exp $
+#	$NetBSD: man.conf,v 1.26 2012/02/07 19:33:19 joerg Exp $
 
 # Sheer, raging paranoia...
 _version	BSD.2
@@ -18,12 +18,13 @@ _subdir		cat1 man1 cat8 man8 cat6 man6 c
 _suffix		.0
 _build		.0.Z		/usr/bin/zcat %s
 _build		.0.gz		/usr/bin/gunzip -c %s
-_build		.[1-9ln]	/usr/bin/nroff -msafer -man %s
-_build		.[1-9ln].Z	/usr/bin/zcat %s | /usr/bin/nroff -msafer -man
-_build		.[1-9ln].gz	/usr/bin/gunzip -c %s | /usr/bin/nroff -msafer -man
-_build		.tbl		/usr/bin/tbl %s | /usr/bin/nroff -msafer -man
-_build		.tbl.Z		/usr/bin/zcat %s | /usr/bin/tbl | /usr/bin/nroff -msafer -man
-_build		.tbl.gz		/usr/bin/gunzip -c %s | /usr/bin/tbl | /usr/bin/nroff -msafer -man
+_build		.[1-9ln]	/usr/bin/mandoc %s
+_build		.[1-9ln].Z	/usr/bin/zcat %s | /usr/bin/mandoc
+_build		.[1-9ln].gz	/usr/bin/gunzip -c %s | /usr/bin/mandoc
+_build		.tbl		/usr/bin/tbl %s | /usr/bin/mandoc
+_build		.tbl.Z		/usr/bin/zcat %s | /usr/bin/mandoc
+_build		.tbl.gz		/usr/bin/gunzip -c %s | /usr/bin/mandoc
+
 _build		.me		/usr/bin/nroff -msafer -me %s 2>/dev/null | cat -s
 
 _crunch		.Z		/usr/bin/compress -c > %s

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.694 src/share/mk/bsd.own.mk:1.695
--- src/share/mk/bsd.own.mk:1.694	Tue Feb  7 19:13:31 2012
+++ src/share/mk/bsd.own.mk	Tue Feb  7 19:33:19 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.694 2012/02/07 19:13:31 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.695 2012/02/07 19:33:19 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -805,7 +805,7 @@ MKZFS?=		yes
 _MKVARS.yes= \
 	MKATF \
 	MKBINUTILS \
-	MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS MKCXX \
+	MKCRYPTO MKCOMPLEX MKCVS MKCXX \
 	MKDOC \
 	MKGCC MKGCCCMDS MKGDB MKGROFF \
 	MKHESIOD MKHTML \
@@ -813,7 +813,7 @@ _MKVARS.yes= \
 	MKKERBEROS \
 	MKKMOD \
 	MKLDAP MKLINKLIB MKLINT MKLVM \
-	MKMAN \
+	MKMAN MKMANDOC \
 	MKMDNS \
 	MKMAKEMANDB \
 	MKNLS \
@@ -840,9 +840,10 @@ ${var}?=	yes
 # default for some platforms, see above.
 #
 _MKVARS.no= \
-	MKBSDGREP MKBSDTAR MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG \
+	MKBSDGREP MKBSDTAR \
+	MKCATPAGES MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG \
 	MKDEBUGLIB MKDTRACE MKEXTSRC \
-	MKMANDOC MKMANZ MKOBJDIRS \
+	MKMANZ MKOBJDIRS \
 	MKLLVM MKPCC \
 	MKPIGZGZIP \
 	MKREPRO \



CVS commit: src/usr.sbin/makemandb

2012-02-07 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Feb  7 19:17:17 UTC 2012

Modified Files:
src/usr.sbin/makemandb: apropos-utils.c apropos-utils.h apropos.c
makemandb.c whatis.c

Log Message:
Fix C&P error with $NetBSD$


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/apropos-utils.c \
src/usr.sbin/makemandb/apropos-utils.h src/usr.sbin/makemandb/apropos.c \
src/usr.sbin/makemandb/makemandb.c src/usr.sbin/makemandb/whatis.c

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

Modified files:

Index: src/usr.sbin/makemandb/apropos-utils.c
diff -u src/usr.sbin/makemandb/apropos-utils.c:1.1 src/usr.sbin/makemandb/apropos-utils.c:1.2
--- src/usr.sbin/makemandb/apropos-utils.c:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/apropos-utils.c	Tue Feb  7 19:17:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD	*/
+/*	$NetBSD: apropos-utils.c,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay 
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: apropos-utils.c,v 1.1 2012/02/07 19:13:32 joerg Exp $");
+__RCSID("$NetBSD: apropos-utils.c,v 1.2 2012/02/07 19:17:16 joerg Exp $");
 
 #include 
 
Index: src/usr.sbin/makemandb/apropos-utils.h
diff -u src/usr.sbin/makemandb/apropos-utils.h:1.1 src/usr.sbin/makemandb/apropos-utils.h:1.2
--- src/usr.sbin/makemandb/apropos-utils.h:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/apropos-utils.h	Tue Feb  7 19:17:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD	*/
+/*	$NetBSD: apropos-utils.h,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay 
  * All rights reserved.
Index: src/usr.sbin/makemandb/apropos.c
diff -u src/usr.sbin/makemandb/apropos.c:1.1 src/usr.sbin/makemandb/apropos.c:1.2
--- src/usr.sbin/makemandb/apropos.c:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/apropos.c	Tue Feb  7 19:17:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD	*/
+/*	$NetBSD: apropos.c,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay 
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: apropos.c,v 1.1 2012/02/07 19:13:32 joerg Exp $");
+__RCSID("$NetBSD: apropos.c,v 1.2 2012/02/07 19:17:16 joerg Exp $");
 
 #include 
 #include 
Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.1 src/usr.sbin/makemandb/makemandb.c:1.2
--- src/usr.sbin/makemandb/makemandb.c:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/makemandb.c	Tue Feb  7 19:17:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD	*/
+/*	$NetBSD: makemandb.c,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay 
  * Copyright (c) 2011 Kristaps Dzonsons 
@@ -17,7 +17,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: makemandb.c,v 1.1 2012/02/07 19:13:32 joerg Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.2 2012/02/07 19:17:16 joerg Exp $");
 
 #include 
 #include 
Index: src/usr.sbin/makemandb/whatis.c
diff -u src/usr.sbin/makemandb/whatis.c:1.1 src/usr.sbin/makemandb/whatis.c:1.2
--- src/usr.sbin/makemandb/whatis.c:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/whatis.c	Tue Feb  7 19:17:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD	*/
+/*	$NetBSD: whatis.c,v 1.2 2012/02/07 19:17:16 joerg Exp $	*/
 /*-
  * Copyright (c) 2012 Joerg Sonnenberger 
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: whatis.c,v 1.1 2012/02/07 19:13:32 joerg Exp $");
+__RCSID("$NetBSD: whatis.c,v 1.2 2012/02/07 19:17:16 joerg Exp $");
 
 #include 
 #include 



CVS commit: src/sys/dev/wsfb

2012-02-07 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Tue Feb  7 18:48:20 UTC 2012

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
On 8-bit screens only enable font anti-aliasing when the cmap_callback
property is defined. It is needed for a suitable R3G3B2 color map.
Ok by releng@


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.46 src/sys/dev/wsfb/genfb.c:1.47
--- src/sys/dev/wsfb/genfb.c:1.46	Wed Jan 11 16:13:11 2012
+++ src/sys/dev/wsfb/genfb.c	Tue Feb  7 18:48:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.46 2012/01/11 16:13:11 macallan Exp $ */
+/*	$NetBSD: genfb.c,v 1.47 2012/02/07 18:48:19 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.46 2012/01/11 16:13:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.47 2012/02/07 18:48:19 phx Exp $");
 
 #include 
 #include 
@@ -510,7 +510,7 @@ genfb_init_screen(void *cookie, struct v
 	if (ri->ri_depth == 32)
 		ri->ri_flg |= RI_ENABLE_ALPHA;
 
-	if (ri->ri_depth == 8)
+	if (ri->ri_depth == 8 && sc->sc_cmcb != NULL)
 		ri->ri_flg |= RI_ENABLE_ALPHA | RI_8BIT_IS_RGB;
 
 



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

2012-02-07 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Tue Feb  7 16:34:44 UTC 2012

Modified Files:
src/sys/arch/i386/i386: mainbus.c

Log Message:
Initialize pcibus_attach_args.pba_sub to 255.  Note in a comment that
this needs some improvement for machines with >1 Host-PCI bridge, but
that it doesn't cause any practical problems at this time.

Ok releng@.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/i386/i386/mainbus.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/i386/i386/mainbus.c
diff -u src/sys/arch/i386/i386/mainbus.c:1.93 src/sys/arch/i386/i386/mainbus.c:1.94
--- src/sys/arch/i386/i386/mainbus.c:1.93	Wed Jan 18 21:34:38 2012
+++ src/sys/arch/i386/i386/mainbus.c	Tue Feb  7 16:34:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.93 2012/01/18 21:34:38 drochner Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.94 2012/02/07 16:34:44 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.93 2012/01/18 21:34:38 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.94 2012/02/07 16:34:44 dyoung Exp $");
 
 #include 
 #include 
@@ -406,6 +406,13 @@ mainbus_rescan(device_t self, const char
 		mba.mba_pba.pba_pc = NULL;
 		mba.mba_pba.pba_flags = pci_bus_flags();
 		mba.mba_pba.pba_bus = 0;
+		/* XXX On those machines with >1 Host-PCI bridge,
+		 * XXX not every bus > pba_bus is subordinate to pba_bus,
+		 * XXX but this works on many machines, and pba_sub is
+		 * XXX not used today by any critical code, so it is safe
+		 * XXX to be so inclusive at this time.
+		 */
+		mba.mba_pba.pba_sub = 255;
 		mba.mba_pba.pba_bridgetag = NULL;
 #if NACPICA > 0 && defined(ACPI_SCANPCI)
 		if (npcibus == 0 && sc->sc_mpacpi_active)



CVS commit: src/sbin/newfs

2012-02-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Feb  7 14:14:46 UTC 2012

Modified Files:
src/sbin/newfs: mkfs.c

Log Message:
Explicitly zap possible Ext2fs magic leftover to prevent
kernel vfs_mountroot() and bootloaders from mis-recognizing
the newfs(8)'ed file system as still Ext2fs.

The problem is reported and the fix is tested by Frank Wille
on current-users@.  Also approved by releng.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sbin/newfs/mkfs.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/newfs/mkfs.c
diff -u src/sbin/newfs/mkfs.c:1.110 src/sbin/newfs/mkfs.c:1.111
--- src/sbin/newfs/mkfs.c:1.110	Thu Aug 25 16:17:58 2011
+++ src/sbin/newfs/mkfs.c	Tue Feb  7 14:14:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mkfs.c,v 1.110 2011/08/25 16:17:58 joerg Exp $	*/
+/*	$NetBSD: mkfs.c,v 1.111 2012/02/07 14:14:45 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993
@@ -73,7 +73,7 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: mkfs.c,v 1.110 2011/08/25 16:17:58 joerg Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.111 2012/02/07 14:14:45 tsutsui Exp $");
 #endif
 #endif /* not lint */
 
@@ -152,6 +152,8 @@ union {
 	((sblock.fs_magic == FS_UFS1_MAGIC) ? \
 	(dp)->dp1.di_##field : (dp)->dp2.di_##field)
 
+#define EXT2FS_SBOFF	1024	/* XXX: SBOFF in  */
+
 char *iobuf;
 int iobufsize;			/* size to end of 2nd inode block */
 int iobuf_memsize;		/* Actual buffer size */
@@ -615,6 +617,12 @@ mkfs(const char *fsys, int fi, int fo,
 			for (sz = SBLOCKSIZE; sz <= 0x1; sz <<= 1)
 zap_old_sblock(roundup(sblkoff, sz));
 		}
+		/*
+		 * Also zap possible Ext2fs magic leftover to prevent
+		 * kernel vfs_mountroot() and bootloaders from mis-recognizing
+		 * this file system as Ext2fs.
+		 */
+		zap_old_sblock(EXT2FS_SBOFF);
 
 		if (isappleufs) {
 			struct appleufslabel appleufs;



CVS commit: src/sys/dev/usb

2012-02-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Feb  7 11:40:24 UTC 2012

Modified Files:
src/sys/dev/usb: umidi.c

Log Message:
two locking fixes (from PR/45909)

- during attach, release kernel lock in error path
- during midiopen, take kernel lock for USB activity

(there are more problems with locking here, this does not fix the PR)


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/usb/umidi.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/usb/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.55 src/sys/dev/usb/umidi.c:1.56
--- src/sys/dev/usb/umidi.c:1.55	Fri Dec 23 00:51:47 2011
+++ src/sys/dev/usb/umidi.c	Tue Feb  7 11:40:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi.c,v 1.55 2011/12/23 00:51:47 jakllsch Exp $	*/
+/*	$NetBSD: umidi.c,v 1.56 2012/02/07 11:40:24 plunky Exp $	*/
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.55 2011/12/23 00:51:47 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.56 2012/02/07 11:40:24 plunky Exp $");
 
 #include 
 #include 
@@ -255,6 +255,7 @@ umidi_attach(device_t parent, device_t s
 error:
 	aprint_error_dev(self, "disabled.\n");
 	sc->sc_dying = 1;
+	KERNEL_UNLOCK_ONE(curlwp);
 	return;
 }
 
@@ -1125,7 +1126,9 @@ open_in_jack(struct umidi_jack *jack, vo
 	jack->u.in.intr = intr;
 	jack->opened = 1;
 	if (ep->num_open++ == 0 && UE_GET_DIR(ep->addr)==UE_DIR_IN) {
+		KERNEL_LOCK(1, curlwp);
 		err = start_input_transfer(ep);
+		KERNEL_UNLOCK_ONE(curlwp);
 		if (err != USBD_NORMAL_COMPLETION &&
 		err != USBD_IN_PROGRESS) {
 			ep->num_open--;



CVS commit: src/etc/rc.d

2012-02-07 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Tue Feb  7 10:36:01 UTC 2012

Modified Files:
src/etc/rc.d: fccache.in

Log Message:
For the sake of consistency with other scripts, output a full stop after the
word 'done'.  releng ok.


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

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/fccache.in
diff -u src/etc/rc.d/fccache.in:1.2 src/etc/rc.d/fccache.in:1.3
--- src/etc/rc.d/fccache.in:1.2	Wed Jun 15 13:42:46 2011
+++ src/etc/rc.d/fccache.in	Tue Feb  7 10:36:01 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: fccache.in,v 1.2 2011/06/15 13:42:46 hans Exp $
+# $NetBSD: fccache.in,v 1.3 2012/02/07 10:36:01 mbalmer Exp $
 #
 
 # PROVIDE: fccache 
@@ -20,7 +20,7 @@ fccache_start()
 	if [ -x "${command}" ]; then
 		echo -n "Updating fontconfig cache:"
 		${command}
-		echo " done"
+		echo " done."
 	fi
 }
 



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

2012-02-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Feb  7 09:07:47 UTC 2012

Modified Files:
src/sys/arch/evbarm/conf: MINI2440

Log Message:
- add missing time-of-day clock support.
- add option WAPBL and disable VERBOSE_INIT_ARM.

Ok by releng.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/MINI2440

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/evbarm/conf/MINI2440
diff -u src/sys/arch/evbarm/conf/MINI2440:1.1 src/sys/arch/evbarm/conf/MINI2440:1.2
--- src/sys/arch/evbarm/conf/MINI2440:1.1	Mon Jan 30 03:28:33 2012
+++ src/sys/arch/evbarm/conf/MINI2440	Tue Feb  7 09:07:47 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: MINI2440,v 1.1 2012/01/30 03:28:33 nisimura Exp $
+#	$NetBSD: MINI2440,v 1.2 2012/02/07 09:07:47 nisimura Exp $
 #
 #	MINI2440 -- Friendly ARM evaluation board based on Samsung S3C2440
 #
@@ -60,7 +60,7 @@ file-system	NFS		# Network file system
 #file-system 	ADOSFS		# AmigaDOS-compatible file system
 #file-system 	EXT2FS		# second extended file system (linux)
 #file-system	CD9660		# ISO 9660 + Rock Ridge file system
-#file-system	MSDOSFS		# MS-DOS file system
+file-system	MSDOSFS		# MS-DOS file system
 file-system	FDESC		# /dev/fd
 file-system	KERNFS		# /kern
 #file-system	NULLFS		# loopback file system
@@ -75,7 +75,7 @@ file-system	PTYFS		# /dev/pts/N support
 #options 	FFS_EI		# FFS Endian Independant support
 #options 	NFSSERVER
 #options 	SOFTDEP
-#options 	WAPBL		# File system journaling support - Experimental
+options 	WAPBL		# File system journaling support - Experimental
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 
 # Networking options
@@ -159,7 +159,7 @@ options 	DDB_KEYCODE=0x1d	# Enter ddb on
 #options 	DIAGNOSTIC	# internal consistency checks
 #options 	PMAP_DEBUG	# Enable pmap_debug_level code
 #options 	UVMHIST
-options 	VERBOSE_INIT_ARM # verbose bootstraping messages
+#options 	VERBOSE_INIT_ARM # verbose bootstraping messages
 #options 	KGDB
 #options  	DEBUG_KGDB
 #options 	DDB		# in-kernel debugger
@@ -201,6 +201,8 @@ options 	WSDISPLAY_DEFAULTSCREENS=1
 sstouch0 at ssio?
 wsmouse* at sstouch0 mux 0
 
+ssrtc0 at ssio?
+
 ssiis0 at ssio?
 udassio* at ssiis0
 



CVS commit: src

2012-02-07 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Tue Feb  7 09:06:05 UTC 2012

Modified Files:
src/distrib/utils/sysinst/arch/evbarm: Makefile md.c md.h
src/sys/arch/arm/s3c2xx0: files.s3c2440 s3c2440reg.h s3c24x0_clk.c
s3c2800_clk.c sscom.c sscom_s3c2440.c
Added Files:
src/sys/arch/arm/s3c2xx0: s3c2440_rtc.c

Log Message:
- add MBR editing menu to sysinst.
- fix typos in timecounter names.
- make sure to drain Tx FIFO to avoid clobbering
  kernel boot messages.
- allow to have the 3rd UART.
- add missing time-of-day clock support.

Ok by releng.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/sysinst/arch/evbarm/Makefile
cvs rdiff -u -r1.25 -r1.26 src/distrib/utils/sysinst/arch/evbarm/md.c
cvs rdiff -u -r1.18 -r1.19 src/distrib/utils/sysinst/arch/evbarm/md.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/s3c2xx0/files.s3c2440 \
src/sys/arch/arm/s3c2xx0/s3c2440reg.h \
src/sys/arch/arm/s3c2xx0/sscom_s3c2440.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/s3c2xx0/s3c2440_rtc.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/s3c2xx0/s3c24x0_clk.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/s3c2xx0/s3c2800_clk.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/s3c2xx0/sscom.c

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

Modified files:

Index: src/distrib/utils/sysinst/arch/evbarm/Makefile
diff -u src/distrib/utils/sysinst/arch/evbarm/Makefile:1.5 src/distrib/utils/sysinst/arch/evbarm/Makefile:1.6
--- src/distrib/utils/sysinst/arch/evbarm/Makefile:1.5	Sat Feb 19 17:00:39 2005
+++ src/distrib/utils/sysinst/arch/evbarm/Makefile	Tue Feb  7 09:06:04 2012
@@ -1,8 +1,10 @@
-#	$NetBSD: Makefile,v 1.5 2005/02/19 17:00:39 dsl Exp $
+#	$NetBSD: Makefile,v 1.6 2012/02/07 09:06:04 nisimura Exp $
 #
 # Makefile for evbarm
 #
 
+MENUS_MD= menus.md.${SYSINSTLANG} menus.mbr
+MSG_MD= msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
 MD_OPTIONS=	AOUT2ELF
 
 .include "../../Makefile.inc"

Index: src/distrib/utils/sysinst/arch/evbarm/md.c
diff -u src/distrib/utils/sysinst/arch/evbarm/md.c:1.25 src/distrib/utils/sysinst/arch/evbarm/md.c:1.26
--- src/distrib/utils/sysinst/arch/evbarm/md.c:1.25	Fri Nov  4 11:27:02 2011
+++ src/distrib/utils/sysinst/arch/evbarm/md.c	Tue Feb  7 09:06:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.25 2011/11/04 11:27:02 martin Exp $ */
+/*	$NetBSD: md.c,v 1.26 2012/02/07 09:06:04 nisimura Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -67,6 +67,15 @@ md_get_info(void)
 	int fd;
 	char dev_name[100];
 
+	if (no_mbr)
+		return 1;
+
+	if (read_mbr(diskdev, &mbr) < 0)
+		memset(&mbr.mbr, 0, sizeof(mbr.mbr)-2);
+
+	if (edit_mbr(&mbr) == 0)
+		return 0;
+
 	if (strncmp(diskdev, "wd", 2) == 0)
 		disktype = "ST506";
 	else
@@ -131,6 +140,17 @@ md_check_partitions(void)
 int
 md_pre_disklabel(void)
 {
+	if (no_mbr)
+		return 0;
+
+	msg_display(MSG_dofdisk);
+
+	/* write edited MBR onto disk. */
+	if (write_mbr(diskdev, &mbr, 1) != 0) {
+		msg_display(MSG_wmbrfail);
+		process_menu(MENU_ok, NULL);
+		return 1;
+	}
 	return 0;
 }
 
@@ -187,3 +207,15 @@ md_pre_mount()
 {
 	return 0;
 }
+
+int
+md_check_mbr(mbr_info_t *mbri)
+{
+	return 2;
+}
+
+int
+md_mbr_use_wholedisk(mbr_info_t *mbri)
+{
+	return mbr_use_wholedisk(mbri);
+}

Index: src/distrib/utils/sysinst/arch/evbarm/md.h
diff -u src/distrib/utils/sysinst/arch/evbarm/md.h:1.18 src/distrib/utils/sysinst/arch/evbarm/md.h:1.19
--- src/distrib/utils/sysinst/arch/evbarm/md.h:1.18	Fri Feb  3 00:35:35 2012
+++ src/distrib/utils/sysinst/arch/evbarm/md.h	Tue Feb  7 09:06:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.18 2012/02/03 00:35:35 nisimura Exp $	*/
+/*	$NetBSD: md.h,v 1.19 2012/02/07 09:06:04 nisimura Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -35,11 +35,15 @@
 
 /* md.h -- Machine specific definitions for evbarm */
 
+#include "mbr.h"
+
 /* Constants and defines */
 
 /* Megs required for a full X installation. */
 #define XNEEDMB 60
 
+#define HAVE_UFS2_BOOT
+
 /*
  *  Default filesets to fetch and install during installation
  *  or upgrade. The standard sets are:

Index: src/sys/arch/arm/s3c2xx0/files.s3c2440
diff -u src/sys/arch/arm/s3c2xx0/files.s3c2440:1.1 src/sys/arch/arm/s3c2xx0/files.s3c2440:1.2
--- src/sys/arch/arm/s3c2xx0/files.s3c2440:1.1	Mon Jan 30 03:28:33 2012
+++ src/sys/arch/arm/s3c2xx0/files.s3c2440	Tue Feb  7 09:06:04 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.s3c2440,v 1.1 2012/01/30 03:28:33 nisimura Exp $
+#	$NetBSD: files.s3c2440,v 1.2 2012/02/07 09:06:04 nisimura Exp $
 #
 # Configuration info for Samsung S3C2440
 #
@@ -49,3 +49,8 @@ file	arch/arm/s3c2xx0/s3c2440_i2s.c		ssi
 device	sstouch: wsmousedev, tpcalib
 attach	sstouch at ssio
 file	arch/arm/s3c2xx0/s3c2440_touch.c	sstouch
+
+# RTC
+device ssrtc
+attach ssrtc at ssio
+file	arch/arm/s3c2xx0/s3c2440_rtc.c		ssrtc
Index: src/sys/arch/arm/s3c2xx0/s3c2440reg.h
diff -u src/sys/arch/arm/s3c2xx0/s3c2440reg.h:1.