diff options
Diffstat (limited to 'Kernel/Sources')
| -rw-r--r-- | Kernel/Sources/FS/NewFS.cxx | 27 | ||||
| -rw-r--r-- | Kernel/Sources/FileManager.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/KeMain.cxx | 17 | ||||
| -rw-r--r-- | Kernel/Sources/NewFS+FileManager.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/NewFS+IO.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/NewFS+Journal.cxx | 4 | ||||
| -rw-r--r-- | Kernel/Sources/compile_flags.txt | 2 |
7 files changed, 26 insertions, 36 deletions
diff --git a/Kernel/Sources/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx index c07ec6d7..e8771de9 100644 --- a/Kernel/Sources/FS/NewFS.cxx +++ b/Kernel/Sources/FS/NewFS.cxx @@ -4,7 +4,7 @@ ------------------------------------------- */ -#ifdef __FSKIT_NEWFS__ +#ifdef __FSKIT_USE_NEWFS__ #include <Modules/AHCI/AHCI.hxx> #include <Modules/ATA/ATA.hxx> @@ -38,7 +38,7 @@ STATIC MountpointInterface sMountpointInterface; /// @param theFork the fork itself. /// @return the fork _Output NewFork* NewFSParser::CreateFork(_Input NewCatalog* catalog, - _Input NewFork& theFork) + _Input NewFork& theFork) { if (!sMountpointInterface.GetAddressOf(this->fDriveIndex)) return nullptr; @@ -207,7 +207,7 @@ _Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name) /// @param flags the flags of the catalog. /// @param kind the catalog kind. /// @return catalog pointer. -_Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name, +_Output NewCatalog* NewFSParser::CreateCatalog(_Input const char* name, _Input const Int32& flags, _Input const Int32& kind) { @@ -451,7 +451,7 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) if (partBlock->PartitionName[0] == 0 && rt_string_cmp(partBlock->Ident, kNewFSIdent, kNewFSIdentLen)) { - /// partition is free and valid. + // partition is free and valid. partBlock->Version = kNewFSVersionInteger; @@ -463,9 +463,10 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) rt_copy_memory((VoidPtr)cUntitledHD, (VoidPtr)partBlock->PartitionName, rt_string_len(cUntitledHD)); - SizeT catalogCount = 0; - SizeT sectorCount = drv_std_get_sector_count(); - SizeT diskSize = drv_std_get_drv_size(); + SizeT catalogCount = 0UL; + + SizeT sectorCount = drv_std_get_sector_count(); + SizeT diskSize = drv_std_get_drv_size(); partBlock->Kind = kNewFSPartitionTypeStandard; partBlock->StartCatalog = kNewFSCatalogStartAddress; @@ -490,12 +491,12 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) kcout << "newoskrnl: free sectors: " << hex_number(partBlock->FreeSectors) << endl; kcout << "newoskrnl: sector size: " << hex_number(partBlock->SectorSize) << endl; - /// write the root catalog. + // write the root catalog. this->CreateCatalog(kNewFSRoot, 0, kNewFSCatalogKindDir); if (partBlock->Flags & kNewFSPartitionTypeBoot) { - /// make it bootable when needed. + // make it bootable when needed. Char bufEpmHdr[kNewFSSectorSz] = {0}; BootBlockType* epmBoot = (BootBlockType*)bufEpmHdr; @@ -525,7 +526,7 @@ bool NewFSParser::Format(_Input _Output DriveTrait* drive) kcout << "newoskrnl: partition block already exists.\r"; - /// return success as well, do not ignore that partition. + // return success as well, do not ignore that partition. return true; } @@ -555,7 +556,7 @@ bool NewFSParser::WriteCatalog(_Input _Output NewCatalog* catalog, voidPtr data, rt_copy_memory(catalog->Name, forkData->CatalogName, kNewFSNodeNameLen); - /// sanity check of the fork position as the condition to run the loop. + // sanity check of the fork position as the condition to run the loop. while (startFork >= kNewFSCatalogStartAddress) { drive->fPacket.fPacketContent = forkData; @@ -566,7 +567,7 @@ bool NewFSParser::WriteCatalog(_Input _Output NewCatalog* catalog, voidPtr data, kcout << "newoskrnl: fork name: " << forkData->ForkName << endl; - /// sanity check the fork. + // check the fork, if it's position is valid. if (forkData->DataOffset <= kNewFSCatalogStartAddress) { ErrLocal() = kErrorDiskIsCorrupted; @@ -980,4 +981,4 @@ namespace Kernel::Detail } } // namespace Kernel::Detail -#endif // ifdef __FSKIT_NEWFS__ +#endif // ifdef __FSKIT_USE_NEWFS__ diff --git a/Kernel/Sources/FileManager.cxx b/Kernel/Sources/FileManager.cxx index 4cd34d1f..fa076a33 100644 --- a/Kernel/Sources/FileManager.cxx +++ b/Kernel/Sources/FileManager.cxx @@ -50,7 +50,7 @@ namespace Kernel return false; } -#ifdef __FSKIT_NEWFS__ +#ifdef __FSKIT_USE_NEWFS__ /// @brief Opens a new file. /// @param path /// @param r @@ -192,5 +192,5 @@ namespace Kernel { return fImpl; } -#endif // __FSKIT_NEWFS__ +#endif // __FSKIT_USE_NEWFS__ } // namespace Kernel diff --git a/Kernel/Sources/KeMain.cxx b/Kernel/Sources/KeMain.cxx index a4b087c3..099ade0c 100644 --- a/Kernel/Sources/KeMain.cxx +++ b/Kernel/Sources/KeMain.cxx @@ -187,25 +187,14 @@ namespace Kernel::Detail STATIC Kernel::Void ke_launch_srv(Kernel::Void) { // load security server. - Kernel::PEFLoader launchDevil("C:\\System\\launchd"); + Kernel::PEFLoader simConn("C:\\System\\SimConnect"); - if (!launchDevil.IsLoaded()) + if (!simConn.IsLoaded()) { Kernel::ke_stop(RUNTIME_CHECK_FAILED); } - Kernel::Utils::execute_from_image(launchDevil, - Kernel::ProcessHeader::kAppKind); - - /// load middleware service. - Kernel::PEFLoader stageBoard("C:\\System\\stageboard"); - - if (!stageBoard.IsLoaded()) - { - Kernel::ke_stop(RUNTIME_CHECK_FAILED); - } - - Kernel::Utils::execute_from_image(stageBoard, + Kernel::Utils::execute_from_image(simConn, Kernel::ProcessHeader::kAppKind); } } // namespace Kernel::Detail diff --git a/Kernel/Sources/NewFS+FileManager.cxx b/Kernel/Sources/NewFS+FileManager.cxx index 2658d784..b68bd99c 100644 --- a/Kernel/Sources/NewFS+FileManager.cxx +++ b/Kernel/Sources/NewFS+FileManager.cxx @@ -7,7 +7,7 @@ #include <KernelKit/FileManager.hpp> #include <KernelKit/KernelHeap.hpp> -#ifdef __FSKIT_NEWFS__ +#ifdef __FSKIT_USE_NEWFS__ /// @brief NewFS File manager. /// BUGS: 0 @@ -86,4 +86,4 @@ namespace Kernel } } // namespace Kernel -#endif // ifdef __FSKIT_NEWFS__ +#endif // ifdef __FSKIT_USE_NEWFS__ diff --git a/Kernel/Sources/NewFS+IO.cxx b/Kernel/Sources/NewFS+IO.cxx index 884f8c11..20f3011f 100644 --- a/Kernel/Sources/NewFS+IO.cxx +++ b/Kernel/Sources/NewFS+IO.cxx @@ -17,7 +17,7 @@ * *************************************************************/ -#ifdef __FSKIT_NEWFS__ +#ifdef __FSKIT_USE_NEWFS__ #include <FirmwareKit/EPM.hxx> @@ -98,4 +98,4 @@ Int32 fs_newfs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIn return DrvTrait.fPacket.fPacketGood; } -#endif // ifdef __FSKIT_NEWFS__ +#endif // ifdef __FSKIT_USE_NEWFS__ diff --git a/Kernel/Sources/NewFS+Journal.cxx b/Kernel/Sources/NewFS+Journal.cxx index f69744cc..75e8b94b 100644 --- a/Kernel/Sources/NewFS+Journal.cxx +++ b/Kernel/Sources/NewFS+Journal.cxx @@ -7,7 +7,7 @@ #include <KernelKit/DebugOutput.hpp> #include <KernelKit/FileManager.hpp> -#ifdef __FSKIT_NEWFS__ +#ifdef __FSKIT_USE_NEWFS__ ///! BUGS: 0 ///! @file NewFS+Journal.cxx @@ -19,4 +19,4 @@ namespace Kernel::Journal using namespace Kernel; -#endif // ifdef __FSKIT_NEWFS__ +#endif // ifdef __FSKIT_USE_NEWFS__ diff --git a/Kernel/Sources/compile_flags.txt b/Kernel/Sources/compile_flags.txt index 1f54e6fb..b02c5e3d 100644 --- a/Kernel/Sources/compile_flags.txt +++ b/Kernel/Sources/compile_flags.txt @@ -3,5 +3,5 @@ -std=c++20 -I../ -I$(HOME)/ --D__FSKIT_NEWFS__ +-D__FSKIT_USE_NEWFS__ -D__NEWOS_AMD64__ |
