summaryrefslogtreecommitdiffstats
path: root/runtime/transport/control.c
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-10-13 19:20:05 -0700
committerJosh Stone <jistone@redhat.com>2009-10-13 19:20:05 -0700
commit1c1f1a255cd969934bb7ce1678f4a411337be6f9 (patch)
treeac6df7814bf392d96f75250e260228ff8a02a1e8 /runtime/transport/control.c
parentd5e178c1d6eb0e7c1a317b925687050aa1cb6c1b (diff)
parentc4ca2da6ca875c0142a4e7ffd95e0aa0c573590b (diff)
downloadsystemtap-steved-1c1f1a255cd969934bb7ce1678f4a411337be6f9.tar.gz
systemtap-steved-1c1f1a255cd969934bb7ce1678f4a411337be6f9.tar.xz
systemtap-steved-1c1f1a255cd969934bb7ce1678f4a411337be6f9.zip
Merge branch 'master' of sourceware.org:/git/systemtap
Diffstat (limited to 'runtime/transport/control.c')
-rw-r--r--runtime/transport/control.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/transport/control.c b/runtime/transport/control.c
index 0e18bb8b..8712a8ad 100644
--- a/runtime/transport/control.c
+++ b/runtime/transport/control.c
@@ -59,7 +59,7 @@ static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, siz
#ifdef STP_BULKMODE
return count;
#else
- return -1;
+ return -EINVAL;
#endif
case STP_RELOCATION:
_stp_do_relocation (buf, count);
@@ -150,7 +150,7 @@ static int _stp_ctl_write(int type, void *data, unsigned len)
/* get a buffer from the free pool */
bptr = _stp_mempool_alloc(_stp_pool_q);
if (unlikely(bptr == NULL))
- return -1;
+ return -ENOMEM;
bptr->type = type;
memcpy(bptr->buf, data, len);
@@ -225,7 +225,7 @@ static ssize_t _stp_ctl_read_cmd(struct file *file, char __user *buf,
static int _stp_ctl_open_cmd(struct inode *inode, struct file *file)
{
if (_stp_ctl_attached)
- return -1;
+ return -EBUSY;
_stp_attach();
return 0;
}