PERFORCE change 152533 for review

Ed Schouten ed at FreeBSD.org
Wed Nov 5 07:23:05 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152533

Change 152533 by ed at ed_dull on 2008/11/05 15:22:56

	IFC snp(4) changes.

Affected files ...

.. //depot/projects/mpsafetty/etc/defaults/rc.conf#9 integrate
.. //depot/projects/mpsafetty/etc/devd.conf#3 integrate
.. //depot/projects/mpsafetty/lib/libutil/Makefile#2 integrate
.. //depot/projects/mpsafetty/lib/libutil/login_cap.c#2 integrate
.. //depot/projects/mpsafetty/lib/libutil/login_class.c#6 integrate
.. //depot/projects/mpsafetty/lib/libutil/pty.c#5 integrate
.. //depot/projects/mpsafetty/lib/libutil/realhostname.c#3 integrate
.. //depot/projects/mpsafetty/libexec/rpc.rquotad/Makefile#2 integrate
.. //depot/projects/mpsafetty/libexec/rpc.rquotad/rquotad.c#2 integrate
.. //depot/projects/mpsafetty/sbin/bsdlabel/bsdlabel.8#2 integrate
.. //depot/projects/mpsafetty/share/misc/committers-doc.dot#2 integrate
.. //depot/projects/mpsafetty/sys/compat/linprocfs/linprocfs.c#8 integrate
.. //depot/projects/mpsafetty/sys/conf/NOTES#17 integrate
.. //depot/projects/mpsafetty/sys/dev/acpi_support/acpi_asus.c#4 integrate
.. //depot/projects/mpsafetty/sys/dev/hwpmc/hwpmc_mod.c#5 integrate
.. //depot/projects/mpsafetty/sys/dev/snp/snp.c#15 integrate
.. //depot/projects/mpsafetty/sys/dev/usb2/wlan/if_zyd2.c#2 integrate
.. //depot/projects/mpsafetty/sys/fs/procfs/procfs.c#2 integrate
.. //depot/projects/mpsafetty/sys/fs/procfs/procfs_map.c#3 integrate
.. //depot/projects/mpsafetty/sys/fs/unionfs/union_vfsops.c#4 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_descrip.c#8 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_proc.c#10 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_sig.c#6 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_thr.c#5 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_thread.c#7 integrate
.. //depot/projects/mpsafetty/sys/kern/subr_sleepqueue.c#8 integrate
.. //depot/projects/mpsafetty/sys/kern/sys_process.c#4 integrate
.. //depot/projects/mpsafetty/sys/kern/vfs_syscalls.c#9 integrate
.. //depot/projects/mpsafetty/sys/modules/Makefile#16 integrate
.. //depot/projects/mpsafetty/sys/modules/snp/Makefile#3 integrate
.. //depot/projects/mpsafetty/sys/net/if_arcsubr.c#3 integrate
.. //depot/projects/mpsafetty/sys/net/if_gif.c#4 integrate
.. //depot/projects/mpsafetty/sys/net/if_spppsubr.c#5 integrate
.. //depot/projects/mpsafetty/sys/net/if_tun.c#6 integrate
.. //depot/projects/mpsafetty/sys/net/radix_mpath.c#2 integrate
.. //depot/projects/mpsafetty/sys/nfsserver/nfs_srvkrpc.c#2 integrate
.. //depot/projects/mpsafetty/sys/security/audit/audit_arg.c#5 integrate
.. //depot/projects/mpsafetty/sys/security/audit/audit_bsm_klib.c#7 integrate
.. //depot/projects/mpsafetty/sys/sys/proc.h#10 integrate
.. //depot/projects/mpsafetty/sys/ufs/ufs/ufs_acl.c#2 integrate
.. //depot/projects/mpsafetty/sys/ufs/ufs/ufs_dirhash.c#5 integrate
.. //depot/projects/mpsafetty/usr.bin/du/du.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/tar/test/main.c#3 integrate
.. //depot/projects/mpsafetty/usr.bin/vmstat/vmstat.c#3 integrate
.. //depot/projects/mpsafetty/usr.sbin/gssd/gssd.8#2 integrate

Differences ...

==== //depot/projects/mpsafetty/etc/defaults/rc.conf#9 (text+ko) ====

@@ -15,7 +15,7 @@
 # For a more detailed explanation of all the rc.conf variables, please
 # refer to the rc.conf(5) manual page.
 #
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.345 2008/09/16 20:18:25 thompsa Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.346 2008/11/05 10:20:33 keramida Exp $
 
 ##############################################################
 ###  Important initial Boot-time options  ####################
@@ -265,6 +265,9 @@
 kpasswdd_server_enable="NO"	# Run kpasswdd (or NO)
 kpasswdd_server="/usr/libexec/kpasswdd"	# path to kerberos 5 passwd daemon
 
