summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-10-26 12:29:35 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-10-26 12:30:34 +0100
commitb6ce6640afaf6c1cc6ad274f3053b2e218a49554 (patch)
tree69f6a0c6f08ef5ef2f6fcbb7302537dbce222e6e
parent744e9aba579a51dcab8f78009cbc091ce3cd8503 (diff)
feat: refactor HeFS to OpenHeFS.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--README.md4
-rw-r--r--dev/boot/src/docs/MKFS_HEFS.md8
-rw-r--r--dev/kernel/FSKit/OpenHeFS.h (renamed from dev/kernel/FSKit/HeFS.h)36
-rw-r--r--dev/kernel/FirmwareKit/EPM.h2
-rw-r--r--dev/kernel/HALKit/AMD64/HalKernelMain.cc2
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc8
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc9
-rw-r--r--dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc8
-rw-r--r--dev/kernel/KernelKit/DriveMgr.h8
-rw-r--r--dev/kernel/KernelKit/FileMgr.h6
-rw-r--r--dev/kernel/KernelKit/IFS.h4
-rw-r--r--dev/kernel/KernelKit/ILoader.h (renamed from dev/kernel/KernelKit/LoaderInterface.h)8
-rw-r--r--dev/kernel/KernelKit/PEF.h2
-rw-r--r--dev/kernel/KernelKit/PEFCodeMgr.h2
-rw-r--r--dev/kernel/KernelKit/UserMgr.h6
-rw-r--r--dev/kernel/KernelKit/ZXD.h4
-rw-r--r--dev/kernel/StorageKit/AHCI.h10
-rw-r--r--dev/kernel/StorageKit/ATA.h10
-rw-r--r--dev/kernel/StorageKit/NVME.h8
-rw-r--r--dev/kernel/src/FS/NeFS+FileSystemParser.cc6
-rw-r--r--dev/kernel/src/FS/OpenHeFS+FileMgr.cc (renamed from dev/kernel/src/FS/HeFS+FileMgr.cc)20
-rw-r--r--dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc (renamed from dev/kernel/src/FS/HeFS+FileSystemParser.cc)18
-rw-r--r--dev/kernel/src/IFS.cc20
-rw-r--r--dev/kernel/src/Storage/AHCIDeviceInterface.cc14
-rw-r--r--dev/kernel/src/Storage/ATADeviceInterface.cc14
-rw-r--r--dev/kernel/src/Storage/NVMEDeviceInterface.cc4
-rw-r--r--dev/libSystem/SystemKit/System.h4
-rw-r--r--docs/tex/hefs.tex14
-rw-r--r--public/frameworks/DiskImage.fwrk/headers/DiskImage.h2
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc6
-rw-r--r--public/manuals/nekernel/mgmt.hefs.util.man6
-rw-r--r--tools/fsck.hefs.cc10
-rw-r--r--tools/libmkfs/openhefs.h (renamed from tools/libmkfs/hefs.h)2
-rw-r--r--tools/mkfs.hefs.cc2
34 files changed, 148 insertions, 139 deletions
diff --git a/README.md b/README.md
index 299a4656..30495c8b 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@
- **Modular Microkernel Architecture**: Clean separation of kernel, drivers, userland, and frameworks.
-- **Custom Filesystems**: (HeFS), catalog/fork model (NeFS), and metadata handling.
+- **Custom Filesystems**: (OpenHeFS), catalog/fork model (NeFS), and metadata handling.
- **Memory Management**: Custom heap manager, page manager, and safe memory utilities. Kernel heap allocations are protected with metadata and CRCs. Userland and kernel memory separation.
@@ -38,7 +38,7 @@
- **Security and Robustness**: kernel and tools (bounds checks, safe memory copy/set, error codes). Kernel panics and error reporting for critical failures. No dynamic code loading in kernel space.
-- **Documentation and Specs**: Full LaTeX specifications for HeFS and NeFS, with on-disk structure diagrams and API documentation. Markdown docs for tools and usage.
+- **Documentation and Specs**: Full LaTeX specifications for OpenHeFS and NeFS, with on-disk structure diagrams and API documentation. Markdown docs for tools and usage.
- **Cross-Platform Boot Support**: Bootloader and platform code for AMD64 and ARM64, with handover and hardware abstraction layers.
diff --git a/dev/boot/src/docs/MKFS_HEFS.md b/dev/boot/src/docs/MKFS_HEFS.md
index c9aa0628..ac84d132 100644
--- a/dev/boot/src/docs/MKFS_HEFS.md
+++ b/dev/boot/src/docs/MKFS_HEFS.md
@@ -1,6 +1,6 @@
-# `mkfs.hefs` – HeFS Filesystem Formatter
+# `mkfs.hefs` – OpenHeFS Filesystem Formatter
-`mkfs.hefs` is a command-line utility used to format a block device or disk image with the **High-throughput Extended File System (HeFS)** used by NeKernel. This tool initializes a HeFS volume by writing a boot node and configuring directory and inode index regions, block ranges, and volume metadata.
+`mkfs.hefs` is a command-line utility used to format a block device or disk image with the **High-throughput Extended File System (OpenHeFS)** used by NeKernel. This tool initializes a OpenHeFS volume by writing a boot node and configuring directory and inode index regions, block ranges, and volume metadata.
---
@@ -61,7 +61,7 @@
-is 0x800000 -ie 0xA00000 \
-S 128 -o hefs.img
-This will create a 128 GiB formatted HeFS image named `hefs.img` with specified region boundaries.
+This will create a 128 GiB formatted OpenHeFS image named `hefs.img` with specified region boundaries.
---
@@ -96,7 +96,7 @@ The `BootNode` stores key filesystem metadata:
## 📚 Source Location
-Part of the [HeFS Tooling module](https://github.com/nekernel-org/nekernel) and used during system setup or disk preparation for NeKernel.
+Part of the [OpenHeFS Tooling module](https://github.com/nekernel-org/nekernel) and used during system setup or disk preparation for NeKernel.
---
diff --git a/dev/kernel/FSKit/HeFS.h b/dev/kernel/FSKit/OpenHeFS.h
index 51ec7648..1361da9c 100644
--- a/dev/kernel/FSKit/HeFS.h
+++ b/dev/kernel/FSKit/OpenHeFS.h
@@ -14,8 +14,8 @@
#include <NeKit/KString.h>
#include <hint/CompilerHint.h>
-/// @file HeFS.h
-/// @brief HeFS filesystem support.
+/// @file OpenHeFS.h
+/// @brief OpenHeFS filesystem support.
#define kHeFSVersion (0x0103)
#define kHeFSMagic " HeFS"
@@ -27,7 +27,7 @@
#define kHeFSMinimumDiskSize (gib_cast(128))
-#define kHeFSDefaultVolumeName u8"HeFS Volume"
+#define kHeFSDefaultVolumeName u8"OpenHeFS Volume"
#define kHeFSINDStartOffset (sizeof(HEFS_BOOT_NODE))
#define kHeFSINStartOffset (sizeof(HEFS_INDEX_NODE_DIRECTORY))
@@ -97,7 +97,7 @@ inline constexpr UInt16 kHeFSFileKindSymbolicLink = 0x06;
inline constexpr UInt16 kHeFSFileKindUnknown = 0x07;
inline constexpr UInt16 kHeFSFileKindCount = 0x08;
-/// @brief HeFS blocks are array containing sparse blocks of data.
+/// @brief OpenHeFS blocks are array containing sparse blocks of data.
/// @details The blocks are used to store the data of a file. Each block is a pointer to a block of
/// data on the disk.
inline constexpr UInt16 kHeFSSliceCount = 0x10;
@@ -109,7 +109,7 @@ namespace Kernel {
/// @details Used to keep track of the INode, INodeDir allocation status.
typedef UInt64 ATime;
-/// @brief HeFS Boot node.
+/// @brief OpenHeFS Boot node.
/// @details Acts like a superblock, it contains the information about the filesystem.
/// @note The boot node is the first block of the filesystem.
struct PACKED HEFS_BOOT_NODE final {
@@ -166,7 +166,7 @@ enum HeFSJournalKind : UInt8 {
kJournalKindCount,
};
-/// @brief HeFS index node.
+/// @brief OpenHeFS index node.
/// @details This structure is used to store the file information of a file.
/// @note The index node is a special type of INode that contains the file information.
/// @note The index node is used to store the file information of a file.
@@ -200,7 +200,7 @@ enum {
kHeFSColorCount,
};
-/// @brief HeFS directory node.
+/// @brief OpenHeFS directory node.
/// @details This structure is used to store the directory information of a file.
/// @note The directory node is a special type of INode that contains the directory entries.
struct PACKED HEFS_INDEX_NODE_DIRECTORY final {
@@ -230,7 +230,7 @@ struct PACKED HEFS_INDEX_NODE_DIRECTORY final {
} // namespace Kernel
namespace Kernel::Detail {
-/// @brief HeFS get year from ATime.
+/// @brief OpenHeFS get year from ATime.
/// @param raw_atime the raw ATime value.
/// @return the year value.
/// @note The year is stored in the upper 32 bits of the ATime value.
@@ -238,7 +238,7 @@ inline UInt32 hefs_year_get(ATime raw_atime) noexcept {
return (raw_atime) >> 32;
}
-/// @brief HeFS get month from ATime.
+/// @brief OpenHeFS get month from ATime.
/// @param raw_atime the raw ATime value.
/// @return the month value.
/// @note The month is stored in the upper 24 bits of the ATime value.
@@ -246,7 +246,7 @@ inline UInt32 hefs_month_get(ATime raw_atime) noexcept {
return (raw_atime) >> 24;
}
-/// @brief HeFS get day from ATime.
+/// @brief OpenHeFS get day from ATime.
/// @param raw_atime the raw ATime value.
/// @return the day value.
/// @note The day is stored in the upper 16 bits of the ATime value.
@@ -254,7 +254,7 @@ inline UInt32 hefs_day_get(ATime raw_atime) noexcept {
return (raw_atime) >> 16;
}
-/// @brief HeFS get hour from ATime.
+/// @brief OpenHeFS get hour from ATime.
/// @param raw_atime the raw ATime value.
/// @return the hour value.
/// @note The hour is stored in the upper 8 bits of the ATime value.
@@ -262,7 +262,7 @@ inline UInt32 hefs_hour_get(ATime raw_atime) noexcept {
return (raw_atime) >> 8;
}
-/// @brief HeFS get minute from ATime.
+/// @brief OpenHeFS get minute from ATime.
/// @param raw_atime the raw ATime value.
/// @return the minute value.
/// @note The minute is stored in the lower 8 bits of the ATime value.
@@ -379,8 +379,8 @@ inline const Char* hefs_file_flags_to_string(UInt32 flags) noexcept {
} // namespace Kernel::Detail
namespace Kernel {
-/// @brief HeFS filesystem parser class.
-/// @details This class is used to parse the HeFS filesystem.
+/// @brief OpenHeFS filesystem parser class.
+/// @details This class is used to parse the OpenHeFS filesystem.
class HeFileSystemParser final {
public:
HeFileSystemParser() = default;
@@ -394,7 +394,7 @@ class HeFileSystemParser final {
HeFileSystemParser& operator=(HeFileSystemParser&&) = delete;
public:
- /// @brief Make a EPM+HeFS drive out of the disk.
+ /// @brief Make a EPM+OpenHeFS drive out of the disk.
/// @param drive The drive to write on.
/// @return If it was sucessful, see err_local_get().
_Output Bool Format(_Input _Output DriveTrait* drive, _Input const Int32 flags,
@@ -425,10 +425,10 @@ class HeFileSystemParser final {
const Utf8Char* dir, const BOOL delete_or_create);
};
-namespace HeFS {
+namespace OpenHeFS {
- /// @brief Initialize HeFS inside the main disk.
+ /// @brief Initialize OpenHeFS inside the main disk.
/// @return Whether it successfuly formated it or not.
Boolean fs_init_hefs(Void) noexcept;
-} // namespace HeFS
+} // namespace OpenHeFS
} // namespace Kernel
diff --git a/dev/kernel/FirmwareKit/EPM.h b/dev/kernel/FirmwareKit/EPM.h
index dcab3607..20c966e4 100644
--- a/dev/kernel/FirmwareKit/EPM.h
+++ b/dev/kernel/FirmwareKit/EPM.h
@@ -89,7 +89,7 @@ struct PACKED EPM_PART_BLOCK {
Kernel::Int16 Kind;
Kernel::Int16 Flags;
Kernel::Int32 FsVersion;
- Kernel::Char Fs[kEPMFilesystemLength]; /* NeFS, HeFS... */
+ Kernel::Char Fs[kEPMFilesystemLength]; /* NeFS, OpenHeFS... */
Kernel::Char Reserved[kEPMReserveLen]; // to fill a full sector.
};
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
index 6f4d7e0a..2b478dd6 100644
--- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc
+++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
@@ -145,7 +145,7 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) {
HAL::mp_init_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr);
#ifdef __FSKIT_INCLUDES_HEFS__
- HeFS::fs_init_hefs();
+ OpenHeFS::fs_init_hefs();
#endif
#ifdef __FSKIT_INCLUDES_NEFS__
diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
index 0a465145..1acfac0e 100644
--- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc
@@ -546,8 +546,8 @@ namespace Detail {
/// @brief Read AHCI device.
/// @param self device
/// @param mnt mounted disk.
- STATIC Void sk_io_read_ahci(DeviceInterface<MountpointInterface*>* self,
- MountpointInterface* mnt) {
+ STATIC Void sk_io_read_ahci(DeviceInterface<IMountpoint*>* self,
+ IMountpoint* mnt) {
AHCIDeviceInterface* dev = (AHCIDeviceInterface*) self;
err_global_get() = kErrorDisk;
@@ -568,8 +568,8 @@ namespace Detail {
/// @brief Write AHCI device.
/// @param self device
/// @param mnt mounted disk.
- STATIC Void sk_io_write_ahci(DeviceInterface<MountpointInterface*>* self,
- MountpointInterface* mnt) {
+ STATIC Void sk_io_write_ahci(DeviceInterface<IMountpoint*>* self,
+ IMountpoint* mnt) {
AHCIDeviceInterface* dev = (AHCIDeviceInterface*) self;
err_global_get() = kErrorDisk;
diff --git a/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc
new file mode 100644
index 00000000..67b59813
--- /dev/null
+++ b/dev/kernel/HALKit/AMD64/Storage/NVME+Generic.cc
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+ Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#include <modules/NVME/NVME.h>
+
+using namespace Kernel;
diff --git a/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc
index 6fccbdfa..5b768fbb 100644
--- a/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc
+++ b/dev/kernel/HALKit/AMD64/Storage/PIO+Generic.cc
@@ -200,8 +200,8 @@ namespace Detail {
/// @brief Read PIO device.
/// @param self device
/// @param mnt mounted disk.
- STATIC Void sk_io_read_pio(DeviceInterface<MountpointInterface*>* self,
- MountpointInterface* mnt) {
+ STATIC Void sk_io_read_pio(DeviceInterface<IMountpoint*>* self,
+ IMountpoint* mnt) {
ATADeviceInterface* dev = (ATADeviceInterface*) self;
err_global_get() = kErrorDisk;
@@ -222,8 +222,8 @@ namespace Detail {
/// @brief Write PIO device.
/// @param self device
/// @param mnt mounted disk.
- STATIC Void sk_io_write_pio(DeviceInterface<MountpointInterface*>* self,
- MountpointInterface* mnt) {
+ STATIC Void sk_io_write_pio(DeviceInterface<IMountpoint*>* self,
+ IMountpoint* mnt) {
ATADeviceInterface* dev = (ATADeviceInterface*) self;
err_global_get() = kErrorDisk;
diff --git a/dev/kernel/KernelKit/DriveMgr.h b/dev/kernel/KernelKit/DriveMgr.h
index 03f9a717..6340d966 100644
--- a/dev/kernel/KernelKit/DriveMgr.h
+++ b/dev/kernel/KernelKit/DriveMgr.h
@@ -89,12 +89,12 @@ typedef DriveTrait* DriveTraitPtr;
* @note This class has all of it's drive set to nullptr, allocate them using
* GetAddressOf(index).
*/
-class MountpointInterface final {
+class IMountpoint final {
public:
- explicit MountpointInterface() = default;
- ~MountpointInterface() = default;
+ explicit IMountpoint() = default;
+ ~IMountpoint() = default;
- NE_COPY_DEFAULT(MountpointInterface)
+ NE_COPY_DEFAULT(IMountpoint)
public:
DriveTrait& A() { return mA; }
diff --git a/dev/kernel/KernelKit/FileMgr.h b/dev/kernel/KernelKit/FileMgr.h
index cc2feeb8..ff290780 100644
--- a/dev/kernel/KernelKit/FileMgr.h
+++ b/dev/kernel/KernelKit/FileMgr.h
@@ -23,12 +23,12 @@
#define INC_FILEMGR_H
/// @file FileMgr.h
-/// @brief File Manager.
+/// @brief File Manager System.
/// @author Amlal El Mahrouss (amlal@nekernel.org)
//! Include filesystems that NeKernel supports.
#include <FSKit/Ext2+IFS.h>
-#include <FSKit/HeFS.h>
+#include <FSKit/OpenHeFS.h>
#include <FSKit/NeFS.h>
#include <CompilerKit/CompilerKit.h>
@@ -71,7 +71,7 @@ enum {
kFileIOCnt = (kFileFlagData - kFileWriteAll) + 1,
};
-typedef VoidPtr NodePtr;
+using NodePtr = VoidPtr;
/**
@brief Filesystem Mgr Interface class
diff --git a/dev/kernel/KernelKit/IFS.h b/dev/kernel/KernelKit/IFS.h
index ed1d87b5..b1dd2001 100644
--- a/dev/kernel/KernelKit/IFS.h
+++ b/dev/kernel/KernelKit/IFS.h
@@ -14,12 +14,12 @@ namespace Kernel {
/// @param DrvTrait drive info
/// @param DrvIndex drive index.
/// @return
-Int32 fs_ifs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex);
+Int32 fs_ifs_read(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex);
/// @brief Write to IFS disk.
/// @param Mnt mounted interface.
/// @param DrvTrait drive info
/// @param DrvIndex drive index.
/// @return
-Int32 fs_ifs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex);
+Int32 fs_ifs_write(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex);
} // namespace Kernel
diff --git a/dev/kernel/KernelKit/LoaderInterface.h b/dev/kernel/KernelKit/ILoader.h
index 1f9b1e56..ec8ee1bc 100644
--- a/dev/kernel/KernelKit/LoaderInterface.h
+++ b/dev/kernel/KernelKit/ILoader.h
@@ -14,12 +14,12 @@
namespace Kernel {
/// @brief This interface is used to make loader contracts (MSCOFF, PEF).
/// @author @Amlal-El-Mahrouss
-class LoaderInterface {
+class ILoader {
public:
- explicit LoaderInterface() = default;
- virtual ~LoaderInterface() = default;
+ explicit ILoader() = default;
+ virtual ~ILoader() = default;
- NE_COPY_DEFAULT(LoaderInterface)
+ NE_COPY_DEFAULT(ILoader)
public:
virtual _Output ErrorOr<VoidPtr> GetBlob() = 0;
diff --git a/dev/kernel/KernelKit/PEF.h b/dev/kernel/KernelKit/PEF.h
index f0ba9ef9..0410c63a 100644
--- a/dev/kernel/KernelKit/PEF.h
+++ b/dev/kernel/KernelKit/PEF.h
@@ -15,7 +15,7 @@
#define __KERNELKIT_PEF_H__
#include <CompilerKit/CompilerKit.h>
-#include <KernelKit/LoaderInterface.h>
+#include <KernelKit/ILoader.h>
#include <NeKit/Defines.h>
#define kPefMagic "Open"
diff --git a/dev/kernel/KernelKit/PEFCodeMgr.h b/dev/kernel/KernelKit/PEFCodeMgr.h
index d61aa863..3ed9c097 100644
--- a/dev/kernel/KernelKit/PEFCodeMgr.h
+++ b/dev/kernel/KernelKit/PEFCodeMgr.h
@@ -27,7 +27,7 @@ namespace Kernel {
/// \name PEFLoader
/// \brief PEF loader class.
///
-class PEFLoader : public LoaderInterface {
+class PEFLoader : public ILoader {
private:
explicit PEFLoader() = delete;
diff --git a/dev/kernel/KernelKit/UserMgr.h b/dev/kernel/KernelKit/UserMgr.h
index 6fa8ba14..c660025b 100644
--- a/dev/kernel/KernelKit/UserMgr.h
+++ b/dev/kernel/KernelKit/UserMgr.h
@@ -22,9 +22,9 @@
///! We got the MGMT, STD (%s format) and GUEST users,
///! all are used to make authorized operations.
-#define kSuperUser "OS AUTHORITY/MGMT/%s"
-#define kGuestUser "OS AUTHORITY/GUEST/%s"
-#define kStdUser "OS AUTHORITY/STD/%s"
+#define kSuperUser "NEKERNEL/MGMT/%s"
+#define kGuestUser "NEKERNEL/GUEST/%s"
+#define kStdUser "NEKERNEL/STD/%s"
#define kUsersDir "/users/"
diff --git a/dev/kernel/KernelKit/ZXD.h b/dev/kernel/KernelKit/ZXD.h
index 966c54c7..bae47258 100644
--- a/dev/kernel/KernelKit/ZXD.h
+++ b/dev/kernel/KernelKit/ZXD.h
@@ -23,7 +23,7 @@ enum ZXD_FLAGS {
/// @brief ZXD executable header
/// @details This header is used to identify ZXD executable files.
-struct PACKED ZXD_EXEC_HEADER {
+struct PACKED ZXD_EXEC_HEADER final {
UInt32 fMagic;
UInt32 fVersion;
UInt32 fFlags;
@@ -42,7 +42,7 @@ struct PACKED ZXD_EXEC_HEADER {
/// @brief ZXD stub header
/// @details This header is used to identify ZXD stub files. It contains the size of the stub, the
/// offset of the stub, and the CRC32 checksum of the stub.
-struct PACKED ZXD_STUB_HEADER {
+struct PACKED ZXD_STUB_HEADER final {
UInt32 fStubSize;
UInt32 fStubOffset;
UInt32 fStubCRC32;
diff --git a/dev/kernel/StorageKit/AHCI.h b/dev/kernel/StorageKit/AHCI.h
index 3605abe6..d4f7cc55 100644
--- a/dev/kernel/StorageKit/AHCI.h
+++ b/dev/kernel/StorageKit/AHCI.h
@@ -14,10 +14,10 @@ namespace Kernel {
/// @brief AHCIDeviceInterface class
/// @details This class is used to send and receive data from the AHCI device.
/// @note The class is derived from the DeviceInterface class.
-class AHCIDeviceInterface NE_DEVICE<MountpointInterface*> {
+class AHCIDeviceInterface NE_DEVICE<IMountpoint*> {
public:
- explicit AHCIDeviceInterface(void (*out)(DeviceInterface* self, MountpointInterface* out),
- void (*in)(DeviceInterface* self, MountpointInterface* in));
+ explicit AHCIDeviceInterface(void (*out)(DeviceInterface* self, IMountpoint* out),
+ void (*in)(DeviceInterface* self, IMountpoint* in));
virtual ~AHCIDeviceInterface() override;
@@ -36,8 +36,8 @@ class AHCIDeviceInterface NE_DEVICE<MountpointInterface*> {
Void SetIndex(const UInt32& drv);
public:
- AHCIDeviceInterface& operator<<(MountpointInterface* Data) override;
- AHCIDeviceInterface& operator>>(MountpointInterface* Data) override;
+ AHCIDeviceInterface& operator<<(IMountpoint* Data) override;
+ AHCIDeviceInterface& operator>>(IMountpoint* Data) override;
private:
UInt16 fPortsImplemented{0U};
diff --git a/dev/kernel/StorageKit/ATA.h b/dev/kernel/StorageKit/ATA.h
index d4c894a3..49ab3e4e 100644
--- a/dev/kernel/StorageKit/ATA.h
+++ b/dev/kernel/StorageKit/ATA.h
@@ -13,16 +13,16 @@
namespace Kernel {
/// @brief ATA device interface class.
-class ATADeviceInterface : public DeviceInterface<MountpointInterface*> {
+class ATADeviceInterface : public DeviceInterface<IMountpoint*> {
public:
- explicit ATADeviceInterface(void (*Out)(DeviceInterface*, MountpointInterface* outpacket),
- void (*In)(DeviceInterface*, MountpointInterface* inpacket));
+ explicit ATADeviceInterface(void (*Out)(DeviceInterface*, IMountpoint* outpacket),
+ void (*In)(DeviceInterface*, IMountpoint* inpacket));
virtual ~ATADeviceInterface();
public:
- ATADeviceInterface& operator<<(MountpointInterface* Data) override;
- ATADeviceInterface& operator>>(MountpointInterface* Data) override;
+ ATADeviceInterface& operator<<(IMountpoint* Data) override;
+ ATADeviceInterface& operator>>(IMountpoint* Data) override;
public:
ATADeviceInterface& operator=(const ATADeviceInterface&) = default;
diff --git a/dev/kernel/StorageKit/NVME.h b/dev/kernel/StorageKit/NVME.h
index 1b2b6358..9852c5eb 100644
--- a/dev/kernel/StorageKit/NVME.h
+++ b/dev/kernel/StorageKit/NVME.h
@@ -10,10 +10,10 @@
#include <KernelKit/DriveMgr.h>
namespace Kernel {
-class NVMEDeviceInterface final NE_DEVICE<MountpointInterface*> {
+class NVMEDeviceInterface final NE_DEVICE<IMountpoint*> {
public:
- explicit NVMEDeviceInterface(Void (*out)(DeviceInterface*, MountpointInterface* out_packet),
- Void (*in)(DeviceInterface*, MountpointInterface* in_packet),
+ explicit NVMEDeviceInterface(Void (*out)(DeviceInterface*, IMountpoint* out_packet),
+ Void (*in)(DeviceInterface*, IMountpoint* in_packet),
Void (*cleanup)(Void));
~NVMEDeviceInterface() override;
@@ -24,7 +24,7 @@ class NVMEDeviceInterface final NE_DEVICE<MountpointInterface*> {
const Char* Name() const override;
public:
- OwnPtr<MountpointInterface*> operator()(UInt32 dma_low, UInt32 dma_high, SizeT dma_sz);
+ OwnPtr<IMountpoint*> operator()(UInt32 dma_low, UInt32 dma_high, SizeT dma_sz);
private:
Void (*fCleanup)(Void) = {nullptr};
diff --git a/dev/kernel/src/FS/NeFS+FileSystemParser.cc b/dev/kernel/src/FS/NeFS+FileSystemParser.cc
index 14e0b974..b50841a4 100644
--- a/dev/kernel/src/FS/NeFS+FileSystemParser.cc
+++ b/dev/kernel/src/FS/NeFS+FileSystemParser.cc
@@ -74,7 +74,7 @@ static inline bool is_valid_lba(Lba lba, DriveTrait& drive) {
return (lba >= part_block.StartCatalog) && (lba < maxLba);
}
-STATIC MountpointInterface kMountpoint;
+STATIC IMountpoint kMountpoint;
/***********************************************************************************/
/// @brief Creates a new fork inside the New filesystem partition.
/// @param catalog it's catalog
@@ -141,7 +141,7 @@ _Output BOOL NeFileSystemParser::CreateFork(_Input NEFS_FORK_STRUCT& the_fork) {
drv.fPacket.fPacketContent = reinterpret_cast<VoidPtr>(&the_fork);
drv.fOutput(drv.fPacket);
- fs_ifs_write(&kMountpoint, drv, MountpointInterface::kDriveIndexA);
+ fs_ifs_write(&kMountpoint, drv, IMountpoint::kDriveIndexA);
delete catalog;
return YES;
@@ -858,7 +858,7 @@ namespace Kernel::NeFS {
/// @brief Construct NeFS drives.
/***********************************************************************************/
Boolean fs_init_nefs(Void) noexcept {
- kout << "Creating HeFS disk...\r";
+ kout << "Creating OpenHeFS disk...\r";
kMountpoint.A() = io_construct_main_drive();
if (kMountpoint.A().fPacket.fPacketReadOnly == YES)
ke_panic(RUNTIME_CHECK_FILESYSTEM, "Main disk cannot be mounted.");
diff --git a/dev/kernel/src/FS/HeFS+FileMgr.cc b/dev/kernel/src/FS/OpenHeFS+FileMgr.cc
index 33813f65..bb87fd67 100644
--- a/dev/kernel/src/FS/HeFS+FileMgr.cc
+++ b/dev/kernel/src/FS/OpenHeFS+FileMgr.cc
@@ -10,7 +10,7 @@
#include <KernelKit/FileMgr.h>
#include <KernelKit/HeapMgr.h>
-/// @brief HeFS File System Manager.
+/// @brief OpenHeFS File System Manager.
/// BUGS: 0
namespace Kernel {
@@ -35,7 +35,7 @@ HeFileSystemMgr::~HeFileSystemMgr() {
/// @return If it was deleted or not.
bool HeFileSystemMgr::Remove(_Input const Char* path) {
if (path == nullptr || *path == 0) {
- kout << "HeFS: Remove called with null or empty path\n";
+ kout << "OpenHeFS: Remove called with null or empty path\n";
return false;
}
@@ -47,7 +47,7 @@ bool HeFileSystemMgr::Remove(_Input const Char* path) {
/// @return The Node pointer.
NodePtr HeFileSystemMgr::Create(_Input const Char* path) {
if (!path || *path == 0) {
- kout << "HeFS: Create called with null or empty path\n";
+ kout << "OpenHeFS: Create called with null or empty path\n";
return nullptr;
}
return nullptr;
@@ -58,7 +58,7 @@ NodePtr HeFileSystemMgr::Create(_Input const Char* path) {
/// @return The Node pointer.
NodePtr HeFileSystemMgr::CreateDirectory(const Char* path) {
if (!path || *path == 0) {
- kout << "HeFS: CreateDirectory called with null or empty path\n";
+ kout << "OpenHeFS: CreateDirectory called with null or empty path\n";
return nullptr;
}
return nullptr;
@@ -69,7 +69,7 @@ NodePtr HeFileSystemMgr::CreateDirectory(const Char* path) {
/// @return The Node pointer.
NodePtr HeFileSystemMgr::CreateAlias(const Char* path) {
if (!path || *path == 0) {
- kout << "HeFS: CreateAlias called with null or empty path\n";
+ kout << "OpenHeFS: CreateAlias called with null or empty path\n";
return nullptr;
}
return nullptr;
@@ -77,7 +77,7 @@ NodePtr HeFileSystemMgr::CreateAlias(const Char* path) {
NodePtr HeFileSystemMgr::CreateSwapFile(const Char* path) {
if (!path || *path == 0) {
- kout << "HeFS: CreateSwapFile called with null or empty path\n";
+ kout << "OpenHeFS: CreateSwapFile called with null or empty path\n";
return nullptr;
}
return nullptr;
@@ -104,7 +104,7 @@ Char NeFileSystemHelper::Separator() {
/// @brief Gets the metafile character.
/// @return
Char NeFileSystemHelper::MetaFile() {
- return 0;
+ return '\0';
}
/// @brief Opens a new file.
@@ -113,11 +113,11 @@ Char NeFileSystemHelper::MetaFile() {
/// @return
_Output NodePtr HeFileSystemMgr::Open(_Input const Char* path, _Input const Char* r) {
if (!path || *path == 0) {
- kout << "HeFS: Open called with null or empty path\n";
+ kout << "OpenHeFS: Open called with null or empty path\n";
return nullptr;
}
if (!r || *r == 0) {
- kout << "HeFS: Open called with null or empty mode string\n";
+ kout << "OpenHeFS: Open called with null or empty mode string\n";
return nullptr;
}
return nullptr;
@@ -181,7 +181,7 @@ _Output Bool HeFileSystemMgr::Rewind(NodePtr node) {
return kFileMgrNPos;
}
-/// @brief Returns the parser of HeFS.
+/// @brief Returns the parser of OpenHeFS.
_Output HeFileSystemParser* HeFileSystemMgr::GetParser() noexcept {
return mParser;
}
diff --git a/dev/kernel/src/FS/HeFS+FileSystemParser.cc b/dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc
index 029fdf26..3746ebc1 100644
--- a/dev/kernel/src/FS/HeFS+FileSystemParser.cc
+++ b/dev/kernel/src/FS/OpenHeFS+FileSystemParser.cc
@@ -6,7 +6,7 @@
#ifdef __FSKIT_INCLUDES_HEFS__
-#include <FSKit/HeFS.h>
+#include <FSKit/OpenHeFS.h>
#include <FirmwareKit/EPM.h>
#include <FirmwareKit/GPT.h>
#include <KernelKit/KPC.h>
@@ -79,7 +79,7 @@ namespace Detail {
const Utf8Char* dir_name, UInt16 flags,
const BOOL delete_or_create);
- /// @brief This helper makes it easier for other machines to understand HeFS encoded hashes.
+ /// @brief This helper makes it easier for other machines to understand OpenHeFS encoded hashes.
STATIC UInt64 hefsi_to_big_endian_64(UInt64 val) {
return ((val >> 56) & 0x00000000000000FFULL) | ((val >> 40) & 0x000000000000FF00ULL) |
((val >> 24) & 0x0000000000FF0000ULL) | ((val >> 8) & 0x00000000FF000000ULL) |
@@ -743,12 +743,12 @@ namespace Detail {
} // namespace Detail
} // namespace Kernel
-/// @note HeFS will allocate inodes and ind in advance, to avoid having to allocate them in
+/// @note OpenHeFS will allocate inodes and ind in advance, to avoid having to allocate them in
/// real-time.
/// @note This is certainly take longer to format a disk with it, but worth-it in the long run.
namespace Kernel {
-/// @brief Make a EPM+HeFS mnt out of the disk.
+/// @brief Make a EPM+OpenHeFS mnt out of the disk.
/// @param mnt The mnt to write on.
/// @return If it was sucessful, see err_local_get().
_Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input const Int32 flags,
@@ -766,7 +766,7 @@ _Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input c
(Void)(kout << "OpenHeFS recommends at least 128 GiB of free space." << kendl);
(Void)(
kout
- << "The OS will still try to format a HeFS disk here anyway, don't expect perfect geometry."
+ << "The OS will still try to format a OpenHeFS disk here anyway, don't expect perfect geometry."
<< kendl);
}
@@ -822,7 +822,7 @@ _Output Bool HeFileSystemParser::Format(_Input _Output DriveTrait* mnt, _Input c
MUST_PASS(boot->fSectorSize);
- /// @note all HeFS strucutres are equal to 512, so here it's fine, unless fSectoSize is 2048.
+ /// @note all OpenHeFS strucutres are equal to 512, so here it's fine, unless fSectoSize is 2048.
const SizeT max_lba = (drv_std_get_size()) / boot->fSectorSize;
const SizeT dir_max = max_lba / 300; // 5% for directory inodes
@@ -1007,7 +1007,7 @@ _Output Bool HeFileSystemParser::INodeManip(_Input DriveTrait* mnt, VoidPtr bloc
mnt->fInput(mnt->fPacket);
if (!KStringBuilder::Equals(boot->fMagic, kHeFSMagic) || boot->fVersion != kHeFSVersion) {
- (Void)(kout << "Invalid Boot Node, HeFS partition is invalid." << kendl);
+ (Void)(kout << "Invalid Boot Node, OpenHeFS partition is invalid." << kendl);
mm_free_ptr((VoidPtr) boot);
err_global_get() = kErrorDisk;
return NO;
@@ -1147,9 +1147,9 @@ _Output Bool HeFileSystemParser::INodeCtlManip(_Input DriveTrait* mnt, _Input co
STATIC DriveTrait kMountPoint;
-/// @brief Initialize the HeFS filesystem.
+/// @brief Initialize the OpenHeFS filesystem.
/// @return To check its status, see err_local_get().
-Boolean HeFS::fs_init_hefs(Void) noexcept {
+Boolean OpenHeFS::fs_init_hefs(Void) noexcept {
kout << "Verifying disk...\r";
kMountPoint = io_construct_main_drive();
diff --git a/dev/kernel/src/IFS.cc b/dev/kernel/src/IFS.cc
index ba2ec8c0..ffb8ef8e 100644
--- a/dev/kernel/src/IFS.cc
+++ b/dev/kernel/src/IFS.cc
@@ -28,25 +28,25 @@ namespace Kernel {
/// @param DrvTrait drive info
/// @param DrvIndex drive index.
/// @return
-Int32 fs_ifs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) {
+Int32 fs_ifs_read(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) {
if (!Mnt) return kErrorDisk;
DrvTrait.fPacket.fPacketGood = false;
switch (DrvIndex) {
- case MountpointInterface::kDriveIndexA: {
+ case IMountpoint::kDriveIndexA: {
fsi_ifs_read(A, DrvTrait.fPacket, Mnt);
break;
}
- case MountpointInterface::kDriveIndexB: {
+ case IMountpoint::kDriveIndexB: {
fsi_ifs_read(B, DrvTrait.fPacket, Mnt);
break;
}
- case MountpointInterface::kDriveIndexC: {
+ case IMountpoint::kDriveIndexC: {
fsi_ifs_read(C, DrvTrait.fPacket, Mnt);
break;
}
- case MountpointInterface::kDriveIndexD: {
+ case IMountpoint::kDriveIndexD: {
fsi_ifs_read(D, DrvTrait.fPacket, Mnt);
break;
}
@@ -60,25 +60,25 @@ Int32 fs_ifs_read(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex
/// @param DrvTrait drive info
/// @param DrvIndex drive index.
/// @return
-Int32 fs_ifs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) {
+Int32 fs_ifs_write(IMountpoint* Mnt, DriveTrait& DrvTrait, Int32 DrvIndex) {
if (!Mnt) return kErrorDisk;
DrvTrait.fPacket.fPacketGood = false;
switch (DrvIndex) {
- case MountpointInterface::kDriveIndexA: {
+ case IMountpoint::kDriveIndexA: {
fsi_ifs_write(A, DrvTrait.fPacket, Mnt);
break;
}
- case MountpointInterface::kDriveIndexB: {
+ case IMountpoint::kDriveIndexB: {
fsi_ifs_write(B, DrvTrait.fPacket, Mnt);
break;
}
- case MountpointInterface::kDriveIndexC: {
+ case IMountpoint::kDriveIndexC: {
fsi_ifs_write(C, DrvTrait.fPacket, Mnt);
break;
}
- case MountpointInterface::kDriveIndexD: {
+ case IMountpoint::kDriveIndexD: {
fsi_ifs_write(D, DrvTrait.fPacket, Mnt);
break;
}
diff --git a/dev/kernel/src/Storage/AHCIDeviceInterface.cc b/dev/kernel/src/Storage/AHCIDeviceInterface.cc
index 182ed2b3..6dcfed69 100644
--- a/dev/kernel/src/Storage/AHCIDeviceInterface.cc
+++ b/dev/kernel/src/Storage/AHCIDeviceInterface.cc
@@ -13,9 +13,9 @@ using namespace Kernel;
/// @param In Drive input
/// @param Cleanup Drive cleanup.
AHCIDeviceInterface::AHCIDeviceInterface(void (*out)(DeviceInterface* self,
- MountpointInterface* outpacket),
+ IMountpoint* outpacket),
void (*in)(DeviceInterface* self,
- MountpointInterface* inpacket))
+ IMountpoint* inpacket))
: DeviceInterface(out, in) {}
/// @brief Class desctructor
@@ -30,7 +30,7 @@ const Char* AHCIDeviceInterface::Name() const {
/// @brief Output operator.
/// @param mnt the disk mountpoint.
/// @return the class itself after operation.
-AHCIDeviceInterface& AHCIDeviceInterface::operator<<(MountpointInterface* mnt) {
+AHCIDeviceInterface& AHCIDeviceInterface::operator<<(IMountpoint* mnt) {
if (!mnt) return *this;
for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount) {
@@ -45,13 +45,13 @@ AHCIDeviceInterface& AHCIDeviceInterface::operator<<(MountpointInterface* mnt) {
}
}
- return (AHCIDeviceInterface&) DeviceInterface<MountpointInterface*>::operator<<(mnt);
+ return (AHCIDeviceInterface&) DeviceInterface<IMountpoint*>::operator<<(mnt);
}
/// @brief Input operator.
/// @param mnt the disk mountpoint.
/// @return the class itself after operation.
-AHCIDeviceInterface& AHCIDeviceInterface::operator>>(MountpointInterface* mnt) {
+AHCIDeviceInterface& AHCIDeviceInterface::operator>>(IMountpoint* mnt) {
if (!mnt) return *this;
for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount) {
@@ -67,7 +67,7 @@ AHCIDeviceInterface& AHCIDeviceInterface::operator>>(MountpointInterface* mnt) {
}
}
- return (AHCIDeviceInterface&) DeviceInterface<MountpointInterface*>::operator>>(mnt);
+ return (AHCIDeviceInterface&) DeviceInterface<IMountpoint*>::operator>>(mnt);
}
const UInt16& AHCIDeviceInterface::GetPortsImplemented() {
@@ -84,6 +84,6 @@ const UInt32& AHCIDeviceInterface::GetIndex() {
}
Void AHCIDeviceInterface::SetIndex(const UInt32& drv) {
- MUST_PASS(MountpointInterface::kDriveIndexInvalid < drv);
+ MUST_PASS(IMountpoint::kDriveIndexInvalid < drv);
this->fDriveIndex = drv;
} \ No newline at end of file
diff --git a/dev/kernel/src/Storage/ATADeviceInterface.cc b/dev/kernel/src/Storage/ATADeviceInterface.cc
index e302d2cc..70d6e9ae 100644
--- a/dev/kernel/src/Storage/ATADeviceInterface.cc
+++ b/dev/kernel/src/Storage/ATADeviceInterface.cc
@@ -13,8 +13,8 @@ using namespace Kernel;
/// @param In Drive input
/// @param Cleanup Drive cleanup.
ATADeviceInterface::ATADeviceInterface(void (*Out)(DeviceInterface*,
- MountpointInterface* outpacket),
- void (*In)(DeviceInterface*, MountpointInterface* inpacket))
+ IMountpoint* outpacket),
+ void (*In)(DeviceInterface*, IMountpoint* inpacket))
: DeviceInterface(Out, In) {}
/// @brief Class desctructor
@@ -29,7 +29,7 @@ const Char* ATADeviceInterface::Name() const {
/// @brief Output operator.
/// @param Data the disk mountpoint.
/// @return the class itself after operation.
-ATADeviceInterface& ATADeviceInterface::operator<<(MountpointInterface* Data) {
+ATADeviceInterface& ATADeviceInterface::operator<<(IMountpoint* Data) {
if (!Data) return *this;
for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount) {
@@ -44,13 +44,13 @@ ATADeviceInterface& ATADeviceInterface::operator<<(MountpointInterface* Data) {
}
}
- return (ATADeviceInterface&) DeviceInterface<MountpointInterface*>::operator<<(Data);
+ return (ATADeviceInterface&) DeviceInterface<IMountpoint*>::operator<<(Data);
}
/// @brief Input operator.
/// @param Data the disk mountpoint.
/// @return the class itself after operation.
-ATADeviceInterface& ATADeviceInterface::operator>>(MountpointInterface* Data) {
+ATADeviceInterface& ATADeviceInterface::operator>>(IMountpoint* Data) {
if (!Data) return *this;
for (SizeT driveCount = 0; driveCount < kDriveMaxCount; ++driveCount) {
@@ -66,7 +66,7 @@ ATADeviceInterface& ATADeviceInterface::operator>>(MountpointInterface* Data) {
}
}
- return (ATADeviceInterface&) DeviceInterface<MountpointInterface*>::operator>>(Data);
+ return (ATADeviceInterface&) DeviceInterface<IMountpoint*>::operator>>(Data);
}
const UInt32& ATADeviceInterface::GetIndex() {
@@ -74,7 +74,7 @@ const UInt32& ATADeviceInterface::GetIndex() {
}
Void ATADeviceInterface::SetIndex(const UInt32& drv) {
- MUST_PASS(MountpointInterface::kDriveIndexInvalid < drv);
+ MUST_PASS(IMountpoint::kDriveIndexInvalid < drv);
this->fDriveIndex = drv;
}
diff --git a/dev/kernel/src/Storage/NVMEDeviceInterface.cc b/dev/kernel/src/Storage/NVMEDeviceInterface.cc
index 077595cf..0b8043b7 100644
--- a/dev/kernel/src/Storage/NVMEDeviceInterface.cc
+++ b/dev/kernel/src/Storage/NVMEDeviceInterface.cc
@@ -8,8 +8,8 @@
namespace Kernel {
NVMEDeviceInterface::NVMEDeviceInterface(
- void (*out)(DeviceInterface*, MountpointInterface* outpacket),
- void (*in)(DeviceInterface*, MountpointInterface* inpacket), void (*cleanup)(void))
+ void (*out)(DeviceInterface*, IMountpoint* outpacket),
+ void (*in)(DeviceInterface*, IMountpoint* inpacket), void (*cleanup)(void))
: DeviceInterface(out, in), fCleanup(cleanup) {}
NVMEDeviceInterface::~NVMEDeviceInterface() {
diff --git a/dev/libSystem/SystemKit/System.h b/dev/libSystem/SystemKit/System.h
index f46fe523..88472513 100644
--- a/dev/libSystem/SystemKit/System.h
+++ b/dev/libSystem/SystemKit/System.h
@@ -79,7 +79,7 @@ IMPORT_C Void IoCloseFile(_Input Ref file_desc);
/// @param in_data the input data.
/// @param out_data the output data.
/// @return the number of bytes written.
-/// @note This function is used to control the file descriptor, introduced for HeFS.
+/// @note This function is used to control the file descriptor, introduced for OpenHeFS.
IMPORT_C SInt32 IoCtrlFile(_Input Ref file_desc, _Input UInt32 ioctl_code, _Input VoidPtr in_data,
_Output VoidPtr out_data);
@@ -89,7 +89,7 @@ IMPORT_C const Char* IoMimeFile(_Input Ref file_desc);
/// @brief Gets the dir DIM.
/// @param dir_desc directory descriptor.
-/// @note only works in HeFS, will return nil-x/nil if used on any other filesystem.
+/// @note only works in OpenHeFS, will return nil-x/nil if used on any other filesystem.
IMPORT_C const Char* IoDimFile(_Input Ref dir_desc);
/// @brief Write data to a file ref
diff --git a/docs/tex/hefs.tex b/docs/tex/hefs.tex
index c35bca53..9ec68020 100644
--- a/docs/tex/hefs.tex
+++ b/docs/tex/hefs.tex
@@ -4,7 +4,7 @@
\usepackage{longtable}
\usepackage{listings}
\geometry{margin=1in}
-\title{HeFS: Hight-throughput extended File System}
+\title{OpenHeFS: Hight-throughput extended File System}
\author{Amlal El Mahrouss}
\date{\today}
@@ -13,7 +13,7 @@
\maketitle
\section{Overview}
-The High-throughput Extended File System (HeFS) is a custom filesystem tailored for performance, structure, and compact representation. It uses red-black trees for directory indexing, sparse block slicing for file layout, and fixed-size metadata structures optimized for 512-byte sector alignment.
+The High-throughput Extended File System (OpenHeFS) is a custom filesystem tailored for performance, structure, and compact representation. It uses red-black trees for directory indexing, sparse block slicing for file layout, and fixed-size metadata structures optimized for 512-byte sector alignment.
\section{Constants and Macros}
\begin{longtable}{|l|l|}
@@ -21,13 +21,13 @@ The High-throughput Extended File System (HeFS) is a custom filesystem tailored
\textbf{Name} & \textbf{Value / Description} \\
\hline
\texttt{kHeFSVersion} & 0x0103 \\
-\texttt{kHeFSMagic} & " HeFS" (8-byte magic identifier) \\
+\texttt{kHeFSMagic} & " OpenHeFS" (8-byte magic identifier) \\
\texttt{kHeFSMagicLen} & 8 \\
\texttt{kHeFSBlockLen} & 512 bytes \\
\texttt{kHeFSFileNameLen} & 256 characters \\
\texttt{kHeFSPartNameLen} & 128 characters \\
\texttt{kHeFSMinimumDiskSize} & 128 GiB \\
-\texttt{kHeFSDefaultVolumeName} & "HeFS Volume" \\
+\texttt{kHeFSDefaultVolumeName} & "OpenHeFS Volume" \\
\texttt{kHeFSINDStartOffset} & Offset after boot node \\
\texttt{kHeFSSearchAllStr} & "*" (wildcard string) \\
\hline
@@ -151,10 +151,10 @@ Constants:
\section{Filesystem API}\label{sec:filesystem-api}
-Provided by \texttt{Kernel::HeFS::HeFileSystemParser}.
+Provided by \texttt{Kernel::OpenHeFS::HeFileSystemParser}.
\begin{itemize}
- \item \texttt{Format(drive, flags, name)} - Format drive with HeFS
+ \item \texttt{Format(drive, flags, name)} - Format drive with OpenHeFS
\item \texttt{CreateINodeDirectory(drive, flags, dir)}
\item \texttt{RemoveINodeDirectory(drive, flags, dir)}
\item \texttt{CreateINode(drive, flags, dir, name, kind)}
@@ -168,7 +168,7 @@ Internal helpers:
\end{itemize}
\section{Conclusion}
-HeFS provides a modern and compact approach to high-performance file storage.
+OpenHeFS provides a modern and compact approach to high-performance file storage.
Its use of red-black trees, fixed-size metadata, slice-based sparse files, and minimal overhead makes it a strong candidate for performance-sensitive use cases.
\end{document}
diff --git a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
index 4a18b079..198d64a1 100644
--- a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
+++ b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
@@ -52,7 +52,7 @@ SInt32 DIFormatPartitionEPM(struct DI_DISK_IMAGE& img) noexcept;
/// @return Status code upon completion.
SInt32 DIFormatFilesystemNeFS(struct DI_DISK_IMAGE& img) noexcept;
-/// @brief HeFS format over EPM.
+/// @brief OpenHeFS format over EPM.
/// @param img disk image structure.
/// @return Status code upon completion.
SInt32 DIFormatFilesystemHeFS(struct DI_DISK_IMAGE& img) noexcept;
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
index 7f917052..aa7abdf4 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
@@ -2,17 +2,17 @@
Copyright (C) 2025, Amlal El Mahrouss, all rights reserved.
- FILE: DiskImage+HeFS.cc
+ FILE: DiskImage+OpenHeFS.cc
PURPOSE: Disk Imaging framework.
------------------------------------------- */
#include <DiskImage.fwrk/headers/DiskImage.h>
-#include <FSKit/HeFS.h>
+#include <FSKit/OpenHeFS.h>
#include <FirmwareKit/EPM.h>
-/// @brief format HeFS over an EPM disk.
+/// @brief format OpenHeFS over an EPM disk.
/// @param img disk image structure.
/// @return Status code upon completion.
SInt32 DI::DIFormatFilesystemHeFS(struct DI_DISK_IMAGE& img) noexcept {
diff --git a/public/manuals/nekernel/mgmt.hefs.util.man b/public/manuals/nekernel/mgmt.hefs.util.man
index 3274f93a..1cb7022d 100644
--- a/public/manuals/nekernel/mgmt.hefs.util.man
+++ b/public/manuals/nekernel/mgmt.hefs.util.man
@@ -1,12 +1,12 @@
NAME
- mgmt.hefs — HeFS Management utility command
+ mgmt.hefs — OpenHeFS Management utility command
SYNOPSIS
mgmt.hefs [OPTIONS]
DESCRIPTION
The `mgmt.hefs` command provides scheduling, execution, and remote orchestration
- of a HeFS volume inside a System One environement. One might use this tool to
+ of a OpenHeFS volume inside a System One environement. One might use this tool to
create, edit, and remove volumes from a disk.
Usages include, but are not limited to:
@@ -16,7 +16,7 @@ DESCRIPTION
OPTIONS
-v, --volume <DEVICE> Device input
- -c, --create Create HeFS volume
+ -c, --create Create OpenHeFS volume
-x, --xml <PLIST> Pass PropertyList to volume creation tool.
-t, --time <HH:MMAM/PM> Time to run the script
-d, --day <DAY> Day of the week (e.g., Mon, Tue, Wed)
diff --git a/tools/fsck.hefs.cc b/tools/fsck.hefs.cc
index df89bf07..a2162a4f 100644
--- a/tools/fsck.hefs.cc
+++ b/tools/fsck.hefs.cc
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <tools/libmkfs/hefs.h>
+#include <tools/libmkfs/openhefs.h>
#include <tools/libmkfs/mkfs.h>
#include <cstdlib>
#include <fstream>
@@ -26,7 +26,7 @@ int main(int argc, char** argv) {
auto origin = mkfs::get_option<char>(args, "-org");
if (opt_disk.empty()) {
- mkfs::console_out() << "fsck: hefs: error: HeFS partition is empty! Exiting..."
+ mkfs::console_out() << "fsck: hefs: error: OpenHeFS partition is empty! Exiting..."
<< "\n";
return EXIT_FAILURE;
}
@@ -59,16 +59,16 @@ int main(int argc, char** argv) {
if (strncmp(boot_node.magic, kHeFSMagic, kHeFSMagicLen) != 0 || boot_node.sectorCount < 1 ||
boot_node.sectorSize < kMkFsSectorSz) {
- mkfs::console_out() << "hefs: error: Device is not an HeFS disk: " << opt_disk << "\n";
+ mkfs::console_out() << "hefs: error: Device is not an OpenHeFS disk: " << opt_disk << "\n";
return EXIT_FAILURE;
}
if (boot_node.badSectors > kMkFsMaxBadSectors) {
- mkfs::console_out() << "hefs: error: HeFS disk has too much bad sectors: " << opt_disk << "\n";
+ mkfs::console_out() << "hefs: error: OpenHeFS disk has too much bad sectors: " << opt_disk << "\n";
return EXIT_FAILURE;
}
- mkfs::console_out() << "hefs: HeFS partition is healthy, exiting...\n";
+ mkfs::console_out() << "hefs: OpenHeFS partition is healthy, exiting...\n";
output_device.close();
diff --git a/tools/libmkfs/hefs.h b/tools/libmkfs/openhefs.h
index 52bb3086..3bba79e8 100644
--- a/tools/libmkfs/hefs.h
+++ b/tools/libmkfs/openhefs.h
@@ -16,7 +16,7 @@
#define kHeFSFileNameLen (256U)
#define kHeFSPartNameLen (128U)
-#define kHeFSDefaultVolumeName u8"HeFS Volume"
+#define kHeFSDefaultVolumeName u8"OpenHeFS Volume"
namespace mkfs::hefs {
diff --git a/tools/mkfs.hefs.cc b/tools/mkfs.hefs.cc
index 9f70b78f..d1139e10 100644
--- a/tools/mkfs.hefs.cc
+++ b/tools/mkfs.hefs.cc
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <tools/libmkfs/hefs.h>
+#include <tools/libmkfs/openhefs.h>
#include <tools/libmkfs/mkfs.h>
#include <algorithm>
#include <cstdlib>