From 3c33f912afff51761f9e7227da81a33a3ab0c5ed Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 2 Jul 2016 02:28:45 -0500 Subject: [PATCH] Replace file store version field with type field Replaced file store version field with type field to allow a family of differing file store formats. --- src/ox/fs/filestore.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ox/fs/filestore.hpp b/src/ox/fs/filestore.hpp index d3e0e59ad..6a5f3e619 100644 --- a/src/ox/fs/filestore.hpp +++ b/src/ox/fs/filestore.hpp @@ -46,7 +46,7 @@ class FileStore { Inode() = default; }; - uint32_t m_version; + uint32_t m_fsType; FsSize_t m_size; FsSize_t m_firstInode; FsSize_t m_rootInode; @@ -94,7 +94,7 @@ class FileStore { static uint8_t version(); - static uint8_t *format(uint8_t *buffer, FsSize_t size); + static uint8_t *format(uint8_t *buffer, FsSize_t size, uint32_t fsType = 0); private: /** @@ -328,11 +328,11 @@ uint8_t FileStore::version() { }; template -uint8_t *FileStore::format(uint8_t *buffer, FsSize_t size) { +uint8_t *FileStore::format(uint8_t *buffer, FsSize_t size, uint32_t fsType) { memset(buffer, 0, size); auto *fs = (FileStore*) buffer; - fs->m_version = FileStore::version(); + fs->m_fsType = fsType; fs->m_size = size; fs->m_rootInode = sizeof(FileStore); fs->m_firstInode = sizeof(FileStore);