fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / net / netconsole.c
index 29c98d6..69233f6 100644 (file)
@@ -86,6 +86,7 @@ static void write_msg(struct console *con, const char *msg, unsigned int len)
 }
 
 static struct console netconsole = {
+       .name = "netcon",
        .flags = CON_ENABLED | CON_PRINTBUFFER,
        .write = write_msg
 };
@@ -93,23 +94,26 @@ static struct console netconsole = {
 static int option_setup(char *opt)
 {
        configured = !netpoll_parse_options(&np, opt);
-       return 0;
+       return 1;
 }
 
 __setup("netconsole=", option_setup);
 
 static int init_netconsole(void)
 {
+       int err;
+
        if(strlen(config))
                option_setup(config);
 
        if(!configured) {
                printk("netconsole: not configured, aborting\n");
-               return -EINVAL;
+               return 0;
        }
 
-       if(netpoll_setup(&np))
-               return -EINVAL;
+       err = netpoll_setup(&np);
+       if (err)
+               return err;
 
        register_console(&netconsole);
        printk(KERN_INFO "netconsole: network logging started\n");