]> cloudbase.mooo.com Git - z180-stamp.git/blame - fatfs/documents/doc/rc.html
Import fatfs R0.15
[z180-stamp.git] / fatfs / documents / doc / rc.html
CommitLineData
53668523
L
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
2<html lang="en">\r
3<head>\r
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
5<meta http-equiv="Content-Style-Type" content="text/css">\r
6<link rel="up" title="FatFs" href="../00index_e.html">\r
7<link rel="alternate" hreflang="ja" title="Japanese" href="../ja/rc.html">\r
8<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r
70702af1 9<title>FatFs - API Return Code</title>\r
53668523
L
10</head>\r
11\r
12<body>\r
70702af1 13<h1>Return Code of API Functions</h1>\r
5630b930 14<p>Most of API functions return common result code in enum type <tt>FRESULT</tt>. When an API function succeeded, it returns zero (<tt>FR_OK</tt>), otherwise it returns non-zero value indicates type of error.</p>\r
53668523
L
15\r
16<dl class="ret">\r
70702af1 17\r
53668523
L
18<dt id="ok">FR_OK (0)</dt>\r
19<dd>The function succeeded.</dd>\r
70702af1 20\r
53668523 21<dt id="de">FR_DISK_ERR</dt>\r
289f6a14 22<dd>The lower layer, <tt>disk_read</tt>, <tt>disk_write</tt> or <tt>disk_ioctl</tt> function, reported that an unrecoverable hard error occured.<br>Note that if once this error occured at any operation to an open file, the file object is aborted and any operations to the file except for close will be rejected.</dd>\r
70702af1 23\r
53668523 24<dt id="ie">FR_INT_ERR</dt>\r
5630b930 25<dd>Assertion failed and an insanity is detected in the internal process. One of the following possibilities is suspected.\r
53668523 26<ul>\r
5630b930 27<li>Work area (file system object, file object or etc...) has been broken by stack overflow or something. This is the reason in most case.</li>\r
70702af1
L
28<li>There is an error of the FAT structure on the volume.</li>\r
29<li>There is a bug in the FatFs module itself.</li>\r
289f6a14 30<li>Wrong lower layer implementation.</li>\r
53668523 31</ul>\r
5630b930 32Note that if once this error occured in the operation to an open file, the file object is aborted and any operation to the file except for close will be rejected.\r
53668523 33</dd>\r
70702af1 34\r
53668523 35<dt id="nr">FR_NOT_READY</dt>\r
289f6a14
L
36<dd>The lower layer, <a href="dinit.html"><tt>disk_initialize</tt></a> function, reported that the storage device could not be got ready to work. One of the following possibilities is suspected.\r
37<ul>\r
38<li>No medium in the drive.</li>\r
39<li>Wrong lower layer implementation.</li>\r
40<li>Wrong hardware configuration.</li>\r
5630b930 41<li>The storage device has broken.</li>\r
289f6a14
L
42</ul>\r
43</dd>\r
70702af1 44\r
53668523 45<dt id="nf">FR_NO_FILE</dt>\r
5630b930 46<dd>Could not find the file in the directory.</dd>\r
70702af1 47\r
53668523 48<dt id="np">FR_NO_PATH</dt>\r
5630b930 49<dd>Could not find the path. A directory in the path name could not be found.</dd>\r
70702af1 50\r
53668523 51<dt id="in">FR_INVALID_NAME</dt>\r
5630b930 52<dd>The given string is invalid as a <a href="filename.html">path name</a>. One of the following possibilities is suspected.\r
289f6a14 53<ul>\r
5630b930
L
54<li>There is a character not allowed for the file name.</li>\r
55<li>The file name is out of 8.3 format. (at non-LFN cfg.)</li>\r
289f6a14 56<li><tt>FF_MAX_LFN</tt> is insufficient for the file name. (at LFN cfg.)</li>\r
5630b930 57<li>There is a character encoding error in the string.</li>\r
289f6a14
L
58</ul>\r
59</dd>\r
70702af1 60\r
53668523
L
61<dt id="dn">FR_DENIED</dt>\r
62<dd>The required access was denied due to one of the following reasons:\r
63<ul>\r
5630b930
L
64<li>Write mode open against the read-only file. (f_open)</li>\r
65<li>Deleting the read-only file or directory. (f_unlink)</li>\r
66<li>Deleting the non-empty directory or current directory. (f_unlink)</li>\r
67<li>Reading the file opened without <tt>FA_READ</tt> flag. (f_read)</li>\r
68<li>Any modification to the file opened without <tt>FA_WRITE</tt> flag. (f_write, f_truncate, f_expand)</li>\r
69<li>Could not create the object due to root directory full or disk full. (f_open, f_mkdir)</li>\r
70<li>Could not find a contiguous area for the file. (f_expand)</li>\r
53668523
L
71</ul>\r
72</dd>\r
70702af1 73\r
53668523 74<dt id="ex">FR_EXIST</dt>\r
5630b930 75<dd>Name collision. An object with the same name is already existing in the directory.</dd>\r
70702af1 76\r
53668523 77<dt id="io">FR_INVALID_OBJECT</dt>\r
70702af1
L
78<dd>The file/directory object is invalid or a null pointer is given. There are some reasons as follows:\r
79<ul>\r
5630b930 80<li>It has been closed, or the structure has been collapsed.</li>\r
289f6a14 81<li>It has been invalidated. Open objects on the volume are invalidated by voulme mount process.</li>\r
70702af1
L
82<li>Physical drive is not ready to work due to a media removal.</li>\r
83</ul>\r
84</dd>\r
85\r
53668523 86<dt id="wp">FR_WRITE_PROTECTED</dt>\r
70702af1
L
87<dd>A write mode operation against the write-protected media.</dd>\r
88\r
53668523 89<dt id="id">FR_INVALID_DRIVE</dt>\r
5630b930 90<dd>Invalid drive number is specified in the path name or a null pointer is given as the path name. (Related option: <tt><a href="config.html#volumes">FF_VOLUMES</a></tt>)</dd>\r
70702af1 91\r
53668523 92<dt id="ne">FR_NOT_ENABLED</dt>\r
70702af1
L
93<dd>Work area for the logical drive has not been registered by <tt>f_mount</tt> function.</dd>\r
94\r
53668523 95<dt id="ns">FR_NO_FILESYSTEM</dt>\r
5630b930
L
96<dd>Valid FAT volume could not be found in the drive. One of the following possibilities is suspected.\r
97<ul>\r
98<li>The FAT volume on the drive is collapsed.</li>\r
99<li>Wrong lower layer implementation.</li>\r
100<li>Wrong <tt>VolToPart[]</tt> settings. (<tt>FF_MULTI_PARTITION = 1</tt>)</li>\r
101</ul></dd>\r
70702af1 102\r
53668523 103<dt id="ma">FR_MKFS_ABORTED</dt>\r
70702af1 104<dd>The <tt>f_mkfs</tt> function aborted before start in format due to a reason as follows:\r
53668523 105<ul>\r
5630b930
L
106<li>It is impossible to create the volume with the given conditions.</li>\r
107<li>The size of the volume is too small. 128 sectors minimum with <tt>FM_SFD</tt> option.</li>\r
108<li>The partition associated with the logical drive is not exist. (Related option: <tt><a href="config.html#multi_partition">FF_MULTI_PARTITION</a></tt>)</li>\r
53668523
L
109</ul>\r
110</dd>\r
70702af1 111\r
53668523 112<dt id="tm">FR_TIMEOUT</dt>\r
289f6a14 113<dd>The function was canceled due to a timeout of <a href="appnote.html#reentrant">thread-safe control</a>. (Related option: <tt><a href="config.html#timeout">FF_TIMEOUT</a></tt>)</dd>\r
70702af1 114\r
53668523 115<dt id="lo">FR_LOCKED</dt>\r
289f6a14 116<dd>The operation to the object was rejected by <a href="appnote.html#dup">file sharing control</a>. (Related option: <tt><a href="config.html#fs_lock">FF_FS_LOCK</a></tt>)</dd>\r
70702af1 117\r
53668523
L
118<dt id="nc">FR_NOT_ENOUGH_CORE</dt>\r
119<dd>Not enough memory for the operation. There is one of the following reasons:\r
120<ul>\r
289f6a14 121<li>Could not allocate a memory for LFN working buffer. (Related option: <tt><a href="config.html#use_lfn">FF_USE_LFN</a></tt>)</li>\r
7b78a5a2 122<li>Size of the given buffer is insufficient for the size required.</li>\r
53668523
L
123</ul>\r
124</dd>\r
70702af1 125\r
53668523 126<dt id="tf">FR_TOO_MANY_OPEN_FILES</dt>\r
289f6a14 127<dd>Number of open objects has been reached maximum value and no more object can be opened. (Related option: <tt><a href="config.html#fs_lock">FF_FS_LOCK</a></tt>)</dd>\r
70702af1 128\r
53668523 129<dt id="ip">FR_INVALID_PARAMETER</dt>\r
70702af1 130<dd>The given parameter is invalid or there is an inconsistent for the volume.</dd>\r
53668523
L
131</dl>\r
132\r
70702af1 133<p class="foot"><a href="../00index_e.html">Return</a></p>\r
53668523
L
134</body>\r
135</html>\r