Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 20:37:15 -0700 (PDT)
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 12682 for review
Message-ID:  <200206110337.g5B3bFg00575@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12682

Change 12682 by julian@julian_jules1 on 2002/06/10 20:36:40

	MFC:
	 The automatic part is done.
	 not to make it compile/run.

Affected files ...

... //depot/projects/kse/bin/ps/Makefile#5 integrate
... //depot/projects/kse/bin/ps/extern.h#6 integrate
... //depot/projects/kse/bin/ps/fmt.c#6 integrate
... //depot/projects/kse/bin/ps/keyword.c#7 integrate
... //depot/projects/kse/bin/ps/nlist.c#3 integrate
... //depot/projects/kse/bin/ps/print.c#11 integrate
... //depot/projects/kse/bin/ps/ps.1#9 integrate
... //depot/projects/kse/bin/ps/ps.c#9 integrate
... //depot/projects/kse/sys/alpha/alpha/trap.c#24 integrate
... //depot/projects/kse/sys/boot/ofw/libofw/ofw_net.c#5 integrate
... //depot/projects/kse/sys/boot/powerpc/loader/Makefile#5 integrate
... //depot/projects/kse/sys/cam/cam_periph.c#2 integrate
... //depot/projects/kse/sys/compat/svr4/svr4_stream.c#9 integrate
... //depot/projects/kse/sys/conf/NOTES#7 integrate
... //depot/projects/kse/sys/conf/files#36 integrate
... //depot/projects/kse/sys/conf/files.sparc64#17 integrate
... //depot/projects/kse/sys/conf/options#18 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/fil.c#6 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_auth.c#6 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_compat.h#4 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_fil.c#8 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_fil.h#6 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c#4 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_nat.c#7 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_proxy.c#5 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_state.c#5 integrate
... //depot/projects/kse/sys/contrib/ipfilter/netinet/ipl.h#4 integrate
... //depot/projects/kse/sys/dev/ata/ata-all.c#19 integrate
... //depot/projects/kse/sys/dev/hea/eni.h#3 integrate
... //depot/projects/kse/sys/dev/hea/hea_freebsd.c#2 integrate
... //depot/projects/kse/sys/dev/hea/hea_pci.c#2 integrate
... //depot/projects/kse/sys/dev/hfa/hfa_freebsd.c#2 integrate
... //depot/projects/kse/sys/dev/hfa/hfa_pci.c#2 integrate
... //depot/projects/kse/sys/dev/md/md.c#20 integrate
... //depot/projects/kse/sys/dev/pci/pcivar.h#7 integrate
... //depot/projects/kse/sys/dev/sound/isa/ad1816.c#5 integrate
... //depot/projects/kse/sys/geom/geom.h#7 integrate
... //depot/projects/kse/sys/geom/geom_aes.c#2 integrate
... //depot/projects/kse/sys/geom/geom_bsd.c#7 integrate
... //depot/projects/kse/sys/geom/geom_dev.c#6 integrate
... //depot/projects/kse/sys/geom/geom_disk.c#6 integrate
... //depot/projects/kse/sys/geom/geom_event.c#5 integrate
... //depot/projects/kse/sys/geom/geom_gpt.c#4 integrate
... //depot/projects/kse/sys/geom/geom_mbr.c#6 integrate
... //depot/projects/kse/sys/geom/geom_pc98.c#4 integrate
... //depot/projects/kse/sys/geom/geom_slice.c#6 integrate
... //depot/projects/kse/sys/geom/geom_subr.c#7 integrate
... //depot/projects/kse/sys/geom/geom_sunlabel.c#5 integrate
... //depot/projects/kse/sys/i386/i386/trap.c#46 integrate
... //depot/projects/kse/sys/ia64/ia64/ski.c#4 integrate
... //depot/projects/kse/sys/ia64/ia64/trap.c#20 integrate
... //depot/projects/kse/sys/kern/kern_condvar.c#37 integrate
... //depot/projects/kse/sys/kern/kern_exec.c#27 integrate
... //depot/projects/kse/sys/kern/kern_exit.c#52 integrate
... //depot/projects/kse/sys/kern/kern_fork.c#69 integrate
... //depot/projects/kse/sys/kern/kern_ktrace.c#12 integrate
... //depot/projects/kse/sys/kern/kern_proc.c#64 integrate
... //depot/projects/kse/sys/kern/kern_sig.c#56 integrate
... //depot/projects/kse/sys/kern/kern_synch.c#65 integrate
... //depot/projects/kse/sys/kern/subr_kobj.c#2 integrate
... //depot/projects/kse/sys/kern/subr_trap.c#60 integrate
... //depot/projects/kse/sys/kern/subr_witness.c#26 integrate
... //depot/projects/kse/sys/kern/sys_generic.c#25 integrate
... //depot/projects/kse/sys/kern/uipc_syscalls.c#16 integrate
... //depot/projects/kse/sys/kern/vfs_lookup.c#9 integrate
... //depot/projects/kse/sys/netatm/atm_if.h#4 integrate
... //depot/projects/kse/sys/netatm/atm_ioctl.h#3 integrate
... //depot/projects/kse/sys/netgraph/ng_ppp.c#6 integrate
... //depot/projects/kse/sys/netinet/in.c#11 integrate
... //depot/projects/kse/sys/netinet/in_pcb.c#16 integrate
... //depot/projects/kse/sys/netinet/in_pcb.h#11 integrate
... //depot/projects/kse/sys/netinet/ip_divert.c#13 integrate
... //depot/projects/kse/sys/netinet/raw_ip.c#14 integrate
... //depot/projects/kse/sys/netinet/tcp_input.c#20 integrate
... //depot/projects/kse/sys/netinet/tcp_subr.c#13 integrate
... //depot/projects/kse/sys/netinet/tcp_syncache.c#16 integrate
... //depot/projects/kse/sys/netinet/tcp_timer.c#6 integrate
... //depot/projects/kse/sys/netinet/tcp_usrreq.c#10 integrate
... //depot/projects/kse/sys/netinet/tcp_var.h#8 integrate
... //depot/projects/kse/sys/netinet/udp_usrreq.c#14 integrate
... //depot/projects/kse/sys/netinet6/in6_pcb.c#14 integrate
... //depot/projects/kse/sys/netns/spp_usrreq.c#4 integrate
... //depot/projects/kse/sys/powerpc/powerpc/trap.c#14 integrate
... //depot/projects/kse/sys/sparc64/conf/GENERIC#13 integrate
... //depot/projects/kse/sys/sparc64/include/fp.h#10 integrate
... //depot/projects/kse/sys/sparc64/include/smp.h#8 integrate
... //depot/projects/kse/sys/sparc64/include/tlb.h#12 integrate
... //depot/projects/kse/sys/sparc64/sparc64/machdep.c#33 integrate
... //depot/projects/kse/sys/sparc64/sparc64/mp_exception.s#4 integrate
... //depot/projects/kse/sys/sparc64/sparc64/mp_machdep.c#9 integrate
... //depot/projects/kse/sys/sparc64/sparc64/pmap.c#28 integrate
... //depot/projects/kse/sys/sparc64/sparc64/tlb.c#2 integrate
... //depot/projects/kse/sys/sparc64/sparc64/trap.c#28 integrate
... //depot/projects/kse/sys/sys/_lock.h#6 integrate
... //depot/projects/kse/sys/sys/_mutex.h#7 integrate
... //depot/projects/kse/sys/sys/kernel.h#11 integrate
... //depot/projects/kse/sys/sys/kobj.h#2 integrate
... //depot/projects/kse/sys/sys/ktrace.h#3 integrate
... //depot/projects/kse/sys/sys/proc.h#106 integrate
... //depot/projects/kse/sys/ufs/ffs/ffs_vfsops.c#20 integrate
... //depot/projects/kse/sys/vm/uma_core.c#8 integrate
... //depot/projects/kse/sys/vm/vm_map.c#19 integrate
... //depot/projects/kse/sys/vm/vm_map.h#13 integrate
... //depot/projects/kse/usr.bin/w/pr_time.c#3 integrate
... //depot/projects/kse/usr.bin/w/proc_compare.c#6 integrate
... //depot/projects/kse/usr.bin/w/w.c#7 integrate