+gssd_enable="NO"		# Run the gssd daemon (or NO).
+gssd_flags=""			# Flags for gssd.
+
 rwhod_enable="NO"		# Run the rwho daemon (or NO).
 rwhod_flags=""			# Flags for rwhod
 rarpd_enable="NO"		# Run rarpd (or NO).

==== //depot/projects/mpsafetty/etc/devd.conf#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/devd.conf,v 1.43 2008/10/27 16:20:40 thompsa Exp $
+# $FreeBSD: src/etc/devd.conf,v 1.45 2008/11/04 23:03:36 delphij Exp $
 #
 # Refer to devd.conf(5) and devd(8) man pages for the details on how to
 # run and configure devd.
@@ -255,6 +255,28 @@
 	action "/etc/rc.resume acpi $notify";
 };
 
+# The next blocks enable volume hotkeys that can be found on the Asus laptops
+notify 0 {
+	match "system"		"ACPI";
+	match "subsystem"	"ASUS";
+	match "notify"		"0x32";
+	action			"mixer 0";
+};
+
+notify 0 {
+	match "system"		"ACPI";
+	match "subsystem"	"ASUS";
+	match "notify"		"0x31";
+	action			"mixer vol -10";
+};
+
+notify 0 {
+	match "system"		"ACPI";
+	match "subsystem"	"ASUS";
+	match "notify"		"0x30";
+	action			"mixer vol +10";
+};
+
 # The next blocks enable volume hotkeys that can be found on the Asus EeePC
 # The four keys above the keyboard notify 0x1a through to 0x1d respectively
 notify 0 {

==== //depot/projects/mpsafetty/lib/libutil/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
-#	$FreeBSD: src/lib/libutil/Makefile,v 1.68 2008/07/01 22:30:57 jhb Exp $
+#	$FreeBSD: src/lib/libutil/Makefile,v 1.71 2008/11/05 11:06:10 des Exp $
 
 SHLIBDIR?= /lib
 
@@ -8,13 +8,15 @@
 LIB=	util
 SHLIB_MAJOR= 7
 
-SRCS=	_secure_path.c auth.c gr_util.c expand_number.c flopen.c fparseln.c \
+SRCS=	_secure_path.c auth.c expand_number.c flopen.c fparseln.c \
 	hexdump.c humanize_number.c kld.c login.c login_auth.c login_cap.c \
 	login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \
 	logout.c logwtmp.c pidfile.c property.c pty.c pw_util.c realhostname.c \
 	stub.c trimdomain.c uucplock.c
 INCS=	libutil.h login_cap.h
 
+#WARNS?=	6
+
 CFLAGS+= -DLIBC_SCCS
 
 .if ${MK_INET6_SUPPORT} != "no"

==== //depot/projects/mpsafetty/lib/libutil/login_cap.c#2 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/login_cap.c,v 1.34 2007/06/14 06:42:49 yar Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/login_cap.c,v 1.35 2008/11/04 13:49:53 des Exp $");
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -61,6 +61,8 @@
 static size_t internal_arraysz = 0;
 static const char ** internal_array = NULL;
 
+static char path_login_conf[] = _PATH_LOGIN_CONF;
+
 static char *
 allocstr(const char *str)
 {
@@ -215,15 +217,14 @@
 
 	if (dir && snprintf(userpath, MAXPATHLEN, "%s/%s", dir,
 			    _FILE_LOGIN_CONF) < MAXPATHLEN) {
-	    login_dbarray[i] = userpath;
 	    if (_secure_path(userpath, pwd->pw_uid, pwd->pw_gid) != -1)
-		i++;		/* only use 'secure' data */
+		login_dbarray[i++] = userpath;
 	}
 	/*
 	 * XXX: Why to add the system database if the class is `me'?
 	 */
-	if (_secure_path(_PATH_LOGIN_CONF, 0, 0) != -1)
-	    login_dbarray[i++] = _PATH_LOGIN_CONF;
+	if (_secure_path(path_login_conf, 0, 0) != -1)
+	    login_dbarray[i++] = path_login_conf;
 	login_dbarray[i] = NULL;
 
 	memset(lc, 0, sizeof(login_cap_t));

==== //depot/projects/mpsafetty/lib/libutil/login_class.c#6 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/login_class.c,v 1.29 2008/10/20 16:51:43 des Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/login_class.c,v 1.30 2008/11/04 13:49:53 des Exp $");
 
 #include <sys/param.h>
 #include <sys/cpuset.h>
@@ -142,14 +142,13 @@
 	int	tildes = 0;
 	int	dollas = 0;
 	char	*p;
+	const char *q;
 
 	if (pwd != NULL) {
-	    /* Count the number of ~'s in var to substitute */
-	    for (p = (char *)var; (p = strchr(p, '~')) != NULL; p++)
-		++tildes;
-	    /* Count the number of $'s in var to substitute */
-	    for (p = (char *)var; (p = strchr(p, '$')) != NULL; p++)
-		++dollas;
+	    for (q = var; *q != '\0'; ++q) {
+		tildes += (*q == '~');
+		dollas += (*q == '$');
+	    }
 	}
 
 	np = malloc(strlen(var) + (dollas * nlen)

==== //depot/projects/mpsafetty/lib/libutil/pty.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/pty.c,v 1.24 2008/10/28 06:00:13 ed Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/pty.c,v 1.25 2008/11/04 13:50:50 des Exp $");
 
 #if defined(LIBC_SCCS) && !defined(lint)
 #if 0
@@ -47,6 +47,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <termios.h>
+#include <unistd.h>
 
 int
 openpty(int *amaster, int *aslave, char *name, struct termios *termp,

==== //depot/projects/mpsafetty/lib/libutil/realhostname.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libutil/realhostname.c,v 1.19 2008/10/17 21:21:14 delphij Exp $");
+__FBSDID("$FreeBSD: src/lib/libutil/realhostname.c,v 1.20 2008/11/05 12:13:10 des Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -83,6 +83,18 @@
 	return result;
 }
 
+/*
+ * struct sockaddr has very lax alignment requirements, since all its
+ * members are char or equivalent.  This is a problem when trying to
+ * dereference a struct sockaddr_in6 * that was passed in as a struct
+ * sockaddr *.  Although we know (or trust) that the passed-in struct was
+ * properly aligned, the compiler doesn't, and (rightly) complains.  These
+ * macros perform the cast in a way that the compiler will accept.
+ */
+#define SOCKADDR_IN6(p) ((struct sockaddr_in6 *)(void *)(p))
+#define SOCKADDR_IN(p) ((struct sockaddr_in *)(void *)(p))
+#define SOCKINET(p) ((struct sockinet *)(void *)(p))
+
 int
 realhostname_sa(char *host, size_t hsize, struct sockaddr *addr, int addrlen)
 {
@@ -96,10 +108,10 @@
 	/* IPv4 mapped IPv6 addr consideraton, specified in rfc2373. */
 	if (addr->sa_family == AF_INET6 &&
 	    addrlen == sizeof(struct sockaddr_in6) &&
-	    IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)addr)->sin6_addr)) {
+	    IN6_IS_ADDR_V4MAPPED(&SOCKADDR_IN6(addr)->sin6_addr)) {
 		struct sockaddr_in6 *sin6;
 
-		sin6 = (struct sockaddr_in6 *)addr;
+		sin6 = SOCKADDR_IN6(addr);
 
 		memset(&lsin, 0, sizeof(lsin));
 		lsin.sin_len = sizeof(struct sockaddr_in);
@@ -142,15 +154,16 @@
 			}
 			if (sa->sa_len == addrlen &&
 			    sa->sa_family == addr->sa_family) {
-				((struct sockinet *)sa)->si_port = ((struct sockinet *)addr)->si_port;
+				SOCKINET(sa)->si_port = SOCKINET(addr)->si_port;
 #ifdef INET6
 				/*
 				 * XXX: sin6_socpe_id may not been
 				 * filled by DNS
 				 */
 				if (sa->sa_family == AF_INET6 &&
-				    ((struct sockaddr_in6 *)sa)->sin6_scope_id == 0)
-					((struct sockaddr_in6 *)sa)->sin6_scope_id = ((struct sockaddr_in6 *)addr)->sin6_scope_id;
+				    SOCKADDR_IN6(sa)->sin6_scope_id == 0)
+					SOCKADDR_IN6(sa)->sin6_scope_id =
+					    SOCKADDR_IN6(addr)->sin6_scope_id;
 #endif
 				if (!memcmp(sa, addr, sa->sa_len)) {
 					result = HOSTNAME_FOUND;

==== //depot/projects/mpsafetty/libexec/rpc.rquotad/Makefile#2 (text+ko) ====

@@ -1,9 +1,11 @@
-# $FreeBSD: src/libexec/rpc.rquotad/Makefile,v 1.6 2001/03/26 14:22:07 ru Exp $
+# $FreeBSD: src/libexec/rpc.rquotad/Makefile,v 1.7 2008/11/04 14:17:49 des Exp $
 
 PROG =	rpc.rquotad
 SRCS =	rquotad.c
 MAN  =	rpc.rquotad.8
 
+WARNS ?= 6
+
 DPADD=	${LIBRPCSVC}
 LDADD=	-lrpcsvc
 

==== //depot/projects/mpsafetty/libexec/rpc.rquotad/rquotad.c#2 (text+ko) ====

@@ -1,40 +1,36 @@
 /*
  * by Manuel Bouyer (bouyer at ensta.fr)
- * 
+ *
  * There is no copyright, you can use it as you want.
  */
 
-#ifndef lint
-static const char rcsid[] =
-  "$FreeBSD: src/libexec/rpc.rquotad/rquotad.c,v 1.9 2005/02/14 17:42:57 stefanf Exp $";
-#endif /* not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/libexec/rpc.rquotad/rquotad.c,v 1.10 2008/11/04 14:17:49 des Exp $");
 
 #include <sys/param.h>
-#include <sys/types.h>
 #include <sys/mount.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
-#include <signal.h>
+
+#include <ufs/ufs/quota.h>
+#include <rpc/rpc.h>
+#include <rpcsvc/rquota.h>
+#include <arpa/inet.h>
+#include <netdb.h>
 
 #include <ctype.h>
 #include <errno.h>
 #include <fstab.h>
 #include <grp.h>
 #include <pwd.h>
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <syslog.h>
 #include <unistd.h>
 
-#include <syslog.h>
-
-#include <ufs/ufs/quota.h>
-#include <rpc/rpc.h>
-#include <rpcsvc/rquota.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
 void rquota_service(struct svc_req *request, SVCXPRT *transp);
 void sendquota(struct svc_req *request, SVCXPRT *transp);
 void printerr_reply(SVCXPRT *transp);
@@ -56,15 +52,17 @@
 
 int from_inetd = 1;
 
-void 
+static void
 cleanup(int sig)
 {
+
+	(void) sig;
 	(void) rpcb_unset(RQUOTAPROG, RQUOTAVERS, NULL);
 	exit(0);
 }
 
 int
-main(int argc, char *argv[])
+main(void)
 {
 	SVCXPRT *transp;
 	int ok;
@@ -101,19 +99,22 @@
 		ok = svc_create(rquota_service,
 				RQUOTAPROG, RQUOTAVERS, "udp");
 	if (!ok) {
-		syslog(LOG_ERR, "unable to register (RQUOTAPROG, RQUOTAVERS, %s)", (!from_inetd)?"udp":"(inetd)");
+		syslog(LOG_ERR,
+		    "unable to register (RQUOTAPROG, RQUOTAVERS, %s)",
+		    from_inetd ? "(inetd)" : "udp");
 		exit(1);
 	}
 
-	initfs();		/* init the fs_stat list */
+	initfs();
 	svc_run();
 	syslog(LOG_ERR, "svc_run returned");
 	exit(1);
 }
 
-void 
+void
 rquota_service(struct svc_req *request, SVCXPRT *transp)
 {
+
 	switch (request->rq_proc) {
 	case NULLPROC:
 		(void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
@@ -133,7 +134,7 @@
 }
 
 /* read quota for the specified id, and send it */
-void 
+void
 sendquota(struct svc_req *request, SVCXPRT *transp)
 {
 	struct getquota_args getq_args;
@@ -183,7 +184,7 @@
 	}
 }
 
-void 
+void
 printerr_reply(SVCXPRT *transp)	/* when a reply to a request failed */
 {
 	char name[INET6_ADDRSTRLEN];
@@ -203,7 +204,7 @@
 }
 
 /* initialise the fs_tab list from entries in /etc/fstab */
-void 
+void
 initfs(void)
 {
 	struct fs_stat *fs_current = NULL;
@@ -222,10 +223,12 @@
 		fs_current = (struct fs_stat *) malloc(sizeof(struct fs_stat));
 		fs_current->fs_next = fs_next;	/* next element */
 
-		fs_current->fs_file = malloc(sizeof(char) * (strlen(fs->fs_file) + 1));
+		fs_current->fs_file =
+		    malloc(sizeof(char) * (strlen(fs->fs_file) + 1));
 		strcpy(fs_current->fs_file, fs->fs_file);
 
-		fs_current->qfpathname = malloc(sizeof(char) * (strlen(qfpathname) + 1));
+		fs_current->qfpathname =
+		    malloc(sizeof(char) * (strlen(qfpathname) + 1));
 		strcpy(fs_current->qfpathname, qfpathname);
 
 		stat(fs_current->fs_file, &st);
@@ -242,7 +245,7 @@
  * Return 0 if fail, 1 otherwise
  */
 int
-getfsquota(long id, char   *path, struct dqblk *dqblk)
+getfsquota(long id, char *path, struct dqblk *dqblk)
 {
 	struct stat st_path;
 	struct fs_stat *fs;
@@ -301,8 +304,8 @@
 {
 	static char initname, usrname[100];
 	static char buf[BUFSIZ];
-	char	*opt, *cp;
-	char	*qfextension[] = INITQFNAMES;
+	char *opt, *cp;
+	const char *qfextension[] = INITQFNAMES;
 
 	if (!initname) {
 		sprintf(usrname, "%s%s", qfextension[USRQUOTA], QUOTAFILENAME);
@@ -321,7 +324,8 @@
 		*qfnamep = cp;
 		return (1);
 	}
-	sprintf(buf, "%s/%s.%s", fs->fs_file, QUOTAFILENAME, qfextension[USRQUOTA]);
+	sprintf(buf, "%s/%s.%s", fs->fs_file, QUOTAFILENAME,
+	    qfextension[USRQUOTA]);
 	*qfnamep = buf;
 	return (1);
 }

==== //depot/projects/mpsafetty/sbin/bsdlabel/bsdlabel.8#2 (text+ko) ====

@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)disklabel.8	8.2 (Berkeley) 4/19/94
-.\" $FreeBSD: src/sbin/bsdlabel/bsdlabel.8,v 1.70 2007/12/08 23:41:13 remko Exp $
+.\" $FreeBSD: src/sbin/bsdlabel/bsdlabel.8,v 1.72 2008/11/05 09:28:30 maxim Exp $
 .\"
 .Dd December 8, 2007
 .Dt BSDLABEL 8
@@ -481,7 +481,7 @@
 labels are restricted to a maximum of 2^32-1 sectors.
 This usually means 2TB of disk space.
 Larger disks should be partitioned using another method such as
-.Xr gpt 8 .
+.Xr gpart 8 .
 .Pp
 The various
 .Bx Ns s
@@ -497,5 +497,5 @@
 .Xr disktab 5 ,
 .Xr boot0cfg 8 ,
 .Xr fdisk 8 ,
-.Xr gpt 8 ,
+.Xr gpart 8 ,
 .Xr newfs 8

==== //depot/projects/mpsafetty/share/misc/committers-doc.dot#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/misc/committers-doc.dot,v 1.25 2008/07/03 17:10:18 marcel Exp $
+# $FreeBSD: src/share/misc/committers-doc.dot,v 1.26 2008/11/04 19:20:19 remko Exp $
 
 # This file is meant to list all FreeBSD doc+www committers and describe the
 # mentor-mentee relationships between them.
@@ -66,6 +66,7 @@
 pav [label="Pav Lucistnik\npav at FreeBSD.org\n2005/08/12"]
 pgj [label="Gabor Pali\npgj at FreeBSD.org\n2008/04/21"]
 remko [label="Remko Lodder\nremko at FreeBSD.org\n2004/10/16"]
+rene [label="Rene Ladan\nrene at FreeBSD.org\n2008/11/03"]
 roam [label="Peter Pentchev\nroam at FreeBSD.org\n2003/02/14"]
 simon [label="Simon L. Nielsen\nsimon at FreeBSD.org\n2003/07/20"]
 trhodes [label="Tom Rhodes\ntrhodes at FreeBSD.org\n2002/03/25"]
@@ -116,6 +117,7 @@
 nik -> keramida
 
 remko -> jkois
+remko -> rene
 
 simon -> josef
 simon -> remko

==== //depot/projects/mpsafetty/sys/compat/linprocfs/linprocfs.c#8 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 1999 Pierre Beyssac
  * Copyright (c) 1993 Jan-Simon Pendry
  * Copyright (c) 1993
@@ -42,7 +42,7 @@
 #include "opt_compat.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.125 2008/10/04 14:08:16 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.127 2008/11/05 15:08:09 des Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -318,11 +318,13 @@
 	NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td);
 	flep = NULL;
 	error = namei(&nd);
-	VFS_UNLOCK_GIANT(NDHASGIANT(&nd));
-	if (error != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0)
-		lep = linux_emul_path;
-	else
-		lep = dlep;
+	lep = linux_emul_path;
+	if (error == 0) {
+		if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0)
+			lep = dlep;
+		vrele(nd.ni_vp);
+		VFS_UNLOCK_GIANT(NDHASGIANT(&nd));
+	}
 	lep_len = strlen(lep);
 
 	mtx_lock(&mountlist_mtx);

==== //depot/projects/mpsafetty/sys/conf/NOTES#17 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1514 2008/11/03 00:53:54 scottl Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1515 2008/11/05 15:04:03 ed Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -1278,6 +1278,7 @@
 device		pty		#BSD-style compatibility pseudo ttys
 device		nmdm		#back-to-back tty devices
 device		md		#Memory/malloc disk
+device		snp		#Snoop device - to look at pty/vty/etc..
 device		ccd		#Concatenated disk driver
 device		firmware	#firmware(9) support
 

==== //depot/projects/mpsafetty/sys/dev/acpi_support/acpi_asus.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.38 2008/08/19 22:28:24 rpaulo Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.39 2008/11/04 11:52:50 rpaulo Exp $");
 
 /*
  * Driver for extra ACPI-controlled gadgets (hotkeys, leds, etc) found on
@@ -93,6 +93,9 @@
 	char	*wlan_set;
 
 	void	(*n_func)(ACPI_HANDLE, UINT32, void *);
+
+	char	*lcdd;
+	void	(*lcdd_n_func)(ACPI_HANDLE, UINT32, void *);
 };
 
 struct acpi_asus_led {
@@ -113,6 +116,7 @@
 struct acpi_asus_softc {
 	device_t		dev;
 	ACPI_HANDLE		handle;
+	ACPI_HANDLE		lcdd_handle;
 
 	struct acpi_asus_model	*model;
 	struct sysctl_ctx_list	sysctl_ctx;
@@ -133,6 +137,9 @@
 	int			s_wlan;
 };
 
+static void	acpi_asus_lcdd_notify(ACPI_HANDLE h, UINT32 notify,
+    void *context);
+
 /*
  * We can identify Asus laptops from the string they return
  * as a result of calling the ATK0100 'INIT' method.
@@ -205,6 +212,20 @@
 		.disp_set	= "SDSP"
 	},
 	{
+		.name		= "A8SR",
+		.bled_set	= "BLED",
+		.mled_set	= "MLED",
+		.wled_set	= "WLED",
+		.lcd_get	= NULL,
+		.lcd_set	= "\\_SB.PCI0.SBRG.EC0._Q10",
+		.brn_get	= "GPLV",
+		.brn_set	= "SPLV",
+		.disp_get	= "\\_SB.PCI0.P0P1.VGA.GETD",
+		.disp_set	= "SDSP",
+		.lcdd		= "\\_SB.PCI0.P0P1.VGA.LCDD",
+		.lcdd_n_func	= acpi_asus_lcdd_notify
+	},
+	{
 		.name		= "D1x",
 		.mled_set	= "MLED",
 		.lcd_get	= "\\GP11",
@@ -762,6 +783,22 @@
 	AcpiInstallNotifyHandler(sc->handle, ACPI_SYSTEM_NOTIFY,
 	    sc->model->n_func, dev);
 
+	/* Find and hook the 'LCDD' object */
+	if (sc->model->lcdd != NULL && sc->model->lcdd_n_func != NULL) {
+		ACPI_STATUS res;
+
+		sc->lcdd_handle = NULL;
+		res = AcpiGetHandle((sc->model->lcdd[0] == '\\' ?
+		    NULL : sc->handle), sc->model->lcdd, &(sc->lcdd_handle));
+		if (ACPI_SUCCESS(res)) {
+			AcpiInstallNotifyHandler((sc->lcdd_handle),
+			    ACPI_DEVICE_NOTIFY, sc->model->lcdd_n_func, dev);
+	    	} else {
+	    		printf("%s: unable to find LCD device '%s'\n",
+	    		    __func__, sc->model->lcdd);
+	    	}
+	}
+
 	return (0);
 }
 
@@ -796,6 +833,13 @@
 	/* Remove notify handler */
 	AcpiRemoveNotifyHandler(sc->handle, ACPI_SYSTEM_NOTIFY,
 	    acpi_asus_notify);
+	
+	if (sc->lcdd_handle) {
+		KASSERT(sc->model->lcdd_n_func != NULL,
+		    ("model->lcdd_n_func is NULL, but lcdd_handle is non-zero"));
+		AcpiRemoveNotifyHandler((sc->lcdd_handle),
+		    ACPI_DEVICE_NOTIFY, sc->model->lcdd_n_func);
+	}
 
 	/* Free sysctl tree */
 	sysctl_ctx_free(&sc->sysctl_ctx);
@@ -1165,6 +1209,12 @@
 	} else if (notify == 0x34) {
 		sc->s_lcd = 0;
 		ACPI_VPRINT(sc->dev, acpi_sc, "LCD turned off\n");
+	} else if (notify == 0x86) {
+		acpi_asus_sysctl_set(sc, ACPI_ASUS_METHOD_BRN, sc->s_brn-1);
+		ACPI_VPRINT(sc->dev, acpi_sc, "Brightness decreased\n");
+	} else if (notify == 0x87) {
+		acpi_asus_sysctl_set(sc, ACPI_ASUS_METHOD_BRN, sc->s_brn+1);
+		ACPI_VPRINT(sc->dev, acpi_sc, "Brightness increased\n");
 	} else {
 		/* Notify devd(8) */
 		acpi_UserNotify("ASUS", h, notify);
@@ -1173,6 +1223,31 @@
 }
 
 static void
+acpi_asus_lcdd_notify(ACPI_HANDLE h, UINT32 notify, void *context)
+{
+	struct acpi_asus_softc	*sc;
+	struct acpi_softc	*acpi_sc;
+
+	ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+
+	sc = device_get_softc((device_t)context);
+	acpi_sc = acpi_device_get_parent_softc(sc->dev);
+
+	ACPI_SERIAL_BEGIN(asus);
+	switch (notify) {
+	case 0x87:
+		acpi_asus_sysctl_set(sc, ACPI_ASUS_METHOD_BRN, sc->s_brn-1);
+		ACPI_VPRINT(sc->dev, acpi_sc, "Brightness decreased\n");
+		break;
+	case 0x86:
+		acpi_asus_sysctl_set(sc, ACPI_ASUS_METHOD_BRN, sc->s_brn+1);
+		ACPI_VPRINT(sc->dev, acpi_sc, "Brightness increased\n");
+		break;
+	}
+	ACPI_SERIAL_END(asus);
+}
+
+static void
 acpi_asus_eeepc_notify(ACPI_HANDLE h, UINT32 notify, void *context)
 {
 	struct acpi_asus_softc	*sc;

==== //depot/projects/mpsafetty/sys/dev/hwpmc/hwpmc_mod.c#5 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_mod.c,v 1.36 2008/10/23 20:26:15 des Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_mod.c,v 1.37 2008/11/04 19:04:01 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/eventhandler.h>
@@ -680,9 +680,7 @@
 
 	*fullpath = "unknown";
 	*freepath = NULL;
-	vn_lock(v, LK_CANRECURSE | LK_EXCLUSIVE | LK_RETRY);
 	vn_fullpath(curthread, v, fullpath, freepath);
-	VOP_UNLOCK(v, 0);
 }
 
 /*

==== //depot/projects/mpsafetty/sys/dev/snp/snp.c#15 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/dev/snp/snp.c,v 1.111 2008/11/05 15:04:03 ed Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>

==== //depot/projects/mpsafetty/sys/dev/usb2/wlan/if_zyd2.c#2 (text+ko) ====

@@ -1,6 +1,6 @@
 /*	$OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $	*/
 /*	$NetBSD: if_zyd.c,v 1.7 2007/06/21 04:04:29 kiyohara Exp $	*/
-/*	$FreeBSD: src/sys/dev/usb2/wlan/if_zyd2.c,v 1.1 2008/11/04 02:31:03 alfred Exp $	*/
+/*	$FreeBSD: src/sys/dev/usb2/wlan/if_zyd2.c,v 1.3 2008/11/04 20:57:39 rink Exp $	*/
 
 /*-
  * Copyright (c) 2006 by Damien Bergamini <damien.bergamini at free.fr>
@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb2/wlan/if_zyd2.c,v 1.1 2008/11/04 02:31:03 alfred Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb2/wlan/if_zyd2.c,v 1.3 2008/11/04 20:57:39 rink Exp $");
 
 /*
  * ZyDAS ZD1211/ZD1211B USB WLAN driver
@@ -392,10 +392,10 @@
 		usb2_copy_out(xfer->frbuffers, 0,
 		    &sc->sc_intr_ibuf, actlen);
 
-		switch (cmd->code) {
-		case htole16(ZYD_NOTIF_RETRYSTATUS):
+		switch (le16toh(cmd->code)) {
+		case ZYD_NOTIF_RETRYSTATUS:
 			goto handle_notif_retrystatus;
-		case htole16(ZYD_NOTIF_IORD):
+		case ZYD_NOTIF_IORD:
 			goto handle_notif_iord;
 		default:
 			DPRINTFN(2, "unknown indication: 0x%04x\n",

==== //depot/projects/mpsafetty/sys/fs/procfs/procfs.c#2 (text+ko) ====

@@ -37,7 +37,7 @@
  *
  *	@(#)procfs_vfsops.c	8.7 (Berkeley) 5/10/95
  *
- * $FreeBSD: src/sys/fs/procfs/procfs.c,v 1.18 2008/01/13 14:44:05 attilio Exp $
+ * $FreeBSD: src/sys/fs/procfs/procfs.c,v 1.19 2008/11/04 19:04:01 jhb Exp $
  */
 
 #include <sys/param.h>
@@ -70,17 +70,13 @@
 	char *fullpath = "unknown";
 	char *freepath = NULL;
 	struct vnode *textvp;
-	int err;
 
+	PROC_LOCK(p);
 	textvp = p->p_textvp;
-	VI_LOCK(textvp);
-	vholdl(textvp);
-	err = vn_lock(textvp, LK_EXCLUSIVE | LK_INTERLOCK);
+	vhold(textvp);
+	PROC_UNLOCK(p);
+	vn_fullpath(td, textvp, &fullpath, &freepath);
 	vdrop(textvp);
-	if (err)
-		return (err);
-	vn_fullpath(td, textvp, &fullpath, &freepath);
-	VOP_UNLOCK(textvp, 0);
 	sbuf_printf(sb, "%s", fullpath);
 	if (freepath)
 		free(freepath, M_TEMP);

==== //depot/projects/mpsafetty/sys/fs/procfs/procfs_map.c#3 (text+ko) ====

@@ -32,7 +32,7 @@
  *
  *	@(#)procfs_status.c	8.3 (Berkeley) 2/17/94
  *
- * $FreeBSD: src/sys/fs/procfs/procfs_map.c,v 1.42 2008/10/04 14:08:16 kib Exp $
+ * $FreeBSD: src/sys/fs/procfs/procfs_map.c,v 1.43 2008/11/04 19:04:01 jhb Exp $
  */
 
 #include "opt_compat.h"
@@ -175,10 +175,9 @@
 			shadow_count = obj->shadow_count;
 			VM_OBJECT_UNLOCK(obj);
 			if (vp != NULL) {
+				vn_fullpath(td, vp, &fullpath, &freepath);
 				vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-				vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-				vn_fullpath(td, vp, &fullpath, &freepath);
-				vput(vp);
+				vrele(vp);
 				VFS_UNLOCK_GIANT(vfslocked);
 			}
 		} else {

==== //depot/projects/mpsafetty/sys/fs/unionfs/union_vfsops.c#4 (text+ko) ====

@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)union_vfsops.c	8.20 (Berkeley) 5/20/95
- * $FreeBSD: src/sys/fs/unionfs/union_vfsops.c,v 1.93 2008/11/03 10:38:00 dfr Exp $
+ * $FreeBSD: src/sys/fs/unionfs/union_vfsops.c,v 1.94 2008/11/04 18:54:44 jhb Exp $
  */
 
 #include <sys/param.h>
@@ -268,7 +268,7 @@
 	/*
 	 * Find upper node
 	 */
-	NDINIT(ndp, LOOKUP, FOLLOW | WANTPARENT | LOCKLEAF, UIO_SYSSPACE, target, td);
+	NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, target, td);
 	if ((error = namei(ndp)))
 		return (error);
 
