From 83d870e58457a1d335a1d9b9966a6a1887cc297b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 03:02:43 +0100 Subject: feat! breaking changes on kernel sources. Signed-off-by: Amlal El Mahrouss --- dev/kernel/src/IFS.cc | 89 --------------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 dev/kernel/src/IFS.cc (limited to 'dev/kernel/src/IFS.cc') diff --git a/dev/kernel/src/IFS.cc b/dev/kernel/src/IFS.cc deleted file mode 100644 index 4679b8a3..00000000 --- a/dev/kernel/src/IFS.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. - -======================================== */ - -#include -#include - -/************************************************************* - * - * File: IFS.cc - * Purpose: Filesystem to mountpoint interface. - * Date: 05/26/2025 - * - * Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. - * - *************************************************************/ - -/// Useful macros regarding the IFS. - -#define fsi_ifs_write(DRV, TRAITS, MP) (MP->DRV()).fOutput(TRAITS) -#define fsi_ifs_read(DRV, TRAITS, MP) (MP->DRV()).fInput(TRAITS) - -namespace Kernel { -/// @brief Read from fs disk. -/// @param Mnt mounted interface. -/// @param DrvTrait drive info -/// @param DrvIndex drive index. -/// @return -Int32 fs_ifs_read(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) { - if (!Mnt) return kErrorDisk; - - DrvTrait.fPacket.fPacketGood = false; - - switch (DrvIndex) { - case IMountpoint::kDriveIndexA: { - fsi_ifs_read(A, DrvTrait.fPacket, Mnt); - break; - } - case IMountpoint::kDriveIndexB: { - fsi_ifs_read(B, DrvTrait.fPacket, Mnt); - break; - } - case IMountpoint::kDriveIndexC: { - fsi_ifs_read(C, DrvTrait.fPacket, Mnt); - break; - } - case IMountpoint::kDriveIndexD: { - fsi_ifs_read(D, DrvTrait.fPacket, Mnt); - break; - } - } - - return DrvTrait.fPacket.fPacketGood ? kErrorSuccess : kErrorDisk; -} - -/// @brief Write to fs disk. -/// @param Mnt mounted interface. -/// @param DrvTrait drive info -/// @param DrvIndex drive index. -/// @return -Int32 fs_ifs_write(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) { - if (!Mnt) return kErrorDisk; - - DrvTrait.fPacket.fPacketGood = false; - - switch (DrvIndex) { - case IMountpoint::kDriveIndexA: { - fsi_ifs_write(A, DrvTrait.fPacket, Mnt); - break; - } - case IMountpoint::kDriveIndexB: { - fsi_ifs_write(B, DrvTrait.fPacket, Mnt); - break; - } - case IMountpoint::kDriveIndexC: { - fsi_ifs_write(C, DrvTrait.fPacket, Mnt); - break; - } - case IMountpoint::kDriveIndexD: { - fsi_ifs_write(D, DrvTrait.fPacket, Mnt); - break; - } - } - - return DrvTrait.fPacket.fPacketGood ? kErrorSuccess : kErrorDisk; -} -} // namespace Kernel \ No newline at end of file -- cgit v1.2.3