Nico Huber | 3a5cd8c | 2023-11-27 17:38:06 +0100 | [diff] [blame] | 1 | with Interfaces; |
| 2 | with Interfaces.C; |
| 3 | |
| 4 | use Interfaces.C; |
| 5 | |
Thomas Heijligen | d1e0457 | 2023-11-27 14:28:55 +0000 | [diff] [blame] | 6 | package FS.FILO is |
| 7 | |
Nico Huber | 3a5cd8c | 2023-11-27 17:38:06 +0100 | [diff] [blame] | 8 | type Partition_Length is range 0 .. Interfaces.Unsigned_64'Last; |
Nico Huber | 3e72282 | 2023-12-04 15:27:40 +0100 | [diff] [blame] | 9 | subtype Partition_Offset is Partition_Length range 0 .. Partition_Length'Last - 1; |
Nico Huber | 3a5cd8c | 2023-11-27 17:38:06 +0100 | [diff] [blame] | 10 | |
Nico Huber | 26f7183 | 2023-12-05 16:26:56 +0100 | [diff] [blame^] | 11 | BLOCK_SIZE : constant := 512; |
| 12 | type Block_Offset is range 0 .. Partition_Offset'Last / BLOCK_SIZE; |
| 13 | |
Nico Huber | 3a5cd8c | 2023-11-27 17:38:06 +0100 | [diff] [blame] | 14 | type File_Length is range 0 .. int'Last; -- Should be higher, fix FILO first |
Nico Huber | f983931 | 2023-12-04 15:20:43 +0100 | [diff] [blame] | 15 | subtype File_Offset is File_Length; |
Nico Huber | 3a5cd8c | 2023-11-27 17:38:06 +0100 | [diff] [blame] | 16 | |
Nico Huber | 51f6041 | 2023-12-04 14:48:11 +0100 | [diff] [blame] | 17 | private |
| 18 | function Part_Len return Partition_Length; |
| 19 | |
Nico Huber | 3a5cd8c | 2023-11-27 17:38:06 +0100 | [diff] [blame] | 20 | 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 Heijligen | d1e0457 | 2023-11-27 14:28:55 +0000 | [diff] [blame] | 26 | end FS.FILO; |