@@ -278,9 +278,6 @@
 	lowerrootvp = mp->mnt_vnodecovered;
 	upperrootvp = ndp->ni_vp;
 
-	vrele(ndp->ni_dvp);
-	ndp->ni_dvp = NULLVP;
-
 	/* create unionfs_mount */
 	ump = (struct unionfs_mount *)malloc(sizeof(struct unionfs_mount),
 	    M_UNIONFSMNT, M_WAITOK | M_ZERO);

==== //depot/projects/mpsafetty/sys/kern/kern_descrip.c#8 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.341 2008/11/03 20:31:00 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.342 2008/11/04 19:04:01 jhb Exp $");
 
 #include "opt_compat.h"
 #include "opt_ddb.h"
@@ -2537,10 +2537,9 @@
 	freepath = NULL;
 	fullpath = "-";
 	FILEDESC_SUNLOCK(fdp);
+	vn_fullpath(curthread, vp, &fullpath, &freepath);
 	vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-	vn_fullpath(curthread, vp, &fullpath, &freepath);
-	vput(vp);
+	vrele(vp);
 	VFS_UNLOCK_GIANT(vfslocked);
 	strlcpy(kif->kf_path, fullpath, sizeof(kif->kf_path));
 	if (freepath != NULL)
@@ -2708,10 +2707,9 @@
 			freepath = NULL;
 			fullpath = "-";
 			FILEDESC_SUNLOCK(fdp);
