projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some more patchelttes from Larry Doolittle.
[oweals/busybox.git]
/
coreutils
/
mkdir.c
diff --git
a/coreutils/mkdir.c
b/coreutils/mkdir.c
index 07b18713a9a2e2bb72d213c01c03b3831ea48015..d78f57e2bb4786288d729528189416d62d27ea86 100644
(file)
--- a/
coreutils/mkdir.c
+++ b/
coreutils/mkdir.c
@@
-21,15
+21,12
@@
*
*/
*
*/
-#include "busybox.h"
-#define bb_need_name_too_long
-#define BB_DECLARE_EXTERN
-#include "messages.c"
-
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
+#include "busybox.h"
+
static int parentFlag = FALSE;
static mode_t mode = 0777;
static int parentFlag = FALSE;
static mode_t mode = 0777;
@@
-48,11
+45,11
@@
extern int mkdir_main(int argc, char **argv)
switch (**argv) {
case 'm':
if (--argc == 0)
switch (**argv) {
case 'm':
if (--argc == 0)
-
usage(mkdir_usage
);
+
show_usage(
);
/* Find the specified modes */
mode = 0;
if (parse_mode(*(++argv), &mode) == FALSE) {
/* Find the specified modes */
mode = 0;
if (parse_mode(*(++argv), &mode) == FALSE) {
- error_msg_and_die("Unknown mode: %s
\n
", *argv);
+ error_msg_and_die("Unknown mode: %s", *argv);
}
/* Set the umask for this process so it doesn't
* screw up whatever the user just entered. */
}
/* Set the umask for this process so it doesn't
* screw up whatever the user just entered. */
@@
-63,7
+60,7
@@
extern int mkdir_main(int argc, char **argv)
parentFlag = TRUE;
break;
default:
parentFlag = TRUE;
break;
default:
-
usage(mkdir_usage
);
+
show_usage(
);
}
}
argc--;
}
}
argc--;
@@
-71,7
+68,7
@@
extern int mkdir_main(int argc, char **argv)
}
if (argc < 1) {
}
if (argc < 1) {
-
usage(mkdir_usage
);
+
show_usage(
);
}
while (argc > 0) {
}
while (argc > 0) {
@@
-85,7
+82,7
@@
extern int mkdir_main(int argc, char **argv)
strcpy(buf, *argv);
status = stat(buf, &statBuf);
if (parentFlag == FALSE && status != -1 && errno != ENOENT) {
strcpy(buf, *argv);
status = stat(buf, &statBuf);
if (parentFlag == FALSE && status != -1 && errno != ENOENT) {
- error_msg_and_die("%s: File exists
\n
", buf);
+ error_msg_and_die("%s: File exists", buf);
}
if (parentFlag == TRUE) {
strcat(buf, "/");
}
if (parentFlag == TRUE) {
strcat(buf, "/");