ext2: Implement Open() for an inode by number
diff --git a/src/filo-fs-ext2.ads b/src/filo-fs-ext2.ads
index fbe6a35..03c05a9 100644
--- a/src/filo-fs-ext2.ads
+++ b/src/filo-fs-ext2.ads
@@ -65,11 +65,13 @@
subtype Inode_Extents_Index is Natural range 0 .. 59;
subtype Inode_Extents is Buffer_Type (Inode_Extents_Index);
+ type Inode_Index is new Unsigned_32 range 1 .. Unsigned_32'Last;
subtype Inode_Size is Positive range 128 .. Positive (Unsigned_16'Last);
subtype Desc_Size is Positive range 32 .. 2 ** 15; -- power-of-2 that fits in 16 bits
type Inode_Info is record
- Extents : Buffer_Type (Inode_Extents_Index) := (others => 16#00#);
+ Use_Extents : Boolean := False;
+ Extents : Buffer_Type (Inode_Extents_Index) := (others => 16#00#);
end record;
type T is record
@@ -77,7 +79,7 @@
Part_Len : Partition_Length := 0;
First_Data_Block : FSBlock_Offset := 0;
Block_Size_Bits : Log_Block_Size := 10;
- Inodes_Per_Group : Positive := 1;
+ Inodes_Per_Group : Inode_Index := 1;
Inode_Size : Ext2.Inode_Size := Ext2.Inode_Size'First;
Desc_Size : Ext2.Desc_Size := Ext2.Desc_Size'First;
Feature_Extents : Boolean := False;