PERFORCE change 51435 for review

Andrew Reisse areisse at FreeBSD.org
Tue Apr 20 14:21:27 GMT 2004


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

Change 51435 by areisse at areisse_ibook on 2004/04/20 07:21:22

	merge sedarwin ps changes into version 63

Affected files ...

.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile.include#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/adv_cmds.rtf#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/cap_mkdb.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/cap_mkdb.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/extern.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/finger.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/finger.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/finger.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/lprint.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/net.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/sprint.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/util.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/Makefile.postamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/fingerd.8#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/fingerd.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/pathnames.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/last.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/last.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/Makefile.dist#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/md.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Japanese#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Makefile.postamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/POSIX#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/ldef.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/lex.l#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/mklocale.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/Makefile#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/README.locale_name#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/bg_BG.CP1251.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/ja_JP.EUC.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/ja_JP.SJIS.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/ko_KR.EUC.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/la_LN.ISO8859-1.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/la_LN.ISO8859-15.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/la_LN.ISO8859-2.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/la_LN.ISO8859-4.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/la_LN.US-ASCII.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/ru_RU.CP866.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/ru_RU.ISO8859-5.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/ru_RU.KOI8-R.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/uk_UA.KOI8-U.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/zh_CN.EUC.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/share/zh_TW.Big5.src#3 branch
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/yacc.y#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.postamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/extern.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/fmt.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/h.template#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/keyword.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/m.template#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/nlist.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/print.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/ps.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/ps.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/ps.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/tasks.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/Makefile.postamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/pstat.8#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/pstat.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/Makefile.dist#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/cchar.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/extern.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/gfmt.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/key.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/modes.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/print.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/stty.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/stty.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/stty.h#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/util.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/tty.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/tty.c#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/Makefile#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/Makefile.preamble#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/PB.project#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/whois.1#3 integrate
.. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/whois.c#3 integrate

Differences ...

==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile.include#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/adv_cmds.rtf#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/cap_mkdb.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/cap_mkdb.tproj/cap_mkdb.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/extern.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/finger.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/finger.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/finger.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/lprint.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/net.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/sprint.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/finger.tproj/util.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/Makefile.postamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/fingerd.8#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/fingerd.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/fingerd.tproj/pathnames.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/last.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/last.tproj/last.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/Makefile.dist#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/md.tproj/md.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Makefile.postamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/ldef.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/lex.l#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/mklocale.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/mklocale.tproj/yacc.y#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile#3 (text+ko) ====

@@ -26,7 +26,7 @@
 NEXTSTEP_INSTALLDIR = /bin
 WINDOWS_INSTALLDIR = /Library/Executables
 PDO_UNIX_INSTALLDIR = /bin
-LIBS = 
+LIBS = ../../../libmac/libmac.a
 DEBUG_LIBS = $(LIBS)
 PROF_LIBS = $(LIBS)
 

==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.postamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/extern.h#3 (text+ko) ====

@@ -55,6 +55,8 @@
 char	*fmt_argv __P((char **, char *, int));
 int	 getpcpu __P((KINFO *));
 double	 getpmem __P((KINFO *));
+void     label(KINFO *, VARENT *);
+int      s_label(KINFO *);
 void	 logname __P((KINFO *, VARENT *));
 void	 longtname __P((KINFO *, VARENT *));
 void	 lstarted __P((KINFO *, VARENT *));

==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/fmt.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/h.template#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/keyword.c#3 (text+ko) ====

@@ -106,6 +106,8 @@
 		NULL, 0, pvar, NULL, 8, POFF(p_traceflag), INT, "x"},
 	{"ktracep", "KTRACEP",
 		NULL, 0, pvar, NULL, 8, POFF(p_tracep), LONG, "lx"},
+        {"label", "LABEL", NULL, LJUST|DSIZ, label, s_label, SHRT_MAX, 0, CHAR,
+	 NULL},
 	{"lim", "LIM", NULL, 0, maxrss, NULL, 5},
 	{"login", "LOGIN", NULL, LJUST, logname, NULL, MAXLOGNAME-1},
 	{"logname", "", "login"},

==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/m.template#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/nlist.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/print.c#3 (text+ko) ====

