summaryrefslogtreecommitdiffhomepage
path: root/lib/stdx/embdfs.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-31 07:09:23 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-03-31 07:09:23 +0200
commitfbbc3456663f800eff9e047f26fd64874c4aa152 (patch)
tree9b6657e9e38fc22763e04d7f333c2c998455ec87 /lib/stdx/embdfs.hpp
parentf23d088ce1ef85ed134a20bfacf6eeb7d3c7d2c1 (diff)
mod/embdfs.hpp: add superblock structure.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'lib/stdx/embdfs.hpp')
-rw-r--r--lib/stdx/embdfs.hpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/stdx/embdfs.hpp b/lib/stdx/embdfs.hpp
index 05e2fc9..5cc8496 100644
--- a/lib/stdx/embdfs.hpp
+++ b/lib/stdx/embdfs.hpp
@@ -12,13 +12,25 @@
#include <cstdint>
#include <cstddef>
-/// @brief A Fail-safe filesystem designed for tiny MCUs.
+/// @brief A Filesystem designed for tiny storage.
/// @author Amlal EL Mahrouss (amlal@nekernel.org)
namespace stdx::freestanding
{
- struct embdfs_superblock;
- struct embdfs_inode;
-}
+ struct embdfs_superblock;
+ struct embdfs_inode;
+
+ /// @brief Superblock data structure
+ struct embdfs_superblock
+ {
+ std::int16_t s_block_mag;
+ std::int32_t s_num_inodes;
+ std::int32_t s_part_size;
+ std::int32_t s_part_used;
+ std::int16_t s_sector_sz;
+ std::uint32_t s_inode_start, s_inode_end;
+ char s_name[16];
+ };
+} // namespace stdx::freestanding
#endif // ifndef _STDX_EMBDFS_HPP \ No newline at end of file