if (S_ISDIR(srcStatBuf.st_mode)) {
//fprintf(stderr, "copying directory %s to %s\n", srcName, destName);
/* Make sure the directory is writable */
- if (mkdir(destName, 0777777 ^ umask(0))) {
+ result = mkdir(destName, 0777777 ^ umask(0));
+ if (result < 0 && errno != EEXIST) {
perror(destName);
return (FALSE);
}
#endif
-#if defined (BB_CHOWN) || defined (BB_CP) || defined (BB_FIND) || defined (BB_LS) || defined (BB_INSMOD)
+#if defined (BB_CHMOD_CHOWN_CHGRP) || defined (BB_CP) || defined (BB_FIND) || defined (BB_LS) || defined (BB_INSMOD)
/*
* Walk down all the directories under the specified
* location, and do something (something specified
-#if defined BB_DF | defined BB_MTAB
+#if defined BB_DF || defined BB_MTAB
/*
* Given a block device, find the mount table entry if that block device
* is mounted.
endmntent(mountTable);
return mountEntry;
}
-
#endif
-#if !defined BB_MTAB && (defined BB_MOUNT || defined BB_DF )
-extern void whine_if_fstab_is_missing()
-{
- struct stat statBuf;
- if (stat("/etc/fstab", &statBuf) < 0)
- fprintf(stderr, "/etc/fstab file missing -- install one to name /dev/root.\n\n");
-}
-#endif
-
-
#if defined BB_DD || defined BB_TAIL
/*
* Read a number with a possible multiplier.
}
#endif
+#if (__GLIBC__ < 2) && (defined BB_SYSLOGD || defined BB_INIT)
+extern int vdprintf(int d, const char *format, va_list ap)
+{
+ char buf[BUF_SIZE];
+ int len;
+
+ len = vsprintf(buf, format, ap);
+ return write(d, buf, len);
+}
+#endif
+
/* END CODE */