projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use printf_debug/verbose in so-info
[babeltrace.git]
/
lib
/
so-info.c
diff --git
a/lib/so-info.c
b/lib/so-info.c
index 239320d9c30cf5582d5e4034bef4b7ff1a4fba4c..a5c386049811e531daa82443348854457c50a2bb 100644
(file)
--- a/
lib/so-info.c
+++ b/
lib/so-info.c
@@
-55,8
+55,8
@@
int so_info_init(void)
int ret = 0;
if (elf_version(EV_CURRENT) == EV_NONE) {
int ret = 0;
if (elf_version(EV_CURRENT) == EV_NONE) {
-
fprintf(stderr,
"ELF library initialization failed: %s\n",
- elf_errmsg(-1));
+
printf_debug(
"ELF library initialization failed: %s\n",
+
elf_errmsg(-1));
ret = -1;
}
ret = -1;
}
@@
-492,18
+492,18
@@
int so_info_set_elf_file(struct so_info *so)
elf_fd = open(so->elf_path, O_RDONLY);
if (elf_fd < 0) {
elf_fd = open(so->elf_path, O_RDONLY);
if (elf_fd < 0) {
-
fprintf(stderr,
"Failed to open %s\n", so->elf_path);
+
printf_verbose(
"Failed to open %s\n", so->elf_path);
goto error;
}
elf_file = elf_begin(elf_fd, ELF_C_READ, NULL);
if (!elf_file) {
goto error;
}
elf_file = elf_begin(elf_fd, ELF_C_READ, NULL);
if (!elf_file) {
-
fprintf(stderr,
"elf_begin failed: %s\n", elf_errmsg(-1));
+
printf_debug(
"elf_begin failed: %s\n", elf_errmsg(-1));
goto error;
}
if (elf_kind(elf_file) != ELF_K_ELF) {
goto error;
}
if (elf_kind(elf_file) != ELF_K_ELF) {
-
fprintf(stderr,
"Error: %s is not an ELF object\n",
+
printf_verbose(
"Error: %s is not an ELF object\n",
so->elf_path);
goto error;
}
so->elf_path);
goto error;
}
This page took
0.023053 seconds
and
4
git commands to generate.