summaryrefslogtreecommitdiffstats
path: root/runtime/transport/symbols.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-03-14 16:12:40 +0000
committerhunt <hunt>2007-03-14 16:12:40 +0000
commitfbbb89fffb3533a3b4fb63c15eaeaae6956391eb (patch)
tree6e3420267ef6917d71667070dd5479a569591b13 /runtime/transport/symbols.c
parenta846e9cd2b991b2b6f895b45f0a2af1ce2c994bc (diff)
downloadsystemtap-steved-fbbb89fffb3533a3b4fb63c15eaeaae6956391eb.tar.gz
systemtap-steved-fbbb89fffb3533a3b4fb63c15eaeaae6956391eb.tar.xz
systemtap-steved-fbbb89fffb3533a3b4fb63c15eaeaae6956391eb.zip
2007-03-14 Martin Hunt <hunt@redhat.com>
* transport_msgs.h: ifdef old messages as such. Add support for new transport. * relayfs.c: Simplify and add new interface to look like utt. * utt.[ch]: New files. Similar to the proposed utt interface. These setup and teardown relayfs on debugfs. * control.c: New file. Implements a simple control channel. A small subset of procfs.c. * procfs.c: This is now only used for old kernels lacking newer relayfs. Change STP_RELAYFS to STP_BULKMODE. Use new messages from transport_msgs.h. Don't support RELAYFS_CHANNEL_VERSION >= 4. CHanges all control channel functions to new names. Use pids instead of module names in /proc names.
Diffstat (limited to 'runtime/transport/symbols.c')
-rw-r--r--runtime/transport/symbols.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c
index c21c0ede..abe60226 100644
--- a/runtime/transport/symbols.c
+++ b/runtime/transport/symbols.c
@@ -170,7 +170,7 @@ static int _stp_do_symbols(const char __user *buf, int count)
switch (_stp_symbol_state) {
case 0:
if (count != 8) {
- printk("unexpected systemtap error: _stp_do_symbols: count=%d\n", count);
+ errk(" _stp_do_symbols: count=%d\n", count);
return -EFAULT;
}
if (get_user(num, (unsigned __user *)buf))
@@ -181,7 +181,7 @@ static int _stp_do_symbols(const char __user *buf, int count)
_stp_modules[0] = _stp_alloc_module(num, datasize);
if (_stp_modules[0] == NULL) {
- printk("unexpected systemtap error: cannot allocate memory\n");
+ errk("cannot allocate memory\n");
return -EFAULT;
}
_stp_symbol_state = 1;
@@ -207,7 +207,7 @@ static int _stp_do_symbols(const char __user *buf, int count)
_stp_modules_by_addr[0] = _stp_modules[0];
break;
default:
- printk("systemtap error: unexpected symbol data of size %d.\n", count);
+ errk("unexpected symbol data of size %d.\n", count);
}
return count;
}
@@ -251,7 +251,7 @@ static struct _stp_module *_stp_load_module_symbols (struct _stp_module *imod)
mod = _stp_alloc_module_from_module(m);
if (mod == NULL) {
module_put(m);
- printk("Systemtap failed to allocate memory for module.\n");
+ errk("failed to allocate memory for module.\n");
return NULL;
}
@@ -347,7 +347,7 @@ static int _stp_do_module(const char __user *buf, int count)
int i;
if (count < sizeof(tmpmod)) {
- printk("_stp_do_modules: expected %d and got %d\n", (int)sizeof(tmpmod), count);
+ errk("expected %d and got %d\n", (int)sizeof(tmpmod), count);
return -EFAULT;
}
if (copy_from_user ((char *)&tmpmod, buf, sizeof(tmpmod)))
@@ -361,7 +361,7 @@ static int _stp_do_module(const char __user *buf, int count)
/* copy in section data */
tmpmod.sections = _stp_kmalloc(count - sizeof(tmpmod));
if (tmpmod.sections == NULL) {
- printk("_stp_do_module: unable to allocate memory.\n");
+ errk("unable to allocate memory.\n");
return -EFAULT;
}
if (copy_from_user ((char *)tmpmod.sections, buf+sizeof(tmpmod), count-sizeof(tmpmod))) {
@@ -391,7 +391,7 @@ static int _stp_do_module(const char __user *buf, int count)
return count;
}
-static int _stp_transport_send (int type, void *data, int len);
+static int _stp_ctl_send (int type, void *data, int len);
static int _stp_module_load_notify(struct notifier_block * self, unsigned long val, void * data)
{
@@ -403,10 +403,10 @@ static int _stp_module_load_notify(struct notifier_block * self, unsigned long v
case MODULE_STATE_COMING:
dbug("module %s loaded\n", mod->name);
strlcpy(rmod.name, mod->name, STP_MODULE_NAME_LEN);
- _stp_transport_send(STP_MODULE, &rmod, sizeof(struct _stp_module));
+ _stp_ctl_send(STP_MODULE, &rmod, sizeof(struct _stp_module));
break;
default:
- printk("module loaded? val=%ld\n", val);
+ errk("module loaded? val=%ld\n", val);
}
#endif
return 0;