mFS file system library for EEPROM memory chips.

Revision:
11:6c4fcb9d6193
Parent:
10:211cb54339a0
Child:
12:928346513c87
--- a/mfs.cpp	Tue Feb 22 21:09:04 2011 +0000
+++ b/mfs.cpp	Tue Feb 22 21:39:41 2011 +0000
@@ -148,7 +148,7 @@
     char cData[3] = {'\0','\0','\0'};
 
     // Check if file exists
-    if (getFirstBlockOfFile(filename, &block) == 0)
+    if (getFirstBlockOfFile(filename, &block) != 0)
         return 1; // File not found
     
     // Clear blocks reserver by the file
@@ -256,7 +256,7 @@
     {
         // Write Volume label
         cFlags[0] = '\x0E';
-        mem->write(a, iAddr, 3);
+        mem->write(cFlags, iAddr, 3);
         iAddr = BS;
         i = 1;
     }