[REFACTOR] rename *pach* --> *path*
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 24 May 2013 16:05:01 +0000 (20:05 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 24 May 2013 16:05:01 +0000 (20:05 +0400)
driver/Kbuild
driver/filters/filter_by_path.c [moved from driver/filters/filter_by_pach.c with 83% similarity]
driver/filters/filter_by_path.h [moved from driver/filters/filter_by_pach.h with 91% similarity]
driver/us_proc_inst.c

index 2ebe682..4e2993f 100644 (file)
@@ -4,5 +4,5 @@ obj-m := swap_driver.o
 swap_driver-y := error_storage.o device_driver.o ec.o legacy.o module.o probes.o \
                  probes_manager.o storage.o us_proc_inst.o helper.o us_slot_manager.o \
                  sspt/ip.o sspt/sspt_page.o sspt/sspt_file.o sspt/sspt_proc.o \
-                 filters/filters_core.o filters/filter_by_pach.o us_def_handler.o \
+                 filters/filters_core.o filters/filter_by_path.o us_def_handler.o \
                  ks_def_handler.o
similarity index 83%
rename from driver/filters/filter_by_pach.c
rename to driver/filters/filter_by_path.c
index 5914b01..5c4b7e9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Dynamic Binary Instrumentation Module based on KProbes
- *  modules/driver/filters/filter_by_pach.c
+ *  modules/driver/filters/filter_by_path.c
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ static int check_dentry(struct task_struct *task, struct dentry *dentry)
        return 0;
 }
 
-static int init_by_pach(void *data, size_t size)
+static int init_by_path(void *data, size_t size)
 {
        if (dentry) {
                return -EPERM;
@@ -57,12 +57,12 @@ static int init_by_pach(void *data, size_t size)
        return 0;
 }
 
-static void uninit_by_pach(void)
+static void uninit_by_path(void)
 {
        dentry = NULL;
 }
 
-static struct task_struct *call_by_pach(struct task_struct *task)
+static struct task_struct *call_by_path(struct task_struct *task)
 {
        if (dentry && check_dentry(task, dentry))
                return task;
@@ -71,12 +71,12 @@ static struct task_struct *call_by_pach(struct task_struct *task)
 }
 
 static struct task_filter ts_filter = {
-       .init = init_by_pach,
-       .uninit = uninit_by_pach,
-       .call = call_by_pach
+       .init = init_by_path,
+       .uninit = uninit_by_path,
+       .call = call_by_path
 };
 
-struct task_filter *get_filter_by_pach(void)
+struct task_filter *get_filter_by_path(void)
 {
        return &ts_filter;
 }
similarity index 91%
rename from driver/filters/filter_by_pach.h
rename to driver/filters/filter_by_path.h
index 99169a9..fdc7ca5 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
  *  Dynamic Binary Instrumentation Module based on KProbes
- *  modules/driver/filters/filter_by_pach.h
+ *  modules/driver/filters/filter_by_path.h
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,6 +27,6 @@
 
 struct task_filter;
 
-struct task_filter *get_filter_by_pach(void);
+struct task_filter *get_filter_by_path(void);
 
 #endif /* _FILTER_BY_PACH_H */
index 6a4319f..6a91158 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "sspt/sspt.h"
 #include "filters/filters_core.h"
-#include "filters/filter_by_pach.h"
+#include "filters/filter_by_path.h"
 #include "helper.h"
 #include "us_slot_manager.h"
 
@@ -184,7 +184,7 @@ int inst_usr_space_proc (void)
 
        DPRINTF("User space instr");
 
-       ret = register_filter(app_filter, get_filter_by_pach());
+       ret = register_filter(app_filter, get_filter_by_path());
        if (ret)
                return ret;