mirror of
https://github.com/bkerler/edl.git
synced 2024-11-14 11:05:05 -05:00
Merge pull request #528 from bongbui321/faster_setactiveslot
faster setactiveslot
This commit is contained in:
commit
f58350f784
1 changed files with 4 additions and 3 deletions
|
@ -1356,10 +1356,11 @@ class firehose(metaclass=LogBase):
|
|||
|
||||
def cmd_patch_multiple(lun, start_sector, byte_offset, patch_data):
|
||||
offset = 0
|
||||
size_each_patch = 4
|
||||
size_each_patch = 8 if len(patch_data) % 8 == 0 else 4
|
||||
unpack_fmt = "<I" if size_each_patch == 4 else "<Q"
|
||||
write_size = len(patch_data)
|
||||
for i in range(0, write_size, size_each_patch):
|
||||
pdata_subset = int(unpack("<I", patch_data[offset:offset+size_each_patch])[0])
|
||||
pdata_subset = int(unpack(unpack_fmt, patch_data[offset:offset+size_each_patch])[0])
|
||||
self.cmd_patch( lun, start_sector, byte_offset + offset, pdata_subset, size_each_patch, True)
|
||||
offset += size_each_patch
|
||||
return True
|
||||
|
@ -1479,7 +1480,7 @@ class firehose(metaclass=LogBase):
|
|||
_, lun_b, gpt_data_b, guid_gpt_b = resp
|
||||
backup_gpt_data_b, backup_guid_gpt_b = self.get_gpt(lun_b, 0, 0 , 0, guid_gpt_b.header.backup_lba)
|
||||
|
||||
if not check_gpt_hdr:
|
||||
if not check_gpt_hdr and partitionname_a[:3] != "xbl": # xbl partition don't need check consistency
|
||||
sts, gpt_data_a, backup_gpt_data_a = ensure_gpt_hdr_consistency(guid_gpt_a, backup_guid_gpt_a, gpt_data_a, backup_gpt_data_a)
|
||||
if not sts:
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue