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

2009-10-30 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Fri Oct 30 10:57:41 UTC 2009

Modified Files:
src/sys/compat/linux/arch/amd64: syscalls.master

Log Message:
stat64 syscalls require struct linux_stat64.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/compat/linux/arch/amd64/syscalls.master

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

Modified files:

Index: src/sys/compat/linux/arch/amd64/syscalls.master
diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.32 src/sys/compat/linux/arch/amd64/syscalls.master:1.33
--- src/sys/compat/linux/arch/amd64/syscalls.master:1.32	Wed Jun 17 14:18:51 2009
+++ src/sys/compat/linux/arch/amd64/syscalls.master	Fri Oct 30 10:57:40 2009
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp $
+	$NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp $
 
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -70,11 +70,11 @@
 			int mode); }
 3	NOARGS		{ int|sys||close(int fd); }
 4	STD		{ int|linux_sys||stat64(const char *path, \
-			struct linux_stat *sp); }
+			struct linux_stat64 *sp); }
 5	STD		{ int|linux_sys||fstat64(int fd, \
-			struct linux_stat *sp); }
+			struct linux_stat64 *sp); }
 6	STD		{ int|linux_sys||lstat64(const char *path, \
-			struct linux_stat *sp); }
+			struct linux_stat64 *sp); }
 7	NOARGS		{ int|sys||poll(struct pollfd *fds, u_int nfds, \
 			int timeout); }
 8	NOARGS		{ long|compat_43_sys||lseek(int fd, long offset, \



CVS commit: src/usr.bin/tn3270/tools/mkmake

2009-10-30 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Oct 30 15:09:24 UTC 2009

Modified Files:
src/usr.bin/tn3270/tools/mkmake: mkmake.y

Log Message:
Now that YYSTYPE yyval is not global, use yylval from within yylex().


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/tn3270/tools/mkmake/mkmake.y

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/tn3270/tools/mkmake/mkmake.y
diff -u src/usr.bin/tn3270/tools/mkmake/mkmake.y:1.13 src/usr.bin/tn3270/tools/mkmake/mkmake.y:1.14
--- src/usr.bin/tn3270/tools/mkmake/mkmake.y:1.13	Mon Mar 20 01:34:49 2006
+++ src/usr.bin/tn3270/tools/mkmake/mkmake.y	Fri Oct 30 15:09:24 2009
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: mkmake.y,v 1.13 2006/03/20 01:34:49 gdamore Exp $	*/
+/*	$NetBSD: mkmake.y,v 1.14 2009/10/30 15:09:24 uebayasi Exp $	*/
 /*-
  * Copyright (c) 1988 The Regents of the University of California.
  * All rights reserved.
@@ -35,7 +35,7 @@
 #if 0
 static char sccsid[] = @(#)mkmake.y	4.2 (Berkeley) 4/26/91;
 #else
-__RCSID($NetBSD: mkmake.y,v 1.13 2006/03/20 01:34:49 gdamore Exp $);
+__RCSID($NetBSD: mkmake.y,v 1.14 2009/10/30 15:09:24 uebayasi Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -961,7 +961,7 @@
 			printf([%d], c); \
 			fflush(stdout); \
 			} \
-			yyval.intval = c; \
+			yylval.intval = c; \
 			return y;
 #else	/* defined(YYDEBUG) */
 #define	Return(y,c)	{ yylval.intval = c; return y; }



CVS commit: src/sys/dev/usb

2009-10-30 Thread Ignatios Souvatzis
Module Name:src
Committed By:   is
Date:   Fri Oct 30 16:22:32 UTC 2009

Modified Files:
src/sys/dev/usb: umass.c umass_quirks.c umassvar.h usbdevs

Log Message:
Quirk to regenerate residue for borken UMASS devices; needed (at least)
for Supertop IDE bridge. From Matthias Kretschmer, PR 42225.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/usb/umass.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/umass_quirks.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/umassvar.h
cvs rdiff -u -r1.534 -r1.535 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/umass.c
diff -u src/sys/dev/usb/umass.c:1.134 src/sys/dev/usb/umass.c:1.135
--- src/sys/dev/usb/umass.c:1.134	Wed Sep 23 19:07:19 2009
+++ src/sys/dev/usb/umass.c	Fri Oct 30 16:22:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.134 2009/09/23 19:07:19 plunky Exp $	*/
+/*	$NetBSD: umass.c,v 1.135 2009/10/30 16:22:32 is Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.134 2009/09/23 19:07:19 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass.c,v 1.135 2009/10/30 16:22:32 is Exp $);
 
 #include atapibus.h
 #include scsibus.h
@@ -1012,6 +1012,7 @@
 {
 	struct umass_softc *sc = (struct umass_softc *) priv;
 	usbd_xfer_handle next_xfer;
+	int residue;
 
 	KASSERT(sc-sc_wire  UMASS_WPROTO_BBB,
 		(sc-sc_wire == 0x%02x wrong for umass_bbb_state\n,
@@ -1184,6 +1185,11 @@
 
 		DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, sc-csw));
 
+		if (sc-sc_quirks  UMASS_QUIRK_IGNORE_RESIDUE)
+residue = sc-transfer_datalen - sc-transfer_actlen;
+else
+residue = UGETDW(sc-csw.dCSWDataResidue);
+
 		/* Translate weird command-status signatures. */
 		if ((sc-sc_quirks  UMASS_QUIRK_WRONG_CSWSIG) 
 		UGETDW(sc-csw.dCSWSignature) == CSWSIGNATURE_OLYMPUS_C1)
@@ -1226,8 +1232,7 @@
 			return;
 		} else if (sc-csw.bCSWStatus == CSWSTATUS_PHASE) {
 			printf(%s: Phase Error, residue = %d\n,
-device_xname(sc-sc_dev),
-UGETDW(sc-csw.dCSWDataResidue));
+device_xname(sc-sc_dev), residue);
 
 			umass_bbb_reset(sc, STATUS_WIRE_FAILED);
 			return;
@@ -1239,32 +1244,29 @@
 sc-transfer_actlen, sc-transfer_datalen);
 #if 0
 		} else if (sc-transfer_datalen - sc-transfer_actlen
-			   != UGETDW(sc-csw.dCSWDataResidue)) {
+			   != residue) {
 			DPRINTF(UDMASS_BBB, (%s: actlen=%d != residue=%d\n,
 device_xname(sc-sc_dev),
 sc-transfer_datalen - sc-transfer_actlen,
-UGETDW(sc-csw.dCSWDataResidue)));
+residue));
 
 			umass_bbb_reset(sc, STATUS_WIRE_FAILED);
 			return;
 #endif
 		} else if (sc-csw.bCSWStatus == CSWSTATUS_FAILED) {
 			DPRINTF(UDMASS_BBB, (%s: Command Failed, res = %d\n,
-device_xname(sc-sc_dev),
-UGETDW(sc-csw.dCSWDataResidue)));
+device_xname(sc-sc_dev), residue));
 
 			/* SCSI command failed but transfer was succesful */
 			sc-transfer_state = TSTATE_IDLE;
