summaryrefslogtreecommitdiff
path: root/source/module/monitor_proc.c
diff options
context:
space:
mode:
authorzy <[email protected]>2023-12-01 11:31:46 +0800
committerzy <[email protected]>2023-12-01 11:31:46 +0800
commit031c0bc8c5e087eefd940186e70a001675720762 (patch)
treeca0a6e76afdbb7ac52331331305cdbeead29defd /source/module/monitor_proc.c
parent4be788ed42d71c38dd5309627e7ce151f89a2344 (diff)
fix remove_proc_subtree
Diffstat (limited to 'source/module/monitor_proc.c')
-rw-r--r--source/module/monitor_proc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/module/monitor_proc.c b/source/module/monitor_proc.c
index d901595..9603d5b 100644
--- a/source/module/monitor_proc.c
+++ b/source/module/monitor_proc.c
@@ -5,7 +5,7 @@
#include <linux/types.h>
#include <linux/uaccess.h>
-#define PROC_DIR = "variable_monitor"
+const char* proc_dir = "variable_monitor";
int def_interval_ns = DEFAULT_INTERVAL_NS;
int dump_reset_sec = DEFAULT_DUMP_RESET_SEC;
@@ -67,7 +67,7 @@ static const struct proc_ops proc_dump_reset_sec_ops = {
int monitor_proc_init(void) {
struct proc_dir_entry *dir;
- dir = proc_mkdir(PROC_DIR, NULL);
+ dir = proc_mkdir(proc_dir, NULL);
if (!dir) {
pr_err("variable_monitor: failed to create /proc directory\n");
return -ENOMEM;
@@ -80,8 +80,8 @@ int monitor_proc_init(void) {
}
int monitor_proc_exit(void) {
- remove_proc_entry("def_interval_ns", NULL);
- remove_proc_entry("dump_reset_sec", NULL);
- remove_proc_subtree(PROC_DIR, NULL);
+ // remove_proc_entry("def_interval_ns", NULL);
+ // remove_proc_entry("dump_reset_sec", NULL);
+ remove_proc_subtree(proc_dir, NULL);
return 0;
} \ No newline at end of file