@@ -349,7 +349,7 @@ s32_t spiffs_obj_lu_scan(
349
349
#if SPIFFS_USE_MAGIC
350
350
if (unerased_bix != (spiffs_block_ix )- 1 ) {
351
351
// found one unerased block, remedy
352
- SPIFFS_DBG ("mount: erase block %i \n" , bix );
352
+ SPIFFS_DBG ("mount: erase block %d \n" , bix );
353
353
res = spiffs_erase_block (fs , unerased_bix );
354
354
SPIFFS_CHECK_RES (res );
355
355
}
@@ -706,7 +706,7 @@ s32_t spiffs_object_create(
706
706
// find free entry
707
707
res = spiffs_obj_lu_find_free (fs , fs -> free_cursor_block_ix , fs -> free_cursor_obj_lu_entry , & bix , & entry );
708
708
SPIFFS_CHECK_RES (res );
709
- SPIFFS_DBG ("create: found free page @ %04x bix:%i entry:%i \n" , SPIFFS_OBJ_LOOKUP_ENTRY_TO_PIX (fs , bix , entry ), bix , entry );
709
+ SPIFFS_DBG ("create: found free page @ %04x bix:%d entry:%d \n" , SPIFFS_OBJ_LOOKUP_ENTRY_TO_PIX (fs , bix , entry ), bix , entry );
710
710
711
711
// occupy page in object lookup
712
712
res = _spiffs_wr (fs , SPIFFS_OP_T_OBJ_LU | SPIFFS_OP_C_UPDT ,
@@ -811,7 +811,7 @@ void spiffs_cb_object_event(
811
811
if (cur_fd -> file_nbr == 0 || (cur_fd -> obj_id & ~SPIFFS_OBJ_ID_IX_FLAG ) != obj_id ) continue ;
812
812
if (spix == 0 ) {
813
813
if (ev == SPIFFS_EV_IX_NEW || ev == SPIFFS_EV_IX_UPD ) {
814
- SPIFFS_DBG (" callback: setting fd %i :%04x objix_hdr_pix to %04x, size:%i \n" , cur_fd -> file_nbr , cur_fd -> obj_id , new_pix , new_size );
814
+ SPIFFS_DBG (" callback: setting fd %d :%04x objix_hdr_pix to %04x, size:%d \n" , cur_fd -> file_nbr , cur_fd -> obj_id , new_pix , new_size );
815
815
cur_fd -> objix_hdr_pix = new_pix ;
816
816
if (new_size != 0 ) {
817
817
cur_fd -> size = new_size ;
@@ -823,7 +823,7 @@ void spiffs_cb_object_event(
823
823
}
824
824
if (cur_fd -> cursor_objix_spix == spix ) {
825
825
if (ev == SPIFFS_EV_IX_NEW || ev == SPIFFS_EV_IX_UPD ) {
826
- SPIFFS_DBG (" callback: setting fd %i :%04x span:%04x objix_pix to %04x\n" , cur_fd -> file_nbr , cur_fd -> obj_id , spix , new_pix );
826
+ SPIFFS_DBG (" callback: setting fd %d :%04x span:%04x objix_pix to %04x\n" , cur_fd -> file_nbr , cur_fd -> obj_id , spix , new_pix );
827
827
cur_fd -> cursor_objix_pix = new_pix ;
828
828
} else {
829
829
cur_fd -> cursor_objix_pix = 0 ;
@@ -883,7 +883,7 @@ s32_t spiffs_object_open_by_page(
883
883
884
884
SPIFFS_VALIDATE_OBJIX (oix_hdr .p_hdr , fd -> obj_id , 0 );
885
885
886
- SPIFFS_DBG ("open: fd %i is obj id %04x\n" , fd -> file_nbr , fd -> obj_id );
886
+ SPIFFS_DBG ("open: fd %d is obj id %04x\n" , fd -> file_nbr , fd -> obj_id );
887
887
888
888
return res ;
889
889
}
@@ -895,7 +895,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
895
895
s32_t res = SPIFFS_OK ;
896
896
u32_t written = 0 ;
897
897
898
- SPIFFS_DBG ("append: %i bytes @ offs %i of size %i \n" , len , offset , fd -> size );
898
+ SPIFFS_DBG ("append: %d bytes @ offs %d of size %d \n" , len , offset , fd -> size );
899
899
900
900
if (offset > fd -> size ) {
901
901
SPIFFS_DBG ("append: offset reversed to size\n" );
@@ -904,7 +904,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
904
904
905
905
res = spiffs_gc_check (fs , len + SPIFFS_DATA_PAGE_SIZE (fs )); // add an extra page of data worth for meta
906
906
if (res != SPIFFS_OK ) {
907
- SPIFFS_DBG ("append: gc check fail %i \n" , res );
907
+ SPIFFS_DBG ("append: gc check fail %d \n" , res );
908
908
}
909
909
SPIFFS_CHECK_RES (res );
910
910
@@ -932,7 +932,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
932
932
// within this clause we return directly if something fails, object index mess-up
933
933
if (written > 0 ) {
934
934
// store previous object index page, unless first pass
935
- SPIFFS_DBG ("append: %04x store objix %04x:%04x, written %i \n" , fd -> obj_id ,
935
+ SPIFFS_DBG ("append: %04x store objix %04x:%04x, written %d \n" , fd -> obj_id ,
936
936
cur_objix_pix , prev_objix_spix , written );
937
937
if (prev_objix_spix == 0 ) {
938
938
// this is an update to object index header page
@@ -949,7 +949,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
949
949
res = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
950
950
fd -> objix_hdr_pix , fs -> work , 0 , offset + written , & new_objix_hdr_page );
951
951
SPIFFS_CHECK_RES (res );
952
- SPIFFS_DBG ("append: %04x store new objix_hdr, %04x:%04x, written %i \n" , fd -> obj_id ,
952
+ SPIFFS_DBG ("append: %04x store new objix_hdr, %04x:%04x, written %d \n" , fd -> obj_id ,
953
953
new_objix_hdr_page , 0 , written );
954
954
}
955
955
} else {
@@ -965,7 +965,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
965
965
res = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
966
966
fd -> objix_hdr_pix , 0 , 0 , offset + written , & new_objix_hdr_page );
967
967
SPIFFS_CHECK_RES (res );
968
- SPIFFS_DBG ("append: %04x store new size I %i in objix_hdr, %04x:%04x, written %i \n" , fd -> obj_id ,
968
+ SPIFFS_DBG ("append: %04x store new size I %d in objix_hdr, %04x:%04x, written %d \n" , fd -> obj_id ,
969
969
offset + written , new_objix_hdr_page , 0 , written );
970
970
}
971
971
fd -> size = offset + written ;
@@ -994,7 +994,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
994
994
// quick "load" of new object index page
995
995
memset (fs -> work , 0xff , SPIFFS_CFG_LOG_PAGE_SZ (fs ));
996
996
memcpy (fs -> work , & p_hdr , sizeof (spiffs_page_header ));
997
- SPIFFS_DBG ("append: %04x create objix page, %04x:%04x, written %i \n" , fd -> obj_id
997
+ SPIFFS_DBG ("append: %04x create objix page, %04x:%04x, written %d \n" , fd -> obj_id
998
998
, cur_objix_pix , cur_objix_spix , written );
999
999
} else {
1000
1000
// on first pass, we load existing object index page
@@ -1006,7 +1006,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1006
1006
res = spiffs_obj_lu_find_id_and_span (fs , fd -> obj_id | SPIFFS_OBJ_ID_IX_FLAG , cur_objix_spix , 0 , & pix );
1007
1007
SPIFFS_CHECK_RES (res );
1008
1008
}
1009
- SPIFFS_DBG ("append: %04x found object index at page %04x [fd size %i ]\n" , fd -> obj_id , pix , fd -> size );
1009
+ SPIFFS_DBG ("append: %04x found object index at page %04x [fd size %d ]\n" , fd -> obj_id , pix , fd -> size );
1010
1010
res = _spiffs_rd (fs , SPIFFS_OP_T_OBJ_IX | SPIFFS_OP_C_READ ,
1011
1011
fd -> file_nbr , SPIFFS_PAGE_TO_PADDR (fs , pix ), SPIFFS_CFG_LOG_PAGE_SZ (fs ), fs -> work );
1012
1012
SPIFFS_CHECK_RES (res );
@@ -1030,7 +1030,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1030
1030
p_hdr .flags = 0xff & ~(SPIFFS_PH_FLAG_FINAL ); // finalize immediately
1031
1031
res = spiffs_page_allocate_data (fs , fd -> obj_id & ~SPIFFS_OBJ_ID_IX_FLAG ,
1032
1032
& p_hdr , & data [written ], to_write , page_offs , 1 , & data_page );
1033
- SPIFFS_DBG ("append: %04x store new data page, %04x:%04x offset:%i , len %i , written %i \n" , fd -> obj_id ,
1033
+ SPIFFS_DBG ("append: %04x store new data page, %04x:%04x offset:%d , len %d , written %d \n" , fd -> obj_id ,
1034
1034
data_page , data_spix , page_offs , to_write , written );
1035
1035
} else {
1036
1036
// append to existing page, fill out free data in existing page
@@ -1047,7 +1047,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1047
1047
1048
1048
res = _spiffs_wr (fs , SPIFFS_OP_T_OBJ_DA | SPIFFS_OP_C_UPDT ,
1049
1049
fd -> file_nbr , SPIFFS_PAGE_TO_PADDR (fs , data_page ) + sizeof (spiffs_page_header ) + page_offs , to_write , & data [written ]);
1050
- SPIFFS_DBG ("append: %04x store to existing data page, %04x:%04x offset:%i , len %i , written %i \n" , fd -> obj_id
1050
+ SPIFFS_DBG ("append: %04x store to existing data page, %04x:%04x offset:%d , len %d , written %d \n" , fd -> obj_id
1051
1051
, data_page , data_spix , page_offs , to_write , written );
1052
1052
}
1053
1053
@@ -1083,7 +1083,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1083
1083
if (cur_objix_spix != 0 ) {
1084
1084
// wrote beyond object index header page
1085
1085
// write last modified object index page, unless object header index page
1086
- SPIFFS_DBG ("append: %04x store objix page, %04x:%04x, written %i \n" , fd -> obj_id ,
1086
+ SPIFFS_DBG ("append: %04x store objix page, %04x:%04x, written %d \n" , fd -> obj_id ,
1087
1087
cur_objix_pix , cur_objix_spix , written );
1088
1088
1089
1089
res2 = spiffs_page_index_check (fs , fd , cur_objix_pix , cur_objix_spix );
@@ -1097,15 +1097,15 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1097
1097
// update size in object header index page
1098
1098
res2 = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
1099
1099
fd -> objix_hdr_pix , 0 , 0 , offset + written , & new_objix_hdr_page );
1100
- SPIFFS_DBG ("append: %04x store new size II %i in objix_hdr, %04x:%04x, written %i , res %i \n" , fd -> obj_id
1100
+ SPIFFS_DBG ("append: %04x store new size II %d in objix_hdr, %04x:%04x, written %d , res %d \n" , fd -> obj_id
1101
1101
, offset + written , new_objix_hdr_page , 0 , written , res2 );
1102
1102
SPIFFS_CHECK_RES (res2 );
1103
1103
} else {
1104
1104
// wrote within object index header page
1105
1105
if (offset == 0 ) {
1106
1106
// wrote to empty object - simply update size and write whole page
1107
1107
objix_hdr -> size = offset + written ;
1108
- SPIFFS_DBG ("append: %04x store fresh objix_hdr page, %04x:%04x, written %i \n" , fd -> obj_id
1108
+ SPIFFS_DBG ("append: %04x store fresh objix_hdr page, %04x:%04x, written %d \n" , fd -> obj_id
1109
1109
, cur_objix_pix , cur_objix_spix , written );
1110
1110
1111
1111
res2 = spiffs_page_index_check (fs , fd , cur_objix_pix , cur_objix_spix );
@@ -1120,7 +1120,7 @@ s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1120
1120
// modifying object index header page, update size and make new copy
1121
1121
res2 = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
1122
1122
fd -> objix_hdr_pix , fs -> work , 0 , offset + written , & new_objix_hdr_page );
1123
- SPIFFS_DBG ("append: %04x store modified objix_hdr page, %04x:%04x, written %i \n" , fd -> obj_id
1123
+ SPIFFS_DBG ("append: %04x store modified objix_hdr page, %04x:%04x, written %d \n" , fd -> obj_id
1124
1124
, new_objix_hdr_page , 0 , written );
1125
1125
SPIFFS_CHECK_RES (res2 );
1126
1126
}
@@ -1168,7 +1168,7 @@ s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1168
1168
// store previous object index header page
1169
1169
res = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
1170
1170
fd -> objix_hdr_pix , fs -> work , 0 , 0 , & new_objix_hdr_pix );
1171
- SPIFFS_DBG ("modify: store modified objix_hdr page, %04x:%04x, written %i \n" , new_objix_hdr_pix , 0 , written );
1171
+ SPIFFS_DBG ("modify: store modified objix_hdr page, %04x:%04x, written %d \n" , new_objix_hdr_pix , 0 , written );
1172
1172
SPIFFS_CHECK_RES (res );
1173
1173
} else {
1174
1174
// store new version of previous object index page
@@ -1178,7 +1178,7 @@ s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1178
1178
SPIFFS_CHECK_RES (res );
1179
1179
1180
1180
res = spiffs_page_move (fs , fd -> file_nbr , (u8_t * )objix , fd -> obj_id , 0 , cur_objix_pix , & new_objix_pix );
1181
- SPIFFS_DBG ("modify: store previous modified objix page, %04x:%04x, written %i \n" , new_objix_pix , objix -> p_hdr .span_ix , written );
1181
+ SPIFFS_DBG ("modify: store previous modified objix page, %04x:%04x, written %d \n" , new_objix_pix , objix -> p_hdr .span_ix , written );
1182
1182
SPIFFS_CHECK_RES (res );
1183
1183
spiffs_cb_object_event (fs , fd , SPIFFS_EV_IX_UPD , fd -> obj_id , objix -> p_hdr .span_ix , new_objix_pix , 0 );
1184
1184
}
@@ -1233,7 +1233,7 @@ s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1233
1233
// a full page, allocate and write a new page of data
1234
1234
res = spiffs_page_allocate_data (fs , fd -> obj_id & ~SPIFFS_OBJ_ID_IX_FLAG ,
1235
1235
& p_hdr , & data [written ], to_write , page_offs , 1 , & data_pix );
1236
- SPIFFS_DBG ("modify: store new data page, %04x:%04x offset:%i , len %i , written %i \n" , data_pix , data_spix , page_offs , to_write , written );
1236
+ SPIFFS_DBG ("modify: store new data page, %04x:%04x offset:%d , len %d , written %d \n" , data_pix , data_spix , page_offs , to_write , written );
1237
1237
} else {
1238
1238
// write to existing page, allocate new and copy unmodified data
1239
1239
@@ -1274,7 +1274,7 @@ s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1274
1274
(u8_t * )& p_hdr .flags );
1275
1275
if (res != SPIFFS_OK ) break ;
1276
1276
1277
- SPIFFS_DBG ("modify: store to existing data page, src:%04x, dst:%04x:%04x offset:%i , len %i , written %i \n" , orig_data_pix , data_pix , data_spix , page_offs , to_write , written );
1277
+ SPIFFS_DBG ("modify: store to existing data page, src:%04x, dst:%04x:%04x offset:%d , len %d , written %d \n" , orig_data_pix , data_pix , data_spix , page_offs , to_write , written );
1278
1278
}
1279
1279
1280
1280
// delete original data page
@@ -1313,7 +1313,7 @@ s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1313
1313
SPIFFS_CHECK_RES (res2 );
1314
1314
1315
1315
res2 = spiffs_page_move (fs , fd -> file_nbr , (u8_t * )objix , fd -> obj_id , 0 , cur_objix_pix , & new_objix_pix );
1316
- SPIFFS_DBG ("modify: store modified objix page, %04x:%04x, written %i \n" , new_objix_pix , cur_objix_spix , written );
1316
+ SPIFFS_DBG ("modify: store modified objix page, %04x:%04x, written %d \n" , new_objix_pix , cur_objix_spix , written );
1317
1317
fd -> cursor_objix_pix = new_objix_pix ;
1318
1318
fd -> cursor_objix_spix = cur_objix_spix ;
1319
1319
SPIFFS_CHECK_RES (res2 );
@@ -1323,7 +1323,7 @@ s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_t len) {
1323
1323
// wrote within object index header page
1324
1324
res2 = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
1325
1325
fd -> objix_hdr_pix , fs -> work , 0 , 0 , & new_objix_hdr_pix );
1326
- SPIFFS_DBG ("modify: store modified objix_hdr page, %04x:%04x, written %i \n" , new_objix_hdr_pix , 0 , written );
1326
+ SPIFFS_DBG ("modify: store modified objix_hdr page, %04x:%04x, written %d \n" , new_objix_hdr_pix , 0 , written );
1327
1327
SPIFFS_CHECK_RES (res2 );
1328
1328
}
1329
1329
@@ -1444,7 +1444,7 @@ s32_t spiffs_object_truncate(
1444
1444
spiffs_cb_object_event (fs , fd , SPIFFS_EV_IX_DEL , fd -> obj_id , objix -> p_hdr .span_ix , objix_pix , 0 );
1445
1445
if (prev_objix_spix > 0 ) {
1446
1446
// update object index header page
1447
- SPIFFS_DBG ("truncate: update objix hdr page %04x:%04x to size %i \n" , fd -> objix_hdr_pix , prev_objix_spix , cur_size );
1447
+ SPIFFS_DBG ("truncate: update objix hdr page %04x:%04x to size %d \n" , fd -> objix_hdr_pix , prev_objix_spix , cur_size );
1448
1448
res = spiffs_object_update_index_hdr (fs , fd , fd -> obj_id ,
1449
1449
fd -> objix_hdr_pix , 0 , 0 , cur_size , & new_objix_hdr_pix );
1450
1450
SPIFFS_CHECK_RES (res );
@@ -1487,14 +1487,14 @@ s32_t spiffs_object_truncate(
1487
1487
// delete full data page
1488
1488
res = spiffs_page_data_check (fs , fd , data_pix , data_spix );
1489
1489
if (res != SPIFFS_ERR_DELETED && res != SPIFFS_OK && res != SPIFFS_ERR_INDEX_REF_FREE ) {
1490
- SPIFFS_DBG ("truncate: err validating data pix %i \n" , res );
1490
+ SPIFFS_DBG ("truncate: err validating data pix %d \n" , res );
1491
1491
break ;
1492
1492
}
1493
1493
1494
1494
if (res == SPIFFS_OK ) {
1495
1495
res = spiffs_page_delete (fs , data_pix );
1496
1496
if (res != SPIFFS_OK ) {
1497
- SPIFFS_DBG ("truncate: err deleting data pix %i \n" , res );
1497
+ SPIFFS_DBG ("truncate: err deleting data pix %d \n" , res );
1498
1498
break ;
1499
1499
}
1500
1500
} else if (res == SPIFFS_ERR_DELETED || res == SPIFFS_ERR_INDEX_REF_FREE ) {
@@ -1509,13 +1509,13 @@ s32_t spiffs_object_truncate(
1509
1509
}
1510
1510
fd -> size = cur_size ;
1511
1511
fd -> offset = cur_size ;
1512
- SPIFFS_DBG ("truncate: delete data page %04x for data spix:%04x, cur_size:%i \n" , data_pix , data_spix , cur_size );
1512
+ SPIFFS_DBG ("truncate: delete data page %04x for data spix:%04x, cur_size:%d \n" , data_pix , data_spix , cur_size );
1513
1513
} else {
1514
1514
// delete last page, partially
1515
1515
spiffs_page_header p_hdr ;
1516
1516
spiffs_page_ix new_data_pix ;
1517
1517
u32_t bytes_to_remove = SPIFFS_DATA_PAGE_SIZE (fs ) - (new_size % SPIFFS_DATA_PAGE_SIZE (fs ));
1518
- SPIFFS_DBG ("truncate: delete %i bytes from data page %04x for data spix:%04x, cur_size:%i \n" , bytes_to_remove , data_pix , data_spix , cur_size );
1518
+ SPIFFS_DBG ("truncate: delete %d bytes from data page %04x for data spix:%04x, cur_size:%d \n" , bytes_to_remove , data_pix , data_spix , cur_size );
1519
1519
1520
1520
res = spiffs_page_data_check (fs , fd , data_pix , data_spix );
1521
1521
if (res != SPIFFS_OK ) break ;
@@ -1670,7 +1670,7 @@ s32_t spiffs_object_read(
1670
1670
len_to_read = MIN (len_to_read , SPIFFS_DATA_PAGE_SIZE (fs ) - (cur_offset % SPIFFS_DATA_PAGE_SIZE (fs )));
1671
1671
// remaining data in file
1672
1672
len_to_read = MIN (len_to_read , fd -> size );
1673
- SPIFFS_DBG ("read: offset:%i rd:%i data spix:%04x is data_pix:%04x addr:%08x\n" , cur_offset , len_to_read , data_spix , data_pix ,
1673
+ SPIFFS_DBG ("read: offset:%d rd:%d data spix:%04x is data_pix:%04x addr:%08x\n" , cur_offset , len_to_read , data_spix , data_pix ,
1674
1674
SPIFFS_PAGE_TO_PADDR (fs , data_pix ) + sizeof (spiffs_page_header ) + (cur_offset % SPIFFS_DATA_PAGE_SIZE (fs )));
1675
1675
if (len_to_read <= 0 ) {
1676
1676
res = SPIFFS_ERR_END_OF_OBJECT ;
@@ -1756,7 +1756,7 @@ static s32_t spiffs_obj_lu_find_free_obj_id_compact_v(spiffs *fs, spiffs_obj_id
1756
1756
if (id >= state -> min_obj_id && id <= state -> max_obj_id ) {
1757
1757
u8_t * map = (u8_t * )fs -> work ;
1758
1758
int ix = (id - state -> min_obj_id ) / state -> compaction ;
1759
- //SPIFFS_DBG("free_obj_id: add ix %i for id %04x min:%04x max%04x comp:%i \n", ix, id, state->min_obj_id, state->max_obj_id, state->compaction);
1759
+ //SPIFFS_DBG("free_obj_id: add ix %d for id %04x min:%04x max%04x comp:%d \n", ix, id, state->min_obj_id, state->max_obj_id, state->compaction);
1760
1760
map [ix ]++ ;
1761
1761
}
1762
1762
}
@@ -1829,7 +1829,7 @@ s32_t spiffs_obj_lu_find_free_obj_id(spiffs *fs, spiffs_obj_id *obj_id, const u8
1829
1829
return SPIFFS_ERR_FULL ;
1830
1830
}
1831
1831
1832
- SPIFFS_DBG ("free_obj_id: COMP select index:%i min_count:%i min:%04x max:%04x compact:%i \n" , min_i , min_count , state .min_obj_id , state .max_obj_id , state .compaction );
1832
+ SPIFFS_DBG ("free_obj_id: COMP select index:%d min_count:%d min:%04x max:%04x compact:%d \n" , min_i , min_count , state .min_obj_id , state .max_obj_id , state .compaction );
1833
1833
1834
1834
if (min_count == 0 ) {
1835
1835
// no id in this range, skip compacting and use directly
@@ -1849,7 +1849,7 @@ s32_t spiffs_obj_lu_find_free_obj_id(spiffs *fs, spiffs_obj_id *obj_id, const u8
1849
1849
// in a work memory of log_page_size bytes, we may fit in log_page_size ids
1850
1850
// todo what if compaction is > 255 - then we cannot fit it in a byte
1851
1851
state .compaction = (state .max_obj_id - state .min_obj_id ) / ((SPIFFS_CFG_LOG_PAGE_SZ (fs ) / sizeof (u8_t )));
1852
- SPIFFS_DBG ("free_obj_id: COMP min:%04x max:%04x compact:%i \n" , state .min_obj_id , state .max_obj_id , state .compaction );
1852
+ SPIFFS_DBG ("free_obj_id: COMP min:%04x max:%04x compact:%d \n" , state .min_obj_id , state .max_obj_id , state .compaction );
1853
1853
1854
1854
memset (fs -> work , 0 , SPIFFS_CFG_LOG_PAGE_SZ (fs ));
1855
1855
res = spiffs_obj_lu_find_entry_visitor (fs , 0 , 0 , 0 , 0 , spiffs_obj_lu_find_free_obj_id_compact_v , & state , 0 , 0 , 0 );
0 commit comments