[????] BUILD 0.1.1.??? DATE 9/0?/2011 AT ?:?? ??
==================================================== Mainly changed: Tasking + Implemented multitasking
This commit is contained in:
@ -180,13 +180,16 @@ void luxInitrdInstall (MultibootInfo* info)
|
||||
VfsInstallFs(&fs);
|
||||
|
||||
// Check for multiboot info flags to see if any modules are loaded
|
||||
if ((info->Flags & 8) == 0) return;
|
||||
if ((info->Flags & 8) == 0) {
|
||||
Error("Initrd", "No boot modules found!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Loop through each module and if it is an initrd image, mount it
|
||||
MultibootModule* modules = (MultibootModule*) info->ModulesAddress;
|
||||
|
||||
for (i = 0; i < info->ModulesCount; i++)
|
||||
if ((*(uint32*) modules[i].ModuleStart) == LUXMAGIC)
|
||||
if (*((uint32*) modules[i].ModuleStart) == LUXMAGIC)
|
||||
{
|
||||
// Mount the device
|
||||
Log("Initrd", "Found initrd image at 0x%x.\n", modules[i].ModuleStart);
|
||||
@ -196,4 +199,7 @@ void luxInitrdInstall (MultibootInfo* info)
|
||||
mp->FsData[0] = modules[i].ModuleStart;
|
||||
mp->FsData[1] = modules[i].ModuleEnd;
|
||||
}
|
||||
else {
|
||||
Log("Initrd", "Found module @ 0x%x, but not initrd image.\n", modules[i].ModuleStart);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ void HalInitialize()
|
||||
KeyboardInstallB(); Log("HAL", "%#[2/2]\n", ColorLightGreen);
|
||||
|
||||
// Install mouse driver
|
||||
MouseInstall(); Log("HAL", "Installed mouse driver\n");
|
||||
//MouseInstall(); Log("HAL", "Installed mouse driver\n");
|
||||
|
||||
// Install VFS
|
||||
VfsInstall();
|
||||
|
@ -228,6 +228,10 @@ DirectoryEntry* VfsReadDirectory (FILE* handle, uint32 index)
|
||||
if (!handle) return NULL;
|
||||
MountPoint* mp = &(mpArray[handle->DeviceId]);
|
||||
|
||||
// Don't try to read files as directories
|
||||
if ((handle->Flags & 0x7) == FileFile) return NULL;
|
||||
|
||||
// Ask FS to make the read
|
||||
if (!fsArray[mp->FsId].ReadDirectory) return NULL;
|
||||
return fsArray[mp->FsId].ReadDirectory(mp, handle, index);
|
||||
}
|
||||
|
Reference in New Issue
Block a user