Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenff_error.c
Go to the documentation of this file.
00001 /***************************************************************************** 00002 * FullFAT - High Performance, Thread-Safe Embedded FAT File-System * 00003 * Copyright (C) 2009 James Walmsley (james@worm.me.uk) * 00004 * * 00005 * This program is free software: you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation, either version 3 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00017 * * 00018 * IMPORTANT NOTICE: * 00019 * ================= * 00020 * Alternative Licensing is available directly from the Copyright holder, * 00021 * (James Walmsley). For more information consult LICENSING.TXT to obtain * 00022 * a Commercial license. * 00023 * * 00024 * See RESTRICTIONS.TXT for extra restrictions on the use of FullFAT. * 00025 * * 00026 * Removing the above notice is illegal and will invalidate this license. * 00027 ***************************************************************************** 00028 * See http://worm.me.uk/fullfat for more information. * 00029 * Or http://fullfat.googlecode.com/ for latest releases and the wiki. * 00030 *****************************************************************************/ 00031 00041 #include "ff_config.h" 00042 #include "ff_types.h" 00043 #include "ff_error.h" 00044 00045 #ifdef FF_DEBUG 00046 const struct _FFERRTAB 00047 { 00048 const FF_T_INT8 * const strErrorString; 00049 const FF_T_SINT32 iErrorCode; 00050 00051 } gcpFullFATErrorTable[] = 00052 { 00053 {"Unknown or Generic Error! - Please contact FullFAT DEV - james@worm.me.uk", -1000}, 00054 {"No Error.", FF_ERR_NONE}, 00055 {"Null Pointer provided, (probably for IOMAN).", FF_ERR_NULL_POINTER}, 00056 {"Not enough memory (malloc() returned NULL).", FF_ERR_NOT_ENOUGH_MEMORY}, 00057 {"Device Driver returned a FATAL error!.", FF_ERR_DEVICE_DRIVER_FAILED}, 00058 {"The blocksize is not 512 multiple.", FF_ERR_IOMAN_BAD_BLKSIZE}, 00059 {"The memory size, is not a multiple of the blocksize. (Atleast 2 Blocks).", FF_ERR_IOMAN_BAD_MEMSIZE}, 00060 {"Device is already registered, use FF_UnregisterBlkDevice() first.", FF_ERR_IOMAN_DEV_ALREADY_REGD}, 00061 {"No mountable partition was found on the specified device.", FF_ERR_IOMAN_NO_MOUNTABLE_PARTITION}, 00062 {"The format of the MBR was unrecognised.", FF_ERR_IOMAN_INVALID_FORMAT}, 00063 {"The provided partition number is out-of-range (0 - 3).", FF_ERR_IOMAN_INVALID_PARTITION_NUM}, 00064 {"The selected partition / volume doesn't appear to be FAT formatted.", FF_ERR_IOMAN_NOT_FAT_FORMATTED}, 00065 {"Cannot register device. (BlkSize not a multiple of 512).", FF_ERR_IOMAN_DEV_INVALID_BLKSIZE}, 00066 {"Cannot unregister device, a partition is still mounted.", FF_ERR_IOMAN_PARTITION_MOUNTED}, 00067 {"Cannot unmount the partition while there are active FILE handles.", FF_ERR_IOMAN_ACTIVE_HANDLES}, 00068 {"The GPT partition header appears to be corrupt, refusing to mount.", FF_ERR_IOMAN_GPT_HEADER_CORRUPT}, 00069 {"Cannot open the file, file already in use.", FF_ERR_FILE_ALREADY_OPEN}, 00070 {"The specified file could not be found.", FF_ERR_FILE_NOT_FOUND}, 00071 {"Cannot open a Directory.", FF_ERR_FILE_OBJECT_IS_A_DIR}, 00072 {"Cannot open for writing: File is marked as Read-Only.", FF_ERR_FILE_IS_READ_ONLY}, 00073 {"Path not found.", FF_ERR_FILE_INVALID_PATH}, 00074 {"A file or folder of the same name already exists.", FF_ERR_DIR_OBJECT_EXISTS}, 00075 {"FF_ERR_DIR_DIRECTORY_FULL", FF_ERR_DIR_DIRECTORY_FULL}, 00076 {"FF_ERR_DIR_END_OF_DIR", FF_ERR_DIR_END_OF_DIR}, 00077 {"The directory is not empty.", FF_ERR_DIR_NOT_EMPTY}, 00078 {"Could not extend File or Folder - No Free Space!", FF_ERR_FAT_NO_FREE_CLUSTERS}, 00079 {"Could not find the directory specified by the path.", FF_ERR_DIR_INVALID_PATH}, 00080 {"The Root Dir is full, and cannot be extended on Fat12 or 16 volumes.", FF_ERR_DIR_CANT_EXTEND_ROOT_DIR}, 00081 {"File operation failed - the file was not opened for writing.", FF_ERR_FILE_NOT_OPENED_IN_WRITE_MODE}, 00082 {"File operation failed - the file was not opened for reading.", FF_ERR_FILE_NOT_OPENED_IN_READ_MODE}, 00083 {"File operation failed - could not extend file.", FF_ERR_FILE_EXTEND_FAILED}, 00084 {"Destination file already exists.", FF_ERR_FILE_DESTINATION_EXISTS}, 00085 {"Source file was not found.", FF_ERR_FILE_SOURCE_NOT_FOUND}, 00086 {"Destination path (dir) was not found.", FF_ERR_FILE_DIR_NOT_FOUND}, 00087 {"Failed to create the directory Entry.", FF_ERR_FILE_COULD_NOT_CREATE_DIRENT}, 00088 {"Not enough free disk space to complete the disk transaction.", FF_ERR_IOMAN_NOT_ENOUGH_FREE_SPACE}, 00089 {"Attempted to Read a sector out of bounds.", FF_ERR_IOMAN_OUT_OF_BOUNDS_READ}, 00090 {"Attempted to Write a sector out of bounds.", FF_ERR_IOMAN_OUT_OF_BOUNDS_WRITE}, 00091 }; 00092 00102 const FF_T_INT8 *FF_GetErrMessage(FF_ERROR iErrorCode) { 00103 FF_T_UINT32 stCount = sizeof (gcpFullFATErrorTable) / sizeof ( struct _FFERRTAB); 00104 while (stCount--){ 00105 if (gcpFullFATErrorTable[stCount].iErrorCode == iErrorCode) { 00106 return gcpFullFATErrorTable[stCount].strErrorString; 00107 } 00108 } 00109 return gcpFullFATErrorTable[0].strErrorString; 00110 } 00111 #endif Generated on Sun May 27 2012 04:34:05 for ReactOS by
1.7.6.1
|