CVS commit: src/usr.bin/sort

2009-09-28 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Mon Sep 28 20:30:01 UTC 2009

Modified Files:
src/usr.bin/sort: files.c fsort.c sort.h

Log Message:
Fix borked fix for sort relying on realloc() changing the buffer end.
Sorts of more than 8MB data now probably work again.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/sort/files.c
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/sort/fsort.c
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/sort/sort.h

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

Modified files:

Index: src/usr.bin/sort/files.c
diff -u src/usr.bin/sort/files.c:1.38 src/usr.bin/sort/files.c:1.39
--- src/usr.bin/sort/files.c:1.38	Sat Sep 26 21:16:55 2009
+++ src/usr.bin/sort/files.c	Mon Sep 28 20:30:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: files.c,v 1.38 2009/09/26 21:16:55 dsl Exp $	*/
+/*	$NetBSD: files.c,v 1.39 2009/09/28 20:30:01 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 #include "fsort.h"
 
 #ifndef lint
-__RCSID("$NetBSD: files.c,v 1.38 2009/09/26 21:16:55 dsl Exp $");
+__RCSID("$NetBSD: files.c,v 1.39 2009/09/28 20:30:01 dsl Exp $");
 __SCCSID("@(#)files.c	8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -77,30 +77,36 @@
  * this is called when there is no special key. It's only called
  * in the first fsort pass.
  */
