You are currently viewing the documentation for:
ECF_GetBlockDriverStatistics
The ECF_GetBlockDriverStatistics function returns statistics about a block device.
ECF_ErrorCode ECF_GetBlockDriverStatistics(
   struct ECF_BlockDriver *pBlockDriver,
   uint16_t statisticsType,
   uint32_t *pValue
);
Parameters
pBlockDriver
This is a pointer to the ECF_BlockDriver struct that allows the file system to access your block device.
statisticsType
Selects the value you want to retrieve.
ECF_STATISTICS_HIGHEST_WRITE_COUNT_SEEN:
The highest write count seen on a wear-leveled block device. Note that the function will only report the highest write count seen during this session so you should ideally call it after you've done reads and writes to the disc or periodically. Calling it at start-up will return a value that is too low in most cases. Only available if ECF_OPT_SUPPORT_WEARLEVEL is defined.
ECF_STATISTICS_BAD_BLOCKS_DETECTED:
The number of bad blocks detected on the disk. Only available if ECF_OPT_SUPPORT_WEARLEVEL and ECF_OPT_SUPPORT_BAD_BLOCK_MANAGEMENT is defined.
ECF_STATISTICS_BAD_BLOCKS_SUPPORTED:
The maximum number of allowed bad blocks on the disk. Only available if ECF_OPT_SUPPORT_WEARLEVEL and ECF_OPT_SUPPORT_BAD_BLOCK_MANAGEMENT is defined.
pValue
This is a pointer to a uint32_t that will receive the value requested.
Return value
Returns one of the EcFAT error codes (ECFERR_SUCCESS on success)