Lines Matching refs:FR_OK
953 …return (!be && acc != 2) ? FR_TOO_MANY_OPEN_FILES : FR_OK; /* Is there a blank entry for new objec… in chk_lock()
957 return (acc != 0 || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK; in chk_lock()
1015 res = FR_OK; in dec_lock()
1046 FRESULT res = FR_OK; in sync_window()
1069 FRESULT res = FR_OK; in move_window()
1076 if (res == FR_OK) { /* Fill sector window with new data */ in move_window()
1103 if (res == FR_OK) { in sync_fs()
1168 if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break; in get_fat()
1170 if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break; in get_fat()
1176 if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2))) != FR_OK) break; in get_fat()
1181 if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))) != FR_OK) break; in get_fat()
1202 if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))) != FR_OK) break; in get_fat()
1242 if (res != FR_OK) break; in put_fat()
1247 if (res != FR_OK) break; in put_fat()
1255 if (res != FR_OK) break; in put_fat()
1265 if (res != FR_OK) break; in put_fat()
1306 if (move_window(fs, fs->bitbase + val / 8 / SS(fs)) != FR_OK) return 0xFFFFFFFF; in find_bitmap()
1348 if (move_window(fs, sect++) != FR_OK) return FR_DISK_ERR; in change_bitmap()
1354 if (--ncl == 0) return FR_OK; /* All bits processed? */ in change_bitmap()
1378 if (res != FR_OK) return res; in fill_first_frag()
1382 return FR_OK; in fill_first_frag()
1401 if (res != FR_OK) return res; in fill_last_frag()
1404 return FR_OK; in fill_last_frag()
1422 FRESULT res = FR_OK; in remove_chain()
1437 if (res != FR_OK) return res; in remove_chain()
1448 if (res != FR_OK) return res; in remove_chain()
1461 if (res != FR_OK) return res; in remove_chain()
1501 return FR_OK; in remove_chain()
1555 if (res == FR_OK) obj->n_frag = 1; in create_chain()
1588 if (res == FR_OK && clst != 0) { in create_chain()
1593 if (res == FR_OK) { /* Update FSINFO if function succeeded. */ in create_chain()
1654 if (sync_window(fs) != FR_OK) return FR_DISK_ERR; /* Flush disk access window */ in dir_clear()
1672 return (n == fs->csize) ? FR_OK : FR_DISK_ERR; in dir_clear()
1721 return FR_OK; in dir_sdi()
1766 if (dir_clear(fs, clst) != FR_OK) return FR_DISK_ERR; /* Clean up the stretched table */ in dir_next()
1781 return FR_OK; in dir_next()
1803 if (res == FR_OK) {
1807 if (res != FR_OK) break;
1818 } while (res == FR_OK); /* Next entry with table stretch enabled */
2169 if (res != FR_OK) return res;
2178 if (res != FR_OK) return res;
2180 if (res != FR_OK) return res;
2190 if (res != FR_OK) return res;
2192 if (res != FR_OK) return res;
2201 return FR_OK;
2243 if (res == FR_OK) {
2270 while (res == FR_OK) {
2272 if (res != FR_OK) break;
2279 return (res == FR_OK || res == FR_DISK_ERR) ? res : FR_INT_ERR;
2348 if (res != FR_OK) break;
2361 if (res == FR_OK) {
2397 if (res != FR_OK) break;
2400 if (res != FR_OK) dp->sect = 0; /* Terminate the read operation on error or EOT */
2424 if (res != FR_OK) return res;
2431 while ((res = DIR_READ_FILE(dp)) == FR_OK) { /* Read an item */
2451 if (res != FR_OK) break;
2480 } while (res == FR_OK);
2511 if (res != FR_OK) return res;
2517 if (res != FR_OK) return res;
2519 if (res != FR_OK) return res;
2524 if (res != FR_OK) return res;
2530 if (res != FR_OK) return res;
2535 return FR_OK;
2545 if (res != FR_OK) break;
2555 if (res == FR_OK && --nent) { /* Set LFN entry if needed */
2557 if (res == FR_OK) {
2561 if (res != FR_OK) break;
2565 } while (res == FR_OK && --nent);
2575 if (res == FR_OK) {
2577 if (res == FR_OK) {
2608 …res = (dp->blk_ofs == 0xFFFFFFFF) ? FR_OK : dir_sdi(dp, dp->blk_ofs); /* Goto top of the entry blo…
2609 if (res == FR_OK) {
2612 if (res != FR_OK) break;
2621 } while (res == FR_OK);
2627 if (res == FR_OK) {
2866 return FR_OK;
2952 return FR_OK;
2974 return FR_OK;
3015 return FR_OK;
3055 if (res != FR_OK) return res;
3069 if (res != FR_OK) break;
3072 if (res != FR_OK) { /* Failed to find the object */
3077 res = FR_OK;
3193 if (move_window(fs, sect) != FR_OK) return 4; /* Load boot record */
3249 return FR_OK; /* The filesystem object is valid */
3331 if (move_window(fs, clst2sect(fs, fs->dirbase) + so) != FR_OK) return FR_DISK_ERR;
3341 if (move_window(fs, fs->fatbase + bcl / (SS(fs) / 4)) != FR_OK) return FR_DISK_ERR;
3412 && move_window(fs, bsect + 1) == FR_OK)
3445 return FR_OK;
3467 res = FR_OK;
3469 unlock_fs(obj->fs, FR_OK);
3476 res = FR_OK;
3480 *rfs = (res == FR_OK) ? obj->fs : 0; /* Corresponding filesystem object */
3534 if (opt == 0) return FR_OK; /* Do not mount now, it will be mounted later */
3568 if (res == FR_OK) {
3573 if (res == FR_OK) {
3585 if (res != FR_OK) { /* No file, create new */
3602 if (res == FR_OK && (mode & FA_CREATE_ALWAYS)) { /* Truncate the file if overwrite mode */
3615 if (res == FR_OK && fp->obj.sclust != 0) { /* Remove the cluster chain if exist */
3632 if (res == FR_OK) {
3641 if (res == FR_OK) { /* Is the object exsiting? */
3651 if (res == FR_OK) {
3661 if (res == FR_OK) {
3672 if (res == FR_OK) {
3702 for (ofs = fp->obj.objsize; res == FR_OK && ofs > bcs; ofs -= bcs) {
3708 if (res == FR_OK && ofs % SS(fs)) { /* Fill sector buffer if not on the sector boundary */
3725 if (res != FR_OK) fp->obj.fs = 0; /* Invalidate file object on error */
3754 if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res); /* Check validity */
3819 if (move_window(fs, fp->sect) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Move sector window */
3826 LEAVE_FF(fs, FR_OK);
3853 if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res); /* Check validity */
3888 …if (fs->winsect == fp->sect && sync_window(fs) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Write-back sec…
3922 if (sync_window(fs) != FR_OK) ABORT(fs, FR_DISK_ERR);
3937 if (move_window(fs, fp->sect) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Move sector window */
3948 LEAVE_FF(fs, FR_OK);
3969 if (res == FR_OK) {
3982 if (res == FR_OK) {
3985 if (res == FR_OK) {
3991 if (res == FR_OK) {
4001 if (res == FR_OK) {
4012 if (res == FR_OK) {
4048 if (res == FR_OK)
4052 if (res == FR_OK) {
4055 if (res == FR_OK) fp->obj.fs = 0; /* Invalidate file object */
4060 unlock_fs(fs, FR_OK); /* Unlock volume */
4087 return FR_OK;
4107 if (res == FR_OK) {
4111 if (res == FR_OK) { /* Follow completed */
4142 if (res == FR_OK) {
4178 if (res == FR_OK) {
4188 if (res != FR_OK) break;
4190 if (res != FR_OK) break;
4193 if (res != FR_OK) break;
4196 if (res != FR_OK) break;
4199 } while (res == FR_OK);
4201 if (res != FR_OK) break;
4211 if (res == FR_OK) {
4233 if (res == FR_OK) {
4268 if (res == FR_OK) res = (FRESULT)fp->err;
4270 if (res == FR_OK && fs->fs_type == FS_EXFAT) {
4274 if (res != FR_OK) LEAVE_FF(fs, res);
4429 if (res == FR_OK) {
4433 if (res == FR_OK) { /* Follow completed */
4451 if (res == FR_OK) {
4455 if (res == FR_OK) {
4469 if (res != FR_OK) dp->obj.fs = 0; /* Invalidate the directory object if function faild */
4490 if (res == FR_OK) {
4493 if (res == FR_OK) dp->obj.fs = 0; /* Invalidate directory object */
4498 unlock_fs(fs, FR_OK); /* Unlock volume */
4522 if (res == FR_OK) {
4528 if (res == FR_NO_FILE) res = FR_OK; /* Ignore end of directory */
4529 if (res == FR_OK) { /* A valid entry is found */
4532 if (res == FR_NO_FILE) res = FR_OK; /* Ignore end of directory now */
4557 …if (res != FR_OK || !fno || !fno->fname[0]) break; /* Terminate if any error or end of directory */
4584 if (res == FR_OK) {
4611 if (res == FR_OK) {
4614 if (res == FR_OK) { /* Follow completed */
4649 if (res == FR_OK) {
4677 if (res != FR_OK) break;
4694 if (res != FR_OK) break;
4733 if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res);
4742 res = FR_OK;
4745 if (res == FR_OK && ncl < fs->n_fatent) {
4752 if (res == FR_OK && (fp->flag & FA_DIRTY)) {
4760 if (res != FR_OK) ABORT(fs, res);
4789 if (res == FR_OK) {
4793 if (FF_FS_RPATH && res == FR_OK && (dj.fn[NSFLAG] & NS_DOT)) {
4797 if (res == FR_OK) res = chk_lock(&dj, 2); /* Check if it is an open object */
4799 if (res == FR_OK) { /* The object is accessible */
4807 if (res == FR_OK) {
4834 if (res == FR_OK) {
4836 if (res == FR_OK) res = FR_DENIED; /* Not empty? */
4837 if (res == FR_NO_FILE) res = FR_OK; /* Empty? */
4842 if (res == FR_OK) {
4844 if (res == FR_OK && dclst != 0) { /* Remove the cluster chain if exist */
4851 if (res == FR_OK) res = sync_fs(fs);
4880 if (res == FR_OK) {
4884 if (res == FR_OK) res = FR_EXIST; /* Name collision? */
4891 res = FR_OK;
4896 if (res == FR_OK) {
4898 if (res == FR_OK) {
4913 if (res == FR_OK) {
4931 if (res == FR_OK) {
4966 if (res == FR_OK) {
4970 …if (res == FR_OK && (djo.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check valid…
4972 if (res == FR_OK) {
4976 if (res == FR_OK) { /* Object to be renamed is found */
4985 if (res == FR_OK) { /* Is new name already in use by any other object? */
4990 if (res == FR_OK) {
5007 if (res == FR_OK) { /* Is new name already in use by any other object? */
5012 if (res == FR_OK) {
5026 if (res == FR_OK && dir[1] == '.') {
5035 if (res == FR_OK) {
5037 if (res == FR_OK) {
5074 if (res == FR_OK) {
5078 …if (res == FR_OK && (dj.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check object…
5079 if (res == FR_OK) {
5091 if (res == FR_OK) {
5120 if (res == FR_OK) {
5124 …if (res == FR_OK && (dj.fn[NSFLAG] & (NS_DOT | NS_NONAME))) res = FR_INVALID_NAME; /* Check object…
5125 if (res == FR_OK) {
5136 if (res == FR_OK) {
5171 if (res == FR_OK && label) {
5174 if (res == FR_OK) {
5176 if (res == FR_OK) {
5218 res = FR_OK;
5223 if (res == FR_OK && vsn) {
5225 if (res == FR_OK) {
5267 if (res != FR_OK) LEAVE_FF(fs, res);
5319 if (res == FR_OK) {
5321 if (res == FR_OK) {
5336 res = FR_OK;
5339 if (res == FR_OK) {
5382 if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res);
5397 if (res == FR_OK) { /* A contiguous free area is found */
5421 if (res == FR_OK) { /* A contiguous free area is found */
5425 if (res != FR_OK) break;
5434 if (res == FR_OK) {
5477 if (res != FR_OK || (res = (FRESULT)fp->err) != FR_OK) LEAVE_FF(fs, res);
5499 …if (move_window(fs, sect) != FR_OK) ABORT(fs, FR_DISK_ERR); /* Move sector window to the file data…
5520 LEAVE_FF(fs, FR_OK);
5988 LEAVE_MKFS(FR_OK);
6073 …res = (disk_write(pdrv, buf, 0, 1) == RES_OK && disk_ioctl(pdrv, CTRL_SYNC, 0) == RES_OK) ? FR_OK …
6370 && f_write(pb->fp, pb->buf, (UINT)pb->idx, &nw) == FR_OK
6565 return FR_OK;