Fix version mismatch when loading FileSystems

This commit is contained in:
Gary Talent 2017-10-17 22:09:28 -05:00
parent 0bc0340c20
commit d76dea463c
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ FileSystem *createFileSystem(uint8_t *buff, size_t buffSize, bool ownsBuff) {
FileSystem *fs = nullptr; FileSystem *fs = nullptr;
switch (version) { switch (version) {
case 6: case FileStore16::VERSION:
switch (type) { switch (type) {
case ox::OxFS_16: case ox::OxFS_16:
fs = new FileSystem16(buff, ownsBuff); fs = new FileSystem16(buff, ownsBuff);

View File

@ -719,7 +719,7 @@ uint64_t FileSystemTemplate<FileStore, FS_TYPE>::generateInodeId() {
// find an inode value for the given path // find an inode value for the given path
while (!inode) { while (!inode) {
inode = rand.gen(); inode = rand.gen();
inode >>= 64 - 8 * sizeof(typename FileStore::InodeId_t); inode >>= 64 - 8 * sizeof(typename FileStore::InodeId_t);
// make sure this does not already exist // make sure this does not already exist
if (inode < INODE_RESERVED_END || stat(inode).inode) { if (inode < INODE_RESERVED_END || stat(inode).inode) {