Cleaned up commit logic and function organization

Restrctured function organization to make a bit more sense, and made
some small refactoring tweaks, specifically around the commit logic and
global related functions.
This commit is contained in:
Christopher Haster
2018-07-13 15:04:31 -05:00
parent d3f3711560
commit 5d24e656f1
2 changed files with 456 additions and 500 deletions

981
lfs.c

File diff suppressed because it is too large Load Diff

5
lfs.h
View File

@@ -263,7 +263,7 @@ struct lfs_attr {
/// littlefs data structures /// /// littlefs data structures ///
typedef struct lfs_mattr { typedef struct lfs_mattr {
struct lfs_mattr *next; const struct lfs_mattr *next;
int32_t tag; int32_t tag;
const void *buffer; const void *buffer;
} lfs_mattr_t; } lfs_mattr_t;
@@ -284,7 +284,7 @@ typedef struct lfs_mdir {
uint16_t count; uint16_t count;
bool erased; bool erased;
bool split; bool split;
lfs_globals_t globals; lfs_globals_t locals;
} lfs_mdir_t; } lfs_mdir_t;
typedef struct lfs_cache { typedef struct lfs_cache {
@@ -353,6 +353,7 @@ typedef struct lfs {
lfs_free_t free; lfs_free_t free;
bool deorphaned; bool deorphaned;
lfs_globals_t globals2;
lfs_globals_t globals; lfs_globals_t globals;
lfs_globals_t diff; lfs_globals_t diff;