CTL_STATUS_t ctl_ms_sense_total_sectors(const char *volume);

ctl_ms_sense_total_sectors senses the total number of sectors that the volume volume can hold. For MMC and SD cards, ctl_ms_sense_total_sectors reads the appropriate registers from the media and computes the total number of 512-byte sectors.

ctl_ms_sense_total_sectors will return an error code if the total number of sectors cannot be determined.