rc.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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=utf-8">
  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/rc.html">
  8. <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
  9. <title>FatFs - API Return Code</title>
  10. </head>
  11. <body>
  12. <h1>Return Code of API Functions</h1>
  13. <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>
  14. <dl class="ret">
  15. <dt id="ok">FR_OK (0)</dt>
  16. <dd>The function succeeded.</dd>
  17. <dt id="de">FR_DISK_ERR</dt>
  18. <dd>An unrecoverable hard error occured in the lower layer, <tt>disk_read</tt>, <tt>disk_write</tt> or <tt>disk_ioctl</tt> function.<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>
  19. <dt id="ie">FR_INT_ERR</dt>
  20. <dd>Assertion failed. An insanity is detected in the internal process. One of the following possibilities is suspected.
  21. <ul>
  22. <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>
  23. <li>There is an error of the FAT structure on the volume.</li>
  24. <li>There is a bug in the FatFs module itself.</li>
  25. </ul>
  26. 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.
  27. </dd>
  28. <dt id="nr">FR_NOT_READY</dt>
  29. <dd>The storage device cannot work due to a failure of <a href="dinit.html"><tt>disk_initialize</tt></a> function due to no medium or any other reason.</dd>
  30. <dt id="nf">FR_NO_FILE</dt>
  31. <dd>Could not find the file.</dd>
  32. <dt id="np">FR_NO_PATH</dt>
  33. <dd>Could not find the path.</dd>
  34. <dt id="in">FR_INVALID_NAME</dt>
  35. <dd>The given string is invalid as the <a href="filename.html">path name</a>.</dd>
  36. <dt id="dn">FR_DENIED</dt>
  37. <dd>The required access was denied due to one of the following reasons:
  38. <ul>
  39. <li>Write mode open against the read-only file.</li>
  40. <li>Deleting the read-only file or directory.</li>
  41. <li>Deleting the non-empty directory or current directory.</li>
  42. <li>Reading the file opened without <tt>FA_READ</tt> flag.</li>
  43. <li>Any modification to the file opened without <tt>FA_WRITE</tt> flag.</li>
  44. <li>Could not create the object due to root directory full or disk full.</li>
  45. <li>Could not allocate a contiguous area to the file.</li>
  46. </ul>
  47. </dd>
  48. <dt id="ex">FR_EXIST</dt>
  49. <dd>Name collision. An object with the same name is already existing.</dd>
  50. <dt id="io">FR_INVALID_OBJECT</dt>
  51. <dd>The file/directory object is invalid or a null pointer is given. There are some reasons as follows:
  52. <ul>
  53. <li>It has been closed, it has not been opened or it has been collapsed.</li>
  54. <li>It has been invalidated by a voulme mount process. Open objects on the volume are invalidated by voulme mount process.</li>
  55. <li>Physical drive is not ready to work due to a media removal.</li>
  56. </ul>
  57. </dd>
  58. <dt id="wp">FR_WRITE_PROTECTED</dt>
  59. <dd>A write mode operation against the write-protected media.</dd>
  60. <dt id="id">FR_INVALID_DRIVE</dt>
  61. <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">_VOLUMES</a></tt>)</dd>
  62. <dt id="ne">FR_NOT_ENABLED</dt>
  63. <dd>Work area for the logical drive has not been registered by <tt>f_mount</tt> function.</dd>
  64. <dt id="ns">FR_NO_FILESYSTEM</dt>
  65. <dd>There is no valid FAT volume on the drive.</dd>
  66. <dt id="ma">FR_MKFS_ABORTED</dt>
  67. <dd>The <tt>f_mkfs</tt> function aborted before start in format due to a reason as follows:
  68. <ul>
  69. <li>It is pmpossible to formart with the given parameters.</li>
  70. <li>The size of volume is too small.</li>
  71. <li>The size of given work area is too small.</li>
  72. <li>The partition bound to the logical drive coulud not be found. (Related option: <tt><a href="config.html#multi_partition">_MULTI_PARTITION</a></tt>)</li>
  73. </ul>
  74. </dd>
  75. <dt id="tm">FR_TIMEOUT</dt>
  76. <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">_TIMEOUT</a></tt>)</dd>
  77. <dt id="lo">FR_LOCKED</dt>
  78. <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">_FS_LOCK</a></tt>)</dd>
  79. <dt id="nc">FR_NOT_ENOUGH_CORE</dt>
  80. <dd>Not enough memory for the operation. There is one of the following reasons:
  81. <ul>
  82. <li>Could not allocate a memory for LFN working buffer. (Related option: <tt><a href="config.html#use_lfn">_USE_LFN</a></tt>)</li>
  83. <li>Size of the given buffer is insufficient for the size required.</li>
  84. </ul>
  85. </dd>
  86. <dt id="tf">FR_TOO_MANY_OPEN_FILES</dt>
  87. <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">_FS_LOCK</a></tt>)</dd>
  88. <dt id="ip">FR_INVALID_PARAMETER</dt>
  89. <dd>The given parameter is invalid or there is an inconsistent for the volume.</dd>
  90. </dl>
  91. <p class="foot"><a href="../00index_e.html">Return</a></p>
  92. </body>
  93. </html>