-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinode.h
27 lines (19 loc) · 833 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
#ifndef INODE_H
#define INODE_H
// return the # of inode which is available
// return -1 means there is an error
// return -2 means there is no available inode
int FindNextAvailableInodeBlock();
int FindNextAvailableDataBlock();
int ChangeInodeBitmapStatus(int inodeIndex, int status);
int ChangeDataBitmapStatus(int dataIndex, int status);
//Convert Bitmap to Bytemap and vice versa
int ConvertBitmapToBytemap(char* bitmap, char* bytemap);
int ConvertBytemapToBitmap(char* bitmap, char* bytemap);
// Place an inode in correct block
// inodeData must be 128 Byte
int WriteInodeInSector ( int inodeNumber , char* inodeData);
int ReadInode(int inodeNumber, char* inodeData);
int isDirectoryInode (char *inode);
int UpdateInodeDataSectorNumber(int inodeNumber,int index, int value);
#endif // INODE_H