-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.h
45 lines (32 loc) · 1.08 KB
/
api.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
#include "fs.h"
/* #define DEBUG_BUILD*/
int createDisk(char *file_name);
int initiate_file_system();
int my_write(void *buff, int n,int offset);
int init_inode_table();
int init_db_bmap();
int init_inode_bmap();
int init_superblock();
int initiate_file_system();
int init_root_dir();
/*------------------- get.c ---------------------*/
int my_read(void *buff, int n,int offset);
sb *get_super_block();
db_bmap *get_db_bmap();
inode_bmap *get_inode_bmap();
inode_table *get_inode_table();
inode_bmap *get_inode_bmap();
int get_inode(char *file, int i_index, int size);
/*------------------- entry.c ---------------------*/
int make_entry(char *file_path);
char *strrev(char *str);
/*------------------- write.c ---------------------*/
int filewrite();
unsigned int get_next_offset_to_write(inode *file_inode);
int write_fs();
int set_next_free_block();
int set_next_free_inode_index();
/*------------------- read.c ---------------------*/
int read_file(char *filePath);
int read_file_from_indirect_block(int file_size, inode * file_inode);
int print_data_block(int count, unsigned int offset);