-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update ext4 and dmverity superblock parsing logic
Add another `ReadExt4SuperBlockReadSeeker` implementation to work with `io.ReadSeeker` in addition to working with files directly. This way we'll be able to work with e.g. ext4 GPT partitions. The existing `ReadExt4SuperBlock` works the same, but has been updated to call `ReadExt4SuperBlockReadSeeker`. Add `ReadDMVerityInfoReader` that reads dmverity superblock from an `io.Reader` and update `ReadDMVerityInfo` accordingly. Additionally write verity superblock directly without `io.SeekEnd`, assumming that the writer is already set at correct offset. `ComputeAndWriteHashDevice` parameters have been updated accordingly. Add `Ext4FileSystemSize` function that reads ext4 superblock from a given `io.ReadSeeker` and returns the underlying ext4 filesystem size and its superblock. Signed-off-by: Maksim An <maksiman@microsoft.com>
- Loading branch information
Showing
3 changed files
with
74 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters