-
Notifications
You must be signed in to change notification settings - Fork 59
/
unixtypes.h
53 lines (46 loc) · 1007 Bytes
/
unixtypes.h
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
43
44
45
46
47
48
49
50
51
52
53
#ifndef __UNIXTYPES_H
#define __UNIXTYPES_H
#pragma pack(push, 1)
struct unixflock {
uint16_t l_type;
uint16_t l_whence;
uint32_t l_start;
uint32_t l_len;
uint16_t l_pid;
};
struct unixstat {
uint16_t st_dev;
uint16_t st_ino;
uint16_t st_mode;
uint16_t st_nlink;
uint16_t st_uid;
uint16_t st_gid;
uint16_t st_rdev;
uint16_t pad;
uint32_t st_size;
uint32_t st_uatime;
uint32_t st_umtime;
uint32_t st_uctime;
};
#define UNIX_S_IFBLK 0x6000
#define UNIX_S_IFREG 0x8000
#define UNIX_S_IFLNK 0xA000
#define UNIX_S_IFDIR 0x4000
#define UNIX_S_IFCHR 0x2000
#define UNIX_S_IFIFO 0x1000
struct unixdirent {
uint16_t d_ino;
uint32_t d_off;
uint16_t d_reclen;
uint16_t d_type;
char d_name[256];
};
struct unixutsname {
char sysname[9];
char nodename[9];
char release[9];
char version[9];
char machine[9];
};
#pragma pack(pop)
#endif