Nico Huber | c6bd3d3 | 2023-11-27 17:13:37 +0100 | [diff] [blame] | 1 | with Interfaces.C; |
| 2 | with System; |
| 3 | |
Thomas Heijligen | 5c43abc | 2023-12-11 15:24:36 +0000 | [diff] [blame^] | 4 | package FILO.Blockdev is |
Nico Huber | c6bd3d3 | 2023-11-27 17:13:37 +0100 | [diff] [blame] | 5 | |
| 6 | Procedure Read |
| 7 | (Buffer : in out Buffer_Type; |
| 8 | Offset : in Natural; |
| 9 | Success : out Boolean); |
| 10 | |
| 11 | private |
| 12 | |
| 13 | function C_devread |
Thomas Heijligen | 5c43abc | 2023-12-11 15:24:36 +0000 | [diff] [blame^] | 14 | (sector : Interfaces.C.unsigned_long; |
Nico Huber | c6bd3d3 | 2023-11-27 17:13:37 +0100 | [diff] [blame] | 15 | byte_offset : Interfaces.C.unsigned_long; |
Thomas Heijligen | 5c43abc | 2023-12-11 15:24:36 +0000 | [diff] [blame^] | 16 | byte_len : Interfaces.C.unsigned_long; |
| 17 | buf : System.Address) |
| 18 | return Interfaces.C.int |
Nico Huber | c6bd3d3 | 2023-11-27 17:13:37 +0100 | [diff] [blame] | 19 | with |
| 20 | SPARK_Mode => Off, |
| 21 | Import => True, |
| 22 | Convention => C, |
| 23 | External_Name => "devopen"; |
| 24 | |
Thomas Heijligen | 5c43abc | 2023-12-11 15:24:36 +0000 | [diff] [blame^] | 25 | end FILO.Blockdev; |