blob: dfd04034b6e0fd4fbcec01ffab1c11eb861f0275 [file] [log] [blame]
Nico Huber3a5cd8c2023-11-27 17:38:06 +01001with Interfaces;
2with Interfaces.C;
3
4use Interfaces.C;
5
Thomas Heijligend1e04572023-11-27 14:28:55 +00006package FS.FILO is
7
Nico Huber3a5cd8c2023-11-27 17:38:06 +01008 type Partition_Length is range 0 .. Interfaces.Unsigned_64'Last;
Nico Huber3e722822023-12-04 15:27:40 +01009 subtype Partition_Offset is Partition_Length range 0 .. Partition_Length'Last - 1;
Nico Huber3a5cd8c2023-11-27 17:38:06 +010010
Nico Huber26f71832023-12-05 16:26:56 +010011 BLOCK_SIZE : constant := 512;
12 type Block_Offset is range 0 .. Partition_Offset'Last / BLOCK_SIZE;
13
Nico Huber3a5cd8c2023-11-27 17:38:06 +010014 type File_Length is range 0 .. int'Last; -- Should be higher, fix FILO first
Nico Huberf9839312023-12-04 15:20:43 +010015 subtype File_Offset is File_Length;
Nico Huber3a5cd8c2023-11-27 17:38:06 +010016
Nico Huber51f60412023-12-04 14:48:11 +010017private
18 function Part_Len return Partition_Length;
19
Nico Huber3a5cd8c2023-11-27 17:38:06 +010020 function File_Max return File_Length;
21 procedure Set_File_Max (Len : File_Length);
22
23 function File_Pos return File_Offset;
24 procedure Set_File_Pos (Off : File_Offset);
25
Thomas Heijligend1e04572023-11-27 14:28:55 +000026end FS.FILO;