CVS commit: src/sys

2010-04-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Apr 11 06:36:25 UTC 2010

Modified Files:
src/sys/fs/filecorefs: filecore_vfsops.c
src/sys/fs/msdosfs: msdosfs_vfsops.c
src/sys/miscfs/umapfs: umap_vfsops.c

Log Message:
Make module name match MOUNT_NAME.  Inspired by PR kern/43110.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/fs/filecorefs/filecore_vfsops.c
cvs rdiff -u -r1.81 -r1.82 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.82 -r1.83 src/sys/miscfs/umapfs/umap_vfsops.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/fs/filecorefs/filecore_vfsops.c
diff -u src/sys/fs/filecorefs/filecore_vfsops.c:1.61 src/sys/fs/filecorefs/filecore_vfsops.c:1.62
--- src/sys/fs/filecorefs/filecore_vfsops.c:1.61	Fri Jan  8 11:35:08 2010
+++ src/sys/fs/filecorefs/filecore_vfsops.c	Sun Apr 11 06:36:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: filecore_vfsops.c,v 1.61 2010/01/08 11:35:08 pooka Exp $	*/
+/*	$NetBSD: filecore_vfsops.c,v 1.62 2010/04/11 06:36:25 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1994 The Regents of the University of California.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: filecore_vfsops.c,v 1.61 2010/01/08 11:35:08 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: filecore_vfsops.c,v 1.62 2010/04/11 06:36:25 pooka Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -96,7 +96,7 @@
 #include fs/filecorefs/filecore_node.h
 #include fs/filecorefs/filecore_mount.h
 
-MODULE(MODULE_CLASS_VFS, filecorefs, NULL);
+MODULE(MODULE_CLASS_VFS, filecore, NULL);
 
 MALLOC_JUSTDEFINE(M_FILECOREMNT,
 filecore mount, Filecore FS mount structures);

Index: src/sys/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.81 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.82
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.81	Fri Apr  9 08:09:18 2010
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Sun Apr 11 06:36:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.81 2010/04/09 08:09:18 hannken Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.82 2010/04/11 06:36:25 pooka Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.81 2010/04/09 08:09:18 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.82 2010/04/11 06:36:25 pooka Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -85,7 +85,7 @@
 #include fs/msdosfs/msdosfsmount.h
 #include fs/msdosfs/fat.h
 
-MODULE(MODULE_CLASS_VFS, msdosfs, NULL);
+MODULE(MODULE_CLASS_VFS, msdos, NULL);
 
 #ifdef MSDOSFS_DEBUG
 #define DPRINTF(a) uprintf a

Index: src/sys/miscfs/umapfs/umap_vfsops.c
diff -u src/sys/miscfs/umapfs/umap_vfsops.c:1.82 src/sys/miscfs/umapfs/umap_vfsops.c:1.83
--- src/sys/miscfs/umapfs/umap_vfsops.c:1.82	Sat Mar 14 15:36:23 2009
+++ src/sys/miscfs/umapfs/umap_vfsops.c	Sun Apr 11 06:36:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umap_vfsops.c,v 1.82 2009/03/14 15:36:23 dsl Exp $	*/
+/*	$NetBSD: umap_vfsops.c,v 1.83 2010/04/11 06:36:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umap_vfsops.c,v 1.82 2009/03/14 15:36:23 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: umap_vfsops.c,v 1.83 2010/04/11 06:36:25 pooka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -58,7 +58,7 @@
 #include miscfs/umapfs/umap.h
 #include miscfs/genfs/layer_extern.h
 
-MODULE(MODULE_CLASS_VFS, umapfs, layerfs);
+MODULE(MODULE_CLASS_VFS, umap, layerfs);
 
 VFS_PROTOS(umapfs);
 



CVS commit: src/share/man/man9

2010-04-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Apr 11 06:50:30 UTC 2010

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

Log Message:
Document the CTLTYPEs. In addition, split some paragraphs to make the page
less exhaustive to read.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/sysctl.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/sysctl.9
diff -u src/share/man/man9/sysctl.9:1.14 src/share/man/man9/sysctl.9:1.15
--- src/share/man/man9/sysctl.9:1.14	Wed Apr  8 12:50:00 2009
+++ src/share/man/man9/sysctl.9	Sun Apr 11 06:50:30 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.9,v 1.14 2009/04/08 12:50:00 joerg Exp $
+.\	$NetBSD: sysctl.9,v 1.15 2010/04/11 06:50:30 jruoho Exp $
 .\
 .\ Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd August 15, 2008
+.Dd April 11, 2010
 .Dt SYSCTL 9
 .Os
 .Sh NAME
@@ -129,6 +129,7 @@
 .Fn sysctl_lookup ,
 or by any helper function will be done with effective superuser
 privileges).
+.Pp
 The
 .Fa oldp
 and
@@ -160,20 +161,21 @@
 long, which is to be located in kernel space, in order to determine
 which function to call to handle the specific request.
 .Pp
+The following algorithm is used by
 .Fn sysctl_dispatch
-uses the following algorithm to determine the function to call:
+to determine the function to call:
 .Pp
-.Bl -bullet
+.Bl -bullet -offset indent
 .It
 Scan the tree using
-.Fn sysctl_locate
+.Fn sysctl_locate .
 .It
 If the node returned has a
 .Dq helper
-function, call it
+function, call it.
 .It
 If the requested node was found but has no function, call
-.Fn sysctl_lookup
+.Fn sysctl_lookup .
 .It
 If the node was not found and
 .Fa name
@@ -182,11 +184,11 @@
 .Fn sysctl_create ,
 or
 .Fn sysctl_destroy ,
-call the appropriate function
+call the appropriate function.
 .It
 If none of these options applies and no other error was yet recorded,
 return
-.Er EOPNOTSUPP
+.Er EOPNOTSUPP .
 .Pp
 .El
 The
@@ -237,8 +239,9 @@
 .Dv NULL ,
 the main tree will be used.
 .Pp
+The
 .Fn sysctl_locate
-scans a tree for the node most specific to a request.
+function scans a tree for the node most specific to a request.
 If the pointer referenced by
 .Fa rnode
 is not
@@ -281,6 +284,7 @@
 .Dv CTL_DESTROY
 when destroying
 a node.
+.Pp
 The
 .Fa newp
 and
@@ -312,7 +316,9 @@
 .Fa log
 argument is not
 .Dv NULL ,
-a sysctllog structure will be allocated and the pointer referenced
+a
+.Em sysctllog
+structure will be allocated and the pointer referenced
 will be changed to address it.
 The same log may be used for any number of nodes, provided they are
 all inserted into the same tree.
@@ -321,6 +327,7 @@
 .Fn sysctl_teardown )
 without the need for any record
 keeping on the caller's part.
+.Pp
 The
 .Fa cflags
 argument is currently unused and must be zero.
@@ -353,12 +360,22 @@
 field, and the current value for
 .Dv SYSCTL_VERSION
 is added in.
-Note: the
-.Dv CTLFLAG_PERMANENT
-flag can only be set from SYSCTL setup routines (see
-.Sx SETUP FUNCTIONS )
-as called by
-.Fn sysctl_init .
+The following types are defined:
+.Bl -tag -width .Dv CTLTYPE_STRING -offset indent
+.It Dv CTLTYPE_NODE
+A node intended to be a parent for other nodes.
+.It Dv CTLTYPE_INT
+A signed integer.
+.It Dv CTLTYPE_STRING
+A NUL-terminated string.
+.It Dv CTLTYPE_QUAD
+An unsigned 64-bit integer.
+.It Dv CTLTYPE_STRUCT
+A structure.
+.It Dv CTLTYPE_BOOL
+A boolean.
+.El
+.Pp
 The
 .Fa namep
 argument is copied into the
@@ -371,7 +388,18 @@
 will be copied if the
 .Dv CTLFLAG_OWNDESC
 flag is set, and will be used as the node's description.
-Note: if
+.Pp
+Two additional remarks:
+.Bl -enum -offset indent
+.It
+The
+.Dv CTLFLAG_PERMANENT
+flag can only be set from SYSCTL setup routines (see
+.Sx SETUP FUNCTIONS )
+as called by
+.Fn sysctl_init .
+.It
+If
 .Fn sysctl_destroyv
 attempts to delete a node that does not own its own description (and
 is not marked as permanent), but the deletion fails, the description
@@ -380,6 +408,7 @@
 will set the
 .Dv CTLFLAG_OWNDESC
 flag.
+.El
 .Pp
 The
 .Fa func
@@ -564,7 +593,9 @@
 The SYSCTL lock must be held when calling this function.
 .Pp
 .Fn sysctl_teardown
-unwinds a sysctllog and deletes the nodes in the opposite order in
+unwinds a
+.Em sysctllog
+and deletes the nodes in the opposite order in
 which they were created.
 .Pp
 .Fn old_sysctl



CVS commit: src

2010-04-11 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sun Apr 11 08:23:52 UTC 2010

Modified Files:
src/doc: CHANGES
src/sbin/dump: snapshot.c
src/sbin/fsck_ffs: main.c
src/sbin/fsck_msdos: Makefile fsck_msdos.8 main.c

Log Message:
Add -x option which allows to run `fsck_msdos -n' on a snapshot of
a live file system.

While here modify snap_open() to accept a character device as its
first arg and remove now unneeded get_snap_device().

Reviewed by: Manuel Bouyer bou...@netbsd.org


To generate a diff of this commit:
cvs rdiff -u -r1.1379 -r1.1380 src/doc/CHANGES
cvs rdiff -u -r1.4 -r1.5 src/sbin/dump/snapshot.c
cvs rdiff -u -r1.75 -r1.76 src/sbin/fsck_ffs/main.c
cvs rdiff -u -r1.11 -r1.12 src/sbin/fsck_msdos/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sbin/fsck_msdos/fsck_msdos.8
cvs rdiff -u -r1.21 -r1.22 src/sbin/fsck_msdos/main.c

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.1379 src/doc/CHANGES:1.1380
--- src/doc/CHANGES:1.1379	Fri Apr  9 08:09:18 2010
+++ src/doc/CHANGES	Sun Apr 11 08:23:51 2010
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1379 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1380 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -581,3 +581,5 @@
 	agp(4): Add support for the Intel 82855GM AGP port. [jakllsch 20100404]
 	acpi(4): Updated ACPICA to 20100121. [jruoho 20100408]
 	fss(4): Add snapshot support for MSDOS file systems. [hannken 20100409]
+	fsck_msdos(8): add -x option which allows to run fsck_msdos -n on
+		a snapshot of a live file system. [hannken 20100411]

Index: src/sbin/dump/snapshot.c
diff -u src/sbin/dump/snapshot.c:1.4 src/sbin/dump/snapshot.c:1.5
--- src/sbin/dump/snapshot.c:1.4	Mon Apr 28 20:23:08 2008
+++ src/sbin/dump/snapshot.c	Sun Apr 11 08:23:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: snapshot.c,v 1.4 2008/04/28 20:23:08 martin Exp $	*/
+/*	$NetBSD: snapshot.c,v 1.5 2010/04/11 08:23:51 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -54,25 +54,51 @@
  * snapshot device path.
  */
 int
