From 192892221333113b28353fbe428adfc1bf6bbaae Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sat, 10 Aug 2024 10:35:44 +0200 Subject: [FIX] [newoskrnl.dll] Fixed it's heap and improved it as well. [FIX] Fix memory leak in TrySave. (\Kernel\Sources\User.cxx) Signed-off-by: Amlal EL Mahrouss --- Kernel/Sources/FS/NewFS.cxx | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'Kernel/Sources/FS') diff --git a/Kernel/Sources/FS/NewFS.cxx b/Kernel/Sources/FS/NewFS.cxx index 23d2867f..83c39e4b 100644 --- a/Kernel/Sources/FS/NewFS.cxx +++ b/Kernel/Sources/FS/NewFS.cxx @@ -1029,26 +1029,11 @@ namespace Kernel::Detail sMountpointInterface.C() = io_construct_drive(); sMountpointInterface.D() = io_construct_drive(); - sMountpointInterface.A().fVerify(&sMountpointInterface.A().fPacket); - - Char partitionBlockBuf[sizeof(NFS_ROOT_PARTITION_BLOCK)] = {0}; - - sMountpointInterface.A().fPacket.fLba = kNewFSStartLba; - sMountpointInterface.A().fPacket.fPacketContent = partitionBlockBuf; - sMountpointInterface.A().fPacket.fPacketSize = sizeof(NFS_ROOT_PARTITION_BLOCK); - - sMountpointInterface.A().fInput(&sMountpointInterface.A().fPacket); - - NFS_ROOT_PARTITION_BLOCK* partBlock = - reinterpret_cast(partitionBlockBuf); + kcout << "newoskrnl: Testing drive...\r"; - if (!StringBuilder::Equals(partBlock->Ident, kNewFSIdent)) - { - kcout << "newoskrnl: New FS Partition is corrupt.\r"; - return false; - } + sMountpointInterface.A().fVerify(&sMountpointInterface.A().fPacket); - kcout << "newoskrnl: Read partition: " << partBlock->PartitionName << ", with success!\r"; + kcout << "newoskrnl: Testing drive [ OK ]...\r"; return true; } -- cgit v1.2.3