diff options
author | fche <fche> | 2005-08-19 15:55:39 +0000 |
---|---|---|
committer | fche <fche> | 2005-08-19 15:55:39 +0000 |
commit | 0aaf677efbf70fd173d241c01632b4eacc8226e5 (patch) | |
tree | 011aac91bb983ba9f31b3bbee4829a7365d306f9 /runtime/stpd/stpd.c | |
parent | 37908791bf273ecdf073a8bd848501d2137cd71a (diff) | |
download | systemtap-steved-0aaf677efbf70fd173d241c01632b4eacc8226e5.tar.gz systemtap-steved-0aaf677efbf70fd173d241c01632b4eacc8226e5.tar.xz systemtap-steved-0aaf677efbf70fd173d241c01632b4eacc8226e5.zip |
2005-08-19 Frank Ch. Eigler <fche@elastic.org>
* librelay.c (modpath): New global. Use it for insmod only.
* stpd.c (main): Set both modpath and modname, to support
modules specified by full path name.
Diffstat (limited to 'runtime/stpd/stpd.c')
-rw-r--r-- | runtime/stpd/stpd.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/stpd/stpd.c b/runtime/stpd/stpd.c index db0f328e..0a4cf57a 100644 --- a/runtime/stpd/stpd.c +++ b/runtime/stpd/stpd.c @@ -37,6 +37,7 @@ int merge = 1; int verbose = 0; unsigned int buffer_size = 0; char *modname = NULL; +char *modpath = NULL; /* relayfs base file name */ static char stpd_filebase[1024]; @@ -104,7 +105,15 @@ int main(int argc, char **argv) } if (optind < argc) - modname = argv[optind++]; + { + /* Collect both full path and just the trailing module name. */ + modpath = argv[optind++]; + modname = rindex (modpath, '/'); + if (modname == NULL) + modname = modpath; + else + modname++; /* skip over / */ + } if (!modname) { fprintf (stderr, "Cannot invoke daemon without probe module\n"); |