vrahane commented on code in PR #3168:
URL: https://github.com/apache/mynewt-core/pull/3168#discussion_r1643104211


##########
sys/log/full/include/log/log.h:
##########
@@ -129,25 +131,40 @@ struct log_handler {
 /* Image hash length to be looged */
 #define LOG_IMG_HASHLEN 4
 
-/* Flags used to indicate type of data in reserved payload*/
-#define LOG_FLAGS_IMG_HASH (1 << 0)
+/* Flags used to indicate type of data in reserved payload */
+#define LOG_FLAGS_IMG_HASH    (1 << 0)
+#define LOG_FLAGS_TLV_SUPPORT (1 << 1)
+
+#define LOG_TLV_NUM_ENTRIES   (1 << 0)
 
 #if MYNEWT_VAL(LOG_VERSION) == 3
 struct log_entry_hdr {
     int64_t ue_ts;
     uint32_t ue_index;
     uint8_t ue_module;
     uint8_t ue_level;
-    uint8_t ue_etype:4;
-    uint8_t ue_flags:4;
+    uint8_t ue_etype : 4;
+    uint8_t ue_flags : 4;
     uint8_t ue_imghash[4];
-}__attribute__((__packed__));
+    uint32_t ue_num_entries;

Review Comment:
   Do you mean the prefix `ue` or just in general num_entries ? I do not know 
why `ue` was used historically. Number of entries gets passed around in the 
functions which is what it is used for mainly. The header itself in flash only 
has the base header. Image hash is sort of an extension and so is number of 
entries since the TLV is what holds it in flash.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to