summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2018-11-23 07:48:54 +0000
committerPaul Buetow <paul@buetow.org>2018-11-23 07:48:54 +0000
commit7493204e9ba68ae4b9138ffa007ce40798d3380f (patch)
treefe2c41eef1521e074fa3f7778783aea113a27d00
parent7ac43985e49f94b3d78ba86a2210a310b567c272 (diff)
use targetedioriot.ko when targeting a PID
-rw-r--r--ioriot/src/main.c6
1 files changed, 6 insertions, 0 deletions
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));