projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ifconfig: code shrink
[oweals/busybox.git]
/
miscutils
/
makedevs.c
diff --git
a/miscutils/makedevs.c
b/miscutils/makedevs.c
index 5602c22481aa5676ca64fc84cf6c2dc32c0cde47..1f88f34288437c1e5daf4cba2193cf308d886776 100644
(file)
--- a/
miscutils/makedevs.c
+++ b/
miscutils/makedevs.c
@@
-7,9
+7,10
@@
* known bugs: can't deal with alpha ranges
*/
* known bugs: can't deal with alpha ranges
*/
-#include "
busybox
.h"
+#include "
libbb
.h"
-#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF
+#if ENABLE_FEATURE_MAKEDEVS_LEAF
+int makedevs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int makedevs_main(int argc, char **argv)
{
mode_t mode;
int makedevs_main(int argc, char **argv)
{
mode_t mode;
@@
-47,7
+48,7
@@
int makedevs_main(int argc, char **argv)
int sz;
sz = snprintf(buf, sizeof(buf), "%s%d", basedev, S);
int sz;
sz = snprintf(buf, sizeof(buf), "%s%d", basedev, S);
- if
(sz<0 || sz>=
sizeof(buf)) /* libc different */
+ if
(sz < 0 || sz >=
sizeof(buf)) /* libc different */
bb_error_msg_and_die("%s too large", basedev);
/* if mode != S_IFCHR and != S_IFBLK third param in mknod() ignored */
bb_error_msg_and_die("%s too large", basedev);
/* if mode != S_IFCHR and != S_IFBLK third param in mknod() ignored */
@@
-64,10
+65,11
@@
int makedevs_main(int argc, char **argv)
return 0;
}
return 0;
}
-#elif
defined CONFIG
_FEATURE_MAKEDEVS_TABLE
+#elif
ENABLE
_FEATURE_MAKEDEVS_TABLE
/* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */
/* Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */
+int makedevs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int makedevs_main(int argc, char **argv)
{
FILE *table = stdin;
int makedevs_main(int argc, char **argv)
{
FILE *table = stdin;
@@
-76,7
+78,7
@@
int makedevs_main(int argc, char **argv)
int linenum = 0;
int ret = EXIT_SUCCESS;
int linenum = 0;
int ret = EXIT_SUCCESS;
- getopt32(arg
c, arg
v, "d:", &line);
+ getopt32(argv, "d:", &line);
if (line)
table = xfopen(line, "r");
if (line)
table = xfopen(line, "r");
@@
-160,8
+162,7
@@
int makedevs_main(int argc, char **argv)
ret = EXIT_FAILURE;
goto loop;
}
ret = EXIT_FAILURE;
goto loop;
}
- } else
- {
+ } else {
dev_t rdev;
if (type == 'p') {
dev_t rdev;
if (type == 'p') {