fix: Make blisp check for existing file before flashing#69
Merged
gamelaster merged 1 commit intopine64:masterfrom Dec 1, 2024
Merged
Conversation
fe7d76a to
d01d3de
Compare
This commit adds a simple check to both blisp commands that checks the
passed firmware .bin file exists, and is readable.
Justification: I flashed my Pinecil V2 that arrived today, and
misspelled the filename. blisp erased flash, and then exited - it did
not check the firmware .bin was readable/accessible, which meant my
Pinecil was soft-bricked.
I have tested the change, and it works for both commands when the input
file isn't readable.
I had to declare the `cmd_{iot,write}_args_print_glossary` function as
static before the call, so that we don't use undeclared functions before
we call them.
Signed-off-by: Dom Rodriguez <[email protected]>
d01d3de to
fb09967
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a simple check to both blisp commands that checks the
passed firmware .bin file exists, and is readable.
Justification: I flashed my Pinecil V2 that arrived today, and
misspelled the filename. blisp erased flash, and then exited - it did
not check the firmware .bin was readable/accessible, which meant my
Pinecil was soft-bricked.
I have tested the change, and it works for both commands when the input
file isn't readable.
I had to declare the
cmd_{iot,write}_args_print_glossaryfunction asstatic before the call, so that we don't use undeclared functions before
we call them.
Signed-off-by: Dom Rodriguez [email protected]