From 12d0731b91d8e58ba20ec28adf2d6c1aa995d74a Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Fri, 10 Mar 2017 19:09:42 +1100
Subject: [PATCH] extmod/vfs_fat: Remove obsolete and unused str/len members.

---
 cc3200/mptask.c  | 2 --
 extmod/vfs_fat.c | 2 --
 extmod/vfs_fat.h | 2 --
 stmhal/main.c    | 4 ----
 4 files changed, 10 deletions(-)

diff --git a/cc3200/mptask.c b/cc3200/mptask.c
index 41264fbd0..3c49a5603 100644
--- a/cc3200/mptask.c
+++ b/cc3200/mptask.c
@@ -302,8 +302,6 @@ STATIC void mptask_init_sflash_filesystem (void) {
     // Initialise the local flash filesystem.
     // init the vfs object
     fs_user_mount_t *vfs_fat = sflash_vfs_fat;
-    vfs_fat->str = NULL;
-    vfs_fat->len = 0;
     vfs_fat->flags = 0;
     pyb_flash_init_vfs(vfs_fat);
 
diff --git a/extmod/vfs_fat.c b/extmod/vfs_fat.c
index 82dd312b8..8cd5a4674 100644
--- a/extmod/vfs_fat.c
+++ b/extmod/vfs_fat.c
@@ -55,8 +55,6 @@ STATIC mp_obj_t fat_vfs_make_new(const mp_obj_type_t *type, size_t n_args, size_
     fs_user_mount_t *vfs = m_new_obj(fs_user_mount_t);
     vfs->base.type = type;
     vfs->flags = FSUSER_FREE_OBJ;
-    vfs->str = NULL;
-    vfs->len = 0;
     vfs->fatfs.drv = vfs;
 
     // load block protocol methods
diff --git a/extmod/vfs_fat.h b/extmod/vfs_fat.h
index a5e3c604b..7eb865254 100644
--- a/extmod/vfs_fat.h
+++ b/extmod/vfs_fat.h
@@ -36,8 +36,6 @@
 
 typedef struct _fs_user_mount_t {
     mp_obj_base_t base;
-    const char *str;
-    uint16_t len; // length of str
     uint16_t flags;
     mp_obj_t readblocks[4];
     mp_obj_t writeblocks[4];
diff --git a/stmhal/main.c b/stmhal/main.c
index 3c9906ad2..8d076a08b 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -167,8 +167,6 @@ static const char fresh_readme_txt[] =
 MP_NOINLINE STATIC bool init_flash_fs(uint reset_mode) {
     // init the vfs object
     fs_user_mount_t *vfs_fat = &fs_user_mount_flash;
-    vfs_fat->str = NULL;
-    vfs_fat->len = 0;
     vfs_fat->flags = 0;
     pyb_flash_init_vfs(vfs_fat);
 
@@ -274,8 +272,6 @@ STATIC bool init_sdcard_fs(bool first_soft_reset) {
         if (vfs == NULL || vfs_fat == NULL) {
             break;
         }
-        vfs_fat->str = NULL;
-        vfs_fat->len = 0;
         vfs_fat->flags = FSUSER_FREE_OBJ;
         sdcard_init_vfs(vfs_fat, part_num);
 
-- 
GitLab