-			sc-transfer_cb(sc, sc-transfer_priv,
-	UGETDW(sc-csw.dCSWDataResidue),
+			sc-transfer_cb(sc, sc-transfer_priv, residue,
 	STATUS_CMD_FAILED);
 
 			return;
 
 		} else {	/* success */
 			sc-transfer_state = TSTATE_IDLE;
-			sc-transfer_cb(sc, sc-transfer_priv,
-	UGETDW(sc-csw.dCSWDataResidue),
+			sc-transfer_cb(sc, sc-transfer_priv, residue,
 	STATUS_CMD_OK);
 
 			return;

Index: src/sys/dev/usb/umass_quirks.c
diff -u src/sys/dev/usb/umass_quirks.c:1.77 src/sys/dev/usb/umass_quirks.c:1.78
--- src/sys/dev/usb/umass_quirks.c:1.77	Mon Oct 12 23:43:05 2009
+++ src/sys/dev/usb/umass_quirks.c	Fri Oct 30 16:22:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass_quirks.c,v 1.77 2009/10/12 23:43:05 wiz Exp $	*/
+/*	$NetBSD: umass_quirks.c,v 1.78 2009/10/30 16:22:32 is Exp $	*/
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.77 2009/10/12 23:43:05 wiz Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.78 2009/10/30 16:22:32 is Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -229,6 +229,17 @@
 	  UMATCH_VENDOR_PRODUCT,
 	  NULL, NULL
 	},
+
+/*
+ * Devices with bad residue.
+ */
+{ { USB_VENDOR_SUPERTOP, USB_PRODUCT_SUPERTOP_IDEBRIDGE },
+  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
+  UMASS_QUIRK_IGNORE_RESIDUE,
+  0,
+  UMATCH_VENDOR_PRODUCT,
+  NULL, NULL
+},
 };
 
 const struct umass_quirk *

