You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/12/01 04:45:15 UTC

[GitHub] [mynewt-mcumgr] vrahane commented on a change in pull request #102: Add image upload support for flash erased at 0

vrahane commented on a change in pull request #102:
URL: https://github.com/apache/mynewt-mcumgr/pull/102#discussion_r533070011



##########
File path: cmd/img_mgmt/src/img_mgmt.c
##########
@@ -137,21 +137,29 @@ img_mgmt_read_info(int image_slot, struct image_version *ver, uint8_t *hash,
     size_t data_off;
     size_t data_end;
     bool hash_found;
+    uint8_t erased_val;
+    uint32_t erased_val_32;
     int rc;
 
+    rc = img_mgmt_impl_erased_val(image_slot, &erased_val);
+    if (rc != 0) {
+        return MGMT_ERR_EUNKNOWN;
+    }

Review comment:
       Well, the hardcoded value of 0xff, but you are right all hal flash set it to 0xff anyway. So, it is fine.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org