summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-03-14 03:50:58 +0000
committerMiles Bader <miles@gnu.org>1995-03-14 03:50:58 +0000
commitc5f1c86e6efc008c16fc9a23ed62d52cd13fc278 (patch)
tree81f613911fc984a996451e93126d1eebd461b771
parent6767e41da30408a1adf6327e629760c480d69d94 (diff)
Use ps_contexts now that they exist.
-rw-r--r--utils/ps.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/ps.c b/utils/ps.c
index da2a02fe..0b0e05ac 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -173,6 +173,7 @@ main(int argc, char *argv[])
ps_fmt_t fmt;
proc_stat_list_t procset;
process_t cur_proc = getproc();
+ ps_context_t context;
int cur_pid = getpid();
char *fmt_string = "default", *sort_key_name = NULL;
int filter_mask =
@@ -182,7 +183,11 @@ main(int argc, char *argv[])
program_invocation_short_name = argv[0];
- err = proc_stat_list_create(cur_proc, &procset);
+ err = ps_context_create(cur_proc, &context);
+ if (err)
+ error(1, err, "ps_context_create");
+
+ err = proc_stat_list_create(context, &procset);
if (err)
error(1, err, "proc_stat_list_create");