summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Sources
diff options
context:
space:
mode:
authorAmlal <amlal@zka.com>2024-07-17 11:47:56 +0200
committerAmlal <amlal@zka.com>2024-07-17 11:47:56 +0200
commit9e9a4f09ae2ea33ffc12855071753a987a6b798d (patch)
treebf70c29f8dbdbf47b7d3ceb8130681d65d2f0c0a /Kernel/Sources
parent7753fb12b4350b26c2182e4de870451b3328a1fc (diff)
[IMP] Automount FS property.
Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Kernel/Sources')
-rw-r--r--Kernel/Sources/Main.cxx22
1 files changed, 13 insertions, 9 deletions
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";