blob: 5f0bd5bb14dc6551f69ce72b4615d0d8fcb5049e [file] [log] [blame]
Thomas Heijligen51820372023-12-11 15:29:17 +00001with Interfaces.C;
2with Interfaces.C.Strings;
3with System;
4
5package FILO.FS.NullFS is
6 type NullFS_Type is private;
7
8
9 procedure Mount
10 (Item : in out NullFS_Type;
11 Success : out Boolean);
12
13 procedure Open
14 (Item : in out NullFS_Type;
15 Path : in String;
16 Success : out Boolean);
17
18 procedure Read
19 (Item : in out NullFS_Type;
20 Buffer : in out Buffer_Type;
21 Offset : in Natural;
22 Success : out Boolean);
23
24 procedure Close
25 (Item : in out NullFS_Type;
26 Success : out Boolean);
27
28 ---------------------------------------------------------------------
29
30 function C_Mount return Interfaces.C.int
31 with
32 Export,
33 Convention => C,
34 External_Name => "nullfs_mount";
35
36 function C_Read
37 (buf : System.Address;
38 len : Interfaces.C.int)
39 return Interfaces.C.int
40 with
41 Export,
42 Convention => C,
43 External_Name => "nullfs_read";
44
45 function C_Dir
46 (Path : Interfaces.C.Strings.chars_ptr)
47 return Interfaces.C.int
48 with
49 Export,
50 Convention => C,
51 External_Name => "nullfs_dir";
52
53 function C_Close return Interfaces.C.int
54 with
55 Export,
56 Convention => C,
57 External_Name => "nullfs_close";
58
59private
60 type State_Type is (Unmounted, Mounted, File_Open);
61
62 type NullFS_Type is record
63 State : State_Type;
64 end record;
65
66end FILO.FS.NullFS;