Skip to content

Commit

Permalink
dirent: added prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Sep 25, 2024
1 parent 77729aa commit 6a88e4d
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/include/kernel/dirent.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,23 @@
#pragma once

#include <sys/types.h>
#include <kernel/sched.h>
#include <kernel/file.h>

typedef struct {
typedef int DIR;

struct dirent {
ino_t d_ino;
char d_name[];
} dirent;
};

/* directory-specific I/O descriptor (see io.h) */
typedef struct {
Process *process;
char path[MAX_FILE_PATH];
size_t position;
} DirectoryDescriptor;

int opendir(Thread *, uint64_t, const char *);
int closedir(Thread *, DIR *);
int readdir_r(Thread *, uint64_t, DIR *, struct dirent *, struct dirent **);

0 comments on commit 6a88e4d

Please sign in to comment.