diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/astdx/embdfs.hpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/lib/astdx/embdfs.hpp b/lib/astdx/embdfs.hpp index f873b7d..6b018cf 100644 --- a/lib/astdx/embdfs.hpp +++ b/lib/astdx/embdfs.hpp @@ -22,28 +22,49 @@ namespace astdx::freestanding struct embdfs_superblock; struct embdfs_inode; - inline constexpr const size_t g_superblock_name_len_ = 16; + inline constexpr const size_t _superblock_name_len = 16; + inline constexpr const size_t _superblock_reserve_len = 462; + +#ifdef EMBDFS_28BIT_LBA + typedef std::uint32_t lba_t; +#elif defined(EMBDFS_48BIT_LBA) + typedef std::uint64_t lba_t; +#endif + + typedef std::int16_t sword_t; + typedef std::int32_t sdword_t; + + typedef std::uint8_t utf8_char_t; /// @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[g_superblock_name_len_]; + sword_t s_block_mag; + sdword_t s_num_inodes; + sdword_t s_part_size; + sdword_t s_part_used; + sdword_t s_version; + sword_t s_sector_sz; + lba_t s_inode_start; + lba_t s_inode_end; + utf8_char_t s_name[_superblock_name_len]; + utf8_char_t s_reserved[_superblock_reserve_len]; }; } // namespace details /// @brief Creates the library context. /// @return Whether it suceeded or not. - int32_t embdfs_create_context(); + inline int32_t embdfs_create_context() + { + return 0; + } /// @brief Destroys the library context. /// @return Whether it suceeded or not. - int32_t embdfs_destroy_context(); + inline int32_t embdfs_destroy_context() + { + return 0; + } } // namespace astdx::freestanding #endif // ifndef _STDX_EMBDFS_HPP
\ No newline at end of file |
