]> git.hungrycats.org Git - linux/commitdiff
[PATCH] UML: Make a common misconfiguration impossible
authorJeff Dike <jdike@addtoit.com>
Tue, 11 Jan 2005 11:13:27 +0000 (03:13 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 11 Jan 2005 11:13:27 +0000 (03:13 -0800)
This patch makes UML produce error messages instead of silently exiting
when one of several configuration mistakes are made.  FD_CHAN is now
mandatory so that people don't turn it off and complain about no boot
messages.

Some printks were turned into printfs in the tt mode gdb code so that they
appear on the screen.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/Kconfig_char
arch/um/defconfig
arch/um/drivers/Makefile
arch/um/drivers/chan_kern.c
arch/um/kernel/tt/gdb.c

index 7a933d1b5d5bd2f61a900809183096761503ceae..fa34a9698586a14d5e1160eecbe777847d5e0584 100644 (file)
@@ -23,15 +23,6 @@ config SSL
 
         Unless you have a specific reason for disabling this, say Y.
 
-config FD_CHAN
-       bool "file descriptor channel support"
-       help
-        This option enables support for attaching UML consoles and serial
-        lines to already set up file descriptors.  Generally, the main
-        console is attached to file descriptors 0 and 1 (stdin and stdout),
-        so it would be wise to leave this enabled unless you intend to
-        attach it to some other host device.
-
 config NULL_CHAN
        bool "null channel support"
        help
@@ -80,7 +71,7 @@ config XTERM_CHAN
 
 config NOCONFIG_CHAN
        bool
-       default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && FD_CHAN && NULL_CHAN)
+       default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && NULL_CHAN)
 
 config CON_ZERO_CHAN
        string "Default main console channel initialization"
index 515581109029493d62defbaa1d14f95e5e452217..66f902a9907b103f9069c24dcf710514d4213ca1 100644 (file)
@@ -92,13 +92,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_STDERR_CONSOLE=y
 CONFIG_STDIO_CONSOLE=y
 CONFIG_SSL=y
-CONFIG_FD_CHAN=y
 CONFIG_NULL_CHAN=y
 CONFIG_PORT_CHAN=y
 CONFIG_PTY_CHAN=y
 CONFIG_TTY_CHAN=y
 CONFIG_XTERM_CHAN=y
-# CONFIG_NOCONFIG_CHAN is not set
+CONFIG_NOCONFIG_CHAN=y
 CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
 CONFIG_CON_CHAN="xterm"
 CONFIG_SSL_CHAN="pty"
index 3a3ac38017f4fcac2b5457aa17afddbbad8b6f7c..e94da95ffdcfa8d1e83715abbd5addb9b9ea7293 100644 (file)
@@ -20,7 +20,7 @@ ubd-objs := ubd_kern.o ubd_user.o
 port-objs := port_kern.o port_user.o
 harddog-objs := harddog_kern.o harddog_user.o
 
-obj-y := stdio_console.o $(CHAN_OBJS)
+obj-y := stdio_console.o fd.o $(CHAN_OBJS)
 obj-$(CONFIG_SSL) += ssl.o
 obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
 
@@ -34,7 +34,6 @@ obj-$(CONFIG_MCONSOLE) += mconsole.o
 obj-$(CONFIG_MMAPPER) += mmapper_kern.o 
 obj-$(CONFIG_BLK_DEV_UBD) += ubd.o 
 obj-$(CONFIG_HOSTAUDIO) += hostaudio.o
-obj-$(CONFIG_FD_CHAN) += fd.o 
 obj-$(CONFIG_NULL_CHAN) += null.o 
 obj-$(CONFIG_PORT_CHAN) += port.o
 obj-$(CONFIG_PTY_CHAN) += pty.o
index bf4bb736e6afac5ff7da3fff5a8586fbaee512e4..f30ae1b0bcc04bf24faa9e6eaa5b3e755712e9d1 100644 (file)
@@ -399,11 +399,7 @@ struct chan_type {
 };
 
 struct chan_type chan_table[] = {
-#ifdef CONFIG_FD_CHAN
        { "fd", &fd_ops },
-#else
-       { "fd", &not_configged_ops },
-#endif
 
 #ifdef CONFIG_NULL_CHAN
        { "null", &null_ops },
index 10db6d6ab7ea65dde08845862282249fd115a5a3..22cbdbffbe3e65ba20da8747dc734c06c4171b8f 100644 (file)
@@ -162,7 +162,7 @@ int gdb_remove(char *unused)
 void signal_usr1(int sig)
 {
        if(debugger_pid != -1){
-               printk(UM_KERN_ERR "The debugger is already running\n");
+               printf("The debugger is already running\n");
                return;
        }
        debugger_pid = start_debugger(linux_prog, 0, 0, &debugger_fd);
@@ -228,19 +228,19 @@ int debugger_signal(int status, pid_t pid){ return(0); }
 void child_signal(pid_t pid, int status){ }
 int init_ptrace_proxy(int idle_pid, int startup, int stop)
 {
-       printk(UM_KERN_ERR "debug requested when CONFIG_PT_PROXY is off\n");
+       printf("debug requested when CONFIG_PT_PROXY is off\n");
        kill_child_dead(idle_pid);
        exit(1);
 }
 
 void signal_usr1(int sig)
 {
-       printk(UM_KERN_ERR "debug requested when CONFIG_PT_PROXY is off\n");
+       printf("debug requested when CONFIG_PT_PROXY is off\n");
 }
 
 int attach_debugger(int idle_pid, int pid, int stop)
 {
-       printk(UM_KERN_ERR "attach_debugger called when CONFIG_PT_PROXY "
+       printf("attach_debugger called when CONFIG_PT_PROXY "
               "is off\n");
        return(-1);
 }