blob: 6e5c0c62afdff7fd70ea1c7fc3a945abac51d237 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#pragma once
/*
* time
*/
/* timeval */
typedef struct sys·TimeStamp sys·TimeStamp;
struct sys·TimeStamp
{
int64 sec;
uint32 nano;
int32 femto;
};
/*
* files
*/
typedef struct sys·Info sys·Info;
typedef struct sys·Directory sys·Directory;
typedef struct sys·DirEntry sys·DirEntry;
/* statx */
struct sys·Info
{
uint32 mask;
uint32 blksize;
uint64 attr;
uint32 nlink;
uint32 uid;
uint32 gid;
uint16 mode;
uint16 _pad;
uint64 inode;
uint64 size;
uint64 nblk;
uint64 attrmask;
sys·TimeStamp access, create, status, modify;
struct{
uint32 major;
uint32 minor;
}spdev;
struct{
uint32 major;
uint32 minor;
}device;
uint64 spare[14];
};
struct sys·Directory
{
intptr off;
int fd;
int pad;
int pos, end;
/* buf needs fall on (off_t) 8 byte alignment */
char buf[2048];
};
struct sys·DirEntry
{
ulong ino; /* inode number */
ulong off; /* offset to next entry (from start of directory */
ushort len; /* length of entry (in bytes) */
uchar type; /* filetype */
char name[]; /* filename */
};
|