-snap_open(char *mountpoint, char *backup, time_t *snap_date, char **snap_dev)
+snap_open(char *file, char *backup, time_t *snap_date, char **snap_dev)
 {
-	int i, fd, israw, fsinternal, dounlink, flags;
-	char path[MAXPATHLEN], fss_dev[14];
+	int i, n, fd, israw, fsinternal, dounlink, flags;
+	char path[MAXPATHLEN], fss_dev[14], *cp;
 	dev_t mountdev;
 	struct fss_set fss;
 	struct fss_get fsg;
 	struct stat sb;
-	struct statvfs fsb;
+	struct statvfs *mntbuf, *fs, fsb;
 
 	dounlink = 0;
 	fd = -1;
+	mntbuf = NULL;
 
-	fss.fss_mount = mountpoint;
+	/*
+	 * Lookup the mount point. `file' is either a directory or a raw
+	 * character device.
+	 */
+	if (lstat(file, sb)  0)
+		goto fail;
+	fss.fss_mount = NULL;
+	if (S_ISCHR(sb.st_mode)) {
+		if ((cp = strrchr(file, '/')) == NULL || cp[1] != 'r') {
+			errno = EINVAL;
+			goto fail;
+		}
+		snprintf(path, sizeof(path), %.*s/%s,
+		(int)(cp - file), file, cp + 2);
+		n = getmntinfo(mntbuf, MNT_NOWAIT);
+		for (fs = mntbuf, i = 0; i  n; i++, fs++) {
+			if (strcmp(fs-f_mntfromname, path) == 0) {
+fss.fss_mount = fs-f_mntonname;
+if (stat(fss.fss_mount, sb)  0)
+	goto fail;
+break;
+			}
+		}
+	} else if (S_ISDIR(sb.st_mode))
+		fss.fss_mount = file;
+	if (fss.fss_mount == NULL) {
+		errno = EINVAL;
+		goto fail;
+	}
 	fss.fss_bstore = backup ? backup : fss.fss_mount;
 	fss.fss_csize = 0;
-
-	if (stat(fss.fss_mount, sb)  0)
-		goto fail;
 	mountdev = sb.st_dev;
 
 	/*
@@ -153,12 +179,16 @@
 			goto fail;
 		}
 
+		if (mntbuf)
+			free(mntbuf);
 		if (snap_date != NULL)
 			*snap_date = fsg.fsg_time.tv_sec;
 		return fd;
 	}
 
 fail:
+	if (mntbuf)
+		free(mntbuf);
 	if (dounlink)
 		unlink(fss.fss_bstore);
 	if (fd = 0)

Index: src/sbin/fsck_ffs/main.c
diff -u src/sbin/fsck_ffs/main.c:1.75 src/sbin/fsck_ffs/main.c:1.76
--- src/sbin/fsck_ffs/main.c:1.75	Thu Jan  7 01:39:56 2010
+++ src/sbin/fsck_ffs/main.c	Sun Apr 11 08:23:51 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.75 2010/01/07 01:39:56 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.76 2010/04/11 08:23:51 hannken Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)main.c	8.6 (Berkeley) 5/14/95;
 #else
-__RCSID($NetBSD: main.c,v 1.75 2010/01/07 01:39:56 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.76 2010/04/11 08:23:51 hannken Exp $);
 #endif
 #endif /* not lint */
 
@@ -76,7 +76,6 @@
 static int	argtoi(int, const char *, const char *, int);
 static int	checkfilesys(const char *, const char *, int);
 static void	usage(void);
-static char 	*get_snap_device(char *);
 
 int
 main(int argc, char *argv[])
@@ -223,23 +222,17 @@
 			pfatal(Can't check %s\n, *argv);
 		
 		if (snap_backup || snap_internal) {
-			char *mpt;
 			char *snap_dev;
 			int snapfd

CVS commit: src/usr.sbin/puffs/mount_sysctlfs

2010-04-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Apr 11 08:30:17 UTC 2010

Modified Files:
src/usr.sbin/puffs/mount_sysctlfs: sysctlfs.c

Log Message:
Instead of totally giving up, dump CTLTYPE_STRUCT as hex, much
like sysctl -x (but not fancy like -dosequis).


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.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/puffs/mount_sysctlfs/sysctlfs.c
diff -u src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.12 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.13
--- src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.12	Thu Nov  5 13:28:20 2009
+++ src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c	Sun Apr 11 08:30:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctlfs.c,v 1.12 2009/11/05 13:28:20 pooka Exp $	*/
+/*	$NetBSD: sysctlfs.c,v 1.13 2010/04/11 08:30:17 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: sysctlfs.c,v 1.12 2009/11/05 13:28:20 pooka Exp $);
+__RCSID($NetBSD: sysctlfs.c,v 1.13 2010/04/11 08:30:17 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -78,7 +78,7 @@
 static gid_t filegid;
 
 #define ISADIR(a) ((SYSCTL_TYPE(a-sysctl_flags) == CTLTYPE_NODE))
-#define SFS_MAXFILE 8192
+#define SFS_MAXFILE 32768
 #define SFS_NODEPERDIR 128
 
 static int sysctlfs_domount(struct puffs_usermount *);
@@ -395,10 +395,19 @@
 		snprintf(buf, bufsize, % PRId64, q);
 		break;
 	}
-	case CTLTYPE_STRUCT:
-		snprintf(buf, bufsize, CTLTYPE_STRUCT: implement me and 
-		score a cookie);
+	case CTLTYPE_STRUCT: {
+		uint8_t snode[SFS_MAXFILE/2-1];
+		unsigned i;
+
+		sz = sizeof(snode);
+		if (sysctl(po-po_path, po-po_len, snode, sz, NULL, 0) == -1)
+			break;
+		for (i = 0; i  sz  2*i  bufsize; i++) {
+			sprintf(buf[2*i], %02x, snode[i]);
+		}
+		buf[2*i] = '\0';
 		break;
+	}
 	case CTLTYPE_STRING: {
 		sz = bufsize;
 		if (sysctl(po-po_path, po-po_len, buf, sz, NULL, 0) == -1)



CVS commit: src

2010-04-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Apr 11 08:58:43 UTC 2010

Modified Files:
src/share/man/man4: acpi.4
src/sys/dev/acpi/acpica: OsdMisc.c

Log Message:
Document how-to override the DSDT in the manual page instead of code.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man4/acpi.4
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpica/OsdMisc.c

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

Modified files:

Index: src/share/man/man4/acpi.4
diff -u src/share/man/man4/acpi.4:1.46 src/share/man/man4/acpi.4:1.47
--- src/share/man/man4/acpi.4:1.46	Sat Apr 10 05:21:41 2010
+++ src/share/man/man4/acpi.4	Sun Apr 11 08:58:43 2010
@@ -1,6 +1,6 @@
-.\ $NetBSD: acpi.4,v 1.46 2010/04/10 05:21:41 jruoho Exp $
+.\ $NetBSD: acpi.4,v 1.47 2010/04/11 08:58:43 jruoho Exp $
 .\
-.\ Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
+.\ Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 10, 2010
+.Dd April 11, 2010
 .Dt ACPI 4
 .Os
 .Sh NAME
@@ -81,7 +81,8 @@
 .It Dv ACPI_DSDT_OVERRIDE
 Force a given Differentiated System Description Table
 .Pq Tn DSDT
-instead of the BIOS-supplied version.
+instead of the version supplied by the
+.Tn BIOS .
 Use
 .Dv ACPI_DSDT_FILE
 to specify a
@@ -237,19 +238,87 @@
 Toshiba Libretto device.
 .El
 .Sh DEBUGGING
-The
+Although the situation has become better over the years,
+.Tn ACPI
+is typically prone to various errors,
+ranging from blatant flaws in the firmware to bugs in the implementation.
+Before anything else, it is a good practice to upgrade the
+.Tn BIOS
+to the latest version available from the vendor.
+.Pp
+To ease the task of diagnosing and fixing different problems, the
 .Tn ACPICA
 reference implementation provides a rich
 facility of different debugging methods.
-To ease the use of these,
+In
 .Nx
-provides two
-.Xr sysctl 8
-variables that control the debug output at runtime.
-These are only available if the running kernel has been compiled with the
+these are generally only available if the kernel has been compiled with the
 .Tn ACPI_DEBUG
 option.
+.Ss CUSTOM DSDT
+.Tn ACPI
+interprets bytecode known as
+.Tn ACPI
+Machine Language
+.Pq Tn AML ,
+provided by the
+.Tn BIOS
+as a memory image during the system bootstrap.
+Most of the
+.Tn AML
+relevant to
+.Nm
+is implemented in the so-called
+Differentiated System Descriptor Table
+.Pq Tn DSDT .
+.Nx
+provides support for overriding the default
+.Tn DSDT
+supplied by the
+.Tn BIOS .
 .Pp
+The following steps can be used to override the
+.Tn DSDT :
+.Bl -enum -offset indent
+.It
+Dump the raw
+.Tn DSDT
+with
+.Xr acpidump 8 .
+.It
+Disassemble the table with
+.Xr iasl 8 .
+.It
+Modify the disassembled table.
+.It
+Compile the table with
+.Xr iasl 8
+using the option
+.Ar \-tc .
+.It
+Either copy the
+.Pq Pa *.hex
+file to
+.Bd -literal -offset indent
+src/sys/dev/acpi/acpica/Osd/custom_dsdt.hex
+.Ed
+.Pp
+or use the option
+.Bd -literal -offset indent
+ACPI_DSDT_FILE=/some/directory/custom_dsdt.hex
+.Ed
+.Pp
+in the kernel configuration file.
+.It
+Define
+.Tn ACPI_DSDT_OVERRIDE
+in the kernel configuration file and rebuild.
+.El
+.Ss DEBUG OUTPUT
+.Nx
+provides two
+.Xr sysctl 8
+variables that control the debug output at runtime.
 The
 .Ic hw.acpi.debug_layer
 limits the output to a specific
@@ -260,6 +329,7 @@
 Both
 .Xr sysctl 8
 variables are string literals.
+.Pp
 The possible values are:
 .Bl -column -offset indent \
 ACPI_RESOURCE_COMPONENT  ACPI_RESOURCE_COMPONENT 
@@ -382,6 +452,7 @@
 .Xr acpilid 4 ,
 .Xr acpismbus 4 ,
 .Xr acpitz 4 ,
+.Xr acpiwmi 4 ,
 .Xr aibs 4 ,
 .Xr apm 4 ,
 .Xr attimer 4 ,
@@ -404,7 +475,8 @@
 .Xr wss 4 ,
 .Xr ym 4 ,
 .Xr acpidump 8 ,
-.Xr amldb 8
+.Xr amldb 8 ,
+.Xr iasl 8
 .Rs
 .%A Hewlett-Packard Corporation
 .%A Intel Corporation

Index: src/sys/dev/acpi/acpica/OsdMisc.c
diff -u src/sys/dev/acpi/acpica/OsdMisc.c:1.8 src/sys/dev/acpi/acpica/OsdMisc.c:1.9
--- src/sys/dev/acpi/acpica/OsdMisc.c:1.8	Sat Apr 10 06:56:30 2010
+++ src/sys/dev/acpi/acpica/OsdMisc.c	Sun Apr 11 08:58:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: OsdMisc.c,v 1.8 2010/04/10 06:56:30 jruoho Exp $	*/
+/*	$NetBSD: OsdMisc.c,v 1.9 2010/04/11 08:58:43 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.8 2010/04/10 06:56:30 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.9 2010/04/11 08:58:43 jruoho Exp $);
 
 #include opt_acpi.h
 #include opt_ddb.h
@@ -61,27 +61,6 @@
 #include external/intel-public/acpica/dist/include/accommon.h
 #include external/intel-public/acpica/dist/include/acdebug.h
 
-/*
- * For debugging or fixing a DSDT (try 

CVS commit: src/sys/dev/putter

2010-04-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Apr 11 09:36:47 UTC 2010

Modified Files:
src/sys/dev/putter: putter.c

Log Message:
Call putterattach in modcmd init.  Fixes lockdebug panic.  Disable
unload, since putterdetach() is not implemented (i.e. current
implementation of modcmd fini is flawed), and I don't plan to fix
that now.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/putter/putter.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/putter/putter.c
diff -u src/sys/dev/putter/putter.c:1.27 src/sys/dev/putter/putter.c:1.28
--- src/sys/dev/putter/putter.c:1.27	Thu Jan 28 18:12:55 2010
+++ src/sys/dev/putter/putter.c	Sun Apr 11 09:36:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: putter.c,v 1.27 2010/01/28 18:12:55 pooka Exp $	*/
+/*	$NetBSD: putter.c,v 1.28 2010/04/11 09:36:47 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: putter.c,v 1.27 2010/01/28 18:12:55 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: putter.c,v 1.28 2010/04/11 09:36:47 pooka Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -653,10 +653,11 @@
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+		putterattach();
 		return devsw_attach(putter, NULL, bmajor,
 		putter_cdevsw, cmajor);
 	case MODULE_CMD_FINI:
-		return devsw_detach(NULL, putter_cdevsw);
+		return ENOTTY; /* XXX: putterdetach */
 	default:
 		return ENOTTY;
 	}



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

2010-04-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sun Apr 11 09:52:10 UTC 2010

Modified Files:
src/sys/arch/x86/acpi: acpi_wakeup.c

Log Message:
Use CTLTYPE_BOOL.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/acpi/acpi_wakeup.c

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

Modified files:

Index: src/sys/arch/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.21 src/sys/arch/x86/acpi/acpi_wakeup.c:1.22
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.21	Sun Feb 28 13:56:49 2010
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Sun Apr 11 09:52:09 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.21 2010/02/28 13:56:49 jruoho Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.22 2010/04/11 09:52:09 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.21 2010/02/28 13:56:49 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.22 2010/04/11 09:52:09 jruoho Exp $);
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe takaw...@jp.freebsd.org
@@ -444,7 +444,7 @@
 	0, NULL, 0, CTL_CREATE, CTL_EOL) != 0)
 		return;
 	if (sysctl_createv(NULL, 0, node, ssnode, CTLFLAG_READWRITE,
-	CTLTYPE_INT, acpi_beep_on_reset, NULL, sysctl_md_acpi_beep_on_reset,
+	CTLTYPE_BOOL, acpi_beep_on_reset, NULL, sysctl_md_acpi_beep_on_reset,
 	0, NULL, 0, CTL_CREATE, CTL_EOL) != 0)
 		return;
 



