Re: CVS commit: src

2023-05-19 Thread Hauke Fath
On Sat, 20 May 2023 03:13:19 +1000, Luke Mewburn wrote:
>   | Arguably fixes PR toolchain/42166
> 
> I think you meant toolchain/41266.

Argh! Of course! Mis-typed once, and my fingers stuck with it.

Cheerio,
Hauke

-- 
Hauke Fath
Linnéweg 7
64342 Seeheim-Jugenheim
Germany


CVS commit: src

2023-05-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri May 19 14:47:16 UTC 2023

Modified Files:
src/distrib/cdrom: Makefile
src/etc/etc.mac68k: Makefile.inc

Log Message:
Creating Type mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as .

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.

XXX What about macppc?


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/distrib/cdrom/Makefile
cvs rdiff -u -r1.23 -r1.24 src/etc/etc.mac68k/Makefile.inc

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

Modified files:

Index: src/distrib/cdrom/Makefile
diff -u src/distrib/cdrom/Makefile:1.52 src/distrib/cdrom/Makefile:1.53
--- src/distrib/cdrom/Makefile:1.52	Wed Jan 24 09:04:40 2018
+++ src/distrib/cdrom/Makefile	Fri May 19 14:47:16 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.52 2018/01/24 09:04:40 skrll Exp $
+# $NetBSD: Makefile,v 1.53 2023/05/19 14:47:16 hauke Exp $
 #
 # Consult "*.conf" for the configuration variables; this Makefile is typically
 # not edited for basic configuration changes.
@@ -288,7 +288,7 @@ MKISOFS_ARGS.${image}+=	-b ${BOOTFILE.am
 MKISOFS_ARGS.${image}+= -b ${BOOTFILE.amd64} -c boot.catalog
 .endif
 .endif
-
+
 # Mac (mac68k, macppc)
 
 .if !empty(ports:Mmacppc)
@@ -299,7 +299,7 @@ MKISOFS_ARGS.${image}+=	-hfs -part -hide
 UUDECODE_FILES=	${BOOTHFS}
 .include 
 .elif defined(USE_APPLE_ISO) || !empty(ports:Mmac68k)
-MKISOFS_ARGS.${image}+=	-apple --macbin -map ${.CURDIR}/hfsmap.lst
+MKISOFS_ARGS.${image}+=	-apple --macbin -data-change-warn -map ${.CURDIR}/hfsmap.lst
 .endif
 
 # Sun (sparc, sparc64, sun3)

Index: src/etc/etc.mac68k/Makefile.inc
diff -u src/etc/etc.mac68k/Makefile.inc:1.23 src/etc/etc.mac68k/Makefile.inc:1.24
--- src/etc/etc.mac68k/Makefile.inc:1.23	Fri Jul 26 11:38:21 2019
+++ src/etc/etc.mac68k/Makefile.inc	Fri May 19 14:47:16 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.23 2019/07/26 11:38:21 rin Exp $
+#	$NetBSD: Makefile.inc,v 1.24 2023/05/19 14:47:16 hauke Exp $
 #
 #	etc.mac68k/Makefile.inc -- mac68k-specific etc Makefile targets
 #
@@ -18,7 +18,7 @@ snap_md_post:
 
 # For "make iso-image"
 # mkisofs arguments to create a hybrid (HFS/Rockridge) CD-ROM image.
-MKISOFS_FLAGS+=	-hfs --macbin \
+MKISOFS_FLAGS+=	-hfs --macbin -data-change-warn \
 	-map ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/extensions.map
 
 iso-image: do-iso-image



CVS commit: src

2023-05-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri May 19 14:47:16 UTC 2023

Modified Files:
src/distrib/cdrom: Makefile
src/etc/etc.mac68k: Makefile.inc

Log Message:
Creating Type mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as .

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.

XXX What about macppc?


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/distrib/cdrom/Makefile
cvs rdiff -u -r1.23 -r1.24 src/etc/etc.mac68k/Makefile.inc

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



CVS commit: src/usr.bin/vacation

2023-04-11 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Apr 11 10:34:52 UTC 2023

Modified Files:
src/usr.bin/vacation: vacation.1 vacation.c

Log Message:
Make vacation(1) check 'Auto-Submitted:' (RFC 3834) in addition to
'Precedence:' (RFC 2076), and set 'Precedence:' in addition to
'Auto-Submitted:'.

Update the man page accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/vacation/vacation.1
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/vacation/vacation.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/vacation/vacation.1
diff -u src/usr.bin/vacation/vacation.1:1.32 src/usr.bin/vacation/vacation.1:1.33
--- src/usr.bin/vacation/vacation.1:1.32	Mon May  6 06:56:07 2019
+++ src/usr.bin/vacation/vacation.1	Tue Apr 11 10:34:52 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vacation.1,v 1.32 2019/05/06 06:56:07 wiz Exp $
+.\"	$NetBSD: vacation.1,v 1.33 2023/04/11 10:34:52 hauke Exp $
 .\"
 .\" Copyright (c) 1985, 1987, 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -172,6 +172,7 @@ option) is part of either the
 or
 .Dq Cc:
 headers of the mail.
+.Pp
 No messages from
 .Dq ???-REQUEST ,
 .Dq Postmaster ,
@@ -180,12 +181,20 @@ No messages from
 or
 .Dq MAILER-DAEMON
 will be replied to (where these strings are
-case insensitive) nor is a notification sent if a
+case insensitive).
+.Pp
+No notification is sent if a
 .Dq Precedence: bulk
 .Dq Precedence: list
-or
 .Dq Precedence: junk
-line is included in the mail headers.
+line or an
+.Dq Auto-Submitted:
+line with any qualifier except
+.Dq no
+are included in the mail headers.
+.Nm
+will include these headers in its response to avoid auto-responder loops.
+.Pp
 The people who have sent you messages are maintained as a
 .Xr db 3
 database in the file
@@ -195,7 +204,7 @@ in your home directory.
 .Nm
 expects a file
 .Pa .vacation.msg ,
-in your home directory, containing a message to be sent back to each
+in your home directory containing a message to be sent back to each
 sender.
 It should be an entire message (including headers).
 If the message contains the string
@@ -207,7 +216,6 @@ For example, it might contain:
 From: e...@cs.berkeley.edu (Eric Allman)
 Subject: I am on vacation
 Delivered-By-The-Graces-Of: The Vacation program
-Precedence: bulk
 
 I am on vacation until July 22.
 Your mail regarding "$SUBJECT" will be read when I return.
@@ -242,6 +250,9 @@ message to send
 .Sh SEE ALSO
 .Xr sendmail 1 ,
 .Xr syslog 3
+.Pp
+RFC 2076 ,
+RFC 3834
 .Sh HISTORY
 The
 .Nm

