Note that it does not work better than previous in-tree version but it will give us a better base to fix it. joint work with jasper@ most patches adapted from NetBSD fsusage patch from naddy@ ok jasper@
35 lines
966 B
Plaintext
35 lines
966 B
Plaintext
$OpenBSD: patch-sysdeps_bsd_procopenfiles_c,v 1.1 2008/02/09 16:52:25 ajacoutot Exp $
|
|
--- sysdeps/bsd/procopenfiles.c.orig Sun Dec 30 19:40:10 2007
|
|
+++ sysdeps/bsd/procopenfiles.c Sun Dec 30 19:42:14 2007
|
|
@@ -47,5 +47,30 @@ _glibtop_init_proc_open_files_s (glibtop *server)
|
|
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;
|
|
}
|