// Allocate
argenvBuf = malloc(argenvBytes);
if(argenvBuf == NULL) {
- Warning("Proc_Execve - What the hell? The kernel is out of heap space");
+ Log_Error("BIN", "Proc_Execve - What the hell? The kernel is out of heap space");
return 0;
}
strBuf = argenvBuf + (argc+1)*sizeof(void*) + (envc+1)*sizeof(void*);
free(savedFile);
if(bases[0] == 0)
{
- Warning("Proc_Execve - Unable to load '%s'", Threads_GetName(-1));
+ Log_Warning("BIN", "Proc_Execve - Unable to load '%s'", Threads_GetName(-1));
Threads_Exit(0, 0);
for(;;);
}
sTruePath = VFS_GetTruePath(file);
if(sTruePath == NULL) {
- Warning("[BIN ] '%s' does not exist.", file);
+ Log_Warning("BIN", "'%s' does not exist.", file);
LEAVE('x', 0);
return 0;
}
// Error Check
if(base < BIN_LOWEST) {
- Warning("[BIN ] Executable '%s' cannot be loaded, no space", binary->TruePath);
+ Log_Warning("BIN", "Executable '%s' cannot be loaded, no space", binary->TruePath);
return 0;
}
break;
}
if(!bt) {
- Warning("[BIN ] '%s' is an unknown file type. (0x%x 0x%x 0x%x 0x%x)",
+ Log_Warning("BIN", "'%s' is an unknown file type. (%02x %02x %02x %02x)",
truePath, ident&0xFF, (ident>>8)&0xFF, (ident>>16)&0xFF, (ident>>24)&0xFF);
LEAVE('n');
return NULL;
tPAddr paddr;
paddr = (Uint)MM_AllocPhys();
if(paddr == 0) {
- Warning("Binary_DoLoad - Physical memory allocation failed");
+ Log_Warning("BIN", "Binary_DoLoad - Physical memory allocation failed");
for( ; i--; ) {
MM_DerefPhys( pBinary->Pages[i].Physical );
}
if((Uint)Base < 0xC0000000)
{
// TODO: User Binaries
- Warning("[BIN ] Unloading user binaries is currently unimplemented");
+ Log_Warning("BIN", "Unloading user binaries is currently unimplemented");
return;
}
// - Error Check
if(base >= KLIB_HIGHEST) {
- Warning("[BIN ] Executable '%s' cannot be loaded into kernel, no space", pBinary->TruePath);
+ Log_Warning("BIN", "Executable '%s' cannot be loaded into kernel, no space", pBinary->TruePath);
Binary_Dereference( pBinary );
LEAVE('n');
return 0;
return bt->Relocate( (void*)Base);
}
- Warning("[BIN ] 0x%x is an unknown file type. (0x%x 0x%x 0x%x 0x%x)",
+ Log_Warning("BIN", "%p is an unknown file type. (%02x %02x %02x %02x)",
Base, ident&0xFF, (ident>>8)&0xFF, (ident>>16)&0xFF, (ident>>24)&0xFF);
return 0;
}
}
}
- Warning("[BIN ] Unable to find symbol '%s'", Name);
+ Log_Warning("BIN", "Unable to find symbol '%s'", Name);
return 0;
}
return bt->GetSymbol(Base, Name, Val);
}
- Warning("[BIN ] 0x%x is an unknown file type. (0x%x 0x%x 0x%x 0x%x)",
+ Log_Warning("BIN", "Binary_FindSymbol - %p is an unknown file type. (%02x %02x %02x %02x)",
Base, ident&0xFF, ident>>8, ident>>16, ident>>24);
return 0;
}
return ;
}
if( ntohs(req4->Type) != 0x0800 ) {
- Log_Log("ARP", "Recieved a packet with a bad type 0x%x", ntohs(req4->Type));
+ Log_Log("ARP", "Recieved a packet with a bad type (0x%x)", ntohs(req4->Type));
return ;
}
if( req4->HWSize != 6 ) {
req4->SourceMac.B[0], req4->SourceMac.B[1],
req4->SourceMac.B[2], req4->SourceMac.B[3],
req4->SourceMac.B[4], req4->SourceMac.B[5]);
- Log_Debug("ARP", "to MAC %02x:%02x:%02x:%02x:%02x:%02x",
- req4->DestMac.B[0], req4->DestMac.B[1],
- req4->DestMac.B[2], req4->DestMac.B[3],
- req4->DestMac.B[4], req4->DestMac.B[5]);
- Log_Debug("ARP", "ARP Request IPv4 Address %i.%i.%i.%i",
+ //Log_Debug("ARP", "to MAC %02x:%02x:%02x:%02x:%02x:%02x",
+ // req4->DestMac.B[0], req4->DestMac.B[1],
+ // req4->DestMac.B[2], req4->DestMac.B[3],
+ // req4->DestMac.B[4], req4->DestMac.B[5]);
+ Log_Debug("ARP", "ARP Request IPv4 Address %i.%i.%i.%i from %i.%i.%i.%i",
req4->DestIP.B[0], req4->DestIP.B[1], req4->DestIP.B[2],
- req4->DestIP.B[3]);
- Log_Debug("ARP", "from %i.%i.%i.%i",
+ req4->DestIP.B[3],
req4->SourceIP.B[0], req4->SourceIP.B[1],
req4->SourceIP.B[2], req4->SourceIP.B[3]);
iface = IPv4_GetInterface(Adapter, req4->DestIP, 0);
req4->SourceIP = iface->IP4.Address;
req4->SourceMac = Adapter->MacAddr;
req4->Request = htons(2);
- Log_Debug("ARP", "Hey, That's us!");
- Log_Debug("ARP", "Sending back %02x:%02x:%02x:%02x:%02x:%02x",
+ Log_Debug("ARP", "Sending back us (%02x:%02x:%02x:%02x:%02x:%02x)",
req4->SourceMac.B[0], req4->SourceMac.B[1],
req4->SourceMac.B[2], req4->SourceMac.B[3],
req4->SourceMac.B[4], req4->SourceMac.B[5]);
break;
case 6:
if( Length < sizeof(tArpRequest6) ) {
- Log_Debug("ARP", "Recieved undersized packet (IPv6)");
+ Log_Log("ARP", "Recieved undersized packet (IPv6)");
return ;
}
+ Log_Debug("ARP", "ARP Request IPv6 Address %08x:%08x:%08x:%08x",
+ ntohl(req6->DestIP.L[0]), ntohl(req6->DestIP.L[1]),
+ ntohl(req6->DestIP.L[2]), ntohl(req6->DestIP.L[3])
+ );
iface = IPv6_GetInterface(Adapter, req6->DestIP, 0);
if( iface )
{
req6->SourceIP = iface->IP6.Address;
req6->SourceMac = Adapter->MacAddr;
req6->Request = htons(2);
+ Log_Debug("ARP", "Sending back us (%02x:%02x:%02x:%02x:%02x:%02x)",
+ req4->SourceMac.B[0], req4->SourceMac.B[1],
+ req4->SourceMac.B[2], req4->SourceMac.B[3],
+ req4->SourceMac.B[4], req4->SourceMac.B[5]);
Link_SendPacket(Adapter, 0x0806, req6->DestMac, sizeof(tArpRequest6), req6);
}
break;
break;
default:
- Warning("[ARP ] Unknown Request ID %i", ntohs(req4->Request));
+ Log_Warning("ARP", "Unknown Request ID %i", ntohs(req4->Request));
break;
}
}