diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:25 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:25 +0200 |
commit | 4a01ad9260efb1ea23020d9cb8587e318082bbb5 (patch) | |
tree | 92890a96d2cb1d362fd8236c465f3664f14e5e2c /common/console.c | |
parent | caa0e5b553852cdbf81537b063b40dc096f6185f (diff) | |
download | barebox-4a01ad9260efb1ea23020d9cb8587e318082bbb5.tar.gz barebox-4a01ad9260efb1ea23020d9cb8587e318082bbb5.tar.xz |
svn_rev_128
remove more console stuf
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 96 |
1 files changed, 1 insertions, 95 deletions
diff --git a/common/console.c b/common/console.c index 17c1edd7bb..516058a3b5 100644 --- a/common/console.c +++ b/common/console.c @@ -27,29 +27,6 @@ #include <console.h> #include <exports.h> -DECLARE_GLOBAL_DATA_PTR; - -#ifdef CONFIG_AMIGAONEG3SE -int console_changed = 0; -#endif - -#ifdef CFG_CONSOLE_IS_IN_ENV -/* - * if overwrite_console returns 1, the stdin, stderr and stdout - * are switched to the serial port, else the settings in the - * environment are used - */ -#ifdef CFG_CONSOLE_OVERWRITE_ROUTINE -extern int overwrite_console (void); -#define OVERWRITE_CONSOLE overwrite_console () -#else -#define OVERWRITE_CONSOLE 0 -#endif /* CFG_CONSOLE_OVERWRITE_ROUTINE */ - -#endif /* CFG_CONSOLE_IS_IN_ENV */ - -/** U-Boot INITIAL CONSOLE-NOT COMPATIBLE FUNCTIONS *************************/ - void serial_printf (const char *fmt, ...) { va_list args; @@ -66,54 +43,6 @@ void serial_printf (const char *fmt, ...) serial_puts (printbuffer); } -#if 0 -int fgetc (int file) -{ - if (file < MAX_FILES) - return stdio_devices[file]->getc (); - - return -1; -} - -int ftstc (int file) -{ - if (file < MAX_FILES) - return stdio_devices[file]->tstc (); - - return -1; -} - -void fputc (int file, const char c) -{ - if (file < MAX_FILES) - stdio_devices[file]->putc (c); -} - -void fputs (int file, const char *s) -{ - if (file < MAX_FILES) - stdio_devices[file]->puts (s); -} - -void fprintf (int file, const char *fmt, ...) -{ - va_list args; - uint i; - char printbuffer[CFG_PBSIZE]; - - va_start (args, fmt); - - /* For this to work, printbuffer must be larger than - * anything we ever want to print. - */ - i = vsprintf (printbuffer, fmt, args); - va_end (args); - - /* Send to desired file */ - fputs (file, printbuffer); -} -#endif -/** U-Boot INITIAL CONSOLE-COMPATIBLE FUNCTION *****************************/ int getc (void) { @@ -127,21 +56,11 @@ int tstc (void) void putc (const char c) { -#ifdef CONFIG_SILENT_CONSOLE - if (gd->flags & GD_FLG_SILENT) - return; -#endif - serial_putc (c); } void puts (const char *s) { -#ifdef CONFIG_SILENT_CONSOLE - if (gd->flags & GD_FLG_SILENT) - return; -#endif - serial_puts (s); } @@ -182,7 +101,7 @@ static int ctrlc_disabled = 0; /* see disable_ctrl() */ static int ctrlc_was_pressed = 0; int ctrlc (void) { - if (!ctrlc_disabled && gd->have_console) { + if (!ctrlc_disabled) { if (tstc ()) { switch (getc ()) { case 0x03: /* ^C - Control C */ @@ -216,16 +135,3 @@ void clear_ctrlc (void) { ctrlc_was_pressed = 0; } - -/* Called before relocation - use serial functions */ -int console_init_f (void) -{ - gd->have_console = 1; - -#ifdef CONFIG_SILENT_CONSOLE - if (getenv("silent") != NULL) - gd->flags |= GD_FLG_SILENT; -#endif - - return (0); -} |