Move fs-filo to filo-fs
Signed-off-by: Thomas Heijligen <src@posteo.de>
diff --git a/src/fs-filo-dev.adb b/src/filo-blockdev.adb
similarity index 93%
rename from src/fs-filo-dev.adb
rename to src/filo-blockdev.adb
index 97c7d1b..28747e7 100644
--- a/src/fs-filo-dev.adb
+++ b/src/filo-blockdev.adb
@@ -1,4 +1,4 @@
-package body FS.FILO.Dev is
+package body FILO.Blockdev is
procedure Read
(Buffer : in out Buffer_Type;
@@ -20,4 +20,4 @@
Success := To_Success (C_devread (Sector, Byte_Offset, Byte_Len, Buf));
end Read;
-end FS.FILO.Dev;
+end FILO.Blockdev;
diff --git a/src/fs-filo-dev.ads b/src/filo-blockdev.ads
similarity index 64%
rename from src/fs-filo-dev.ads
rename to src/filo-blockdev.ads
index 43a05ad..d35eef3 100644
--- a/src/fs-filo-dev.ads
+++ b/src/filo-blockdev.ads
@@ -1,7 +1,7 @@
with Interfaces.C;
with System;
-package FS.FILO.Dev is
+package FILO.Blockdev is
Procedure Read
(Buffer : in out Buffer_Type;
@@ -11,16 +11,15 @@
private
function C_devread
- (sector : Interfaces.C.unsigned_long;
+ (sector : Interfaces.C.unsigned_long;
byte_offset : Interfaces.C.unsigned_long;
- byte_len : Interfaces.C.unsigned_long;
- buf : System.Address)
- return Interfaces.C.int
+ byte_len : Interfaces.C.unsigned_long;
+ buf : System.Address)
+ return Interfaces.C.int
with
SPARK_Mode => Off,
Import => True,
Convention => C,
External_Name => "devopen";
-
-end FS.FILO.Dev;
+end FILO.Blockdev;
diff --git a/src/fs-filo-ext2.adb b/src/filo-fs-ext2.adb
similarity index 97%
rename from src/fs-filo-ext2.adb
rename to src/filo-fs-ext2.adb
index d0054da..7bd2c15 100644
--- a/src/fs-filo-ext2.adb
+++ b/src/filo-fs-ext2.adb
@@ -12,12 +12,12 @@
with Interfaces.C;
with Interfaces.C.Strings;
-with FS.FILO.Dev;
-with FS.FILO.VFS;
+with FILO.Blockdev;
+with FILO.FS.VFS;
use Interfaces.C;
-package body FS.FILO.Ext2 is
+package body FILO.FS.Ext2 is
function Is_Mounted (State : T) return Boolean is (State.S >= Mounted);
function Is_Open (State : T) return Boolean is (State.S = File_Opened);
@@ -45,7 +45,7 @@
return;
end if;
- Dev.Read (Super_Block, 1 * SUPERBLOCK_SIZE, Success);
+ Blockdev.Read (Super_Block, 1 * SUPERBLOCK_SIZE, Success);
if not Success then
return;
end if;
@@ -198,4 +198,4 @@
return C.C_Read (Buf, Len);
end C_Read;
-end FS.FILO.Ext2;
+end FILO.FS.Ext2;
diff --git a/src/fs-filo-ext2.ads b/src/filo-fs-ext2.ads
similarity index 97%
rename from src/fs-filo-ext2.ads
rename to src/filo-fs-ext2.ads
index 32e31fe..b26b103 100644
--- a/src/fs-filo-ext2.ads
+++ b/src/filo-fs-ext2.ads
@@ -1,4 +1,4 @@
-package FS.FILO.Ext2 is
+package FILO.FS.Ext2 is
type T is private;
@@ -60,4 +60,4 @@
Feature_64Bit : Boolean := False;
end record;
-end FS.FILO.Ext2;
+end FILO.FS.Ext2;
diff --git a/src/fs-filo-vfs.adb b/src/filo-fs-vfs.adb
similarity index 93%
rename from src/fs-filo-vfs.adb
rename to src/filo-fs-vfs.adb
index 2c75549..838cddf 100644
--- a/src/fs-filo-vfs.adb
+++ b/src/filo-fs-vfs.adb
@@ -3,7 +3,7 @@
use Interfaces.C;
-package body FS.FILO.VFS
+package body FILO.FS.VFS
with
SPARK_Mode => Off
is
@@ -50,7 +50,7 @@
Convention => C,
Address => Buf;
- File_Pos : File_Offset := FILO.File_Pos;
+ File_Pos : File_Offset := FILO.FS.File_Pos;
Read_Len : Natural;
begin
if Is_Open (State) then
@@ -62,4 +62,4 @@
return int (Read_Len);
end C_Read;
-end FS.FILO.VFS;
+end FILO.FS.VFS;
diff --git a/src/fs-filo-vfs.ads b/src/filo-fs-vfs.ads
similarity index 97%
rename from src/fs-filo-vfs.ads
rename to src/filo-fs-vfs.ads
index 7a2aabb..500c77b 100644
--- a/src/fs-filo-vfs.ads
+++ b/src/filo-fs-vfs.ads
@@ -51,7 +51,7 @@
Pre => Is_Open (State),
Post => Is_Open (State);
-package FS.FILO.VFS
+package FILO.FS.VFS
with
Convention => C
is
@@ -63,4 +63,4 @@
function C_Read (Buf : System.Address; Len : int) return int;
-end FS.FILO.VFS;
+end FILO.FS.VFS;
diff --git a/src/fs-filo.adb b/src/filo-fs.adb
similarity index 96%
rename from src/fs-filo.adb
rename to src/filo-fs.adb
index 20162fc..413a049 100644
--- a/src/fs-filo.adb
+++ b/src/filo-fs.adb
@@ -2,7 +2,7 @@
use Interfaces.C;
-package body FS.FILO is
+package body FILO.FS is
C_Part_Length : unsigned_long
with
@@ -52,4 +52,4 @@
C_File_Pos := int (Off);
end Set_File_Pos;
-end FS.FILO;
+end FILO.FS;
diff --git a/src/fs-filo.ads b/src/filo-fs.ads
similarity index 95%
rename from src/fs-filo.ads
rename to src/filo-fs.ads
index dfd0403..1ed5cf5 100644
--- a/src/fs-filo.ads
+++ b/src/filo-fs.ads
@@ -3,7 +3,7 @@
use Interfaces.C;
-package FS.FILO is
+package FILO.FS is
type Partition_Length is range 0 .. Interfaces.Unsigned_64'Last;
subtype Partition_Offset is Partition_Length range 0 .. Partition_Length'Last - 1;
@@ -23,4 +23,4 @@
function File_Pos return File_Offset;
procedure Set_File_Pos (Off : File_Offset);
-end FS.FILO;
+end FILO.FS;
diff --git a/src/fs.ads b/src/filo.ads
similarity index 96%
rename from src/fs.ads
rename to src/filo.ads
index 600dc53..b85fa19 100644
--- a/src/fs.ads
+++ b/src/filo.ads
@@ -2,7 +2,7 @@
use Interfaces;
-package FS is
+package FILO is
subtype Index_Type is Natural range 0 .. Natural'Last - 1;
subtype Index_Type16 is Index_Type range 0 .. Index_Type'Last - 1;
@@ -25,4 +25,4 @@
with
Pre => Buf'First <= Off and Off + 3 <= Buf'Last;
-end FS;
+end FILO;