-
Notifications
You must be signed in to change notification settings - Fork 8.5k
drivers: flash: flash_shell.c: Fix parsing of flash read
#101010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
drivers: flash: flash_shell.c: Fix parsing of flash read
#101010
Conversation
This patch runs clang-format on the flash_shell.c file before the real patch gets applied, otherwise the changes would be hard to read. Signed-off-by: Marcelo Roberto Jimenez <[email protected]>
This patch runs clang-format on the shell_flash_test.c file before the real patch gets applied, otherwise the changes would be hard to read. Signed-off-by: Marcelo Roberto Jimenez <[email protected]>
The parsing of the number of bytes to read in the read command was being done in hexadecimal, causing unexpected behavior. Now the number can be interpreted in decimal or hexadecimal if prefixed with 0x. Signed-off-by: Marcelo Roberto Jimenez <[email protected]>
Actually, the parameter is the number of bytes to read, not the number of double words. Signed-off-by: Marcelo Roberto Jimenez <[email protected]>
7dea44d to
33a1342
Compare
|
|
@mrjimenez Would it be possible to log a bug for that and link it to the PR? |
|
I am not sure it would be considered a bug, since the test (which has also been fixed) also expected an hexadecimal number without Fixes #101115 |
de-nordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK.
You have won very nice looking PR number 101010.
Indeed. And in binary, it is 42! 😆 |



The parsing of the number of bytes to read in the read command was being done in hexadecimal, causing unexpected behavior.
Now the number can be interpreted in decimal or hexadecimal if prefixed with 0x.
Also fixes the help test of the
flash readcommand.