blob: cf70d130e070107368a3e21763a537ba881559f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$NetBSD: patch-cc,v 1.1 2007/11/05 19:06:06 drochner Exp $
--- sysdeps/bsd/procopenfiles.c.orig 2007-04-27 00:27:34.000000000 +0200
+++ sysdeps/bsd/procopenfiles.c
@@ -47,5 +47,30 @@ _glibtop_init_proc_open_files_s (glibtop
glibtop_open_files_entry *
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
{
+ memset(buf, 0, sizeof (glibtop_proc_open_files));
+ return NULL;
+}
+
+#include <glibtop/procwd.h>
+
+static const unsigned long _glibtop_sysdeps_proc_wd =
+(1 << GLIBTOP_PROC_WD_EXE) |
+(1 << GLIBTOP_PROC_WD_ROOT) |
+(1 << GLIBTOP_PROC_WD_NUMBER);
+
+/* Init function. */
+
+void
+_glibtop_init_proc_wd_s (glibtop *server)
+{
+ server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
+}
+
+
+/* XXX Unimplemented on BSD */
+char **
+glibtop_get_proc_wd_s (glibtop *server, glibtop_proc_wd *buf, pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_wd));
return NULL;
}
|