boot loader: Implement subset of <dirent.h> API

* Add opendir(), closedir(), readdir(), rewinddir().
* Add open_directory(), similar to opendir(), but basing the path off a
  specified directory.
This commit is contained in:
Ingo Weinhold
2014-04-18 23:31:39 +02:00
parent 09c07e4c5c
commit 2f019bd6ca
2 changed files with 136 additions and 0 deletions
+3
View File
@@ -6,6 +6,8 @@
#define KERNEL_BOOT_VFS_H
#include <dirent.h>
#include <SupportDefs.h>
#include <util/DoublyLinkedList.h>
@@ -146,6 +148,7 @@ extern status_t mount_file_systems(stage2_args *args);
extern int open_node(Node *node, int mode);
extern int open_from(Directory *directory, const char *path, int mode,
mode_t permissions = 0);
extern DIR* open_directory(Directory* baseDirectory, const char* path);
extern Node *get_node_from(int fd);