mirror of
https://github.com/mashed-potatoes/PotatoNV-crossplatform.git
synced 2024-09-19 20:51:26 +02:00
fastboot: Stop if setting NVME value fails
Change-Id: I34d4dbece53411c5cceaecc724cc04f1b64577cb Signed-off-by: Woomymy <woomy@woomy.be>
This commit is contained in:
parent
7fecc60958
commit
b3ca559853
1 changed files with 4 additions and 1 deletions
|
@ -24,8 +24,11 @@ class Fastboot:
|
|||
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()
|
||||
|
|
Loading…
Reference in a new issue