summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/Sources/NewFS+IO.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Kernel/Sources/NewFS+IO.cxx')
-rw-r--r--dev/Kernel/Sources/NewFS+IO.cxx101
1 files changed, 0 insertions, 101 deletions
diff --git a/dev/Kernel/Sources/NewFS+IO.cxx b/dev/Kernel/Sources/NewFS+IO.cxx
deleted file mode 100644
index ddcecde4..00000000
--- a/dev/Kernel/Sources/NewFS+IO.cxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies.
-
-------------------------------------------- */
-
-#include <KernelKit/DriveManager.hxx>
-#include <KernelKit/FileManager.hxx>
-
-/*************************************************************
- *
- * File: NewFS+IO.cxx
- * Purpose: Filesystem to mountpoint interface.
- * Date: 3/26/24
- *
- * Copyright ZKA Technologies., all rights reserved.
- *
- *************************************************************/
-
-#ifdef __FSKIT_USE_NEWFS__
-
-#include <FirmwareKit/EPM.hxx>
-
-/// Useful macros.
-
-#define NEWFS_WRITE(DRV, TRAITS, MP) (MP->DRV()).fOutput(&TRAITS)
-#define NEWFS_READ(DRV, TRAITS, MP) (MP->DRV()).fInput(&TRAITS)
-
-using namespace Kernel;
-
-/// @brief Read from newfs disk.
-/// @param Mnt mounted interface.
-/// @param DrvTrait drive info
-/// @param DrvIndex drive index.
-/// @return
-Int32 fs_newfs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex)
-{
- if (!Mnt)
- return -1;
-
- DrvTrait.fPacket.fPacketGood = false;
-
- switch (DrvIndex)
- {
- case kNewFSSubDriveA: {
- NEWFS_READ(A, DrvTrait.fPacket, Mnt);
- break;
- }
- case kNewFSSubDriveB: {
- NEWFS_READ(B, DrvTrait.fPacket, Mnt);
- break;
- }
- case kNewFSSubDriveC: {
- NEWFS_READ(C, DrvTrait.fPacket, Mnt);
- break;
- }
- case kNewFSSubDriveD: {
- NEWFS_READ(D, DrvTrait.fPacket, Mnt);
- break;
- }
- }
-
- return DrvTrait.fPacket.fPacketGood;
-}
-
-/// @brief Write to newfs disk.
-/// @param Mnt mounted interface.
-/// @param DrvTrait drive info
-/// @param DrvIndex drive index.
-/// @return
-Int32 fs_newfs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex)
-{
- if (!Mnt)
- return -1;
-
- DrvTrait.fPacket.fPacketGood = false;
-
- switch (DrvIndex)
- {
- case kNewFSSubDriveA: {
- NEWFS_WRITE(A, DrvTrait.fPacket, Mnt);
- break;
- }
- case kNewFSSubDriveB: {
- NEWFS_WRITE(B, DrvTrait.fPacket, Mnt);
- break;
- }
- case kNewFSSubDriveC: {
- NEWFS_WRITE(C, DrvTrait.fPacket, Mnt);
- break;
- }
- case kNewFSSubDriveD: {
- NEWFS_WRITE(D, DrvTrait.fPacket, Mnt);
- break;
- }
- }
-
- return DrvTrait.fPacket.fPacketGood;
-}
-
-#endif // ifdef __FSKIT_USE_NEWFS__