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 <acme@redhat.com>
This commit is contained in:
parent
25264fdf74
commit
4848eef743
4
codiff.c
4
codiff.c
|
@ -811,7 +811,7 @@ failure:
|
||||||
|
|
||||||
/* If old_file is a character device, leave its cus empty */
|
/* If old_file is a character device, leave its cus empty */
|
||||||
if (!S_ISCHR(st.st_mode)) {
|
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) {
|
if (err != 0) {
|
||||||
cus__print_error_msg("codiff", old_cus, old_filename, err);
|
cus__print_error_msg("codiff", old_cus, old_filename, err);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
@ -825,7 +825,7 @@ failure:
|
||||||
|
|
||||||
/* If old_file is a character device, leave its cus empty */
|
/* If old_file is a character device, leave its cus empty */
|
||||||
if (!S_ISCHR(st.st_mode)) {
|
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) {
|
if (err != 0) {
|
||||||
cus__print_error_msg("codiff", new_cus, new_filename, err);
|
cus__print_error_msg("codiff", new_cus, new_filename, err);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
@ -865,7 +865,8 @@ static int cu__fixup_ctf_bitfields(struct cu *self)
|
||||||
return err;
|
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;
|
struct ctf_state state;
|
||||||
int wordsize, err;
|
int wordsize, err;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
struct cus;
|
struct cus;
|
||||||
struct conf_load;
|
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_ */
|
#endif /* _CTF_LOADER_H_ */
|
||||||
|
|
|
@ -933,7 +933,7 @@ failure:
|
||||||
* If a filename was specified, for instance "vmlinux", load it too.
|
* If a filename was specified, for instance "vmlinux", load it too.
|
||||||
*/
|
*/
|
||||||
if (filename != NULL) {
|
if (filename != NULL) {
|
||||||
err = cus__load(methods_cus, NULL, filename);
|
err = cus__load_file(methods_cus, NULL, filename);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
cus__print_error_msg("ctracer", methods_cus, filename, err);
|
cus__print_error_msg("ctracer", methods_cus, filename, err);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -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;
|
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;
|
int fd, err;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
struct cus;
|
struct cus;
|
||||||
struct conf_load;
|
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_ */
|
#endif /* _DWARF_LOADER_H_ */
|
||||||
|
|
10
dwarves.c
10
dwarves.c
|
@ -2652,7 +2652,7 @@ int cus__load_dir(struct cus *self, struct conf_load *conf,
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
break;
|
break;
|
||||||
} else if (fnmatch(filename_mask, entry->d_name, 0) == 0) {
|
} 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)
|
if (err != 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2678,11 +2678,11 @@ static struct debugging_formats {
|
||||||
} debugging_formats__table[] = {
|
} debugging_formats__table[] = {
|
||||||
{
|
{
|
||||||
.name = "dwarf",
|
.name = "dwarf",
|
||||||
.loader = dwarf__load,
|
.loader = dwarf__load_file,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "ctf",
|
.name = "ctf",
|
||||||
.loader = ctf__load,
|
.loader = ctf__load_file,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = NULL,
|
.name = NULL,
|
||||||
|
@ -2700,7 +2700,7 @@ static debugging_format_loader_t debugging_formats__loader(const char *name)
|
||||||
return NULL;
|
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;
|
int i = 0, err = 0;
|
||||||
debugging_format_loader_t loader;
|
debugging_format_loader_t loader;
|
||||||
|
@ -2751,7 +2751,7 @@ int cus__load_files(struct cus *self, struct conf_load *conf,
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (filenames[i] != NULL) {
|
while (filenames[i] != NULL) {
|
||||||
if (cus__load(self, conf, filenames[i]))
|
if (cus__load_file(self, conf, filenames[i]))
|
||||||
return -i;
|
return -i;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ struct cus {
|
||||||
struct cus *cus__new(void);
|
struct cus *cus__new(void);
|
||||||
void cus__delete(struct cus *self);
|
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,
|
int cus__load_files(struct cus *self, struct conf_load *conf,
|
||||||
char *filenames[]);
|
char *filenames[]);
|
||||||
int cus__load_dir(struct cus *self, struct conf_load *conf,
|
int cus__load_dir(struct cus *self, struct conf_load *conf,
|
||||||
|
|
Loading…
Reference in New Issue