+typedef enum
+{
+ TEST_NORMAL,
+ TEST_CIRCULAR,
+} test_type_t;
+
+static void
+process_maplog_records (clib_maplog_header_t * h,
+ test_entry_t * e, u64 records_this_file)
+{
+ static int print_header;
+ int i = 0;
+
+ if (print_header == 0)
+ {
+ print_header = 1;
+ fformat (stdout, "%U", format_maplog_header, h, 1 /* verbose */ );
+ }
+
+ while (records_this_file--)
+ {
+ /* Padding at the end of a damaged log? */
+ if (e->serial_number == 0ULL)
+ break;
+ fformat (stdout, "%4lld ", e->serial_number);
+ if (++i == 8)
+ {
+ fformat (stdout, "\n");
+ i = 0;
+ }
+ e++;
+ }
+ fformat (stdout, "\n--------------\n");
+}
+