+			vn_fullpath(curthread, vp, &fullpath, &freepath);
 			vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-			vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-			vn_fullpath(curthread, vp, &fullpath, &freepath);
-			vput(vp);
+			vrele(vp);
 			VFS_UNLOCK_GIANT(vfslocked);
 			strlcpy(kif->kf_path, fullpath,
 			    sizeof(kif->kf_path));

==== //depot/projects/mpsafetty/sys/kern/kern_proc.c#10 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.270 2008/10/31 05:43:19 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_proc.c,v 1.271 2008/11/04 19:04:01 jhb Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kdtrace.h"
@@ -1440,11 +1440,11 @@
 			kve->kve_shadow_count = obj->shadow_count;
 			VM_OBJECT_UNLOCK(obj);
 			if (vp != NULL) {
-				vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-				vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 				vn_fullpath(curthread, vp, &fullpath,
 				    &freepath);
 				cred = curthread->td_ucred;
+				vfslocked = VFS_LOCK_GIANT(vp->v_mount);
+				vn_lock(vp, LK_SHARED | LK_RETRY);
 				if (VOP_GETATTR(vp, &va, cred) == 0) {
 					kve->kve_fileid = va.va_fileid;
 					kve->kve_fsid = va.va_fsid;

==== //depot/projects/mpsafetty/sys/kern/kern_sig.c#6 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.365 2008/10/23 07:55:38 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.366 2008/11/05 03:01:23 davidxu Exp $");
 
 #include "opt_compat.h"
 #include "opt_kdtrace.h"
@@ -2115,15 +2115,19 @@
 			 * Otherwise, process goes back to sleep state.
 			 */
 			p->p_flag &= ~P_STOPPED_SIG;
+			PROC_SLOCK(p);
 			if (p->p_numthreads == p->p_suspcount) {
+				PROC_SUNLOCK(p);
 				p->p_flag |= P_CONTINUED;
 				p->p_xstat = SIGCONT;
 				PROC_LOCK(p->p_pptr);
 				childproc_continued(p);
 				PROC_UNLOCK(p->p_pptr);
+				PROC_SLOCK(p);
 			}
 			if (action == SIG_DFL) {
 				thread_unsuspend(p);
+				PROC_SUNLOCK(p);
 				sigqueue_delete(sigqueue, sig);
 				goto out;
 			}
@@ -2132,12 +2136,14 @@
 				 * The process wants to catch it so it needs
 				 * to run at least one thread, but which one?
 				 */
+				PROC_SUNLOCK(p);
 				goto runfast;
 			}
 			/*
 			 * The signal is not ignored or caught.
 			 */

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list