]> cloudbase.mooo.com Git - z180-stamp.git/blob - fatfs/doc/en/getlabel.html
Import fatfs R0.12b
[z180-stamp.git] / fatfs / doc / en / getlabel.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <link rel="up" title="FatFs" href="../00index_e.html">
7 <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getlabel.html">
8 <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
9 <title>FatFs - f_getlabel</title>
10 </head>
11
12 <body>
13
14 <div class="para func">
15 <h2>f_getlabel</h2>
16 <p>The f_getlabel function returns volume label and volume serial number of a drive.</p>
17 <pre>
18 FRESULT f_getlabel (
19 const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Drive number */</span>
20 TCHAR* <span class="arg">label</span>, <span class="c">/* [OUT] Volume label */</span>
21 DWORD* <span class="arg">vsn</span> <span class="c">/* [OUT] Volume serial number */</span>
22 );
23 </pre>
24 </div>
25
26 <div class="para arg">
27 <h4>Parameters</h4>
28 <dl class="par">
29 <dt>path</dt>
30 <dd>Pointer to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. Null-string specifies the default drive.</dd>
31 <dt>label</dt>
32 <dd>Pointer to the buffer to store the volume label. The buffer size must be at least 24 items at <tt>_LFN_UNICODE == 0</tt> or 12 items at <tt>_LFN_UNICODE == 1</tt>. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed.</dd>
33 <dt>vsn</dt>
34 <dd>Pointer to the <tt>DWORD</tt> variable to store the volume serial number. Set null pointer if this information is not needed.</dd>
35 </dl>
36 </div>
37
38
39 <div class="para ret">
40 <h4>Return Values</h4>
41 <p>
42 <a href="rc.html#ok">FR_OK</a>,
43 <a href="rc.html#de">FR_DISK_ERR</a>,
44 <a href="rc.html#ie">FR_INT_ERR</a>,
45 <a href="rc.html#nr">FR_NOT_READY</a>,
46 <a href="rc.html#id">FR_INVALID_DRIVE</a>,
47 <a href="rc.html#ne">FR_NOT_ENABLED</a>,
48 <a href="rc.html#ns">FR_NO_FILESYSTEM</a>,
49 <a href="rc.html#tm">FR_TIMEOUT</a>
50 </p>
51 </div>
52
53
54 <div class="para comp">
55 <h4>QuickInfo</h4>
56 <p>Available when <tt>_USE_LABEL == 1</tt>.</p>
57 </div>
58
59
60 <div class="para use">
61 <h4>Example</h4>
62 <pre>
63 char str[24];
64
65 <span class="c">/* Get volume label of the default drive */</span>
66 f_getlabel("", str, 0);
67
68 <span class="c">/* Get volume label of the drive 2 */</span>
69 f_getlabel("2:", str, 0);
70 </pre>
71 </div>
72
73
74 <div class="para ref">
75 <h4>See Also</h4>
76 <tt><a href="setlabel.html">f_setlabel</a></tt>
77 </div>
78
79
80 <p class="foot"><a href="../00index_e.html">Return</a></p>
81 </body>
82 </html>