diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-20 12:17:47 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-20 12:17:47 +0100 |
| commit | 6f95c0b5815a4bd3362c1e8fe2241df25318d6fa (patch) | |
| tree | c33ed712cdb9f72d7bb3c9294d9f9e07b456edad /dev/Kernel/src/FS | |
| parent | bee34b67fdc357cc8d504d4864bd9faf94b6b374 (diff) | |
ADD: Working on a fix for the last problem on NeFS.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/src/FS')
| -rw-r--r-- | dev/Kernel/src/FS/NeFS.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc index e375632f..0ef83615 100644 --- a/dev/Kernel/src/FS/NeFS.cc +++ b/dev/Kernel/src/FS/NeFS.cc @@ -138,13 +138,22 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NFS_FORK_STRUCT& the_fork) the_fork.PreviousSibling = lbaOfPreviousFork; the_fork.NextSibling = (the_fork.DataOffset - the_fork.DataSize - sizeof(NFS_FORK_STRUCT)); + NFS_FORK_STRUCT* fork = new NFS_FORK_STRUCT; + + MUST_PASS(fork); // ????? + + rt_copy_memory(&the_fork, fork, sizeof(NFS_FORK_STRUCT)); + drv.fPacket.fPacketLba = lba; drv.fPacket.fPacketSize = sizeof(NFS_FORK_STRUCT); - drv.fPacket.fPacketContent = &the_fork; + drv.fPacket.fPacketContent = fork; kcout << "Writing fork...\r"; - drv.fOutput(&drv.fPacket); + drv.fOutput(&drv.fPacket); + + delete fork; + fork = nullptr; /// log what we have now. kcout << "Wrote fork data at: " << hex_number(the_fork.DataOffset) |
