Pārlūkot izejas kodu

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.
Christopher Haster 7 gadi atpakaļ
vecāks
revīzija
5d24e656f1
2 mainītis faili ar 357 papildinājumiem un 437 dzēšanām
  1. 354 435
      lfs.c
  2. 3 2
      lfs.h

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 354 - 435
lfs.c


+ 3 - 2
lfs.h

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

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels