-
Notifications
You must be signed in to change notification settings - Fork 0
/
myfilesystem.h
36 lines (22 loc) · 968 Bytes
/
myfilesystem.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
https://powcoder.com
代写代考加微信 powcoder
Assignment Project Exam Help
Add WeChat powcoder
#ifndef MYFILESYSTEM_H
#define MYFILESYSTEM_H
#include <sys/types.h>
#include <stdint.h>
void * init_fs(char * f1, char * f2, char * f3, int n_processors);
void close_fs(void * helper);
int create_file(char * filename, size_t length, void * helper);
int resize_file(char * filename, size_t length, void * helper);
void repack(void * helper);
int delete_file(char * filename, void * helper);
int rename_file(char * oldname, char * newname, void * helper);
int read_file(char * filename, size_t offset, size_t count, void * buf, void * helper);
int write_file(char * filename, size_t offset, size_t count, void * buf, void * helper);
ssize_t file_size(char * filename, void * helper);
void fletcher(uint8_t * buf, size_t length, uint8_t * output);
void compute_hash_tree(void * helper);
void compute_hash_block(size_t block_offset, void * helper);
#endif