diff --git a/src/kernel/boot/loader/RootFileSystem.cpp b/src/kernel/boot/loader/RootFileSystem.cpp index fdddb242fd..de6e23782e 100644 --- a/src/kernel/boot/loader/RootFileSystem.cpp +++ b/src/kernel/boot/loader/RootFileSystem.cpp @@ -63,7 +63,7 @@ RootFileSystem::Close(void *cookie) Node * -RootFileSystem::Lookup(const char *name, bool traverseLinks) +RootFileSystem::Lookup(const char *name, bool /*traverseLinks*/) { file_system_entry *entry = NULL; @@ -82,6 +82,20 @@ RootFileSystem::Lookup(const char *name, bool traverseLinks) } +status_t +RootFileSystem::GetNextEntry(void *_cookie, char *name, size_t size) +{ + dir_cookie *cookie = (dir_cookie *)_cookie; + file_system_entry *entry; + + entry = cookie->current = (file_system_entry *)list_get_next_item(&fList, cookie->current); + if (entry != NULL) + return entry->root->GetName(name, size); + + return B_ENTRY_NOT_FOUND; +} + + status_t RootFileSystem::GetNextNode(void *_cookie, Node **_node) { @@ -93,7 +107,6 @@ RootFileSystem::GetNextNode(void *_cookie, Node **_node) *_node = entry->root; return B_OK; } - return B_ENTRY_NOT_FOUND; } diff --git a/src/kernel/boot/loader/RootFileSystem.h b/src/kernel/boot/loader/RootFileSystem.h index 8a379f8fa9..0c920f3fea 100644 --- a/src/kernel/boot/loader/RootFileSystem.h +++ b/src/kernel/boot/loader/RootFileSystem.h @@ -19,6 +19,7 @@ class RootFileSystem : public Directory { virtual Node *Lookup(const char *name, bool traverseLinks); + virtual status_t GetNextEntry(void *cookie, char *nameBuffer, size_t bufferSize); virtual status_t GetNextNode(void *cookie, Node **_node); virtual status_t Rewind(void *cookie);