Index: src/sys/dev/usb/umassvar.h
diff -u src/sys/dev/usb/umassvar.h:1.27 src/sys/dev/usb/umassvar.h:1.28
--- src/sys/dev/usb/umassvar.h:1.27	Sat Sep  6 21:49:00 2008
+++ src/sys/dev/usb/umassvar.h	Fri Oct 30 16:22:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: umassvar.h,v 1.27 2008/09/06 21:49:00 rmind Exp $	*/
+/*	$NetBSD: umassvar.h,v 1.28 2009/10/30 16:22:32 is Exp $	*/
 /*-
  

CVS commit: src/tools/mandoc

2009-10-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Oct 30 17:18:51 UTC 2009

Modified Files:
src/tools/mandoc: Makefile

Log Message:
Need to provide NOMAN explicitly before bsd.own.mk.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tools/mandoc/Makefile

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

Modified files:

Index: src/tools/mandoc/Makefile
diff -u src/tools/mandoc/Makefile:1.2 src/tools/mandoc/Makefile:1.3
--- src/tools/mandoc/Makefile:1.2	Mon Oct 26 21:17:19 2009
+++ src/tools/mandoc/Makefile	Fri Oct 30 17:18:51 2009
@@ -1,8 +1,10 @@
-#	$NetBSD: Makefile,v 1.2 2009/10/26 21:17:19 joerg Exp $
+#	$NetBSD: Makefile,v 1.3 2009/10/30 17:18:51 joerg Exp $
 
 HOSTPROGNAME=	${_TOOL_PREFIX}mandoc
 HOST_SRCDIR=	external/bsd/mdocml/bin/mandoc
 
+NOMAN=		# defined
+
 .include bsd.own.mk
 
 NETBSD_MINOR!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n



CVS commit: src/sys/arch/alpha/pci

2009-10-30 Thread Michael L. Hitch
Module Name:src
Committed By:   mhitch
Date:   Fri Oct 30 18:55:45 UTC 2009

Modified Files:
src/sys/arch/alpha/pci: tsp_bus_io.c tsp_bus_mem.c tsvar.h

Log Message:
The tsc(4) bus initialization was using a single statically allocated
extent storage for each tsp(4), which caused a LOCKDEBUG kernel to fail
because the extent storage contained a mutex which panics when the second
mutex_init() is attempted.  Put the extent storage into the tsp_config
structure so each tsp(4) gets it own.  Fixes PR port-alpha/38358.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/alpha/pci/tsp_bus_io.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/pci/tsp_bus_mem.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/alpha/pci/tsvar.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/alpha/pci/tsp_bus_io.c
diff -u src/sys/arch/alpha/pci/tsp_bus_io.c:1.5 src/sys/arch/alpha/pci/tsp_bus_io.c:1.6
--- src/sys/arch/alpha/pci/tsp_bus_io.c:1.5	Thu Jun 29 08:58:50 2000
+++ src/sys/arch/alpha/pci/tsp_bus_io.c	Fri Oct 30 18:55:45 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tsp_bus_io.c,v 1.5 2000/06/29 08:58:50 mrg Exp $ */
+/* $NetBSD: tsp_bus_io.c,v 1.6 2009/10/30 18:55:45 mhitch Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: tsp_bus_io.c,v 1.5 2000/06/29 08:58:50 mrg Exp $);
+__KERNEL_RCSID(1, $NetBSD: tsp_bus_io.c,v 1.6 2009/10/30 18:55:45 mhitch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -58,6 +58,8 @@
 
 #define	CHIP_EX_MALLOC_SAFE(v)  (((TSPCON)(v))-pc_mallocsafe)
 #define CHIP_IO_EXTENT(v)   (((TSPCON)(v))-pc_io_ex)
+#define	CHIP_IO_EX_STORE(v)	(((TSPCON)(v))-pc_io_exstorage)
+#define	CHIP_IO_EX_STORE_SIZE(v) (sizeof (((TSPCON)(v))-pc_io_exstorage))
 
 #define CHIP_IO_SYS_START(v)(((TSPCON)(v))-pc_iobase | P_PCI_IO)
 

Index: src/sys/arch/alpha/pci/tsp_bus_mem.c
diff -u src/sys/arch/alpha/pci/tsp_bus_mem.c:1.8 src/sys/arch/alpha/pci/tsp_bus_mem.c:1.9
--- src/sys/arch/alpha/pci/tsp_bus_mem.c:1.8	Sun Dec 11 12:16:17 2005
+++ src/sys/arch/alpha/pci/tsp_bus_mem.c	Fri Oct 30 18:55:45 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tsp_bus_mem.c,v 1.8 2005/12/11 12:16:17 christos Exp $ */
+/* $NetBSD: tsp_bus_mem.c,v 1.9 2009/10/30 18:55:45 mhitch Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tsp_bus_mem.c,v 1.8 2005/12/11 12:16:17 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: tsp_bus_mem.c,v 1.9 2009/10/30 18:55:45 mhitch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -55,6 +55,9 @@
 
 #define	CHIP_EX_MALLOC_SAFE(v)  (((struct tsp_config *)(v))-pc_mallocsafe)
 #define CHIP_MEM_EXTENT(v)   (((struct tsp_config *)(v))-pc_mem_ex)
+#define	CHIP_MEM_EX_STORE(v)	(((struct tsp_config *)(v))-pc_mem_exstorage)
+#define	CHIP_MEM_EX_STORE_SIZE(v)	\
+	(sizeof (((struct tsp_config *)(v))-pc_mem_exstorage))
 
 #define CHIP_MEM_SYS_START(v)(((struct tsp_config *)(v))-pc_iobase)
 

Index: src/sys/arch/alpha/pci/tsvar.h
diff -u src/sys/arch/alpha/pci/tsvar.h:1.6 src/sys/arch/alpha/pci/tsvar.h:1.7
--- src/sys/arch/alpha/pci/tsvar.h:1.6	Sat Mar 14 14:45:53 2009
+++ src/sys/arch/alpha/pci/tsvar.h	Fri Oct 30 18:55:45 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: tsvar.h,v 1.6 2009/03/14 14:45:53 dsl Exp $ */
+/* $NetBSD: tsvar.h,v 1.7 2009/10/30 18:55:45 mhitch Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -35,6 +35,8 @@
 #include dev/pci/pcivar.h
 #include alpha/pci/pci_sgmap_pte64.h
 
+#define	_FSTORE	(EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long))
+
 #define	tsvar() { Generate ctags(1) key. }
 
 struct tsc_softc {
@@ -58,6 +60,8 @@
 	u_int32_t pc_hae_mem;
 	u_int32_t pc_hae_io;
 
+	long	pc_io_exstorage[_FSTORE];
+	long	pc_mem_exstorage[_FSTORE];
 	struct	extent *pc_io_ex, *pc_mem_ex;
 	int	pc_mallocsafe;
 };



CVS commit: src/usr.bin/xinstall

2009-10-30 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Oct 30 20:57:30 UTC 2009

Modified Files:
src/usr.bin/xinstall: xinstall.c

Log Message:
Only trust STRIP from environment if it is non-empty. Some packages set
STRIP in Makefiles and that makes install -s fail badly. OK apb@


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/usr.bin/xinstall/xinstall.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/xinstall/xinstall.c
diff -u src/usr.bin/xinstall/xinstall.c:1.112 src/usr.bin/xinstall/xinstall.c:1.113
--- src/usr.bin/xinstall/xinstall.c:1.112	Sat Jul 25 11:45:58 2009
+++ src/usr.bin/xinstall/xinstall.c	Fri Oct 30 20:57:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: xinstall.c,v 1.112 2009/07/25 11:45:58 gson Exp $	*/
+/*	$NetBSD: xinstall.c,v 1.113 2009/10/30 20:57:30 joerg Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = @(#)xinstall.c	8.1 (Berkeley) 7/21/93;
 #else
-__RCSID($NetBSD: xinstall.c,v 1.112 2009/07/25 11:45:58 gson Exp $);
+__RCSID($NetBSD: xinstall.c,v 1.113 2009/10/30 20:57:30 joerg Exp $);
 #endif
 #endif /* not lint */
 
@@ -961,7 +961,7 @@
 	const char * volatile stripprog, *progname;
 	char *cmd;
 
-	if ((stripprog = getenv(STRIP)) == NULL) {
+	if ((stripprog = getenv(STRIP)) == NULL || *stripprog == '\0') {
 #ifdef TARGET_STRIP
 		stripprog = TARGET_STRIP;
 #else