1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

- This patch is unnecessary for port version 0.84 added in rev 1.5

of Makefile
- Overlook on port update

PR:		28266
Submitted by:	Patrick Li <pat@databits.net>
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2001-06-21 01:39:21 +00:00
parent b11ce2abb0
commit 099338b1c8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=44267

View File

@ -1,55 +0,0 @@
--- wmtop.c.orig Wed May 17 05:08:20 2000
+++ wmtop.c Wed Sep 20 03:48:43 2000
@@ -78,6 +78,10 @@
*/
int mode = 0;
+#if defined(FREEBSD)
+int show_system = 0;
+#endif
+
#if defined(DEBUG)
/*
* Memory handler
@@ -234,7 +238,7 @@
char deparenthesised_name[WMTOP_BUFLENGTH];
#endif /* defined(LINUX) */
#if defined(FREEBSD)
- int us,um,ks,km;
+ int us,um,ks,km,ppid;
#endif /* defined(FREEBSD) */
#if defined(PARANOID)
@@ -298,11 +302,18 @@
* Extract cpu times from data in /proc/<pid>/stat
* XXX: Process name extractor for FreeBSD is untested right now.
*/
- rc = sscanf(line,"%s %*s %*s %*s %*s %*s %*s %*s %d,%d %d,%d",
- procname,
+ rc = sscanf(line,"%s %*s %d %*s %*s %*s %*s %*s %d,%d %d,%d",
+ procname, &ppid,
&us,&um,&ks,&km);
if (rc<5)
return 1;
+
+ if (ppid == 0 && !show_system)
+ {
+ process->time_stamp=0;
+ return 1;
+ }
+
if (process->name)
wmtop_free(process->name);
process->name = wmtop_strdup(procname);
@@ -725,6 +736,11 @@
i++;
}
break;
+#if defined (FREEBSD)
+ case 'S':
+ show_system = 1;
+ break;
+#endif
case 'r':
if (argc > (i+1)) {
refresh_rate = (atoi(argv[i+1]) * 1000);