Repository: incubator-mynewt-core Updated Branches: refs/heads/develop adbb00e93 -> 82c6b75c4
minor bug fixes to state command. Also fix reboot to ensure we don't call functions that are not enabled by sysconfig Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/82c6b75c Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/82c6b75c Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/82c6b75c Branch: refs/heads/develop Commit: 82c6b75c498b3870bb4701fc63e9b0422af250ff Parents: 7f299ef Author: Paul Dietrich <paulfdietr...@yahoo.com> Authored: Thu Oct 13 11:07:38 2016 -0700 Committer: Paul Dietrich <paulfdietr...@yahoo.com> Committed: Thu Oct 13 11:08:40 2016 -0700 ---------------------------------------------------------------------- mgmt/imgmgr/src/imgmgr_state.c | 1 + mgmt/newtmgr/nmgr_os/pkg.yml | 5 +++++ sys/reboot/src/log_reboot.c | 10 +++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82c6b75c/mgmt/imgmgr/src/imgmgr_state.c ---------------------------------------------------------------------- diff --git a/mgmt/imgmgr/src/imgmgr_state.c b/mgmt/imgmgr/src/imgmgr_state.c index ac62d71..67551d7 100644 --- a/mgmt/imgmgr/src/imgmgr_state.c +++ b/mgmt/imgmgr/src/imgmgr_state.c @@ -234,6 +234,7 @@ imgmgr_state_read(struct mgmt_cbuf *cb) g_err |= cbor_encode_int(&rsp, i); g_err |= cbor_encode_text_stringz(&image, "version"); + imgr_ver_str(&ver, vers_str); g_err |= cbor_encode_text_stringz(&image, vers_str); g_err |= cbor_encode_text_stringz(&image, "hash"); http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82c6b75c/mgmt/newtmgr/nmgr_os/pkg.yml ---------------------------------------------------------------------- diff --git a/mgmt/newtmgr/nmgr_os/pkg.yml b/mgmt/newtmgr/nmgr_os/pkg.yml index 2812f60..c0ee6c7 100644 --- a/mgmt/newtmgr/nmgr_os/pkg.yml +++ b/mgmt/newtmgr/nmgr_os/pkg.yml @@ -30,3 +30,8 @@ pkg.deps: - encoding/json - sys/reboot - mgmt/mgmt + - encoding/tinycbor + - encoding/cborattr + +pkg.req_apis: + - newtmgr http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82c6b75c/sys/reboot/src/log_reboot.c ---------------------------------------------------------------------- diff --git a/sys/reboot/src/log_reboot.c b/sys/reboot/src/log_reboot.c index 89ef589..9869a08 100644 --- a/sys/reboot/src/log_reboot.c +++ b/sys/reboot/src/log_reboot.c @@ -136,12 +136,16 @@ log_reboot(int reason) char str[12] = {0}; struct image_version ver; int16_t reboot_tmp_cnt; - const struct flash_area *ptr; rc = 0; - if (flash_area_open(MYNEWT_VAL(REBOOT_LOG_FLASH_AREA), &ptr)) { - goto err; +#if MYNEWT_VAL(REBOOT_LOG_FCB) + { + const struct flash_area *ptr; + if (flash_area_open(MYNEWT_VAL(REBOOT_LOG_FLASH_AREA), &ptr)) { + goto err; + } } +#endif reboot_tmp_cnt = reboot_cnt;