Fix version mismatch when loading FileSystems
This commit is contained in:
parent
0bc0340c20
commit
d76dea463c
2
deps/ox/src/ox/fs/filesystem.cpp
vendored
2
deps/ox/src/ox/fs/filesystem.cpp
vendored
@ -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);
|
||||||
|
2
deps/ox/src/ox/fs/filesystem.hpp
vendored
2
deps/ox/src/ox/fs/filesystem.hpp
vendored
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user