From 9781b9802fb2d5789bcc427c65b66e3531c749fb Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Tue, 29 Jan 2013 18:57:50 +0400 Subject: [PATCH] rename proc_p_find_file_p_by_dentry --> sspt_procs_find_file_or_new --- driver/sspt/sspt_procs.c | 6 +++--- driver/sspt/sspt_procs.h | 4 ++-- driver/us_proc_inst.c | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/driver/sspt/sspt_procs.c b/driver/sspt/sspt_procs.c index d34a136..265f602 100644 --- a/driver/sspt/sspt_procs.c +++ b/driver/sspt/sspt_procs.c @@ -78,8 +78,8 @@ static void sspt_procs_add_file(struct sspt_procs *procs, struct sspt_file *file list_add(&file->list, &procs->file_list); } -struct sspt_file *proc_p_find_file_p_by_dentry(struct sspt_procs *procs, - const char *name, struct dentry *dentry) +struct sspt_file *sspt_procs_find_file_or_new(struct sspt_procs *procs, + struct dentry *dentry, const char *name) { struct sspt_file *file; @@ -99,7 +99,7 @@ void proc_p_add_dentry_probes(struct sspt_procs *procs, const char *name, struct dentry* dentry, struct ip_data *ip_d, int cnt) { int i; - struct sspt_file *file = proc_p_find_file_p_by_dentry(procs, name, dentry); + struct sspt_file *file = sspt_procs_find_file_or_new(procs, dentry, name); for (i = 0; i < cnt; ++i) { sspt_file_add_ip(file, &ip_d[i]); diff --git a/driver/sspt/sspt_procs.h b/driver/sspt/sspt_procs.h index d85d644..0692f58 100644 --- a/driver/sspt/sspt_procs.h +++ b/driver/sspt/sspt_procs.h @@ -43,8 +43,8 @@ void sspt_procs_free_all(void); void proc_p_add_dentry_probes(struct sspt_procs *procs, const char *name, struct dentry* dentry, struct ip_data *ip_d, int cnt); -struct sspt_file *proc_p_find_file_p_by_dentry(struct sspt_procs *procs, - const char *name, struct dentry *dentry); +struct sspt_file *sspt_procs_find_file_or_new(struct sspt_procs *procs, + struct dentry *dentry, const char *name); struct sspt_file *sspt_procs_find_file(struct sspt_procs *procs, struct dentry *dentry); #endif /* __SSPT_PROC__ */ diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index 89343d4..ffb29ce 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -605,7 +605,7 @@ int install_otg_ip(unsigned long addr, .flag_retprobe = 1 }; - struct sspt_file *file = proc_p_find_file_p_by_dentry(procs, name, dentry); + struct sspt_file *file = sspt_procs_find_file_or_new(procs, dentry, name); struct sspt_page *page = sspt_get_page(file, offset_addr); struct us_ip *ip = sspt_find_ip(page, offset_addr & ~PAGE_MASK); @@ -615,7 +615,8 @@ int install_otg_ip(unsigned long addr, } if (ip == NULL) { - struct sspt_file *file = proc_p_find_file_p_by_dentry(procs, name, dentry); + // TODO: sspt_procs_find_file_or_new --> sspt_procs_find_file ?! + struct sspt_file *file = sspt_procs_find_file_or_new(procs, dentry, name); sspt_file_add_ip(file, &pd); /* if addr mapping, that probe install, else it be installed in do_page_fault handler */ -- 2.7.4