Differences ...

==== //depot/projects/kse/bin/ps/Makefile#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/bin/ps/Makefile,v 1.19 2002/02/04 03:06:50 kris Exp $
+# $FreeBSD: src/bin/ps/Makefile,v 1.20 2002/06/07 00:01:00 jmallett Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/2/93
 
 PROG=	ps
@@ -10,8 +10,6 @@
 # on large systems.
 #
 CFLAGS+=-DLAZY_PS
-NO_WERROR=1
-WFORMAT=0
 DPADD=	${LIBM} ${LIBKVM}
 LDADD=	-lm -lkvm
 #BINGRP=	kmem

==== //depot/projects/kse/bin/ps/extern.h#6 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)extern.h	8.3 (Berkeley) 4/2/94
- * $FreeBSD: src/bin/ps/extern.h,v 1.19 2002/02/23 21:00:14 bde Exp $
+ * $FreeBSD: src/bin/ps/extern.h,v 1.24 2002/06/08 06:49:15 bde Exp $
  */
 
 struct kinfo;
@@ -41,13 +41,16 @@
 
 extern fixpt_t ccpu;
 extern int cflag, eval, fscale, mempages, nlistread, rawcpu;
+extern time_t now;
 extern int sumrusage, termwidth, totwidth;
 extern VARENT *vhead;
 
 __BEGIN_DECLS
+void	 arguments(KINFO *, VARENT *);
 void	 command(KINFO *, VARENT *);
 void	 cputime(KINFO *, VARENT *);
 int	 donlist(void);