@@ -45,6 +45,7 @@
 #include <sys/proc.h>
 #include <sys/stat.h>
 
+#include <sys/mac.h>
 #include <sys/ucred.h>
 #include <sys/user.h>
 #include <sys/sysctl.h>
@@ -1090,3 +1091,53 @@
 	else
 		(void)printf("%*s", v->width, "-");
 }
+
+void
+label(KINFO *k, VARENT *ve)
+{
+	char *string;
+	VAR *v;
+	mac_t proclabel;
+	int error;
+
+	v = ve->var;
+	string = NULL;
+	if (mac_prepare_process_label(&proclabel) == -1) {
+		perror("mac_prepare_process_label");
+		goto out;
+	}
+	error = mac_get_pid(KI_PROC(k)->p_pid, proclabel);
+	if (error == 0) {
+		if (mac_to_text(proclabel, &string) == -1)
+			string = NULL;
+	}
+	mac_free(proclabel);
+ out:
+	if (string != NULL) {
+		(void)printf("%-*s", v->width, string);
+		free(string);
+	} else
+		(void)printf("%-*s", v->width, "");
+	return;
+}
+
+int
+s_label(KINFO *k)
+{
+	char *string = NULL;
+	mac_t proclabel;
+	int error, size = 0;
+
+	error = mac_prepare_process_label(&proclabel);
+	if (error != 0) {
+		perror("mac_prepare_process_label");
+		return (0);
+	}
+	error = mac_get_pid(KI_PROC(k)->p_pid, proclabel);
+	if (error == 0 && mac_to_text(proclabel, &string) == 0) {
+		size = strlen(string);
+		free(string);
+	}
+	mac_free(proclabel);
+	return (size);
+}

==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/ps.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/ps.c#3 (text+ko) ====

@@ -108,6 +108,7 @@
 char ufmt[] = "user pid %cpu %mem vsz rss tt state start time command";
 char mfmt[] = "user pid tt %cpu state  pri stime utime command";
 char vfmt[] = "pid state time sl re pagein vsz rss lim tsiz %cpu %mem command";
+char Zfmt[] = "label";
 
 int mflg = 0; /* if -M option to display all mach threads */
 int print_thread_num=0;
@@ -157,9 +158,9 @@
 	memf = _PATH_MEM;
 	while ((ch = getopt(argc, argv,
 #if defined(LAZY_PS)
-	    "aCcefghjLlM:mN:O:o:p:rSTt:U:uvW:wx")) != -1)
+	    "aCcefghjLlM:mN:O:o:p:rSTt:U:uvW:wxZ")) != -1)
 #else
-	    "aCceghjLlMmO:o:p:rSTt:U:uvwx")) != -1)
+	    "aCceghjLlMmO:o:p:rSTt:U:uvwxZ")) != -1)
 #endif
 		switch((char)ch) {
 		case 'a':
@@ -299,6 +300,10 @@
 		case 'x':
 			xflg = 1;
 			break;
+		case 'Z':
+			parsefmt(Zfmt);
+			Zfmt[0] = '\0';
+			break;
 		case '?':
 		default:
 			usage();
@@ -743,7 +748,7 @@
 {
 
 	(void)fprintf(stderr, "%s\n%s\n%s\n",
-	    "usage: ps [-aChjlmMrSTuvwx] [-O|o fmt] [-p pid] [-t tty] [-U user]",
+	    "usage: ps [-aChjlmMrSTuvwxZ] [-O|o fmt] [-p pid] [-t tty] [-U user]",
 	    "          [-N system] [-W swap]",
 	    "       ps [-L]");
 	exit(1);

==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/ps.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/tasks.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/Makefile.postamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/pstat.8#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/pstat.tproj/pstat.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/Makefile.dist#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/cchar.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/extern.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/gfmt.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/key.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/modes.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/print.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/stty.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/stty.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/stty.h#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/stty.tproj/util.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/tty.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/tty.tproj/tty.c#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/Makefile#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/Makefile.preamble#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/PB.project#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/whois.1#3 (text+ko) ====


==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/whois.tproj/whois.c#3 (text+ko) ====

To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list