summaryrefslogtreecommitdiff
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-w32-3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea.tar.gz
busybox-w32-3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea.tar.bz2
busybox-w32-3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea.zip
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,
175 } 175 }
176 } else if (S_ISFIFO(srcStatBuf.st_mode)) { 176 } else if (S_ISFIFO(srcStatBuf.st_mode)) {
177 //fprintf(stderr, "copying fifo %s to %s\n", srcName, destName); 177 //fprintf(stderr, "copying fifo %s to %s\n", srcName, destName);
178 if (mkfifo(destName, 644)) { 178 if (mkfifo(destName, 0644)) {
179 perror(destName); 179 perror(destName);
180 return (FALSE); 180 return (FALSE);
181 } 181 }
@@ -406,7 +406,6 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int depthFir
406 else 406 else
407 status = lstat(fileName, &statbuf); 407 status = lstat(fileName, &statbuf);
408 408
409 status = lstat(fileName, &statbuf);
410 if (status < 0) { 409 if (status < 0) {
411 perror(fileName); 410 perror(fileName);
412 return (FALSE); 411 return (FALSE);
@@ -1118,6 +1117,24 @@ findInitPid()
1118} 1117}
1119#endif 1118#endif
1120 1119
1120#if defined BB_GUNZIP || defined BB_GZIP || defined BB_PRINTF || defined BB_TAIL
1121extern void *xmalloc (size_t size)
1122{
1123 void *cp = malloc (size);
1124
1125 if (cp == NULL) {
1126 error("out of memory");
1127 }
1128 return cp;
1129}
1130
1131extern void error(char *msg)
1132{
1133 fprintf(stderr, "\n%s\n", msg);
1134 exit(1);
1135}
1136#endif
1137
1121#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT) 1138#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT)
1122extern int vdprintf(int d, const char *format, va_list ap) 1139extern int vdprintf(int d, const char *format, va_list ap)
1123{ 1140{