CVS commit: src/sys

2010-04-11 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Apr 11 10:26:26 UTC 2010

Modified Files:
src/sys/fs/filecorefs: filecore_vfsops.c
src/sys/fs/msdosfs: msdosfs_vfsops.c
src/sys/miscfs/umapfs: umap_vfsops.c

Log Message:
The *_modcmd functions use the module name as prefix.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/fs/filecorefs/filecore_vfsops.c
cvs rdiff -u -r1.82 -r1.83 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.83 -r1.84 src/sys/miscfs/umapfs/umap_vfsops.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/fs/filecorefs/filecore_vfsops.c
diff -u src/sys/fs/filecorefs/filecore_vfsops.c:1.62 src/sys/fs/filecorefs/filecore_vfsops.c:1.63
--- src/sys/fs/filecorefs/filecore_vfsops.c:1.62	Sun Apr 11 06:36:25 2010
+++ src/sys/fs/filecorefs/filecore_vfsops.c	Sun Apr 11 10:26:26 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: filecore_vfsops.c,v 1.62 2010/04/11 06:36:25 pooka Exp $	*/
+/*	$NetBSD: filecore_vfsops.c,v 1.63 2010/04/11 10:26:26 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1994 The Regents of the University of California.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: filecore_vfsops.c,v 1.62 2010/04/11 06:36:25 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: filecore_vfsops.c,v 1.63 2010/04/11 10:26:26 mlelstv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -145,7 +145,7 @@
 };
 
 static int
-filecorefs_modcmd(modcmd_t cmd, void *arg)
+filecore_modcmd(modcmd_t cmd, void *arg)
 {
 	int error;
 

Index: src/sys/fs/msdosfs/msdosfs_vfsops.c
diff -u src/sys/fs/msdosfs/msdosfs_vfsops.c:1.82 src/sys/fs/msdosfs/msdosfs_vfsops.c:1.83
--- src/sys/fs/msdosfs/msdosfs_vfsops.c:1.82	Sun Apr 11 06:36:25 2010
+++ src/sys/fs/msdosfs/msdosfs_vfsops.c	Sun Apr 11 10:26:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vfsops.c,v 1.82 2010/04/11 06:36:25 pooka Exp $	*/
+/*	$NetBSD: msdosfs_vfsops.c,v 1.83 2010/04/11 10:26:25 mlelstv Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.82 2010/04/11 06:36:25 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.83 2010/04/11 10:26:25 mlelstv Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_compat_netbsd.h
@@ -147,7 +147,7 @@
 };
 
 static int
-msdosfs_modcmd(modcmd_t cmd, void *arg)
+msdos_modcmd(modcmd_t cmd, void *arg)
 {
 	int error;
 

Index: src/sys/miscfs/umapfs/umap_vfsops.c
diff -u src/sys/miscfs/umapfs/umap_vfsops.c:1.83 src/sys/miscfs/umapfs/umap_vfsops.c:1.84
--- src/sys/miscfs/umapfs/umap_vfsops.c:1.83	Sun Apr 11 06:36:25 2010
+++ src/sys/miscfs/umapfs/umap_vfsops.c	Sun Apr 11 10:26:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umap_vfsops.c,v 1.83 2010/04/11 06:36:25 pooka Exp $	*/
+/*	$NetBSD: umap_vfsops.c,v 1.84 2010/04/11 10:26:25 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umap_vfsops.c,v 1.83 2010/04/11 06:36:25 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: umap_vfsops.c,v 1.84 2010/04/11 10:26:25 mlelstv Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -308,7 +308,7 @@
 };
 
 static int
-umapfs_modcmd(modcmd_t cmd, void *arg)
+umap_modcmd(modcmd_t cmd, void *arg)
 {
 	int error;
 



CVS commit: src/sys/dev/usb

2010-04-11 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Apr 11 13:57:22 UTC 2010

Modified Files:
src/sys/dev/usb: udl.c usbdevs

Log Message:
add the 19 Samsung display, make udl handle it


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/udl.c
cvs rdiff -u -r1.547 -r1.548 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/udl.c
diff -u src/sys/dev/usb/udl.c:1.2 src/sys/dev/usb/udl.c:1.3
--- src/sys/dev/usb/udl.c:1.2	Wed Feb 24 12:29:47 2010
+++ src/sys/dev/usb/udl.c	Sun Apr 11 13:57:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: udl.c,v 1.2 2010/02/24 12:29:47 kiyohara Exp $	*/
+/*	$NetBSD: udl.c,v 1.3 2010/04/11 13:57:22 drochner Exp $	*/
 
 /*-
  * Copyright (c) 2009 FUKAUMI Naoki.
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udl.c,v 1.2 2010/02/24 12:29:47 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: udl.c,v 1.3 2010/04/11 13:57:22 drochner Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -299,6 +299,7 @@
  */
 static const struct usb_devno udl_devs[] = {
 	{ USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_LD220 },
+	{ USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_LD190 },
 	{ USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_U70 },
 	{ USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_VCUD60 },
 	{ USB_VENDOR_DISPLAYLINK, USB_PRODUCT_DISPLAYLINK_DLDVI },

Index: src/sys/dev/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.547 src/sys/dev/usb/usbdevs:1.548
--- src/sys/dev/usb/usbdevs:1.547	Sun Mar 14 08:44:46 2010
+++ src/sys/dev/usb/usbdevs	Sun Apr 11 13:57:22 2010
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.547 2010/03/14 08:44:46 explorer Exp $
+$NetBSD: usbdevs,v 1.548 2010/04/11 13:57:22 drochner Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -963,6 +963,7 @@
 
 /* DisplayLink products */
 product DISPLAYLINK LD220	0x0100	Samsung LD220
+product DISPLAYLINK LD190	0x0102	Samsung LD190
 product DISPLAYLINK U70		0x0103	Samsung U70
 product DISPLAYLINK VCUD60	0x0136	Rextron DVI
 product DISPLAYLINK DLDVI	0x0141	DisplayLink DVI



CVS commit: src/sys/dev/wscons

2010-04-11 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Sun Apr 11 14:04:10 UTC 2010

Modified Files:
src/sys/dev/wscons: wsdisplay.c

Log Message:
add just as much detach code to keep the box from panicking on
removal of a USB udl device
(needs more work, but I got the hardware for a quick test only)


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/wscons/wsdisplay.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/wscons/wsdisplay.c
diff -u src/sys/dev/wscons/wsdisplay.c:1.132 src/sys/dev/wscons/wsdisplay.c:1.133
--- src/sys/dev/wscons/wsdisplay.c:1.132	Thu Mar 11 04:00:36 2010
+++ src/sys/dev/wscons/wsdisplay.c	Sun Apr 11 14:04:10 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.132 2010/03/11 04:00:36 mrg Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.133 2010/04/11 14:04:10 drochner Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wsdisplay.c,v 1.132 2010/03/11 04:00:36 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: wsdisplay.c,v 1.133 2010/04/11 14:04:10 drochner Exp $);
 
 #include opt_wsdisplay_compat.h
 #include opt_wsmsgattrs.h
