Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107615351
D34834.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34834.diff
View Options
diff --git a/usr.bin/procstat/procstat.h b/usr.bin/procstat/procstat.h
--- a/usr.bin/procstat/procstat.h
+++ b/usr.bin/procstat/procstat.h
@@ -44,6 +44,7 @@
PS_OPT_SIGNUM = 0x08,
PS_OPT_VERBOSE = 0x10,
PS_MODE_COMPAT = 0x20,
+ PS_MODE_NO_KINFO_PROC = 0x40,
};
#define PS_SUBCOMMAND_OPTS \
diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c
--- a/usr.bin/procstat/procstat.c
+++ b/usr.bin/procstat/procstat.c
@@ -449,7 +449,8 @@
}
/* Must specify either the -a flag or a list of pids. */
- if (!(aflag == 1 && argc == 0) && !(aflag == 0 && argc > 0))
+ if (!(aflag == 1 && argc == 0) && !(aflag == 0 && argc > 0) &&
+ (cmd->cmp & PS_MODE_NO_KINFO_PROC) == 0)
usage(cmd);
if (memf != NULL)
@@ -465,6 +466,11 @@
xo_open_container(progname);
xo_open_container(xocontainer);
+ if ((cmd->cmp & PS_MODE_NO_KINFO_PROC) != 0) {
+ cmd->cmd(prstat, NULL);
+ goto iter;
+ }
+
if (aflag) {
p = procstat_getprocs(prstat, KERN_PROC_PROC, 0, &cnt);
if (p == NULL)
@@ -520,6 +526,7 @@
}
}
+iter:
xo_close_container(xocontainer);
xo_close_container(progname);
xo_finish();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 5:07 PM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15840943
Default Alt Text
D34834.diff (1 KB)
Attached To
Mode
D34834: Add procstat(1) advlocks command
Attached
Detach File
Event Timeline
Log In to Comment