]> git.sur5r.net Git - u-boot/blobdiff - common/console.c
remove "static" from "ide_dev_desc" to use it from external code
[u-boot] / common / console.c
index da49c968272068235ac79edbd9ef7a520eea3d68..8dbd8e38913ab8ec2751b9f1fc249048a8a21dd2 100644 (file)
@@ -191,6 +191,11 @@ void putc (const char c)
 {
        DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_SILENT_CONSOLE
+       if (gd->flags & GD_FLG_SILENT)
+               return;
+#endif
+
        if (gd->flags & GD_FLG_DEVINIT) {
                /* Send to the standard output */
                fputc (stdout, c);
@@ -204,6 +209,11 @@ void puts (const char *s)
 {
        DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_SILENT_CONSOLE
+       if (gd->flags & GD_FLG_SILENT)
+               return;
+#endif
+
        if (gd->flags & GD_FLG_DEVINIT) {
                /* Send to the standard output */
                fputs (stdout, s);
@@ -402,6 +412,9 @@ int console_init_r (void)
        DECLARE_GLOBAL_DATA_PTR;
        char *stdinname, *stdoutname, *stderrname;
        device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL;
+#ifdef CFG_CONSOLE_ENV_OVERWRITE
+       int i;
+#endif /* CFG_CONSOLE_ENV_OVERWRITE */
 
        /* set default handlers at first */
        gd->jt[XF_getc] = serial_getc;
@@ -446,23 +459,23 @@ int console_init_r (void)
 
 #ifndef CFG_CONSOLE_INFO_QUIET
        /* Print information */
-       printf ("In:    ");
+       puts ("In:    ");
        if (stdio_devices[stdin] == NULL) {
-               printf ("No input devices available!\n");
+               puts ("No input devices available!\n");
        } else {
                printf ("%s\n", stdio_devices[stdin]->name);
        }
 
-       printf ("Out:   ");
+       puts ("Out:   ");
        if (stdio_devices[stdout] == NULL) {
-               printf ("No output devices available!\n");
+               puts ("No output devices available!\n");
        } else {
                printf ("%s\n", stdio_devices[stdout]->name);
        }
 
-       printf ("Err:   ");
+       puts ("Err:   ");
        if (stdio_devices[stderr] == NULL) {
-               printf ("No error devices available!\n");
+               puts ("No error devices available!\n");
        } else {
                printf ("%s\n", stdio_devices[stderr]->name);
        }
@@ -473,7 +486,7 @@ int console_init_r (void)
        for (i = 0; i < 3; i++) {
                setenv (stdio_names[i], stdio_devices[i]->name);
        }
-#endif /*  CFG_CONSOLE_ENV_OVERWRITE */
+#endif /* CFG_CONSOLE_ENV_OVERWRITE */
 
 #if 0
        /* If nothing usable installed, use only the initial console */
@@ -495,7 +508,7 @@ int console_init_r (void)
 
 #ifdef CONFIG_SPLASH_SCREEN
        /* suppress all output if splash screen is enabled and we have
-           a bmp to display                                            */
+          a bmp to display                                            */
        if (getenv("splashimage") != NULL)
                outputdev = search_device (DEV_FLAGS_OUTPUT, "nulldev");
 #endif
@@ -536,23 +549,23 @@ int console_init_r (void)
 
 #ifndef CFG_CONSOLE_INFO_QUIET
        /* Print information */
-       printf ("In:    ");
+       puts ("In:    ");
        if (stdio_devices[stdin] == NULL) {
-               printf ("No input devices available!\n");
+               puts ("No input devices available!\n");
        } else {
                printf ("%s\n", stdio_devices[stdin]->name);
        }
 
-       printf ("Out:   ");
+       puts ("Out:   ");
        if (stdio_devices[stdout] == NULL) {
-               printf ("No output devices available!\n");
+               puts ("No output devices available!\n");
        } else {
                printf ("%s\n", stdio_devices[stdout]->name);
        }
 
-       printf ("Err:   ");
+       puts ("Err:   ");
        if (stdio_devices[stderr] == NULL) {
-               printf ("No error devices available!\n");
+               puts ("No error devices available!\n");
        } else {
                printf ("%s\n", stdio_devices[stderr]->name);
        }