-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
29 lines (21 loc) · 694 Bytes
/
main.c
File metadata and controls
29 lines (21 loc) · 694 Bytes
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
#include <stdio.h>
#include <string.h>
#include "mfs.h"
int main(int argc, char *argv[]) {
int rc = MFS_Init("localhost", 10000);
printf("init %d\n", rc);
// rc = MFS_Creat(0, MFS_REGULAR_FILE, "testfile");
// int inum = MFS_Lookup(0, "testfile");
// printf("Inum: %d\n", inum);
// char* buffer = "abcd";
// MFS_Write(inum, buffer, 0, 4);
// int new_inum = MFS_Lookup(0, "testfile");
// printf("Inum: %d\n", inum);
//rc = MFS_Unlink(inum,"testfile");
rc = MFS_Shutdown();
printf("shut %d\n", rc);
// rc = MFS_Init("localhost", 10000);
// new_inum = MFS_Lookup(0, "testfile");
// printf("Inum: %d\n", inum);
return 0;
}