[git commit 0_9_30] include more info in error messages so we have a better idea where things are failing
Mike Frysinger
vapier at gentoo.org
Sat Oct 10 16:44:02 UTC 2009
commit: http://git.uclibc.org/uClibc/commit/?id=d8a9cc5b95993901632a91302dbb5d0738169d8a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
utils/ldd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils/ldd.c b/utils/ldd.c
index 17bab20..8b6178b 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -367,7 +367,7 @@ static void search_for_named_library(char *name, char *result,
/* We need a writable copy of this string */
path = strdup(path_list);
if (!path) {
- fprintf(stderr, "Out of memory!\n");
+ fprintf(stderr, "%s: Out of memory!\n", __func__);
exit(EXIT_FAILURE);
}
/* Eliminate all double //s */
@@ -416,7 +416,7 @@ void locate_library_file(ElfW(Ehdr) *ehdr, ElfW(Dyn) *dynamic, int is_suid,
/* We need some elbow room here. Make some room... */
buf = malloc(1024);
if (!buf) {
- fprintf(stderr, "Out of memory!\n");
+ fprintf(stderr, "%s: Out of memory!\n", __func__);
exit(EXIT_FAILURE);
}
@@ -673,7 +673,7 @@ int find_dependancies(char *filename)
ehdr = mmap(0, statbuf.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fileno(thefile), 0);
if (ehdr == MAP_FAILED) {
fclose(thefile);
- fprintf(stderr, "Out of memory!\n");
+ fprintf(stderr, "mmap(%s) failed: %s\n", filename, strerror(errno));
return -1;
}
--
1.6.3.3
More information about the uClibc-cvs
mailing list