import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / m68k / apollo / dn_debug.c
1
2 #define DN_DEBUG_BUFFER_BASE 0x82800000
3 #define DN_DEBUG_BUFFER_SIZE 8*1024*1024
4
5 static char *current_dbg_ptr=DN_DEBUG_BUFFER_BASE;
6
7 int dn_deb_printf(const char *fmt, ...) {
8
9         va_list args;
10         int i;
11
12         if(current_dbg_ptr<(DN_DEBUG_BUFFER_BASE + DN_DEBUG_BUFFER_SIZE)) {
13                 va_start(args,fmt);
14                 i=vsprintf(current_dbg_ptr,fmt,args);
15                 va_end(args);
16                 current_dbg_ptr+=i;
17         
18                 return i;
19         }
20         else 
21                 return 0;
22 }