CVS commit: src/usr.sbin/btpand

2024-06-04 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Jun  4 06:24:58 UTC 2024

Modified Files:
src/usr.sbin/btpand: btpand.c

Log Message:
Fix off-by-one bug in btpand

`ul` reaches `__arraycount(services)` before the bound-check happens, causing 
undefined behaviour.

from Dapeng Gao  via FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btpand/btpand.c

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

Modified files:

Index: src/usr.sbin/btpand/btpand.c
diff -u src/usr.sbin/btpand/btpand.c:1.8 src/usr.sbin/btpand/btpand.c:1.9
--- src/usr.sbin/btpand/btpand.c:1.8	Wed May 18 13:56:32 2022
+++ src/usr.sbin/btpand/btpand.c	Tue Jun  4 06:24:58 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: btpand.c,v 1.8 2022/05/18 13:56:32 andvar Exp $	*/
+/*	$NetBSD: btpand.c,v 1.9 2024/06/04 06:24:58 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008-2009 Iain Hibbert
@@ -27,7 +27,7 @@
 
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008-2009 Iain Hibbert. All rights reserved.");
-__RCSID("$NetBSD: btpand.c,v 1.8 2022/05/18 13:56:32 andvar Exp $");
+__RCSID("$NetBSD: btpand.c,v 1.9 2024/06/04 06:24:58 plunky Exp $");
 
 #include 
 
@@ -155,11 +155,14 @@ main(int argc, char *argv[])
 
 		case 's': /* service */
 		case 'S': /* service (no SDP) */
