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


##########
sys/log/full/src/log_fcb_bmark.c:
##########
@@ -22,17 +22,68 @@
 #include "os/mynewt.h"
 
 #if MYNEWT_VAL(LOG_FCB_BOOKMARKS)
-
+#include "log/log.h"
 #include "log/log_fcb.h"
 
-void
+#if MYNEWT_VAL(LOG_FCB_SECTOR_BOOKMARKS)
+static int
+log_fcb_init_sector_bmarks(struct fcb_log *fcb_log)
+{
+    int rc = 0;
+    int i = 0;
+    struct fcb_entry loc = {0};
+    struct log_entry_hdr ueh = {0};
+    struct flash_area *fa = NULL;
+
+    rc = fcb_getnext(&fcb_log->fl_fcb, &loc);
+    if (rc) {
+        return -1;
+    }
+
+    for (i = 0; i < fcb_log->fl_fcb.f_sector_cnt; i++) {

Review Comment:
   Sector based bookmarks is a new functionality, old functionality does not 
get affected unless this is enabled specifically. I do not think this will 
break anything that is used currently by anyone. If you have a specific 
suggestion I can try to change it that way else I will just add a comment in 
the init code. does that sound 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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to