diff options
Diffstat (limited to 'runtime/transport/debugfs.c')
-rw-r--r-- | runtime/transport/debugfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/transport/debugfs.c b/runtime/transport/debugfs.c index 7de57335..7a08982a 100644 --- a/runtime/transport/debugfs.c +++ b/runtime/transport/debugfs.c @@ -23,13 +23,14 @@ static struct dentry *_stp_cmd_file = NULL; static int _stp_register_ctl_channel_fs(void) { - if (_stp_utt == NULL) { - errk("_expected _stp_utt to be set.\n"); + struct dentry *module_dir = _stp_get_module_dir(); + if (module_dir == NULL) { + errk("no module directory found.\n"); return -1; } /* create [debugfs]/systemtap/module_name/.cmd */ - _stp_cmd_file = debugfs_create_file(".cmd", 0600, _stp_utt->dir, + _stp_cmd_file = debugfs_create_file(".cmd", 0600, module_dir, NULL, &_stp_ctl_fops_cmd); if (_stp_cmd_file == NULL) { errk("Error creating systemtap debugfs entries.\n"); |