diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-07 20:45:38 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-15 12:21:45 +0200 |
commit | 70bbeea7b227866bdbdef0b249ff7f8644713f15 (patch) | |
tree | 3cc3d87a42d2edae54563981b4e81a73690db913 /include/dirent.h | |
parent | e1385b3399b606c2fe495f2e1967822af715edec (diff) | |
download | barebox-70bbeea7b227866bdbdef0b249ff7f8644713f15.tar.gz barebox-70bbeea7b227866bdbdef0b249ff7f8644713f15.tar.xz |
fs: move libc function prototypes to their correct locations
This moves the function prototypes in include/fs.h which also exist
in the libc to the locations they would have in libc.
With this it becomes easier to share code between barebox and userspace
since the usual libc include files will exist. Also users of the libc
functions no longer have to include the barebox internal fs.h header.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/dirent.h')
-rw-r--r-- | include/dirent.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/dirent.h b/include/dirent.h new file mode 100644 index 0000000000..5ee4c2063e --- /dev/null +++ b/include/dirent.h @@ -0,0 +1,20 @@ +#ifndef __DIRENT_H +#define __DIRENT_H + +struct dirent { + char d_name[256]; +}; + +typedef struct dir { + struct device_d *dev; + struct fs_driver_d *fsdrv; + struct node_d *node; + struct dirent d; + void *priv; /* private data for the fs driver */ +} DIR; + +DIR *opendir(const char *pathname); +struct dirent *readdir(DIR *dir); +int closedir(DIR *dir); + +#endif /* __DIRENT_H */ |