}
/**
- * \fn int Proc_Spawn(char *Path)
+ * \fn int Proc_Spawn(const char *Path)
*/
-int Proc_Spawn(char *Path)
+int Proc_Spawn(const char *Path)
{
char stackPath[strlen(Path)+1];
+ ENTER("sPath", Path);
strcpy(stackPath, Path);
Proc_Execve(stackPath, args, &args[1]);
for(;;);
}
+ LEAVE('i', 0);
return 0;
}
// Allocate
argenvBuf = malloc(argenvBytes);
if(argenvBuf == NULL) {
- Log_Error("BIN", "Proc_Execve - What the hell? The kernel is out of heap space");
+ Log_Error("Binary", "Proc_Execve - What the hell? The kernel is out of heap space");
LEAVE('i', 0);
return 0;
}
free(savedFile);
if(bases[0] == 0)
{
- Log_Warning("BIN", "Proc_Execve - Unable to load '%s'", Threads_GetName(-1));
+ Log_Warning("Binary", "Proc_Execve - Unable to load '%s'", Threads_GetName(-1));
LEAVE('-');
Threads_Exit(0, -10);
for(;;);
LOG("sTruePath = %p", sTruePath);
if(sTruePath == NULL) {
- Log_Warning("BIN", "'%s' does not exist.", file);
+ Log_Warning("Binary", "%p '%s' does not exist.", file, file);
LEAVE('x', 0);
return 0;
}
va_start(args, Fmt);
Debug_DbgOnlyFmt(Fmt, args);
va_end(args);
+ Debug_PutCharDebug('\r');
Debug_PutCharDebug('\n');
#if LOCK_DEBUG_OUTPUT
SHORTREL(&glDebug_Lock);
va_start(args, Fmt);
Debug_Fmt(Fmt, args);
va_end(args);
+ Debug_Putchar('\r');
Debug_Putchar('\n');
#if LOCK_DEBUG_OUTPUT
va_start(args, Fmt);
Debug_Fmt(Fmt, args);
va_end(args);
+ Debug_Putchar('\r');
Debug_Putchar('\n');
#if LOCK_DEBUG_OUTPUT
va_start(args, Fmt);
Debug_Fmt(Fmt, args);
va_end(args);
+ Debug_Putchar('\r');
Debug_Putchar('\n');
Threads_Dump();
}
va_end(args);
- Debug_Putchar(')'); Debug_Putchar('\n');
+ Debug_Putchar(')'); Debug_Putchar('\r'); Debug_Putchar('\n');
#if LOCK_DEBUG_OUTPUT
SHORTREL(&glDebug_Lock);
Debug_Fmt(Fmt, args);
va_end(args);
+ Debug_Putchar('\r');
Debug_Putchar('\n');
#if LOCK_DEBUG_OUTPUT
// No Return
if(RetType == '-') {
+ Debug_Putchar('\r');
Debug_Putchar('\n');
#if LOCK_DEBUG_OUTPUT
SHORTREL(&glDebug_Lock);
// Extended (64-Bit)
case 'X': Debug_Fmt("0x%llx", args); break;
}
+ Debug_Putchar('\r');
Debug_Putchar('\n');
va_end(args);
Uint pos = 0;
LogF("%014lli ", now());
Debug_Puts(1, Header);
- LogF(" (Hexdump of %p)\n", Data);
+ LogF(" (Hexdump of %p)\r\n", Data);
#define CH(n) ((' '<=cdat[(n)]&&cdat[(n)]<0x7F) ? cdat[(n)] : '.')
LogF("%014lli Log: %04x:"
" %02x %02x %02x %02x %02x %02x %02x %02x"
" %02x %02x %02x %02x %02x %02x %02x %02x"
- " %c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c\n",
+ " %c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c\r\n",
now(),
pos,
cdat[ 0], cdat[ 1], cdat[ 2], cdat[ 3], cdat[ 4], cdat[ 5], cdat[ 6], cdat[ 7],
LogF("%c", CH(i));
}
+ Debug_Putchar('\r');
Debug_Putchar('\n');
}
}
// All Dependencies OK? Initialise
StartupPrint(Module->Name);
- Log_Log("Module", "Initialising %p '%s' v%i.%i...",
+ Log_Log("Module", "Starting %p '%s' v%i.%i",
Module, Module->Name,
Module->Version >> 8, Module->Version & 0xFF
);
LogF("Log: [%i] ", Threads_GetTID());
LogF((char*)Regs->Arg1,
Regs->Arg2, Regs->Arg3, Regs->Arg4, Regs->Arg5, Regs->Arg6);
- LogF("\n");
+ LogF("\r\n");
break;
//#endif
// -- Default (Return Error)
default:
- Warning("SyscallHandler: Unknown System Call %i", Regs->Num);
+ Log_Warning("Syscalls", "Unknown System Call %i", Regs->Num);
if(Regs->Num < NUM_SYSCALLS)
- Warning(" Syscall '%s'", cSYSCALL_NAMES[Regs->Num]);
+ Log_Warning("Syscall", " named '%s'", cSYSCALL_NAMES[Regs->Num]);
err = -ENOSYS;
ret = -1;
break;
}
+
+ if(err == 0) err = errno;
if(err != 0) {
LOG("ID: %i, Return errno = %i", Regs->Num, err);