summaryrefslogtreecommitdiff
path: root/sysdeps/freebsd/procstate.c
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1998-08-07 15:12:04 +0000
committerMartin Baulig <martin@src.gnome.org>1998-08-07 15:12:04 +0000
commit6893d89fd865f226e91e9e3705bab081b1304235 (patch)
tree503e6977bd3886e6843298022c77adf991784fe6 /sysdeps/freebsd/procstate.c
parent35e900692a5d1a8d74c5105bf51da329885eadb3 (diff)
downloadlibgtop-6893d89fd865f226e91e9e3705bab081b1304235.tar.gz
Merged code from Josh Sled.
Diffstat (limited to 'sysdeps/freebsd/procstate.c')
-rw-r--r--sysdeps/freebsd/procstate.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/freebsd/procstate.c b/sysdeps/freebsd/procstate.c
index c33e3a9b..cf8c94d4 100644
--- a/sysdeps/freebsd/procstate.c
+++ b/sysdeps/freebsd/procstate.c
@@ -2,7 +2,7 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
- Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu, July 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -25,7 +25,11 @@
#include <glibtop_suid.h>
-static const unsigned long _glibtop_sysdeps_proc_state = 0;
+static const unsigned long _glibtop_sysdeps_proc_state =
+(1 << GLIBTOP_PROC_STATE_CMD) +
+(1 << GLIBTOP_PROC_STATE_STATE) +
+(1 << GLIBTOP_PROC_STATE_UID) +
+(1 << GLIBTOP_PROC_STATE_GID);
/* Init function. */
@@ -38,10 +42,14 @@ glibtop_init_proc_state_p (glibtop *server)
/* Provides detailed information about a process. */
void
-glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf,
+glibtop_get_proc_state_p (glibtop *server,
+ glibtop_proc_state *buf,
pid_t pid)
{
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
memset (buf, 0, sizeof (glibtop_proc_state));
+
+ /* Set the flags for the data we're about to return*/
+ buf->flags = _glibtop_sysdeps_proc_state;
}