Class: Ext4::GroupDescriptorEntry
- Inherits:
-
Object
- Object
- Ext4::GroupDescriptorEntry
- Defined in:
- lib/fs/ext4/group_descriptor_entry.rb
Overview
//////////////////////////////////////////////////////////////////////////// // Class.
Instance Attribute Summary collapse
-
#blockAllocBmp ⇒ Object
Returns the value of attribute blockAllocBmp.
-
#inodeAllocBmp ⇒ Object
Returns the value of attribute inodeAllocBmp.
Instance Method Summary collapse
-
#blockBmp ⇒ Object
//////////////////////////////////////////////////////////////////////////// // Class helpers & accessors.
-
#dump ⇒ Object
Dump object.
-
#initialize(buf) ⇒ GroupDescriptorEntry
constructor
A new instance of GroupDescriptorEntry.
- #inodeBmp ⇒ Object
- #inodeTable ⇒ Object
- #numDirs ⇒ Object
Constructor Details
#initialize(buf) ⇒ GroupDescriptorEntry
Returns a new instance of GroupDescriptorEntry.
28 29 30 31 32 33 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 28 def initialize(buf) raise "Ext4::GroupDescriptorEntry.initialize: Nil buffer" if buf.nil? # Decode the group descriptor table entry. @gde = GDE.decode(buf) end |
Instance Attribute Details
#blockAllocBmp ⇒ Object
Returns the value of attribute blockAllocBmp.
26 27 28 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 26 def blockAllocBmp @blockAllocBmp end |
#inodeAllocBmp ⇒ Object
Returns the value of attribute inodeAllocBmp.
26 27 28 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 26 def inodeAllocBmp @inodeAllocBmp end |
Instance Method Details
#blockBmp ⇒ Object
//////////////////////////////////////////////////////////////////////////// // Class helpers & accessors.
38 39 40 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 38 def blockBmp @gde['blk_bmp'] end |
#dump ⇒ Object
Dump object.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 58 def dump out = "\#<#{self.class}:0x#{'%08x' % object_id}>\n" out += "Block bitmap : 0x#{'%08x' % @gde['blk_bmp']}\n" out += "Inode bitmap : 0x#{'%08x' % @gde['inode_bmp']}\n" out += "Inode table : 0x#{'%08x' % @gde['inode_table']}\n" out += "Unallocated blocks: 0x#{'%04x' % @gde['unalloc_blks']}\n" out += "Unallocated inodes: 0x#{'%04x' % @gde['unalloc_inodes']}\n" out += "Num directories : 0x#{'%04x' % @gde['num_dirs']}\n" out end |
#inodeBmp ⇒ Object
42 43 44 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 42 def inodeBmp @gde['inode_bmp'] end |
#inodeTable ⇒ Object
46 47 48 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 46 def inodeTable @gde['inode_table'] end |
#numDirs ⇒ Object
50 51 52 |
# File 'lib/fs/ext4/group_descriptor_entry.rb', line 50 def numDirs @gde['num_dirs'] end |