From 4848eef7435c47b05451d59a8b30ddaf089e84ef Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 24 Mar 2009 16:48:41 -0300 Subject: [PATCH] core: Rename {cus,dwarf,ctf}__load to {cus,dwarf,ctf}__load_file Because we already use ctf__load in libctf.c, rename the others to disambiguate, and also as there are the __load_dir and __load_files it looks more consistent. Signed-off-by: Arnaldo Carvalho de Melo --- codiff.c | 4 ++-- ctf_loader.c | 3 ++- ctf_loader.h | 3 ++- ctracer.c | 2 +- dwarf_loader.c | 3 ++- dwarf_loader.h | 3 ++- dwarves.c | 10 +++++----- dwarves.h | 2 +- 8 files changed, 17 insertions(+), 13 deletions(-) diff --git a/codiff.c b/codiff.c index c1ff54d..98dabe4 100644 --- a/codiff.c +++ b/codiff.c @@ -811,7 +811,7 @@ failure: /* If old_file is a character device, leave its cus empty */ if (!S_ISCHR(st.st_mode)) { - err = cus__load(old_cus, NULL, old_filename); + err = cus__load_file(old_cus, NULL, old_filename); if (err != 0) { cus__print_error_msg("codiff", old_cus, old_filename, err); return EXIT_FAILURE; @@ -825,7 +825,7 @@ failure: /* If old_file is a character device, leave its cus empty */ if (!S_ISCHR(st.st_mode)) { - err = cus__load(new_cus, NULL, new_filename); + err = cus__load_file(new_cus, NULL, new_filename); if (err != 0) { cus__print_error_msg("codiff", new_cus, new_filename, err); return EXIT_FAILURE; diff --git a/ctf_loader.c b/ctf_loader.c index ee14a5c..b81ea24 100644 --- a/ctf_loader.c +++ b/ctf_loader.c @@ -865,7 +865,8 @@ static int cu__fixup_ctf_bitfields(struct cu *self) return err; } -int ctf__load(struct cus *self, struct conf_load *conf, const char *filename) +int ctf__load_file(struct cus *self, struct conf_load *conf, + const char *filename) { struct ctf_state state; int wordsize, err; diff --git a/ctf_loader.h b/ctf_loader.h index b92375e..3573766 100644 --- a/ctf_loader.h +++ b/ctf_loader.h @@ -11,6 +11,7 @@ struct cus; struct conf_load; -int ctf__load(struct cus *self, struct conf_load *conf, const char *filename); +int ctf__load_file(struct cus *self, struct conf_load *conf, + const char *filename); #endif /* _CTF_LOADER_H_ */ diff --git a/ctracer.c b/ctracer.c index 00b5a05..a9a97c9 100644 --- a/ctracer.c +++ b/ctracer.c @@ -933,7 +933,7 @@ failure: * If a filename was specified, for instance "vmlinux", load it too. */ if (filename != NULL) { - err = cus__load(methods_cus, NULL, filename); + err = cus__load_file(methods_cus, NULL, filename); if (err != 0) { cus__print_error_msg("ctracer", methods_cus, filename, err); goto out; diff --git a/dwarf_loader.c b/dwarf_loader.c index 9331c67..a1c41c0 100644 --- a/dwarf_loader.c +++ b/dwarf_loader.c @@ -1905,7 +1905,8 @@ static int cus__process_file(struct cus *self, struct conf_load *conf, int fd, return parms.nr_dwarf_sections_found ? 0 : -1; } -int dwarf__load(struct cus *self, struct conf_load *conf, const char *filename) +int dwarf__load_file(struct cus *self, struct conf_load *conf, + const char *filename) { int fd, err; diff --git a/dwarf_loader.h b/dwarf_loader.h index 0a2c2ea..58a2aba 100644 --- a/dwarf_loader.h +++ b/dwarf_loader.h @@ -11,6 +11,7 @@ struct cus; struct conf_load; -int dwarf__load(struct cus *self, struct conf_load *conf, const char *filename); +int dwarf__load_file(struct cus *self, struct conf_load *conf, + const char *filename); #endif /* _DWARF_LOADER_H_ */ diff --git a/dwarves.c b/dwarves.c index 92ead4b..cb1a6cd 100644 --- a/dwarves.c +++ b/dwarves.c @@ -2652,7 +2652,7 @@ int cus__load_dir(struct cus *self, struct conf_load *conf, if (err != 0) break; } else if (fnmatch(filename_mask, entry->d_name, 0) == 0) { - err = cus__load(self, conf, pathname); + err = cus__load_file(self, conf, pathname); if (err != 0) break; } @@ -2678,11 +2678,11 @@ static struct debugging_formats { } debugging_formats__table[] = { { .name = "dwarf", - .loader = dwarf__load, + .loader = dwarf__load_file, }, { .name = "ctf", - .loader = ctf__load, + .loader = ctf__load_file, }, { .name = NULL, @@ -2700,7 +2700,7 @@ static debugging_format_loader_t debugging_formats__loader(const char *name) return NULL; } -int cus__load(struct cus *self, struct conf_load *conf, char *filename) +int cus__load_file(struct cus *self, struct conf_load *conf, char *filename) { int i = 0, err = 0; debugging_format_loader_t loader; @@ -2751,7 +2751,7 @@ int cus__load_files(struct cus *self, struct conf_load *conf, int i = 0; while (filenames[i] != NULL) { - if (cus__load(self, conf, filenames[i])) + if (cus__load_file(self, conf, filenames[i])) return -i; ++i; } diff --git a/dwarves.h b/dwarves.h index e209a3c..f8200cb 100644 --- a/dwarves.h +++ b/dwarves.h @@ -74,7 +74,7 @@ struct cus { struct cus *cus__new(void); void cus__delete(struct cus *self); -int cus__load(struct cus *self, struct conf_load *conf, char *filename); +int cus__load_file(struct cus *self, struct conf_load *conf, char *filename); int cus__load_files(struct cus *self, struct conf_load *conf, char *filenames[]); int cus__load_dir(struct cus *self, struct conf_load *conf,