Merge pull request #514 from bongbui321/fix_setinactive

Fix set partitions from active to inactive
This commit is contained in:
Bjoern Kerler 2024-03-08 00:10:23 +01:00 committed by GitHub
commit 2197a27e94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -498,7 +498,7 @@ class gpt(metaclass=LogBase):
if active:
flags |= AB_PARTITION_ATTR_SLOT_ACTIVE << (AB_FLAG_OFFSET*8)
else:
flags &= AB_PARTITION_ATTR_UNBOOTABLE << (AB_FLAG_OFFSET*8)
flags &= ~(AB_PARTITION_ATTR_SLOT_ACTIVE << (AB_FLAG_OFFSET*8))
partentry.flags = flags
pdata = partentry.create()
return pdata, partition.entryoffset