diff options
author | hunt <hunt> | 2005-06-29 18:39:13 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-06-29 18:39:13 +0000 |
commit | 2ac0b9f2e9d7d12e1fcf3909e35a2dd835d2402d (patch) | |
tree | 6597a7d70a83cb7e1b3432c6b716764ad6edfb9f /runtime/docs/examples | |
parent | 78d274476a657494e3e6fbad4dcdf01ac5158eab (diff) | |
download | systemtap-steved-2ac0b9f2e9d7d12e1fcf3909e35a2dd835d2402d.tar.gz systemtap-steved-2ac0b9f2e9d7d12e1fcf3909e35a2dd835d2402d.tar.xz systemtap-steved-2ac0b9f2e9d7d12e1fcf3909e35a2dd835d2402d.zip |
*** empty log message ***
Diffstat (limited to 'runtime/docs/examples')
-rw-r--r-- | runtime/docs/examples/template.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/runtime/docs/examples/template.c b/runtime/docs/examples/template.c index fc8da3c1..68d821fe 100644 --- a/runtime/docs/examples/template.c +++ b/runtime/docs/examples/template.c @@ -3,7 +3,7 @@ /* likely will only want one. */ /* define this if you don't want to use relayfs. Normally */ -/* you want relayfs, although it is broken at the moment. */ +/* you want relayfs, unless you need a realtime stream of data */ #define STP_NETLINK_ONLY @@ -94,27 +94,12 @@ static struct kprobe kp[] = { #define NUM_JPROBES (sizeof(jp)/sizeof(struct jprobe)) #define NUM_KPROBES (sizeof(kp)/sizeof(struct kprobe)) -/* these are currently required. May be eliminated later */ -static int pid; -module_param(pid, int, 0); -MODULE_PARM_DESC(pid, "daemon pid"); - /* called when the module loads. */ int init_module(void) { int ret; - /* currently required */ - if (!pid) { - printk("init_module: Can't start without daemon pid\n"); - return -1; - } - - /* open the transport to stpd */ - if (_stp_transport_open(n_subbufs, subbuf_size, pid) < 0) { - printk("init_module: Couldn't open transport\n"); - return -1; - } + TRANSPORT_OPEN; /* register any jprobes */ ret = _stp_register_jprobes (jp, NUM_JPROBES); |