*** empty log message ***
[yaffs/.git] / direct / yaffscfg.c
index 466b381135a64051553b9a5e19a7e8be27175a09..47a6841afc84f01b55b9543111842b21bcf06254 100644 (file)
 unsigned yaffs_traceMask = 0xFFFFFFFF;
 
 
+int yaffs_errno;
+
 void yaffsfs_SetError(int err)
 {
        //Do whatever to set error
-       errno = err;
+       yaffs_errno = err;
 }
 
 void yaffsfs_Lock(void)
@@ -73,8 +75,8 @@ int yaffs_StartUp(void)
        // /ram
        ramDev.nBytesPerChunk = YAFFS_BYTES_PER_CHUNK;
        ramDev.nChunksPerBlock = YAFFS_CHUNKS_PER_BLOCK;
-       ramDev.nReservedBlocks = 1; // Set this smaller for RAM
-       ramDev.startBlock = 1; // Can't use block 0
+       ramDev.nReservedBlocks = 2; // Set this smaller for RAM
+       ramDev.startBlock = 0; // Can now use block zero
        ramDev.endBlock = 127; // Last block in 2MB.    
        ramDev.useNANDECC = 1;
        ramDev.nShortOpCaches = 0;      // Disable caching on this device.
@@ -88,7 +90,7 @@ int yaffs_StartUp(void)
        bootDev.nBytesPerChunk = YAFFS_BYTES_PER_CHUNK;
        bootDev.nChunksPerBlock = YAFFS_CHUNKS_PER_BLOCK;
        bootDev.nReservedBlocks = 5;
-       bootDev.startBlock = 1; // Can't use block 0
+       bootDev.startBlock = 0; // Can now use block zero
        bootDev.endBlock = 127; // Last block in 2MB.   
        bootDev.useNANDECC = 0; // use YAFFS's ECC
        bootDev.nShortOpCaches = 10; // Use caches