summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
347609e)
- Substitute more "free" to FF_Free function.
svn path=/trunk/; revision=43255
if(Object.Attrib == FF_FAT_ATTR_DIR) {
if(!(pFile->Mode & FF_MODE_DIR)) {
// Not the object, File Not Found!
if(Object.Attrib == FF_FAT_ATTR_DIR) {
if(!(pFile->Mode & FF_MODE_DIR)) {
// Not the object, File Not Found!
if(pError) {
*pError = FF_ERR_FILE_OBJECT_IS_A_DIR;
}
if(pError) {
*pError = FF_ERR_FILE_OBJECT_IS_A_DIR;
}
//---------- Ensure Read-Only files don't get opened for Writing.
if((pFile->Mode & FF_MODE_WRITE) || (pFile->Mode & FF_MODE_APPEND)) {
if((Object.Attrib & FF_FAT_ATTR_READONLY)) {
//---------- Ensure Read-Only files don't get opened for Writing.
if((pFile->Mode & FF_MODE_WRITE) || (pFile->Mode & FF_MODE_APPEND)) {
if((Object.Attrib & FF_FAT_ATTR_READONLY)) {
if(pError) {
*pError = FF_ERR_FILE_IS_READ_ONLY;
}
if(pError) {
*pError = FF_ERR_FILE_IS_READ_ONLY;
}
if(pFileChain->ObjectCluster == pFile->ObjectCluster) {
// File is already open! DON'T ALLOW IT!
FF_ReleaseSemaphore(pIoman->pSemaphore);
if(pFileChain->ObjectCluster == pFile->ObjectCluster) {
// File is already open! DON'T ALLOW IT!
FF_ReleaseSemaphore(pIoman->pSemaphore);
if(pError) {
*pError = FF_ERR_FILE_ALREADY_OPEN;
}
if(pError) {
*pError = FF_ERR_FILE_ALREADY_OPEN;
}
if(pError) {
*pError = FF_ERR_FILE_NOT_FOUND;
}
if(pError) {
*pError = FF_ERR_FILE_NOT_FOUND;
}
*pError = FF_ERR_FILE_INVALID_PATH;
}
*pError = FF_ERR_FILE_INVALID_PATH;
}
return (FF_FILE *)NULL;
}
return (FF_FILE *)NULL;
}
FF_ReleaseSemaphore(pFile->pIoman->pSemaphore);
// If file written, flush to disk
FF_ReleaseSemaphore(pFile->pIoman->pSemaphore);
// If file written, flush to disk
// Simply free the pointer!
return FF_ERR_NONE;
}
// Simply free the pointer!
return FF_ERR_NONE;
}