Add NullFS
Signed-off-by: Thomas Heijligen <src@posteo.de>
diff --git a/src/filo-fs-nullfs.ads b/src/filo-fs-nullfs.ads
index 5f0bd5b..95b6d16 100644
--- a/src/filo-fs-nullfs.ads
+++ b/src/filo-fs-nullfs.ads
@@ -3,38 +3,15 @@
with System;
package FILO.FS.NullFS is
- type NullFS_Type is private;
-
-
- procedure Mount
- (Item : in out NullFS_Type;
- Success : out Boolean);
-
- procedure Open
- (Item : in out NullFS_Type;
- Path : in String;
- Success : out Boolean);
-
- procedure Read
- (Item : in out NullFS_Type;
- Buffer : in out Buffer_Type;
- Offset : in Natural;
- Success : out Boolean);
-
- procedure Close
- (Item : in out NullFS_Type;
- Success : out Boolean);
-
- ---------------------------------------------------------------------
-
+ -- noop init
function C_Mount return Interfaces.C.int
with
Export,
Convention => C,
External_Name => "nullfs_mount";
- function C_Read
- (buf : System.Address;
+ function C_Read -- read from blockdev
+ (buf : System.Address; -- char*
len : Interfaces.C.int)
return Interfaces.C.int
with
@@ -42,25 +19,12 @@
Convention => C,
External_Name => "nullfs_read";
- function C_Dir
- (Path : Interfaces.C.Strings.chars_ptr)
+ function C_Dir -- noop like open
+ (Path : System.Address) -- char*
return Interfaces.C.int
with
Export,
Convention => C,
External_Name => "nullfs_dir";
- function C_Close return Interfaces.C.int
- with
- Export,
- Convention => C,
- External_Name => "nullfs_close";
-
-private
- type State_Type is (Unmounted, Mounted, File_Open);
-
- type NullFS_Type is record
- State : State_Type;
- end record;
-
end FILO.FS.NullFS;