summaryrefslogtreecommitdiffhomepage
path: root/Private/FSKit
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-04-28 15:13:03 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-04-28 15:13:03 +0000
commit14f10cc0b35155ddb19ec9069ebb884246e61dcf (patch)
treea988617d1c511cf04eb2c2392829a37d82a59e2e /Private/FSKit
parentdb0681412191dcceb5aa99cf31fb8339d6bc4adb (diff)
parent346558208d39a036effe3a4ec232fa5df5a3c8e7 (diff)
Merged in MHR-18 (pull request #8)
MHR-18: A lot of fixes and improvements, mostly related to disk I/O and kernel stability.
Diffstat (limited to 'Private/FSKit')
-rw-r--r--Private/FSKit/NewFS.hxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/Private/FSKit/NewFS.hxx b/Private/FSKit/NewFS.hxx
index d3b72803..2a783b11 100644
--- a/Private/FSKit/NewFS.hxx
+++ b/Private/FSKit/NewFS.hxx
@@ -82,8 +82,8 @@ default.
#define kNewFSLbaType (NewOS::Lba)
/// Start After the PM headers, pad 1024 bytes.
-#define kNewFSAddressAsLba (1024)
-#define kNewFSCatalogStartAddress (kNewFSAddressAsLba + sizeof(NewPartitionBlock))
+#define kNewFSAddressAsLba (512)
+#define kNewFSCatalogStartAddress (1024 + sizeof(NewPartitionBlock))
#define kResourceTypeDialog 10
#define kResourceTypeString 11
@@ -117,8 +117,8 @@ struct PACKED NewCatalog final {
NewOS::Int32 Flags;
NewOS::Int32 Kind;
- NewOS::Lba FirstFork;
- NewOS::Lba LastFork;
+ NewOS::Lba DataFork;
+ NewOS::Lba ResourceFork;
NewOS::Lba NextSibling;
NewOS::Lba PrevSibling;
@@ -187,7 +187,7 @@ enum { kNewFSRsrcForkKind = 0, kNewFSDataForkKind = 1 };
/// forks...) Designed like the DOM, detects the filesystem automatically.
///
-class NewFSParser {
+class NewFSParser final {
public:
explicit NewFSParser() = default;
~NewFSParser() = default;
@@ -208,34 +208,34 @@ class NewFSParser {
/// @param name the fork name.
/// @return the fork.
_Output NewFork* FindFork(_Input NewCatalog* catalog,
- _Input const Char* name);
+ _Input const Char* name, Boolean dataOrRsrc);
- virtual _Output Void RemoveFork(_Input NewFork* fork) = 0;
+ _Output Void RemoveFork(_Input NewFork* fork);
- virtual _Output Void CloseFork(_Input NewFork* fork) = 0;
+ _Output Void CloseFork(_Input NewFork* fork);
- virtual _Output NewCatalog* FindCatalog(_Input const char* catalogName) = 0;
+ _Output NewCatalog* FindCatalog(_Input const char* catalogName);
- virtual _Output NewCatalog* GetCatalog(_Input const char* name) = 0;
+ _Output NewCatalog* GetCatalog(_Input const char* name);
- virtual _Output NewCatalog* CreateCatalog(_Input const char* name,
+ _Output NewCatalog* CreateCatalog(_Input const char* name,
_Input const Int32& flags,
_Input const Int32& kind);
- virtual _Output NewCatalog* CreateCatalog(_Input const char* name);
+ _Output NewCatalog* CreateCatalog(_Input const char* name);
- virtual bool WriteCatalog(_Input _Output NewCatalog* catalog, voidPtr data);
+ bool WriteCatalog(_Input _Output NewCatalog* catalog, voidPtr data);
- virtual VoidPtr ReadCatalog(_Input _Output NewCatalog* catalog,
- SizeT dataSz) = 0;
+ VoidPtr ReadCatalog(_Input _Output NewCatalog* catalog,
+ SizeT dataSz);
- virtual bool Seek(_Input _Output NewCatalog* catalog, SizeT off) = 0;
+ bool Seek(_Input _Output NewCatalog* catalog, SizeT off);
- virtual SizeT Tell(_Input _Output NewCatalog* catalog) = 0;
+ SizeT Tell(_Input _Output NewCatalog* catalog);
- virtual bool RemoveCatalog(_Input _Output NewCatalog* catalog) = 0;
+ bool RemoveCatalog(_Input _Output NewCatalog* catalog);
- virtual bool CloseCatalog(_InOut NewCatalog* catalog) = 0;
+ bool CloseCatalog(_InOut NewCatalog* catalog);
/// @brief Make a EPM+NewFS drive out of the disk.
/// @param drive The drive to write on.