mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-15 19:08:07 +00:00
core/sd_salt: fix bug introduced in ede1a0bae3
This commit is contained in:
parent
04466402ce
commit
adbec13779
@ -120,9 +120,9 @@ async def request_sd_salt(
|
|||||||
|
|
||||||
|
|
||||||
async def set_sd_salt(
|
async def set_sd_salt(
|
||||||
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes, filename: str = "salt"
|
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes, new: bool = False
|
||||||
) -> None:
|
) -> None:
|
||||||
salt_path = _get_salt_path()
|
salt_path = _get_salt_path(new)
|
||||||
|
|
||||||
sd = io.SDCard()
|
sd = io.SDCard()
|
||||||
if not sd.power(True):
|
if not sd.power(True):
|
||||||
@ -146,7 +146,7 @@ async def set_sd_salt(
|
|||||||
async def stage_sd_salt(
|
async def stage_sd_salt(
|
||||||
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes
|
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes
|
||||||
) -> None:
|
) -> None:
|
||||||
await set_sd_salt(ctx, salt, salt_tag, "salt.new")
|
await set_sd_salt(ctx, salt, salt_tag, True)
|
||||||
|
|
||||||
|
|
||||||
async def commit_sd_salt(ctx: Optional[wire.Context]) -> None:
|
async def commit_sd_salt(ctx: Optional[wire.Context]) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user