2222#include "fcb_priv.h"
2323
2424int
25- fcb2_getnext_in_area (struct fcb2 * fcb , struct flash_sector_range * range ,
26- struct fcb2_entry * loc )
25+ fcb2_getnext_in_area (struct fcb2 * fcb , struct fcb2_entry * loc )
2726{
2827 int rc = FCB2_ERR_CRC ;
2928 int len ;
3029 int next_data_offset ;
3130 int next_entry_offset ;
3231
33- /* If a flash range is specified, find first entry in that area */
34- if (range ) {
35- loc -> fe_range = range ;
36- loc -> fe_data_off = fcb2_len_in_flash (range , sizeof (struct fcb2_disk_area ));
37- loc -> fe_entry_num = 0 ;
38- loc -> fe_data_len = 0 ;
39- loc -> fe_sector = 0 ;
40- }
41-
4232 while (rc == FCB2_ERR_CRC ) {
4333 len = loc -> fe_data_len ;
4434 /* Next data offset in sector */
@@ -62,17 +52,6 @@ fcb2_getnext_in_area(struct fcb2 *fcb, struct flash_sector_range *range,
6252 return rc ;
6353}
6454
65- struct flash_sector_range *
66- fcb2_getnext_range (struct fcb2 * fcb , struct fcb2_entry * loc )
67- {
68- loc -> fe_entry_num = 0 ;
69- loc -> fe_data_len = 0 ;
70- loc -> fe_sector = fcb2_getnext_sector (fcb , loc -> fe_sector );
71- loc -> fe_range = fcb2_get_sector_range (fcb , loc -> fe_sector );
72-
73- return loc -> fe_range ;
74- }
75-
7655int
7756fcb2_getnext_nolock (struct fcb2 * fcb , struct fcb2_entry * loc )
7857{
@@ -92,7 +71,7 @@ fcb2_getnext_nolock(struct fcb2 *fcb, struct fcb2_entry *loc)
9271 loc -> fe_entry_num = 1 ;
9372 rc = fcb2_elem_info (loc );
9473 } else {
95- rc = fcb2_getnext_in_area (fcb , NULL , loc );
74+ rc = fcb2_getnext_in_area (fcb , loc );
9675 }
9776 switch (rc ) {
9877 case 0 :
@@ -103,7 +82,7 @@ fcb2_getnext_nolock(struct fcb2 *fcb, struct fcb2_entry *loc)
10382 goto next_sector ;
10483 }
10584 while (rc == FCB2_ERR_CRC ) {
106- rc = fcb2_getnext_in_area (fcb , NULL , loc );
85+ rc = fcb2_getnext_in_area (fcb , loc );
10786 if (rc == 0 ) {
10887 return 0 ;
10988 }
0 commit comments