From: Mathieu Desnoyers Date: Sun, 22 Jan 2012 20:51:41 +0000 (-0500) Subject: Remove debugfs file (keep only proc file) X-Git-Tag: v2.0-pre12~18 X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=80996790fa42072d6525f2adb9a910312077bef6 Remove debugfs file (keep only proc file) Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-events.c b/ltt-events.c index 42299142..03dbb203 100644 --- a/ltt-events.c +++ b/ltt-events.c @@ -981,7 +981,7 @@ static int __init ltt_events_init(void) event_cache = KMEM_CACHE(ltt_event, 0); if (!event_cache) return -ENOMEM; - ret = ltt_debugfs_abi_init(); + ret = lttng_abi_init(); if (ret) goto error_abi; return 0; @@ -996,7 +996,7 @@ static void __exit ltt_events_exit(void) { struct ltt_session *session, *tmpsession; - ltt_debugfs_abi_exit(); + lttng_abi_exit(); list_for_each_entry_safe(session, tmpsession, &sessions, list) ltt_session_destroy(session); kmem_cache_destroy(event_cache); diff --git a/ltt-events.h b/ltt-events.h index 955611e9..3aed0e21 100644 --- a/ltt-events.h +++ b/ltt-events.h @@ -298,8 +298,8 @@ void ltt_transport_register(struct ltt_transport *transport); void ltt_transport_unregister(struct ltt_transport *transport); void synchronize_trace(void); -int ltt_debugfs_abi_init(void); -void ltt_debugfs_abi_exit(void); +int lttng_abi_init(void); +void lttng_abi_exit(void); int ltt_probe_register(struct lttng_probe_desc *desc); void ltt_probe_unregister(struct lttng_probe_desc *desc); diff --git a/lttng-abi.c b/lttng-abi.c index df2b757a..ec16b7fc 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include @@ -40,10 +39,9 @@ /* * This is LTTng's own personal way to create a system call as an external - * module. We use ioctl() on /sys/kernel/debug/lttng. + * module. We use ioctl() on /proc/lttng. */ -static struct dentry *lttng_dentry; static struct proc_dir_entry *lttng_proc_dentry; static const struct file_operations lttng_fops; static const struct file_operations lttng_session_fops; @@ -746,20 +744,15 @@ static const struct file_operations lttng_event_fops = { #endif }; -int __init ltt_debugfs_abi_init(void) +int __init lttng_abi_init(void) { int ret = 0; wrapper_vmalloc_sync_all(); - lttng_dentry = debugfs_create_file("lttng", S_IWUSR, NULL, NULL, - <tng_fops); - if (IS_ERR(lttng_dentry)) - lttng_dentry = NULL; - lttng_proc_dentry = proc_create_data("lttng", S_IWUSR, NULL, <tng_fops, NULL); - if (!lttng_dentry && !lttng_proc_dentry) { + if (lttng_proc_dentry) { printk(KERN_ERR "Error creating LTTng control file\n"); ret = -ENOMEM; goto error; @@ -768,10 +761,8 @@ error: return ret; } -void __exit ltt_debugfs_abi_exit(void) +void __exit lttng_abi_exit(void) { - if (lttng_dentry) - debugfs_remove(lttng_dentry); if (lttng_proc_dentry) remove_proc_entry("lttng", NULL); } diff --git a/lttng-abi.h b/lttng-abi.h index cb4898e3..9c88b9b9 100644 --- a/lttng-abi.h +++ b/lttng-abi.h @@ -6,7 +6,7 @@ * * Copyright 2010 (c) - Mathieu Desnoyers * - * LTTng debugfs ABI header + * LTTng ABI header * * Dual LGPL v2.1/GPL v2 license. */