From 7493204e9ba68ae4b9138ffa007ce40798d3380f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 23 Nov 2018 07:48:54 +0000 Subject: use targetedioriot.ko when targeting a PID --- ioriot/src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ioriot/src/main.c b/ioriot/src/main.c index d7c6204..2b91e46 100644 --- a/ioriot/src/main.c +++ b/ioriot/src/main.c @@ -126,6 +126,7 @@ int main(int argc, char **argv) status_e ret = UNKNOWN; bool dont_drop_caches = false; + bool module_chosen = false; options_s *opts = options_new(); int opt = 0; @@ -195,6 +196,7 @@ int main(int argc, char **argv) case 'm': opts->module = Clone(optarg); Put("Module: %s", opts->module); + module_chosen = true; break; case 'n': opts->name = optarg; @@ -229,6 +231,10 @@ int main(int argc, char **argv) } } + // Use targeted module if we target a PID! + if (opts->pid != -1 && !module_chosen) + opts->module = "targetedioriot.ko"; + if (opts->purge || opts->trash) { // Clean up all temp data of previous test runs Cleanup(cleanup_run(opts)); -- cgit v1.2.3