$OpenBSD: patch-sysdeps_openbsd_glibtop_private_c,v 1.2 2014/02/03 13:50:32 ajacoutot Exp $

RM at next release.

--- sysdeps/openbsd/glibtop_private.c.orig	Thu Jan 23 14:12:40 2014
+++ sysdeps/openbsd/glibtop_private.c	Thu Jan 23 14:12:51 2014
@@ -12,32 +12,6 @@
 #include <glib.h>
 #include <errno.h>
 
-char *
-execute_lsof(pid_t pid) {
-	char *output = NULL;
-	char *lsof;
-	char *command;
-	int   exit_status;
-
-	lsof = g_find_program_in_path("lsof");
-	if (lsof == NULL)
-		return NULL;
-
-	command = g_strdup_printf("%s -n -P -Fftn -p %d", lsof, pid);
-	g_free(lsof);
-
-	if (g_spawn_command_line_sync (command, &output, NULL, &exit_status, NULL)) {
-		if (exit_status != 0) {
-			g_warning("Could not execute \"%s\" (%i)\nMake sure lsof(8) is installed sgid kmem.",
-				   command, exit_status);
-			output = NULL;
-		}
-	}
-
-	g_free(command);
-	return output;
-}
-
 /* Ported from linux/glibtop_private.c */
 gboolean
 safe_readlink(const char *path, char *buf, int bufsiz)
