Implement Ext2.Open()
diff --git a/src/filo-fs-ext2.ads b/src/filo-fs-ext2.ads
index 2c30e0a..0deefb6 100644
--- a/src/filo-fs-ext2.ads
+++ b/src/filo-fs-ext2.ads
@@ -66,7 +66,7 @@
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;
+ type Inode_Index is new Unsigned_32 range 2 .. 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
@@ -74,6 +74,7 @@
type Inode_Length is range 0 .. 2 ** 46;
type Inode_Info is record
+ I : Inode_Index;
Mode : Inode_Type := Inode_Type'First;
Size : Inode_Length := 0;
Use_Extents : Boolean := False;
@@ -85,12 +86,13 @@
Part_Len : Partition_Length := 0;
First_Data_Block : FSBlock_Offset := 0;
Block_Size_Bits : Log_Block_Size := 10;
- Inodes_Per_Group : Inode_Index := 1;
+ Inodes_Per_Group : Inode_Index := Inode_Index'First;
Inode_Size : Ext2.Inode_Size := Ext2.Inode_Size'First;
Desc_Size : Ext2.Desc_Size := Ext2.Desc_Size'First;
Feature_Extents : Boolean := False;
Feature_64Bit : Boolean := False;
Inode : Inode_Info := (others => <>);
+ Cur_Dir : Inode_Index := Inode_Index'First;
Block_Cache_Logical : Cache_Label_Logical := (others => False);
Block_Cache_Label : Cache_Label_Array := (others => 0);
Block_Cache : Buffer_Type (Max_Block_Index) := (others => 16#00#);