From a95ca5a96f8248754487dd53fbbcbc58ea753aa9 Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Mon, 17 Jun 2002 05:18:31 -0500 Subject: kbuild: Improve output and error behavior when making modversions. Reduce the amount of output in verbose (default) mode and stop immediately on error. (Sam Ravnborg/me) --- scripts/fixdep.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/fixdep.c b/scripts/fixdep.c index db45bd1888c0..1e9ffda8473b 100644 --- a/scripts/fixdep.c +++ b/scripts/fixdep.c @@ -143,7 +143,7 @@ void grow_config(int len) size_config = 2048; str_config = realloc(str_config, size_config *= 2); if (str_config == NULL) - { perror("malloc"); exit(1); } + { perror("fixdep:malloc"); exit(1); } } } @@ -259,6 +259,7 @@ void do_config_file(char *filename) fd = open(filename, O_RDONLY); if (fd < 0) { + fprintf(stderr, "fixdep: "); perror(filename); exit(2); } @@ -269,7 +270,7 @@ void do_config_file(char *filename) } map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if ((long) map == -1) { - perror("mmap"); + perror("fixdep: mmap"); close(fd); return; } @@ -326,6 +327,7 @@ void print_deps(void) fd = open(depfile, O_RDONLY); if (fd < 0) { + fprintf(stderr, "fixdep: "); perror(depfile); exit(2); } @@ -337,7 +339,7 @@ void print_deps(void) } map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if ((long) map == -1) { - perror("mmap"); + perror("fixdep: mmap"); close(fd); return; } -- cgit v1.2.3