summaryrefslogtreecommitdiffstats
path: root/runtime/transport/ring_buffer.c
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-05-22 10:50:30 -0500
committerDavid Smith <dsmith@redhat.com>2009-05-22 10:50:30 -0500
commite57421f400d17786c1fdbead5fbca27a1fbe4ec5 (patch)
treedaefda43d0be0bbf3552d45101693cc07c480a14 /runtime/transport/ring_buffer.c
parentc8e9eb18d8d13d099a4a177fe53de507c1d9ce8b (diff)
downloadsystemtap-steved-e57421f400d17786c1fdbead5fbca27a1fbe4ec5.tar.gz
systemtap-steved-e57421f400d17786c1fdbead5fbca27a1fbe4ec5.tar.xz
systemtap-steved-e57421f400d17786c1fdbead5fbca27a1fbe4ec5.zip
Added error checking and other updates.
* runtime/vsprintf.c: Added transport.h inclusion for STP_BUFFER_SIZE definition. * runtime/transport/debugfs.c (_stp_register_ctl_channel_fs): Added error checking. * runtime/transport/transport.c (_stp_get_root_dir): Ditto. (_stp_transport_fs_init): Added original transport support and error checking. * runtime/transport/relay_v2.c (__stp_relay_create_buf_file_callback): Added error checking. (_stp_transport_data_fs_init): Ditto. * runtime/transport/ring_buffer.c (_stp_transport_data_fs_init): Ditto. * runtime/transport/utt.c: Removed unused file. * runtime/transport/utt.h: Ditto.
Diffstat (limited to 'runtime/transport/ring_buffer.c')
-rw-r--r--runtime/transport/ring_buffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/transport/ring_buffer.c b/runtime/transport/ring_buffer.c
index 0385e7d3..217d0735 100644
--- a/runtime/transport/ring_buffer.c
+++ b/runtime/transport/ring_buffer.c
@@ -405,6 +405,13 @@ static int _stp_transport_data_fs_init(void)
__stp_free_ring_buffer();
return -ENOENT;
}
+ else if (IS_ERR(__stp_entry[cpu])) {
+ rc = PTR_ERR(__stp_entry[cpu]);
+ pr_warning("Could not create debugfs 'trace' entry\n");
+ __stp_free_ring_buffer();
+ return rc;
+ }
+
__stp_entry[cpu]->d_inode->i_uid = _stp_uid;
__stp_entry[cpu]->d_inode->i_gid = _stp_gid;