From: Erik M. <er...@us...> - 2002-02-13 00:11:00
|
Update of /cvsroot/blob/blob/src/lib In directory usw-pr-cvs1:/tmp/cvs-serv14201 Modified Files: command.c init.c reboot.c terminal.c Log Message: Convert SerialOutput*() functions to printf() and friends Index: command.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/command.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- command.c 8 Feb 2002 12:55:16 -0000 1.11 +++ command.c 13 Feb 2002 00:10:57 -0000 1.12 @@ -37,6 +37,7 @@ #include <blob/command.h> +#include <blob/debug.h> #include <blob/errno.h> #include <blob/error.h> #include <blob/init.h> @@ -124,10 +125,8 @@ *argc = i; #ifdef BLOB_DEBUG - for(i = 0; i < *argc; i++) { - printerrprefix(); - printf("argv[%i] = %s\n", i, argv[i]); - } + for(i = 0; i < *argc; i++) + dprintf("argv[%i] = %s\n", i, argv[i]); #endif } @@ -145,11 +144,9 @@ for(cmd = commands; cmd != NULL; cmd = cmd->next) { if(cmd->magic != COMMAND_MAGIC) { -#ifdef BLOB_DEBUG - printerrprefix(); - printf(__FUNCTION__ "(): Magic failed at 0x%08x\n", - (unsigned int)cmd); -#endif + deprintf("command magic failed at 0x%08x\n", + (unsigned int)cmd); + return -EMAGIC; } @@ -194,11 +191,8 @@ /* single command, go for it */ for(cmd = commands; cmd != NULL; cmd = cmd->next) { if(cmd->magic != COMMAND_MAGIC) { -#ifdef BLOB_DEBUG - printerrprefix(); - printf(__FUNCTION__ "(): magic faild at 0x%08x\n", - (unsigned int)cmd); -#endif + deprintf("command magic failed at 0x%08x\n", + (unsigned int)cmd); return -EMAGIC; } Index: init.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/init.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- init.c 8 Feb 2002 12:55:16 -0000 1.4 +++ init.c 13 Feb 2002 00:10:57 -0000 1.5 @@ -27,6 +27,7 @@ # include <blob/config.h> #endif +#include <blob/debug.h> #include <blob/errno.h> #include <blob/error.h> #include <blob/init.h> @@ -48,12 +49,10 @@ for(item = start; item != end; item++) { if(item->magic != magic) { + deprintf("init magic failed at 0x%08x\n", + (unsigned int)item); printerror(EMAGIC, NULL); -#ifdef BLOB_DEBUG - printerrprefix(); - printf(__FUNCTION__ "(): magic failed at 0x%08x\n", - (unsigned int)item); -#endif + return; } Index: reboot.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/reboot.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- reboot.c 6 Jan 2002 15:46:17 -0000 1.2 +++ reboot.c 13 Feb 2002 00:10:57 -0000 1.3 @@ -29,6 +29,7 @@ #include <blob/serial.h> #include <blob/sa1100.h> +#include <blob/util.h> @@ -41,7 +42,7 @@ int reboot(int argc, char *argv[]) { - SerialOutputString("Rebooting...\n\n"); + printf("Rebooting...\n\n"); serial_flush_output(); RCSR = 0; Index: terminal.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/terminal.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- terminal.c 3 Jan 2002 16:07:18 -0000 1.5 +++ terminal.c 13 Feb 2002 00:10:57 -0000 1.6 @@ -29,6 +29,7 @@ #include <blob/serial.h> #include <blob/terminal.h> +#include <blob/util.h> @@ -43,11 +44,11 @@ { int i; - SerialOutputString(" c"); + printf(" c"); for(i = 0; i < 100; i++) serial_write('\n'); - SerialOutputString("c"); + printf("c"); return 0; } |