+
+static u_char *opos;
+static size_t osz;
+
+void
+makeline_copydown(RECHEADER *recbuf)
+{
+	memmove(recbuf->data, opos, osz);
+}
+
 int
 makeline(FILE *fp, RECHEADER *recbuf, u_char *bufend, struct field *dummy2)
 {
-	static u_char *opos = NULL;
-	static size_t osz;
 	u_char *pos;
 	int c;
 
 	pos = recbuf->data;
-	if (opos != NULL) {
+	if (osz != 0) {
 		/*
 		 * Buffer shortage is solved by either of two ways:
 		 * o flush previous buffered data and start using the
-		 *   buffer from start (see fsort())
-		 * o realloc buffer and bump bufend
+		 *   buffer from start.
+		 *   makeline_copydown() above must be called.
+		 * o realloc buffer
 		 * 
-		 * The former is preferred, realloc is only done when
-		 * there is exactly one item in buffer which does not fit. 
+		 * This code has relied on realloc changing 'bufend',
+		 * but that isn't necessarily true.
 		 */
-		if (pos != opos)
-			memmove(pos, opos, osz);
-
 		pos += osz;
-		opos = NULL;
+		osz = 0;
 	}
 
 	while (pos < bufend) {

Index: src/usr.bin/sort/fsort.c
diff -u src/usr.bin/sort/fsort.c:1.42 src/usr.bin/sort/fsort.c:1.43
--- src/usr.bin/sort/fsort.c:1.42	Sat Sep 26 21:16:55 2009
+++ src/usr.bin/sort/fsort.c	Mon Sep 28 20:30:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsort.c,v 1.42 2009/09/26 21:16:55 dsl Exp $	*/
+/*	$NetBSD: fsort.c,v 1.43 2009/09/28 20:30:01 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 #include "fsort.h"
 
 #ifndef lint
-__RCSID("$NetBSD: fsort.c,v 1.42 2009/09/26 21:16:55 dsl Exp $");
+__RCSID("$NetBSD: fsort.c,v 1.43 2009/09/28 20:30:01 dsl Exp $");
 __SCCSID("@(#)fsort.c	8.1 (Berkeley) 6/6/93");
 #endif /* not lint */
 
@@ -123,6 +123,7 @@
 		keypos = keylist;
 		nelem = 0;
 		crec = buffer;
+		makeline_copydown(crec);
 
 		/* Loop reading records */
 		for (;;) {

Index: src/usr.bin/sort/sort.h
diff -u src/usr.bin/sort/sort.h:1.29 src/usr.bin/sort/sort.h:1.30
--- src/usr.bin/sort/sort.h:1.29	Sat Sep 26 21:16:55 2009
+++ src/usr.bin/sort/sort.h	Mon Sep 28 20:30:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sort.h,v 1.29 2009/09/26 21:16:55 dsl Exp $	*/
+/*	$NetBSD: sort.h,v 1.30 2009/09/28 20:30:01 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
@@ -187,6 +187,7 @@
 int	 geteasy(FILE *, RECHEADER *, u_char *, struct field *);
 int	 makekey(FILE *, RECHEADER *, u_char *, struct field *);
 int	 makeline(FILE *, RECHEADER *, u_char *, struct field *);
+void	 makeline_copydown(RECHEADER *);
 int	 optval(int, int);
 void	 order(struct filelist *, struct field *);
 void	 putline(const RECHEADER *, FILE *);



CVS commit: [netbsd-5] src/doc

2009-09-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Sep 28 18:45:31 UTC 2009

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

Log Message:
Fix typo in ticket 1027 entry: domU -> dom0.


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

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.77 src/doc/CHANGES-5.1:1.1.2.78
--- src/doc/CHANGES-5.1:1.1.2.77	Mon Sep 28 02:17:23 2009
+++ src/doc/CHANGES-5.1	Mon Sep 28 18:45:31 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.77 2009/09/28 02:17:23 snj Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.78 2009/09/28 18:45:31 snj Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -13583,7 +13583,7 @@
 	Write a "feature-rx-notify" to the xenstore, which is used by
 	recent linux dom0 kernels. This reduces packet loss when using a
 	NetBSD domU on such linux dom0.
-	This entry is ignored by NetBSD and older linux domUs.
+	This entry is ignored by NetBSD and older linux dom0s.
 	[bouyer, ticket #1027]
 
 sys/kern/kern_turnstile.c			1.25 via patch



CVS commit: src/share/man/man9

2009-09-28 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Sep 28 18:28:59 UTC 2009

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

Log Message:
.Xs -> .Dq.

There's no such thing as ".Xs"; it was a typo for ".Sx".  However,
.Sx is intended for references to another section of the same man page,
not for references to sections of a different man page.


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

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

Modified files:

Index: src/share/man/man9/boothowto.9
diff -u src/share/man/man9/boothowto.9:1.4 src/share/man/man9/boothowto.9:1.5
--- src/share/man/man9/boothowto.9:1.4	Fri Sep 11 19:44:03 2009
+++ src/share/man/man9/boothowto.9	Mon Sep 28 18:28:59 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boothowto.9,v 1.4 2009/09/11 19:44:03 wiz Exp $
+.\"	$NetBSD: boothowto.9,v 1.5 2009/09/28 18:28:59 apb Exp $
 .\"
 .\" Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -152,7 +152,7 @@
 Gives control to a kernel debugger early in the boot sequence.
 See
 .Xr ddb 4 ,
-.Xs "options KGDB"
+.Dq "options KGDB"
 in
 .Xr options 4 ,
 .\" the kgdb_* functions are undocumented



CVS commit: src/share/man/man9

2009-09-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Sep 28 14:11:56 UTC 2009

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

Log Message:
Do not use a list in the synopsis, groff doesn't like that.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/ubc.9

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

Modified files:

Index: src/share/man/man9/ubc.9
diff -u src/share/man/man9/ubc.9:1.2 src/share/man/man9/ubc.9:1.3
--- src/share/man/man9/ubc.9:1.2	Mon Aug  3 19:18:27 2009
+++ src/share/man/man9/ubc.9	Mon Sep 28 14:11:56 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ubc.9,v 1.2 2009/08/03 19:18:27 rmind Exp $
+.\"	$NetBSD: ubc.9,v 1.3 2009/09/28 14:11:56 joerg Exp $
 .\"
 .\" Copyright (c) 1998 Matthew R. Green
 .\" All rights reserved.
@@ -32,16 +32,13 @@
 .Nd unified buffer cache
 .Sh SYNOPSIS
 .In uvm/uvm.h
-.Bl -ohang
-.It Ft void *
+.Ft void *
 .Fn ubc_alloc "struct uvm_object *uobj" "voff_t offset" "vsize_t *lenp" \
 "int advice" "int flags"
-.It Ft void
+.Ft void
 .Fn ubc_release "void *va" "int flags"
-.It Ft int
-.Fn ubc_uiomove "struct uvm_object *uobj" "struct uio *uio" "vsize_t todo" \
-"int advice" "int flags"
-.El
+.Ft int
+.Fn ubc_uiomove "struct uvm_object *uobj" "struct uio *uio" "vsize_t todo" "int advice" "int flags"
 .Sh DESCRIPTION
 .Fn ubc_alloc
 creates a kernel mapping of



CVS commit: src/sys/coda

2009-09-28 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Mon Sep 28 10:51:35 UTC 2009

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

Log Message:
Make file_id unsigned so it does not get sign extended when promoted
to a 64bit ino_t.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/coda/coda.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/coda/coda.h
diff -u src/sys/coda/coda.h:1.14 src/sys/coda/coda.h:1.15
--- src/sys/coda/coda.h:1.14	Sun Mar  4 06:01:11 2007
+++ src/sys/coda/coda.h	Mon Sep 28 10:51:35 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: coda.h,v 1.14 2007/03/04 06:01:11 christos Exp $ */
+/* $NetBSD: coda.h,v 1.15 2009/09/28 10:51:35 blymn Exp $ */
 
 /*
 
@@ -272,7 +272,7 @@
 	short		va_nlink;	/* number of references to file */
 	uid_t		va_uid;		/* owner user id */
 	gid_t		va_gid;		/* owner group id */
-	long		va_fileid;	/* file id */
+	u_long		va_fileid;	/* file id */
 	u_quad_t	va_size;	/* file size in bytes */
 	long		va_blocksize;	/* blocksize preferred for i/o */
 	struct timespec	va_atime;	/* time of last access */



CVS commit: src/sys/dev/usb

2009-09-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Sep 28 10:22:07 UTC 2009

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

Log Message:
Attach DWA-111.

XXX: Adapter seems to be generally functional, but at least on -nb5
WPA didn't work very well (managed to get authenticated and sometimes
an address via dhcp, but that's it).  I can't currently test non-wpa
networks, so don't know if it's an issue only with wpa or with the
connectivity in general.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_rum.c

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

Modified files:

Index: src/sys/dev/usb/if_rum.c
diff -u src/sys/dev/usb/if_rum.c:1.28 src/sys/dev/usb/if_rum.c:1.29
--- src/sys/dev/usb/if_rum.c:1.28	Wed Sep 23 19:07:19 2009
+++ src/sys/dev/usb/if_rum.c	Mon Sep 28 10:22:07 2009
@@ -1,5 +1,5 @@
 /*	$OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $	*/
-/*	$NetBSD: if_rum.c,v 1.28 2009/09/23 19:07:19 plunky Exp $	*/
+/*	$NetBSD: if_rum.c,v 1.29 2009/09/28 10:22:07 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2005-2007 Damien Bergamini 
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.28 2009/09/23 19:07:19 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.29 2009/09/28 10:22:07 pooka Exp $");
 
 #include "bpfilter.h"
 
@@ -107,6 +107,7 @@
 	{ USB_VENDOR_DICKSMITH,		USB_PRODUCT_DICKSMITH_RT2573 },
 	{ USB_VENDOR_DLINK2,		USB_PRODUCT_DLINK2_DWLG122C1 },
 	{ USB_VENDOR_DLINK2,		USB_PRODUCT_DLINK2_WUA1340 },
+	{ USB_VENDOR_DLINK2,		USB_PRODUCT_DLINK2_DWA111 },
 	{ USB_VENDOR_GIGABYTE,		USB_PRODUCT_GIGABYTE_GNWB01GS },
 	{ USB_VENDOR_GIGABYTE,		USB_PRODUCT_GIGABYTE_GNWI05GS },
 	{ USB_VENDOR_GIGASET,		USB_PRODUCT_GIGASET_RT2573 },



CVS commit: src/sys/dev/usb

2009-09-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Sep 28 10:18:05 UTC 2009

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

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.526 -r1.527 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.527 -r1.528 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.526 src/sys/dev/usb/usbdevs.h:1.527
--- src/sys/dev/usb/usbdevs.h:1.526	Sun Aug  2 20:53:41 2009
+++ src/sys/dev/usb/usbdevs.h	Mon Sep 28 10:18:04 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.526 2009/08/02 20:53:41 tshiozak Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.527 2009/09/28 10:18:04 pooka Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.531 2009/08/02 20:52:26 tshiozak Exp
+ *	NetBSD: usbdevs,v 1.532 2009/09/28 10:16:30 pooka Exp
  */
 
 /*
@@ -970,6 +970,7 @@
 #define	USB_PRODUCT_DLINK2_DWLG122C1	0x3c03		/* DWL-G122 rev C1 */
 #define	USB_PRODUCT_DLINK2_WUA1340	0x3c04		/* WUA-1340 */
 #define	USB_PRODUCT_DLINK_DUBE100B1	0x3c05		/* DUB-E100 rev B1 */
+#define	USB_PRODUCT_DLINK2_DWA111	0x3c06		/* DWA-111 */
 #define	USB_PRODUCT_DLINK_DSB650C	0x4000		/* 10Mbps ethernet adapter */
 #define	USB_PRODUCT_DLINK_DSB650TX1	0x4001		/* 10/100 ethernet adapter */
 #define	USB_PRODUCT_DLINK_DSB650TX	0x4002		/* 10/100 ethernet adapter */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.527 src/sys/dev/usb/usbdevs_data.h:1.528
--- src/sys/dev/usb/usbdevs_data.h:1.527	Sun Aug  2 20:53:41 2009
+++ src/sys/dev/usb/usbdevs_data.h	Mon Sep 28 10:18:04 2009
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.527 2009/08/02 20:53:41 tshiozak Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.528 2009/09/28 10:18:04 pooka Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.531 2009/08/02 20:52:26 tshiozak Exp
+ *	NetBSD: usbdevs,v 1.532 2009/09/28 10:16:30 pooka Exp
  */
 
 /*
@@ -2975,6 +2975,10 @@
 	"DUB-E100 rev B1",
 	},
 	{
+	USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA111,
+	"DWA-111",
+	},
+	{
 	USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650C,
 	"10Mbps ethernet adapter",
 	},
@@ -6919,4 +6923,4 @@
 	"Prestige",
 	},
 };
-const int usb_nproducts = 1260;
+const int usb_nproducts = 1261;



CVS commit: src/sys/dev/usb

2009-09-28 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Sep 28 10:16:30 UTC 2009

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

Log Message:
+DWA-111


To generate a diff of this commit:
cvs rdiff -u -r1.531 -r1.532 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.531 src/sys/dev/usb/usbdevs:1.532
--- src/sys/dev/usb/usbdevs:1.531	Sun Aug  2 20:52:26 2009
+++ src/sys/dev/usb/usbdevs	Mon Sep 28 10:16:30 2009
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.531 2009/08/02 20:52:26 tshiozak Exp $
+$NetBSD: usbdevs,v 1.532 2009/09/28 10:16:30 pooka Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -963,6 +963,7 @@
 product DLINK2 DWLG122C1	0x3c03	DWL-G122 rev C1
 product DLINK2 WUA1340		0x3c04	WUA-1340
 product DLINK DUBE100B1		0x3c05	DUB-E100 rev B1
+product DLINK2 DWA111		0x3c06	DWA-111
 product DLINK DSB650C		0x4000	10Mbps ethernet adapter
 product DLINK DSB650TX1		0x4001	10/100 ethernet adapter
 product DLINK DSB650TX		0x4002	10/100 ethernet adapter