mirror of
https://github.com/chenxiaolong/avbroot.git
synced 2026-07-03 14:05:11 +02:00
2928b96f1f
This supports all of the `format::avb` functionality, including repairing dm-verity images. When packing images, all offsets, sizes, digests, hash trees, FEC data, signatures, etc. are automatically recomputed. The goal is that the user can edit any partition image without needing to think about AVB at all. A new `--repair` option has also been added to the `avb verify` command to automatically attempt to all dm-verity images. As a side effect of the changes, RSA2048 keys are now supported. This commit also removes the `Clone` implementation from the `PSeekFile` and `SharedCursor` types. These types use the same underlying file or memory buffer when cloned, allowing parallel threads to read and write files using the normal `Read`/`Write` APIs. The intention is that cloning one of these instances would behave as if a new file handle to the same file was opened. However, the file offset was also copied instead of being set to 0, which is confusing. A new `reopen()` method has been added that explicitly sets the initial offset to 0. Closes: #148 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>