Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147982721
D34834.1785004779.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34834.1785004779.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
Sat, Jul 25, 6:39 PM (19 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29258801
Default Alt Text
D34834.1785004779.diff (1 KB)
Attached To
Mode
D34834: Add procstat(1) advlocks command
Attached
Detach File
Event Timeline
Log In to Comment