diff options
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, | |||
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 | ||
1121 | extern 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 | |||
1131 | extern 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) |
1122 | extern int vdprintf(int d, const char *format, va_list ap) | 1139 | extern int vdprintf(int d, const char *format, va_list ap) |
1123 | { | 1140 | { |