summaryrefslogtreecommitdiff
path: root/src/include/tce/vfs.h
blob: 00c80d70ecd611e942f8369132c964e37aa945c8 (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef DEF_TCE_VFS_H
#define DEF_TCE_VFS_H

#include <types.h>

typedef int 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