Norimasa Okamoto / F32RFileSystem

Fork of F12RFileSystem by Norimasa Okamoto

Revision:
10:0f8c8845a40b
Parent:
9:e9843d731180
Child:
11:90747dece5a3
--- a/F32RFileSystem.cpp	Fri Apr 08 06:38:36 2016 +0900
+++ b/F32RFileSystem.cpp	Sat Apr 09 05:35:46 2016 +0900
@@ -23,6 +23,7 @@
 #include "F32RFileHandle.h"
 #include "F32RDirHandle.h"
 #include "fsdebug.h"
+#include "mbed_debug.h"
 
 F32RFileSystem::F32RFileSystem(StorageInterface* storage_, const char* n)
     : FileSystemLike(n), storage(storage_), mounted(false) {
@@ -135,7 +136,10 @@
     fs_type = partition_entry.type;
     FS_DBG_HEX((uint8_t*)&partition_entry, sizeof(partition_entry));
     FS_DBG("fs_type=%02x", fs_type);
-    FS_TEST_ASSERT(is_fat32());
+    if (!is_fat32()) {
+        debug("fat32 only.");
+        return -1;
+    }
     if (is_fat12() || is_fat16() || is_fat32()) {
         lba_offset = partition_entry.sector_start * 512;
         if (storage_peek(lba_offset + 510, 2) != 0xaa55) {