summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-11-24 17:17:48 +0200
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-11-29 15:11:03 +0200
commit643dc097156fa9a0ab9286c7c159459cfbe3079e (patch)
tree39300c8a838722aff8ef543d736c83b0b905e0d3 /lib/igt_aux.c
parent430946d0b8814dd755c29adb0b38b55c4703d072 (diff)
Revert "lib/igt_aux: Make procps optional"
This reverts commit d7d3f4e87b827152f00bdf89a67871736672b492 and gets rid of the config option from the meson.build. It was needed only for the Android support. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r--lib/igt_aux.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index a41ae2f1..e2424109 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -48,7 +48,9 @@
#include <sys/utsname.h>
#include <termios.h>
#include <assert.h>
-#include <linux/limits.h>
+
+#include <proc/readproc.h>
+
#include "drmtest.h"
#include "i915_drm.h"
#include "intel_chipset.h"
@@ -68,10 +70,6 @@
#include <libgen.h> /* for dirname() */
#endif
-#ifdef HAVE_PROCPS
-#include <proc/readproc.h>
-#endif
-
/**
* SECTION:igt_aux
* @short_description: Auxiliary libraries and support functions
@@ -1296,7 +1294,6 @@ void igt_set_module_param_int(const char *name, int val)
* This function sends the signal @sig for a process found in process table
* with name @comm.
*/
-#ifdef HAVE_PROCPS
int igt_terminate_process(int sig, const char *comm)
{
PROCTAB *proc;
@@ -1321,19 +1318,7 @@ int igt_terminate_process(int sig, const char *comm)
closeproc(proc);
return err;
}
-#else
-#warning "No procps, using naive implementation of igt_terminate_process"
-
-int igt_terminate_process(int sig, const char *comm)
-{
- char pkill_cmd[NAME_MAX];
-
- snprintf(pkill_cmd, sizeof(pkill_cmd), "pkill -x -%d %s", sig, comm);
- return system(pkill_cmd);
-}
-#endif
-#ifdef HAVE_PROCPS
struct pinfo {
pid_t pid;
const char *comm;
@@ -1515,7 +1500,6 @@ __igt_lsof(const char *dir)
closeproc(proc);
}
-#endif
/**
* igt_lsof: Lists information about files opened by processes.
@@ -1524,7 +1508,6 @@ __igt_lsof(const char *dir)
* This function mimics (a restrictive form of) lsof(8), but also shows
* information about opened fds.
*/
-#ifdef HAVE_PROCPS
void
igt_lsof(const char *dpath)
{
@@ -1549,18 +1532,6 @@ igt_lsof(const char *dpath)
free(sanitized);
}
-#else
-#warning "No procps, using naive implementation of igt_lsof"
-
-void
-igt_lsof(const char *dpath)
-{
- char lsof_cmd[NAME_MAX];
-
- snprintf(lsof_cmd, sizeof(lsof_cmd), "lsof +d %s", dpath);
- system(lsof_cmd);
-}
-#endif
static struct igt_siglatency {
timer_t timer;