Merge pull request #34 from steadfasterX/hotfix/extractpartitions-typos

fix: typos preventing extract-partitions to work!
This commit is contained in:
Peter Wu 2017-12-13 01:14:44 +00:00 committed by GitHub
commit b9ade65d48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,8 +25,8 @@ parser.add_argument("--skip-hello", action="store_true",
def dump_partitions(comm, disk_fd, outdir, max_size): def dump_partitions(comm, disk_fd, outdir, max_size):
diskinfo = partitions.get_partitions(comm, disk_fd) diskinfo = partitions.get_partitions(comm, disk_fd)
for part in diskinfo.gpt.partitions: for part in diskinfo.gpt.partitions:
part_offset = part.first_bla * partitions.BLOCK_SIZE part_offset = part.first_lba * partitions.BLOCK_SIZE
part_size = (part.last_lba - part.first_bla) * partitions.BLOCK_SIZE part_size = (part.last_lba - part.first_lba) * partitions.BLOCK_SIZE
part_name = part.name part_name = part.name
part_label = "/dev/mmcblk0p%i" % part.index part_label = "/dev/mmcblk0p%i" % part.index
if max_size and part_size > max_size: if max_size and part_size > max_size: