mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix incorrect opcode setting on backup
This commit is contained in:
parent
44d3c19733
commit
89d050891b
1 changed files with 3 additions and 3 deletions
|
|
@ -503,6 +503,7 @@ def check_header(backup):
|
||||||
i += 4
|
i += 4
|
||||||
header_total_size = int.from_bytes(backup[i:i+4], 'little')
|
header_total_size = int.from_bytes(backup[i:i+4], 'little')
|
||||||
print("Header total length in bytes: {}".format(header_total_size))
|
print("Header total length in bytes: {}".format(header_total_size))
|
||||||
|
i += 4
|
||||||
i += 36 # reserved
|
i += 36 # reserved
|
||||||
|
|
||||||
if backup_version == 0x10001:
|
if backup_version == 0x10001:
|
||||||
|
|
@ -527,10 +528,9 @@ def check_header(backup):
|
||||||
|
|
||||||
# TODO: checksums on data region
|
# TODO: checksums on data region
|
||||||
|
|
||||||
backup[i:i+4] = (2).to_bytes(4, 'little')
|
|
||||||
op = int.from_bytes(backup[i:i+4], 'little')
|
op = int.from_bytes(backup[i:i+4], 'little')
|
||||||
print("Opcode (should be 2, to trigger the next phase of restore): {}".format(op))
|
print("Opcode (should be 0): {}".format(op))
|
||||||
if op != 2:
|
if op != 0:
|
||||||
print("Opcode is incorrect.")
|
print("Opcode is incorrect.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue