Synopsis
typedef enum {
CTL_MS_NOT_OPEN_ERROR,
CTL_MS_NAME_ERROR,
CTL_MS_READONLY_ERROR,
CTL_MS_SEEK_ERROR,
CTL_MS_MODE_ERROR,
CTL_MS_DISK_FULL_ERROR,
CTL_MS_PATH_NOT_FOUND,
CTL_MS_DIR_NOT_EMPTY_ERROR,
CTL_MS_DIR_FULL_ERROR,
CTL_MS_NOT_FOUND_ERROR,
CTL_MS_IN_USE_ERROR,
CTL_MS_ACCESS_ERROR,
CTL_MS_EXISTS_ERROR,
CTL_MS_BAD_FAT_ERROR,
CTL_MS_READ_PAST_EOF_ERROR,
CTL_MS_MEDIA_REMOVED_ERROR,
CTL_MS_NO_FILESYSTEM_ERROR,
CTL_MS_UNSUPPORTED_MEDIA_ERROR,
CTL_MS_BAD_VOLUME_ERROR,
CTL_MS_NOT_MOUNTED_ERROR,
CTL_MS_CONFIGURATION_ERROR,
CTL_MS_DELAYED_WRITE_ERROR,
CTL_MS_CACHE_FULL,
CTL_MS_INTERNAL_ERROR,
CTL_MS_UNSUPPORTED_OPERATION,
CTL_MS_MEDIA_LOCKED,
CTL_MS_SD_ERROR
} CTL_MS_ERROR_t;
Description
CTL_MS_ERROR_t defines the errors reported by the Mass Storage Library.
-
CTL_MS_NO_FILESYSTEM_ERROR
- No file system found on media. This this indicates that
when attempting to mount the first file system on an
MBR-partitioned disk, the MBR did not contain an active entry
for any of the MBR partitions.
-
CTL_MS_UNSUPPORTED_MEDIA_ERROR
- Media is not supported. This indicates that the volume,
although it's a FAT volume, is not supported by the release
of the mass storage library. Alternatively, it can be that
the low-level media drivers have detected that the physical
format of the media and its interface cannot be supported because
of incompatibilities at the physical layer.
-
CTL_MS_BAD_VOLUME_ERROR
- Volume is invalid. This indicates that the mass storage
library detected an error in the format of the FAT volume when
mounting it. This can indicate that the volume is simply not
a FAT volume or that there is a more serious issue with the
layout of the volume headers. If you can, mount the volume in
a PC and check its integrity.
-
CTL_MS_NOT_MOUNTED_ERROR
- File system is not mounted. This indicates that a file operation
was requested on a volume that is not mounted.
-
CTL_MS_CONFIGURATION_ERROR
- Library configuration error. This indicates that the library has
been compiled incorrectly and the internal checks on data structure
layout and sizes has failed. Please check the compilation options
you provided that affect the compiler's data layout.
-
CTL_MS_DELAYED_WRITE_ERROR
- Write error flushing sector cache. This indicates that the delayed
write of a dirty sector to the media failed.
-
CTL_MS_CACHE_FULL
- Sector cache is full. This indicates that the mass storage library required
a sector to be read into the sector cache but all sectors in
the sector cache are already locked which precludes reading
the requested sector. This can happen if you open may files
and simultaneously write to them without ensuring that the
sector cache is created with at least one sector cache entry
per open file.
-
CTL_MS_CACHE_FULL
- Internal mass storage error. This this indicates that the mass storage library detected
an error that should not happen. Even though the mass storage
library is well-tested, there are internal checks in the library
to ensure proper operation. If you receive this error, it could
show a real error in the mass storage library, but more likely is
an error in user code that has corrupted the data structures
maintained by the mass storage library.
-
CTL_MS_UNSUPPORTED_OPERATION
- Unsupported operation. This indicates that an operation was
requested and is not appropriate, or cannot be honored, given
the parameters supplied. For instance, requesting the CID from a
volume that is not an SD or MMC card is not appropriate and results
in this error.
-
CTL_MS_MEDIA_LOCKED
- Media is locked. This this indicates that a volume cannot
be ejected by ctl_ms_unmount_volume because a client has a
sector on the volume locked for read or write.