-int klogd_main(int argc, char **argv)
-{
- unsigned long opt;
- char *c_arg;
- int console_log_level = -1;
-
- /* do normal option parsing */
- opt = bb_getopt_ulflags (argc, argv, "c:n", &c_arg);
-
- if (opt & OPT_LEVEL) {
- /* Valid levels are between 1 and 8 */
- console_log_level = bb_xgetlarg(c_arg, 10, 1, 8);
- }
-
- if (!(opt & OPT_FOREGROUND)) {
-#if defined(__uClinux__)
- vfork_daemon_rexec(0, 1, argc, argv, "-n");
-#else /* __uClinux__ */
- bb_xdaemon(0, 1);
-#endif /* __uClinux__ */
- }
- doKlogd(console_log_level);
-
- return EXIT_SUCCESS;