summaryrefslogtreecommitdiffhomepage
path: root/Private/FSKit
diff options
context:
space:
mode:
authoramlal <amlal@el-mahrouss-logic.com>2024-03-15 16:05:53 +0100
committeramlal <amlal@el-mahrouss-logic.com>2024-03-15 16:05:53 +0100
commita9bff220fd92e5bda1f488cbc34c191cc14e436f (patch)
tree9a0d67161e8d2c3486c3e0bd9d641e5c01c0976a /Private/FSKit
parent7efd511ff45132e540d437f8b2c4d55612a5ab2a (diff)
HCR-14: See below.
KernelKit && FSKit: Start work on HCFS support. Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/FSKit')
-rw-r--r--Private/FSKit/NewFS.hxx43
1 files changed, 27 insertions, 16 deletions
diff --git a/Private/FSKit/NewFS.hxx b/Private/FSKit/NewFS.hxx
index 657f6fae..75578af0 100644
--- a/Private/FSKit/NewFS.hxx
+++ b/Private/FSKit/NewFS.hxx
@@ -162,40 +162,51 @@ struct PACKED NewPartitionBlock final {
#define kFilesystemBitWidth (sizeof(NewCharType))
#define kFilesystemLbaType (HCore::Lba)
-#define kNewFSAddressAsLba (1024)
+
+/// Start After the PM headers, pad 1024 bytes.
+#define kNewFSAddressAsLba (1024U)
namespace HCore {
///
-/// \name NewFSImplementation
-/// \brief HCFS filesystem operations. (catalog creation, remove removal, root
-/// fork...)
+/// \name NewFSParser
+/// \brief NewFS parser class. (catalog creation, remove removal, root, forks...)
+/// Designed like the DOM.
///
-class NewFSImplementation {
+class NewFSParser {
+ public:
+ explicit NewFSParser() = default;
+ virtual ~NewFSParser() = default;
+
public:
- explicit NewFSImplementation() = default;
- virtual ~NewFSImplementation() = default;
+ HCORE_COPY_DEFAULT(NewFSParser);
public:
- HCORE_COPY_DEFAULT(NewFSImplementation);
+ virtual _Output NewFork* ForkFrom(NewCatalog& catalog, const Int64& id) = 0;
- virtual NewFork* ForkFrom(NewCatalog& catalog, const Int64& id) = 0;
+ virtual _Output NewCatalog* FindCatalog(const char* catalogName) = 0;
- virtual NewCatalog* RootCatalog() = 0;
- virtual NewCatalog* NextCatalog(_Input _Output NewCatalog& cur) = 0;
- virtual NewCatalog* PrevCatalog(_Input _Output NewCatalog& cur) = 0;
+ virtual _Output NewCatalog* RootCatalog() = 0;
- virtual NewCatalog* GetCatalog(_Input const char* name) = 0;
+ virtual _Output NewCatalog* NextCatalog(_Input _Output NewCatalog& cur) = 0;
- virtual NewCatalog* CreateCatalog(_Input const char* name,
+ virtual _Output NewCatalog* PrevCatalog(_Input _Output NewCatalog& cur) = 0;
+
+ virtual _Output NewCatalog* GetCatalog(_Input const char* name) = 0;
+
+ virtual _Output NewCatalog* CreateCatalog(_Input const char* name,
_Input const Int32& flags,
_Input const Int32& kind) = 0;
- virtual NewCatalog* CreateCatalog(_Input const char* name) = 0;
+
+ virtual _Output NewCatalog* CreateCatalog(_Input const char* name) = 0;
virtual bool WriteCatalog(_Input _Output NewCatalog& catalog,
voidPtr data) = 0;
- virtual bool RemoveCatalog(_Input NewCatalog& catalog) = 0;
+ virtual bool RemoveCatalog(_Input _Output NewCatalog& catalog) = 0;
+ /// @brief Make a EPM+NewFS drive out of the disk.
+ /// @param drive The drive to write on.
+ /// @return If it was sucessful, see DbgLastError().
virtual bool Format(_Input _Output DriveTraits& drive) = 0;
};