diff --git a/src/ox/fs/inodemgr.hpp b/src/ox/fs/inodemgr.hpp deleted file mode 100644 index 5f8580c06..000000000 --- a/src/ox/fs/inodemgr.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2015 - 2017 gtalent2@gmail.com - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ -#pragma once - -namespace ox { -namespace fs { - -/** - * Used to track unused inodes. - */ -template -struct InodeFile { - InodeId_t length; - - InodeId_t *inodes(); -}; - -template -InodeId_t *InodeFile::inodes() { - return (InodeId_t*) (this + 1); -} - -template -int generateInodeFile(InodeId_t *inodes, int count) { - const static InodeId_t endPoint = ~0; - auto it = count; - auto multiplier = 1; - auto current = endPoint / 2; - auto lowestNode = current; - - inodes[0] = count; - - while (it > 0) { - current = lowestNode * multiplier; - if (current < endPoint) { - inodes[it--] = current; - multiplier += 2; - } else { - multiplier = 1; - lowestNode /= 2; - } - } - - return 0; -} - -} -} diff --git a/src/ox/fs/test/filesystem_format.cpp b/src/ox/fs/test/filesystem_format.cpp index 9029de4bb..7e82514c6 100644 --- a/src/ox/fs/test/filesystem_format.cpp +++ b/src/ox/fs/test/filesystem_format.cpp @@ -5,8 +5,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #include -#include using namespace ox::fs; using namespace ox::std;