@@ -166,12 +166,13 @@
 /* Autoconfiguration definitions. */
 static int wsdisplay_emul_match(device_t , cfdata_t, void *);
 static void wsdisplay_emul_attach(device_t, device_t, void *);
+static int wsdisplay_emul_detach(device_t, int);
 static int wsdisplay_noemul_match(device_t, cfdata_t, void *);
 static void wsdisplay_noemul_attach(device_t, device_t, void *);
 static bool wsdisplay_suspend(device_t, const pmf_qual_t *);
 
 CFATTACH_DECL_NEW(wsdisplay_emul, sizeof (struct wsdisplay_softc),
-wsdisplay_emul_match, wsdisplay_emul_attach, NULL, NULL);
+wsdisplay_emul_match, wsdisplay_emul_attach, wsdisplay_emul_detach, NULL);
   
 CFATTACH_DECL_NEW(wsdisplay_noemul, sizeof (struct wsdisplay_softc),
 wsdisplay_noemul_match, wsdisplay_noemul_attach, NULL, NULL);
@@ -588,6 +589,16 @@
 }
 
 int
+wsdisplay_emul_detach(device_t dev, int how)
+{
+	struct wsdisplay_softc *sc = device_private(dev);
+
+	cv_destroy(sc-sc_flagscv);
+	mutex_destroy(sc-sc_flagsmtx);
+	return 0;
+}
+
+int
 wsdisplay_noemul_match(device_t parent, cfdata_t match, void *aux)
 {
 #if 0 /* -Wunused */



CVS commit: src/usr.sbin/puffs/mount_sysctlfs

2010-04-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Apr 11 15:08:17 UTC 2010

Modified Files:
src/usr.sbin/puffs/mount_sysctlfs: mount_sysctlfs.8 sysctlfs.c

Log Message:
Add raw mode, which skips ASCII'ification and can be used if reading
structures from the kernel into debug program memory is desired.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/puffs/mount_sysctlfs/mount_sysctlfs.8
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.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/puffs/mount_sysctlfs/mount_sysctlfs.8
diff -u src/usr.sbin/puffs/mount_sysctlfs/mount_sysctlfs.8:1.1 src/usr.sbin/puffs/mount_sysctlfs/mount_sysctlfs.8:1.2
--- src/usr.sbin/puffs/mount_sysctlfs/mount_sysctlfs.8:1.1	Fri Aug 10 07:59:32 2007
+++ src/usr.sbin/puffs/mount_sysctlfs/mount_sysctlfs.8	Sun Apr 11 15:08:17 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_sysctlfs.8,v 1.1 2007/08/10 07:59:32 pooka Exp $
+.\	$NetBSD: mount_sysctlfs.8,v 1.2 2010/04/11 15:08:17 pooka Exp $
 .\
 .\ Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd August 10, 2007
+.Dd April 11, 2010
 .Dt MOUNT_SYSCTLFS 8
 .Os
 .Sh NAME
@@ -32,6 +32,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl o Ar mntopts
+.Op Fl r
 .Ar sysctlfs
 .Ar mount_point
 .Sh DESCRIPTION
@@ -41,6 +42,11 @@
 .Xr sysctl 8
 hierarchy through the file system namespace.
 It is possible to browse the tree, query node values and modify them.
+By default, the node contents are interpreted as ASCII.
+If the
+.Fl r
+flag is given, the server uses raw mode and displays node contents as
+they are received from the kernel (binary).
 .Sh SEE ALSO
 .Xr puffs 3 ,
 .Xr puffs 4 ,
@@ -52,4 +58,6 @@
 utility first appeared in
 .Nx 5.0 .
 .Sh CAVEATS
-Tree nodes of type struct are not accessible through this interface.
+Raw mode
+.Op Fl r
+does not currently support node modification.

Index: src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c
diff -u src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.13 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.14
--- src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.13	Sun Apr 11 08:30:17 2010
+++ src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c	Sun Apr 11 15:08:17 2010
@@ -1,6 +1,6 @@
-/*	$NetBSD: sysctlfs.c,v 1.13 2010/04/11 08:30:17 pooka Exp $	*/
+/*	$NetBSD: sysctlfs.c,v 1.14 2010/04/11 15:08:17 pooka Exp $	*/
 
-/*
+/*-
  * Copyright (c) 2006, 2007  Antti Kantee.  All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: sysctlfs.c,v 1.13 2010/04/11 08:30:17 pooka Exp $);
+__RCSID($NetBSD: sysctlfs.c,v 1.14 2010/04/11 15:08:17 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -77,6 +77,8 @@
 static uid_t fileuid;
 static gid_t filegid;
 
+static int rflag;
+
 #define ISADIR(a) ((SYSCTL_TYPE(a-sysctl_flags) == CTLTYPE_NODE))
 #define SFS_MAXFILE 32768
 #define SFS_NODEPERDIR 128
@@ -115,7 +117,7 @@
 
 static int
 sysctlfs_pathtransform(struct puffs_usermount *pu,
-	const struct puffs_pathobj *p, const const struct puffs_cn *pcn,
+	const struct puffs_pathobj *p, const struct puffs_cn *pcn,
 	struct puffs_pathobj *res)
 {
 
@@ -230,7 +232,7 @@
 
 	mntflags = pflags = 0;
 	detach = 1;
-	while ((ch = getopt(argc, argv, o:s)) != -1) {
+	while ((ch = getopt(argc, argv, o:rs)) != -1) {
 		switch (ch) {
 		case 'o':
 			mp = getmntopts(optarg, puffsmopts, mntflags, pflags);
@@ -238,6 +240,9 @@
 err(1, getmntopts);
 			freemntopts(mp);
 			break;
+		case 'r':
+			rflag = 1;
+			break;
 		case 's':
 			detach = 0;
 			break;
@@ -370,29 +375,42 @@
 }
 
 static void
-doprint(struct sfsnode *sfs, struct puffs_pathobj *po,
-	char *buf, size_t bufsize)
+getnodedata(struct sfsnode *sfs, struct puffs_pathobj *po,
+	char *buf, size_t *bufsize)
 {
 	size_t sz;
+	int error = 0;
 
 	assert(!ISADIR(sfs));
 
-	memset(buf, 0, bufsize);
+	memset(buf, 0, *bufsize);
 	switch (SYSCTL_TYPE(sfs-sysctl_flags)) {
 	case CTLTYPE_INT: {
 		int i;
 		sz = sizeof(int);
-		if (sysctl(po-po_path, po-po_len, i, sz, NULL, 0) == -1)
+		assert(sz = *bufsize);
+		if (sysctl(po-po_path, po-po_len, i, sz, NULL, 0) == -1) {
+			error = errno;
 			break;
-		snprintf(buf, bufsize, %d, i);
+		}
+		if (rflag)
+			memcpy(buf, i, sz);
+		else
+			snprintf(buf, *bufsize, %d, i);
 		break;
 	}
 	case CTLTYPE_QUAD: {
 		quad_t q;
 		sz = sizeof(q);
-		if (sysctl(po-po_path, po-po_len, q, sz, NULL, 0) == -1)
+		assert(sz = *bufsize);
+		if (sysctl(po-po_path, po-po_len, q, sz, NULL, 0) == -1) {
+			error = errno;
 			break;
-		snprintf(buf, bufsize, % PRId64, q);
+		}
+		if (rflag)
+			memcpy(buf, q, sz);
+		else
+			snprintf(buf, *bufsize, % PRId64, q);
 		break;
 	}
 	case CTLTYPE_STRUCT: {
@@ -400,24 +418,44 @@
 		unsigned i;
 
 		sz 

CVS commit: src/external/intel-public

2010-04-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Apr 11 17:23:10 UTC 2010

Modified Files:
src/external/intel-public: Makefile
src/external/intel-public/acpica/bin/iasl: Makefile

Log Message:
iasl may be MD, but its man page is MI.
(hi jruoho)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/intel-public/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/intel-public/acpica/bin/iasl/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/intel-public/Makefile
diff -u src/external/intel-public/Makefile:1.1 src/external/intel-public/Makefile:1.2
--- src/external/intel-public/Makefile:1.1	Tue Aug 18 23:42:39 2009
+++ src/external/intel-public/Makefile	Sun Apr 11 17:23:10 2010
@@ -1,7 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2009/08/18 23:42:39 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.2 2010/04/11 17:23:10 jakllsch Exp $
 
-.if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 SUBDIR=		acpica
-.endif
 
 .include bsd.subdir.mk

Index: src/external/intel-public/acpica/bin/iasl/Makefile
diff -u src/external/intel-public/acpica/bin/iasl/Makefile:1.3 src/external/intel-public/acpica/bin/iasl/Makefile:1.4
--- src/external/intel-public/acpica/bin/iasl/Makefile:1.3	Sat Apr 10 04:29:39 2010
+++ src/external/intel-public/acpica/bin/iasl/Makefile	Sun Apr 11 17:23:10 2010
@@ -1,6 +1,8 @@
-#	$NetBSD: Makefile,v 1.3 2010/04/10 04:29:39 jruoho Exp $
+#	$NetBSD: Makefile,v 1.4 2010/04/11 17:23:10 jakllsch Exp $
 
+.if (${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64)
 PROG=	iasl
+.endif
 BINDIR=	/usr/bin
 MAN=	iasl.8
 WARNS=	0



CVS commit: src/sbin/fsck_msdos

2010-04-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Apr 11 21:29:38 UTC 2010

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

Log Message:
New sentence, new line. Sort SEE ALSO.
Improve formatting of option list.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sbin/fsck_msdos/fsck_msdos.8

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

Modified files:

Index: src/sbin/fsck_msdos/fsck_msdos.8
diff -u src/sbin/fsck_msdos/fsck_msdos.8:1.16 src/sbin/fsck_msdos/fsck_msdos.8:1.17
--- src/sbin/fsck_msdos/fsck_msdos.8:1.16	Sun Apr 11 08:23:52 2010
+++ src/sbin/fsck_msdos/fsck_msdos.8	Sun Apr 11 21:29:37 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: fsck_msdos.8,v 1.16 2010/04/11 08:23:52 hannken Exp $
+.\	$NetBSD: fsck_msdos.8,v 1.17 2010/04/11 21:29:37 wiz Exp $
 .\
 .\ Copyright (C) 1995 Wolfgang Solfrank
 .\ Copyright (c) 1995 Martin Husemann
@@ -72,7 +72,7 @@
 making any changes.
 .Pp
 The options are as follows:
-.Bl -hang -offset indent
+.Bl -tag -width XxXsnapXbackupXX
 .It Fl f
 This option is ignored by
 .Nm ,
@@ -90,7 +90,8 @@
 .It Fl x Ar snap-backup
 Use a snapshot with
 .Ar snap-backup
-as backup to check a read-write mounted filesystem. Must be used with
+as backup to check a read-write mounted filesystem.
+Must be used with
 .Fl n .
 See
 .Xr fss 4
@@ -104,9 +105,9 @@
 to assume yes as the answer to all operator questions.
 .El
 .Sh SEE ALSO
+.Xr fss 4 ,
 .Xr fsck 8 ,
 .Xr fsck_ffs 8 ,
-.Xr fss 4 ,
 .Xr mount_msdos 8
 .Sh BUGS
 .Nm



CVS commit: src/sys

2010-04-11 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Apr 11 22:42:30 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL
src/sys/dev/acpi: files.acpi
Added Files:
src/sys/dev/acpi: valz_acpi.c

Log Message:
Add valz(4), a simple driver to handle the backlight keys on some
Toshiba laptops.  As of yet only tested on a Satellite A135-S4527.


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/acpi/files.acpi
cvs rdiff -u -r0 -r1.1 src/sys/dev/acpi/valz_acpi.c

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

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.253 src/sys/arch/i386/conf/ALL:1.254
--- src/sys/arch/i386/conf/ALL:1.253	Thu Apr  8 17:50:34 2010
+++ src/sys/arch/i386/conf/ALL	Sun Apr 11 22:42:30 2010
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.253 2010/04/08 17:50:34 jruoho Exp $
+# $NetBSD: ALL,v 1.254 2010/04/11 22:42:30 jakllsch 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.253 $
+#ident 		ALL-$Revision: 1.254 $
 
 maxusers	64		# estimated number of users
 
@@ -406,6 +406,9 @@
 # Toshiba Libretto devices
 vald* at acpi?
 
+# Toshiba LCD brightness
+valz* at acpi?
+
 # Plug-and-Play BIOS and attached devices
 
 pnpbios*	at mainbus?

Index: src/sys/dev/acpi/files.acpi
diff -u src/sys/dev/acpi/files.acpi:1.71 src/sys/dev/acpi/files.acpi:1.72
--- src/sys/dev/acpi/files.acpi:1.71	Sat Apr 10 17:55:24 2010
+++ src/sys/dev/acpi/files.acpi	Sun Apr 11 22:42:30 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.acpi,v 1.71 2010/04/10 17:55:24 jruoho Exp $
+#	$NetBSD: files.acpi,v 1.72 2010/04/11 22:42:30 jakllsch Exp $
 
 include dev/acpi/acpica/files.acpica
 
@@ -132,6 +132,11 @@
 attach	vald at acpinodebus with vald_acpi
 file	dev/acpi/vald_acpi.c		vald_acpi
 
+# Toshiba backlight hotkeys
+device	valz
+attach	valz at acpinodebus
+file	dev/acpi/valz_acpi.c valz
+
 # Sony SPIC (jog dial etc.)
 attach	spic at acpinodebus with spic_acpi
 file	dev/acpi/spic_acpi.c		spic_acpi

Added files:

Index: src/sys/dev/acpi/valz_acpi.c
diff -u /dev/null src/sys/dev/acpi/valz_acpi.c:1.1
--- /dev/null	Sun Apr 11 22:42:30 2010
+++ src/sys/dev/acpi/valz_acpi.c	Sun Apr 11 22:42:30 2010
@@ -0,0 +1,221 @@
+/*	$NetBSD: valz_acpi.c,v 1.1 2010/04/11 22:42:30 jakllsch Exp $	*/
+
+/*
+ * Copyright (c) 2010 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: valz_acpi.c,v 1.1 2010/04/11 22:42:30 jakllsch Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+#include sys/syslog.h
+
+#include dev/acpi/acpireg.h
+#include dev/acpi/acpivar.h
+
+struct valz_softc {
+	device_t sc_dev;
+	ACPI_HANDLE sc_lcd;
+};
+
+enum valz_action {
+	VALZ_BACKLIGHT_NOCHANGE,
+	VALZ_BACKLIGHT_DECREASE,
+	VALZ_BACKLIGHT_INCREASE,
+};
+
+static const char * const valz_hids[] = {
+	TOS1900,
+	NULL
+};
+
+static int	valz_match(device_t, cfdata_t, void *);
+static void	valz_attach(device_t, device_t, void *);
+static ACPI_STATUS valz_check_bcl(ACPI_HANDLE, UINT32, void*, void **);
+static void	valz_locate_lcd(struct valz_softc *);
+static void	valz_lcd_notify_handler(ACPI_HANDLE, UINT32, void *);
+static void	valz_adjust_backlight(struct valz_softc *, enum valz_action);
+static void	valz_pmf_brightness_decrease(device_t);
+static void	valz_pmf_brightness_increase(device_t);
+
+CFATTACH_DECL_NEW(valz, sizeof(struct valz_softc),
+valz_match, 

CVS commit: [netbsd-5] src/crypto/dist/openssl/ssl

2010-04-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 12 00:40:12 UTC 2010

Modified Files:
src/crypto/dist/openssl/ssl [netbsd-5]: s3_enc.c s3_srvr.c t1_enc.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1365):
crypto/external/bsd/openssl/dist/ssl/s3_enc.c: revision 1.2 via patch
crypto/external/bsd/openssl/dist/ssl/s3_srvr.c: revision 1.5 via patch
crypto/external/bsd/openssl/dist/ssl/t1_enc.c: revision 1.2 via patch
Fix crash in openssl (I suspect caused by malformed packets):
handshake_dgst[] may be used without being allocated, causing NULL
pointer dereference.
Fix by checking that handshake_dgst is not NULL before use.
Reported to openssl as ticket openssl.org #2214.
Fix tested on netbsd-5 by Luke Mewburn with apache, and by me with
freeradius (fixing segmentation fault in both cases).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.12 -r1.1.1.12.4.1 src/crypto/dist/openssl/ssl/s3_enc.c \
src/crypto/dist/openssl/ssl/t1_enc.c
cvs rdiff -u -r1.15.4.2 -r1.15.4.3 src/crypto/dist/openssl/ssl/s3_srvr.c

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

Modified files:

Index: src/crypto/dist/openssl/ssl/s3_enc.c
diff -u src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12 src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12.4.1
--- src/crypto/dist/openssl/ssl/s3_enc.c:1.1.1.12	Fri May  9 21:34:44 2008
+++ src/crypto/dist/openssl/ssl/s3_enc.c	Mon Apr 12 00:40:12 2010
@@ -570,7 +570,7 @@
 		{
 		BIO_write (s-s3-handshake_buffer,(void *)buf,len);
 		} 
-	else 
+	else if (s-s3-handshake_dgst != NULL)
 		{
 		int i;
 		for (i=0;i SSL_MAX_DIGEST;i++) 
Index: src/crypto/dist/openssl/ssl/t1_enc.c
diff -u src/crypto/dist/openssl/ssl/t1_enc.c:1.1.1.12 src/crypto/dist/openssl/ssl/t1_enc.c:1.1.1.12.4.1
--- src/crypto/dist/openssl/ssl/t1_enc.c:1.1.1.12	Fri May  9 21:34:46 2008
+++ src/crypto/dist/openssl/ssl/t1_enc.c	Mon Apr 12 00:40:12 2010
@@ -750,14 +750,16 @@
 
 	if (s-s3-handshake_buffer) 
 		ssl3_digest_cached_records(s);
-	for (i=0;iSSL_MAX_DIGEST;i++) 
-		{
-		  if (s-s3-handshake_dgst[i]EVP_MD_CTX_type(s-s3-handshake_dgst[i])==md_nid) 
-		  	{
-		  	d=s-s3-handshake_dgst[i];
-			break;
+	if (s-s3-handshake_dgst) {
+		for (i=0;iSSL_MAX_DIGEST;i++) 
+			{
+			  if (s-s3-handshake_dgst[i]EVP_MD_CTX_type(s-s3-handshake_dgst[i])==md_nid) 
+{
+d=s-s3-handshake_dgst[i];
+break;
+}
 			}
-		}
+	}
 	if (!d) {
 		SSLerr(SSL_F_TLS1_CERT_VERIFY_MAC,SSL_R_NO_REQUIRED_DIGEST);
 		return 0;
@@ -794,7 +796,8 @@
 		if (mask  s-s3-tmp.new_cipher-algorithm2)
 			{
 			unsigned int hashsize = EVP_MD_size(md);
-			if (hashsize  (sizeof buf - (size_t)(q-buf)))
+			if (hashsize  (sizeof buf - (size_t)(q-buf)) ||
+			s-s3-handshake_dgst == NULL)
 {
 /* internal error: 'buf' is too small for this cipersuite! */
 err = 1;

Index: src/crypto/dist/openssl/ssl/s3_srvr.c
diff -u src/crypto/dist/openssl/ssl/s3_srvr.c:1.15.4.2 src/crypto/dist/openssl/ssl/s3_srvr.c:1.15.4.3
--- src/crypto/dist/openssl/ssl/s3_srvr.c:1.15.4.2	Tue Jan 12 09:07:51 2010
+++ src/crypto/dist/openssl/ssl/s3_srvr.c	Mon Apr 12 00:40:12 2010
@@ -532,12 +532,14 @@
  */
 if (s-s3-handshake_buffer)
 	ssl3_digest_cached_records(s);
-for (dgst_num=0; dgst_numSSL_MAX_DIGEST;dgst_num++)	
-	if (s-s3-handshake_dgst[dgst_num]) 
-		{
-		s-method-ssl3_enc-cert_verify_mac(s,EVP_MD_CTX_type(s-s3-handshake_dgst[dgst_num]),(s-s3-tmp.cert_verify_md[offset]));
-		offset+=EVP_MD_CTX_size(s-s3-handshake_dgst[dgst_num]);
-		}		
+if (s-s3-handshake_dgst != NULL) {
+	for (dgst_num=0; dgst_numSSL_MAX_DIGEST;dgst_num++)	
+		if (s-s3-handshake_dgst[dgst_num]) 
+			{
+			s-method-ssl3_enc-cert_verify_mac(s,EVP_MD_CTX_type(s-s3-handshake_dgst[dgst_num]),(s-s3-tmp.cert_verify_md[offset]));
+			offset+=EVP_MD_CTX_size(s-s3-handshake_dgst[dgst_num]);
+			}		
+	}
 }
 			break;
 



