summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorMatt Kraai2000-07-12 17:02:35 +0000
committerMatt Kraai2000-07-12 17:02:35 +0000
commitbe84cd4ef66f8956eb4c7ff0542fd1ba823a70e7 (patch)
tree088bc5b6e06d693ad8ca3eba078c0f3a8e302a24 /utility.c
parente58771e73c0d8589a458ede4088f5ba70eff917b (diff)
downloadbusybox-be84cd4ef66f8956eb4c7ff0542fd1ba823a70e7.zip
busybox-be84cd4ef66f8956eb4c7ff0542fd1ba823a70e7.tar.gz
Always report the applet name when doing error reporting.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/utility.c b/utility.c
index 0f78f28..6d1e1d4 100644
--- a/utility.c
+++ b/utility.c
@@ -94,6 +94,7 @@ extern void errorMsg(const char *s, ...)
va_start(p, s);
fflush(stdout);
+ fprintf(stderr, "%s: ", applet_name);
vfprintf(stderr, s, p);
va_end(p);
fflush(stderr);
@@ -105,6 +106,7 @@ extern void fatalError(const char *s, ...)
va_start(p, s);
fflush(stdout);
+ fprintf(stderr, "%s: ", applet_name);
vfprintf(stderr, s, p);
va_end(p);
fflush(stderr);
@@ -1360,7 +1362,7 @@ extern pid_t* findPidByName( char* pidName)
&& (strlen(pidName) == strlen(info.command_line))) {
pidList=realloc( pidList, sizeof(pid_t) * (j+2));
if (pidList==NULL)
- fatalError(memory_exhausted, "");
+ fatalError(memory_exhausted);
pidList[j++]=info.pid;
}
}
@@ -1433,7 +1435,7 @@ extern pid_t* findPidByName( char* pidName)
&& (strlen(pidName) == strlen(p))) {
pidList=realloc( pidList, sizeof(pid_t) * (i+2));
if (pidList==NULL)
- fatalError(memory_exhausted, "");
+ fatalError(memory_exhausted);
pidList[i++]=strtol(next->d_name, NULL, 0);
}
}
@@ -1450,7 +1452,7 @@ extern void *xmalloc(size_t size)
void *cp = malloc(size);
if (cp == NULL)
- fatalError(memory_exhausted, "");
+ fatalError(memory_exhausted);
return cp;
}
@@ -1464,7 +1466,7 @@ extern char * xstrdup (const char *s) {
t = strdup (s);
if (t == NULL)
- fatalError(memory_exhausted, "");
+ fatalError(memory_exhausted);
return t;
}