summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-10 04:10:34 +0000
committerMike Frysinger <vapier@gentoo.org>2009-02-10 04:10:34 +0000
commit1055a181ad24dad9ef8d1482452fd4aff92df706 (patch)
tree261a60b5f822835713284b07067f2d00a10605a2 /utils
parent0d5aec1211d900a532a66830d814cd5358c96b3a (diff)
include more info in error messages so we have a better idea where things are failing
Diffstat (limited to 'utils')
-rw-r--r--utils/ldd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/ldd.c b/utils/ldd.c
index 18f4b6cde..1f1dc2516 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -339,7 +339,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 */
@@ -388,7 +388,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);
}
@@ -645,7 +645,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;
}