aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-01-25 18:13:53 +0000
committerErik Andersen <andersen@codepoet.org>2000-01-25 18:13:53 +0000
commit3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea (patch)
tree32b6129967a8b5c922b72843efc7fc6683287181 /utility.c
parentbf3a838aaca4ab34d2739438fa44d0dbb04e9862 (diff)
downloadbusybox-3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea.tar.gz
Some busybox updates. See the changelog for details if you care.
-Erik
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/utility.c b/utility.c
index 4b67ce9b7..8139f38d9 100644
--- a/utility.c
+++ b/utility.c
@@ -175,7 +175,7 @@ copyFile( const char *srcName, const char *destName,
}
} else if (S_ISFIFO(srcStatBuf.st_mode)) {
//fprintf(stderr, "copying fifo %s to %s\n", srcName, destName);
- if (mkfifo(destName, 644)) {
+ if (mkfifo(destName, 0644)) {
perror(destName);
return (FALSE);
}
@@ -406,7 +406,6 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int depthFir
else
status = lstat(fileName, &statbuf);
- status = lstat(fileName, &statbuf);
if (status < 0) {
perror(fileName);
return (FALSE);
@@ -1118,6 +1117,24 @@ findInitPid()
}
#endif
+#if defined BB_GUNZIP || defined BB_GZIP || defined BB_PRINTF || defined BB_TAIL
+extern void *xmalloc (size_t size)
+{
+ void *cp = malloc (size);
+
+ if (cp == NULL) {
+ error("out of memory");
+ }
+ return cp;
+}
+
+extern void error(char *msg)
+{
+ fprintf(stderr, "\n%s\n", msg);
+ exit(1);
+}
+#endif
+
#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT)
extern int vdprintf(int d, const char *format, va_list ap)
{