+void	 elapsed(KINFO *, VARENT *);
 const	 char *fmt_argv(char **, char *, size_t);
 double	 getpcpu(const KINFO *);
 void	 kvar(KINFO *, VARENT *);
@@ -65,8 +68,10 @@
 void	 pri(KINFO *, VARENT *);
 void	 printheader(void);
 void	 priorityr(KINFO *, VARENT *);
+void	 rgroupname(KINFO *, VARENT *);
 void	 runame(KINFO *, VARENT *);
 void	 rvar(KINFO *, VARENT *);
+int	 s_rgroupname(KINFO *);
 int	 s_runame(KINFO *);
 int	 s_uname(KINFO *);
 void	 showkey(void);

==== //depot/projects/kse/bin/ps/fmt.c#6 (text+ko) ====

@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 
-__FBSDID("$FreeBSD: src/bin/ps/fmt.c,v 1.22 2002/06/05 01:36:30 jmallett Exp $");
+__FBSDID("$FreeBSD: src/bin/ps/fmt.c,v 1.24 2002/06/07 01:14:05 jmallett Exp $");
 
 #if 0
 #ifndef lint

==== //depot/projects/kse/bin/ps/keyword.c#7 (text+ko) ====

@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 
-__FBSDID("$FreeBSD: src/bin/ps/keyword.c,v 1.44 2002/06/06 18:04:46 jmallett Exp $");
+__FBSDID("$FreeBSD: src/bin/ps/keyword.c,v 1.48 2002/06/08 18:11:52 jmallett Exp $");
 
 #if 0
 #ifndef lint
