]> cloudbase.mooo.com Git - z180-stamp.git/blame - fatfs/documents/doc/rc.html
Merge branch 'chan-fatfs' into fatfs-integration
[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
L
13<h1>Return Code of API Functions</h1>\r
14<p>Most of API functions return common result code as 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
L
24<dt id="ie">FR_INT_ERR</dt>\r
25<dd>Assertion failed. An insanity is detected in the internal process. One of the following possibilities is suspected.\r
26<ul>\r
7b78a5a2 27<li>Work area (file system object, file object or etc...) has been broken by stack overflow or any other tasks. 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
L
31</ul>\r
32Note that if once this error occured at any operation to an open file, the file object is aborted and all operations to the file except for close will be rejected.\r
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
41<li>The storage device has been broken.</li>\r
42</ul>\r
43</dd>\r
70702af1 44\r
53668523
L
45<dt id="nf">FR_NO_FILE</dt>\r
46<dd>Could not find the file.</dd>\r
70702af1 47\r
53668523
L
48<dt id="np">FR_NO_PATH</dt>\r
49<dd>Could not find the path.</dd>\r
70702af1 50\r
53668523 51<dt id="in">FR_INVALID_NAME</dt>\r
289f6a14
L
52<dd>The given string is invalid as the <a href="filename.html">path name</a>. One of the following possibilities is suspected.\r
53<ul>\r
54<li>There is any character not allowed for the file name.</li>\r
55<li>The string is out of 8.3 format. (at non-LFN cfg.)</li>\r
56<li><tt>FF_MAX_LFN</tt> is insufficient for the file name. (at LFN cfg.)</li>\r
57<li>There is any character encoding error in the string.</li>\r
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
64<li>Write mode open against the read-only file.</li>\r
65<li>Deleting the read-only file or directory.</li>\r
66<li>Deleting the non-empty directory or current directory.</li>\r
67<li>Reading the file opened without <tt>FA_READ</tt> flag.</li>\r
68<li>Any modification to the file opened without <tt>FA_WRITE</tt> flag.</li>\r
70702af1
L
69<li>Could not create the object due to root directory full or disk full.</li>\r
70<li>Could not allocate a contiguous area to the file.</li>\r
53668523
L
71</ul>\r
72</dd>\r
70702af1 73\r
53668523 74<dt id="ex">FR_EXIST</dt>\r
70702af1
L
75<dd>Name collision. An object with the same name is already existing.</dd>\r
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
289f6a14
L
80<li>It has been closed, or collapsed.</li>\r
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
289f6a14 90<dd>Invalid drive number is specified in the path name. 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
289f6a14 96<dd>There is no valid FAT volume on the drive or wrong lower layer implementation.</dd>\r
70702af1 97\r
53668523 98<dt id="ma">FR_MKFS_ABORTED</dt>\r
70702af1 99<dd>The <tt>f_mkfs</tt> function aborted before start in format due to a reason as follows:\r
53668523 100<ul>\r
289f6a14
L
101<li>It is impossible to format with the given parameters.</li>\r
102<li>The size of volume is too small. 128 sectors minimum with <tt>FM_SFD</tt>.</li>\r
103<li>The partition bound to the logical drive coulud not be found. (Related option: <tt><a href="config.html#multi_partition">FF_MULTI_PARTITION</a></tt>)</li>\r
53668523
L
104</ul>\r
105</dd>\r
70702af1 106\r
53668523 107<dt id="tm">FR_TIMEOUT</dt>\r
289f6a14 108<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 109\r
53668523 110<dt id="lo">FR_LOCKED</dt>\r
289f6a14 111<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 112\r
53668523
L
113<dt id="nc">FR_NOT_ENOUGH_CORE</dt>\r
114<dd>Not enough memory for the operation. There is one of the following reasons:\r
115<ul>\r
289f6a14 116<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 117<li>Size of the given buffer is insufficient for the size required.</li>\r
53668523
L
118</ul>\r
119</dd>\r
70702af1 120\r
53668523 121<dt id="tf">FR_TOO_MANY_OPEN_FILES</dt>\r
289f6a14 122<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 123\r
53668523 124<dt id="ip">FR_INVALID_PARAMETER</dt>\r
70702af1 125<dd>The given parameter is invalid or there is an inconsistent for the volume.</dd>\r
53668523
L
126</dl>\r
127\r
70702af1 128<p class="foot"><a href="../00index_e.html">Return</a></p>\r
53668523
L
129</body>\r
130</html>\r