Index: src/usr.bin/vacation/vacation.c
diff -u src/usr.bin/vacation/vacation.c:1.37 src/usr.bin/vacation/vacation.c:1.38
--- src/usr.bin/vacation/vacation.c:1.37	Sun May  5 23:08:37 2019
+++ src/usr.bin/vacation/vacation.c	Tue Apr 11 10:34:52 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vacation.c,v 1.37 2019/05/05 23:08:37 pgoyette Exp $	*/
+/*	$NetBSD: vacation.c,v 1.38 2023/04/11 10:34:52 hauke Exp $	*/
 
 /*
  * Copyright (c) 1983, 1987, 1993
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)vacation.c	8.2 (Berkeley) 1/26/94";
 #endif
-__RCSID("$NetBSD: vacation.c,v 1.37 2019/05/05 23:08:37 pgoyette Exp $");
+__RCSID("$NetBSD: vacation.c,v 1.38 2023/04/11 10:34:52 hauke Exp $");
 #endif /* not lint */
 
 /*
@@ -325,7 +325,7 @@ readheaders(void)
 			COMPARE(buf, "From:") == 0)
 getfrom(buf + sizeof("From:") - 1);
 			break;
-		case 'P':		/* "Precedence:" */
+		case 'P':		/* "Precedence:" rfc 2076 ch 3.9 */
 			cont = 0;
 			if (CASECOMPARE(buf, "Precedence") != 0 ||
 			(buf[10] != ':' && buf[10] != ' ' &&
@@ -352,12 +352,26 @@ readheaders(void)
 break;
 			cont = 1;
 			goto findme;
-		case 'A':		/* "Apparently-To:" */
-			if ((tflag & APPARENTLY_TO) == 0 ||
-			COMPARE(buf, "Apparently-To:") != 0)
+		case 'A':
+/* "Apparently-To:" */
+			if ((tflag & APPARENTLY_TO) != 0 &&
+			COMPARE(buf, "Apparently-To:") == 0) {
+cont = 1;
+goto findme;
+			}
+			/* "Auto-Submitted:" rfc 3834 ch 5 */
+			cont = 0;
+			if (CASECOMPARE(buf, "Auto-Submitted") != 0 ||
+			(buf[14] != ':' && buf[14] != ' ' &&
+			buf[14] != '\t'))
 break;
-			cont = 1;
-			goto findme;
+			if ((p = strchr(buf, ':')) == NULL)
+break;
+			while (*++p && isspace((unsigned char)*p))
+continue;
+			if (CASECOMPARE(p, "no") != 0 )
+exit(0);
+			break;
 		case 'D':		/* "Delivered-To:" */
 			if ((tflag & DELIVERED_TO) == 0 ||
 			COMPARE(buf, "Delivered-To:") != 0)
@@ -628,6 +642,7 @@ sendmessage(const char *myname)
 	} 
 	(void)fprintf(sfp, "To: %s\n", from);
 	(void)fputs("Auto-Submitted: auto-replied\n", sfp);
+	(void)fputs("Precedence: bulk\n", sfp);
 	while (fgets(buf, sizeof buf, mfp) != NULL) {
 		char *p;
 		if ((p = strstr(buf, "$SUBJECT")) != NULL) {



CVS commit: src/usr.bin/vacation

2023-04-11 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Apr 11 10:34:52 UTC 2023

Modified Files:
src/usr.bin/vacation: vacation.1 vacation.c

Log Message:
Make vacation(1) check 'Auto-Submitted:' (RFC 3834) in addition to
'Precedence:' (RFC 2076), and set 'Precedence:' in addition to
'Auto-Submitted:'.

Update the man page accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/vacation/vacation.1
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/vacation/vacation.c

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



CVS commit: src/usr.sbin/makefs

2022-04-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Apr  6 22:25:00 UTC 2022

Modified Files:
src/usr.sbin/makefs: Makefile

Log Message:
udf.c uses math library functions.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/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.sbin/makefs/Makefile
diff -u src/usr.sbin/makefs/Makefile:1.37 src/usr.sbin/makefs/Makefile:1.38
--- src/usr.sbin/makefs/Makefile:1.37	Sun Oct 13 07:28:19 2019
+++ src/usr.sbin/makefs/Makefile	Wed Apr  6 22:25:00 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37 2019/10/13 07:28:19 mrg Exp $
+#	$NetBSD: Makefile,v 1.38 2022/04/06 22:25:00 hauke Exp $
 #
 
 WARNS?=	5
@@ -29,8 +29,8 @@ CPPFLAGS+=	-I${.CURDIR} -I${MKNODSRC} -I
 .include "${.CURDIR}/udf/Makefile.inc"
 
 .if !defined(HOSTPROG)
-DPADD+= ${LIBUTIL}
-LDADD+= -lutil
+DPADD+= ${LIBUTIL} ${LIBM}
+LDADD+= -lutil -lm
 
 COPTS.cd9660.c+=		${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_FORMAT_TRUNCATION}
 COPTS.cd9660_conversion.c+=	${GCC_NO_FORMAT_TRUNCATION}



CVS commit: src/usr.sbin/makefs

2022-04-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Apr  6 22:25:00 UTC 2022

Modified Files:
src/usr.sbin/makefs: Makefile

Log Message:
udf.c uses math library functions.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/makefs/Makefile

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



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-12-21 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Dec 21 15:08:14 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_acl.c

Log Message:
Default files to BSD group ownership in line with ffs, after the lead
of FreeBSD 
(patch by hannken@)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c

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



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-12-21 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Dec 21 15:08:14 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_acl.c

Log Message:
Default files to BSD group ownership in line with ffs, after the lead
of FreeBSD 
(patch by hannken@)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c:1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c:1.7
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c:1.6	Tue Mar 17 00:54:03 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c	Tue Dec 21 15:08:14 2021
@@ -1661,7 +1661,7 @@ zfs_acl_ids_create(znode_t *dzp, int fla
 			} else {
 acl_ids->z_fgid = zfs_fuid_create_cred(zfsvfs,
 ZFS_GROUP, cr, _ids->z_fuidp);
-#ifdef __FreeBSD_kernel__
+#if defined(__FreeBSD_kernel__) || defined(__NetBSD__)
 gid = acl_ids->z_fgid = dzp->z_gid;
 #else
 gid = crgetgid(cr);



CVS commit: src/sys/arch/mac68k/obio

2021-05-13 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 13 08:47:21 UTC 2021

Modified Files:
src/sys/arch/mac68k/obio: iwm_fd.c

Log Message:
We do not match machines whose SWIM does not support the IWM register
set used by this driver (SWIM II/III, SWIM behind IOP, AV models' DMA
based controllers).  Unfortunately, this distinction does not run
cleanly along MACH_CLASS* lines, and we have to look at MACH_MAC{model} tags.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/mac68k/obio/iwm_fd.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/mac68k/obio/iwm_fd.c
diff -u src/sys/arch/mac68k/obio/iwm_fd.c:1.59 src/sys/arch/mac68k/obio/iwm_fd.c:1.60
--- src/sys/arch/mac68k/obio/iwm_fd.c:1.59	Sat Apr 24 23:36:41 2021
+++ src/sys/arch/mac68k/obio/iwm_fd.c	Thu May 13 08:47:21 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: iwm_fd.c,v 1.59 2021/04/24 23:36:41 thorpej Exp $	*/
+/*	$NetBSD: iwm_fd.c,v 1.60 2021/05/13 08:47:21 hauke Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998 Hauke Fath.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.59 2021/04/24 23:36:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.60 2021/05/13 08:47:21 hauke Exp $");
 
 #include "locators.h"
 
@@ -65,11 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1
 #include 
 #include 
 
-/**
- **	Private functions
- **/
-static int map_iwm_base(vm_offset_t);
-
 /* Autoconfig */
 int	iwm_match(device_t, cfdata_t, void *);
 void	iwm_attach(device_t, device_t, void *);
@@ -78,6 +73,10 @@ int	fd_match(device_t, cfdata_t, void *)
 void	fd_attach(device_t, device_t, void *);
 int	fd_print(void *, const char *);
 
+/**
+ **	Private functions
+ **/
+
 /* Disklabel stuff */
 static void fdGetDiskLabel(fd_softc_t *, dev_t);
 static void fdPrintDiskLabel(struct disklabel *);
@@ -164,7 +163,7 @@ int iwmDebugging = 0 /* | M_TRACE_OP
  ** Module-global Variables
  **/
 
-/* The IWM base address */
+/* The controller base address */
 u_long IWMBase;
 
 /*
@@ -273,30 +272,71 @@ struct dkdriver fd_dkDriver = {
  * to match against. After all, that's what the obio concept is 
  * about: Onboard components that are present depending (only) 
  * on machine type.
+ *
+ * While here, map the machine-dependent physical IO address of IWM
+ * to VM address.
+ *
+ * We do not match, nor return an IWMBase address for machines whose
+ * SWIM does not support the IWM register set used by this driver
+ * (SWIM II/III, SWIM behind IOP, AV models' DMA based controllers).
+ * Unfortunately, this distinction does not run cleanly along
+ * MACH_CLASS* lines, and we will have to look at MACH_MAC{model} tags.
+ *
+ * See also "What chips are in what Macs?" at
+ * <http://bitsavers.org/pdf/apple/mac/mess/Mac_Technical_Notes.html>,
  */
 int
 iwm_match(device_t parent, cfdata_t match, void *aux)
 {
-	int matched;
+	int matched = 0;
 	extern u_long IOBase;		/* from mac68k/machdep.c */
 	extern u_long IWMBase;
-	
-	if (0 == map_iwm_base(IOBase)) {
-		/* 
-		 * Unknown machine HW:
-		 * The SWIM II/III chips that are present in post-Q700
-		 * '040 Macs have dropped the IWM register structure.
-		 * We know next to nothing about the SWIM.
-		 */
-		matched = 0;
-		if (TRACE_CONFIG)
-			printf("IWM or SWIM not found: Unknown location (SWIM II?).\n");
-	} else {
+
+	IWMBase = 0L;
+
+	switch (current_mac_model->class) {
+	case MACH_CLASSPB:	/* Not: 5x0, 190x */
+		if (current_mac_model->machineid == MACH_MACPB500 ||
+		current_mac_model->machineid == MACH_MACPB190 ||
+		current_mac_model->machineid == MACH_MACPB190CS)
+			break;
+		/* FALLTHROUGH */
+	case MACH_CLASSLC:	/* Only: LC II, Classic II */
+		if (current_mac_model->machineid != MACH_MACLCII &&
+		current_mac_model->machineid != MACH_MACCLASSICII)
+			break;
+		/* FALLTHROUGH */
+	case MACH_CLASSII:	/* All */
+	case MACH_CLASSIIci:	/* All */
+	case MACH_CLASSIIsi:	/* All */
+	case MACH_CLASSIIvx:	/* All */
+	case MACH_CLASSDUO:	/* All */
+		IWMBase = IOBase + 0x16000;
 		matched = 1;
-		if (TRACE_CONFIG) {
-			printf("iwm: IWMBase mapped to 0x%lx in VM.\n", 
-			IWMBase);
+		break;
+	case MACH_CLASSQ:	/* Only: 700 */
+		if (current_mac_model->machineid == MACH_MACQ700) {
+			IWMBase = IOBase + 0x1E000;
+			matched = 1;
+			break;
 		}
+		/* FALLTHROUGH */
+	case MACH_CLASSQ2:	/* None */
+	case MACH_CLASSP580:	/* None */
+	case MACH_CLASSIIfx:	/* None */
+	case MACH_CLASSAV:	/* None */
+	default:
+		IWMBase = 0L;
+		matched = 0;
+		break;
+	}
+
+	if (TRACE_CONFIG) {
+		if (matched == 0)
+			printf("IWM or original SWIM not found.\n");
+		else
+			printf("IWMBase mapped to VM addr 0x%lx.\n",
+			IWMBase);
 	}
 	return matched;
 }
@@ -337,7 +377,7 @@ iwm_attach(device_t parent, device_t sel
 		if (TRA

CVS commit: src/sys/arch/mac68k/obio

2021-05-13 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 13 08:47:21 UTC 2021

Modified Files:
src/sys/arch/mac68k/obio: iwm_fd.c

Log Message:
We do not match machines whose SWIM does not support the IWM register
set used by this driver (SWIM II/III, SWIM behind IOP, AV models' DMA
based controllers).  Unfortunately, this distinction does not run
cleanly along MACH_CLASS* lines, and we have to look at MACH_MAC{model} tags.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/mac68k/obio/iwm_fd.c

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



CVS commit: src/sys/dev/pci

2019-11-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 14 08:49:48 UTC 2019

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

Log Message:
The 16C1054 and 16C1058 serial multi-port controllers need a clock
multiplier of 8, just like the 16C1050 controller.

Verified with an ExSys EX-41388.

ryo@ checked back with the hardware his original commit was based on,
and confirmed the change.

XXX Pull-up to netbsd-{7,8,9}


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/pucdata.c

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



CVS commit: src/sys/dev/pci

2019-11-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 14 08:49:48 UTC 2019

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

Log Message:
The 16C1054 and 16C1058 serial multi-port controllers need a clock
multiplier of 8, just like the 16C1050 controller.

Verified with an ExSys EX-41388.

ryo@ checked back with the hardware his original commit was based on,
and confirmed the change.

XXX Pull-up to netbsd-{7,8,9}


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/pucdata.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/pucdata.c
diff -u src/sys/dev/pci/pucdata.c:1.104 src/sys/dev/pci/pucdata.c:1.105
--- src/sys/dev/pci/pucdata.c:1.104	Thu May  2 21:33:12 2019
+++ src/sys/dev/pci/pucdata.c	Thu Nov 14 08:49:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pucdata.c,v 1.104 2019/05/02 21:33:12 jdolecek Exp $	*/
+/*	$NetBSD: pucdata.c,v 1.105 2019/11/14 08:49:48 hauke Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 Christopher G. Demetriou.  All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.104 2019/05/02 21:33:12 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.105 2019/11/14 08:49:48 hauke Exp $");
 
 #include 
 #include 
@@ -2883,10 +2883,10 @@ const struct puc_device_description puc_
 	{	PCI_VENDOR_SYSTEMBASE, PCI_PRODUCT_SYSTEMBASE_SB16C1054, 0, 0 },
 	{	0x,	0x,		 0, 0 },
 	{
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ * 8 },
 	},
 	},
 
@@ -2895,14 +2895,14 @@ const struct puc_device_description puc_
 	{   PCI_VENDOR_SYSTEMBASE, PCI_PRODUCT_SYSTEMBASE_SB16C1058, 0, 0 },
 	{	0x,	0x,		 0, 0 },
 	{
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x20, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x28, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x30, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x38, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x20, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x28, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x30, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x38, COM_FREQ * 8 },
 	},
 	},
 



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-10-22 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct 22 13:19:47 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: r128_drv.h

Log Message:
When building r128drm(4), gcc objects to shifting into bit 31 of a
(signed) int. Make sure we are shifting an unsigned in those cases.

See also .

XXX There are probably more of these in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/r128_drv.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/external/bsd/drm/dist/shared-core/r128_drv.h
diff -u src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.2 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.3
--- src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.2	Thu Feb 24 07:59:44 2011
+++ src/sys/external/bsd/drm/dist/shared-core/r128_drv.h	Tue Oct 22 13:19:47 2019
@@ -277,7 +277,7 @@ extern long r128_compat_ioctl(struct fil
  */
 #define R128_PM4_BUFFER_OFFSET		0x0700
 #define R128_PM4_BUFFER_CNTL		0x0704
-#	define R128_PM4_MASK			(15 << 28)
+#	define R128_PM4_MASK			(15u << 28)
 #	define R128_PM4_NONPM4			(0  << 28)
 #	define R128_PM4_192PIO			(1  << 28)
 #	define R128_PM4_192BM			(2  << 28)
@@ -286,8 +286,8 @@ extern long r128_compat_ioctl(struct fil
 #	define R128_PM4_64PIO_128INDBM		(5  << 28)
 #	define R128_PM4_64BM_128INDBM		(6  << 28)
 #	define R128_PM4_64PIO_64VCBM_64INDBM	(7  << 28)
-#	define R128_PM4_64BM_64VCBM_64INDBM	(8  << 28)
-#	define R128_PM4_64PIO_64VCPIO_64INDPIO	(15 << 28)
+#	define R128_PM4_64BM_64VCBM_64INDBM	(8u  << 28)
+#	define R128_PM4_64PIO_64VCPIO_64INDPIO	(15u << 28)
 #	define R128_PM4_BUFFER_CNTL_NOUPDATE	(1  << 27)
 
 #define R128_PM4_BUFFER_WM_CNTL		0x0708



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-10-22 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct 22 13:19:47 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: r128_drv.h

Log Message:
When building r128drm(4), gcc objects to shifting into bit 31 of a
(signed) int. Make sure we are shifting an unsigned in those cases.

See also .

XXX There are probably more of these in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h

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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-02 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Aug  2 14:55:57 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: savage_state.c

Log Message:
Deal with gcc's "warning: this statement may fall through
[-Wimplicit-fallthrough=]" by adding the missing KNF FALLTHROUGH
comments.

christos@ approved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm/dist/shared-core/savage_state.c

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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-02 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Aug  2 14:55:57 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: savage_state.c

Log Message:
Deal with gcc's "warning: this statement may fall through
[-Wimplicit-fallthrough=]" by adding the missing KNF FALLTHROUGH
comments.

christos@ approved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm/dist/shared-core/savage_state.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/external/bsd/drm/dist/shared-core/savage_state.c
diff -u src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4 src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.5
--- src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4	Tue Jun 23 04:42:01 2009
+++ src/sys/external/bsd/drm/dist/shared-core/savage_state.c	Fri Aug  2 14:55:57 2019
@@ -297,6 +297,7 @@ static int savage_dispatch_dma_prim(drm_
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -434,6 +435,7 @@ static int savage_dispatch_vb_prim(drm_s
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -555,6 +557,7 @@ static int savage_dispatch_dma_idx(drm_s
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -693,6 +696,7 @@ static int savage_dispatch_vb_idx(drm_sa
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -1060,7 +1064,7 @@ int savage_bci_cmdbuf(struct drm_device 
 DMA_FLUSH();
 return -EINVAL;
 			}
-			/* fall through */
+			/* FALLTHROUGH */
 		case SAVAGE_CMD_DMA_PRIM:
 		case SAVAGE_CMD_VB_PRIM:
 			if (!first_draw_cmd)



CVS commit: src/doc

2017-11-26 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Nov 26 12:48:44 UTC 2017

Modified Files:
src/doc: 3RDPARTY

Log Message:
mDNSResponder: Update current version, and the home page link which
has been dead for ~nine years.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1485 src/doc/3RDPARTY:1.1486
--- src/doc/3RDPARTY:1.1485	Fri Nov 17 16:21:44 2017
+++ src/doc/3RDPARTY	Sun Nov 26 12:48:44 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1485 2017/11/17 16:21:44 rin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1486 2017/11/26 12:48:44 hauke Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -848,10 +848,10 @@ Uses libc's ohash
 
 Package:	mDNSResponder
 Version:	320.16
-Current Vers:	541
+Current Vers:	878
 Maintainer:	Apple
-Archive Site:	http://www.opensource.apple.com/tarballs/mDNSResponder/
-Home Page:	http://developer.apple.com/opensource/internet/bonjour.html
+Archive Site:	https://www.opensource.apple.com/tarballs/mDNSResponder/
+Home Page:	https://developer.apple.com/bonjour/
 Mailing List:	bonjour-...@lists.apple.com
 License:	Apache2 (mdnsd), BSD 3-clause (libdns_sd),
 		BSD 3-clause like (dns-sd)



CVS commit: src/doc

2017-11-26 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Nov 26 12:48:44 UTC 2017

Modified Files:
src/doc: 3RDPARTY

Log Message:
mDNSResponder: Update current version, and the home page link which
has been dead for ~nine years.


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

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



CVS commit: src/sys/dev/isa

2017-08-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Aug 14 11:49:30 UTC 2017

Modified Files:
src/sys/dev/isa: itesio_isa.c itesio_isavar.h

Log Message:
Enable the IT8628E shipped with my gigabyte GA-N3150N-D3V board.

XXX These IT suoer IO chips appear to be all fairly alike. Maybe add a
comprehensive list of IDs to recognize them, then deal with the
fallout?


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/isa/itesio_isa.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/isa/itesio_isavar.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/dev/isa/itesio_isa.c
diff -u src/sys/dev/isa/itesio_isa.c:1.25 src/sys/dev/isa/itesio_isa.c:1.26
--- src/sys/dev/isa/itesio_isa.c:1.25	Thu Apr 23 23:23:00 2015
+++ src/sys/dev/isa/itesio_isa.c	Mon Aug 14 11:49:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: itesio_isa.c,v 1.25 2015/04/23 23:23:00 pgoyette Exp $ */
+/*	$NetBSD: itesio_isa.c,v 1.26 2017/08/14 11:49:30 hauke Exp $ */
 /*	Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $	*/
 
 /*
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.25 2015/04/23 23:23:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.26 2017/08/14 11:49:30 hauke Exp $");
 
 #include 
 #include 
@@ -136,6 +136,7 @@ itesio_isa_match(device_t parent, cfdata
 	bus_space_unmap(ia->ia_iot, ioh, 2);
 
 	switch (cr) {
+	case ITESIO_ID8628:
 	case ITESIO_ID8705:
 	case ITESIO_ID8712:
 	case ITESIO_ID8716:

Index: src/sys/dev/isa/itesio_isavar.h
diff -u src/sys/dev/isa/itesio_isavar.h:1.9 src/sys/dev/isa/itesio_isavar.h:1.10
--- src/sys/dev/isa/itesio_isavar.h:1.9	Thu Nov 15 04:45:01 2012
+++ src/sys/dev/isa/itesio_isavar.h	Mon Aug 14 11:49:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: itesio_isavar.h,v 1.9 2012/11/15 04:45:01 msaitoh Exp $	*/
+/*	$NetBSD: itesio_isavar.h,v 1.10 2017/08/14 11:49:30 hauke Exp $	*/
 /*	$OpenBSD: itvar.h,v 1.2 2003/11/05 20:57:10 grange Exp $	*/
 
 /*
@@ -57,6 +57,7 @@
 #define ITESIO_CHIPID2	0x21	/* Chip ID 2 */
 #define ITESIO_DEVREV	0x22	/* Device Revision */
 
+#define ITESIO_ID8628	0x8628
 #define ITESIO_ID8705	0x8705
 #define ITESIO_ID8712	0x8712
 #define ITESIO_ID8716	0x8716



CVS commit: src/sys/dev/isa

2017-08-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Aug 14 11:49:30 UTC 2017

Modified Files:
src/sys/dev/isa: itesio_isa.c itesio_isavar.h

Log Message:
Enable the IT8628E shipped with my gigabyte GA-N3150N-D3V board.

XXX These IT suoer IO chips appear to be all fairly alike. Maybe add a
comprehensive list of IDs to recognize them, then deal with the
fallout?


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/isa/itesio_isa.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/isa/itesio_isavar.h

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



CVS commit: src/usr.sbin/pf/etc/defaults

2017-05-26 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri May 26 15:40:27 UTC 2017

Modified Files:
src/usr.sbin/pf/etc/defaults: pf.boot.conf

Log Message:
Enable carp packets early during boot, to avoid gratuitous failovers.

Okayed by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/pf/etc/defaults/pf.boot.conf

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/pf/etc/defaults/pf.boot.conf
diff -u src/usr.sbin/pf/etc/defaults/pf.boot.conf:1.3 src/usr.sbin/pf/etc/defaults/pf.boot.conf:1.4
--- src/usr.sbin/pf/etc/defaults/pf.boot.conf:1.3	Sun Sep  2 15:28:43 2007
+++ src/usr.sbin/pf/etc/defaults/pf.boot.conf	Fri May 26 15:40:27 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: pf.boot.conf,v 1.3 2007/09/02 15:28:43 tron Exp $
+#	$NetBSD: pf.boot.conf,v 1.4 2017/05/26 15:40:27 hauke Exp $
 #
 # /etc/defaults/pf.boot.conf --
 #	initial configuration for pf(4)
@@ -28,3 +28,6 @@ pass out inet6 proto ipv6-icmp all icmp6
 pass in inet6 proto ipv6-icmp all icmp6-type neighbradv
 pass out inet6 proto ipv6-icmp all icmp6-type routersol
 pass in inet6 proto ipv6-icmp all icmp6-type routeradv
+
+# Enable carp, to avoid spurious failovers.
+pass proto carp



CVS commit: src/usr.sbin/pf/etc/defaults

2017-05-26 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri May 26 15:40:27 UTC 2017

Modified Files:
src/usr.sbin/pf/etc/defaults: pf.boot.conf

Log Message:
Enable carp packets early during boot, to avoid gratuitous failovers.

Okayed by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/pf/etc/defaults/pf.boot.conf

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



Re: CVS commit: [netbsd-7] src/sys/net/npf

2017-05-21 Thread Hauke Fath
On Sun, 21 May 2017 08:08:34 +0900 (JST), Takahiro Kambe wrote:
> By comparing code with current, one line seems to missing.
> 
> Index: sys/net/npf/npf_inet.c
> ===
> RCS file: /cvsroot/src/sys/net/npf/npf_inet.c,v
> retrieving revision 1.32.2.1
> diff -u -r1.32.2.1 npf_inet.c
> --- sys/net/npf/npf_inet.c12 May 2017 05:32:12 -  1.32.2.1
> +++ sys/net/npf/npf_inet.c20 May 2017 23:06:17 -
> @@ -51,6 +51,7 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 

Confirmed.

hauke

-- 
Hauke Fath<ha...@espresso.rhein-neckar.de>
Ernst-Ludwig-Straße 15
64625 Bensheim
Germany


Re: CVS commit: [netbsd-7] src/sys/net/npf

2017-05-17 Thread Hauke Fath
[properly re-sent to source-changes-d -- it was cribbed from the web 
list archive]



The pull-up


Pull up following revision(s) (requested by jnemeth in ticket #1394):
sys/net/npf/npf_inet.c: revisions 1.34, 1.35 via patch
sys/net/npf/npf_mbuf.c: revision 1.16
sys/net/npf/npf_nat.c: revision 1.40
minimal changes necessary to link into an INET6-less kernel.
--
fixup misplaced #endif


leads to

[...]
--- npf_nat.o ---
/u/netbsd-builds/7/amd64/tools/bin/x86_64--netbsd-gcc -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -ffreestanding 
-fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer 
-fstack-protector -Wstack-protector --param ssp-buffer-size=1 
-fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main 
-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual 
-Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes 
-Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare 
--sysroot=/u/netbsd-builds/7/amd64/destdir -Damd64 -Dx86_64 -I. 
-I/public/netbsd-7/sys/../common/include -I/public/netbsd-7/sys/arch 
-I/public/netbsd-7/sys -nostdinc -DCHILD_MAX=1024 -DOPEN_MAX=1024 
-DIPSEC_ESP -DIPSEC_NAT_T -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT 
-std=gnu99 
-I/public/netbsd-7/sys/lib/libkern/../../../common/lib/libc/quad 
-I/public/netbsd-7/sys/lib/libkern/../../../common/lib/libc/string 
-I/public/netbsd-7/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string 
-D_FORTIFY_SOURCE=2 -I/public/netbsd-7/sys/../common/include 
-I/public/netbsd-7/sys/external/bsd/acpica/dist/include -c 
/public/netbsd-7/sys/net/npf/npf_nat.c

--- npf_inet.o ---
/public/netbsd-7/sys/net/npf/npf_inet.c: In function 'npf_addr_dump':
/public/netbsd-7/sys/net/npf/npf_inet.c:759:2: error: implicit 
declaration of function 'ip6_sprintf' 
[-Werror=implicit-function-declaration]

  return ip6_sprintf(addr);
  ^
/public/netbsd-7/sys/net/npf/npf_inet.c:759:2: error: return makes 
pointer from integer without a cast [-Werror]

cc1: all warnings being treated as errors
*** [npf_inet.o] Error code 1


which, I guess, didn't show up in a build because we do not have a 
(standard) kernel config file that includes npf(4).


Any reason why -current should not default GENERIC to npf?

Cheerio,
hauke

--
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


CVS commit: src/sys/dev/usb

2017-05-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May  4 14:21:01 UTC 2017

Modified Files:
src/sys/dev/usb: u3g.c usbdevs usbdevs.h usbdevs_data.h

Log Message:
Recognize the Sierra un2430 WWAN/GPS Module as found e.g. in HP's
Elitebook 2170p. Note the device will not do much without its
proprietary firmware loaded.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/usb/u3g.c
cvs rdiff -u -r1.733 -r1.734 src/sys/dev/usb/usbdevs
cvs rdiff -u -r1.724 -r1.725 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.725 -r1.726 src/sys/dev/usb/usbdevs_data.h

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



CVS commit: src/sys/dev/usb

2017-05-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May  4 14:07:34 UTC 2017

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

Log Message:
Recognize the Ralink RT5370 adapter. It has been in usbdevs for a while.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_run.c

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



CVS commit: src/sys/dev/usb

2017-05-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May  4 14:07:34 UTC 2017

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

Log Message:
Recognize the Ralink RT5370 adapter. It has been in usbdevs for a while.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/usb/if_run.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/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.21 src/sys/dev/usb/if_run.c:1.22
--- src/sys/dev/usb/if_run.c:1.21	Fri Nov 25 12:56:29 2016
+++ src/sys/dev/usb/if_run.c	Thu May  4 14:07:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.21 2016/11/25 12:56:29 skrll Exp $	*/
+/*	$NetBSD: if_run.c,v 1.22 2017/05/04 14:07:34 hauke Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.21 2016/11/25 12:56:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.22 2017/05/04 14:07:34 hauke Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -257,6 +257,7 @@ static const struct usb_devno run_devs[]
 	USB_ID(RALINK,		RT3072),
 	USB_ID(RALINK,		RT3370),
 	USB_ID(RALINK,		RT3572),
+	USB_ID(RALINK,		RT5370),
 	USB_ID(RALINK,		RT5572),
 	USB_ID(RALINK,		RT8070),
 	USB_ID(SAMSUNG,		RT2870_1),



CVS commit: src/etc

2017-01-16 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Jan 16 09:39:26 UTC 2017

Modified Files:
src/etc: protocols

Log Message:
Add carp as an alias for vrrp - after all, we do not ship vrrp, but we
do ship carp(4).

Restore the pfsync entry that was added with 1.20, then wiped out by
the 1.21 import. Please merge any wholesale imports properly.

Remove http://www.sethwklein.net/projects/iana-etc/ which 404s.

Should fix PR bin/51568


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/etc/protocols

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

Modified files:

Index: src/etc/protocols
diff -u src/etc/protocols:1.28 src/etc/protocols:1.29
--- src/etc/protocols:1.28	Wed Nov 18 16:16:36 2015
+++ src/etc/protocols	Mon Jan 16 09:39:26 2017
@@ -1,5 +1,5 @@
-# $NetBSD: protocols,v 1.28 2015/11/18 16:16:36 christos Exp $
-# See also: protocols(5), http://www.sethwklein.net/projects/iana-etc/
+# $NetBSD: protocols,v 1.29 2017/01/16 09:39:26 hauke Exp $
+# See also: protocols(5)
 #
 #Last Updated
 #2015-10-06
@@ -204,7 +204,7 @@ ipcomp   108 IPComp   # IP Paylo
 snp  109 SNP  # Sitara Networks Protocol[Manickam_R_Sridhar]
 compaq-peer  110 Compaq-Peer  # Compaq Peer Protocol[Victor_Volpe]
 ipx-in-ip111 IPX-in-IP# IPX in IP   [CJ_Lee]
-vrrp 112 VRRP # Virtual Router Redundancy   [RFC5798]
+vrrp 112 VRRP carp# Virtual Router Redundancy   [RFC5798]
 #   Protocol
 pgm  113 PGM  # PGM Reliable Transport  [Tony_Speakman]
 #   Protocol
@@ -243,7 +243,9 @@ shim6140 Shim6# Shim6 Pr
 wesp 141 WESP # Wrapped Encapsulating   [RFC5840]
 #   Security Payload
 rohc 142 ROHC # Robust Header Compression   [RFC5858]
-#143-252Unassigned  [Internet_Assigned_Numbers_Authority]
+#143-239Unassigned  [Internet_Assigned_Numbers_Authority]
+pfsync   240 PFSYNC   # PF Synchronization
+#241-252Unassigned  [Internet_Assigned_Numbers_Authority]
 #  253  Use for experimentation andY[RFC3692]
 #   testing
 #  254  Use for experimentation andY[RFC3692]



CVS commit: src/etc

2017-01-16 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Jan 16 09:39:26 UTC 2017

Modified Files:
src/etc: protocols

Log Message:
Add carp as an alias for vrrp - after all, we do not ship vrrp, but we
do ship carp(4).

Restore the pfsync entry that was added with 1.20, then wiped out by
the 1.21 import. Please merge any wholesale imports properly.

Remove http://www.sethwklein.net/projects/iana-etc/ which 404s.

Should fix PR bin/51568


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/etc/protocols

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



CVS commit: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt

2017-01-13 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Jan 13 08:41:46 UTC 2017

Modified Files:
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt: tpm_nvread.c

Log Message:
Add missing  for open(2) flags.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c

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

Modified files:

Index: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c
diff -u src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c:1.1.1.1 src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c:1.2
--- src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c:1.1.1.1	Sat Jan 28 02:57:29 2012
+++ src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c	Fri Jan 13 08:41:46 2017
@@ -19,6 +19,7 @@
  * http://www.opensource.org/licenses/cpl1.0.php.
  */
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt

2017-01-13 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Jan 13 08:41:46 UTC 2017

Modified Files:
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt: tpm_nvread.c

Log Message:
Add missing  for open(2) flags.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvread.c

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



CVS commit: src/sys/dev/usb

2016-11-10 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 10 15:42:13 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Add entry for Intel Centrino Advanced-N 6235 bluetooth piggy-back
Add entry for Validity Sensors, Inc. VFS491


To generate a diff of this commit:
cvs rdiff -u -r1.715 -r1.716 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.716 -r1.717 src/sys/dev/usb/usbdevs_data.h

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



CVS commit: src/sys/dev/usb

2016-11-10 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 10 15:38:51 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add entry for Intel Centrino Advanced-N 6235 bluetooth piggy-back
Add entry for Validity Sensors, Inc. VFS491


To generate a diff of this commit:
cvs rdiff -u -r1.723 -r1.724 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.723 src/sys/dev/usb/usbdevs:1.724
--- src/sys/dev/usb/usbdevs:1.723	Fri Nov  4 20:39:33 2016
+++ src/sys/dev/usb/usbdevs	Thu Nov 10 15:38:51 2016
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.723 2016/11/04 20:39:33 mlelstv Exp $
+$NetBSD: usbdevs,v 1.724 2016/11/10 15:38:51 hauke Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1856,6 +1856,7 @@ product INTEL TESTBOARD		0x9890	82930 te
 
 product INTEL2 RMH		0x0020	Rate Matching Hub
 product INTEL2 RMH2		0x0024	Rate Matching Hub
+product INTEL2 N_6235_BT	0x07da	Advanced-N 6235 Combo Bluetooth
 
 /* Intersil products */
 product INTERSIL PRISM_GT	0x1000	PrismGT USB 2.0 WLAN
@@ -3331,6 +3332,7 @@ product VALIDITY VFS451		0x0007	VFS451 F
 product VALIDITY VFS300		0x0008	VFS300 Fingerprint Reader
 product VALIDITY VFS5011	0x0011	VFS5011 Fingerprint Reader
 product VALIDITY VFS471		0x003c	VFS471 Fingerprint Reader
+product VALIDITY VFS491		0x003d	VFS491 Fingerprint Reader
 
 /* VidzMedia products */
 product VIDZMEDIA MONSTERTV	0x4fb1	MonsterTV P2H



CVS commit: src/sys/dev/usb

2016-11-10 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 10 15:38:51 UTC 2016

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add entry for Intel Centrino Advanced-N 6235 bluetooth piggy-back
Add entry for Validity Sensors, Inc. VFS491


To generate a diff of this commit:
cvs rdiff -u -r1.723 -r1.724 src/sys/dev/usb/usbdevs

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



CVS commit: src/usr.sbin/ypserv/ypinit

2013-07-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Jul 19 11:44:51 UTC 2013

Modified Files:
src/usr.sbin/ypserv/ypinit: Makefile.yp

Log Message:
Commit the patches in Wolfgang Stukenbrock's PR bin/41896.

(1) Do not serve UIDs below MINUID in master.passwd.* maps,
just like in passwd.* maps.

(2) Since stdethers(8) and stdhosts(8) strip comments, we do
not have to do it here, much less inconsistently.


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

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/ypserv/ypinit/Makefile.yp
diff -u src/usr.sbin/ypserv/ypinit/Makefile.yp:1.21 src/usr.sbin/ypserv/ypinit/Makefile.yp:1.22
--- src/usr.sbin/ypserv/ypinit/Makefile.yp:1.21	Sat Oct  7 16:54:38 2006
+++ src/usr.sbin/ypserv/ypinit/Makefile.yp	Fri Jul 19 11:44:51 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.yp,v 1.21 2006/10/07 16:54:38 elad Exp $
+#	$NetBSD: Makefile.yp,v 1.22 2013/07/19 11:44:51 hauke Exp $
 #
 # This is the YP Makefile, used to create and push YP maps.
 #
@@ -112,12 +112,14 @@ passwd.time: ${DIR}/master.passwd
 			${MAKEDBM} - passwd.byuid; \
 		fi; \
 		${CAT} ${.ALLSRC} | \
-		${AWK} 'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
-		{ print $$1, $$0 }' - | ${SORT} | \
+		${AWK} -v minuid=${MINUID} \
+		'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
+		{ if (minuid = $$3) print $$1, $$0 }' - | ${SORT} | \
 		${MAKEDBM_S} - master.passwd.byname; \
 		${CAT} ${.ALLSRC} | \
-		${AWK} 'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
-		{ print $$3, $$0 }' - | ${SORT} | \
+		${AWK} -v minuid=${MINUID} \
+		'BEGIN { FS=:; OFS=\t; } /^[a-zA-Z0-9_]/ \
+		{ if (minuid = $$3) print $$3, $$0 }' - | ${SORT} | \
 		${MAKEDBM_S} - master.passwd.byuid; \
 		${TOUCH} ${.TARGET}; \
 		${ECHO} updated passwd; \
@@ -198,7 +200,7 @@ ${MAP}.time: ${AMDDIR}/${MAP} __makedbme
 
 ethers.time: ${DIR}/ethers
 	-@if [ -f ${.ALLSRC} ]; then \
-		${STDETHERS} ${.ALLSRC} | ${SED} -e s/#.*$$// | \
+		${STDETHERS} ${.ALLSRC} | \
 		${AWK} 'BEGIN { FS=\t; OFS=\t; } { print $$1, $$0 }' | \
 		${SORT} | ${MAKEDBM} - ethers.byaddr; \
 		${STDETHERS} ${.ALLSRC} | \
@@ -257,7 +259,7 @@ group.time: ${DIR}/group
 #
 hosts.time: ${DIR}/hosts
 	-@if [ -f ${.ALLSRC} ]; then \
-		${STDHOSTS} ${.ALLSRC} | ${SED} -e s/#.*$$// | \
+		${STDHOSTS} ${.ALLSRC} | \
 		${AWK} '{for (i = 2; i = NF; i++) print $$i, $$0 }' | \
 		${SORT} | ${MAKEDBM} - hosts.byname; \
 		${STDHOSTS} ${.ALLSRC} | \
@@ -279,7 +281,7 @@ hosts.time: ${DIR}/hosts
 
 ipnodes.time: ${DIR}/hosts
 	-@if [ -f ${.ALLSRC} ]; then \
-		${STDHOSTS} -n ${.ALLSRC} | ${SED} -e s/#.*$$// | \
+		${STDHOSTS} -n ${.ALLSRC} | \
 		${AWK} '{for (i = 2; i = NF; i++) print $$i, $$0 }' | \
 		${SORT} | ${MAKEDBM} - ipnodes.byname; \
 		${STDHOSTS} -n ${.ALLSRC} | \



CVS commit: src/usr.sbin/ypserv/ypinit

2013-07-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Jul 19 11:44:51 UTC 2013

Modified Files:
src/usr.sbin/ypserv/ypinit: Makefile.yp

Log Message:
Commit the patches in Wolfgang Stukenbrock's PR bin/41896.

(1) Do not serve UIDs below MINUID in master.passwd.* maps,
just like in passwd.* maps.

(2) Since stdethers(8) and stdhosts(8) strip comments, we do
not have to do it here, much less inconsistently.


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

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



CVS commit: src/sys/arch/mac68k/dev

2012-12-07 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Dec  7 08:04:02 UTC 2012

Modified Files:
src/sys/arch/mac68k/dev: sbc.c

Log Message:
Remove the R1 syntactic sugar, since it collides with a #define in
m68k/regs.h, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mac68k/dev/sbc.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/mac68k/dev/sbc.c
diff -u src/sys/arch/mac68k/dev/sbc.c:1.54 src/sys/arch/mac68k/dev/sbc.c:1.55
--- src/sys/arch/mac68k/dev/sbc.c:1.54	Mon Nov 23 00:11:44 2009
+++ src/sys/arch/mac68k/dev/sbc.c	Fri Dec  7 08:04:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sbc.c,v 1.54 2009/11/23 00:11:44 rmind Exp $	*/
+/*	$NetBSD: sbc.c,v 1.55 2012/12/07 08:04:02 hauke Exp $	*/
 
 /*
  * Copyright (C) 1996 Scott Reynolds.  All rights reserved.
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbc.c,v 1.54 2009/11/23 00:11:44 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbc.c,v 1.55 2012/12/07 08:04:02 hauke Exp $);
 
 #include opt_ddb.h
 
@@ -274,7 +274,6 @@ sbc_pdma_in(struct ncr5380_softc *ncr_sc
 	}
 
 #define R4	*(u_int32_t *)data = *long_data, data += 4;
-#define R1	*(u_int8_t *)data = *byte_data, data += 1;
 	for (; resid = 128; resid -= 128) {
 		if (sbc_ready(ncr_sc))
 			goto interrupt;
@@ -286,11 +285,10 @@ sbc_pdma_in(struct ncr5380_softc *ncr_sc
 	while (resid) {
 		if (sbc_ready(ncr_sc))
 			goto interrupt;
-		R1;
+		*(u_int8_t *)data = *byte_data, data += 1;
 		resid--;
 	}
 #undef R4
-#undef R1
 
 interrupt:
 	nofault = NULL;
@@ -546,12 +544,10 @@ sbc_drq_intr(void *p)
 		if (count  count  4) {
 			data = (u_int8_t *)dh-dh_addr;
 			drq = (volatile u_int8_t *)sc-sc_drq_addr;
-
-#define R1		*data++ = *drq++
 			while (count) {
-R1; count--;
+*data++ = *drq++;
+count--;
 			}
-#undef R1
 			dh-dh_addr += resid;
 			dh-dh_len -= resid;
 		}
@@ -576,12 +572,10 @@ sbc_drq_intr(void *p)
 #undef R4
 			data = (u_int8_t *)long_data;
 			drq = (volatile u_int8_t *)long_drq;
-
-#define R1		*data++ = *drq++
 			while (count) {
-R1; count--;
+*data++ = *drq++;
+count--;
 			}
-#undef R1
 			dh-dh_len -= dcount;
 			dh-dh_addr += dcount;
 		}



CVS commit: src/sys/arch/mac68k/dev

2012-12-07 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Dec  7 08:04:02 UTC 2012

Modified Files:
src/sys/arch/mac68k/dev: sbc.c

Log Message:
Remove the R1 syntactic sugar, since it collides with a #define in
m68k/regs.h, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mac68k/dev/sbc.c

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



CVS commit: src/sys/arch/mac68k/dev

2012-12-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Dec  6 13:28:17 UTC 2012

Modified Files:
src/sys/arch/mac68k/dev: mac68k5380.c

Log Message:
Remove the R1 syntactic sugar, since it collides with a #define in
m68k/regs.h, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mac68k/dev/mac68k5380.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/mac68k/dev/mac68k5380.c
diff -u src/sys/arch/mac68k/dev/mac68k5380.c:1.47 src/sys/arch/mac68k/dev/mac68k5380.c:1.48
--- src/sys/arch/mac68k/dev/mac68k5380.c:1.47	Sat Oct 27 17:17:59 2012
+++ src/sys/arch/mac68k/dev/mac68k5380.c	Thu Dec  6 13:28:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mac68k5380.c,v 1.47 2012/10/27 17:17:59 chs Exp $	*/
+/*	$NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $	*/
 
 /*
  * Copyright (c) 1995 Allen Briggs
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mac68k5380.c,v 1.47 2012/10/27 17:17:59 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -409,9 +409,8 @@ extern	int			*nofault, m68k_fault_addr;
 			data = (u_int8_t *) pending_5380_data;
 			drq = (volatile u_int8_t *) ncr_5380_with_drq;
 			while (count) {
-#define R1	*data++ = *drq++
-R1; count--;
-#undef R1
+*data++ = *drq++;
+count--;
 			}
 			pending_5380_data += resid;
 			pending_5380_count -= resid;
@@ -440,9 +439,8 @@ extern	int			*nofault, m68k_fault_addr;
 		data = (u_int8_t *) long_data;
 		drq = (volatile u_int8_t *) long_drq;
 		while (count) {
-#define R1	*data++ = *drq++
-			R1; count--;
-#undef R1
+			*data++ = *drq++;
+			count--;
 		}
 		pending_5380_count -= dcount;
 		pending_5380_data += dcount;



CVS commit: src/sys/arch/mac68k/dev

2012-12-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Dec  6 13:28:17 UTC 2012

Modified Files:
src/sys/arch/mac68k/dev: mac68k5380.c

Log Message:
Remove the R1 syntactic sugar, since it collides with a #define in
m68k/regs.h, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mac68k/dev/mac68k5380.c

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



CVS commit: src

2012-02-01 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Feb  1 08:45:03 UTC 2012

Modified Files:
src/doc: CHANGES
src/share/man/man4/man4.mac68k: cpi.4

Log Message:
Document added timecounter support to the CSI Hurdler Centronics
Parallel Interface cpi(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1663 -r1.1664 src/doc/CHANGES
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.mac68k/cpi.4

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1663 src/doc/CHANGES:1.1664
--- src/doc/CHANGES:1.1663	Wed Feb  1 05:49:45 2012
+++ src/doc/CHANGES	Wed Feb  1 08:45:03 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1663 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1664 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1231,3 +1231,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	kernel: Add a new library, libquota, for control of and access to
 		disk quotas, extending the file-system-independent interface
 		added with the bouyer-quota2 branch. [dholland 20120201]
+	mac68k: Add timecounter support to the CSI Hurdler Centronics
+		Parallel Interface cpi(4) driver. [hauke 20120201]

Index: src/share/man/man4/man4.mac68k/cpi.4
diff -u src/share/man/man4/man4.mac68k/cpi.4:1.4 src/share/man/man4/man4.mac68k/cpi.4:1.5
--- src/share/man/man4/man4.mac68k/cpi.4:1.4	Mon Mar 23 16:14:01 2009
+++ src/share/man/man4/man4.mac68k/cpi.4	Wed Feb  1 08:45:03 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpi.4,v 1.4 2009/03/23 16:14:01 joerg Exp $
+.\	$NetBSD: cpi.4,v 1.5 2012/02/01 08:45:03 hauke Exp $
 .\
 .\ Copyright (c) 2008 Hauke Fath.  All rights reserved.
 .\
@@ -30,13 +30,27 @@
 .Nd parallel printer driver for Creative Systems Inc. Hurdler CPI Nubus card
 .\
 .Sh SYNOPSIS
-.Cd cpi* at nubus?
+.Cd cpi* at nubus? flags 0x1
 .\
 .Sh DESCRIPTION
-The
 .Nm
 interface provides access to parallel printer ports.
 .\
+.Sh CONFIGURATION
+The
+.Nm
+driver supports the following
+.Sy flags
+for use in
+.Xr config 1
+files:
+.Pp
+.Bl -tag -compact -width bits 16-23:
+.It bit 0 :
+use the CIO counters 1 and 2 as a 32 bit 
+.Xr timecounter 9 .
+.El
+.\
 .Sh HARDWARE
 The
 .Nm
@@ -72,7 +86,8 @@ The Z8536 INT line (pin 24) is wired to 
 .Xr autoconf 4 ,
 .Xr lpt 4 ,
 .Xr nubus 4 ,
-.Xr printcap 5
+.Xr printcap 5 ,
+.Xr timecounter 9
 .Pp
 .Tn IEEE Standard 1284-1994
 .\ .Sh STANDARDS



CVS commit: src

2012-02-01 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Feb  1 08:45:03 UTC 2012

Modified Files:
src/doc: CHANGES
src/share/man/man4/man4.mac68k: cpi.4

Log Message:
Document added timecounter support to the CSI Hurdler Centronics
Parallel Interface cpi(4) driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1663 -r1.1664 src/doc/CHANGES
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/man4.mac68k/cpi.4

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



CVS commit: src/sys/netatalk

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 09:53:44 UTC 2012

Modified Files:
src/sys/netatalk: aarp.c ddp_output.c

Log Message:
Fix AppleTalk name registration, as discussed on the port-macppc list
http://mail-index.netbsd.org/port-macppc/2010/07/09/msg001119.html
and in PR kern/44412, by looping back ddp broadcasts.

Patch submitted by David Riley against netbsd-5, adaptation for
-current and minor KNF touchup by me.

Needs to be pulled up to netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netatalk/aarp.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netatalk/ddp_output.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/netatalk/aarp.c
diff -u src/sys/netatalk/aarp.c:1.35 src/sys/netatalk/aarp.c:1.36
--- src/sys/netatalk/aarp.c:1.35	Sun May  8 13:51:31 2011
+++ src/sys/netatalk/aarp.c	Tue Jan 31 09:53:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $	*/
+/*	$NetBSD: aarp.c,v 1.36 2012/01/31 09:53:44 hauke Exp $	*/
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: aarp.c,v 1.36 2012/01/31 09:53:44 hauke Exp $);
 
 #include opt_mbuftrace.h
 
@@ -222,11 +222,19 @@ aarpwhohas(struct ifnet *ifp, const stru
 		ea-aarp_tpa = sat-sat_addr.s_node;
 	}
 
+	/* If we are talking to ourselves, use the loopback interface. */
+	if (AA_SAT(aa)-sat_addr.s_net == sat-sat_addr.s_net 
+	AA_SAT(aa)-sat_addr.s_node == sat-sat_addr.s_node)
+		ifp = lo0ifp;
+
 #ifdef NETATALKDEBUG
-	printf(aarp: sending request via %u.%u seaking %u.%u\n,
-	ntohs(AA_SAT(aa)-sat_addr.s_net), AA_SAT(aa)-sat_addr.s_node,
-	ntohs(sat-sat_addr.s_net), sat-sat_addr.s_node);
-#endif	/* NETATALKDEBUG */
+	printf(aarp: sending request via %u.%u through %s seeking %u.%u\n,
+	ntohs(AA_SAT(aa)-sat_addr.s_net),
+	AA_SAT(aa)-sat_addr.s_node,
+	ifp-if_xname,
+	ntohs(sat-sat_addr.s_net),
+	sat-sat_addr.s_node);
+#endif /* NETATALKDEBUG */
 
 	sa.sa_len = sizeof(struct sockaddr);
 	sa.sa_family = AF_UNSPEC;

Index: src/sys/netatalk/ddp_output.c
diff -u src/sys/netatalk/ddp_output.c:1.15 src/sys/netatalk/ddp_output.c:1.16
--- src/sys/netatalk/ddp_output.c:1.15	Sun Jul 17 20:54:53 2011
+++ src/sys/netatalk/ddp_output.c	Tue Jan 31 09:53:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ddp_output.c,v 1.15 2011/07/17 20:54:53 joerg Exp $	 */
+/*	$NetBSD: ddp_output.c,v 1.16 2012/01/31 09:53:44 hauke Exp $	 */
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ddp_output.c,v 1.15 2011/07/17 20:54:53 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ddp_output.c,v 1.16 2012/01/31 09:53:44 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -126,20 +126,40 @@ ddp_route(struct mbuf *m, struct route *
 	struct elaphdr *elh;
 	struct at_ifaddr *aa = NULL;
 	struct ifnet   *ifp = NULL;
-	u_short net;
+	uint16_tnet;
+	uint8_t node;
+	uint8_t loopback = 0;
 
 	if ((rt = rtcache_validate(ro)) != NULL  (ifp = rt-rt_ifp) != NULL) {
+		const struct sockaddr_at *dst = satocsat(rtcache_getdst(ro));
+		uint16_t dnet = dst-sat_addr.s_net;
+		uint8_t dnode = dst-sat_addr.s_node;
 		net = satosat(rt-rt_gateway)-sat_addr.s_net;
+		node = satosat(rt-rt_gateway)-sat_addr.s_node;
+
 		TAILQ_FOREACH(aa, at_ifaddr, aa_list) {
-			if (aa-aa_ifp == ifp 
-			ntohs(net) = ntohs(aa-aa_firstnet) 
+			if (ntohs(net) = ntohs(aa-aa_firstnet) 
 			ntohs(net) = ntohs(aa-aa_lastnet)) {
+/* Are we talking to ourselves? */
+if (dnet == aa-aa_addr.sat_addr.s_net 
+dnode == aa-aa_addr.sat_addr.s_node) {
+	/* If to us, redirect to lo0. */
+	ifp = lo0ifp;
+}
+/* Or is it a broadcast? */
+else if (dnet == aa-aa_addr.sat_addr.s_net 
+	dnode == 255) {
+	/* If broadcast, loop back a copy. */
+	loopback = 1;
+}
 break;
 			}
 		}
 	}
 	if (aa == NULL) {
+#ifdef NETATALKDEBUG
 		printf(%s: no address found\n, __func__);
+#endif
 		m_freem(m);
 		return EINVAL;
 	}
@@ -161,7 +181,8 @@ ddp_route(struct mbuf *m, struct route *
 		ntohs(aa-aa_firstnet) 
 		ntohs(satocsat(rtcache_getdst(ro))-sat_addr.s_net) =
 		ntohs(aa-aa_lastnet)) {
-			elh-el_dnode = satocsat(rtcache_getdst(ro))-sat_addr.s_node;
+			elh-el_dnode =
+			satocsat(rtcache_getdst(ro))-sat_addr.s_node;
 		} else {
 			elh-el_dnode =
 			satosat(rt-rt_gateway)-sat_addr.s_node;
@@ -182,5 +203,13 @@ ddp_route(struct mbuf *m, struct route *
 #endif
 
 	/* XXX */
+	if (loopback  rtcache_getdst(ro)-sa_family == AF_APPLETALK) {
+		struct mbuf *copym = m_copypacket(m, M_DONTWAIT);
+		
+#ifdef NETATALKDEBUG
+		printf(Looping back (not AARP).\n);
+#endif
+		looutput(lo0ifp, 

CVS commit: src/sys

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 22:13:20 UTC 2012

Modified Files:
src/sys/arch/mac68k/conf: GENERIC
src/sys/arch/mac68k/nubus: cpi_nubus.c cpi_nubusvar.h
src/sys/dev/ic: z8536reg.h

Log Message:
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/nubus/cpi_nubus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/nubus/cpi_nubusvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/z8536reg.h

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

Modified files:

Index: src/sys/arch/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.204 src/sys/arch/mac68k/conf/GENERIC:1.205
--- src/sys/arch/mac68k/conf/GENERIC:1.204	Sun Dec 18 05:49:29 2011
+++ src/sys/arch/mac68k/conf/GENERIC	Tue Jan 31 22:13:20 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.204 2011/12/18 05:49:29 dholland Exp $
+# $NetBSD: GENERIC,v 1.205 2012/01/31 22:13:20 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/mac68k/conf/std.mac68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.204 $
+#ident 		GENERIC-$Revision: 1.205 $
 
 maxusers	16		# estimated number of users
 
@@ -234,7 +234,8 @@ wsmouse* at ams?
 # Centronics printer port
 
 # CSI Hurdler Centronics Parallel Interface
-cpi*	at nubus?
+# CPI_CTC12_IS_TIMECOUNTER	0x01	Run counters 1+2 as timecounter	
+cpi*	at nubus? flags 0x1
 
 
 # Serial Devices

Index: src/sys/arch/mac68k/nubus/cpi_nubus.c
diff -u src/sys/arch/mac68k/nubus/cpi_nubus.c:1.5 src/sys/arch/mac68k/nubus/cpi_nubus.c:1.6
--- src/sys/arch/mac68k/nubus/cpi_nubus.c:1.5	Fri May 13 22:35:50 2011
+++ src/sys/arch/mac68k/nubus/cpi_nubus.c	Tue Jan 31 22:13:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpi_nubus.c,v 1.5 2011/05/13 22:35:50 rmind Exp $	*/
+/*	$NetBSD: cpi_nubus.c,v 1.6 2012/01/31 22:13:20 hauke Exp $	*/
 
 /*-
  * Copyright (c) 2008 Hauke Fath
@@ -25,8 +25,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,v 1.5 2011/05/13 22:35:50 rmind Exp $);
-
+__KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,v 1.6 2012/01/31 22:13:20 hauke Exp $);
 #include sys/param.h
 #include sys/systm.h
 #include sys/proc.h
@@ -40,6 +39,7 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #include sys/ioctl.h
 #include sys/tty.h
 #include sys/time.h
+#include sys/timetc.h
 #include sys/kernel.h
 #include sys/syslog.h
 #include sys/errno.h
@@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #define M_TRACE_WRITE	0x0010
 #define M_TRACE_IOCTL	0x0020
 #define M_TRACE_STATUS	0x0040
+#define M_TRACE_TCNTR	0x0080
 #define M_TRACE_ALL	0x
 #define M_TRACE_NONE	0x
 
@@ -81,12 +82,12 @@ __KERNEL_RCSID(0, $NetBSD: cpi_nubus.c,
 #define TRACE_WRITE	(cpi_debug_mask  M_TRACE_WRITE)
 #define TRACE_IOCTL	(cpi_debug_mask  M_TRACE_IOCTL)
 #define TRACE_STATUS	(cpi_debug_mask  M_TRACE_STATUS)
+#define TRACE_TCNTR	(cpi_debug_mask  M_TRACE_TCNTR)
 #define TRACE_ALL	(cpi_debug_mask  M_TRACE_ALL)
 #define TRACE_NONE	(cpi_debug_mask  M_TRACE_NONE)
 
-uint32_t cpi_debug_mask = M_TRACE_NONE /* | M_TRACE_WRITE */ ;
-
-#else
+uint32_t cpi_debug_mask = M_TRACE_NONE /* | M_TRACE_TCNTR | M_TRACE_WRITE */ ;
+#else /* CPI_DEBUG */
 #define TRACE_CONFIG	0
 #define TRACE_OPEN	0
 #define TRACE_CLOSE	0
@@ -94,11 +95,10 @@ uint32_t cpi_debug_mask = M_TRACE_NONE /
 #define TRACE_WRITE	0
 #define TRACE_IOCTL	0
 #define TRACE_STATUS	0
+#define TRACE_TCNTR	0
 #define TRACE_ALL	0
 #define TRACE_NONE	0
-#endif
-
-#undef USE_CIO_TIMERS		/* TBD */
+#endif /* CPI_DEBUG */
 
 /* autoconf interface */
 int cpi_nubus_match(device_t, cfdata_t, void *);
@@ -126,14 +126,13 @@ static void cpi_wakeup(void *);
 static int cpi_flush(struct cpi_softc *);
 static void cpi_intr(void *);
 
-#ifdef USE_CIO_TIMERS
-static void cpi_initclock(struct cpi_softc *);
-static u_int cpi_get_timecount(struct timecounter *);
-#endif
-
-static inline void z8536_reg_set(bus_space_tag_t, bus_space_handle_t,
+static void cpi_tc_initclock(struct cpi_softc *);
+static uint cpi_get_timecount(struct timecounter *);
+static uint z8536_read_counter1(bus_space_tag_t, bus_space_handle_t);
+static uint z8536_read_counter2(bus_space_tag_t, bus_space_handle_t);
+static void z8536_reg_set(bus_space_tag_t, bus_space_handle_t,
 uint8_t, uint8_t);
-static inline uint8_t z8536_reg_get(bus_space_tag_t, bus_space_handle_t,
+static uint8_t z8536_reg_get(bus_space_tag_t, bus_space_handle_t,
 uint8_t);
 
 
@@ -191,19 +190,6 @@ const uint8_t cio_init[] = {
 	Z8536_DPPRC, 	0x00,
 	Z8536_SIOCRC, 	0x00,
 
-#ifdef USE_CIO_TIMERS
-	/*
-	 * Counter/Timers 1+2 are joined to form a free-running
-	 * 32 bit timecounter
-	 */
-	Z8536_CTMSR1

CVS commit: src/sys/netatalk

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 09:53:44 UTC 2012

Modified Files:
src/sys/netatalk: aarp.c ddp_output.c

Log Message:
Fix AppleTalk name registration, as discussed on the port-macppc list
http://mail-index.netbsd.org/port-macppc/2010/07/09/msg001119.html
and in PR kern/44412, by looping back ddp broadcasts.

Patch submitted by David Riley against netbsd-5, adaptation for
-current and minor KNF touchup by me.

Needs to be pulled up to netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netatalk/aarp.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netatalk/ddp_output.c

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



CVS commit: src/sys

2012-01-31 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 31 22:13:20 UTC 2012

Modified Files:
src/sys/arch/mac68k/conf: GENERIC
src/sys/arch/mac68k/nubus: cpi_nubus.c cpi_nubusvar.h
src/sys/dev/ic: z8536reg.h

Log Message:
Employ the two free 16 bit timers of the Hurdler Centronics Parallel
Interface card's Z8536 CIO for Timecounter support.

Builds, should work, but not testable yet because of pmap breakage.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/nubus/cpi_nubus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mac68k/nubus/cpi_nubusvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/z8536reg.h

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



CVS commit: src/sys/arch/macppc/macppc

2012-01-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 24 15:24:55 UTC 2012

Modified Files:
src/sys/arch/macppc/macppc: disksubr.c

Log Message:
Add support for BSD disklabels, scanning the beginning of the disk
in four-byte strides, like disklabel(8) does it.

Since the netbsd-6 branch is around the corner, this is a
minimally-intrusive addition.

Note there is no write support, for good reasons.
Note also that disksubr.c is in dire need of re-structuring.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/macppc/macppc/disksubr.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/macppc/macppc/disksubr.c
diff -u src/sys/arch/macppc/macppc/disksubr.c:1.47 src/sys/arch/macppc/macppc/disksubr.c:1.48
--- src/sys/arch/macppc/macppc/disksubr.c:1.47	Mon Mar 16 23:11:12 2009
+++ src/sys/arch/macppc/macppc/disksubr.c	Tue Jan 24 15:24:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.47 2009/03/16 23:11:12 dsl Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.48 2012/01/24 15:24:55 hauke Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -106,7 +106,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.47 2009/03/16 23:11:12 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.48 2012/01/24 15:24:55 hauke Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -137,6 +137,8 @@ static const char *read_mac_label(dev_t,
 		struct disklabel *, struct cpu_disklabel *);
 static const char *read_dos_label(dev_t, void (*)(struct buf *),
 		struct disklabel *, struct cpu_disklabel *);
+static const char *read_bsd_label(dev_t, void (*)(struct buf *),
+		struct disklabel *, struct cpu_disklabel *);
 static int get_netbsd_label(dev_t, void (*)(struct buf *),
 		struct disklabel *, struct cpu_disklabel *);
 
@@ -387,6 +389,78 @@ done:
 	return msg;
 }
 
+/*
+ * Scan the disk buffer in four byte strides for a native BSD
+ * disklabel (different ports have variably-sized bootcode before
+ * the label)
+ */
+static const char *
+read_bsd_label(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
+struct cpu_disklabel *osdep)
+{
+	struct disklabel *dlp;
+	struct buf *bp;
+	const char *msg;
+	struct disklabel *blk_start, *blk_end;
+	int size, match;
+	
+	msg = NULL;
+
+	/* 
+	 * Read in the first #(NUM_PARTS + 1) blocks of the disk.
+	 * The native Macintosh partition table starts at 
+	 * sector #1, but we want #0 too for the BSD label.
+	 */
+	size = roundup((NUM_PARTS + 1)  DEV_BSHIFT, lp-d_secsize);
+	bp = geteblk(size);
+
+	bp-b_dev = dev;
+	bp-b_blkno = 0;
+	bp-b_resid = 0;
+	bp-b_bcount = size;
+	bp-b_flags |= B_READ;
+	bp-b_cylinder = 1 / lp-d_secpercyl;
+	(*strat)(bp);
+
+	match = 0;
+	
+	if (biowait(bp)) {
+		msg = I/O error reading BSD disklabel;
+	} else {
+		/*
+		 * Hunt the label, starting at the beginning of the disk.
+		 * When we find an inconsistent label, report and continue.
+		 */
+		blk_start = (struct disklabel *)bp-b_data;
+		blk_end = (struct disklabel *)((char *)bp-b_data +
+		(NUM_PARTS  DEV_BSHIFT) - sizeof(struct disklabel));
+
+		for (dlp = blk_start; dlp = blk_end; 
+		 dlp = (struct disklabel *)((char *)dlp + sizeof(long))) {
+			if (dlp-d_magic == DISKMAGIC 
+			dlp-d_magic2 == DISKMAGIC) {
+/* Sanity check */
+if (dlp-d_npartitions = MAXPARTITIONS  
+dkcksum(dlp) == 0) {
+	*lp = *dlp;
+	match = -1;
+	break;
+#ifdef DIAGNOSTIC
+} else {
+	printf(read_bsd_label() found 
+	damaged disklabel starting at 
+	0x0%p, ignore\n, dlp);
+#endif /* DIAGNOSTIC */
+}
+			}
+		}
+		if (!match)
+			msg = BSD disklabel not found;
+	}
+	brelse(bp, 0);
+	return msg;
+}
+
 /* Read MS-DOS partition table.
  *
  * XXX -
@@ -597,8 +671,9 @@ readdisklabel(dev_t dev, void (*strat)(s
 			if (!msg)
 osdep-cd_start = 0;
 		} else {
-			msg = no disk label -- NetBSD or Macintosh;
-			osdep-cd_start = 0;	/* XXX for now */
+			msg = read_bsd_label(dev, strat, lp, osdep);
+			if (!msg)
+osdep-cd_start = 0;	/* XXX for now */
 		}
 	}
 



CVS commit: src/sys/arch/macppc/macppc

2012-01-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Jan 24 15:24:55 UTC 2012

Modified Files:
src/sys/arch/macppc/macppc: disksubr.c

Log Message:
Add support for BSD disklabels, scanning the beginning of the disk
in four-byte strides, like disklabel(8) does it.

Since the netbsd-6 branch is around the corner, this is a
minimally-intrusive addition.

Note there is no write support, for good reasons.
Note also that disksubr.c is in dire need of re-structuring.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/macppc/macppc/disksubr.c

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



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

2012-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Jan 23 13:55:03 UTC 2012

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
In the light of PR kern/29702, add swwdog(4) pseudo device.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/arch/macppc/conf/GENERIC

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

Modified files:

Index: src/sys/arch/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.296 src/sys/arch/macppc/conf/GENERIC:1.297
--- src/sys/arch/macppc/conf/GENERIC:1.296	Wed Jan 11 17:16:35 2012
+++ src/sys/arch/macppc/conf/GENERIC	Mon Jan 23 13:55:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.296 2012/01/11 17:16:35 macallan Exp $
+# $NetBSD: GENERIC,v 1.297 2012/01/23 13:55:02 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/macppc/conf/std.macppc
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.296 $
+#ident 		GENERIC-$Revision: 1.297 $
 
 maxusers	32
 
@@ -605,7 +605,8 @@ pseudo-device	bridge			# simple inter-ne
 pseudo-device	agr			# IEEE 802.3ad link aggregation
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	openfirm		# /dev/openfirm
-pseudo-device	wsmux			# mouse and keyboard multiplexor
+pseudo-device	wsmux			# mouse and keyboard multiplexer
+pseudo-device	swwdog			# software watchdog driver - swwdog(4)
 pseudo-device	clockctl		# user control of clock subsystem
 pseudo-device	ksyms			# /dev/ksyms
 pseudo-device	nsmb			# SMB requester



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

2012-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Jan 23 13:55:03 UTC 2012

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
In the light of PR kern/29702, add swwdog(4) pseudo device.


To generate a diff of this commit:
cvs rdiff -u -r1.296 -r1.297 src/sys/arch/macppc/conf/GENERIC

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



CVS commit: src/etc/etc.mac68k

2011-10-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct  4 10:55:53 UTC 2011

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

Log Message:
Create the sysmon device node for the software watchdog


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.mac68k/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.mac68k/MAKEDEV.conf
diff -u src/etc/etc.mac68k/MAKEDEV.conf:1.10 src/etc/etc.mac68k/MAKEDEV.conf:1.11
--- src/etc/etc.mac68k/MAKEDEV.conf:1.10	Sat Sep 13 13:11:38 2008
+++ src/etc/etc.mac68k/MAKEDEV.conf	Tue Oct  4 10:55:53 2011
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.10 2008/09/13 13:11:38 tsutsui Exp $
+# $NetBSD: MAKEDEV.conf,v 1.11 2011/10/04 10:55:53 hauke Exp $
 
 all_md)
 	makedev wscons std_mac68k sd0 sd1 sd2 sd3 wd0 wd1 wd2 wd3 tty0 tty1
@@ -11,6 +11,7 @@ all_md)
 	makedev scsibus0 scsibus1 scsibus2 scsibus3
 	makedev ses0 ses1 ses2 ses3
 	makedev cfs
+	makedev sysmon
 	;;
 
 std_mac68k)



CVS commit: src/etc/etc.mac68k

2011-10-04 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct  4 10:55:53 UTC 2011

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

Log Message:
Create the sysmon device node for the software watchdog


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/etc/etc.mac68k/MAKEDEV.conf

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



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

2011-10-03 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Oct  3 19:22:59 UTC 2011

Modified Files:
src/sys/arch/mac68k/conf: GENERIC SMALLRAM majors.mac68k

Log Message:
Add the MI software watchdog to GENERIC (not to SMALLRAM, as usual).


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mac68k/conf/SMALLRAM
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mac68k/conf/majors.mac68k

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/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.201 src/sys/arch/mac68k/conf/GENERIC:1.202
--- src/sys/arch/mac68k/conf/GENERIC:1.201	Thu Jun 30 20:09:32 2011
+++ src/sys/arch/mac68k/conf/GENERIC	Mon Oct  3 19:22:59 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.201 2011/06/30 20:09:32 wiz Exp $
+# $NetBSD: GENERIC,v 1.202 2011/10/03 19:22:59 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/mac68k/conf/std.mac68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.201 $
+#ident 		GENERIC-$Revision: 1.202 $
 
 maxusers	16		# estimated number of users
 
@@ -350,6 +350,7 @@ pseudo-device	ite		1	# ite emulation for
 pseudo-device	pty			# pseudo-terminals
 pseudo-device	clockctl		# user control of clock subsystem
 pseudo-device	putter			# for puffs and pud
+pseudo-device	swwdog			# software watchdog driver
 
 # random number generator pseudo-device
 pseudo-device	rnd			# /dev/random and in-kernel generator

Index: src/sys/arch/mac68k/conf/SMALLRAM
diff -u src/sys/arch/mac68k/conf/SMALLRAM:1.38 src/sys/arch/mac68k/conf/SMALLRAM:1.39
--- src/sys/arch/mac68k/conf/SMALLRAM:1.38	Sun Mar  6 17:08:27 2011
+++ src/sys/arch/mac68k/conf/SMALLRAM	Mon Oct  3 19:22:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: SMALLRAM,v 1.38 2011/03/06 17:08:27 bouyer Exp $
+#	$NetBSD: SMALLRAM,v 1.39 2011/10/03 19:22:59 hauke Exp $
 #
 # This is an example of how to configure a small, efficient kernel for
 # a system with limited RAM. Even so it's capable of doing quite a
@@ -133,4 +133,5 @@ no pseudo-device	agr
 no pseudo-device	accf_data
 no pseudo-device	accf_http
 no pseudo-device	putter
+no pseudo-device	swwdog
 no pseudo-device	ksyms

Index: src/sys/arch/mac68k/conf/majors.mac68k
diff -u src/sys/arch/mac68k/conf/majors.mac68k:1.22 src/sys/arch/mac68k/conf/majors.mac68k:1.23
--- src/sys/arch/mac68k/conf/majors.mac68k:1.22	Thu Jun 30 20:09:32 2011
+++ src/sys/arch/mac68k/conf/majors.mac68k	Mon Oct  3 19:22:59 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.mac68k,v 1.22 2011/06/30 20:09:32 wiz Exp $
+#	$NetBSD: majors.mac68k,v 1.23 2011/10/03 19:22:59 hauke Exp $
 #
 # Device majors for mac68k
 #
@@ -49,6 +49,7 @@ device-major	cgd		char 51  block 23	cgd
 device-major	ksyms		char 52			ksyms
 device-major	wsfont		char 53			wsfont
 device-major	cpi		char 54			cpi
+device-major	sysmon		char 55			sysmon_wdog
 
 device-major	nsmb		char 98			nsmb
 



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

2011-10-03 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Oct  3 19:22:59 UTC 2011

Modified Files:
src/sys/arch/mac68k/conf: GENERIC SMALLRAM majors.mac68k

Log Message:
Add the MI software watchdog to GENERIC (not to SMALLRAM, as usual).


To generate a diff of this commit:
cvs rdiff -u -r1.201 -r1.202 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mac68k/conf/SMALLRAM
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mac68k/conf/majors.mac68k

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



CVS commit: src/sys/arch/sparc/stand/ofwboot

2011-05-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 19 15:18:29 UTC 2011

Modified Files:
src/sys/arch/sparc/stand/ofwboot: boot.h

Log Message:
Fix a tyop.
The intentions were good...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/boot.h

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

Modified files:

Index: src/sys/arch/sparc/stand/ofwboot/boot.h
diff -u src/sys/arch/sparc/stand/ofwboot/boot.h:1.7 src/sys/arch/sparc/stand/ofwboot/boot.h:1.8
--- src/sys/arch/sparc/stand/ofwboot/boot.h:1.7	Thu May 19 03:09:47 2011
+++ src/sys/arch/sparc/stand/ofwboot/boot.h	Thu May 19 15:18:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.h,v 1.7 2011/05/19 03:09:47 christos Exp $	*/
+/*	$NetBSD: boot.h,v 1.8 2011/05/19 15:18:29 hauke Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
 extern void	loadfile_set_allocator(int);
 
 /* alloc.c */
-extern vois	freeall(void);
+extern void	freeall(void);
 
 /* ofdev.c */
 char *filename(char*, char*);



CVS commit: src/sys/arch/sparc/stand/ofwboot

2011-05-19 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu May 19 15:18:29 UTC 2011

Modified Files:
src/sys/arch/sparc/stand/ofwboot: boot.h

Log Message:
Fix a tyop.
The intentions were good...


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/boot.h

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



Re: CVS commit: src/sys

2011-05-17 Thread Hauke Fath
[Due to loss of connectivity, my home email is high-latency 'uucp via
macbook on bicycle'. So this is probably late.]

At 9:35 Uhr +0200 17.05.2011, Martin Husemann wrote:
On Mon, May 16, 2011 at 08:29:03PM +0200, Martin S. Weber wrote:
 or just hack it brutally

 ( cvs rdiff -u -r1.308 -r1.309 src/sys/arch/sparc/sparc/machdep.c )

Well, anything happening during this early startup phase is hackish,
and this one is not evil.

OTOH, declaring something 'const' is somewhere between of limited value and
downright miseading, when you have to suspect that something somewhere in
the tree won't care and write to it anyway.

Nevertheless, thanks for the fix.

hauke

-- 
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in emailInstitut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-3281


CVS commit: src/sys/dist/pf/net

2011-05-11 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed May 11 12:22:34 UTC 2011

Modified Files:
src/sys/dist/pf/net: pf_table.c

Log Message:
Commit the patch from
http://mail-index.netbsd.org/current-users/2010/09/12/msg014289.html,
fixing a panic: pool 'pfrktable' is IPL_NONE, but called from
interrupt context that occurred on NetBSD/sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dist/pf/net/pf_table.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/dist/pf/net/pf_table.c
diff -u src/sys/dist/pf/net/pf_table.c:1.16 src/sys/dist/pf/net/pf_table.c:1.17
--- src/sys/dist/pf/net/pf_table.c:1.16	Mon Apr 12 13:57:38 2010
+++ src/sys/dist/pf/net/pf_table.c	Wed May 11 12:22:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pf_table.c,v 1.16 2010/04/12 13:57:38 ahoka Exp $	*/
+/*	$NetBSD: pf_table.c,v 1.17 2011/05/11 12:22:34 hauke Exp $	*/
 /*	$OpenBSD: pf_table.c,v 1.70 2007/05/23 11:53:45 markus Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pf_table.c,v 1.16 2010/04/12 13:57:38 ahoka Exp $);
+__KERNEL_RCSID(0, $NetBSD: pf_table.c,v 1.17 2011/05/11 12:22:34 hauke Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_inet.h
@@ -200,9 +200,9 @@
 {
 #ifdef __NetBSD__
 	pool_init(pfr_ktable_pl, sizeof(struct pfr_ktable), 0, 0, 0,
-	pfrktable, pool_allocator_nointr, IPL_NONE);
+	pfrktable, pool_allocator_nointr, IPL_NET);
 	pool_init(pfr_kentry_pl, sizeof(struct pfr_kentry), 0, 0, 0,
-	pfrkentry, pool_allocator_nointr, IPL_NONE);
+	pfrkentry, pool_allocator_nointr, IPL_NET);
 	pool_init(pfr_kentry_pl2, sizeof(struct pfr_kentry), 0, 0, 0,
 	pfrkentry2, NULL, IPL_SOFTNET);
 #else



CVS commit: src/sys/dist/pf/net

2011-05-11 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed May 11 12:22:34 UTC 2011

Modified Files:
src/sys/dist/pf/net: pf_table.c

Log Message:
Commit the patch from
http://mail-index.netbsd.org/current-users/2010/09/12/msg014289.html,
fixing a panic: pool 'pfrktable' is IPL_NONE, but called from
interrupt context that occurred on NetBSD/sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dist/pf/net/pf_table.c

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



CVS commit: src/bin/ksh

2011-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Jan 23 17:11:55 UTC 2011

Modified Files:
src/bin/ksh: siglist.sh

Log Message:
The Solaris 7 /usr/{,xpg4/}bin/sorts expect whitespace between the -k
option and its argument.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/siglist.sh

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

Modified files:

Index: src/bin/ksh/siglist.sh
diff -u src/bin/ksh/siglist.sh:1.8 src/bin/ksh/siglist.sh:1.9
--- src/bin/ksh/siglist.sh:1.8	Sat Oct 25 22:18:15 2008
+++ src/bin/ksh/siglist.sh	Sun Jan 23 17:11:55 2011
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: siglist.sh,v 1.8 2008/10/25 22:18:15 apb Exp $
+#	$NetBSD: siglist.sh,v 1.9 2011/01/23 17:11:55 hauke Exp $
 #
 # Script to generate a sorted, complete list of signals, suitable
 # for inclusion in trap.c as array initializer.
@@ -26,7 +26,7 @@
 	{ QwErTy .signal = SIG\1 , .name = \1, .mess = \2 },\
 #endif/')  $in
 $CPP $in   $out
-${SED} -n 's/{ QwErTy/{/p'  $out | ${AWK} '{print NR, $0}' | sort -k5n -k1n |
+${SED} -n 's/{ QwErTy/{/p'  $out | ${AWK} '{print NR, $0}' | sort -k 5n -k 1n |
 ${SED} 's/^[0-9]* //' |
 ${AWK} 'BEGIN { last=0; nsigs=0; }
 	{



CVS commit: src/bin/ksh

2011-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Jan 23 17:15:16 UTC 2011

Modified Files:
src/bin/ksh: lex.c

Log Message:
The previous commit removed a { }�block, and unintendedly introduced a
C99ism (inlined variable declaration), which hurts when pdksh is used
for bootstrapping pkgsrc. Move the two declarations to the beginning
of the block.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/lex.c

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

Modified files:

Index: src/bin/ksh/lex.c
diff -u src/bin/ksh/lex.c:1.13 src/bin/ksh/lex.c:1.14
--- src/bin/ksh/lex.c:1.13	Mon Oct 27 19:52:28 2008
+++ src/bin/ksh/lex.c	Sun Jan 23 17:15:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lex.c,v 1.13 2008/10/27 19:52:28 apb Exp $	*/
+/*	$NetBSD: lex.c,v 1.14 2011/01/23 17:15:15 hauke Exp $	*/
 
 /*
  * lexical analysis and source input
@@ -6,7 +6,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: lex.c,v 1.13 2008/10/27 19:52:28 apb Exp $);
+__RCSID($NetBSD: lex.c,v 1.14 2011/01/23 17:15:15 hauke Exp $);
 #endif
 
 
@@ -245,6 +245,9 @@
 
 		  Subst:
 			switch (c) {
+			  Lex_state *s;
+			  Lex_state *base;
+
 			  case '\\':
 c = getsc();
 switch (c) {
@@ -341,8 +344,8 @@
  * posix mode was not in effect.
  */
 statep-ls_sbquote.indquotes = 0;
-Lex_state *s = statep;
-Lex_state *base = state_info.base;
+s = statep;
+base = state_info.base;
 while (1) {
 	for (; s != base; s--) {
 		if (s-ls_state == SDQUOTE) {



CVS commit: src/bin/ksh

2011-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Jan 23 17:11:55 UTC 2011

Modified Files:
src/bin/ksh: siglist.sh

Log Message:
The Solaris 7 /usr/{,xpg4/}bin/sorts expect whitespace between the -k
option and its argument.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/siglist.sh

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



CVS commit: src/bin/ksh

2011-01-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Sun Jan 23 17:15:16 UTC 2011

Modified Files:
src/bin/ksh: lex.c

Log Message:
The previous commit removed a { }�block, and unintendedly introduced a
C99ism (inlined variable declaration), which hurts when pdksh is used
for bootstrapping pkgsrc. Move the two declarations to the beginning
of the block.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/lex.c

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



CVS commit: src/sbin/wdogctl

2010-12-23 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Dec 23 14:29:52 UTC 2010

Modified Files:
src/sbin/wdogctl: wdogctl.8

Log Message:
First release that shipped wdogctl(8) was 1.6, not 1.5.1.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sbin/wdogctl/wdogctl.8

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

Modified files:

Index: src/sbin/wdogctl/wdogctl.8
diff -u src/sbin/wdogctl/wdogctl.8:1.19 src/sbin/wdogctl/wdogctl.8:1.20
--- src/sbin/wdogctl/wdogctl.8:1.19	Mon May 18 12:29:31 2009
+++ src/sbin/wdogctl/wdogctl.8	Thu Dec 23 14:29:52 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: wdogctl.8,v 1.19 2009/05/18 12:29:31 wiz Exp $
+.\	$NetBSD: wdogctl.8,v 1.20 2010/12/23 14:29:52 hauke Exp $
 .\
 .\ Copyright (c) 2000 Zembu Labs, Inc.
 .\ All rights reserved.
@@ -175,7 +175,7 @@
 The
 .Nm
 command first appeared in
-.Nx 1.5.1 .
+.Nx 1.6 .
 .Sh AUTHORS
 The
 .Nm



CVS commit: src/share/man/man4

2010-12-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Dec  6 11:54:04 UTC 2010

Modified Files:
src/share/man/man4: spif.4

Log Message:
Sync the device names with reality; while we are here, polish a few
sentences, and mention the spif driver works on sun4u/sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/spif.4

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/spif.4
diff -u src/share/man/man4/spif.4:1.4 src/share/man/man4/spif.4:1.5
--- src/share/man/man4/spif.4:1.4	Sat Mar 15 11:40:38 2008
+++ src/share/man/man4/spif.4	Mon Dec  6 11:54:04 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: spif.4,v 1.4 2008/03/15 11:40:38 plunky Exp $
+.\ $NetBSD: spif.4,v 1.5 2010/12/06 11:54:04 hauke Exp $
 .\ $OpenBSD: spif.4,v 1.12 2003/11/09 16:06:07 jmc Exp $
 .\
 .\ Copyright (c) 1999 Jason L. Wright (ja...@thought.net)
@@ -32,18 +32,16 @@
 .Nm spif
 .Nd SBus (spiffy) Serial/Parallel Interface
 .Sh SYNOPSIS
-.Cd spif* at sbus? slot ? offset ? Pq sun4c/sun4m
-.Cd stty* at spif? Pq sun4c/sun4m
-.Cd sbpp* at spif? Pq sun4c/sun4m
+.Cd spif* at sbus? slot ? offset ? Pq sun4c/sun4m/sun4u
+.Cd stty* at spif? Pq sun4c/sun4m/sun4u
+.Cd sbpp* at spif? Pq sun4c/sun4m/sun4u
 .Sh DESCRIPTION
 The
 .Nm spif
 driver provides support for the Sun Serial/Parallel Interface card
-(Sun part number 501-1931)
-based around the
+(Sun part number 501-1931), which is based on the
 Cirrus Logic CD180 octal serial controller
-and the
-Cirrus Logic PPC2 parallel port controller.
+and the Cirrus Logic PPC2 parallel port controller.
 .Pp
 The device minor numbers for this driver are encoded as follows:
 .Bd -literal
@@ -67,10 +65,10 @@
 Each of the serial ports has an 8 byte FIFO for receive and transmit as
 well as automatic hardware (RTS/CTS) flow control.
 .Sh FILES
-.Bl -tag -width /dev/tty[jkl][0-7] -compact
-.It /dev/tty[jkl][0-7]
+.Bl -tag -width /dev/ttyS[0123][0-7] -compact
+.It /dev/ttyS[0123][0-7]
 Serial ports
-.It /dev/sbpp[0-3]
+.It /dev/bppS[0-3]
 Parallel ports
 .El
 .Sh DIAGNOSTICS
@@ -88,8 +86,10 @@
 .Sh HISTORY
 The
 .Nm spif
-driver was first supported in
+adapter was first supported in
 .Ox 2.5 .
+The driver was ported to
+.Nx 3.0 .
 .Sh AUTHORS
 .An -nosplit
 The driver was written by



CVS commit: src/share/man/man4

2010-12-06 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Mon Dec  6 11:54:04 UTC 2010

Modified Files:
src/share/man/man4: spif.4

Log Message:
Sync the device names with reality; while we are here, polish a few
sentences, and mention the spif driver works on sun4u/sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/spif.4

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



CVS commit: src/sys/arch/mac68k/obio

2010-11-30 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Nov 30 16:05:56 UTC 2010

Modified Files:
src/sys/arch/mac68k/obio: iwm.s

Log Message:
Fix an embarassing tyop. gcc should run aspell over the comments...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/obio/iwm.s

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/mac68k/obio/iwm.s
diff -u src/sys/arch/mac68k/obio/iwm.s:1.5 src/sys/arch/mac68k/obio/iwm.s:1.6
--- src/sys/arch/mac68k/obio/iwm.s:1.5	Mon May 26 17:58:37 2008
+++ src/sys/arch/mac68k/obio/iwm.s	Tue Nov 30 16:05:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: iwm.s,v 1.5 2008/05/26 17:58:37 hauke Exp $	*/
+/*	$NetBSD: iwm.s,v 1.6 2010/11/30 16:05:55 hauke Exp $	*/
 
 /*
  * Copyright (c) 1996-99 Hauke Fath.  All rights reserved.
@@ -514,7 +514,7 @@
 /*
  * iwmTrack00 -- move head to track 00 for drive calibration.
  *
- * XXX Drive makes funny noises during resore. Tune delay/retry count?
+ * XXX Drive makes funny noises during restore. Tune delay/retry count?
  *
  * Parameters:	-
  * Returns:	%d0		result code



CVS commit: src/sys/arch/mac68k/obio

2010-11-30 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Nov 30 16:05:56 UTC 2010

Modified Files:
src/sys/arch/mac68k/obio: iwm.s

Log Message:
Fix an embarassing tyop. gcc should run aspell over the comments...


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mac68k/obio/iwm.s

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



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:48:20 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: SMALLRAM

Log Message:
One more page in the Big Book Of Things That We Can do Without --
COMPAT* options, puffs support.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mac68k/conf/SMALLRAM

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/mac68k/conf/SMALLRAM
diff -u src/sys/arch/mac68k/conf/SMALLRAM:1.36 src/sys/arch/mac68k/conf/SMALLRAM:1.37
--- src/sys/arch/mac68k/conf/SMALLRAM:1.36	Mon Dec  7 08:57:38 2009
+++ src/sys/arch/mac68k/conf/SMALLRAM	Wed Nov 24 13:48:20 2010
@@ -1,12 +1,12 @@
-#	$NetBSD: SMALLRAM,v 1.36 2009/12/07 08:57:38 pooka Exp $
+#	$NetBSD: SMALLRAM,v 1.37 2010/11/24 13:48:20 hauke Exp $
 #
 # This is an example of how to configure a small, efficient kernel for
 # a system with limited RAM. Even so it's capable of doing quite a
 # bit. The hypothetical system used for this example is a Macintosh
 # IIx or Macintosh IIcx with 8 MB of RAM and an 80 MB disk. One or
 # more DP5380- based NuBus Ethernet cards, onboard video and one or
-# more NuBus video cards are configured. Basic SLIP and PPP support is
-# available.
+# more NuBus video cards are configured. Basic SLIP and PPP support
+# as well as packet filtering are available.
 #
 # This configuration is suitable for experimenting with NetBSD as a
 # router with one or more Ethernet cards, and up to two PPP
@@ -38,7 +38,10 @@
 no options 	COMPAT_15
 no options 	COMPAT_16
 no options 	COMPAT_20
+no options 	COMPAT_30
+no options 	COMPAT_40
 no options 	COMPAT_43
+no options 	COMPAT_50
 
 no options 	COMPAT_AOUT_M68K
 no options 	EXEC_AOUT
@@ -53,6 +56,7 @@
 no file-system 	KERNFS
 no file-system 	NULLFS
 no file-system 	OVERLAY
+no file-system	PUFFS
 no file-system 	PROCFS
 no file-system 	UMAPFS
 no file-system 	UNION
@@ -127,4 +131,5 @@
 no pseudo-device	agr
 no pseudo-device	accf_data
 no pseudo-device	accf_http
+no pseudo-device	putter
 no pseudo-device	ksyms



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:53:34 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: INSTALL

Log Message:
Catch up on COMPAT* options -- it's been a while...


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/mac68k/conf/INSTALL

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/mac68k/conf/INSTALL
diff -u src/sys/arch/mac68k/conf/INSTALL:1.46 src/sys/arch/mac68k/conf/INSTALL:1.47
--- src/sys/arch/mac68k/conf/INSTALL:1.46	Tue Nov 23 11:14:01 2010
+++ src/sys/arch/mac68k/conf/INSTALL	Wed Nov 24 13:53:34 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: INSTALL,v 1.46 2010/11/23 11:14:01 hannken Exp $
+#	$NetBSD: INSTALL,v 1.47 2010/11/24 13:53:34 hauke Exp $
 #
 # INSTALL
 
@@ -48,6 +48,10 @@
 options 	COMPAT_14	# NetBSD 1.4,
 options 	COMPAT_15	# NetBSD 1.5,
 options 	COMPAT_16	# NetBSD 1.6,
+options 	COMPAT_20	# NetBSD 2.0,
+options 	COMPAT_30	# NetBSD 3.0,
+options 	COMPAT_40	# NetBSD 4.0,
+options 	COMPAT_50	# NetBSD 5.0 compatibility.
 options 	COMPAT_43	# and 4.3BSD
 options		COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:54:50 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: GENERIC

Log Message:
Consistency in commenting COMPAT_nn options.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/arch/mac68k/conf/GENERIC

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

Modified files:

Index: src/sys/arch/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.198 src/sys/arch/mac68k/conf/GENERIC:1.199
--- src/sys/arch/mac68k/conf/GENERIC:1.198	Tue Nov 23 11:14:01 2010
+++ src/sys/arch/mac68k/conf/GENERIC	Wed Nov 24 13:54:49 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.198 2010/11/23 11:14:01 hannken Exp $
+# $NetBSD: GENERIC,v 1.199 2010/11/24 13:54:49 hauke Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.198 $
+#ident 		GENERIC-$Revision: 1.199 $
 
 maxusers	16		# estimated number of users
 
@@ -83,7 +83,7 @@
 options 	COMPAT_16	# NetBSD 1.6,
 options 	COMPAT_20	# NetBSD 2.0,
 options 	COMPAT_30	# NetBSD 3.0,
-options 	COMPAT_40	# NetBSD 4.0 compatibility.
+options 	COMPAT_40	# NetBSD 4.0,
 options 	COMPAT_50	# NetBSD 5.0 compatibility.
 options 	COMPAT_43	# and 4.3BSD
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:48:20 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: SMALLRAM

Log Message:
One more page in the Big Book Of Things That We Can do Without --
COMPAT* options, puffs support.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mac68k/conf/SMALLRAM

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



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

2010-11-24 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Wed Nov 24 13:53:34 UTC 2010

Modified Files:
src/sys/arch/mac68k/conf: INSTALL

Log Message:
Catch up on COMPAT* options -- it's been a while...


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/mac68k/conf/INSTALL

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