diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-31 07:09:23 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-31 07:09:23 +0200 |
| commit | fbbc3456663f800eff9e047f26fd64874c4aa152 (patch) | |
| tree | 9b6657e9e38fc22763e04d7f333c2c998455ec87 /lib/stdx | |
| parent | f23d088ce1ef85ed134a20bfacf6eeb7d3c7d2c1 (diff) | |
mod/embdfs.hpp: add superblock structure.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'lib/stdx')
| -rw-r--r-- | lib/stdx/cgi.hpp | 8 | ||||
| -rw-r--r-- | lib/stdx/embdfs.hpp | 20 |
2 files changed, 20 insertions, 8 deletions
diff --git a/lib/stdx/cgi.hpp b/lib/stdx/cgi.hpp index 6d50994..5213c15 100644 --- a/lib/stdx/cgi.hpp +++ b/lib/stdx/cgi.hpp @@ -30,12 +30,12 @@ namespace stdx public: explicit cgi_writer() = default; - ~cgi_writer() = default; + ~cgi_writer() = default; - cgi_writer& operator=(const cgi_writer&) = default; - cgi_writer(const cgi_writer&) = default; + cgi_writer& operator=(const cgi_writer&) = default; + cgi_writer(const cgi_writer&) = default; - public: + public: cgi_writer& eval_html(const std::stringstream& ss_html) { return this->eval_("text/html", ss_html); 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 |