@@ -85,15 +85,18 @@
 	{"acflag", "ACFLG", NULL, 0, kvar, NULL, 3, KOFF(ki_acflag), USHORT,
 		"x", 0},
 	{"acflg", "", "acflag", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
+	{"args", "COMMAND", NULL, COMM|LJUST|USER, arguments, NULL, 16, 0,
+		CHAR, NULL, 0},
 	{"blocked", "", "sigmask", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
 	{"caught", "", "sigcatch", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
-	{"comm", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0,
+	{"comm", "COMMAND", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR,
+		NULL, 0},
+	{"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0,
 		CHAR, NULL, 0},
-	{"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16,
-		0, CHAR, NULL, 0},
 	{"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d",
 		0},
 	{"cputime", "", "time", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
+	{"etime", "ELAPSED", NULL, USER, elapsed, NULL, 9, 0, CHAR, NULL, 0},
 	{"f", "F", NULL, 0, kvar, NULL, 7, KOFF(ki_flag), INT, "x", 0},
 	{"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
 	{"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
@@ -154,6 +157,8 @@
 		0},
 	{"rgid", "RGID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_rgid),
 		UINT, UIDFMT, 0},
+	{"rgroup", "RGROUP", NULL, LJUST|DSIZ, rgroupname, s_rgroupname,
+		USERLEN, 0, CHAR, NULL, 0},
 	{"rss", "RSS", NULL, 0, kvar, NULL, 4, KOFF(ki_rssize), UINT, "d",
 		0},
 	{"rtprio", "RTPRIO", NULL, 0, priorityr, NULL, 7, KOFF(ki_pri), CHAR,
@@ -235,6 +240,7 @@
 	static struct varent *vtail;
 	char *tempstr, *tempstr1;
 
+#define		FMTSEP	" \t,\n"
 	tempstr1 = tempstr = strdup(p);
 	while (tempstr && *tempstr) {
 		char *cp;
@@ -242,10 +248,18 @@
 		struct varent *vent;
 
 		/*
-		 * Seperate the format by commas.
+		 * If an item contains an equals sign, it specifies a column
+		 * header, may contain embedded separator characters and
+		 * is always the last item.	
 		 */
-		while ((cp = strsep(&tempstr, ",")) != NULL && *cp == '\0')
-			/* void */;
+		if (tempstr[strcspn(tempstr, "="FMTSEP)] != '=')
+			while ((cp = strsep(&tempstr, FMTSEP)) != NULL &&
+			    *cp == '\0')
+				/* void */;
+		else {
+			cp = tempstr;
+			tempstr = NULL;
+		}
 		if (cp == NULL || !(v = findvar(cp)))
 			continue;
 		if ((vent = malloc(sizeof(struct varent))) == NULL)

==== //depot/projects/kse/bin/ps/nlist.c#3 (text+ko) ====

@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 
-__FBSDID("$FreeBSD: src/bin/ps/nlist.c,v 1.16 2002/02/03 14:43:04 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/ps/nlist.c,v 1.17 2002/06/06 20:59:15 jmallett Exp $");
 
 #if 0
 #ifndef lint
@@ -59,13 +59,13 @@
 	size_t oldlen;
 
 	oldlen = sizeof(ccpu);
-	if (sysctlbyname("kern.ccpu", &ccpu, &oldlen, NULL, 0) < 0)
+	if (sysctlbyname("kern.ccpu", &ccpu, &oldlen, NULL, 0) == -1)
 		return (1);
 	oldlen = sizeof(fscale);
-	if (sysctlbyname("kern.fscale", &fscale, &oldlen, NULL, 0) < 0)
+	if (sysctlbyname("kern.fscale", &fscale, &oldlen, NULL, 0) == -1)
 		return (1);
 	oldlen = sizeof(mempages);
-	if (sysctlbyname("hw.availpages", &mempages, &oldlen, NULL, 0) < 0)
+	if (sysctlbyname("hw.availpages", &mempages, &oldlen, NULL, 0) == -1)
 		return (1);
 	nlistread = 1;
 	return (0);

==== //depot/projects/kse/bin/ps/print.c#11 (text+ko) ====

@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 
-__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.61 2002/06/05 18:11:25 jmallett Exp $");
+__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.66 2002/06/07 00:00:29 jmallett Exp $");
 
 #if 0
 #ifndef lint
@@ -91,6 +91,36 @@
 }
 
 void
+arguments(KINFO *k, VARENT *ve)
+{
+	VAR *v;
+	int left;
+	char *cp, *vis_args;
+
+	v = ve->var;
+
+	if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL)
+		errx(1, "malloc failed");
+	strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH);
+
+	if (ve->next == NULL) {
+		/* last field */
+		if (termwidth == UNLIMITED) {
+			(void)printf("%s", vis_args);
+		} else {
+			left = termwidth - (totwidth - v->width);
+			if (left < 1) /* already wrapped, just use std width */
+				left = v->width;
+			for (cp = vis_args; --left >= 0 && *cp != '\0';)
+				(void)putchar(*cp++);
+		}
+	} else {
+		(void)printf("%-*.*s", v->width, v->width, vis_args);
+	}
+	free(vis_args);
+}
+
+void
 command(KINFO *k, VARENT *ve)
 {
 	VAR *v;
@@ -250,8 +280,7 @@
 	VAR *v;
 
 	v = ve->var;
-	(void)printf("%-*s",
-	    (int)v->width, user_from_uid(k->ki_p->ki_uid, 0));
+	(void)printf("%-*s", v->width, user_from_uid(k->ki_p->ki_uid, 0));
 }
 
 int
@@ -261,13 +290,27 @@
 }
 
 void
+rgroupname(KINFO *k, VARENT *ve)
+{
+	VAR *v;
+
+	v = ve->var;
+	(void)printf("%-*s", v->width, group_from_gid(k->ki_p->ki_rgid, 0));
+}
+
+int
+s_rgroupname(KINFO *k)
+{
+	return (strlen(group_from_gid(k->ki_p->ki_rgid, 0)));
+}
+
+void
 runame(KINFO *k, VARENT *ve)
 {
 	VAR *v;
 
 	v = ve->var;
-	(void)printf("%-*s",
-	    (int)v->width, user_from_uid(k->ki_p->ki_ruid, 0));
+	(void)printf("%-*s", v->width, user_from_uid(k->ki_p->ki_ruid, 0));
 }
 
 int
@@ -333,7 +376,6 @@
 started(KINFO *k, VARENT *ve)
 {
 	VAR *v;
-	static time_t now;
 	time_t then;
 	struct tm *tp;
 	char buf[100];
@@ -350,8 +392,6 @@
 
 	then = k->ki_p->ki_start.tv_sec;
 	tp = localtime(&then);
-	if (!now)
-		(void)time(&now);
 	if (now - k->ki_p->ki_start.tv_sec < 24 * 3600) {
 		(void)strftime(buf, sizeof(buf) - 1,
 		use_ampm ? "%l:%M%p" : "%k:%M  ", tp);
@@ -492,6 +532,21 @@
 	(void)printf("%*s", v->width, obuff);
 }
 
+void
+elapsed(KINFO *k, VARENT *ve)
+{
+	VAR *v;
+	time_t secs;
+	char obuff[128];
+
+	v = ve->var;
+
+	secs = now - k->ki_p->ki_start.tv_sec;
+	(void)snprintf(obuff, sizeof(obuff), "%3ld:%02ld", (long)secs/60,
+	    (long)secs%60);
+	(void)printf("%*s", v->width, obuff);
+}
+
 double
 getpcpu(const KINFO *k)
 {
@@ -688,5 +743,5 @@
 	VAR *v;
 
 	v = ve->var;
-	(void)printf("%-*d", (int)v->width, get_lattr(k->ki_p->ki_pid));
+	(void)printf("%-*d", v->width, get_lattr(k->ki_p->ki_pid));
 }

==== //depot/projects/kse/bin/ps/ps.1#9 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)ps.1	8.3 (Berkeley) 4/18/94
-.\" $FreeBSD: src/bin/ps/ps.1,v 1.48 2002/06/06 18:10:12 jmallett Exp $
+.\" $FreeBSD: src/bin/ps/ps.1,v 1.55 2002/06/10 22:48:51 jmallett Exp $
 .\"
 .Dd April 18, 1994
 .Dt PS 1
@@ -130,8 +130,11 @@
 This causes the printed header to use the specified string instead of
 the standard header.
 .It Fl o
-Display information associated with the space or comma separated list
-of keywords specified.
+Display information associated with the space or comma separated
+list of keywords specified.
+Multiple keywords may also be given in the form of more than one
+.Fl o
+option.
 Keywords may be appended with an equals (``='') sign and a string.
 This causes the printed header to use the specified string instead of
 the standard header.
@@ -370,10 +373,16 @@
 percentage memory usage (alias pmem)
 .It acflag
 accounting flag (alias acflg)
+.It args
+command and arguments
 .It comm
-command and arguments (alias command)
+command 
+.It command
+command and arguments
 .It cpu
 short-term cpu usage factor (for scheduling)
+.It etime
+elapsed running time
 .It flags
 the process flags, in hexadecimal (alias f)
 .It inblk
@@ -438,6 +447,8 @@
 .It rgid
 real group
 .Tn ID
+.It rgroup
+group name (from rgid)
 .It rlink
 reverse link on run queue, or 0
 .It rss
@@ -544,6 +555,11 @@
 .Xr pstat 8 ,
 .Xr sysctl 8 ,
 .Xr mutex 9
+.Sh HISTORY
+The
+.Nm
+command appeared in
+.At v4 .
 .Sh BUGS
 Since
 .Nm

==== //depot/projects/kse/bin/ps/ps.c#9 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.53 2002/06/05 18:11:25 jmallett Exp $");
+__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.54 2002/06/06 21:21:25 jmallett Exp $");
 
 #ifndef lint
 static const char copyright[] =
@@ -81,6 +81,8 @@
 int	termwidth;		/* width of screen (0 == infinity) */
 int	totwidth;		/* calculated width of requested variables */
 
+time_t	now;			/* current time(3) value */
+
 static int needuser, needcomm, needenv;
 #if defined(LAZY_PS)
 static int forceuread=0;
@@ -128,6 +130,8 @@
 	const char *nlistf, *memf;
 
 	(void) setlocale(LC_ALL, "");
+	/* Set the time to what it is right now. */
+	time(&now);
 
 	if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0')
 		termwidth = atoi(cols);

==== //depot/projects/kse/sys/alpha/alpha/trap.c#24 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.93 2002/05/16 00:03:32 gallatin Exp $ */
+/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.94 2002/06/07 05:47:34 jhb Exp $ */
 /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */
 
 /*
@@ -734,18 +734,17 @@
 		break;
 	}
 
+#ifdef KTRACE
+	if (KTRPOINT(td, KTR_SYSCALL))
+	    ktrsyscall(code, (callp->sy_narg & SYF_ARGMASK), args + hidden);
+#endif
 	/*
 	 * Try to run the syscall without the MP lock if the syscall
 	 * is MP safe
 	 */
-	if ((callp->sy_narg & SYF_MPSAFE) == 0) {
+	if ((callp->sy_narg & SYF_MPSAFE) == 0)
 		mtx_lock(&Giant);
-	}
-#ifdef KTRACE
-	if (KTRPOINT(p, KTR_SYSCALL)) {
-		ktrsyscall(p->p_tracep, code, (callp->sy_narg & SYF_ARGMASK), args + hidden);
-	}
-#endif
+
 	if (error == 0) {
 		td->td_retval[0] = 0;
 		td->td_retval[1] = 0;
@@ -780,20 +779,17 @@
 	}
 
 	userret(td, framep, sticks);
-#ifdef KTRACE
-	if (KTRPOINT(p, KTR_SYSRET)) {
-		ktrsysret(p->p_tracep, code, error, td->td_retval[0]);
-	}
-#endif
 	
 	/*
-	 * Release Giant if we had to get it.  Don't use mtx_owned(),
-	 * we want to catch broken syscalls.
+	 * Release Giant if we had to get it.
 	 */
-	if ((callp->sy_narg & SYF_MPSAFE) == 0) {
+	if ((callp->sy_narg & SYF_MPSAFE) == 0)
 		mtx_unlock(&Giant);
-	}
 
+#ifdef KTRACE
+	if (KTRPOINT(td, KTR_SYSRET))
+		ktrsysret(code, error, td->td_retval[0]);
+#endif
 	/*
 	 * This works because errno is findable through the
 	 * register set.  If we ever support an emulation where this

==== //depot/projects/kse/sys/boot/ofw/libofw/ofw_net.c#5 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/boot/ofw/libofw/ofw_net.c,v 1.5 2002/02/23 04:31:30 jake Exp $
+ * $FreeBSD: src/sys/boot/ofw/libofw/ofw_net.c,v 1.6 2002/06/07 11:49:33 benno Exp $
  */
 
 #include <sys/param.h>
@@ -210,7 +210,8 @@
 #endif
 
 #ifndef __sparc64__
-	if (OF_call_method("dma-alloc", netinstance, 1, 1, NULL, &dmabuf)
+	dmabuf = NULL;
+	if (OF_call_method("dma-alloc", netinstance, 1, 1, (64 * 1024), &dmabuf)
 	    < 0) {   
 		printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf);
 		goto punt;

==== //depot/projects/kse/sys/boot/powerpc/loader/Makefile#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.8 2002/05/10 09:26:34 obrien Exp $
+# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.9 2002/06/07 11:49:56 benno Exp $
 
 BASE=		loader
 PROG=		${BASE}
@@ -58,12 +58,12 @@
 # where to get libstand from
 #XXX need a better way to do this
 LIBSTAND=	${.CURDIR}/../../../../lib/libstand/libstand.a
-#.if !exists(${LIBSTAND})
-#LIBSTAND=	${.OBJDIR}/../../../../lib/libstand/libstand.a
-#.if !exists(${LIBSTAND})
-#LIBSTAND=	-lstand
-#.endif
-#.endif
+.if !exists(${LIBSTAND})
+LIBSTAND=	${.OBJDIR}/../../../../lib/libstand/libstand.a
+.if !exists(${LIBSTAND})
+LIBSTAND=	-lstand
+.endif
+.endif
 CFLAGS+=	-I${.CURDIR}/../../../../lib/libstand/
 
 # OpenFirmware is expecting ELF components

==== //depot/projects/kse/sys/cam/cam_periph.c#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/cam/cam_periph.c,v 1.38 2001/07/30 00:44:32 mjacob Exp $
+ * $FreeBSD: src/sys/cam/cam_periph.c,v 1.39 2002/06/07 23:51:30 mjacob Exp $
  */
 
 #include <sys/param.h>
@@ -1253,6 +1253,10 @@
 			}
 			*timeout = 0;
 			error = ERESTART;
+			if (bootverbose) {
+				xpt_print_path(ccb->ccb_h.path);
+				printf("Queue Full\n");
+			}
 			break;
 		}
 		/* FALLTHROUGH */
@@ -1262,6 +1266,10 @@
 		 * Restart the queue after either another
 		 * command completes or a 1 second timeout.
 		 */
+		if (bootverbose) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Device Busy\n");
+		}
 	 	if (ccb->ccb_h.retry_count > 0) {
 	 		ccb->ccb_h.retry_count--;
 			error = ERESTART;
@@ -1273,9 +1281,13 @@
 		}
 		break;
 	case SCSI_STATUS_RESERV_CONFLICT:
+		xpt_print_path(ccb->ccb_h.path);
+		printf("Reservation Conflict\n");
 		error = EIO;
 		break;
 	default:
+		xpt_print_path(ccb->ccb_h.path);
+		printf("SCSI Status 0x%x\n", ccb->csio.scsi_status);
 		error = EIO;
 		break;
 	}
@@ -1374,7 +1386,7 @@
 			error = 0;
 			break;
 		case SS_RETRY:
-			action_string = "Retrying Command";
+			action_string = "Retrying Command (per Sense Data)";
 			error = ERESTART;
 			break;
 		case SS_FAIL:
@@ -1482,11 +1494,10 @@
 sense_error_done:
 		if ((err_action & SSQ_PRINT_SENSE) != 0
 		 && (ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0) {
-#if 0
-			scsi_sense_print(&print_ccb->csio);
-#endif
 			cam_error_print(print_ccb, CAM_ESF_ALL, CAM_EPF_ALL);
 			xpt_print_path(ccb->ccb_h.path);
+			if (bootverbose)
+				scsi_sense_print(&print_ccb->csio);
 			printf("%s\n", action_string);
 		}
 	}
@@ -1505,7 +1516,7 @@
 	const char *action_string;
 	cam_status  status;
 	int	    frozen;
-	int	    error;
+	int	    error, printed = 0;
 	int         openings;
 	u_int32_t   relsim_flags;
 	u_int32_t   timeout;
@@ -1535,10 +1546,36 @@
 		error = EIO;	/* we have to kill the command */
 		break;
 	case CAM_REQ_CMP_ERR:
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Request completed with CAM_REQ_CMP_ERR\n");
+			printed++;
+		}
 	case CAM_CMD_TIMEOUT:
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Command timed out");
+			printed++;
+		}
 	case CAM_UNEXP_BUSFREE:
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Unexpected Bus Free");
+			printed++;
+		}
 	case CAM_UNCOR_PARITY:
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Uncorrected Parity Error");
+			printed++;
+		}
 	case CAM_DATA_RUN_ERR:
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Data Overrun");
+			printed++;
+		}
+		error = EIO;	/* we have to kill the command */
 		/* decrement the number of retries */
 		if (ccb->ccb_h.retry_count > 0) {
 			ccb->ccb_h.retry_count--;
@@ -1563,6 +1600,11 @@
 
 				ccb->ccb_h.retry_count--;
 				error = ERESTART;
+				if (bootverbose && printed == 0) {
+					xpt_print_path(ccb->ccb_h.path);
+					printf("Selection Timeout");
+					printed++;
+				}
 
 				/*
 				 * Wait a second to give the device
@@ -1607,10 +1649,23 @@
 		 * these events and should be unconditionally
 		 * retried.
 		 */
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			if (status == CAM_BDR_SENT)
+				printf("Bus Device Reset sent\n");
+			else
+				printf("Bus Reset issued\n");
+			printed++;
+		}
 		/* FALLTHROUGH */
 	case CAM_REQUEUE_REQ:
 		/* Unconditional requeue */
 		error = ERESTART;
