diff options
| -rw-r--r-- | Kernel/HALKit/AMD64/HalKernelMain.cxx | 10 | ||||
| -rw-r--r-- | Kernel/Sources/Main.cxx | 22 |
2 files changed, 21 insertions, 11 deletions
diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx index fcd12247..9c7f571e 100644 --- a/Kernel/HALKit/AMD64/HalKernelMain.cxx +++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx @@ -27,6 +27,7 @@ Kernel::Property cKernelVersion; +Kernel::Property cAutoFormatDisk; /// @brief This symbol is the kernel main symbol. EXTERN_C void KeMain(); @@ -216,12 +217,17 @@ EXTERN_C void hal_init_platform( kSyscalls[cLPCSanitizeMsg].Leak().Leak()->fHooked = true; // newoskrnl version 1.00 - // Kernel::StringView strVer(cMaxPropLen); strVer += "\\Properties\\KernelVersion"; cKernelVersion.GetKey() = strVer; - cKernelVersion.GetValue() = 1100; + cKernelVersion.GetValue() = 100; + + Kernel::StringView strAutoMount(cMaxPropLen); + strAutoMount += "\\Properties\\AutoMountFS?"; + + cAutoFormatDisk.GetKey() = strAutoMount; + cAutoFormatDisk.GetValue() = Yes; Kernel::HAL::hal_system_get_cores(kHandoverHeader->f_HardwareTables.f_RsdPtr); diff --git a/Kernel/Sources/Main.cxx b/Kernel/Sources/Main.cxx index c30b26e6..b4751110 100644 --- a/Kernel/Sources/Main.cxx +++ b/Kernel/Sources/Main.cxx @@ -7,7 +7,6 @@ ------------------------------------------- */ -#include "KernelKit/DebugOutput.hpp" #include <ArchKit/ArchKit.hpp> #include <Modules/CoreCG/CoreCG.hxx> #include <CompilerKit/Detail.hxx> @@ -27,10 +26,11 @@ #include <CFKit/Property.hpp> EXTERN Kernel::Property cKernelVersion; +EXTERN Kernel::Property cAutoFormatDisk; namespace Kernel::Detail { - /// @brief Filesystem auto installer, additional checks are also done by the class. + /// @brief Filesystem auto formatter, additional checks are also done by the class. class FilesystemInstaller final { Kernel::NewFilesystemManager* fNewFS{nullptr}; @@ -39,16 +39,20 @@ namespace Kernel::Detail /// @brief wizard constructor. explicit FilesystemInstaller() { + if (cAutoFormatDisk.GetValue() == No) + { + return; + } + if (Kernel::FilesystemManagerInterface::GetMounted()) { - /// Mounted partition, cool! + // Partition is mounted, cool! Kernel::kcout - << "newoskrnl: No need to create for a NewFS+EPM partition here...\r"; + << "newoskrnl: No need to create for a new NewFS (EPM) partition here...\r"; } else { - /// Not mounted partition, auto-mount. - ///! Mounts a NewFS block. + // Mounts a NewFS from main drive. fNewFS = new Kernel::NewFilesystemManager(); Kernel::FilesystemManagerInterface::Mount(fNewFS); @@ -59,7 +63,7 @@ namespace Kernel::Detail const auto cDirCount = 9; const char* cDirStr[cDirCount] = { "\\Boot\\", "\\System\\", "\\Support\\", "\\Applications\\", - "\\Users\\", "\\Library\\", "\\Mount\\", "\\DCIM\\", "\\Storage\\"}; + "\\Users\\", "\\Library\\", "\\Mounted\\", "\\DCIM\\", "\\Applications\\Storage\\"}; for (Kernel::SizeT dirIndx = 0UL; dirIndx < cDirCount; ++dirIndx) { @@ -97,7 +101,7 @@ namespace Kernel::Detail Kernel::StringView metadataFolder(kNewFSSectorSz); metadataFolder += - "<p>Kind: folder</p>\r<p>Created by: system</p>\r<p>Edited by: " + "<!properties/>\r<p>Kind: folder</p>\r<p>Created by: system</p>\r<p>Edited by: " "system</p>\r<p>Volume Type: Zeta</p>\r"; metadataFolder += "<p>Path: "; @@ -135,7 +139,7 @@ namespace Kernel::Detail Kernel::StringView diskFolder(kNewFSSectorSz); diskFolder += - "<p>Kind: alias to SIM Card</p>\r<p>Created by: system</p>\r<p>Edited " + "<!properties/><p>Kind: alias to SIM Card</p>\r<p>Created by: system</p>\r<p>Edited " "by: " "system</p>\r<p>Volume Type: SIM Card</p>\r"; |
