diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-10-23 09:27:16 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-10-23 09:30:18 +0200 |
| commit | 64492ed9c42659d0c5f7eb2143a673dd0b5f9dc3 (patch) | |
| tree | ca8074878f508bd212a414f0c6ddbdf7e41d5dd7 /dev/kernel/src/FS | |
| parent | 9c4d2506ccb897045d9fb0c1082ed69ac24ce251 (diff) | |
feat! breaking API changes in kernel.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/FS')
| -rw-r--r-- | dev/kernel/src/FS/HeFS+FileMgr.cc | 33 | ||||
| -rw-r--r-- | dev/kernel/src/FS/HeFS+FileSystemParser.cc | 2 |
2 files changed, 31 insertions, 4 deletions
diff --git a/dev/kernel/src/FS/HeFS+FileMgr.cc b/dev/kernel/src/FS/HeFS+FileMgr.cc index 6b559cf4..33813f65 100644 --- a/dev/kernel/src/FS/HeFS+FileMgr.cc +++ b/dev/kernel/src/FS/HeFS+FileMgr.cc @@ -19,12 +19,12 @@ HeFileSystemMgr::HeFileSystemMgr() { mParser = new HeFileSystemParser(); MUST_PASS(mParser); - kout << "We are done allocating NeFileSystemParser...\n"; + kout << "We are done allocating HeFileSystemParser...\n"; } HeFileSystemMgr::~HeFileSystemMgr() { if (mParser) { - kout << "Destroying NeFileSystemParser...\n"; + kout << "Destroying HeFileSystemParser...\n"; delete mParser; mParser = nullptr; } @@ -124,21 +124,44 @@ _Output NodePtr HeFileSystemMgr::Open(_Input const Char* path, _Input const Char } Void HeFileSystemMgr::Write(_Input NodePtr node, _Input VoidPtr data, _Input Int32 flags, - _Input SizeT size) {} + _Input SizeT size) { + NE_UNUSED(node); + NE_UNUSED(flags); + NE_UNUSED(size); + NE_UNUSED(data); +} _Output VoidPtr HeFileSystemMgr::Read(_Input NodePtr node, _Input Int32 flags, _Input SizeT size) { + NE_UNUSED(node); + NE_UNUSED(flags); + NE_UNUSED(size); + return nullptr; } Void HeFileSystemMgr::Write(_Input const Char* name, _Input NodePtr node, _Input VoidPtr data, - _Input Int32 flags, _Input SizeT size) {} + _Input Int32 flags, _Input SizeT size) { + NE_UNUSED(node); + NE_UNUSED(flags); + NE_UNUSED(size); + NE_UNUSED(name); + NE_UNUSED(data); +} _Output VoidPtr HeFileSystemMgr::Read(_Input const Char* name, _Input NodePtr node, _Input Int32 flags, _Input SizeT sz) { + NE_UNUSED(node); + NE_UNUSED(flags); + NE_UNUSED(sz); + NE_UNUSED(name); + return nullptr; } _Output Bool HeFileSystemMgr::Seek(NodePtr node, SizeT off) { + NE_UNUSED(node); + NE_UNUSED(off); + return false; } @@ -146,6 +169,7 @@ _Output Bool HeFileSystemMgr::Seek(NodePtr node, SizeT off) { /// @param node /// @return kFileMgrNPos if invalid, else current offset. _Output SizeT HeFileSystemMgr::Tell(NodePtr node) { + NE_UNUSED(node); return kFileMgrNPos; } @@ -153,6 +177,7 @@ _Output SizeT HeFileSystemMgr::Tell(NodePtr node) { /// @param node /// @return False if invalid, nah? calls Seek(node, 0). _Output Bool HeFileSystemMgr::Rewind(NodePtr node) { + NE_UNUSED(node); return kFileMgrNPos; } diff --git a/dev/kernel/src/FS/HeFS+FileSystemParser.cc b/dev/kernel/src/FS/HeFS+FileSystemParser.cc index 86f929c0..029fdf26 100644 --- a/dev/kernel/src/FS/HeFS+FileSystemParser.cc +++ b/dev/kernel/src/FS/HeFS+FileSystemParser.cc @@ -79,12 +79,14 @@ 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. STATIC UInt64 hefsi_to_big_endian_64(UInt64 val) { return ((val >> 56) & 0x00000000000000FFULL) | ((val >> 40) & 0x000000000000FF00ULL) | ((val >> 24) & 0x0000000000FF0000ULL) | ((val >> 8) & 0x00000000FF000000ULL) | ((val << 8) & 0x000000FF00000000ULL) | ((val << 24) & 0x0000FF0000000000ULL) | ((val << 40) & 0x00FF000000000000ULL) | ((val << 56) & 0xFF00000000000000ULL); } + /// @brief Simple algorithm to hash directory entries for INDs. /// @param path the directory path. /// @return The hashed path. |
