Added initial port for BSD/OS (aka BSDI) 2.x and 3.x. 4.x should also(?)

Thu Apr  8 23:47:29 1999  Timur Bakeyev  <timur@gnu.org>

 	* cpu.c, mem.c, netload.c, procargs.c, procstate.c, proctime.c,
 	sem_limits.c, shm_limits.c, swap.c: Added initial port for BSD/OS
	(aka BSDI) 2.x and 3.x. 4.x should also(?) work.

	Still, this port require more close look and extended check.
This commit is contained in:
Timur Bakeyev
1999-04-08 20:21:38 +00:00
committed by Timur I. Bakeyev
parent 5967e6c3e4
commit fac354623b
14 changed files with 113 additions and 45 deletions

View File

@@ -54,8 +54,10 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
unsigned size = 0, pos = 0;
int count;
#ifndef __bsdi__
char filename [BUFSIZ];
struct stat statb;
#endif
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_ARGS), 0);
@@ -64,8 +66,10 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
/* swapper, init, pagedaemon, vmdaemon, update - this doen't work. */
if (pid < 5) return NULL;
#ifndef __bsdi__
sprintf (filename, "/proc/%d/mem", pid);
if (stat (filename, &statb)) return NULL;
#endif
glibtop_suid_enter (server);