diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-07-27 23:52:56 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-07-27 23:52:56 +0100 |
| commit | f5d04750dbd13bfc10498e20428b1a285ec417af (patch) | |
| tree | 819b5723bff4db7cb9f5f147f403430b7c40fa55 /stmhal/ffconf.c | |
| parent | 92e9a5e0a7f2634c670ffe8056430b94d210a4c0 (diff) | |
stmhal: Put fs_user_mount pointer in root ptr section of global state.
Should fix issue #1393.
Diffstat (limited to 'stmhal/ffconf.c')
| -rw-r--r-- | stmhal/ffconf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stmhal/ffconf.c b/stmhal/ffconf.c index 4a51d193c..6557b193a 100644 --- a/stmhal/ffconf.c +++ b/stmhal/ffconf.c @@ -26,7 +26,7 @@ #include <string.h> -#include "py/obj.h" +#include "py/mpstate.h" #include "lib/fatfs/ff.h" #include "ffconf.h" #include "fsusermount.h" @@ -63,7 +63,7 @@ int ff_get_ldnumber (const TCHAR **path) { return 0; } else if (check_path(path, "/sd", 3)) { return 1; - } else if (fs_user_mount != NULL && check_path(path, fs_user_mount->str, fs_user_mount->len)) { + } else if (MP_STATE_PORT(fs_user_mount) != NULL && check_path(path, MP_STATE_PORT(fs_user_mount)->str, MP_STATE_PORT(fs_user_mount)->len)) { return 2; } else { return -1; @@ -78,7 +78,7 @@ void ff_get_volname(BYTE vol, TCHAR **dest) { memcpy(*dest, "/sd", 3); *dest += 3; } else { - memcpy(*dest, fs_user_mount->str, fs_user_mount->len); - *dest += fs_user_mount->len; + memcpy(*dest, MP_STATE_PORT(fs_user_mount)->str, MP_STATE_PORT(fs_user_mount)->len); + *dest += MP_STATE_PORT(fs_user_mount)->len; } } |
