<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>
<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 all operations to the file except for close will be rejected.</dd>
Note 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.
<dd>The lower layer, <ahref="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.
<ul>
<li>No medium in the drive.</li>
<li>Wrong lower layer implementation for the storage device.</li>
<dd>Invalid drive number is specified in the path name. A null pointer is given as the path name. (Related option: <tt><ahref="config.html#volumes">_VOLUMES</a></tt>)</dd>
<li>It is pmpossible to formart with the given parameters.</li>
<li>The size of volume is too small.</li>
<li>The size of given work area is too small.</li>
<li>The partition bound to the logical drive coulud not be found. (Related option: <tt><ahref="config.html#multi_partition">_MULTI_PARTITION</a></tt>)</li>
<dd>The function was canceled due to a timeout of <ahref="appnote.html#reentrant">thread-safe control</a>. (Related option: <tt><ahref="config.html#timeout">_TIMEOUT</a></tt>)</dd>
<dd>The operation to the object was rejected by <ahref="appnote.html#dup">file sharing control</a>. (Related option: <tt><ahref="config.html#fs_lock">_FS_LOCK</a></tt>)</dd>
<dd>Number of open objects has been reached maximum value and no more object can be opened. (Related option: <tt><ahref="config.html#fs_lock">_FS_LOCK</a></tt>)</dd>