Skip to content

Commit

Permalink
fastboot: Stop if setting NVME value fails
Browse files Browse the repository at this point in the history
Change-Id: I34d4dbece53411c5cceaecc724cc04f1b64577cb
Signed-off-by: Woomymy <[email protected]>
  • Loading branch information
Woomymy authored and mashed-potatoes committed Dec 29, 2023
1 parent 7fecc60 commit b3ca559
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion usrlock/fastboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ def connect(self):
def write_nvme(self, prop: str, data: bytes):
cmd = f"getvar:nve:{prop}@".encode('UTF-8')
cmd += data
ui.debug(f"Sending command: {cmd}")
ui.info(f"Writing {prop}")
result = self.fb_dev.send(cmd)
ui.info(f"Getvar result: {result}")
if not "set nv ok" in result:
ui.error(f"Failed to write {prop}: {result}", critical=True)

def reboot(self):
result = self.fb_dev.reboot()
Expand Down

0 comments on commit b3ca559

Please sign in to comment.