From f3e03796652b792bb3fd5d3d25b687b9a7f14633 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 18 May 2012 11:25:25 +0200 Subject: A bit of a change in the directory layout. --- src/include/tce/vfs.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/include/tce/vfs.h (limited to 'src/include/tce/vfs.h') diff --git a/src/include/tce/vfs.h b/src/include/tce/vfs.h new file mode 100644 index 0000000..20ea03b --- /dev/null +++ b/src/include/tce/vfs.h @@ -0,0 +1,42 @@ +#ifndef DEF_TCE_VFS_H +#define DEF_TCE_VFS_H + +#include + +typedef size_t FILE; + +typedef struct _file_info { + uint32_t type; + uint32_t dev_type; + uint32_t mode; + uint32_t uid, gid; + size_t size; +} file_info; + +// file open flags +#define FM_READ 0x00000001 +#define FM_WRITE 0x00000002 +#define FM_APPEND 0x00000004 +#define FM_TRUNC 0x00000008 +#define FM_CREATE 0x00000010 +#define FM_DELETE 0x00000020 + +// link modes +#define LM_SYMLINK 1 +#define LM_HARDLINK 2 +#define LM_MOUNT 3 +#define LM_OUTPUT_TO 4 + +// file type flags +#define FT_FILE 0x00000001 +#define FT_DIR 0x00000002 +#define FT_SYMLINK 0x00000004 +#define FT_DEV 0x00000008 +#define FT_TERMINAL 0x00000010 + +// device types +#define DT_BLOCK 1 +#define DT_KEYBOARD 2 +#define DT_DISPLAY 3 + +#endif -- cgit v1.2.3