]> sourceware.org Git - systemtap.git/commitdiff
PR10506 experiment: use /sbin/insmod for uprobes.ko loading
authorFrank Ch. Eigler <fche@elastic.org>
Mon, 10 Aug 2009 16:13:31 +0000 (12:13 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Mon, 10 Aug 2009 16:13:31 +0000 (12:13 -0400)
* runtime/staprun/staprun.c (enable_uprobes): insmod, not insert_module().

runtime/staprun/staprun.c

index c64bf5b302a68b2a0ffd83815e68407fb42bca24..7eb7f28fecc8005153b85ea536c6fbcca8ca8fe8 100644 (file)
@@ -132,9 +132,14 @@ static int enable_uprobes(void)
        snprintf (runtimeko, sizeof(runtimeko), "%s/uprobes/uprobes.ko",
                  (getenv("SYSTEMTAP_RUNTIME") ?: PKGDATADIR "/runtime"));
        dbug(2, "Inserting uprobes module from SystemTap runtime %s.\n", runtimeko);
-       argv[0] = NULL;
+       i = 0;
+       argv[i++] = "/sbin/insmod";
+       argv[i++] = runtimeko;
+       argv[i] = NULL;
+       if (run_as(0, 0, 0, argv[0], argv) == 0)
+               return 0;
 
-       return insert_module(runtimeko, NULL, argv);
+       return 1; /* failure */
 }
 
 static int insert_stap_module(void)
This page took 0.029932 seconds and 5 git commands to generate.