git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes to x86 error and interrupt handling
[tpg/acess2.git]
/
Kernel
/
debug.c
diff --git
a/Kernel/debug.c
b/Kernel/debug.c
index
7168b3a
..
12adc22
100644
(file)
--- a/
Kernel/debug.c
+++ b/
Kernel/debug.c
@@
-85,7
+85,7
@@
static void Debug_Puts(char *Str)
void Debug_Fmt(const char *format, va_list *args)
{
char c, pad = ' ';
void Debug_Fmt(const char *format, va_list *args)
{
char c, pad = ' ';
- int minSize = 0;
+ int minSize = 0
, len
;
char tmpBuf[34]; // For Integers
char *p = NULL;
int isLongLong = 0;
char tmpBuf[34]; // For Integers
char *p = NULL;
int isLongLong = 0;
@@
-182,6
+182,9
@@
void Debug_Fmt(const char *format, va_list *args)
case 's':
p = (char*)(Uint)arg;
case 's':
p = (char*)(Uint)arg;
+ if(!p) p = "(null)";
+ len = strlen(p);
+ while(len++ < minSize) Debug_Putchar(pad);
printString:
if(!p) p = "(null)";
while(*p) Debug_Putchar(*p++);
printString:
if(!p) p = "(null)";
while(*p) Debug_Putchar(*p++);
@@
-261,7
+264,7
@@
void Debug_SetKTerminal(char *File)
if(giDebug_KTerm != -1)
VFS_Close(giDebug_KTerm);
giDebug_KTerm = VFS_Open(File, VFS_OPENFLAG_WRITE);
if(giDebug_KTerm != -1)
VFS_Close(giDebug_KTerm);
giDebug_KTerm = VFS_Open(File, VFS_OPENFLAG_WRITE);
- Log
(
"Opened '%s' as 0x%x", File, giDebug_KTerm);
+ Log
_Log("Debug",
"Opened '%s' as 0x%x", File, giDebug_KTerm);
}
void Debug_Enter(char *FuncName, char *ArgTypes, ...)
}
void Debug_Enter(char *FuncName, char *ArgTypes, ...)
UCC
git Repository :: git.ucc.asn.au