Add default constructor for DirectoryListing
This commit is contained in:
parent
059be4e32a
commit
00810e9341
4
deps/ox/src/ox/fs/filesystem.hpp
vendored
4
deps/ox/src/ox/fs/filesystem.hpp
vendored
@ -35,6 +35,8 @@ struct DirectoryListing {
|
|||||||
String name;
|
String name;
|
||||||
FileStat stat;
|
FileStat stat;
|
||||||
|
|
||||||
|
DirectoryListing() = default;
|
||||||
|
|
||||||
DirectoryListing(const char *name) {
|
DirectoryListing(const char *name) {
|
||||||
this->name = name;
|
this->name = name;
|
||||||
}
|
}
|
||||||
@ -181,7 +183,7 @@ int Directory<InodeId_t, FsSize_t>::ls(List *list) {
|
|||||||
if (current) {
|
if (current) {
|
||||||
for (uint64_t i = 0; i < this->children; i++) {
|
for (uint64_t i = 0; i < this->children; i++) {
|
||||||
list->push_back(current->getName());
|
list->push_back(current->getName());
|
||||||
list->at(i).stat.inode = current->inode;
|
(*list)[i].stat.inode = current->inode;
|
||||||
current = (DirectoryEntry<InodeId_t>*) (((uint8_t*) current) + current->size());
|
current = (DirectoryEntry<InodeId_t>*) (((uint8_t*) current) + current->size());
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user