From 4ab9a574c9301d9590c91209f62c348e1d8c8883 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 27 Mar 2010 15:43:22 +0800 Subject: [PATCH] Updating drivers to use the Log_ functions instead of Log() and Warning() --- Kernel/Makefile.BuildNum | 2 +- Kernel/arch/x86/irq.c | 4 +-- Kernel/arch/x86/main.c | 6 ++-- Kernel/debug.c | 5 +++- Kernel/drv/proc.c | 15 ++++------ Kernel/modules.c | 28 +++++++++---------- Kernel/system.c | 49 +++++++++++++++++---------------- Kernel/vfs/main.c | 3 -- Kernel/vfs/memfile.c | 2 -- Kernel/vfs/mount.c | 4 +-- Modules/Filesystems/FAT/fat.c | 14 +++++----- Modules/Network/NE2000/ne2000.c | 19 ++++--------- 12 files changed, 68 insertions(+), 83 deletions(-) diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index fa88cf0c..dbceacb6 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1590 +BUILD_NUM = 1601 diff --git a/Kernel/arch/x86/irq.c b/Kernel/arch/x86/irq.c index 9e0647f2..7ff1fe94 100644 --- a/Kernel/arch/x86/irq.c +++ b/Kernel/arch/x86/irq.c @@ -49,12 +49,12 @@ int IRQ_AddHandler( int Num, void (*Callback)(int) ) for( i = 0; i < MAX_CALLBACKS_PER_IRQ; i++ ) { if( gIRQ_Handlers[Num][i] == NULL ) { - Log("IRQ_AddHandler: Added IRQ%i Cb#%i %p", Num, i, Callback); + Log_Log("IRQ", "Added IRQ%i Cb#%i %p", Num, i, Callback); gIRQ_Handlers[Num][i] = Callback; return 1; } } - Warning("IRQ_AddHandler - No free callbacks on IRQ%i", Num); + Log_Warning("IRQ", "No free callbacks on IRQ%i", Num); return 0; } diff --git a/Kernel/arch/x86/main.c b/Kernel/arch/x86/main.c index fd257dbb..3ea4b0e8 100644 --- a/Kernel/arch/x86/main.c +++ b/Kernel/arch/x86/main.c @@ -57,11 +57,10 @@ int kmain(Uint MbMagic, tMBoot_Info *MbInfo) Log("Initialising builtin modules..."); Modules_LoadBuiltins(); - Log("Loading Modules... (%i of them)", MbInfo->ModuleCount); + Log("Loading %i Modules...", MbInfo->ModuleCount); // Load initial modules mods = (void*)( MbInfo->Modules + KERNEL_BASE ); - Log("MbInfo = %p", MbInfo); for( i = 0; i < MbInfo->ModuleCount; i ++ ) { // Adjust into higher half @@ -73,9 +72,8 @@ int kmain(Uint MbMagic, tMBoot_Info *MbInfo) if( !Module_LoadMem( (void *)mods[i].Start, mods[i].End-mods[i].Start, (char *)mods[i].String ) ) { - Warning("Unable to load module\n"); + Log_Warning("ARCH", "Unable to load module\n"); } - Log("Done. (MbInfo = %p)", MbInfo); } // Pass on to Independent Loader diff --git a/Kernel/debug.c b/Kernel/debug.c index 7168b3af..f71e889e 100644 --- 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 = ' '; - int minSize = 0; + int minSize = 0, len; 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; + if(!p) p = "(null)"; + len = strlen(p); + while(len++ < minSize) Debug_Putchar(pad); printString: if(!p) p = "(null)"; while(*p) Debug_Putchar(*p++); diff --git a/Kernel/drv/proc.c b/Kernel/drv/proc.c index c968d526..c007c326 100644 --- a/Kernel/drv/proc.c +++ b/Kernel/drv/proc.c @@ -68,7 +68,7 @@ tSysFS_Ent gSysFS_Version = { .FindDir = SysFS_Comm_FindDir } }; -// Root of the SysFS tree (just used for clean code) +// Root of the SysFS tree (just used to keep the code clean) tSysFS_Ent gSysFS_Root = { NULL, NULL, NULL, @@ -77,11 +77,6 @@ tSysFS_Ent gSysFS_Root = { .Size = 1, .ImplPtr = &gSysFS_Version, .ImplInt = (Uint)&gSysFS_Root // Self-Link - // .NumACLs = 1, - // .ACLs = &gVFS_ACL_EveryoneRX, - // .Flags = VFS_FFLAG_DIRECTORY, - // .ReadDir = SysFS_Comm_ReadDir, - // .FindDir = SysFS_Comm_FindDir } }; tDevFS_Driver gSysFS_DriverInfo = { @@ -171,7 +166,7 @@ int SysFS_RegisterFile(char *Path, char *Data, int Length) ent->Node.Size ++; else gSysFS_DriverInfo.RootNode.Size ++; - Log("[SYSFS] Added directory '%s'", child->Name); + Log_Log("SysFS", "Added directory '%s'", child->Name); } ent = child; @@ -194,7 +189,7 @@ int SysFS_RegisterFile(char *Path, char *Data, int Length) break; } if( child ) { - Warning("[SYSFS] '%s' is taken (in '%s')\n", &Path[start], Path); + Log_Warning("SysFS", "'%s' is taken (in '%s')\n", &Path[start], Path); return 0; } @@ -228,7 +223,7 @@ int SysFS_RegisterFile(char *Path, char *Data, int Length) child->ListNext = gSysFS_FileList; gSysFS_FileList = child; - Log("[SYSFS] Added '%s' (%p)", Path, Data); + Log_Log("SysFS", "Added '%s' (%p)", Path, Data); return child->Node.Inode; } @@ -297,7 +292,7 @@ int SysFS_RemoveFile(int ID) if( ent == file ) break; } if(!ent) { - Warning("[SYSFS] Bookkeeping Error: File in list, but not in directory"); + Log_Warning("SysFS", "Bookkeeping Error: File in list, but not in directory"); return 0; } diff --git a/Kernel/modules.c b/Kernel/modules.c index 37f5418b..eb742d47 100644 --- a/Kernel/modules.c +++ b/Kernel/modules.c @@ -84,7 +84,7 @@ int Module_int_Initialise(tModule *Module) break; } if( mod ) { - Warning("[MOD ] Circular dependency detected"); + Log_Warning("Module", "Circular dependency detected"); LEAVE_RET('i', -1); } @@ -95,7 +95,7 @@ int Module_int_Initialise(tModule *Module) break; } if( i == giNumBuiltinModules ) { - Warning("[MOD ] Dependency '%s' for module '%s' failed"); + Log_Warning("Module", "Dependency '%s' for module '%s' failed"); return -1; } @@ -111,7 +111,7 @@ int Module_int_Initialise(tModule *Module) // All Dependencies OK? Initialise StartupPrint(Module->Name); - Log("[MOD ] Initialising %p '%s' v%i.%i...", + Log_Log("Module", "Initialising %p '%s' v%i.%i...", Module, Module->Name, Module->Version >> 8, Module->Version & 0xFF ); @@ -121,16 +121,16 @@ int Module_int_Initialise(tModule *Module) switch(ret) { case MODULE_ERR_MISC: - Warning("[MOD ] Unable to load, reason: Miscelanious"); + Log_Warning("Module", "Unable to load, reason: Miscelanious"); break; case MODULE_ERR_NOTNEEDED: - Warning("[MOD ] Unable to load, reason: Module not needed (probably hardware not found)"); + Log_Warning("Module", "Unable to load, reason: Module not needed"); break; case MODULE_ERR_MALLOC: - Warning("[MOD ] Unable to load, reason: Error in malloc/realloc/calloc, probably not good"); + Log_Warning("Module", "Unable to load, reason: Error in malloc/realloc/calloc, probably not good"); break; default: - Warning("[MOD ] Unable to load reason - Unknown code %i", ret); + Log_Warning("Module", "Unable to load reason - Unknown code %i", ret); break; } LEAVE_RET('i', ret); @@ -209,7 +209,7 @@ int Module_LoadFile(char *Path, char *ArgString) // Error check if(base == NULL) { - Warning("Module_LoadFile: Unable to load '%s'", Path); + Log_Warning("Module", "Module_LoadFile - Unable to load '%s'", Path); return 0; } @@ -235,9 +235,9 @@ int Module_LoadFile(char *Path, char *ArgString) // Unknown module type?, return error Binary_Unload(base); #if USE_EDI - Warning("Module_LoadFile: Module has neither a Module Info struct, nor an EDI entrypoint"); + Log_Warning("Module", "Module '%s' has neither a Module Info struct, nor an EDI entrypoint", Path); #else - Warning("Module_LoadFile: Module does not have a Module Info struct"); + Log_Warning("Module", "Module '%s' does not have a Module Info struct", Path); #endif return 0; } @@ -245,14 +245,14 @@ int Module_LoadFile(char *Path, char *ArgString) // Check magic number if(info->Magic != MODULE_MAGIC) { - Warning("Module_LoadFile: Module's magic value is invalid (0x%x != 0x%x)", info->Magic, MODULE_MAGIC); + Log_Warning("Module", "Module's magic value is invalid (0x%x != 0x%x)", info->Magic, MODULE_MAGIC); return 0; } // Check Architecture if(info->Arch != MODULE_ARCH_ID) { - Warning("Module_LoadFile: Module is for a different architecture"); + Log_Warning("Module", "Module is for a different architecture"); return 0; } @@ -269,7 +269,7 @@ int Module_LoadFile(char *Path, char *ArgString) return 0; } - Log("Initialising %p '%s' v%i.%i...", + Log_Log("Module", "Initialising %p '%s' v%i.%i...", info, info->Name, info->Version>>8, info->Version & 0xFF @@ -308,7 +308,7 @@ int Module_int_ResolveDeps(tModule *Info) { // Check if the module is loaded if( !Module_IsLoaded(*names) ) { - Warning("Module `%s' requires `%s', which is not loaded\n", Info->Name, *names); + Log_Warning("Module", "Module `%s' requires `%s', which is not loaded\n", Info->Name, *names); return 0; } } diff --git a/Kernel/system.c b/Kernel/system.c index 463b4e0f..8b1cb8e0 100644 --- a/Kernel/system.c +++ b/Kernel/system.c @@ -48,7 +48,7 @@ void System_Init(char *ArgString) System_ParseCommandLine(ArgString); // - Execute the Config Script - Log("Executing config script..."); + Log_Log("CFG", "Executing config script..."); System_ExecuteScript(); } @@ -63,7 +63,7 @@ void System_ParseCommandLine(char *ArgString) int i; char *str; - Log("Kernel Command Line: \"%s\"", ArgString); + Log_Log("CFG", "Kernel Invocation \"%s\"", ArgString); // --- Get Arguments --- str = ArgString; @@ -114,7 +114,7 @@ void System_ParseVFS(char *Arg) // Check if the equals was found if( *value == '\0' ) { - Warning("Expected '=' in the string '%s'", Arg); + Log_Warning("CFG", "Expected '=' in the string '%s'", Arg); return ; } @@ -125,7 +125,7 @@ void System_ParseVFS(char *Arg) // - Symbolic Link = if(value[0] == '/') { - Log("Symbolic link '%s' pointing to '%s'", Arg, value); + Log_Log("CFG", "Symbolic link '%s' pointing to '%s'", Arg, value); VFS_Symlink(Arg, value); } // - Mount =: @@ -140,13 +140,13 @@ void System_ParseVFS(char *Arg) } // Create Mountpoint if( (fd = VFS_Open(Arg, 0)) == -1 ) { - Log("Creating directory '%s'", Arg, value); + Log_Log("CFG", "Creating directory '%s'", Arg, value); VFS_MkDir( Arg ); } else { VFS_Close(fd); } // Mount - Log("Mounting '%s' to '%s' ('%s')", dev, Arg, value); + Log_Log("CFG", "Mounting '%s' to '%s' ('%s')", dev, Arg, value); VFS_Mount(dev, Arg, value, ""); } } @@ -168,7 +168,7 @@ void System_ParseSetting(char *Arg) { //if(strcmp(Arg, "") == 0) { //} else { - Warning("Kernel flag '%s' is not recognised", Arg); + Log_Warning("CFG", "Kernel flag '%s' is not recognised", Arg); //} } else @@ -177,10 +177,10 @@ void System_ParseSetting(char *Arg) value ++; // and eat it's position if(strcmp(Arg, "SCRIPT") == 0) { - Log("Config Script: '%s'", value); + Log_Log("CFG", "Config Script: '%s'", value); gsConfigScript = value; } else { - Warning("Kernel config setting '%s' is not recognised", Arg); + Log_Warning("CFG", "Kernel config setting '%s' is not recognised", Arg); } } @@ -201,7 +201,7 @@ void System_ExecuteScript() // Open Script fp = VFS_Open(gsConfigScript, VFS_OPENFLAG_READ); if(fp == -1) { - Warning("[CFG] Passed script '%s' does not exist", gsConfigScript); + Log_Warning("CFG", "Passed script '%s' does not exist", gsConfigScript); return; } @@ -229,11 +229,11 @@ void System_ExecuteScript() if( strcmp(line->Parts[0], "mount") == 0 ) { if( line->nParts != 4 ) { - Warning("Configuration command 'mount' requires 3 arguments, %i given", + Log_Warning("CFG", "Configuration command 'mount' requires 3 arguments, %i given", line->nParts-1); continue; } - //Log("[CFG ] Mount '%s' to '%s' (%s)", + //Log_Log("CFG", "Mount '%s' to '%s' (%s)", // line->Parts[1], line->Parts[2], line->Parts[3]); //! \todo Use an optional 4th argument for the options string VFS_Mount(line->Parts[1], line->Parts[2], line->Parts[3], ""); @@ -242,7 +242,8 @@ void System_ExecuteScript() else if(strcmp(line->Parts[0], "module") == 0) { if( line->nParts < 2 || line->nParts > 3 ) { - Warning("Configuration command 'module' requires 1 or 2 arguments, %i given", + Log_Warning("CFG", + "Configuration command 'module' requires 1 or 2 arguments, %i given", line->nParts-1); continue; } @@ -255,33 +256,33 @@ void System_ExecuteScript() else if(strcmp(line->Parts[0], "udimod") == 0) { if( line->nParts != 2 ) { - Warning("Configuration command 'udimod' requires 1 argument, %i given", + Log_Warning("CFG", "Configuration command 'udimod' requires 1 argument, %i given", line->nParts-1); continue; } - Log("[CFG ] Load UDI Module '%s'", line->Parts[1]); + Log_Log("CFG", "Load UDI Module '%s'", line->Parts[1]); Module_LoadFile(line->Parts[1], ""); } // Load a EDI Module else if(strcmp(line->Parts[0], "edimod") == 0) { if( line->nParts != 2 ) { - Warning("Configuration command 'edimod' requires 1 argument, %i given", + Log_Warning("CFG", "Configuration command 'edimod' requires 1 argument, %i given", line->nParts-1); continue; } - Log("[CFG ] Load EDI Module '%s'", line->Parts[1]); + Log_Log("CFG", "Load EDI Module '%s'", line->Parts[1]); Module_LoadFile(line->Parts[1], ""); } // Create a Symbolic Link else if(strcmp(line->Parts[0], "symlink") == 0) { if( line->nParts != 3 ) { - Warning("Configuration command 'symlink' requires 2 arguments, %i given", + Log_Warning("CFG", "Configuration command 'symlink' requires 2 arguments, %i given", line->nParts-1); continue; } - Log("[CFG ] Symlink '%s' pointing to '%s'", + Log_Log("CFG", "Symlink '%s' pointing to '%s'", line->Parts[1], line->Parts[2]); VFS_Symlink(line->Parts[1], line->Parts[2]); } @@ -289,26 +290,26 @@ void System_ExecuteScript() else if(strcmp(line->Parts[0], "mkdir") == 0) { if( line->nParts != 2 ) { - Warning("Configuration command 'mkdir' requires 1 argument, %i given", + Log_Warning("CFG", "Configuration command 'mkdir' requires 1 argument, %i given", line->nParts-1); continue; } - Log("[CFG ] New Directory '%s'", line->Parts[1]); + Log_Log("CFG", "New Directory '%s'", line->Parts[1]); VFS_MkDir(line->Parts[1]); } // Spawn a process else if(strcmp(line->Parts[0], "spawn") == 0) { if( line->nParts != 2 ) { - Warning("Configuration command 'spawn' requires 1 argument, %i given", + Log_Warning("CFG", "Configuration command 'spawn' requires 1 argument, %i given", line->nParts-1); continue; } - Log("[CFG ] Starting '%s' as a new task", line->Parts[1]); + Log_Log("CFG", "Starting '%s' as a new task", line->Parts[1]); Proc_Spawn(line->Parts[1]); } else { - Warning("Unknown configuration command '%s' on line %i", + Log_Warning("CFG", "Unknown configuration command '%s' on line %i", line->Parts[0], line->TrueLine ); diff --git a/Kernel/vfs/main.c b/Kernel/vfs/main.c index 736b5785..45e20d91 100644 --- a/Kernel/vfs/main.c +++ b/Kernel/vfs/main.c @@ -84,14 +84,11 @@ char *VFS_GetTruePath(char *Path) */ void VFS_GetMemPath(char *Dest, void *Base, Uint Length) { - Log("VFS_GetMemPath: (Base=%p, Length=0x%x, Dest=%p)", Base, Length, Dest); Dest[0] = '$'; itoa( &Dest[1], (Uint)Base, 16, BITS/4, '0' ); Dest[BITS/4+1] = ':'; itoa( &Dest[BITS/4+2], Length, 16, BITS/4, '0' ); Dest[BITS/2+2] = '\0'; - - Log("VFS_GetMemPath: Dest = \"%s\"", Dest); } /** diff --git a/Kernel/vfs/memfile.c b/Kernel/vfs/memfile.c index 4120b20a..3c756713 100644 --- a/Kernel/vfs/memfile.c +++ b/Kernel/vfs/memfile.c @@ -60,8 +60,6 @@ tVFS_Node *VFS_MemFile_Create(tVFS_Node *Unused, char *Path) // Check for NULL byte if(*str != '\0') return NULL; - Log(" VFS_MemFile_Create: base=0x%x, size=0x%x", base, size); - // Allocate and fill node ret = malloc(sizeof(tVFS_Node)); memset(ret, 0, sizeof(tVFS_Node)); diff --git a/Kernel/vfs/mount.c b/Kernel/vfs/mount.c index 090d0242..45591a46 100644 --- a/Kernel/vfs/mount.c +++ b/Kernel/vfs/mount.c @@ -43,7 +43,7 @@ int VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options) // Get the filesystem fs = VFS_GetFSByName(Filesystem); if(!fs) { - Warning("VFS_Mount - Unknown FS Type '%s'", Filesystem); + Log_Warning("VFS", "VFS_Mount - Unknown FS Type '%s'", Filesystem); return -1; } @@ -96,7 +96,7 @@ int VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options) } RELEASE( &glVFS_MountList ); - Log("VFS_Mount: Mounted '%s' to '%s' ('%s')", Device, MountPoint, Filesystem); + Log_Log("VFS", "Mounted '%s' to '%s' ('%s')", Device, MountPoint, Filesystem); VFS_UpdateMountFile(); diff --git a/Modules/Filesystems/FAT/fat.c b/Modules/Filesystems/FAT/fat.c index d063c874..c444fa38 100644 --- a/Modules/Filesystems/FAT/fat.c +++ b/Modules/Filesystems/FAT/fat.c @@ -83,14 +83,14 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options) //Open device and read boot sector diskInfo->fileHandle = VFS_Open(Device, VFS_OPENFLAG_READ|VFS_OPENFLAG_WRITE); if(diskInfo->fileHandle == -1) { - Warning("FAT_InitDisk - Unable to open device '%s'", Device); + Log_Warning("FAT", "Unable to open device '%s'", Device); return NULL; } VFS_ReadAt(diskInfo->fileHandle, 0, 512, bs); if(bs->bps == 0 || bs->spc == 0) { - Warning("FAT_InitDisk - Error in FAT Boot Sector\n"); + Log_Warning("FAT", "Error in FAT Boot Sector\n"); return NULL; } @@ -136,7 +136,7 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options) sSize = "GiB"; iSize >>= 20; } - Log("[FAT ] '%s' %s, %i %s", Device, sFatType, iSize, sSize); + Log_Log("FAT", "'%s' %s, %i %s", Device, sFatType, iSize, sSize); } #endif @@ -165,7 +165,7 @@ tVFS_Node *FAT_InitDevice(char *Device, char **Options) Uint32 Ofs; diskInfo->FATCache = (Uint32*)malloc(sizeof(Uint32)*diskInfo->ClusterCount); if(diskInfo->FATCache == NULL) { - Warning("FAT_InitDisk - Heap Exhausted\n"); + Log_Warning("FAT", "Heap Exhausted\n"); return NULL; } Ofs = bs->resvSectCount*512; @@ -343,7 +343,7 @@ append: #else Uint32 val; //Uint8 buf[512]; - Warning("[FAT ] TODO: Implement cluster allocation with non cached FAT"); + Log_Warning("FAT", "TODO: Implement cluster allocation with non cached FAT"); return 0; if(Disk->type == FAT12) { @@ -547,7 +547,7 @@ Uint64 FAT_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) { cluster = FAT_int_GetFatValue( disk, cluster ); if(cluster == -1) { - Warning("[FAT ] EOC Unexpectedly Reached"); + Log_Warning("FAT", "EOC Unexpectedly Reached"); return 0; } Offset -= disk->BytesPerCluster; @@ -849,7 +849,7 @@ char *FAT_ReadDir(tVFS_Node *Node, int ID) // Bounds Checking (Used to spot heap overflows) if(cluster > disk->ClusterCount + 2) { - Warning("FAT_ReadDir - Cluster ID is over cluster count (0x%x>0x%x)", + Log_Warning("FAT", "Cluster ID is over cluster count (0x%x>0x%x)", cluster, disk->ClusterCount+2); LEAVE('n'); return NULL; diff --git a/Modules/Network/NE2000/ne2000.c b/Modules/Network/NE2000/ne2000.c index 60f9ac2d..f3faddae 100644 --- a/Modules/Network/NE2000/ne2000.c +++ b/Modules/Network/NE2000/ne2000.c @@ -128,7 +128,7 @@ int Ne2k_Install(char **Options) } if( giNe2k_CardCount == 0 ) { - Warning("[Ne2k ] No cards detected"); + Log_Warning("Ne2k", "No cards detected"); return MODULE_ERR_NOTNEEDED; } @@ -199,21 +199,13 @@ int Ne2k_Install(char **Options) Ne2k_WriteReg(base, MAC5, gpNe2k_Cards[ k ].MacAddr[5]); */ - Log_Log("NE2K", "Card %i 0x%04x %02x:%02x:%02x:%02x:%02x:%02x", - k, base, + Log_Log("Ne2k", "Card %i 0x%04x IRQ%i %02x:%02x:%02x:%02x:%02x:%02x", + k, base, gpNe2k_Cards[ k ].IRQ, gpNe2k_Cards[k].MacAddr[0], gpNe2k_Cards[k].MacAddr[1], gpNe2k_Cards[k].MacAddr[2], gpNe2k_Cards[k].MacAddr[3], gpNe2k_Cards[k].MacAddr[4], gpNe2k_Cards[k].MacAddr[5] ); - Log("[NE2K]: Card #%i: IRQ=%i, IOBase=0x%x", - k, gpNe2k_Cards[ k ].IRQ, gpNe2k_Cards[ k ].IOBase); - Log("MAC Address %x:%x:%x:%x:%x:%x", - gpNe2k_Cards[ k ].MacAddr[0], gpNe2k_Cards[ k ].MacAddr[1], - gpNe2k_Cards[ k ].MacAddr[2], gpNe2k_Cards[ k ].MacAddr[3], - gpNe2k_Cards[ k ].MacAddr[4], gpNe2k_Cards[ k ].MacAddr[5] - ); - // Set VFS Node gpNe2k_Cards[ k ].Name[0] = '0'+k; gpNe2k_Cards[ k ].Name[1] = '\0'; @@ -320,7 +312,8 @@ Uint64 Ne2k_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) // Sanity Check Length if(Length > TX_BUF_SIZE*256) { - Warning( + Log_Warning( + "Ne2k", "Ne2k_Write - Attempting to send over TX_BUF_SIZE*256 (%i) bytes (%i)", TX_BUF_SIZE*256, Length ); @@ -518,5 +511,5 @@ void Ne2k_IRQHandler(int IntNum) return ; } } - Warning("[NE2K ] Recieved Unknown IRQ %i", IntNum); + Log_Warning("Ne2k", "Recieved Unknown IRQ %i", IntNum); } -- 2.20.1