rc.html 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 - Return Codes</title>
  10. </head>
  11. <body>
  12. <h1>Return Code of the File Functions</h1>
  13. <p>On the FatFs API, most of file functions return common result code as enum type. When a function succeeded, it returns zero, otherwise returns non-zero value that 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 error occured in the lower layer (disk I/O functions).</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 are suspected.
  21. <ul>
  22. <li>There is any error of the FAT structure on the volume.</li>
  23. <li>Work area (file system object, file object or etc...) is broken by stack overflow or any other application. This is the reason in most case.</li>
  24. <li>An <tt>FR_DISK_ERR</tt> has occured on the file object.</li>
  25. </ul>
  26. </dd>
  27. <dt id="nr">FR_NOT_READY</dt>
  28. <dd>The disk drive cannot work due to incorrect medium removal or disk_initialize function failed.</dd>
  29. <dt id="nf">FR_NO_FILE</dt>
  30. <dd>Could not find the file.</dd>
  31. <dt id="np">FR_NO_PATH</dt>
  32. <dd>Could not find the path.</dd>
  33. <dt id="in">FR_INVALID_NAME</dt>
  34. <dd>The given string is invalid as the <a href="filename.html">path name</a>.</dd>
  35. <dt id="dn">FR_DENIED</dt>
  36. <dd>The required access was denied due to one of the following reasons:
  37. <ul>
  38. <li>Write mode open against the file with read-only attribute.</li>
  39. <li>Deleting the file or directory with read-only attribute.</li>
  40. <li>Deleting the non-empty directory or current directory.</li>
  41. <li>Reading the file opened without FA_READ flag.</li>
  42. <li>Any modification to the file opened without FA_WRITE flag.</li>
  43. <li>Could not create the file or directory due to the directory table is full.</li>
  44. <li>Could not create the directory due to the volume is full.</li>
  45. </ul>
  46. </dd>
  47. <dt id="ex">FR_EXIST</dt>
  48. <dd>Any object that has the same name is already existing.</dd>
  49. <dt id="io">FR_INVALID_OBJECT</dt>
  50. <dd>The given file/directory object structure is invalid.</dd>
  51. <dt id="wp">FR_WRITE_PROTECTED</dt>
  52. <dd>Any write mode action against write-protected media.</dd>
  53. <dt id="id">FR_INVALID_DRIVE</dt>
  54. <dd>Invalid drive number is specified. (Related option: _VOLUMES)</dd>
  55. <dt id="ne">FR_NOT_ENABLED</dt>
  56. <dd>Work area for the logical drive has not been registered by f_mount function.</dd>
  57. <dt id="ns">FR_NO_FILESYSTEM</dt>
  58. <dd>There is no valid FAT volume on the drive.</dd>
  59. <dt id="ma">FR_MKFS_ABORTED</dt>
  60. <dd>The f_mkfs function aborted before start in format due to a reason as follows:
  61. <ul>
  62. <li>The disk size is too small.</li>
  63. <li>Not allowable cluster size for this disk. This can occure when number of clusters gets near the 0xFF7 and 0xFFF7.</li>
  64. </ul>
  65. </dd>
  66. <dt id="tm">FR_TIMEOUT</dt>
  67. <dd>The function canceled due to a timeout of <a href="appnote.html#reentrant">thread-safe control</a>. (Related option: _TIMEOUT)</dd>
  68. <dt id="lo">FR_LOCKED</dt>
  69. <dd>The file access is rejected by <a href="appnote.html#dup">file sharing control</a>. (Related option: _FS_SHARE)</dd>
  70. <dt id="nc">FR_NOT_ENOUGH_CORE</dt>
  71. <dd>Not enough memory for the operation. There is one of the following reasons:
  72. <ul>
  73. <li>Could not allocate a memory for LFN working buffer. (Related option: _USE_LFN)</li>
  74. <li>Given table size is insufficient for the required size.</li>
  75. </ul>
  76. </dd>
  77. <dt id="tf">FR_TOO_MANY_OPEN_FILES</dt>
  78. <dd>Number of open files has been reached maximum value and no more file can be opened. (Related option: _FS_SHARE)</dd>
  79. <dt id="ip">FR_INVALID_PARAMETER</dt>
  80. <dd>The given parameter is invalid or there is any inconsistent.</dd>
  81. </dl>
  82. </body>
  83. </html>