summaryrefslogtreecommitdiffstats
path: root/include/dirent.h
blob: 4f7ff2a5f91f745d18b38c6cd99cd1496717de84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __DIRENT_H
#define __DIRENT_H

#include <linux/list.h>
#include <linux/path.h>

struct dirent {
	char d_name[256];
};

typedef struct dir {
	struct device *dev;
	struct fs_driver *fsdrv;
	struct dirent d;
	void *priv; /* private data for the fs driver */
	int fd;
	struct path path;
	struct list_head entries;
} DIR;

DIR *opendir(const char *pathname);
DIR *fdopendir(int fd);
struct dirent *readdir(DIR *dir);
int unreaddir(DIR *dir, const struct dirent *d);
int rewinddir(DIR *dir);
int closedir(DIR *dir);

#endif /* __DIRENT_H */