Seyshell
Loading...
Searching...
No Matches
src
struct.h
Go to the documentation of this file.
1
2
#pragma once
3
#include "
const.h
"
4
9
typedef
struct
inode
{
10
unsigned
short
perms
;
// rwxrwxrwx
11
char
filetype
;
12
int
blocs
[
MAX_BLOCS
];
13
}
inode
;
14
19
typedef
struct
bloc
{
20
char
datas
[
MAX_BYTES_PER_BLOC
];
21
}
bloc
;
22
27
typedef
struct
disk
{
28
inode
inodes
[
MAX_INODE
];
29
bloc
blocs
[
MAX_BLOCS
];
30
}
disk
;
31
32
// pour 10 inode qui a 30 blocs de chacun 1024 octets, on a 30720 octets, soit
33
// 30,7 Ko sur le disque
const.h
MAX_BYTES_PER_BLOC
#define MAX_BYTES_PER_BLOC
Definition
const.h:4
MAX_BLOCS
#define MAX_BLOCS
Definition
const.h:3
MAX_INODE
#define MAX_INODE
Definition
const.h:5
bloc
Un bloc possède un tableau de données brut concernant des inodes.
Definition
struct.h:19
bloc::datas
char datas[MAX_BYTES_PER_BLOC]
Definition
struct.h:20
disk
Un disque est un liste d'inodes qui pointent sur des blocs de donnée.
Definition
struct.h:27
disk::inodes
inode inodes[MAX_INODE]
Definition
struct.h:28
disk::blocs
bloc blocs[MAX_BLOCS]
Definition
struct.h:29
inode
Un inode est un fichier, il possède des permissions, un type (répertoire par exemple) et pointe sur d...
Definition
struct.h:9
inode::filetype
char filetype
Definition
struct.h:11
inode::blocs
int blocs[MAX_BLOCS]
Definition
struct.h:12
inode::perms
unsigned short perms
Definition
struct.h:10
Generated by
1.9.8