+		if (bootverbose && printed == 0) {
+			xpt_print_path(ccb->ccb_h.path);
+			printf("Request Requeued\n");
+			printed++;
+		}
 		break;
 	case CAM_RESRC_UNAVAIL:
 	case CAM_BUSY:
@@ -1620,6 +1675,11 @@
 		if (ccb->ccb_h.retry_count > 0) {
 			ccb->ccb_h.retry_count--;
 			error = ERESTART;
+			if (bootverbose && printed == 0) {
+				xpt_print_path(ccb->ccb_h.path);
+				printf("CAM Status 0x%x\n", status);
+				printed++;
+			}
 		} else {
 			error = EIO;
 			action_string = "Retries Exhausted";

==== //depot/projects/kse/sys/compat/svr4/svr4_stream.c#9 (text+ko) ====

@@ -27,7 +27,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.28 2002/03/20 05:41:38 alfred Exp $
+ * $FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.29 2002/06/07 05:36:16 jhb Exp $
  */
 
 /*
@@ -227,7 +227,7 @@
 		if (error == 0) {
 			ktruio.uio_iov = ktriov;
 			ktruio.uio_resid = td->td_retval[0];
-			ktrgenio(td->td_proc->p_tracep, s, UIO_WRITE, &ktruio, error);
+			ktrgenio(s, UIO_WRITE, &ktruio, error);
 		}
 		FREE(ktriov, M_TEMP);
 	}
@@ -299,7 +299,7 @@
 		if (error == 0) {
 			ktruio.uio_iov = ktriov;
 			ktruio.uio_resid = len - auio.uio_resid;
-			ktrgenio(td->td_proc->p_tracep, s, UIO_READ, &ktruio, error);
+			ktrgenio(s, UIO_READ, &ktruio, error);
 		}
 		FREE(ktriov, M_TEMP);
 	}

==== //depot/projects/kse/sys/conf/NOTES#7 (text+ko) ====

@@ -14,7 +14,7 @@
 # This file contains machine independent kernel configuration notes.  For
 # machine dependent notes, look in /sys/<arch>/conf/NOTES.
 #
-# $FreeBSD: src/sys/conf/NOTES,v 1.1036 2002/06/06 16:35:55 gibbs Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1039 2002/06/10 18:49:37 phk Exp $
 #
 
 #
@@ -102,7 +102,6 @@
 
 options	GEOM				# Use the GEOMetry system for
 					# disk-I/O transformations.
-options	GEOM_GPT			# Include support for GPT disks.
 
 #
 # The root device and filesystem type can be compiled in;
@@ -216,9 +215,16 @@
 options 	GDB_REMOTE_CHAT
 
 #
-# KTRACE enables the system-call tracing facility ktrace(2).
+# KTRACE enables the system-call tracing facility ktrace(2).  To be more
+# SMP-friendly, KTRACE uses a worker thread to process most trace events
+# asynchronously to the thread generating the event.  This requires a
+# pre-allocated store of objects representing trace events.  The
+# KTRACE_REQUEST_POOL option specifies the initial size of this store.
+# The size of the pool can be adjusted both at boottime and runtime via
+# the kern.ktrace_request_pool tunable and sysctl.
 #
 options 	KTRACE			#kernel tracing
+options 	KTRACE_REQUEST_POOL=101
 
 #
 # KTR is a kernel tracing mechanism imported from BSD/OS.  Currently it
@@ -554,8 +560,8 @@
 options 	ATM_SIGPVC		#SIGPVC signalling manager
 options 	ATM_SPANS		#SPANS signalling manager
 options 	ATM_UNI			#UNI signalling manager
-# Broken:
-##device	hea			#Efficient ENI-155p ATM PCI
+
+device		hea			#Efficient ENI-155p ATM PCI
 device		hfa			#FORE PCA-200E ATM PCI
 
 

==== //depot/projects/kse/sys/conf/files#36 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.644 2002/06/06 16:35:55 gibbs Exp $
+# $FreeBSD: src/sys/conf/files,v 1.646 2002/06/10 18:49:37 phk Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -358,14 +358,14 @@
 dev/gem/if_gem_pci.c	optional gem pci
 dev/gx/if_gx.c		optional gx
 dev/hea/eni.c		optional hea nowerror
-dev/hea/eni_buffer.c	optional hea
+dev/hea/eni_buffer.c	optional hea nowerror
 dev/hea/eni_globals.c	optional hea
 dev/hea/eni_if.c	optional hea
 dev/hea/eni_init.c	optional hea
 dev/hea/eni_intr.c	optional hea
 dev/hea/eni_receive.c	optional hea
 dev/hea/eni_transmit.c	optional hea
-dev/hea/eni_vcm.c	optional hea
+dev/hea/eni_vcm.c	optional hea nowerror
 dev/hea/hea_pci.c	optional hea pci
 dev/hea/hea_freebsd.c	optional hea
 dev/hfa/fore_buffer.c	optional hfa
@@ -732,7 +732,7 @@
 geom/geom_dump.c	optional geom
 geom/geom_enc.c	optional geom
 geom/geom_event.c	optional geom
-geom/geom_gpt.c	optional geom geom_gpt
+geom/geom_gpt.c	optional geom
 geom/geom_io.c	optional geom
 geom/geom_kern.c	optional geom
 geom/geom_mbr.c	optional geom

==== //depot/projects/kse/sys/conf/files.sparc64#17 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.sparc64,v 1.20 2002/05/29 06:08:45 jake Exp $
+# $FreeBSD: src/sys/conf/files.sparc64,v 1.21 2002/06/08 07:17:18 jake Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -41,8 +41,6 @@
 sparc64/sparc64/eeprom.c	optional	eeprom
 sparc64/sparc64/eeprom_ebus.c	optional	eeprom ebus
 sparc64/sparc64/eeprom_sbus.c	optional	eeprom sbus
-sparc64/sparc64/emul.c		standard
-sparc64/sparc64/fp.c		standard
 sparc64/sparc64/identcpu.c	standard
 sparc64/sparc64/in_cksum.c	optional	inet
 sparc64/sparc64/intr_machdep.c	standard

==== //depot/projects/kse/sys/conf/options#18 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.321 2002/06/06 16:35:55 gibbs Exp $
+# $FreeBSD: src/sys/conf/options,v 1.324 2002/06/10 18:49:38 phk Exp $
 #
 #        On the handling of kernel options
 #
@@ -63,8 +63,7 @@
 
 # Miscellaneous options.
 GEOM		opt_geom.h
-GEOM_GPT	opt_geom.h		# Add support for GUID Partition
-					# Tables (GPTs).
+
 ADAPTIVE_MUTEXES
 COMPAT_43	opt_compat.h
 COMPAT_SUNOS	opt_compat.h
@@ -77,6 +76,7 @@
 NODEVFS		opt_devfs.h
 HW_WDOG
 KTRACE
+KTRACE_REQUEST_POOL	opt_ktrace.h
 LIBICONV
 MD_ROOT		opt_md.h
 MD_ROOT_SIZE	opt_md.h

==== //depot/projects/kse/sys/contrib/ipfilter/netinet/fil.c#6 (text+ko) ====

@@ -99,7 +99,7 @@
 
 #if !defined(lint)
 static const char sccsid[] = "@(#)fil.c	1.36 6/5/96 (C) 1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.30 2002/04/27 16:56:25 darrenr Exp $";
+static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.31 2002/06/07 08:56:30 darrenr Exp $";
 #endif
 
 #ifndef	_KERNEL
@@ -1517,7 +1517,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)uipc_mbuf.c	8.2 (Berkeley) 1/4/94
- * $Id: fil.c,v 2.35.2.60 2002/04/26 10:20:34 darrenr Exp $
+ * $Id: fil.c,v 2.35.2.61 2002/06/05 08:18:09 darrenr Exp $
  */
 /*
  * Copy data from an mbuf chain starting "off" bytes from the beginning,
@@ -1632,7 +1632,6 @@
 		fgp = &ipfgroups[0][set];
 	else
 		return NULL;
-	num &= 0xffff;
 
 	while ((fg = *fgp))
 		if (fg->fg_num == num)

==== //depot/projects/kse/sys/contrib/ipfilter/netinet/ip_auth.c#6 (text+ko) ====

@@ -105,7 +105,7 @@
 
 #if !defined(lint)
 /* static const char rcsid[] = "@(#)$Id: ip_auth.c,v 2.11.2.12 2001/07/18 14:57:08 darrenr Exp $"; */
-static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.c,v 1.28 2002/04/25 03:31:39 darrenr Exp $";
+static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.c,v 1.29 2002/06/07 08:56:30 darrenr Exp $";
 #endif
 
 
@@ -613,7 +613,10 @@
 		} else
 			faep = &fae->fae_next;

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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206110337.g5B3bFg00575>