Trying to use a non-zero offset on a Volume completely fails as Ext4Struct refers to the volume's backing stream directly, bypassing the whole point of a Volume being a file-like object, resulting in non-offset reads.
|
self.volume.stream.seek(self.offset) |
|
data = self.volume.stream.read(sizeof(self)) |
In my specific case, I end up with ext4.struct.MagicError: <ext4.superblock.Superblock object at 0x71660e6901d0> magic bytes do not match! expected=0xEF53, actual=0x6C, where 0x6C is the first UCS-2 character of "loader", a partition name in my GPT disk image.
Trying to use a non-zero offset on a
Volumecompletely fails asExt4Structrefers to the volume's backing stream directly, bypassing the whole point of a Volume being a file-like object, resulting in non-offset reads.python-ext4/ext4/struct.py
Lines 44 to 45 in 44af8ef
In my specific case, I end up with
ext4.struct.MagicError: <ext4.superblock.Superblock object at 0x71660e6901d0> magic bytes do not match! expected=0xEF53, actual=0x6C, where 0x6C is the first UCS-2 character of "loader", a partition name in my GPT disk image.