-			for (ul = 0; strcasecmp(optarg, services[ul].type); ul++) {
-if (ul == __arraycount(services))
-	errx(EXIT_FAILURE, "%s: unknown service", optarg);
+			for (ul = 0; ul < __arraycount(services); ul++) {
+if (strcasecmp(optarg, services[ul].type) == 0)
+	break;
 			}
 
+			if (ul == __arraycount(services))
+errx(EXIT_FAILURE, "%s: unknown service", optarg);
+
 			if (ch == 's') {
 service_type = services[ul].type;
 service_name = services[ul].name;



CVS commit: src/usr.sbin/btpand

2024-06-04 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Jun  4 06:24:58 UTC 2024

Modified Files:
src/usr.sbin/btpand: btpand.c

Log Message:
Fix off-by-one bug in btpand

`ul` reaches `__arraycount(services)` before the bound-check happens, causing 
undefined behaviour.

from Dapeng Gao  via FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btpand/btpand.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/bluetooth

2022-06-28 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Jun 28 13:25:36 UTC 2022

Modified Files:
src/sys/dev/bluetooth: bcsp.c bth5.c btuart.c

Log Message:
remove KASSERT() checking for t_oproc at open since assigning this line
discipline to a pty may not have that set. Instead do a runtime check to
ensure that the function exists before calling it, as ttstart() handles it.

Same code in btuart.c, bcsp.c and bth5.c

Reported-by: syzbot+766981eef92a3cd03...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/bluetooth/bcsp.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/bluetooth/bth5.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/bluetooth/btuart.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/bluetooth/bcsp.c
diff -u src/sys/dev/bluetooth/bcsp.c:1.31 src/sys/dev/bluetooth/bcsp.c:1.32
--- src/sys/dev/bluetooth/bcsp.c:1.31	Thu Jan 24 09:33:03 2019
+++ src/sys/dev/bluetooth/bcsp.c	Tue Jun 28 13:25:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcsp.c,v 1.31 2019/01/24 09:33:03 knakahara Exp $	*/
+/*	$NetBSD: bcsp.c,v 1.32 2022/06/28 13:25:36 plunky Exp $	*/
 /*
  * Copyright (c) 2007 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.31 2019/01/24 09:33:03 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.32 2022/06/28 13:25:36 plunky Exp $");
 
 #include 
 #include 
@@ -387,8 +387,6 @@ bcspopen(dev_t device __unused, struct t
 		}
 	}
 
-	KASSERT(tp->t_oproc != NULL);
-
 	cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK);
 	for (unit = 0; unit < bcsp_cd.cd_ndevs; unit++)
 		if (device_lookup(_cd, unit) == NULL)
@@ -597,7 +595,7 @@ bcsp_slip_transmit(struct tty *tp)
 
 	sc->sc_stats.byte_tx += count;
 
-	if (tp->t_outq.c_cc != 0)
+	if (tp->t_outq.c_cc != 0 && tp->t_oproc != NULL)
 		(*tp->t_oproc)(tp);
 
 	return 0;

Index: src/sys/dev/bluetooth/bth5.c
diff -u src/sys/dev/bluetooth/bth5.c:1.6 src/sys/dev/bluetooth/bth5.c:1.7
--- src/sys/dev/bluetooth/bth5.c:1.6	Sat Nov 16 22:06:49 2019
+++ src/sys/dev/bluetooth/bth5.c	Tue Jun 28 13:25:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bth5.c,v 1.6 2019/11/16 22:06:49 mlelstv Exp $	*/
+/*	$NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $	*/
 /*
  * Copyright (c) 2017 Nathanial Sloss 
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.6 2019/11/16 22:06:49 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.7 2022/06/28 13:25:36 plunky Exp $");
 
 #include 
 #include 
@@ -392,8 +392,6 @@ bth5open(dev_t device __unused, struct t
 		}
 	}
 
-	KASSERT(tp->t_oproc != NULL);
-
 	cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK);
 	for (unit = 0; unit < bthfive_cd.cd_ndevs; unit++)
 		if (device_lookup(_cd, unit) == NULL)
@@ -633,7 +631,7 @@ bth5_slip_transmit(struct tty *tp)
 
 	sc->sc_stats.byte_tx += count;
 
-	if (tp->t_outq.c_cc != 0)
+	if (tp->t_outq.c_cc != 0 && tp->t_oproc != NULL)
 		(*tp->t_oproc)(tp);
 
 	return 0;

Index: src/sys/dev/bluetooth/btuart.c
diff -u src/sys/dev/bluetooth/btuart.c:1.29 src/sys/dev/bluetooth/btuart.c:1.30
--- src/sys/dev/bluetooth/btuart.c:1.29	Thu Jan 24 09:33:03 2019
+++ src/sys/dev/bluetooth/btuart.c	Tue Jun 28 13:25:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: btuart.c,v 1.29 2019/01/24 09:33:03 knakahara Exp $	*/
+/*	$NetBSD: btuart.c,v 1.30 2022/06/28 13:25:36 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007 KIYOHARA Takashi
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.29 2019/01/24 09:33:03 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.30 2022/06/28 13:25:36 plunky Exp $");
 
 #include 
 #include 
@@ -240,8 +240,6 @@ btuartopen(dev_t devno __unused, struct 
 		}
 	}
 
-	KASSERT(tp->t_oproc != NULL);
-
 	cfdata = malloc(sizeof(struct cfdata), M_DEVBUF, M_WAITOK);
 	for (unit = 0; unit < btuart_cd.cd_ndevs; unit++)
 		if (device_lookup(_cd, unit) == NULL)
@@ -543,7 +541,7 @@ btuartstart(struct tty *tp)
 
 	sc->sc_stats.byte_tx += count;
 
-	if (tp->t_outq.c_cc != 0)
+	if (tp->t_outq.c_cc != 0 && tp->t_oproc != NULL)
 		(*tp->t_oproc)(tp);
 
 	return 0;



CVS commit: src/sys/dev/bluetooth

2022-06-28 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Jun 28 13:25:36 UTC 2022

Modified Files:
src/sys/dev/bluetooth: bcsp.c bth5.c btuart.c

Log Message:
remove KASSERT() checking for t_oproc at open since assigning this line
discipline to a pty may not have that set. Instead do a runtime check to
ensure that the function exists before calling it, as ttstart() handles it.

Same code in btuart.c, bcsp.c and bth5.c

Reported-by: syzbot+766981eef92a3cd03...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/bluetooth/bcsp.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/bluetooth/bth5.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/bluetooth/btuart.c

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



CVS commit: src/share/misc

2021-11-09 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Nov 10 07:08:47 UTC 2021

Modified Files:
src/share/misc: acronyms.comp

Log Message:
ODMR on-demand mail relay


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.324 src/share/misc/acronyms.comp:1.325
--- src/share/misc/acronyms.comp:1.324	Fri Jun 18 21:58:20 2021
+++ src/share/misc/acronyms.comp	Wed Nov 10 07:08:47 2021
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.324 2021/06/18 21:58:20 riastradh Exp $
+$NetBSD: acronyms.comp,v 1.325 2021/11/10 07:08:47 plunky Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1101,6 +1101,7 @@ ODE	offline device environment
 ODI	open data-link interface
 ODM	object data manager
 ODCM	on-demand clock modulation
+ODMR	on-demand mail relay
 ODT	on-die termination
 OEM	original equipment manufacturer
 OFB	output feedback



CVS commit: src/share/misc

2021-11-09 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Nov 10 07:08:47 UTC 2021

Modified Files:
src/share/misc: acronyms.comp

Log Message:
ODMR on-demand mail relay


To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 src/share/misc/acronyms.comp

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



CVS commit: src/sys/netbt

2019-09-28 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Sep 28 07:10:55 UTC 2019

Modified Files:
src/sys/netbt: hci_socket.c

Log Message:
permit read_encryption_key_size from userland


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/netbt/hci_socket.c

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



CVS commit: src/sys/netbt

2019-09-28 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Sep 28 07:10:55 UTC 2019

Modified Files:
src/sys/netbt: hci_socket.c

Log Message:
permit read_encryption_key_size from userland


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/netbt/hci_socket.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/netbt/hci_socket.c
diff -u src/sys/netbt/hci_socket.c:1.46 src/sys/netbt/hci_socket.c:1.47
--- src/sys/netbt/hci_socket.c:1.46	Mon Jan 28 12:53:01 2019
+++ src/sys/netbt/hci_socket.c	Sat Sep 28 07:10:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci_socket.c,v 1.46 2019/01/28 12:53:01 martin Exp $	*/
+/*	$NetBSD: hci_socket.c,v 1.47 2019/09/28 07:10:55 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.46 2019/01/28 12:53:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.47 2019/09/28 07:10:55 plunky Exp $");
 
 /* load symbolic names */
 #ifdef BLUETOOTH_DEBUG
@@ -195,6 +195,8 @@ static const struct {
 	  18, 0x01, 0 },
 	{ HCI_CMD_READ_DEFAULT_ERRDATA_REPORTING,
 	  18, 0x04, 0 },
+	{ HCI_CMD_READ_ENCRYPTION_KEY_SIZE,
+	  20, 0x10, sizeof(hci_read_encryption_key_size_cp) },
 };
 
 /*



CVS commit: src/sys/netbt

2019-09-28 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Sep 28 07:06:33 UTC 2019

Modified Files:
src/sys/netbt: hci.h hci_event.c

Log Message:
When encrypted connections are configured, verify that the encryption
key length has a minimum size when the adaptor supports that.

This addresses the 'Key Negotiation of Bluetooth' attack, CVE-2019-9506

https://www.bluetooth.com/security/statement-key-negotiation-of-bluetooth/


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/netbt/hci.h
cvs rdiff -u -r1.25 -r1.26 src/sys/netbt/hci_event.c

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

Modified files:

Index: src/sys/netbt/hci.h
diff -u src/sys/netbt/hci.h:1.45 src/sys/netbt/hci.h:1.46
--- src/sys/netbt/hci.h:1.45	Wed Jul 25 19:09:38 2018
+++ src/sys/netbt/hci.h	Sat Sep 28 07:06:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci.h,v 1.45 2018/07/25 19:09:38 kamil Exp $	*/
+/*	$NetBSD: hci.h,v 1.46 2019/09/28 07:06:33 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -54,7 +54,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: hci.h,v 1.45 2018/07/25 19:09:38 kamil Exp $
+ * $Id: hci.h,v 1.46 2019/09/28 07:06:33 plunky Exp $
  * $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $
  */
 
@@ -1812,6 +1812,17 @@ typedef struct {
 	uint16_t	accuracy;	/* clock accuracy */
 } __packed hci_read_clock_rp;
 
+#define HCI_OCF_READ_ENCRYPTION_KEY_SIZE		0x0008
+#define HCI_CMD_READ_ENCRYPTION_KEY_SIZE		0x1408
+typedef struct {
+	uint16_t	con_handle;	/* connection handle */
+} __packed hci_read_encryption_key_size_cp;
+
+typedef struct {
+	uint8_t		status;		/* 0x00 - success */
+	uint16_t	con_handle;	/* connection handle */
+	uint8_t		size;		/* key size */
+} __packed hci_read_encryption_key_size_rp;
 
 /**
  **

Index: src/sys/netbt/hci_event.c
diff -u src/sys/netbt/hci_event.c:1.25 src/sys/netbt/hci_event.c:1.26
--- src/sys/netbt/hci_event.c:1.25	Tue Aug 21 14:59:13 2018
+++ src/sys/netbt/hci_event.c	Sat Sep 28 07:06:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci_event.c,v 1.25 2018/08/21 14:59:13 plunky Exp $	*/
+/*	$NetBSD: hci_event.c,v 1.26 2019/09/28 07:06:33 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hci_event.c,v 1.25 2018/08/21 14:59:13 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_event.c,v 1.26 2019/09/28 07:06:33 plunky Exp $");
 
 #include 
 #include 
@@ -63,6 +63,7 @@ static void hci_cmd_read_local_features(
 static void hci_cmd_read_local_extended_features(struct hci_unit *, struct mbuf *);
 static void hci_cmd_read_local_ver(struct hci_unit *, struct mbuf *);
 static void hci_cmd_read_local_commands(struct hci_unit *, struct mbuf *);
+static void hci_cmd_read_encryption_key_size(struct hci_unit *, struct mbuf *);
 static void hci_cmd_reset(struct hci_unit *, struct mbuf *);
 static void hci_cmd_create_con(struct hci_unit *unit, uint8_t status);
 
@@ -353,6 +354,10 @@ hci_event_command_compl(struct hci_unit 
 		hci_cmd_read_local_commands(unit, m);
 		break;
 
+	case HCI_CMD_READ_ENCRYPTION_KEY_SIZE:
+		hci_cmd_read_encryption_key_size(unit, m);
+		break;
+
 	case HCI_CMD_RESET:
 		hci_cmd_reset(unit, m);
 		break;
@@ -623,10 +628,11 @@ hci_event_con_compl(struct hci_unit *uni
 		return;
 	}
 
-	/* XXX could check auth_enable here */
-
-	if (ep.encryption_mode)
-		link->hl_flags |= (HCI_LINK_AUTH | HCI_LINK_ENCRYPT);
+	/*
+	 * We purposefully ignore ep.encryption_mode here - if that is set then
+	 * the link will be authenticated and encrypted, but we still want to
+	 * verify the key size and setmode sets the right flags
+	 */
 
 	link->hl_state = HCI_LINK_OPEN;
 	link->hl_handle = HCI_CON_HANDLE(le16toh(ep.con_handle));
@@ -777,17 +783,16 @@ hci_event_auth_compl(struct hci_unit *un
 /*
  * Encryption Change
  *
- * The encryption status has changed. Basically, we note the change
- * then notify the upper layer protocol unless further mode changes
- * are pending.
- * Note that if encryption gets disabled when it has been requested,
- * we will attempt to enable it again.. (its a feature not a bug :)
+ * The encryption status has changed. Make a note if disabled, or
+ * check the key size if possible before allowing it is enabled.
+ * (checking of key size was enabled in 3.0 spec)
  */
 static void
 hci_event_encryption_change(struct hci_unit *unit, struct mbuf *m)
 {
 	hci_encryption_change_ep ep;
 	struct hci_link *link;
+	uint16_t con_handle;
 	int err;
 
 	if (m->m_pkthdr.len < sizeof(ep))
@@ -796,27 +801,34 @@ hci_event_encryption_change(struct hci_u
 	m_copydata(m, 0, sizeof(ep), );
 	m_adj(m, sizeof(ep));
 
-	ep.con_handle = HCI_CON_HANDLE(le

CVS commit: src/sys/netbt

2019-09-28 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Sep 28 07:06:33 UTC 2019

Modified Files:
src/sys/netbt: hci.h hci_event.c

Log Message:
When encrypted connections are configured, verify that the encryption
key length has a minimum size when the adaptor supports that.

This addresses the 'Key Negotiation of Bluetooth' attack, CVE-2019-9506

https://www.bluetooth.com/security/statement-key-negotiation-of-bluetooth/


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/netbt/hci.h
cvs rdiff -u -r1.25 -r1.26 src/sys/netbt/hci_event.c

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



Re: CVS commit: src/sys/dev/bluetooth

2015-04-29 Thread Iain Hibbert
On Wed, 29 Apr 2015, Christos Zoulas wrote:

 On Apr 29,  4:27pm, m...@m00nbsd.net (Maxime Villard) wrote:
 -- Subject: Re: CVS commit: src/sys/dev/bluetooth

 | You didn't test this change, nor did you test the five other fixes
 | you committed.

 I checked the code to the best of my ability; perhaps I missed something.

by the way, the Brainy code scanner did not pick them up (perhaps it stops
at the first one?) but when I looked briefly at this code, there seem
other calls to bcsp_tx_unreliable_pkt() which also leak the mbuf on
failure, since if it fails it does not free it?

iain


Re: CVS commit: xsrc/external/mit/MesaLib/dist/src/mesa/main

2015-03-04 Thread Iain Hibbert
On Thu, 5 Mar 2015, Joerg Sonnenberger wrote:

 On Wed, Mar 04, 2015 at 10:19:00PM +, Christos Zoulas wrote:
  In article 20150304165518.ga10...@britannica.bec.de,
  Joerg Sonnenberger  jo...@britannica.bec.de wrote:
  On Wed, Mar 04, 2015 at 03:00:38PM +, Christos Zoulas wrote:
   In article 20150304142628.gb3...@britannica.bec.de,
   Joerg Sonnenberger  jo...@britannica.bec.de wrote:
  
   It is installed. Check the set lists.
  
   My question was more like does every compiler supposed to provide it for 
   x86,
   or it is considered an extension?
  
  If they are care about support for vector engines, yes. I don't think
  you will find it in PCC or TCC for example.
 
  So should I just
  #ifndef __lint__
  it?

 And maybe PCC :)

please don't just add things like that because you aren't sure that PCC
currently supports it. That may or not be an issue, but if it is hidden
then it will be hidden. If something is a feature but non standard, then
lets use a feature test macro to include it

iain



Re: CVS commit: src/sys/sys

2013-02-24 Thread Iain Hibbert
On Sun, 24 Feb 2013, Matt Thomas wrote:

 Module Name:  src
 Committed By: matt
 Date: Sun Feb 24 06:20:24 UTC 2013

 Modified Files:
   src/sys/sys: tty.h

 Log Message:
 Add a t_softc member to struct tty in which a driver can store a pointer
 to its softc.  (analogous to if_softc in struct ifnet).

Currently, all the tty drivers use a macro to extract an index to the
devices private cfdriver array from the dev_t that is formed from the
major/minor numbers and provided by the framework (and incidentally,
already stored in the tty structure as t_dev)

So what is your intention with this change? Are you changing the design
and if so, has that been discussed on a public list?

Having written tty drivers in the past, I do think this could do with a
redesign, but I also feel that all uses should remain consistent..

regards,
iain


Re: CVS commit: src/sys/arch/amiga/conf

2013-01-11 Thread Iain Hibbert
On Fri, 11 Jan 2013, Havard Eidnes wrote:

 Module Name:  src
 Committed By: he
 Date: Fri Jan 11 11:00:33 UTC 2013

 Modified Files:
   src/sys/arch/amiga/conf: files.amiga

 Log Message:
 We appear to need files.usb included to get opt_usb.h generated,
 to make hid.c build.  The inclusion of hid.c in the build is probably
 triggered by some configs including bluetooth support, and hid.c
 is apparently both for bluetooth and usb.

yes, it is the same protocol.

(and ultimately, I would like to merge the two sets of drivers)

 I'm not sure what changed to make the build fail in the first place,
 though.

matt@ changed USB_DEBUG a while ago to be defined in opt_usb.h instead of
on the command line like all the other XXX_DEBUG flags provided by kernel
configuration. But, he did not change any of the files that rely on it to
actually include opt_usb.h, so christos@ is now trying to clean up..

The hid.c file compiles in some debug printing when UHIDEV_DEBUG is
defined. Usually, this is provided by the commandline, but it may also be
defined in dev/usb.h if USB_DEBUG is defined, so now that needs to include
opt_usb.h.

hid.c could likely do without UHIDEV_DEBUG

regards,
iain


Re: CVS commit: src/usr.sbin/envstat

2012-12-17 Thread Iain Hibbert
On Sun, 16 Dec 2012, David Holland wrote:

 On Fri, Dec 14, 2012 at 06:18:57PM +0100, Marc Balmer wrote:
   proper resource management is a good thing - if the code continues
   to run. In this case, where the program exits, there no benefit
   from freeing up memory etc.

 Buncombe.

is that a technical argument?

I didn't understand it, in any case.. can you explain why, in C, when
exit() explicitly closes all open file descriptors and releases any memory
etc (see a detailed list in exit(3) and _exit(3)), there might be a
benefit in doing so formally before calling exit() ?

regards,
iain


Re: CVS commit: src/sbin/sysctl

2012-12-06 Thread Iain Hibbert
On Wed, 5 Dec 2012, Christos Zoulas wrote:

 Module Name:  src
 Committed By: christos
 Date: Wed Dec  5 13:53:39 UTC 2012

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

 Log Message:
 fix bug found by clang.

thats not a very helpful message, regarding the bug that was fixed..

iain


Re: CVS commit: src/sys

2012-11-30 Thread Iain Hibbert
On Fri, 30 Nov 2012, Christos Zoulas wrote:

 In article 20121130134954.ga14...@britannica.bec.de,
 Joerg Sonnenberger  jo...@britannica.bec.de wrote:
 On Fri, Nov 30, 2012 at 08:34:27AM -0500, Christos Zoulas wrote:
  | fd_set doesn't seem like an appropriate structure for this.
 
  I've been thinking about creating something more efficient, but I didn't 
  come
  up with something better and decided that using fd_set was less complex.
 
 A plain bitmap is ok for this purpose. Something like:
 
 static uintptr_t inet4_reserve[65536 / sizeof(uintptr_t) / CHAR_BITS];

 Sure, but then I would have to rewrite or open code the access macros.
 I think that it would be a lot nicer to have a more general fdset that
 could be included multiple times, and provided the access macros.

well, there is bitstring(3) ..?

iain


Re: CVS commit: src/usr.sbin/npf/npfctl

2012-10-31 Thread Iain Hibbert
On Wed, 31 Oct 2012, Martin Husemann wrote:

 Module Name:  src
 Committed By: martin
 Date: Wed Oct 31 08:54:39 UTC 2012

 Modified Files:
   src/usr.sbin/npf/npfctl: npfctl.c

 Log Message:
 gcc 4.1 is not smart enough to notice arg is only used when initialized
 correctly and produces a might be used unintialized warning.

how can it, when nct is passed to external function ioctl() before
potentially looping back? the structure contents may have changed..

regards,
iain


Re: CVS commit: src/share/man/man3

2012-10-16 Thread Iain Hibbert
On Tue, 16 Oct 2012, SAITOH Masanobu wrote:

 Module Name:  src
 Committed By: msaitoh
 Date: Tue Oct 16 17:39:35 UTC 2012

 Modified Files:
   src/share/man/man3: bits.3

 Log Message:
 Return value of __BIT() and __BITS() is not uint32_t but uint64_t.

but surely, it is uintmax_t ??

regards,
iain


Re: CVS commit: src

2012-09-18 Thread Iain Hibbert
On Mon, 17 Sep 2012, Christos Zoulas wrote:

 In article 20120917055627.779da17...@cvs.netbsd.org,
 David A. Holland source-changes-d@NetBSD.org wrote:
 Strengthen the entry about the openssl update, to clarify and emphasize
 that just doing a non-update build isn't enough; you really do have to
 nuke $DESTDIR.

 The problem is that the libraries get linked with each other, so libssl
 ends up depending on the old libcrypto I think. Something is fishy with
 LIBDPLIBS I guess.

Except for a comment in bsd.README, LIBDPLIBS functionality was removed
from src/share/mk a short while ago.. Joerg replaced it with a simpler
build_install target in lib/Makefile

iain


Re: CVS commit: src/external/mit/lua/dist/src

2012-03-15 Thread Iain Hibbert
On Thu, 15 Mar 2012, Alexander Nasonov wrote:

 Alexander Nasonov wrote:
  Log Message:
  Don't overwrite Roberto's external $Id.

 This made me realise that all external $Id were changed to Id
 by the previous import and that there is a script that does this
 replacement (external/mit/lua/dist/lua2netbsd). I will use it next
 time.

I think this script should not really be in the dist/ directory, but in
external/mit/lua/lua2netbsd

iain


Re: CVS commit: src/sys/dev/bluetooth

2012-01-07 Thread Iain Hibbert
On Mon, 2 Jan 2012, Radoslaw Kujawa wrote:

 On 2 sty 2012, at 11:00, Iain Hibbert wrote:

  On Sun, 1 Jan 2012, Radoslaw Kujawa wrote:

  btkbd_set_leds() may be called from wskbd directly (by pressing caps lock
  on your built-in keyboard for instance)
 
  I've tested this patch by pressing the caps lock key on bt keyboard and
  issuing wsconsctl ledstate=1, and both methods work.
 
  Do you have a built in keyboard?  wsconsctl uses the ioctl, and bt
  keyboard calls the function with the bt_lock held, but if you press the
  caps-lock on the built in keyboard then wscons calls the set_leds routine
  directly, I think? (thus, no lock will be acquired, when sending the
  output report, which is not obviously going to break immediately, but..)

 I've connected the USB keyboard again to work on this problem ;). I'll
 search for PS/2 keyboard... Pressing the caps lock on USB keyboard does
 not light the LED on bluetooth keyboard. However, using wsconsctl -w
 ledstate=1 does light the LED on both keyboards. AFAIK it should use the
 same method to light the led, no matter if it was from userland app or
 by pressing the key on other keyboard?

I don't have a USB keyboard, but pressing the caps lock on my laptop or
Bluetooth keyboard does always toggle both LEDs. Using wsconsctl does
change both too, but thats not quite the same since it does not alter the
caps-lock status

  it really should disassociate from the context, maybe doing
  the call from a callout or separate task instead.

 Wouldn't that again lead to the situation where mtx_owner assertion will
 fail? If we call mutex_exit() from other thread than the one which
 acquired the lock, it will certainly fail. I understand that callout or
 separate task will be executed in another thread.

Should not, I have reworked it to offset the processing of reports to a
thread (patch attached) which does not trigger any mutex failures with
LOCKDEBUG. I'm still testing but I think its correct.. any comments?

  bthidev0: report ID 17, len = 1 ignored
 
  messages you got.. that is not normal (likely not relevant to the locking
  issue though), how did you trigger them, is it just caps lock?

 No, that's the FN key.

Ok thats separate issue, does the output of 'btdevctl -a keyboard -d
device -s hid' show anything for ID 17?  Unfortunately, there is no way
to handle things like that in a generic way from within the current HID
framework if the device does not report its capabilities in the descriptor
(Apple devices at least seem to be prone to this) so we need a special
driver (eg btmagic which handles several such reports) - Linux has a
concept where a driver can attach and register for other reports that
might be sent, but I'm not sure I liked their method, surely something
better can be designed..

iainIndex: bthidev.c
===
RCS file: /cvsroot/src/sys/dev/bluetooth/bthidev.c,v
retrieving revision 1.20
diff -u -p -r1.20 bthidev.c
--- bthidev.c   31 Dec 2011 01:16:09 -  1.20
+++ bthidev.c   7 Jan 2012 08:14:36 -
@@ -35,13 +35,16 @@
 __KERNEL_RCSID(0, $NetBSD: bthidev.c,v 1.20 2011/12/31 01:16:09 rkujawa Exp 
$);
 
 #include sys/param.h
+#include sys/condvar.h
 #include sys/conf.h
 #include sys/device.h
 #include sys/fcntl.h
 #include sys/kernel.h
+#include sys/kthread.h
 #include sys/queue.h
 #include sys/malloc.h
 #include sys/mbuf.h
+#include sys/mutex.h
 #include sys/proc.h
 #include sys/socketvar.h
 #include sys/systm.h
@@ -83,6 +86,12 @@ struct bthidev_softc {
struct l2cap_channel*sc_int;/* interrupt channel */
struct l2cap_channel*sc_int_l;  /* interrupt listen */
 
+   MBUFQ_HEAD()sc_inq; /* input queue */
+   kmutex_tsc_lock;/* input queue lock */
+   kcondvar_t  sc_cv;  /* input queue trigger */
+   lwp_t   *sc_lwp;/* input queue processor */
+   int sc_detach;
+
LIST_HEAD(,bthidev) sc_list;/* child list */
 
callout_t   sc_reconnect;
@@ -107,6 +116,8 @@ static int  bthidev_listen(struct bthide
 static int  bthidev_connect(struct bthidev_softc *);
 static int  bthidev_output(struct bthidev *, uint8_t *, int);
 static void bthidev_null(struct bthidev *, uint8_t *, int);
+static void bthidev_process(void *);
+static void bthidev_process_one(struct bthidev_softc *, struct mbuf *);
 
 /* autoconf(9) glue */
 static int  bthidev_match(device_t, cfdata_t, void *);
@@ -188,6 +199,7 @@ bthidev_attach(device_t parent, device_t
 */
sc-sc_dev = self;
LIST_INIT(sc-sc_list);
+   MBUFQ_INIT(sc-sc_inq);
callout_init(sc-sc_reconnect, 0);
callout_setfunc(sc-sc_reconnect, bthidev_timeout, sc);
sc-sc_state = BTHID_CLOSED;
@@ -196,6 +208,8 @@ bthidev_attach(device_t parent, device_t
sc-sc_intpsm = L2CAP_PSM_HID_INTR;
 
sockopt_init(sc

Re: CVS commit: src/sys/dev/bluetooth

2012-01-02 Thread Iain Hibbert
On Sun, 1 Jan 2012, Radoslaw Kujawa wrote:

 On 1 sty 2012, at 20:44, Iain Hibbert wrote:

  On Sat, 31 Dec 2011, Radoslaw Kujawa wrote:
 
  Module Name:   src
  Committed By:  rkujawa
  Date:  Sat Dec 31 01:16:09 UTC 2011
 
  Modified Files:
 src/sys/dev/bluetooth: bthidev.c btkbd.c
 
  Log Message:
  Fix panic triggered by pressing the caps lock key:
  http://c0ff33.net/drop/bt_caps_panic.jpg
 
  this does not seem right - I've never had such a panic,

 I can easily reproduce this problem with Apple Wireless Keyboard
 (version without numeric keypad) on NetBSD/amd64 HEAD. If this patch is
 not applied, pressing caps lock always results in panic, as in photo.

Hmm, how long have you been using a Bluetooth keyboard?  I wonder if
something else has changed recently (I've been busy lately - my source is
from early October, and I want to test something else before updating)

Also, what kernel options do you have? I am using i386 and have always
used DIAGNOSTIC (built in now) and I have run with LOCKDEBUG in the past
though am not at the moment

I can't see that the type of keyboard will be relevant (I use an older
apple keyboard here)

  and btkbd should really be Bluetooth agnostic since its the same as
  ukbd (except that ukbd is tied too closely to the USB stack)

 So we shouldn't fiddle with bt_lock in btkbd.c ?

Really, no we shouldn't.. it is still on my jobs list to merge USB and
Bluetooth HID drivers as it is the same protocol, but the USB parts were
too dependent on the USB stack, reaching over the HID part to eg fetch the
HID descriptors (and some other weird things, in ucycom at least)

So, everything to do with 'Bluetooth' should be handled in bthidev.c (and
everything for 'USB in uhidev.c) leaving the (kbd, ms, ..) drivers to
interface with the 'HID' API of their parent.. thats why btkbd.c calls the
output method that was passed to it via the autoconf attach routine,
rather than using bthidev_output()

  btkbd_set_leds() may be called from wskbd directly (by pressing caps lock
  on your built-in keyboard for instance)

 I've tested this patch by pressing the caps lock key on bt keyboard and
 issuing wsconsctl ledstate=1, and both methods work.

Do you have a built in keyboard?  wsconsctl uses the ioctl, and bt
keyboard calls the function with the bt_lock held, but if you press the
caps-lock on the built in keyboard then wscons calls the set_leds routine
directly, I think? (thus, no lock will be acquired, when sending the
output report, which is not obviously going to break immediately, but..)

  probably it should be that bt_lock is released in bthidev_input()
  before calling the hid_output function..

 I'm not sure if I understand correctly. The bthidev_input() does not
 acquire bt_lock at all.

it is called from within the bluetooth protocol stack, so will be holding
it already (thats where the 'locking against myself' originates)

Just dropping the lock and reaquiring it around the sc_input/sc_feature
call is probably not exactly the right thing to do though (as the stack
will not be aware that that might have happened and data structures could
have changed), it really should disassociate from the context, maybe doing
the call from a callout or separate task instead. (want that kcont(9) now
pretty please, gimpy :)

iain

PS

I am also looking at the

bthidev0: report ID 17, len = 1 ignored

messages you got.. that is not normal (likely not relevant to the locking
issue though), how did you trigger them, is it just caps lock?



Re: CVS commit: src/sys/dev/bluetooth

2012-01-02 Thread Iain Hibbert
On Mon, 2 Jan 2012, Iain Hibbert wrote:

 Also, what kernel options do you have? I am using i386 and have always
 used DIAGNOSTIC (built in now) and I have run with LOCKDEBUG in the past
 though am not at the moment

booting a LOCKDEBUG kernel shows the same problem here btw

iain


re: CVS commit: src/sys/dev/bluetooth

2012-01-02 Thread Iain Hibbert
On Mon, 2 Jan 2012, matthew green wrote:

  Just dropping the lock and reaquiring it around the sc_input/sc_feature
  call is probably not exactly the right thing to do though (as the stack
  will not be aware that that might have happened and data structures could
  have changed), it really should disassociate from the context, maybe doing
  the call from a callout or separate task instead. (want that kcont(9) now
  pretty please, gimpy :)

 i considered attempt to drop and allow re-taking the bt_lock like you
 have described, but i didn't know if it was safe, and there's a lot of
 code to read to check.  maybe with the above info you can suggest a
 better way to solve this problem.

Yes I think even if analysis showed it was safe currently, doing that is
not safe in the long term..  The correct thing to do is to handle the
upcall in a separate context. I can look into it later but I've got to go
catch a train in a minute (and, will be without Bluetooth keyboard for a
few days :)

iain


Re: CVS commit: src/sys/dev/bluetooth

2011-12-30 Thread Iain Hibbert
On Sat, 31 Dec 2011, Radoslaw Kujawa wrote:

 Module Name:  src
 Committed By: rkujawa
 Date: Sat Dec 31 01:16:09 UTC 2011

 Modified Files:
   src/sys/dev/bluetooth: bthidev.c btkbd.c

 Log Message:
 Fix panic triggered by pressing the caps lock key:
 http://c0ff33.net/drop/bt_caps_panic.jpg

this does not seem right - I've never had such a panic, and btkbd should
really be Bluetooth agnostic since its the same as ukbd (except that
ukbd is tied too closely to the USB stack)

btkbd_set_leds() may be called from wskbd directly (by pressing caps lock
on your built-in keyboard for instance)

probably it should be that bt_lock is released in bthidev_input() before
calling the hid_output function..

regards,
iain



Re: CVS commit: src/sys/arch/x86/x86

2011-10-18 Thread Iain Hibbert
On Tue, 18 Oct 2011, Jukka Ruohonen wrote:

 On Tue, Oct 18, 2011 at 06:39:49AM -0400, Jared McNeill wrote:
  I would argue that any manually loaded module shouldn't be autounloaded.
  What do you think about flagging modules as autoloaded and only
  autounloading the autoloaded ones?

 That sounds right to me.

 As noted, generally I am not sure what my opinion about autounloading really
 is. But it feels somewhat awkward and error-prone that drivers must protect
 themselves against the autounloading kthread.

How often is autounloading actually effectively used anyway?  I mean, if
the module is loaded automatically, it is because the system found that it
was needed.

So, yes.. there situation where eg USB or PCMCIA devices might have a
transient need for a driver, but on the other hand, the overhead of a
driver being in memory is not that great considering that you used it
once, as the chance of re-use is significant (higher by far than all the
other drivers that have never been needed)

The real benefit of the modular system is that you don't need to load
hundreds of modules on the off chance that they will be used. A cron entry
could be used to flush unused modules if the sysop cares about that, why
do we need a kthread running?

iain


Re: CVS commit: src/share/mk

2011-10-17 Thread Iain Hibbert
On Sun, 16 Oct 2011, Marc Balmer wrote:

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

 Log Message:
 Uncomment LUA_DPLIBS processing, but do not auto-include liblua.so,
 under the assumption that programs that load Lua modules already have
 loaded it.

Regarding this (which I have discussed with Marc off-list previously), I
think a Lua module should always depend on liblua.so as there will be
calls to functions from there, though I guess Marc is correct that the
binary loading the module should have been linked with it anyway.

So, is this enough?

What if the binary is statically linked with the Lua interpreter, or if it
was linked against a different version of lualib.so? Do the symbols in the
loaded module get resolved correctly?

This comes up really because Marc found it a problem to actually build the
modules, as the dependency is taken from the OBJDIR, not the DESTDIR (I
took this concept from bsd.lib.mk, it is the same there), so just building
a module (or a library, see eg libmenu) means you must build the
dependencies first rather than being able to use the host (DESTDIR)
versions..

iain


Re: CVS commit: src/external/gpl3/gdb/lib/libgdb/arch/i386

2011-10-10 Thread Iain Hibbert
On Mon, 10 Oct 2011, Christos Zoulas wrote:

 Module Name:  src
 Committed By: christos
 Date: Mon Oct 10 14:07:16 UTC 2011

 Added Files:
   src/external/gpl3/gdb/lib/libgdb/arch/i386: observer.inc

 Log Message:
 add missing file

thanks

iain


Re: CVS commit: src/lib

2011-10-08 Thread Iain Hibbert
On Sat, 8 Oct 2011, Alan Barrett wrote:

 On Fri, 07 Oct 2011, Marc Balmer wrote:
  Modified Files:
  src/lib: Makefile
 
  +# Lua bindings come last, they might depend on anything
  +SUBDIR+=   lua

 Just adding it last doesn't ensure it gets built last.
 You probably need a .WAIT.

although it should be ok without, until somebody writes a Lua module
that depends on the something after the last .WAIT ?

iain


Re: CVS commit: src/lib/libm/man

2011-09-12 Thread Iain Hibbert
On Mon, 12 Sep 2011, Jukka Ruohonen wrote:

 On Mon, Sep 12, 2011 at 08:00:53PM +0200, Joerg Sonnenberger wrote:
  On Mon, Sep 12, 2011 at 02:44:27PM +, Jukka Ruohonen wrote:
   Module Name:  src
   Committed By: jruoho
   Date: Mon Sep 12 14:44:27 UTC 2011
  
   Modified Files:
 src/lib/libm/man: ldexp.3
  
   Log Message:
   Update and improve, and note that the long double variant is not 
   supported.
 
  Can we please *not* add such notes? They don't really add value, the
  lack of a long double prototype at the beginning of the man page is
  indicator enough. They do add just another thing to keep track of when
  adding the support though.

 Fair enough. But I think it is a BUG worth mentioning when an operating
 system does not support standard C.

you could add a note about such things to src/doc/TODO, or file a PR?

iain


Re: CVS commit: src/etc/mtree

2011-09-06 Thread Iain Hibbert
On Mon, 5 Sep 2011, Valeriy E. Ushakov wrote:

 On Mon, Sep 05, 2011 at 15:13:49 +0100, Iain Hibbert wrote:

  On Mon, 5 Sep 2011, Joerg Sonnenberger wrote:
 
   On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote:
Module Name:src
Committed By:   apb
Date:   Mon Sep  5 09:57:02 UTC 2011
   
Modified Files:
src/etc/mtree: Makefile
   
Log Message:
Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp.
This fixes a problem in which NetBSD.dist.tmp had been created in
the SRCDIR by an earlier build (performed without an OBJDIR), and
the existence of the file in the SRCDIR confused a subsequent build
(performed with an OBJDIR).
  
   Do we really want to add special cases like this? There are all kinds of
   mysterious errors triggered by unclean SRCDIR, I don't think it is worth
   adding this specific hack.
 
  IMO these cases are worth handling just because if an OBJDIR is specified,
  it should be used. The alternative being that the OBJDIR is used
  sometimes?  Thats just wrong..

 So whay do you treat NetBSD.dist.tmp and NetBSD.dist differently then?

Well, I don't know but ${.OBJDIR}/NetBSD.dist is already referenced in
that file?

 If you go down that path, where do you stop?

You can sleep when you have a system that works as expected, not one that
fails with mysterious errors because even though you told it to use an
OBJDIR for work files, it was confused by some it found elsewhere. As
noted, most of this is handled invisibly by the make framework, but some
of it needs to be manually handled. I guess people fix things as they
notice them..

iain


Re: CVS commit: src/etc/mtree

2011-09-06 Thread Iain Hibbert
On Tue, 6 Sep 2011, Valeriy E. Ushakov wrote:

 On Tue, Sep 06, 2011 at 08:43:10 +0100, Iain Hibbert wrote:

  On Mon, 5 Sep 2011, Valeriy E. Ushakov wrote:
 
   On Mon, Sep 05, 2011 at 15:13:49 +0100, Iain Hibbert wrote:
  
On Mon, 5 Sep 2011, Joerg Sonnenberger wrote:
   
 On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote:
  Module Name:src
  Committed By:   apb
  Date:   Mon Sep  5 09:57:02 UTC 2011
 
  Modified Files:
  src/etc/mtree: Makefile
 
  Log Message:
  Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp.
  This fixes a problem in which NetBSD.dist.tmp had been created in
  the SRCDIR by an earlier build (performed without an OBJDIR), and
  the existence of the file in the SRCDIR confused a subsequent build
  (performed with an OBJDIR).

 Do we really want to add special cases like this? There are all kinds 
 of
 mysterious errors triggered by unclean SRCDIR, I don't think it is 
 worth
 adding this specific hack.
   
IMO these cases are worth handling just because if an OBJDIR is 
specified,
it should be used. The alternative being that the OBJDIR is used
sometimes?  Thats just wrong..
  
   So whay do you treat NetBSD.dist.tmp and NetBSD.dist differently then?
 
  Well, I don't know but ${.OBJDIR}/NetBSD.dist is already referenced in
  that file?
 
   If you go down that path, where do you stop?
 
  You can sleep when you have a system that works as expected, not one that
  fails with mysterious errors because even though you told it to use an
  OBJDIR for work files, it was confused by some it found elsewhere. As
  noted, most of this is handled invisibly by the make framework, but some
  of it needs to be manually handled. I guess people fix things as they
  notice them..

 Are you saying you are going to add a special case for each foo.o file
 each time an accidental non-objdir build left foo.o in src? (and no,
 that's not a rhetoric question).

clearly not, since the foo.o files are already handled by a general case

iain


Re: CVS commit: src/etc/mtree

2011-09-05 Thread Iain Hibbert
On Mon, 5 Sep 2011, Joerg Sonnenberger wrote:

 On Mon, Sep 05, 2011 at 09:57:02AM +, Alan Barrett wrote:
  Module Name:src
  Committed By:   apb
  Date:   Mon Sep  5 09:57:02 UTC 2011
 
  Modified Files:
  src/etc/mtree: Makefile
 
  Log Message:
  Use ${.OBJDIR}/NetBSD.dist.tmp instead of just NetBSD.dist.tmp.
  This fixes a problem in which NetBSD.dist.tmp had been created in
  the SRCDIR by an earlier build (performed without an OBJDIR), and
  the existence of the file in the SRCDIR confused a subsequent build
  (performed with an OBJDIR).

 Do we really want to add special cases like this? There are all kinds of
 mysterious errors triggered by unclean SRCDIR, I don't think it is worth
 adding this specific hack.

IMO these cases are worth handling just because if an OBJDIR is specified,
it should be used. The alternative being that the OBJDIR is used
sometimes?  Thats just wrong..

iain


Re: CVS commit: src

2011-09-01 Thread Iain Hibbert
On Wed, 31 Aug 2011, Warner Losh wrote:

 In the absence of both the prototype and a cast, NULL (which can be 0)
 will be passed as an int, not as a pointer.

NetBSD C headers define NULL as ((void *)0), and our Makefiles use -Wall
(includes -Wimplicit-function-declaration) to avoid such situations..

 Given that NetBSD's charter is to create portable code, reverting the
 variadic function argument cast removal seems the most portable thing to
 do.

Ok I have reviewed the patch and reinstated the NULL casts, where it was
being passed as a vararg. Any other situations?

Jörg or Valeriy; please fix share/misc/style

iain

Re: CVS commit: src/sys

2011-09-01 Thread Iain Hibbert
On Wed, 31 Aug 2011, Iain Hibbert wrote:

 Module Name:  src
 Committed By: plunky
 Date: Wed Aug 31 18:31:04 UTC 2011

 Modified Files:
   src/sys/coda: coda_subr.c
   src/sys/compat/ndis: subr_ntoskrnl.c
   src/sys/dev/pci: twa.c
   src/sys/dev/raidframe: rf_aselect.c rf_cvscan.c rf_decluster.c
   rf_reconmap.c
   src/sys/fs/ntfs: ntfs_subr.c
   src/sys/kern: kern_drvctl.c kern_malloc.c subr_autoconf.c uipc_mbuf.c
   uipc_socket2.c
   src/sys/miscfs/fifofs: fifo_vnops.c
   src/sys/netatalk: ddp_input.c
   src/sys/netinet: ip_input.c ip_mroute.c tcp_input.c tcp_timer.c
   src/sys/netinet6: icmp6.c in6_pcb.c ip6_mroute.c mld6.c udp6_output.c
   src/sys/netipsec: ipsec_output.c xform_esp.c
   src/sys/netiso: tp_inet.c
   src/sys/netsmb: smb_trantcp.c

 Log Message:
 NULL does not need a cast

reviewing these, I note that ip_output() is a vararg function, and I
changed some instances where a NULL was cast before being passed as
vararg to that

However, there are many instances elsewhere where NULL is passed to
ip_output() without a cast, and presumably these have caused no problems.
For example, from my change below..

--- src/sys/netinet/ip_input.c:1.295Tue May  3 17:44:31 2011
+++ src/sys/netinet/ip_input.c  Wed Aug 31 18:31:03 2011
@@ -1405,7 +1405,7 @@

error = ip_output(m, NULL, ipforward_rt,
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
-   (struct ip_moptions *)NULL, (struct socket *)NULL);
+   NULL, NULL);

if (error)
IP_STATINC(IP_STAT_CANTFORWARD);

and so, as NULL is already defined in NetBSD as ((void *)0) I am inclined
to leave these few changes as-is.

iain


re: CVS commit: src

2011-08-18 Thread Iain Hibbert
On Thu, 18 Aug 2011, matthew green wrote:


   Log Message:
   build GMP, MPFR and MPC as private libraries just for GCC.  don't
   install the headers or librarys into the system.
 
  in lib/Makefile should this really be
 
   .if (${MKGCC} != no)  ${HAVE_GCC} = 45
 
  rather than
 
   .if defined(HAVE_GCC)  ${HAVE_GCC} = 45
 
  ?
 
  I think that HAVE_GCC is always defined, these days..

 it should have both.  we shouldn't rely on HAVE_GCC always
 being defined.  i thought it wasn't defined for pcc builds?

It was that way in the past, but I think the AVAILABLE_COMPILERS thing
that Jörg introduced did away with that, so HAVE_etc is always defined..?

Also with those gcc45 libs, they are distributed amongst the .WAITs but
they don't need to be since there is no dependency as just the .a files
are produced now.. strictly, the dependency is introduced at link time,
not build time..

iain

Re: CVS commit: src

2011-08-17 Thread Iain Hibbert
On Thu, 21 Jul 2011, matthew green wrote:

 Module Name:  src
 Committed By: mrg
 Date: Thu Jul 21 03:13:32 UTC 2011

 Modified Files:
   src/compat/amd64/i386: bsd.i386.mk
   src/compat/mips64/64: bsd.64.mk
   src/compat/mips64/o32: bsd.o32.mk
   src/compat/sparc64/sparc: bsd.sparc.mk
   src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
   md.sparc64
   src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
   md.sparc64 mi shl.mi
   src/external/gpl3/gcc/usr.bin: Makefile.backend Makefile.inc
   src/external/gpl3/gcc/usr.bin/cc1: Makefile
   src/external/gpl3/gcc/usr.bin/cc1obj: Makefile
   src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
   src/external/lgpl2/mpc/lib/libmpc: Makefile
   src/external/lgpl3/gmp/lib/libgmp: Makefile
   src/external/lgpl3/mpfr/lib/libmpfr: Makefile
   src/lib: Makefile

 Log Message:
 build GMP, MPFR and MPC as private libraries just for GCC.  don't
 install the headers or librarys into the system.

in lib/Makefile should this really be

 .if (${MKGCC} != no)  ${HAVE_GCC} = 45

rather than

 .if defined(HAVE_GCC)  ${HAVE_GCC} = 45

?

I think that HAVE_GCC is always defined, these days..

iain


Re: CVS commit: src/crypto/external/bsd/netpgp/dist

2011-06-29 Thread Iain Hibbert
On Wed, 29 Jun 2011, Jukka Ruohonen wrote:

 On Wed, Jun 29, 2011 at 10:50:22AM +0100, Julio Merino wrote:
  One of the ideas floating around in my head is to make atf-run (well,
  kyua) support foreign tests.  The most basic form of this would be
  programs that just return 0 on success or 1 on failure, but maybe it'd
  be extended to also support autotest programs, etc.

 Wasn't there already a test or two doing something like this?

The libevent tests do work that way, using an atf-sh wrapper

iain


Re: CVS commit: [netbsd-5] src/sys/kern

2011-06-19 Thread Iain Hibbert
On Sat, 18 Jun 2011, Manuel Bouyer wrote:

 Module Name:  src
 Committed By: bouyer
 Date: Sat Jun 18 16:42:04 UTC 2011

 Modified Files:
   src/sys/kern [netbsd-5]: uipc_domain.c uipc_proto.c uipc_usrreq.c

 Log Message:
 Pull up following revision(s) (requested by manu in ticket #1633):
   sys/kern/uipc_domain.c: revision 1.86

This broke the build. I think it needs either revision 1.77 which
introduced domain_sysctllog but that may introduce other complexities, or
the attached patch which makes it use the local clog as per other
instances..

iainIndex: uipc_domain.c
===
RCS file: /cvsroot/src/sys/kern/uipc_domain.c,v
retrieving revision 1.76.12.1
diff -u -p -r1.76.12.1 uipc_domain.c
--- uipc_domain.c   18 Jun 2011 16:42:03 -  1.76.12.1
+++ uipc_domain.c   19 Jun 2011 16:49:21 -
@@ -496,7 +496,7 @@ SYSCTL_SETUP(sysctl_net_setup, sysctl n
   SYSCTL_DESCR(SOCK_SEQPACKET settings),
   NULL, 0, NULL, 0,
   CTL_NET, PF_LOCAL, SOCK_SEQPACKET, CTL_EOL);
-   sysctl_createv(domain_sysctllog, 0, NULL, NULL,
+   sysctl_createv(clog, 0, NULL, NULL,
   CTLFLAG_PERMANENT,
   CTLTYPE_NODE, dgram,
   SYSCTL_DESCR(SOCK_DGRAM settings),
@@ -516,7 +516,7 @@ SYSCTL_SETUP(sysctl_net_setup, sysctl n
block list),
   sysctl_unpcblist, 0, NULL, 0,
   CTL_NET, PF_LOCAL, SOCK_SEQPACKET, CTL_CREATE, CTL_EOL);
-   sysctl_createv(domain_sysctllog, 0, NULL, NULL,
+   sysctl_createv(clog, 0, NULL, NULL,
   CTLFLAG_PERMANENT,
   CTLTYPE_STRUCT, pcblist,
   SYSCTL_DESCR(SOCK_DGRAM protocol control block list),


Re: CVS commit: src

2011-06-15 Thread Iain Hibbert
On Tue, 14 Jun 2011, Matt Thomas wrote:


 On Jun 14, 2011, at 3:51 PM, Joerg Sonnenberger wrote:

  On Tue, Jun 14, 2011 at 08:51:48AM +0100, Iain Hibbert wrote:
  Hm, does the stack have any natural alignment requirements on amd64, such
  that a 10-char array actually occupies more space?
 
  AMD64 normally aligns to 16 Bytes.

 So does powerpc.

hm, gcc it seems pads the array in any case.. I changed it to ints, lets
see if that works better

iain


Re: CVS commit: src

2011-06-14 Thread Iain Hibbert
On Tue, 14 Jun 2011, Jukka Ruohonen wrote:

 On Sun, Jun 12, 2011 at 09:12:46PM +, Iain Hibbert wrote:
  Module Name:src
  Committed By:   plunky
  Date:   Sun Jun 12 21:12:46 UTC 2011
 
  Modified Files:
  src/distrib/sets/lists/tests: mi
  src/tests/lib/libc/ssp: Makefile t_ssp.sh
  Added Files:
  src/tests/lib/libc/ssp: h_raw.c
 
  Log Message:
  reinstate ssp:raw test, slightly differently.. this one is built
  with -fstack-protector-all and tests that the compiler built in
  stack protection works, by poking directly outside the buffer

 This appears to fail on qemu/amd64:

   http://www.whooppee.com/~paul/amd64-results/1985_atf.html#failed-tcs-summary

 Any idea why?

Hm, does the stack have any natural alignment requirements on amd64, such
that a 10-char array actually occupies more space?

iain


Re: CVS commit: src/sys/dev

2011-06-01 Thread Iain Hibbert
On Fri, 27 May 2011, Masao Uebayashi wrote:

 On Fri, May 27, 2011 at 1:30 AM, David Laight da...@l8s.co.uk wrote:
  On Thu, May 26, 2011 at 07:12:57AM +, David Holland wrote:
  On Wed, May 25, 2011 at 04:33:38PM +, Masao Uebayashi wrote:
    Modified Files:
       src/sys/dev/bluetooth: bcsp.c bthub.c btuart.c
       src/sys/dev/ieee1394: fwdev.c fwmem.c fwohci.c
   
    Log Message:
    Declare cfdrivers using extern rather than including ioconf.h.
 
  This is wrong. Please revert it.
 
  The purpose of declaring things in header files is to make sure all
  uses are consistent.
 
  Is there another header file that could contain:
     #define CFDRIVER(prefix) extern struct cfdriver prefix##_cd

 sys/device.h has CFDRIVER_DECL, which defines (not declares) a
 cfdriver struct.  So something like

 #ifndef _MODULE
 #define CFDRIVER_DECL(x) extern struct cfdriver __CONCAT(x,_cd)
 #else
 #define CFDRIVER_DECL(x) \
 struct cfdriver __CONCAT(x,_cd) = { ... }
 #endif

 would work.  (Already working here.)

The problem with this is that the two declarations are not tied together;
it is still possible to have two differing variables, pretending to be the
same, which is the problem that the common header solves.

I think you should revert the change (as previously asked), and if you
want to fix that issue re modules, you should do that separately (I
suspect its a lot of work, but a lot of people will be thankful for it..)

regards,
iain

Re: CVS commit: src/sys/dev

2011-05-26 Thread Iain Hibbert
On Thu, 26 May 2011, Iain Hibbert wrote:

 you might note that the bthub.o file (at least, I didn't check the others)
 does not actually use __func__ (unless DEBUG) and in fact the objdump does
 not change with the removal of ioconf.h

sorry: does not change with the addition of no ehci

iain


Re: CVS commit: src/sys/dev

2011-05-26 Thread Iain Hibbert
On Thu, 26 May 2011, Masao Uebayashi wrote:

  I wonder if that can be worked around by stripping or ignoring the thing
  you want to ignore (non-global symbols), rather than potentially
  introducing type inconsistency bugs? (objcopy -x will discard all
  non-global symbols, I don't know if that is too much)

 - I want to keep reproducibility even in intermediate files for better
 traceability.

how do you detect different signatures?  diff -I '__func__\.[0-9]*' may
also suffice, if you were using objdump -D for that..

 - I can't think of how cfdriver decls can lead to type inconsistency bugs.

Ok, somebody makes a mistake and writes

extern struct cfdata foo_cd;

and it works by chance because the address was zero anyway, then later
something else is changed around and all of a sudden, an innocent code
causes a kernel panic..

  you might note that the bthub.o file (at least, I didn't check the others)
  does not actually use __func__ (unless DEBUG) and in fact the objdump does
  not change with the removal of ioconf.h

 Right, bthub.o is not affected.  fwmem.o is.

ok but why change files not affected?  You did not actually remove all
inclusions of ioconf.h in any case.. (grep ioconf.h *.d finds two more
in i386/GENERIC, I didn't look at any other arch)

iain


Re: CVS commit: src/sys/dev

2011-05-26 Thread Iain Hibbert
On Fri, 27 May 2011, Masao Uebayashi wrote:

 On Thu, May 26, 2011 at 8:24 PM, Iain Hibbert plu...@rya-online.net wrote:
  On Thu, 26 May 2011, Masao Uebayashi wrote:
 
  On Thu, May 26, 2011 at 5:39 PM, Iain Hibbert plu...@rya-online.net 
  wrote:
   On Thu, 26 May 2011, Masao Uebayashi wrote:
   - I can't think of how cfdriver decls can lead to type inconsistency 
   bugs.
  
   Ok, somebody makes a mistake and writes
  
   extern struct cfdata foo_cd;
  
   and it works by chance because the address was zero anyway, then later
   something else is changed around and all of a sudden, an innocent code
   causes a kernel panic..
 
  cfdriver must exist for either embedded/module forms.  If not, it
  should cause link error (if I'm not missing anything).
 
  Of course, it would exist.. that is the bug
 
  file a: /* generated by config(1) */
         struct cfdriver foo_cd;
 
  file b: /* generated by an inattentive programmer */
         extern struct cfdata foo_cd;

 I see.  Let's fix hundreds of these instances now.

well, it is hypothetical of course - you wrote

 I can't think of how cfdriver decls can lead to type inconsistency bugs.

and I have shown you one pretty obvious way in which that can happen..

iain

Re: CVS commit: src/sys/dev

2011-05-25 Thread Iain Hibbert
On Wed, 25 May 2011, Masao Uebayashi wrote:

 Module Name:  src
 Committed By: uebayasi
 Date: Wed May 25 16:33:38 UTC 2011

 Modified Files:
   src/sys/dev/bluetooth: bcsp.c bthub.c btuart.c
   src/sys/dev/ieee1394: fwdev.c fwmem.c fwohci.c

 Log Message:
 Declare cfdrivers using extern rather than including ioconf.h.

surely the point of declaring a variable once in a header file is that it
then cannot be accidentally declared differently elsewhere?

is ioconf.h so onerous? (it is merely a list of cfdriver declarations)

iain


Re: CVS commit: src/sys/dev

2011-05-25 Thread Iain Hibbert
On Thu, 26 May 2011, Masao Uebayashi wrote:

 On Thu, May 26, 2011 at 2:09 AM, Iain Hibbert plu...@rya-online.net wrote:
  On Wed, 25 May 2011, Masao Uebayashi wrote:
 
  Module Name:  src
  Committed By: uebayasi
  Date:         Wed May 25 16:33:38 UTC 2011
 
  Modified Files:
        src/sys/dev/bluetooth: bcsp.c bthub.c btuart.c
        src/sys/dev/ieee1394: fwdev.c fwmem.c fwohci.c
 
  Log Message:
  Declare cfdrivers using extern rather than including ioconf.h.
 
  surely the point of declaring a variable once in a header file is that it
  then cannot be accidentally declared differently elsewhere?
 
  is ioconf.h so onerous? (it is merely a list of cfdriver declarations)

 ioconf.h is not, but GCC is.

 I found 2 fwmem.o's signatures mismatch between 2 kernels; GENERIC and
 another doing only no ehci and include GENERIC.  objdump -D shows:

 @@ -956,7 +956,7 @@
   .ident:
 0:  24 4e   and$0x4e,%al
 2:  65  gs
 -   3:  74 42   je 47 __func__.11035+0x11
 +   3:  74 42   je 47 __func__.11034+0x11
 5:  53  push   %rbx
 6:  44 24 00rex.R and$0x0,%al

Hm, but I don't see a mismatch here though.. the actual bytes are the
same, and that .ident section contains just the string $NetBSD$ ?

iain

Re: CVS commit: src/sys/dev/acpi

2011-05-22 Thread Iain Hibbert
On Sun, 22 May 2011, Joerg Sonnenberger wrote:

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

 Log Message:
 Let's not be silly. Use a fancy if else to decide behavior of a bool
 and hope cosmic radition doesn't create a third state.

I'll just say here, that I found a code generation bug in pcc (actually,
inexact emulation of a gcc feature which was a wtf itself) because of the
existence of this kind of code..

think of it as an assert(), which could for example catch calls to the
function using an int argument (yeah ok, -std=gnu99 would complain about
lack of prototypes)

iain



Re: CVS commit: src

2011-05-18 Thread Iain Hibbert
On Fri, 15 Apr 2011, Joerg Sonnenberger wrote:

 Module Name:  src
 Committed By: joerg
 Date: Fri Apr 15 13:42:23 UTC 2011

 Modified Files:
   src/distrib/sets/lists/base: mi
   src/distrib/sets/lists/comp: ad.powerpc md.amd64 md.i386
   src/etc/mtree: NetBSD.dist.base
   src/gnu/dist/gcc4/gcc/config: netbsd.h
   src/gnu/usr.bin/gcc4/include: Makefile

 Log Message:
 Move the headers for compiler and platform specific intrinsincs from
 /usr/include to /usr/include/gcc-4.1.

with clean tool and obj dirs, the tool gcc that I built does not look in
this directory, eg for mmintrin.h included by pixman-mmx.c on i386

a simple file containing only an include statement

% cat t.c
#include mmintrin.h

with a 5.99.41 userland,

% ktruss -i /usr/tools/bin/i486--netbsdelf-gcc -mmmx -c t.c | grep mmintrin
   #include mmintrin.h\n
 23537  1 cc1  
__stat50(/usr/tools/bin/../lib/gcc/i486--netbsdelf/4.1.3/include/mmintrin.h.gch,
 0xbfbfdfa0) Err#2 ENOENT
 23537  1 cc1  
open(/usr/tools/bin/../lib/gcc/i486--netbsdelf/4.1.3/include/mmintrin.h, 0x4, 
0x1b6) Err#2 ENOENT
 23537  1 cc1  __stat50(/usr/include/mmintrin.h.gch, 0xbfbfdfa0) 
Err#2 ENOENT
 23537  1 cc1  open(/usr/include/mmintrin.h, 0x4, 0x1b6) = 5

and it finds it naturally, but during a build.sh build with --sysroot,

% ktruss -i /usr/tools/bin/i486--netbsdelf-gcc -mmmx 
--sysroot=/var/work/NetBSD-current/obj/destdir.i386 -c t.c | grep mmintrin
t.c:1:22: error: mmintrin.h: No such file or directory
   #include mmintrin.h\n
 27551  1 cc1  
__stat50(/var/work/NetBSD-current/obj/destdir.i386/usr/include/mmintrin.h.gch,
 0xbfbfdf70) Err#2 ENOENT
 27551  1 cc1  
open(/var/work/NetBSD-current/obj/destdir.i386/usr/include/mmintrin.h, 0x4, 
0x1b6) Err#2 ENOENT
   mmintrin.h: No such file or directory

it fails, yet the file

  /var/work/NetBSD-current/obj/destdir.i386/usr/include/gcc-4.1/mmintrin.h

does exist..

iain


Re: CVS commit: src

2011-05-18 Thread Iain Hibbert
On Wed, 18 May 2011, Iain Hibbert wrote:

 On Fri, 15 Apr 2011, Joerg Sonnenberger wrote:

  Module Name:src
  Committed By:   joerg
  Date:   Fri Apr 15 13:42:23 UTC 2011
 
  Modified Files:
  src/distrib/sets/lists/base: mi
  src/distrib/sets/lists/comp: ad.powerpc md.amd64 md.i386
  src/etc/mtree: NetBSD.dist.base
  src/gnu/dist/gcc4/gcc/config: netbsd.h
  src/gnu/usr.bin/gcc4/include: Makefile
 
  Log Message:
  Move the headers for compiler and platform specific intrinsincs from
  /usr/include to /usr/include/gcc-4.1.

 with clean tool and obj dirs, the tool gcc that I built does not look in
 this directory, eg for mmintrin.h included by pixman-mmx.c on i386

Bah, incomplete cvs update, apologies for the noise..

iain


Re: CVS commit: src/sys/fs/tmpfs

2011-05-14 Thread Iain Hibbert
On Sat, 14 May 2011, Marc Balmer wrote:

 What is the current state of C99 vs. older Cs?  Do all arches /
 compilers we have support C99?  I assume gcc, llvm/clang are safe, but
 what about pcc wrt C99?

 I'd like a short clarification here, since this might influence my
 coding...  tnx.

pcc is a C99 compiler (with some gcc compatibility) which is still under
development, though C99 feature support is complete.

pcc is capable of building large parts of userland (I am running with
/bin, /sbin and /usr/bin currently, and am going to install /usr/sbin
soon), plus i386 kernels though there are still bugs to track down (eg no
system crash but a build.sh failed, I think due to some corrupted files..)

I'm thinking that though we have some support for C99 in tree, the
'official' position is that llvm/clang and pcc are not yet supported (eg
there has been no such announcement of support, llvm/clang source is not
yet in tree and the in-tree pcc is a year out of date).

So IMO, apart from style issues (which it would be nice to update the
share/misc/style document with), it should be safe to use any C99 features
and, excepting some of the build tools which may be needed for
bootstrapping, I don't think its useful to restrict ourselves to an older
standard..

iain


Re: CVS commit: src/gnu/dist/gcc4/gcc

2011-05-13 Thread Iain Hibbert
On Sat, 7 May 2011, Christos Zoulas wrote:

 Add a no_stack_protector function attribute to localize the effect
 of disabling stack protection on a function-by-function level, as
 opposed to per source file.

how should we enable use of this, is the patch below ok or should it have
additional restrictions? (kernel scope only? __SSP__/__SSP_ALL__?)

also, anybody with FSF privileges prepared to push the gcc addition
upstream?

iain

Index: cdefs.h
===
RCS file: /cvsroot/src/sys/sys/cdefs.h,v
retrieving revision 1.84
diff -u -p -r1.84 cdefs.h
--- cdefs.h 19 Feb 2011 02:21:21 -  1.84
+++ cdefs.h 13 May 2011 07:56:42 -
@@ -266,6 +266,12 @@
 #define__BEGIN_DECLS   __BEGIN_PUBLIC_DECLS
 #define__END_DECLS __END_PUBLIC_DECLS

+#if __GNUC_PREREQ__(4, 1)
+#define__nossp __attribute__((__no_stack_protector__))
+#else
+#define__nossp /* nothing */
+#endif
+
 /*
  * Non-static C99 inline functions are optional bodies.  They don't
  * create global symbols if not used, but can be replaced if desirable.


Re: CVS commit: src/sys/fs/tmpfs

2011-05-10 Thread Iain Hibbert
On Tue, 10 May 2011, Takahiro Kambe wrote:

 In message 20110509170006.GA15831@marx.bitnet
   on Mon, 9 May 2011 20:00:06 +0300,
   Jukka Ruohonen jruoho...@iki.fi wrote:
  On Mon, May 09, 2011 at 06:50:08PM +0200, Adam Hoka wrote:
  So can we use for (int i = 0; ... ? :p
 lint(1) support them?

Yes, lint(1) knows about it, see lint(7):

  325 variable declaration in for loop

and lint -S (use C9X mode) disables this warning..

iain


Re: CVS commit: src

2011-04-12 Thread Iain Hibbert
On Tue, 12 Apr 2011, Mindaugas Rasiukevicius wrote:

 Klaus Klein kle...@kleink.org wrote:
   Log Message:
   Add a small summary parge for struct tm from time.h. Cf. timeval(3).
 
  This exhibits something particularly well that's been bugging me for
  quite a while about such documentation changes: I think documenting
  the implementation's structure layouts in section 3 is wrong, at least
  when supposedly portable interfaces are concerned.  Those interested
  in structure member poking will look at the header file anyway, and,
  by being that specific, such documentation creates the obligation to
  keep the redundant definition in sync.

 I agree with Klaus on this point.

I sometimes like to say that struct xxx has at least the following
members rather than struct xxx is defined as, because it allows for
padding and flexibility when that may be needed..

iain


Re: CVS commit: src/lib/libbluetooth

2011-04-04 Thread Iain Hibbert
On Mon, 4 Apr 2011, Alan Barrett wrote:

 On Mon, 04 Apr 2011, Iain Hibbert wrote:
  Modified Files:
  src/lib/libbluetooth: sdp_get.c
 
  Log Message:
  handle overflowed values correctly,
  also put a compile time guard to warn if INTMAX won't fit in INT64
  (all our ports currently have INTMAX = INT64)

 The actual code tests

#if INTMAX_MAX  INT64_MAX

 which is the reverse of what the commit log says, and it's guaranteed by the
 C99 standard to never be true.  (intmax_t is guaranteed to be at least 64
 bits, and is guarantted to be the largest integral type.)

Sorry, the code test was correct though I did not see the bit about 64-bit
being minimum spec for intmax types (section 7.18.2.5), so the guard is
redundant and I will remove it

iain


CVS commit: src/usr.sbin/btattach

2010-03-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Mar  8 21:19:29 UTC 2010

Modified Files:
src/usr.sbin/btattach: btattach.c

Log Message:
fix compilation errors


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/btattach/btattach.c

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

Modified files:

Index: src/usr.sbin/btattach/btattach.c
diff -u src/usr.sbin/btattach/btattach.c:1.8 src/usr.sbin/btattach/btattach.c:1.9
--- src/usr.sbin/btattach/btattach.c:1.8	Mon Mar  8 17:59:52 2010
+++ src/usr.sbin/btattach/btattach.c	Mon Mar  8 21:19:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: btattach.c,v 1.8 2010/03/08 17:59:52 kiyohara Exp $	*/
+/*	$NetBSD: btattach.c,v 1.9 2010/03/08 21:19:29 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008 Iain Hibbert
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008 Iain Hibbert.  All rights reserved.);
-__RCSID($NetBSD: btattach.c,v 1.8 2010/03/08 17:59:52 kiyohara Exp $);
+__RCSID($NetBSD: btattach.c,v 1.9 2010/03/08 21:19:29 plunky Exp $);
 
 #include sys/ioctl.h
 #include sys/param.h
@@ -522,7 +522,9 @@
 test(const char *tty, tcflag_t cflag, tcflag_t Cflag)
 {
 	struct termios tio;
-	int fd, guessed, i, j, k, n;
+	int fd, guessed;
+	size_t i, j, k;
+	ssize_t n;
 	unsigned char buf[32];
 	const int bauds[] = {
 		 57600,		/* BCSP specific default */
@@ -573,11 +575,12 @@
 	for (i = 0; i  __arraycount(bauds); i++) {
 		if (cfsetspeed(tio, bauds[i])  0
 		|| tcsetattr(fd, TCSANOW, tio)  0
-		|| tcflush(fd, TCIOFLUSH)  0)
+		|| tcflush(fd, TCIOFLUSH)  0) {
 			if (bauds[i]  115200)
 continue;
 			else
 err(EXIT_FAILURE, tty setup failed);
+		}
 
 		if (opt_debug)
 			printf(  try with B%d\n, bauds[i]);
@@ -600,7 +603,7 @@
 
 			err(EXIT_FAILURE, read);
 		} else {
-			if (n  sizeof(bcsp_lepkt))
+			if ((size_t)n  sizeof(bcsp_lepkt))
 continue;
 			for (j = 0; j  n - sizeof(bcsp_lepkt); j++) {
 for (k = 0; k  sizeof(bcsp_lepkt); k++) 



CVS commit: src/usr.sbin/btattach

2010-03-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Mar  8 21:48:42 UTC 2010

Modified Files:
src/usr.sbin/btattach: btattach.c

Log Message:
use %zd for ssize_t argument


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/btattach/btattach.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/btattach

2010-03-08 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Mar  8 21:48:42 UTC 2010

Modified Files:
src/usr.sbin/btattach: btattach.c

Log Message:
use %zd for ssize_t argument


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/btattach/btattach.c

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

Modified files:

Index: src/usr.sbin/btattach/btattach.c
diff -u src/usr.sbin/btattach/btattach.c:1.9 src/usr.sbin/btattach/btattach.c:1.10
--- src/usr.sbin/btattach/btattach.c:1.9	Mon Mar  8 21:19:29 2010
+++ src/usr.sbin/btattach/btattach.c	Mon Mar  8 21:48:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: btattach.c,v 1.9 2010/03/08 21:19:29 plunky Exp $	*/
+/*	$NetBSD: btattach.c,v 1.10 2010/03/08 21:48:42 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2008 Iain Hibbert
@@ -27,7 +27,7 @@
 
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2008 Iain Hibbert.  All rights reserved.);
-__RCSID($NetBSD: btattach.c,v 1.9 2010/03/08 21:19:29 plunky Exp $);
+__RCSID($NetBSD: btattach.c,v 1.10 2010/03/08 21:48:42 plunky Exp $);
 
 #include sys/ioctl.h
 #include sys/param.h
@@ -589,7 +589,7 @@
 
 		n = read(fd, buf, sizeof(buf));
 		if (opt_debug  1)
-			printf(  %dbyte read\n, n);
+			printf(  %zd bytes read\n, n);
 		if (n  0) {
 			if (i == 0  errno == EAGAIN) {
 printf(This module is *maybe* supported by btuart(4).\n



CVS commit: src/sys/arch

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 09:39:44 UTC 2010

Modified Files:
src/sys/arch/algor/conf: P4032 P5064 P6032
src/sys/arch/alpha/conf: GENERIC
src/sys/arch/amd64/conf: GENERIC XEN3_DOM0
src/sys/arch/cats/conf: INSTALL
src/sys/arch/evbarm/conf: HDL_G MPCSA_GENERIC SMDK2410 TS7200 TWINTAIL
src/sys/arch/evbmips/conf: ALCHEMY GDIUM
src/sys/arch/evbppc/conf: OPENBLOCKS266_OPT PMPPC
src/sys/arch/hpcmips/conf: GENERIC MPC303 TX3922 VR41XX
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/macppc/conf: GENERIC
src/sys/arch/ofppc/conf: GENERIC GENERIC.MP
src/sys/arch/prep/conf: GENERIC
src/sys/arch/sgimips/conf: GENERIC32_IP3x
src/sys/arch/sparc64/conf: GENERIC
src/sys/arch/x68k/conf: GENERIC

Log Message:
add uhso(4) device where appropriate
- follow the lead of other USB driver declarations wrt commented out
- (cross-)build tested all these kernels


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/algor/conf/P4032
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/algor/conf/P5064
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/algor/conf/P6032
cvs rdiff -u -r1.330 -r1.331 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.270 -r1.271 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/cats/conf/INSTALL
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/HDL_G
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/evbarm/conf/SMDK2410
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/conf/TS7200
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/conf/TWINTAIL
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbmips/conf/ALCHEMY
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/conf/GDIUM
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbppc/conf/PMPPC
cvs rdiff -u -r1.207 -r1.208 src/sys/arch/hpcmips/conf/GENERIC
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/hpcmips/conf/MPC303
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/hpcmips/conf/TX3922
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hpcmips/conf/VR41XX
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/landisk/conf/GENERIC
cvs rdiff -u -r1.278 -r1.279 src/sys/arch/macppc/conf/GENERIC
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/ofppc/conf/GENERIC
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ofppc/conf/GENERIC.MP
cvs rdiff -u -r1.149 -r1.150 src/sys/arch/prep/conf/GENERIC
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/sgimips/conf/GENERIC32_IP3x
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.147 -r1.148 src/sys/arch/x68k/conf/GENERIC

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



CVS commit: src/usr.sbin/sdpd

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 10:58:40 UTC 2010

Modified Files:
src/usr.sbin/sdpd: compat.c record.c server.c service.c

Log Message:
add some LOG_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sdpd/compat.c \
src/usr.sbin/sdpd/record.c src/usr.sbin/sdpd/service.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sdpd/server.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/sdpd

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 10:58:40 UTC 2010

Modified Files:
src/usr.sbin/sdpd: compat.c record.c server.c service.c

Log Message:
add some LOG_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sdpd/compat.c \
src/usr.sbin/sdpd/record.c src/usr.sbin/sdpd/service.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sdpd/server.c

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

Modified files:

Index: src/usr.sbin/sdpd/compat.c
diff -u src/usr.sbin/sdpd/compat.c:1.1 src/usr.sbin/sdpd/compat.c:1.2
--- src/usr.sbin/sdpd/compat.c:1.1	Tue May 12 10:05:06 2009
+++ src/usr.sbin/sdpd/compat.c	Sun Mar  7 10:58:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.1 2009/05/12 10:05:06 plunky Exp $	*/
+/*	$NetBSD: compat.c,v 1.2 2010/03/07 10:58:40 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: compat.c,v 1.1 2009/05/12 10:05:06 plunky Exp $);
+__RCSID($NetBSD: compat.c,v 1.2 2010/03/07 10:58:40 plunky Exp $);
 
 #include arpa/inet.h
 
@@ -780,6 +780,8 @@
 	uint16_t class;
 	int i;
 
+	log_debug(compat RegisterRequest by client on fd#%d, fd);
+
 	if (!srv-fdidx[fd].control
 	|| !srv-fdidx[fd].priv)
 		return SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX;
@@ -829,6 +831,8 @@
 	sdp_data_t d, r;
 	int i;
 
+	log_debug(compat ChangeRequest by client on fd#%d, fd);
+
 	if (!srv-fdidx[fd].control
 	|| !srv-fdidx[fd].priv)
 		return SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX;
Index: src/usr.sbin/sdpd/record.c
diff -u src/usr.sbin/sdpd/record.c:1.1 src/usr.sbin/sdpd/record.c:1.2
--- src/usr.sbin/sdpd/record.c:1.1	Tue May 12 10:05:07 2009
+++ src/usr.sbin/sdpd/record.c	Sun Mar  7 10:58:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: record.c,v 1.1 2009/05/12 10:05:07 plunky Exp $	*/
+/*	$NetBSD: record.c,v 1.2 2010/03/07 10:58:40 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: record.c,v 1.1 2009/05/12 10:05:07 plunky Exp $);
+__RCSID($NetBSD: record.c,v 1.2 2010/03/07 10:58:40 plunky Exp $);
 
 #include bluetooth.h
 #include sdp.h
@@ -52,6 +52,8 @@
 	sdp_data_t	seq;
 	bdaddr_t	bdaddr;
 
+	log_debug(RecordInsertRequest by client on fd#%d, fd);
+
 	seq.next = srv-ibuf;
 	seq.end = srv-ibuf + srv-pdu.len;
 
@@ -104,6 +106,8 @@
 	record_t	*rec;
 	sdp_data_t	seq;
 
+	log_debug(RecordUpdateRequest by client on fd#%d, fd);
+
 	seq.next = srv-ibuf;
 	seq.end = srv-ibuf + srv-pdu.len;
 
@@ -160,6 +164,8 @@
 {
 	record_t	*rec;
 
+	log_debug(RecordRemoveRequest by client on fd#%d, fd);
+
 	if (!srv-fdidx[fd].control
 	|| !srv-fdidx[fd].priv)
 		return SDP_ERROR_CODE_INVALID_REQUEST_SYNTAX;
Index: src/usr.sbin/sdpd/service.c
diff -u src/usr.sbin/sdpd/service.c:1.1 src/usr.sbin/sdpd/service.c:1.2
--- src/usr.sbin/sdpd/service.c:1.1	Tue May 12 10:05:07 2009
+++ src/usr.sbin/sdpd/service.c	Sun Mar  7 10:58:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: service.c,v 1.1 2009/05/12 10:05:07 plunky Exp $	*/
+/*	$NetBSD: service.c,v 1.2 2010/03/07 10:58:40 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: service.c,v 1.1 2009/05/12 10:05:07 plunky Exp $);
+__RCSID($NetBSD: service.c,v 1.2 2010/03/07 10:58:40 plunky Exp $);
 
 #include bluetooth.h
 #include sdp.h
@@ -63,6 +63,8 @@
 	sdp_data_t	d, s;
 	int		max, total, count;
 
+	log_debug(ServiceSearchRequest by client on fd#%d, fd);
+
 	d.next = srv-ibuf;
 	d.end = srv-ibuf + srv-pdu.len;
 
@@ -169,6 +171,8 @@
 	uint32_t	handle;
 	int		max;
 
+	log_debug(ServiceAttributeRequest by client on fd#%d, fd);
+
 	d.next = srv-ibuf;
 	d.end = srv-ibuf + srv-pdu.len;
 
@@ -292,6 +296,8 @@
 	uint8_t		*tmp;
 	int		max;
 
+	log_debug(ServiceSearchAttributeRequest by client on fd#%d, fd);
+
 	d.next = srv-ibuf;
 	d.end = srv-ibuf + srv-pdu.len;
 

Index: src/usr.sbin/sdpd/server.c
diff -u src/usr.sbin/sdpd/server.c:1.7 src/usr.sbin/sdpd/server.c:1.8
--- src/usr.sbin/sdpd/server.c:1.7	Tue May 12 10:05:07 2009
+++ src/usr.sbin/sdpd/server.c	Sun Mar  7 10:58:40 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.7 2009/05/12 10:05:07 plunky Exp $	*/
+/*	$NetBSD: server.c,v 1.8 2010/03/07 10:58:40 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: server.c,v 1.7 2009/05/12 10:05:07 plunky Exp $);
+__RCSID($NetBSD: server.c,v 1.8 2010/03/07 10:58:40 plunky Exp $);
 
 #include sys/select.h
 #include sys/stat.h
@@ -398,6 +398,9 @@
 	srv-fdidx[cfd].omtu = (omtu  srv-omtu) ? srv-omtu : omtu;
 	srv-fdidx[cfd].offset = 0;
 	bdaddr_copy(srv-fdidx[cfd].bdaddr, sa.bt_bdaddr);
+
+	log_debug(new %s client on fd#%d,
+	srv-fdidx[cfd].control ? control : L2CAP, cfd);
 }
 
 /*
@@ -511,6 +514,7 @@
 		srv-pdu.pid = SDP_PDU_ERROR_RESPONSE;
 		srv-pdu.len = sizeof(error);
 		

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

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 12:05:09 UTC 2010

Modified Files:
src/external/bsd/pcc/usr.bin/pcc: Makefile

Log Message:
break overly long line


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/usr.bin/pcc/Makefile

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



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

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 12:05:09 UTC 2010

Modified Files:
src/external/bsd/pcc/usr.bin/pcc: Makefile

Log Message:
break overly long line


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/usr.bin/pcc/Makefile

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

Modified files:

Index: src/external/bsd/pcc/usr.bin/pcc/Makefile
diff -u src/external/bsd/pcc/usr.bin/pcc/Makefile:1.3 src/external/bsd/pcc/usr.bin/pcc/Makefile:1.4
--- src/external/bsd/pcc/usr.bin/pcc/Makefile:1.3	Fri Feb  5 08:37:48 2010
+++ src/external/bsd/pcc/usr.bin/pcc/Makefile	Sun Mar  7 12:05:09 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/02/05 08:37:48 plunky Exp $
+#	$NetBSD: Makefile,v 1.4 2010/03/07 12:05:09 plunky Exp $
 
 WARNS?=	2
 
@@ -18,7 +18,9 @@
 CPPFLAGS+=	-I${PCC_DIST}/os/${TARGOS}
 
 pcc.1:	cc.1
-	${TOOL_SED} -e s,Nm cc,Nm pcc, -e s,Dt CC,Dt PCC, ${.ALLSRC}  ${.TARGET}
+	${TOOL_SED} -e s,Nm cc,Nm pcc,	\
+		-e s,Dt CC,Dt PCC,	\
+		${.ALLSRC}  ${.TARGET}
 
 CLEANFILES+=	pcc.1
 



CVS commit: src

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 16:27:18 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/external/bsd/pcc/include: config.h
src/external/bsd/pcc/libexec/cpp: Makefile

Log Message:
Install PCC cpp as libexec/pcpp to avoid name conflicts with other
compilers (eg GCC), and to match the manpage which is already installed
as pcpp.1

(Gregory McGarry: I think it's a good idea)


To generate a diff of this commit:
cvs rdiff -u -r1.1403 -r1.1404 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/include/config.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pcc/libexec/cpp/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1403 src/distrib/sets/lists/comp/mi:1.1404
--- src/distrib/sets/lists/comp/mi:1.1403	Sat Mar  6 16:42:55 2010
+++ src/distrib/sets/lists/comp/mi	Sun Mar  7 16:27:17 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1403 2010/03/06 16:42:55 dsieger Exp $
+#	$NetBSD: mi,v 1.1404 2010/03/07 16:27:17 plunky Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3343,7 +3343,7 @@
 ./usr/libdata/debug/usr/libexec/ching/castching.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/libexec/ching/printching.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/libexec/comsat.debug	comp-mail-debug		debug
-./usr/libdata/debug/usr/libexec/cpp.debug	comp-c-debug		pcccmds,debug
+./usr/libdata/debug/usr/libexec/cpp.debug	comp-obsolete		pcccmds,obsolete
 ./usr/libdata/debug/usr/libexec/f771.debug	comp-fortran-debug	gcc=3,gcccmds,debug
 ./usr/libdata/debug/usr/libexec/f771.debug	comp-obsolete		gcc=4,obsolete
 ./usr/libdata/debug/usr/libexec/fingerd.debug	comp-netutil-debug	debug
@@ -3368,6 +3368,7 @@
 ./usr/libdata/debug/usr/libexec/makekey.debug	comp-crypto-debug	debug
 ./usr/libdata/debug/usr/libexec/makewhatis.debug	comp-man-debug		debug
 ./usr/libdata/debug/usr/libexec/ntalkd.debug	comp-netutil-debug	debug
+./usr/libdata/debug/usr/libexec/pcpp.debug	comp-c-debug		pcccmds,debug
 ./usr/libdata/debug/usr/libexec/postfix/anvil.debug	comp-postfix-debug	postfix,debug
 ./usr/libdata/debug/usr/libexec/postfix/bounce.debug	comp-postfix-debug	postfix,debug
 ./usr/libdata/debug/usr/libexec/postfix/cleanup.debug	comp-postfix-debug	postfix,debug
@@ -3771,11 +3772,12 @@
 ./usr/libexec/cc1pluscomp-cxx-bin		gcccmds
 ./usr/libexec/ccomcomp-c-bin		pcccmds
 ./usr/libexec/collect2comp-obsolete		obsolete
-./usr/libexec/cppcomp-c-bin		pcccmds
+./usr/libexec/cppcomp-obsolete		pcccmds,obsolete
 ./usr/libexec/f771comp-fortran-bin	gcc=3,gcccmds
 ./usr/libexec/f771comp-obsolete		gcc=4,obsolete
 ./usr/libexec/lint1comp-c-bin
 ./usr/libexec/lint2comp-c-bin
+./usr/libexec/pcppcomp-c-bin		pcccmds
 ./usr/sbin/configcomp-obsolete		obsolete
 ./usr/sbin/config.newcomp-obsolete		obsolete
 ./usr/sbin/genassymcomp-obsolete		obsolete

Index: src/external/bsd/pcc/include/config.h
diff -u src/external/bsd/pcc/include/config.h:1.1 src/external/bsd/pcc/include/config.h:1.2
--- src/external/bsd/pcc/include/config.h:1.1	Thu Feb 11 14:22:30 2010
+++ src/external/bsd/pcc/include/config.h	Sun Mar  7 16:27:18 2010
@@ -149,7 +149,7 @@
 /* #undef PECOFFABI */
 
 /* Define path to alternate preprocessor */
-/* #undef PREPROCESSOR */
+#define PREPROCESSOR pcpp
 
 /* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be

Index: src/external/bsd/pcc/libexec/cpp/Makefile
diff -u src/external/bsd/pcc/libexec/cpp/Makefile:1.6 src/external/bsd/pcc/libexec/cpp/Makefile:1.7
--- src/external/bsd/pcc/libexec/cpp/Makefile:1.6	Fri Feb  5 08:37:48 2010
+++ src/external/bsd/pcc/libexec/cpp/Makefile	Sun Mar  7 16:27:18 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2010/02/05 08:37:48 plunky Exp $
+#	$NetBSD: Makefile,v 1.7 2010/03/07 16:27:18 plunky Exp $
 
 WARNS?=	2
 
@@ -7,16 +7,21 @@
 .PATH:	${PCC_DIST}/cc/cpp \
 	${PCC_DIST}/mip
 
-PROG=	cpp
+#
+# We build cpp(1) as pcpp(1) to avoid confusion with GCC
+#
+
+PROG=	pcpp
 
 SRCS=	cpy.y
 SRCS+=	cpp.c token.c
 
-# avoid conflicts with the GCC cpp.1 page
 MAN=	pcpp.1
 
 pcpp.1:	cpp.1
-	cp ${.ALLSRC} ${.TARGET}
+	${TOOL_SED} -e s,Nm cpp,Nm pcpp,	\
+		-e s,Dt CPP,Dt PCPP,	\
+		${.ALLSRC}  ${.TARGET}
 
 CPPFLAGS+=	-DCPP_DEBUG
 CPPFLAGS+=	-I${.OBJDIR}



CVS commit: src

2010-03-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Mar  7 16:27:18 UTC 2010

Modified Files:
src/distrib/sets/lists/comp: mi
src/external/bsd/pcc/include: config.h
src/external/bsd/pcc/libexec/cpp: Makefile

Log Message:
Install PCC cpp as libexec/pcpp to avoid name conflicts with other
compilers (eg GCC), and to match the manpage which is already installed
as pcpp.1

(Gregory McGarry: I think it's a good idea)


To generate a diff of this commit:
cvs rdiff -u -r1.1403 -r1.1404 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/include/config.h
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pcc/libexec/cpp/Makefile

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

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 20:59:07 UTC 2010

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

Log Message:
add details of Option N.V. Wireless WAN modems for uhso(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.544 -r1.545 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/sys/dev/usb

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 20:59:07 UTC 2010

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

Log Message:
add details of Option N.V. Wireless WAN modems for uhso(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.544 -r1.545 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.544 src/sys/dev/usb/usbdevs:1.545
--- src/sys/dev/usb/usbdevs:1.544	Fri Feb 19 13:55:51 2010
+++ src/sys/dev/usb/usbdevs	Sat Mar  6 20:59:07 2010
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.544 2010/02/19 13:55:51 pooka Exp $
+$NetBSD: usbdevs,v 1.545 2010/03/06 20:59:07 plunky Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -1793,7 +1793,24 @@
 product OPTIONNV QUADUMTS	0x6300	GlobeTrotter Fusion Quad Lite 3D
 product OPTIONNV QUADPLUSUMTS	0x6600	GlobeTrotter 3G Quad Plus
 product OPTIONNV HSDPA   	0x6701	GlobeTrotter HSDPA Modem
+product OPTIONNV MAXHSDPA   	0x6701	GlobeTrotter Max HSDPA Modem
+product OPTIONNV GSICON72	0x6911	GlobeSurfer iCON 7.2
+product OPTIONNV ICON225	0x6971	iCON 225
 product OPTIONNV GTMAXHSUPA	0x7001	GlobeTrotter HSUPA
+product OPTIONNV GEHSUPA	0x7011	GlobeTrotter Express HSUPA
+product OPTIONNV GTHSUPA	0x7031	GlobeTrotter HSUPA
+product OPTIONNV GSHSUPA	0x7251	GlobeSurfer HSUPA
+product OPTIONNV GE40X1		0x7301	GE40x
+product OPTIONNV GE40X2		0x7361	GE40x
+product OPTIONNV GE40X3		0x7381	GE40x
+product OPTIONNV ICON401	0x7401	iCON 401
+product OPTIONNV GTM382		0x7501	GTM 382
+product OPTIONNV GE40X4		0x7601	GE40x
+product OPTIONNV ICONEDGE	0xc031	iCON EDGE
+product OPTIONNV MODHSXPA	0xd013	Module HSxPA
+product OPTIONNV ICON321	0xd031	iCON 321
+product OPTIONNV ICON322	0xd033	iCON 322
+product OPTIONNV ICON505	0xd055	iCON 505
 
 /* OQO */
 product OQO WIFI01		0x0002	model 01 WiFi interface



CVS commit: src/sys/dev/usb

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:00:07 UTC 2010

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

Log Message:
regen for uhso(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.539 -r1.540 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.540 -r1.541 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

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:00:07 UTC 2010

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

Log Message:
regen for uhso(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.539 -r1.540 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.540 -r1.541 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.

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.539 src/sys/dev/usb/usbdevs.h:1.540
--- src/sys/dev/usb/usbdevs.h:1.539	Fri Feb 19 13:56:39 2010
+++ src/sys/dev/usb/usbdevs.h	Sat Mar  6 21:00:07 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.539 2010/02/19 13:56:39 pooka Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.540 2010/03/06 21:00:07 plunky Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.544 2010/02/19 13:55:51 pooka Exp
+ *	NetBSD: usbdevs,v 1.545 2010/03/06 20:59:07 plunky Exp
  */
 
 /*
@@ -1800,7 +1800,24 @@
 #define	USB_PRODUCT_OPTIONNV_QUADUMTS	0x6300		/* GlobeTrotter Fusion Quad Lite 3D */
 #define	USB_PRODUCT_OPTIONNV_QUADPLUSUMTS	0x6600		/* GlobeTrotter 3G Quad Plus */
 #define	USB_PRODUCT_OPTIONNV_HSDPA	0x6701		/* GlobeTrotter HSDPA Modem */
+#define	USB_PRODUCT_OPTIONNV_MAXHSDPA	0x6701		/* GlobeTrotter Max HSDPA Modem */
+#define	USB_PRODUCT_OPTIONNV_GSICON72	0x6911		/* GlobeSurfer iCON 7.2 */
+#define	USB_PRODUCT_OPTIONNV_ICON225	0x6971		/* iCON 225 */
 #define	USB_PRODUCT_OPTIONNV_GTMAXHSUPA	0x7001		/* GlobeTrotter HSUPA */
+#define	USB_PRODUCT_OPTIONNV_GEHSUPA	0x7011		/* GlobeTrotter Express HSUPA */
+#define	USB_PRODUCT_OPTIONNV_GTHSUPA	0x7031		/* GlobeTrotter HSUPA */
+#define	USB_PRODUCT_OPTIONNV_GSHSUPA	0x7251		/* GlobeSurfer HSUPA */
+#define	USB_PRODUCT_OPTIONNV_GE40X1	0x7301		/* GE40x */
+#define	USB_PRODUCT_OPTIONNV_GE40X2	0x7361		/* GE40x */
+#define	USB_PRODUCT_OPTIONNV_GE40X3	0x7381		/* GE40x */
+#define	USB_PRODUCT_OPTIONNV_ICON401	0x7401		/* iCON 401 */
+#define	USB_PRODUCT_OPTIONNV_GTM382	0x7501		/* GTM 382 */
+#define	USB_PRODUCT_OPTIONNV_GE40X4	0x7601		/* GE40x */
+#define	USB_PRODUCT_OPTIONNV_ICONEDGE	0xc031		/* iCON EDGE */
+#define	USB_PRODUCT_OPTIONNV_MODHSXPA	0xd013		/* Module HSxPA */
+#define	USB_PRODUCT_OPTIONNV_ICON321	0xd031		/* iCON 321 */
+#define	USB_PRODUCT_OPTIONNV_ICON322	0xd033		/* iCON 322 */
+#define	USB_PRODUCT_OPTIONNV_ICON505	0xd055		/* iCON 505 */
 
 /* OQO */
 #define	USB_PRODUCT_OQO_WIFI01	0x0002		/* model 01 WiFi interface */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.540 src/sys/dev/usb/usbdevs_data.h:1.541
--- src/sys/dev/usb/usbdevs_data.h:1.540	Fri Feb 19 13:56:39 2010
+++ src/sys/dev/usb/usbdevs_data.h	Sat Mar  6 21:00:07 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.540 2010/02/19 13:56:39 pooka Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.541 2010/03/06 21:00:07 plunky Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.544 2010/02/19 13:55:51 pooka Exp
+ *	NetBSD: usbdevs,v 1.545 2010/03/06 20:59:07 plunky Exp
  */
 
 /*
@@ -5271,10 +5271,78 @@
 	GlobeTrotter HSDPA Modem,
 	},
 	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_MAXHSDPA,
+	GlobeTrotter Max HSDPA Modem,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GSICON72,
+	GlobeSurfer iCON 7.2,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_ICON225,
+	iCON 225,
+	},
+	{
 	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GTMAXHSUPA,
 	GlobeTrotter HSUPA,
 	},
 	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GEHSUPA,
+	GlobeTrotter Express HSUPA,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GTHSUPA,
+	GlobeTrotter HSUPA,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GSHSUPA,
+	GlobeSurfer HSUPA,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GE40X1,
+	GE40x,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GE40X2,
+	GE40x,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GE40X3,
+	GE40x,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_ICON401,
+	iCON 401,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GTM382,
+	GTM 382,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_GE40X4,
+	GE40x,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_ICONEDGE,
+	iCON EDGE,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_MODHSXPA,
+	Module HSxPA,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_ICON321,
+	iCON 321,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_ICON322,
+	iCON 322,
+	},
+	{
+	USB_VENDOR_OPTIONNV, USB_PRODUCT_OPTIONNV_ICON505,
+	iCON 505,
+	},
+	{
 	USB_VENDOR_OQO, USB_PRODUCT_OQO_WIFI01,
 	model 01 WiFi interface,
 	},
@@ -7071,4 +7139,4 @@
 	Prestige,
 	},
 };
-const int usb_nproducts = 1293;
+const int 

CVS commit: src

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:05:37 UTC 2010

Modified Files:
src/distrib/sets/lists/man: mi
src/etc: MAKEDEV.tmpl
src/share/man/man4: Makefile
src/sys/dev: DEVNAMES
src/sys/dev/usb: files.usb
Added Files:
src/share/man/man4: uhso.4
src/sys/dev/usb: uhso.c

Log Message:
Add uhso(4) driver and manpage for Option N.V. Wireless WAN modems


To generate a diff of this commit:
cvs rdiff -u -r1.1195 -r1.1196 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.130 -r1.131 src/etc/MAKEDEV.tmpl
cvs rdiff -u -r1.509 -r1.510 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/uhso.4
cvs rdiff -u -r1.256 -r1.257 src/sys/dev/DEVNAMES
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/usb/files.usb
cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/uhso.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

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:07:47 UTC 2010

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

Log Message:
add UHSO_DEBUG for uhso(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/usb/usb.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/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.83 src/sys/dev/usb/usb.h:1.84
--- src/sys/dev/usb/usb.h:1.83	Fri Sep  4 17:55:48 2009
+++ src/sys/dev/usb/usb.h	Sat Mar  6 21:07:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.83 2009/09/04 17:55:48 dyoung Exp $	*/
+/*	$NetBSD: usb.h,v 1.84 2010/03/06 21:07:47 plunky Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -88,6 +88,7 @@
 #define AXE_DEBUG 1
 #define UIPAQ_DEBUG 1
 #define UCYCOM_DEBUG 1
+#define UHSO_DEBUG 1
 #define Static
 #else
 #define Static static



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

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:12:04 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL GENERIC XBOX XEN3_DOM0 majors.i386

Log Message:
add uhso(4)


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.972 -r1.973 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/conf/XBOX
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/i386/conf/majors.i386

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

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.248 src/sys/arch/i386/conf/ALL:1.249
--- src/sys/arch/i386/conf/ALL:1.248	Thu Mar  4 22:30:57 2010
+++ src/sys/arch/i386/conf/ALL	Sat Mar  6 21:12:04 2010
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.248 2010/03/04 22:30:57 jruoho Exp $
+# $NetBSD: ALL,v 1.249 2010/03/06 21:12:04 plunky Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.248 $
+#ident 		ALL-$Revision: 1.249 $
 
 maxusers	64		# estimated number of users
 
@@ -1200,6 +1200,9 @@
 umodem* at uhub? port ? configuration ?
 ucom*	at umodem?
 
+# Option N.V. Wireless WAN modems
+uhso*	at uhub? port ? configuration ?
+
 # USB Mass Storage
 umass*	at uhub? port ? configuration ? interface ?
 wd*	at umass?

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.972 src/sys/arch/i386/conf/GENERIC:1.973
--- src/sys/arch/i386/conf/GENERIC:1.972	Sat Mar  6 04:28:53 2010
+++ src/sys/arch/i386/conf/GENERIC	Sat Mar  6 21:12:04 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.972 2010/03/06 04:28:53 cnst Exp $
+# $NetBSD: GENERIC,v 1.973 2010/03/06 21:12:04 plunky Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.972 $
+#ident 		GENERIC-$Revision: 1.973 $
 
 maxusers	64		# estimated number of users
 
@@ -1146,6 +1146,9 @@
 umodem* at uhub? port ? configuration ?
 ucom*	at umodem?
 
+# Option N.V. Wireless WAN modems
+uhso*	at uhub? port ? configuration ?
+
 # USB Mass Storage
 umass*	at uhub? port ? configuration ? interface ?
 wd*	at umass?

Index: src/sys/arch/i386/conf/XBOX
diff -u src/sys/arch/i386/conf/XBOX:1.20 src/sys/arch/i386/conf/XBOX:1.21
--- src/sys/arch/i386/conf/XBOX:1.20	Thu Jan  7 18:49:30 2010
+++ src/sys/arch/i386/conf/XBOX	Sat Mar  6 21:12:04 2010
@@ -1,4 +1,4 @@
-# $NetBSD: XBOX,v 1.20 2010/01/07 18:49:30 tnn Exp $
+# $NetBSD: XBOX,v 1.21 2010/03/06 21:12:04 plunky Exp $
 #
 # XBOX -- A basic Microsoft XBox kernel config file.
 #
@@ -203,6 +203,9 @@
 umodem* at uhub? port ? configuration ?
 ucom*	at umodem?
 
+# Option N.V. Wireless WAN modems
+uhso*	at uhub? port ? configuration ?
+
 # USB Mass Storage
 umass*	at uhub? port ? configuration ? interface ?
 wd*	at umass?

Index: src/sys/arch/i386/conf/XEN3_DOM0
diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.30 src/sys/arch/i386/conf/XEN3_DOM0:1.31
--- src/sys/arch/i386/conf/XEN3_DOM0:1.30	Sat Mar  6 04:33:24 2010
+++ src/sys/arch/i386/conf/XEN3_DOM0	Sat Mar  6 21:12:04 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: XEN3_DOM0,v 1.30 2010/03/06 04:33:24 cnst Exp $
+#	$NetBSD: XEN3_DOM0,v 1.31 2010/03/06 21:12:04 plunky Exp $
 #
 #	XEN3_0: Xen 3.0 domain0 kernel
 
@@ -555,6 +555,9 @@
 umodem* at uhub? port ? configuration ?
 ucom*   at umodem?
 
+# Option N.V. Wireless WAN modems
+uhso*	at uhub? port ? configuration ?
+
 # USB Mass Storage
 umass*  at uhub? port ? configuration ? interface ?
 wd* at umass?

Index: src/sys/arch/i386/conf/majors.i386
diff -u src/sys/arch/i386/conf/majors.i386:1.37 src/sys/arch/i386/conf/majors.i386:1.38
--- src/sys/arch/i386/conf/majors.i386:1.37	Wed Nov 12 12:36:02 2008
+++ src/sys/arch/i386/conf/majors.i386	Sat Mar  6 21:12:04 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.i386,v 1.37 2008/11/12 12:36:02 ad Exp $
+#	$NetBSD: majors.i386,v 1.38 2010/03/06 21:12:04 plunky Exp $
 #
 # Device majors for i386
 #
@@ -104,6 +104,7 @@
 device-major	rd		char 105 block 22	rd
 device-major	ct		char 106 block 23	ct
 device-major	mt		char 107 block 24	mt
+device-major	uhso		char 108		uhso
 
 #
 # Device majors for Xen. These are assigned here so that:



CVS commit: src/doc

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:15:17 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
add uhso(4) driver for Option N.V. Wireless WAN modems


To generate a diff of this commit:
cvs rdiff -u -r1.1367 -r1.1368 src/doc/CHANGES

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



CVS commit: src/doc

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:15:17 UTC 2010

Modified Files:
src/doc: CHANGES

Log Message:
add uhso(4) driver for Option N.V. Wireless WAN modems


To generate a diff of this commit:
cvs rdiff -u -r1.1367 -r1.1368 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1367 src/doc/CHANGES:1.1368
--- src/doc/CHANGES:1.1367	Thu Mar  4 15:47:12 2010
+++ src/doc/CHANGES	Sat Mar  6 21:15:17 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1367 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1368 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -562,3 +562,5 @@
 	ld.so_elf: Implement negative symbol lookup cache [roy 20100227]	  
 	dhcpcd(8): Import dhcpcd-5.2.1. [roy 20100227]
 	ne(4): Add proper support for NE2000 8 bit mode. [tsutsui 20090303]
+	uhso(4): Add a driver for Option N.V. Wireless WAN modems.
+		[plunky 20100306]



CVS commit: src/sys/arch

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:31:52 UTC 2010

Modified Files:
src/sys/arch/algor/conf: majors.algor
src/sys/arch/alpha/conf: majors.alpha
src/sys/arch/amd64/conf: majors.amd64
src/sys/arch/arm/conf: majors.arm32
src/sys/arch/cobalt/conf: majors.cobalt
src/sys/arch/evbmips/conf: majors.evbmips
src/sys/arch/evbppc/conf: majors.evbppc
src/sys/arch/hpcarm/conf: majors.hpcarm
src/sys/arch/hpcmips/conf: majors.hpcmips
src/sys/arch/ia64/conf: majors.ia64
src/sys/arch/landisk/conf: majors.landisk
src/sys/arch/powerpc/conf: majors.powerpc
src/sys/arch/sgimips/conf: majors.sgimips
src/sys/arch/sparc/conf: majors.sparc
src/sys/arch/sparc64/conf: majors.sparc64
src/sys/arch/x68k/conf: majors.x68k
src/sys/arch/zaurus/conf: majors.zaurus

Log Message:
add major device for usho(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/algor/conf/majors.algor
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/conf/majors.alpha
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/conf/majors.amd64
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/conf/majors.arm32
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cobalt/conf/majors.cobalt
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbmips/conf/majors.evbmips
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbppc/conf/majors.evbppc
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hpcarm/conf/majors.hpcarm
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/conf/majors.ia64
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/conf/majors.landisk
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/conf/majors.powerpc
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sgimips/conf/majors.sgimips
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc/conf/majors.sparc
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc64/conf/majors.sparc64
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x68k/conf/majors.x68k
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/conf/majors.zaurus

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/algor/conf/majors.algor
diff -u src/sys/arch/algor/conf/majors.algor:1.19 src/sys/arch/algor/conf/majors.algor:1.20
--- src/sys/arch/algor/conf/majors.algor:1.19	Wed Nov 12 12:35:55 2008
+++ src/sys/arch/algor/conf/majors.algor	Sat Mar  6 21:31:50 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.algor,v 1.19 2008/11/12 12:35:55 ad Exp $
+#	$NetBSD: majors.algor,v 1.20 2010/03/06 21:31:50 plunky Exp $
 #
 # Device majors for algor
 #
@@ -67,6 +67,7 @@
 device-major	ksyms		char 69			ksyms
 device-major	wsfont		char 70			wsfont
 device-major	nsmb		char 71			nsmb
+device-major	uhso		char 72			uhso
 
 # Majors up to 143 are reserved for machine-dependant drivers.
 # New machine-independent driver majors are assigned in 

Index: src/sys/arch/alpha/conf/majors.alpha
diff -u src/sys/arch/alpha/conf/majors.alpha:1.23 src/sys/arch/alpha/conf/majors.alpha:1.24
--- src/sys/arch/alpha/conf/majors.alpha:1.23	Wed Nov 12 12:35:56 2008
+++ src/sys/arch/alpha/conf/majors.alpha	Sat Mar  6 21:31:51 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.alpha,v 1.23 2008/11/12 12:35:56 ad Exp $
+#	$NetBSD: majors.alpha,v 1.24 2010/03/06 21:31:51 plunky Exp $
 #
 # Device majors for alpha
 #
@@ -76,6 +76,7 @@
 device-major	nsmb		char 77			nsmb
 device-major	joy		char 78			joy
 device-major	twe		char 79			twe
+device-major	uhso		char 80			uhso
 
 # Majors up to 143 are reserved for machine-dependant drivers.
 # New machine-independent driver majors are assigned in 

Index: src/sys/arch/amd64/conf/majors.amd64
diff -u src/sys/arch/amd64/conf/majors.amd64:1.21 src/sys/arch/amd64/conf/majors.amd64:1.22
--- src/sys/arch/amd64/conf/majors.amd64:1.21	Wed Nov 12 12:35:56 2008
+++ src/sys/arch/amd64/conf/majors.amd64	Sat Mar  6 21:31:51 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.amd64,v 1.21 2008/11/12 12:35:56 ad Exp $
+#	$NetBSD: majors.amd64,v 1.22 2010/03/06 21:31:51 plunky Exp $
 #
 # Device majors for amd64
 #
@@ -89,6 +89,7 @@
 device-major	dpt		char 96			dpt
 device-major	twe		char 97			twe
 device-major	nsmb		char 98			nsmb		
+device-major	uhso		char 99			uhso
 
 #
 # Device majors for Xen. These are assigned here so that:

Index: src/sys/arch/arm/conf/majors.arm32
diff -u src/sys/arch/arm/conf/majors.arm32:1.29 src/sys/arch/arm/conf/majors.arm32:1.30
--- src/sys/arch/arm/conf/majors.arm32:1.29	Wed Nov 12 12:35:57 2008
+++ src/sys/arch/arm/conf/majors.arm32	Sat Mar  6 21:31:51 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.arm32,v 1.29 2008/11/12 12:35:57 ad Exp $
+#	$NetBSD: majors.arm32,v 1.30 2010/03/06 21:31:51 plunky Exp $
 #
 # Device majors for arm32
 #
@@ -103,6 +103,7 @@
 device-major	tslcd		char 108		tslcd
 device-major	twe		char 109  		twe
 device-major	nsmb		char 110		nsmb
+device-major	uhso		char 111		uhso
 
 # Majors up to 143 are 

CVS commit: src/sys/arch

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:31:52 UTC 2010

Modified Files:
src/sys/arch/algor/conf: majors.algor
src/sys/arch/alpha/conf: majors.alpha
src/sys/arch/amd64/conf: majors.amd64
src/sys/arch/arm/conf: majors.arm32
src/sys/arch/cobalt/conf: majors.cobalt
src/sys/arch/evbmips/conf: majors.evbmips
src/sys/arch/evbppc/conf: majors.evbppc
src/sys/arch/hpcarm/conf: majors.hpcarm
src/sys/arch/hpcmips/conf: majors.hpcmips
src/sys/arch/ia64/conf: majors.ia64
src/sys/arch/landisk/conf: majors.landisk
src/sys/arch/powerpc/conf: majors.powerpc
src/sys/arch/sgimips/conf: majors.sgimips
src/sys/arch/sparc/conf: majors.sparc
src/sys/arch/sparc64/conf: majors.sparc64
src/sys/arch/x68k/conf: majors.x68k
src/sys/arch/zaurus/conf: majors.zaurus

Log Message:
add major device for usho(4) driver


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/algor/conf/majors.algor
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/conf/majors.alpha
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/conf/majors.amd64
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/conf/majors.arm32
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cobalt/conf/majors.cobalt
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbmips/conf/majors.evbmips
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbppc/conf/majors.evbppc
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hpcarm/conf/majors.hpcarm
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/conf/majors.ia64
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/landisk/conf/majors.landisk
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/conf/majors.powerpc
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sgimips/conf/majors.sgimips
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc/conf/majors.sparc
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc64/conf/majors.sparc64
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x68k/conf/majors.x68k
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/conf/majors.zaurus

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



CVS commit: src/etc

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 21:33:20 UTC 2010

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
include ttyHS0 in usbs target [for uhso(4)]


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/etc/MAKEDEV.tmpl

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



CVS commit: src/sys

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 23:45:40 UTC 2010

Modified Files:
src/sys/arch/algor/conf: majors.algor
src/sys/arch/alpha/conf: majors.alpha
src/sys/arch/amd64/conf: majors.amd64
src/sys/arch/arm/conf: majors.arm32
src/sys/arch/cobalt/conf: majors.cobalt
src/sys/arch/evbmips/conf: majors.evbmips
src/sys/arch/evbppc/conf: majors.evbppc
src/sys/arch/hpcarm/conf: majors.hpcarm
src/sys/arch/hpcmips/conf: majors.hpcmips
src/sys/arch/i386/conf: majors.i386
src/sys/arch/ia64/conf: majors.ia64
src/sys/arch/landisk/conf: majors.landisk
src/sys/arch/powerpc/conf: majors.powerpc
src/sys/arch/sgimips/conf: majors.sgimips
src/sys/arch/sparc/conf: majors.sparc
src/sys/arch/sparc64/conf: majors.sparc64
src/sys/arch/x68k/conf: majors.x68k
src/sys/arch/zaurus/conf: majors.zaurus
src/sys/conf: majors

Log Message:
use a MI major number for uhso(4) driver
(requested by mrg)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/algor/conf/majors.algor
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/alpha/conf/majors.alpha
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/conf/majors.amd64
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/conf/majors.arm32
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/cobalt/conf/majors.cobalt
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbmips/conf/majors.evbmips
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbppc/conf/majors.evbppc
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcarm/conf/majors.hpcarm
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/i386/conf/majors.i386
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/conf/majors.ia64
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/landisk/conf/majors.landisk
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/conf/majors.powerpc
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sgimips/conf/majors.sgimips
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/conf/majors.sparc
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc64/conf/majors.sparc64
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x68k/conf/majors.x68k
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/zaurus/conf/majors.zaurus
cvs rdiff -u -r1.47 -r1.48 src/sys/conf/majors

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/algor/conf/majors.algor
diff -u src/sys/arch/algor/conf/majors.algor:1.20 src/sys/arch/algor/conf/majors.algor:1.21
--- src/sys/arch/algor/conf/majors.algor:1.20	Sat Mar  6 21:31:50 2010
+++ src/sys/arch/algor/conf/majors.algor	Sat Mar  6 23:45:38 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.algor,v 1.20 2010/03/06 21:31:50 plunky Exp $
+#	$NetBSD: majors.algor,v 1.21 2010/03/06 23:45:38 plunky Exp $
 #
 # Device majors for algor
 #
@@ -67,7 +67,6 @@
 device-major	ksyms		char 69			ksyms
 device-major	wsfont		char 70			wsfont
 device-major	nsmb		char 71			nsmb
-device-major	uhso		char 72			uhso
 
 # Majors up to 143 are reserved for machine-dependant drivers.
 # New machine-independent driver majors are assigned in 

Index: src/sys/arch/alpha/conf/majors.alpha
diff -u src/sys/arch/alpha/conf/majors.alpha:1.24 src/sys/arch/alpha/conf/majors.alpha:1.25
--- src/sys/arch/alpha/conf/majors.alpha:1.24	Sat Mar  6 21:31:51 2010
+++ src/sys/arch/alpha/conf/majors.alpha	Sat Mar  6 23:45:39 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.alpha,v 1.24 2010/03/06 21:31:51 plunky Exp $
+#	$NetBSD: majors.alpha,v 1.25 2010/03/06 23:45:39 plunky Exp $
 #
 # Device majors for alpha
 #
@@ -76,7 +76,6 @@
 device-major	nsmb		char 77			nsmb
 device-major	joy		char 78			joy
 device-major	twe		char 79			twe
-device-major	uhso		char 80			uhso
 
 # Majors up to 143 are reserved for machine-dependant drivers.
 # New machine-independent driver majors are assigned in 

Index: src/sys/arch/amd64/conf/majors.amd64
diff -u src/sys/arch/amd64/conf/majors.amd64:1.22 src/sys/arch/amd64/conf/majors.amd64:1.23
--- src/sys/arch/amd64/conf/majors.amd64:1.22	Sat Mar  6 21:31:51 2010
+++ src/sys/arch/amd64/conf/majors.amd64	Sat Mar  6 23:45:39 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.amd64,v 1.22 2010/03/06 21:31:51 plunky Exp $
+#	$NetBSD: majors.amd64,v 1.23 2010/03/06 23:45:39 plunky Exp $
 #
 # Device majors for amd64
 #
@@ -89,7 +89,6 @@
 device-major	dpt		char 96			dpt
 device-major	twe		char 97			twe
 device-major	nsmb		char 98			nsmb		
-device-major	uhso		char 99			uhso
 
 #
 # Device majors for Xen. These are assigned here so that:

Index: src/sys/arch/arm/conf/majors.arm32
diff -u src/sys/arch/arm/conf/majors.arm32:1.30 src/sys/arch/arm/conf/majors.arm32:1.31
--- src/sys/arch/arm/conf/majors.arm32:1.30	Sat Mar  6 21:31:51 2010
+++ src/sys/arch/arm/conf/majors.arm32	Sat Mar  6 23:45:39 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.arm32,v 1.30 2010/03/06 21:31:51 plunky Exp $
+#	$NetBSD: majors.arm32,v 1.31 2010/03/06 23:45:39 plunky Exp $
 #

CVS commit: src/sys

2010-03-06 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sat Mar  6 23:45:40 UTC 2010

Modified Files:
src/sys/arch/algor/conf: majors.algor
src/sys/arch/alpha/conf: majors.alpha
src/sys/arch/amd64/conf: majors.amd64
src/sys/arch/arm/conf: majors.arm32
src/sys/arch/cobalt/conf: majors.cobalt
src/sys/arch/evbmips/conf: majors.evbmips
src/sys/arch/evbppc/conf: majors.evbppc
src/sys/arch/hpcarm/conf: majors.hpcarm
src/sys/arch/hpcmips/conf: majors.hpcmips
src/sys/arch/i386/conf: majors.i386
src/sys/arch/ia64/conf: majors.ia64
src/sys/arch/landisk/conf: majors.landisk
src/sys/arch/powerpc/conf: majors.powerpc
src/sys/arch/sgimips/conf: majors.sgimips
src/sys/arch/sparc/conf: majors.sparc
src/sys/arch/sparc64/conf: majors.sparc64
src/sys/arch/x68k/conf: majors.x68k
src/sys/arch/zaurus/conf: majors.zaurus
src/sys/conf: majors

Log Message:
use a MI major number for uhso(4) driver
(requested by mrg)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/algor/conf/majors.algor
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/alpha/conf/majors.alpha
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/conf/majors.amd64
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/conf/majors.arm32
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/cobalt/conf/majors.cobalt
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbmips/conf/majors.evbmips
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbppc/conf/majors.evbppc
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcarm/conf/majors.hpcarm
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/i386/conf/majors.i386
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/conf/majors.ia64
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/landisk/conf/majors.landisk
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/conf/majors.powerpc
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sgimips/conf/majors.sgimips
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/conf/majors.sparc
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc64/conf/majors.sparc64
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x68k/conf/majors.x68k
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/zaurus/conf/majors.zaurus
cvs rdiff -u -r1.47 -r1.48 src/sys/conf/majors

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

2010-02-24 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Feb 24 17:00:25 UTC 2010

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

Log Message:
use # for include directive, just because..


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/if_cue.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/btattach

2010-02-17 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Feb 17 09:49:41 UTC 2010

Modified Files:
src/usr.sbin/btattach: btattach.c

Log Message:
sort entries in structure
clarify init name type for CSR modules


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/btattach/btattach.c

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



CVS commit: src/external/bsd/pcc

2010-02-11 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Feb 11 14:36:32 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc

Log Message:
actually include the top-level Makefile.inc


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/pcc/Makefile.inc

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



CVS commit: src/sbin/mount_smbfs

2010-02-07 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Feb  8 07:56:06 UTC 2010

Modified Files:
src/sbin/mount_smbfs: Makefile.inc

Log Message:
use

.if defined(HAVE_GCC)  ${HAVE_GCC} == 4

rather than

.if ${HAVE_GCC} == 4

as HAVE_GCC may be undefined


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/mount_smbfs/Makefile.inc

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



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:41:14 UTC 2010

Modified Files:
src/external/bsd/pcc/lib: Makefile.inc
src/external/bsd/pcc/libexec: Makefile.inc
src/external/bsd/pcc/usr.bin: Makefile.inc

Log Message:
don't conditionally include the Makefile.inc, we need the BINDIR etc
definitions for installation


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/lib/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/libexec/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/pcc/usr.bin/Makefile.inc

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



CVS commit: src/external/bsd/pcc/lib

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:46:26 UTC 2010

Modified Files:
src/external/bsd/pcc/lib: Makefile
Removed Files:
src/external/bsd/pcc/lib/crtstuff: Makefile

Log Message:
don't build and install the crtbegin.o and crtend.o files at this stage,
they conflict with the system provided ones (lib/csu) and cause problems.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pcc/lib/Makefile
cvs rdiff -u -r1.2 -r0 src/external/bsd/pcc/lib/crtstuff/Makefile

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



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 08:52:25 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc config.h

Log Message:
just use the actual date in PACKAGE_CHECKOUT definition


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/Makefile.inc
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pcc/config.h

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



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 17:18:31 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc config.h

Log Message:
when making VERSSTR, provide the target os/machine rather than the host.
have the CVS checkout date in the PACKAGE_STRING rather than in a separate
definition


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/pcc/Makefile.inc \
src/external/bsd/pcc/config.h

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



CVS commit: src/external/bsd/pcc

2010-02-05 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Feb  5 18:41:25 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc

Log Message:
amd64 provides MACHINE_ARCH=x86_64 but pcc wants TARGMACH=amd64. handle that


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pcc/Makefile.inc

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



CVS commit: src/distrib/sets

2010-02-04 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Feb  4 13:07:55 UTC 2010

Modified Files:
src/distrib/sets: sets.subr

Log Message:
add note of pcc and pcccmds attributes


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/distrib/sets/sets.subr

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



CVS commit: src/external/bsd/pcc/libexec/cpp

2010-02-03 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Feb  3 22:03:56 UTC 2010

Modified Files:
src/external/bsd/pcc/libexec/cpp: Makefile

Log Message:
Install the CPP manpage as pcpp(1) to avoid conflicts with the GCC version


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/pcc/libexec/cpp/Makefile

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



CVS commit: src/external/bsd/pcc

2010-02-03 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Wed Feb  3 22:13:13 UTC 2010

Modified Files:
src/external/bsd/pcc: Makefile.inc config.h

Log Message:
fix the embedded VERSSTR by providing the correct machine architecture
at build time, and adding an import date to the version.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/pcc/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/config.h

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



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

2010-01-22 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Fri Jan 22 11:08:40 UTC 2010

Modified Files:
src/external/bsd/pcc/dist/pcc/cc: Makefile.in
src/external/bsd/pcc/dist/pcc/f77: Makefile.in

Log Message:
execute lists of commands in sub-shells so that the cwd doesn't get
not changed between commands

(nbmake will execute all commands in the same context when given -j)

this allows HAVE_PCC=yes tools build to install the pcc files


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pcc/dist/pcc/cc/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/pcc/dist/pcc/f77/Makefile.in

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



CVS commit: src/etc/mtree

2010-01-18 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Jan 18 10:25:29 UTC 2010

Modified Files:
src/etc/mtree: Makefile

Log Message:
also clean up NetBSD.dist.tmp as if a second build is done without the
NetBSD.dist changing, the tmp file will remain.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/etc/mtree/Makefile

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



CVS commit: src/sys/netbt

2010-01-04 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Mon Jan  4 19:20:05 UTC 2010

Modified Files:
src/sys/netbt: l2cap_upper.c rfcomm_upper.c sco_upper.c

Log Message:
prevent local socket address from being changed after socket is
in use (connect or listen)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/netbt/l2cap_upper.c
cvs rdiff -u -r1.12 -r1.13 src/sys/netbt/rfcomm_upper.c
cvs rdiff -u -r1.8 -r1.9 src/sys/netbt/sco_upper.c

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