summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2016-12-25 00:58:50 +0100
committerFelix Morgner <felix.morgner@gmail.com>2016-12-25 01:01:06 +0100
commit2a323c549554cbe028efd92be55104460388c742 (patch)
tree3c7deb9f9b57bd62cf757a6884e4611610354490
parent7bd8cc53fc013aed452ae12f0405242f35c0860c (diff)
downloadextfs-2a323c549554cbe028efd92be55104460388c742.tar.xz
extfs-2a323c549554cbe028efd92be55104460388c742.zip
superblock: Rename extfs_superblock to superblock
-rw-r--r--doc/src/internal/superblock.rst2
-rw-r--r--include/fs/detail/superblock.hpp4
-rw-r--r--include/fs/extfs.hpp2
-rw-r--r--src/fs/extfs.cpp4
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);
}
}