CVS commit: [netbsd-5] src/libexec/ftpd

2010-04-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 12 02:28:16 UTC 2010

Modified Files:
src/libexec/ftpd [netbsd-5]: popen.c

Log Message:
Pull up following revision(s) (requested by lukem in ticket #1372):
libexec/ftpd/popen.c: revision 1.37
PR/43023: Bruce Cran: FTPD bug remote crash
Since we specify NOCHECK, in the NOMATCH case gl_pathv can be NULL.
(From FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.4.1 src/libexec/ftpd/popen.c

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

Modified files:

Index: src/libexec/ftpd/popen.c
diff -u src/libexec/ftpd/popen.c:1.34 src/libexec/ftpd/popen.c:1.34.4.1
--- src/libexec/ftpd/popen.c:1.34	Sat Sep 13 02:41:52 2008
+++ src/libexec/ftpd/popen.c	Mon Apr 12 02:28:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: popen.c,v 1.34 2008/09/13 02:41:52 lukem Exp $	*/
+/*	$NetBSD: popen.c,v 1.34.4.1 2010/04/12 02:28:16 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = @(#)popen.c	8.3 (Berkeley) 4/6/94;
 #else
-__RCSID($NetBSD: popen.c,v 1.34 2008/09/13 02:41:52 lukem Exp $);
+__RCSID($NetBSD: popen.c,v 1.34.4.1 2010/04/12 02:28:16 snj Exp $);
 #endif
 #endif /* not lint */
 
@@ -138,7 +138,8 @@
 		int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE|GLOB_LIMIT;
 
 		memset(gl, 0, sizeof(gl));
-		if (glob(argv[argc], flags, NULL, gl)) {
+		if (glob(argv[argc], flags, NULL, gl)
+		|| gl.gl_pathv == NULL)  {
 			if (sl_add(sl, ftpd_strdup(argv[argc])) == -1) {
 globfree(gl);
 goto pfree;



CVS commit: [netbsd-5] src/libexec/ftpd

2010-04-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 12 02:30:12 UTC 2010

Modified Files:
src/libexec/ftpd [netbsd-5]: version.h

Log Message:
Pull up following revision(s) (requested by lukem in ticket #1372):
libexec/ftpd/version.h: revision 1.74
Update version to 20100320 for Christos' commit to popen.c 1.37 for:
 PR/43023: Bruce Cran: FTPD bug remote crash


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.70.4.1 src/libexec/ftpd/version.h

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

Modified files:

Index: src/libexec/ftpd/version.h
diff -u src/libexec/ftpd/version.h:1.70 src/libexec/ftpd/version.h:1.70.4.1
--- src/libexec/ftpd/version.h:1.70	Tue Sep 16 12:30:38 2008
+++ src/libexec/ftpd/version.h	Mon Apr 12 02:30:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.70 2008/09/16 12:30:38 lukem Exp $	*/
+/*	$NetBSD: version.h,v 1.70.4.1 2010/04/12 02:30:12 snj Exp $	*/
 /*-
  * Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,5 +29,5 @@
  */
 
 #ifndef FTPD_VERSION
-#define	FTPD_VERSION	NetBSD-ftpd 20080916
+#define	FTPD_VERSION	NetBSD-ftpd 20100320
 #endif



CVS commit: [netbsd-5] src/doc

2010-04-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 12 02:32:57 UTC 2010

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

Log Message:
Ticket 1372.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.224 -r1.1.2.225 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.224 src/doc/CHANGES-5.1:1.1.2.225
--- src/doc/CHANGES-5.1:1.1.2.224	Mon Apr 12 00:46:07 2010
+++ src/doc/CHANGES-5.1	Mon Apr 12 02:32:57 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.224 2010/04/12 00:46:07 snj Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.225 2010/04/12 02:32:57 snj Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -17163,3 +17163,11 @@
 	Fix by checking that handshake_dgst is not NULL before use.
 	[bouyer, ticket #1365]
 
+libexec/ftpd/popen.c1.37
+libexec/ftpd/version.h1.74
+
+	PR/43023: FTPD bug remote crash.  Since we specify NOCHECK, in the
+	NOMATCH case gl_pathv can be NULL.
+	Update version to 20100320.
+	[lukem, ticket #1372]
+



CVS commit: [netbsd-5-0] src/libexec/ftpd

2010-04-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 12 02:33:59 UTC 2010

Modified Files:
src/libexec/ftpd [netbsd-5-0]: popen.c

Log Message:
Pull up following revision(s) (requested by lukem in ticket #1372):
libexec/ftpd/popen.c: revision 1.37
PR/43023: Bruce Cran: FTPD bug remote crash
Since we specify NOCHECK, in the NOMATCH case gl_pathv can be NULL.
(From FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.8.1 src/libexec/ftpd/popen.c

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

Modified files:

Index: src/libexec/ftpd/popen.c
diff -u src/libexec/ftpd/popen.c:1.34 src/libexec/ftpd/popen.c:1.34.8.1
--- src/libexec/ftpd/popen.c:1.34	Sat Sep 13 02:41:52 2008
+++ src/libexec/ftpd/popen.c	Mon Apr 12 02:33:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: popen.c,v 1.34 2008/09/13 02:41:52 lukem Exp $	*/
+/*	$NetBSD: popen.c,v 1.34.8.1 2010/04/12 02:33:59 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = @(#)popen.c	8.3 (Berkeley) 4/6/94;
 #else
-__RCSID($NetBSD: popen.c,v 1.34 2008/09/13 02:41:52 lukem Exp $);
+__RCSID($NetBSD: popen.c,v 1.34.8.1 2010/04/12 02:33:59 snj Exp $);
 #endif
 #endif /* not lint */
 
@@ -138,7 +138,8 @@
 		int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE|GLOB_LIMIT;
 
 		memset(gl, 0, sizeof(gl));
-		if (glob(argv[argc], flags, NULL, gl)) {
+		if (glob(argv[argc], flags, NULL, gl)
+		|| gl.gl_pathv == NULL)  {
 			if (sl_add(sl, ftpd_strdup(argv[argc])) == -1) {
 globfree(gl);
 goto pfree;



CVS commit: [netbsd-5-0] src/libexec/ftpd

2010-04-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Apr 12 02:35:02 UTC 2010

Modified Files:
src/libexec/ftpd [netbsd-5-0]: version.h

Log Message:
Pull up following revision(s) (requested by lukem in ticket #1372):
libexec/ftpd/version.h: revision 1.74
Update version to 20100320 for Christos' commit to popen.c 1.37 for:
 PR/43023: Bruce Cran: FTPD bug remote crash


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.70.8.1 src/libexec/ftpd/version.h

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

Modified files:

Index: src/libexec/ftpd/version.h
diff -u src/libexec/ftpd/version.h:1.70 src/libexec/ftpd/version.h:1.70.8.1
--- src/libexec/ftpd/version.h:1.70	Tue Sep 16 12:30:38 2008
+++ src/libexec/ftpd/version.h	Mon Apr 12 02:35:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: version.h,v 1.70 2008/09/16 12:30:38 lukem Exp $	*/
+/*	$NetBSD: version.h,v 1.70.8.1 2010/04/12 02:35:02 snj Exp $	*/
 /*-
  * Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,5 +29,5 @@
  */
 
 #ifndef FTPD_VERSION
-#define	FTPD_VERSION	NetBSD-ftpd 20080916
+#define	FTPD_VERSION	NetBSD-ftpd 20100320
 #endif