Removed root directry entry, because the root directory doesn't need an entry.
This commit is contained in:
@@ -377,7 +377,7 @@ uint8_t *FileStore<FsSize_t>::format(uint8_t *buffer, FsSize_t size) {
|
|||||||
|
|
||||||
auto inodeSection = (Inode*) (buffer + header->rootInode);
|
auto inodeSection = (Inode*) (buffer + header->rootInode);
|
||||||
inodeSection->m_id = 0;
|
inodeSection->m_id = 0;
|
||||||
inodeSection->next = inodeSection->prev = (uint8_t*) inodeSection - (uint8_t*) buffer;
|
inodeSection->next = inodeSection->prev = (FsSize_t) ((uint8_t*) inodeSection - (uint8_t*) buffer);
|
||||||
|
|
||||||
return (uint8_t*) header;
|
return (uint8_t*) header;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,11 +93,8 @@ FileStat FileSystem<FileStore>::stat(typename FileStore::InodeId_t inode) {
|
|||||||
template<typename FileStore>
|
template<typename FileStore>
|
||||||
uint8_t *FileSystem<FileStore>::format(uint8_t *buffer, typename FileStore::FsSize_t size) {
|
uint8_t *FileSystem<FileStore>::format(uint8_t *buffer, typename FileStore::FsSize_t size) {
|
||||||
buffer = FileStore::format(buffer, size);
|
buffer = FileStore::format(buffer, size);
|
||||||
char dirBuff[sizeof(Directory) + sizeof(Directory)];
|
char dirBuff[sizeof(Directory) + sizeof(DirectoryEntry) + 2];
|
||||||
auto *dir = (Directory*) dirBuff;
|
auto *dir = (Directory*) dirBuff;
|
||||||
DirectoryEntry entry;
|
|
||||||
entry.inode = INODE_ROOT_DIR;
|
|
||||||
entry.setName("/");
|
|
||||||
|
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
uint32_t err;
|
uint32_t err;
|
||||||
|
|||||||
Reference in New Issue
Block a user