ext2: Introduce State.Block_Size
diff --git a/src/filo-fs-ext2.ads b/src/filo-fs-ext2.ads
index 32b1940..ba47aef 100644
--- a/src/filo-fs-ext2.ads
+++ b/src/filo-fs-ext2.ads
@@ -45,6 +45,7 @@
-- maximum block size is 64KiB (2^16):
subtype Log_Block_Size is Positive range 10 .. 16;
+ subtype Block_Size is Natural range 2 ** Log_Block_Size'First .. 2 ** Log_Block_Size'Last;
subtype Max_Block_Index is Index_Type range 0 .. 2 ** Log_Block_Size'Last - 1;
-- Minimum ext2 block size is 1KiB (two 512B blocks)
@@ -85,7 +86,8 @@
S : State;
Part_Len : Partition_Length := 0;
First_Data_Block : FSBlock_Offset := 0;
- Block_Size_Bits : Log_Block_Size := 10;
+ Block_Size_Bits : Log_Block_Size := Log_Block_Size'First;
+ Block_Size : Ext2.Block_Size := Ext2.Block_Size'First;
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;