Skip to content

Commit

Permalink
Merge pull request bkerler#484 from JohnSanpe/fixup-qfil
Browse files Browse the repository at this point in the history
qfil: fixed path inconsistency issue when setting bootable
  • Loading branch information
bkerler authored Jan 4, 2024
2 parents ff2c8f2 + 5ebe9b4 commit 31892ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions edlclient/Library/firehose_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ def check_cmd(self, func):
return True
return False

def find_bootable_partition(self, rawprogram):
def find_bootable_partition(self, imagedir, rawprogram):
part = -1
for xml in rawprogram:
with open(xml, "r") as fl:
filename = os.path.join(imagedir, xml)
with open(filename, "r") as fl:
for evt, elem in ET.iterparse(fl, events=["end"]):
if elem.tag == "program":
label = elem.get("label")
Expand Down Expand Up @@ -957,7 +958,8 @@ def handle_firehose(self, cmd, options):
else:
self.warning(f"File : {filename} not found.")
self.info("[qfil] patching ok")
bootable = self.find_bootable_partition(rawprogram)

bootable = self.find_bootable_partition(imagedir, rawprogram)
if bootable != -1:
if self.firehose.cmd_setbootablestoragedrive(bootable):
self.info("[qfil] partition({partition}) is now bootable\n".format(partition=bootable))
Expand Down

0 comments on commit 31892ae

Please sign in to comment.