From e3a8099343aac9d94f411638ad84632d4b620132 Mon Sep 17 00:00:00 2001 From: Miguel Date: Mon, 15 Oct 2018 16:29:50 +0200 Subject: cleanup sys/ etc --- interface/sys/dirent.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 interface/sys/dirent.h (limited to 'interface/sys/dirent.h') diff --git a/interface/sys/dirent.h b/interface/sys/dirent.h new file mode 100644 index 0000000..bf37746 --- /dev/null +++ b/interface/sys/dirent.h @@ -0,0 +1,26 @@ +#ifndef _DIRENT_H +#define _DIRENT_H + +#include + +enum FS_FILE_TYPE +{ + FS_FILE_TYPE_DIR = 1, + FS_FILE_TYPE_FILE = 2 +}; + +struct dirent +{ + uint32_t d_ino; + char d_name[255]; + + // rest is optional + uint8_t type; //FILE OR DIR (FS_FILE_TYPE) + + int pos; // position of last read! + char dirname[255]; // directory name we are traversing TODO: use inode here or similar for other systems! +}; + +typedef struct dirent DIR; + +#endif -- cgit v1.2.3