diff options
| -rw-r--r-- | doc/src/internal/superblock.rst | 2 | ||||
| -rw-r--r-- | include/fs/detail/superblock.hpp | 4 | ||||
| -rw-r--r-- | include/fs/extfs.hpp | 2 | ||||
| -rw-r--r-- | src/fs/extfs.cpp | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/internal/superblock.rst b/doc/src/internal/superblock.rst index 6e85df4..168fa0b 100644 --- a/doc/src/internal/superblock.rst +++ b/doc/src/internal/superblock.rst @@ -38,5 +38,5 @@ Structure Implementation -------------- -.. doxygenstruct:: fs::detail::extfs_superblock +.. doxygenstruct:: fs::detail::superblock :members: diff --git a/include/fs/detail/superblock.hpp b/include/fs/detail/superblock.hpp index f86fe3d..dbacd48 100644 --- a/include/fs/detail/superblock.hpp +++ b/include/fs/detail/superblock.hpp @@ -14,7 +14,7 @@ namespace fs::detail * * @since 1.0 */ - struct extfs_superblock + struct superblock { u32 const inodes_count{}; ///< The total number of inodes in the file system u32 const blocks_count{}; ///< The total number of blocks in the file system @@ -66,7 +66,7 @@ namespace fs::detail u08_arr<760> const _reserved1{}; ///< Padding }; - static_assert(sizeof(extfs_superblock) == 1024, "An ext* super block must have an exact size of 1024 byte!"); + static_assert(sizeof(superblock) == 1024, "An ext2/3/4 super block must have an exact size of 1024 bytes!"); } diff --git a/include/fs/extfs.hpp b/include/fs/extfs.hpp index 545a840..b06b9fb 100644 --- a/include/fs/extfs.hpp +++ b/include/fs/extfs.hpp @@ -78,7 +78,7 @@ namespace fs bool has_label() const; private: - detail::extfs_superblock m_primarySuperblock{}; + detail::superblock m_primarySuperblock{}; std::fstream m_stream{}; }; diff --git a/src/fs/extfs.cpp b/src/fs/extfs.cpp index 671124d..29ad5b4 100644 --- a/src/fs/extfs.cpp +++ b/src/fs/extfs.cpp @@ -9,11 +9,11 @@ namespace auto constexpr kPrimarySuperblockLocation = 1024; auto constexpr kExtfsMagic = 0xef53; - auto read_superblock(std::fstream & stream, fs::detail::extfs_superblock & superblock) + auto read_superblock(std::fstream & stream, fs::detail::superblock & superblock) { auto const originalPosition = stream.tellg(); stream.seekg(kPrimarySuperblockLocation); - stream.read(reinterpret_cast<char *>(&superblock), sizeof(fs::detail::extfs_superblock)); + stream.read(reinterpret_cast<char *>(&superblock), sizeof(fs::detail::superblock)); stream.seekg(originalPosition); } } |
