* 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 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 */
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. */
+int makedevs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int makedevs_main(int argc, char **argv)
{
FILE *table = stdin;
int linenum = 0;
int ret = EXIT_SUCCESS;
- getopt32(argc, argv, "d:", &line);
+ getopt32(argv, "d:", &line);
if (line)
table = xfopen(line, "r");
ret = EXIT_FAILURE;
goto loop;
}
- } else
- {
+ } else {
dev_t rdev;
if (type == 'p') {