From 7689ab10076dd0ba012194d4fde5225b72f37761 Mon Sep 17 00:00:00 2001 From: bongbui321 Date: Wed, 17 Apr 2024 02:42:52 -0400 Subject: [PATCH] improve setactiveslot --- edlclient/Library/firehose.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/edlclient/Library/firehose.py b/edlclient/Library/firehose.py index 8cf6122..11831f7 100755 --- a/edlclient/Library/firehose.py +++ b/edlclient/Library/firehose.py @@ -1462,7 +1462,12 @@ class firehose(metaclass=LogBase): else: for partitionname_a in guid_gpt_a.partentries: slot = partitionname_a.lower()[-2:] + partition_a = guid_gpt_a.partentries[partitionname_a] if slot == "_a": + active_a = ((partition_a.flags >> (AB_FLAG_OFFSET*8))&0xFF) & AB_PARTITION_ATTR_SLOT_ACTIVE == AB_PARTITION_ATTR_SLOT_ACTIVE + if (active_a and slot_a_status) or (not active_a and slot_b_status): + return True + partitionname_b = partitionname_a[:-1] + "b" if partitionname_b in guid_gpt_a.partentries: lun_b = lun_a