The f_getlabel function returns volume label and volume serial number of a volume.
FRESULT f_getlabel ( const TCHAR* path, /* [IN] Drive number */ TCHAR* label, /* [OUT] Volume label */ DWORD* vsn /* [OUT] Volume serial number */ );
Configuration | FF_FS_EXFAT == 0 | FF_FS_EXFAT == 1 |
FF_USE_LFN == 0 | 12 items | - |
FF_LFN_UNICODE == 0 | 12 items | 23 items |
FF_LFN_UNICODE == 1/3 | 12 items | 12 items |
FF_LFN_UNICODE == 2 | 34 items | 34 items |
FR_OK, FR_DISK_ERR, FR_INT_ERR, FR_NOT_READY, FR_INVALID_DRIVE, FR_NOT_ENABLED, FR_NO_FILESYSTEM, FR_TIMEOUT
Available when FF_USE_LABEL == 1.
char str[12]; /* Get volume label of the default drive */ f_getlabel("", str, 0); /* Get volume label of the drive 2 */ f_getlabel("2:", str, 0);