Kernel: Rewrite directory listing so it can be integrated to libc

This commit is contained in:
Bananymous
2023-06-10 23:13:41 +03:00
parent 223d2ac3a6
commit 01311b470f
9 changed files with 135 additions and 40 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include <dirent.h>
namespace Kernel::API
{
struct DirectoryEntry
{
size_t rec_len { 0 };
struct dirent dirent;
DirectoryEntry* next() const { return (DirectoryEntry*)((uintptr_t)this + rec_len); }
};
struct DirectoryEntryList
{
size_t entry_count { 0 };
DirectoryEntry array[];
};
}