-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinode.h
37 lines (33 loc) · 927 Bytes
/
inode.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
#include <stdint.h>
struct direct_blk {
int32_t seg_num;
int32_t blk_num;
};
typedef struct inode {
uint32_t ino; // inode number
uint32_t size;
struct direct_blk direct[500];
} inode;
typedef struct filetype {
int valid;
char test[10];
char path[100];
char name[100]; //name
inode *inum; //inode number
struct filetype ** children;
int num_children;
int num_links;
struct filetype * parent;
char type[20]; //==file extension
mode_t permissions; // Permissions
uid_t user_id; // userid
gid_t group_id; // groupid
time_t a_time; // Access time
time_t m_time; // Modified time
time_t c_time; // Status change time
time_t b_time; // Creation time
off_t size; // Size of the node
int datablocks[16];
int number;
int blocks;
} filetype;