From 289f6a146c0b2087607d8d8659531ea90142779a Mon Sep 17 00:00:00 2001 From: Leo C Date: Sun, 27 May 2018 21:26:38 +0200 Subject: Import fatfs R0.13b --- fatfs/documents/doc/setlabel.html | 92 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 fatfs/documents/doc/setlabel.html (limited to 'fatfs/documents/doc/setlabel.html') diff --git a/fatfs/documents/doc/setlabel.html b/fatfs/documents/doc/setlabel.html new file mode 100644 index 0000000..c50db18 --- /dev/null +++ b/fatfs/documents/doc/setlabel.html @@ -0,0 +1,92 @@ + + + + + + + + +FatFs - f_setlabel + + + + +
+

f_setlabel

+

The f_setlabel function sets/removes the label of a volume.

+
+FRESULT f_setlabel (
+  const TCHAR* label  /* [IN] Volume label to be set */
+);
+
+
+ +
+

Parameters

+
+
label
+
Pointer to the null-terminated string that specifies the volume label to be set.
+
+
+ + +
+

Return Values

+

+FR_OK, +FR_DISK_ERR, +FR_INT_ERR, +FR_NOT_READY, +FR_INVALID_NAME, +FR_WRITE_PROTECTED, +FR_INVALID_DRIVE, +FR_NOT_ENABLED, +FR_NO_FILESYSTEM, +FR_TIMEOUT +

+
+ + +
+

Description

+

When the string has a drive prefix, the volume label will be set to the volume specified by the drive prefix. Unix style volume ID cannot be used to specify the volume. If drive number is not specified, the volume label will be set to the default drive. If length of the given volume label is zero, the volume label on the volume will be removed. The format of the volume label is as shown below:

+ +

Remark: The standard system (Windows) has a problem at the volume label with a heading \xE5 on the FAT volume. To avoid this problem, this function rejects such volume label as invalid name.

+
+ +
+

QuickInfo

+

Available when FF_FS_READONLY == 0 and FF_USE_LABEL == 1.

+
+ + +
+

Example

+
+    /* Set volume label to the default drive */
+    f_setlabel("DATA DISK");
+
+    /* Set volume label to the drive 2 */
+    f_setlabel("2:DISK 3 OF 4");
+
+    /* Remove volume label of the drive 2 */
+    f_setlabel("2:");
+
+
+ + +
+

See Also

+f_getlabel +
+ + +

Return

+ + -- cgit v1.2.3