2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>

PR 1244/bsps
	* console/console.c: Remove definition of __assert.
This commit is contained in:
Joel Sherrill
2007-05-28 15:03:13 +00:00
parent 38b21e3c79
commit 41e7421452
2 changed files with 5 additions and 40 deletions

View File

@@ -1,3 +1,8 @@
2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1244/bsps
* console/console.c: Remove definition of __assert.
2007-01-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* console/fb_vga.c: Eliminate __u16, __u32.

View File

@@ -34,8 +34,6 @@
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#undef __assert
void __assert (const char *file, int line, const char *msg);
#include <bsp.h>
#include <bsp/irq.h>
@@ -141,44 +139,6 @@ int kbd_poll_read( int minor )
return -1;
}
/*
static void* termios_ttyp_console = NULL;
void enq_key( char key )
{
if( termios_ttyp_console )
{
rtems_termios_enqueue_raw_characters(termios_ttyp_console, &key,1 );
}
}
*/
void __assert (const char *file, int line, const char *msg)
{
static char exit_msg[] = "EXECUTIVE SHUTDOWN! Any key to reboot...";
unsigned char ch;
/*
* Note we cannot call exit or printf from here,
* assert can fail inside ISR too
*/
/*
* Close console
*/
close(2);
close(1);
close(0);
printk("\nassert failed: %s: ", file);
printk("%d: ", line);
printk("%s\n\n", msg);
printk(exit_msg);
ch = BSP_poll_char();
printk("\n\n");
rtemsReboot();
}
/*-------------------------------------------------------------------------+
| Console device driver INITIALIZE entry point.
+--------------------------------------------------------------------------+