-
Notifications
You must be signed in to change notification settings - Fork 644
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
[nrf fromtre] mcumgr/img_mgmt: CONFIG_MCUBOOT_BOOTLOADER_NO_DOWNGRADE fixes #1662
[nrf fromtre] mcumgr/img_mgmt: CONFIG_MCUBOOT_BOOTLOADER_NO_DOWNGRADE fixes #1662
Conversation
@@ -471,7 +471,7 @@ os_mgmt_bootloader_info(struct smp_streamer *ctxt) | |||
zcbor_int32_put(zse, BOOTLOADER_MODE); | |||
#if IS_ENABLED(MCUBOOT_BOOTLOADER_NO_DOWNGRADE) | |||
ok = zcbor_tstr_put_lit(zse, "no-downgrade") && | |||
zcbor_bool_encode(zse, true); | |||
zcbor_bool_encode(zse, &true); |
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.
strange - true is not a variable or so
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.
Compiler loads true on stack and gets pointer to stack, it works, although I can make this more clear.
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.
this throws a compiler error
1a55fbe
to
7d5d68e
Compare
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.
please update to [fromtree]
and ensure the content is aligned.
@nvlsianpu ping |
…GRADE Usage of the Kconfig, in code, has been missing CONFIG_, so selected or not it did nothing. (cherry picked from commit 1ec7116) Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
…_info There have been to problems with the code where zcbor_bool_encode has been fed value instead of expected pointer and the result of previous zcbor_encode operations has not been taken to evaluate value of ok status. The change also replaces usage of #if IS_ENABLED with #ifdef, as IS_ENABLED should not be used outside if(). (cherry picked from commit c007e71) Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
7d5d68e
to
3e334e1
Compare
There are two fixes now.
Previously there has been one, but it required conflict resolution at cherry-pick as there has been previous change missing;
this time both changes are brought.