ext2: Factor inode-group deserialization out
diff --git a/src/filo-fs-ext2.ads b/src/filo-fs-ext2.ads
index 6003198..5e6b641 100644
--- a/src/filo-fs-ext2.ads
+++ b/src/filo-fs-ext2.ads
@@ -74,7 +74,7 @@
type Inode_0_Index is new Unsigned_32;
subtype Inode_Index is Inode_0_Index range 2 .. Inode_0_Index'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
+ subtype Group_Desc_Size is Positive range 32 .. 2 ** 15; -- power-of-2 that fits in 16 bits
type Inode_Type is (Dir, Regular, Link, Fast_Link);
type Inode_Length is range 0 .. 2 ** 46;
@@ -89,8 +89,8 @@
type Group_Index is new Inode_0_Index;
subtype Group_In_Block_Count is Group_Index
- range 1 .. Group_Index (Block_Size'Last / Desc_Size'First);
- type Desc_In_Block_Index is new Natural range 0 .. Natural (Group_In_Block_Count'Last - 1);
+ range 1 .. Group_Index (Block_Size'Last / Group_Desc_Size'First);
+ type Group_In_Block_Index is new Natural range 0 .. Natural (Group_In_Block_Count'Last - 1);
subtype Inode_In_Group_Count is Inode_0_Index range 1 .. Inode_0_Index'Last;
type Inode_In_Group_Index is new Inode_0_Index range 0 .. Inode_In_Group_Count'Last - 1;
@@ -106,8 +106,8 @@
Inodes_Per_Group : Inode_In_Group_Count := Inode_In_Group_Count'First;
Inode_Size : Ext2.Inode_Size := Ext2.Inode_Size'First;
Inodes_Per_Block : Inode_In_Block_Count := Inode_In_Block_Count'First;
- Desc_Size : Ext2.Desc_Size := Ext2.Desc_Size'First;
- Desc_Per_Block : Group_In_Block_Count := Group_In_Block_Count'First;
+ Group_Desc_Size : Ext2.Group_Desc_Size := Ext2.Group_Desc_Size'First;
+ Group_Desc_Per_Block : Group_In_Block_Count := Group_In_Block_Count'First;
Feature_Extents : Boolean := False;
Feature_64Bit : Boolean := False;
end record;