Made file store IO test test 16, 32, and 64 bit file systems.

This commit is contained in:
2016-06-24 17:50:10 -05:00
parent c47bb01175
commit f9f19819ef
3 changed files with 24 additions and 11 deletions
+4 -3
View File
@@ -13,18 +13,19 @@
namespace wombat {
namespace fs {
template<typename FsSize_t>
template<typename FsT>
class FileStore {
public:
typedef uint16_t InodeId_t;
typedef FsT FsSize_t;
struct FsHeader {
uint32_t version;
FsSize_t size;
FsSize_t rootInode;
};
typedef uint16_t InodeId_t;
struct StatInfo {
InodeId_t inodeId;
FsSize_t size;
+9 -1
View File
@@ -30,12 +30,20 @@ class FileSystem {
int read(const char *path, void *buffer);
FileStat stat(const char *path);
FileStat stat(typename FileStore::InodeId_t inode);
};
template<typename FileStore>
FileStat FileSystem<FileStore>::stat(const char *path) {
FileStat stat;
auto s = store->stat(path);
return stat;
}
template<typename FileStore>
FileStat FileSystem<FileStore>::stat(typename FileStore::InodeId_t inode) {
FileStat stat;
auto s = store->stat(inode);
stat.size = s.size;
stat.inode = s.inodeId;
return stat;