diff mbox series

[05/10] ext2: Rename group-desc-size

Message ID 20191231030457.5873-6-aik@ozlabs.ru
State Accepted
Headers show
Series ext4, gpt, LE ELF | expand

Commit Message

Alexey Kardashevskiy Dec. 31, 2019, 3:04 a.m. UTC
A le32 value at 0x20 offset in supernode is:
0x20 	__le32 	s_blocks_per_group 	Blocks per group

Size of group descriptors is a le16 value at 0xfe.

Rename group-desc-size according to the ext2/4 spec.

This should cause no behavioral change.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 slof/fs/packages/ext2-files.fs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/slof/fs/packages/ext2-files.fs b/slof/fs/packages/ext2-files.fs
index 392615d17d57..055e636023ff 100644
--- a/slof/fs/packages/ext2-files.fs
+++ b/slof/fs/packages/ext2-files.fs
@@ -16,7 +16,7 @@  INSTANCE VARIABLE inode-size
 INSTANCE VARIABLE block-size
 INSTANCE VARIABLE inodes/group
 
-INSTANCE VARIABLE group-desc-size
+INSTANCE VARIABLE blocks-per-group
 INSTANCE VARIABLE group-descriptors
 
 : seek  s" seek" $call-parent ;
@@ -128,11 +128,11 @@  CREATE mode-chars 10 allot s" ?pc?d?b?-?l?s???" mode-chars swap move
   ELSE
      data @ 58 + w@-le inode-size !
   THEN
-  data @ 20 + l@-le group-desc-size !
+  data @ 20 + l@-le blocks-per-group !
 
   \ Read the group descriptor table:
   first-block @ 1+ block-size @ *
-  group-desc-size @
+  blocks-per-group @
   read-data
   data @ group-descriptors !
 
@@ -189,7 +189,7 @@  INSTANCE VARIABLE current-pos
 
 : close
    inode @ inode-size @ free-mem
-   group-descriptors @ group-desc-size @ free-mem
+   group-descriptors @ blocks-per-group @ free-mem
    free-data
    blocks @ ?dup IF #blocks @ 4 * free-mem THEN
 ;