diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-10 04:10:34 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-10-12 19:24:30 +0200 |
commit | d8a9cc5b95993901632a91302dbb5d0738169d8a (patch) | |
tree | e41aa5e61bb05672669e49661fb31ed3bd89950a /utils | |
parent | b86dbcfb0c285a5346bd64ac58b9f728fe083648 (diff) | |
download | uClibc-alpine-d8a9cc5b95993901632a91302dbb5d0738169d8a.tar.bz2 uClibc-alpine-d8a9cc5b95993901632a91302dbb5d0738169d8a.tar.xz |
include more info in error messages so we have a better idea where things are failing
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ldd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/ldd.c b/utils/ldd.c index 17bab2079..8b6178be5 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; } |