Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

init: remove support for loglevel.

derp, the kernel does this for us.
  • Loading branch information...
commit 5d528e3d5bfac2e0fb692a309d709f90df902730 1 parent c0f7879
@falconindy authored
Showing with 0 additions and 28 deletions.
  1. +0 −6 README.pod
  2. +0 −22 init.c
View
6 README.pod
@@ -121,12 +121,6 @@ have been run, but prior to the root device being mounted.
An optional parameter to specify an alternate init system for userspace. If not
specified, this defaults to C</sbin/init>.
-=item B<loglevel=>I<#>
-
-Sets the kernel log priority according to the number provided (1-8), with
-larger values producing more output. See B<klogctl>(3) for an explanation of
-the values.
-
=item B<root=>I<device>
The root device to be mounted before leaving early userspace. This can take
View
22 init.c
@@ -18,7 +18,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/klog.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -601,26 +600,6 @@ static void disable_hooks(void) { /* {{{ */
free(list);
} /* }}} */
-static void set_kloglevel(void) { /* {{{ */
- char *level;
- int ret;
-
- level = getenv("loglevel");
- if (!level) {
- return;
- }
-
- if (strlen(level) > 1 || *level < '1' || *level > '8') {
- err("invalid log level: %s\n", level);
- return;
- }
-
- ret = klogctl(8, NULL, *level - 48);
- if (ret != 0) {
- perror("klogctl");
- }
-} /* }}} */
-
static void run_hooks(void) { /* {{{ */
char *bboxinstall[] = { BUSYBOX, "--install", NULL };
char line[PATH_MAX];
@@ -952,7 +931,6 @@ int main(int argc, char *argv[]) {
load_extra_modules(); /* load modules passed in on cmdline */
trigger_udev_events(); /* read and process uevent queue */
disable_hooks(); /* delete hooks specified on cmdline */
- set_kloglevel(); /* set user specified loglevel */
run_hooks(); /* run remaining hooks */
check_for_break(); /* did the user request a shell? */
Please sign in to comment.
Something went wrong with that request. Please try again.