From 035ab7da56300cc7711b8e1813c8d13bdf11da5b Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Fri, 24 May 2013 20:05:01 +0400 Subject: [PATCH] [REFACTOR] rename *pach* --> *path* --- driver/Kbuild | 2 +- driver/filters/{filter_by_pach.c => filter_by_path.c} | 16 ++++++++-------- driver/filters/{filter_by_pach.h => filter_by_path.h} | 4 ++-- driver/us_proc_inst.c | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) rename driver/filters/{filter_by_pach.c => filter_by_path.c} (83%) rename driver/filters/{filter_by_pach.h => filter_by_path.h} (91%) diff --git a/driver/Kbuild b/driver/Kbuild index 2ebe682..4e2993f 100644 --- a/driver/Kbuild +++ b/driver/Kbuild @@ -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 diff --git a/driver/filters/filter_by_pach.c b/driver/filters/filter_by_path.c similarity index 83% rename from driver/filters/filter_by_pach.c rename to driver/filters/filter_by_path.c index 5914b01..5c4b7e9 100644 --- a/driver/filters/filter_by_pach.c +++ b/driver/filters/filter_by_path.c @@ -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; } diff --git a/driver/filters/filter_by_pach.h b/driver/filters/filter_by_path.h similarity index 91% rename from driver/filters/filter_by_pach.h rename to driver/filters/filter_by_path.h index 99169a9..fdc7ca5 100644 --- a/driver/filters/filter_by_pach.h +++ b/driver/filters/filter_by_path.h @@ -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 */ diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index 6a4319f..6a91158 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -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; -- 2.7.4