X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/70702af1370e44e32fb2c3c507e4759a187b4fe5:/fatfs/doc/en/getlabel.html..289f6a146c0b2087607d8d8659531ea90142779a:/fatfs/documents/doc/getlabel.html diff --git a/fatfs/doc/en/getlabel.html b/fatfs/documents/doc/getlabel.html similarity index 67% rename from fatfs/doc/en/getlabel.html rename to fatfs/documents/doc/getlabel.html index cec65aa..dfe067d 100644 --- a/fatfs/doc/en/getlabel.html +++ b/fatfs/documents/doc/getlabel.html @@ -1,7 +1,7 @@ - + @@ -13,7 +13,7 @@

f_getlabel

-

The f_getlabel function returns volume label and volume serial number of a drive.

+

The f_getlabel function returns volume label and volume serial number of a volume.

 FRESULT f_getlabel (
   const TCHAR* path,  /* [IN] Drive number */
@@ -29,7 +29,15 @@ FRESULT f_getlabel (
 
path
Pointer to the null-terminated string that specifies the logical drive. Null-string specifies the default drive.
label
-
Pointer to the buffer to store the volume label. The buffer size must be at least 24 items at _LFN_UNICODE == 0 or 12 items at _LFN_UNICODE == 1. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed.
+
Pointer to the buffer to store the volume label. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed. The buffer size should be shown below at least to avoid buffer overflow.
+ + + + + + +
ConfigurationFF_FS_EXFAT == 0FF_FS_EXFAT == 1
FF_USE_LFN == 012 items-
FF_LFN_UNICODE == 012 items23 items
FF_LFN_UNICODE == 1/312 items12 items
FF_LFN_UNICODE == 234 items34 items
+
vsn
Pointer to the DWORD variable to store the volume serial number. Set null pointer if this information is not needed.
@@ -53,20 +61,20 @@ FRESULT f_getlabel (

QuickInfo

-

Available when _USE_LABEL == 1.

+

Available when FF_USE_LABEL == 1.

Example

-    char str[24];
+    char str[12];
 
     /* Get volume label of the default drive */
-    f_getlabel("", str, 0);
+    f_getlabel("", str, 0);
 
     /* Get volume label of the drive 2 */
-    f_getlabel("2:", str, 0);
+    f_getlabel("2:", str, 0);