vrahane commented on a change in pull request #2425:
URL: https://github.com/apache/mynewt-core/pull/2425#discussion_r538019268



##########
File path: sys/log/full/src/log.c
##########
@@ -955,18 +955,17 @@ log_read_hdr(struct log *log, const void *dptr, struct 
log_entry_hdr *hdr)
 {
     int bytes_read;
 
+#if MYNEWT_VAL(LOG_FLAGS_IMAGE_HASH)
+    bytes_read = log_read(log, dptr, hdr, 0, (LOG_BASE_ENTRY_HDR_SIZE + 
LOG_IMG_HASHLEN));
+    if (bytes_read != (LOG_BASE_ENTRY_HDR_SIZE + LOG_IMG_HASHLEN)) {
+        return SYS_EIO;
+    }
+#else
     bytes_read = log_read(log, dptr, hdr, 0, LOG_BASE_ENTRY_HDR_SIZE);
     if (bytes_read != LOG_BASE_ENTRY_HDR_SIZE) {
         return SYS_EIO;
     }
-
-    if (hdr->ue_flags & LOG_FLAGS_IMG_HASH) {

Review comment:
       I think this is going to cause issues, the image hash was part of the 
header for backwards compatibility. Removing it might cause issues for other 
people.
   
   
   
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to