diff options
author | Erik Andersen | 2000-01-25 18:13:53 +0000 |
---|---|---|
committer | Erik Andersen | 2000-01-25 18:13:53 +0000 |
commit | 3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea (patch) | |
tree | 32b6129967a8b5c922b72843efc7fc6683287181 /utility.c | |
parent | bf3a838aaca4ab34d2739438fa44d0dbb04e9862 (diff) | |
download | busybox-3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea.zip busybox-3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea.tar.gz |
Some busybox updates. See the changelog for details if you care.
-Erik
Diffstat (limited to 'utility.c')
-rw-r--r-- | utility.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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) { |