mirror of
https://github.com/armink/FlashDB.git
synced 2025-01-29 04:32:53 +08:00
[fdb_utils][_fdb_flash_write]: fix returned incorrect error code. (#300)
If user has set file mode, but file mode is disabled, _fdb_flash_write should return FDB_WRITE_ERR, not FDB_READ_ERR.
This commit is contained in:
parent
8f80336b89
commit
a8e8dcad64
@ -304,7 +304,7 @@ fdb_err_t _fdb_flash_write(fdb_db_t db, uint32_t addr, const void *buf, size_t s
|
||||
#ifdef FDB_USING_FILE_MODE
|
||||
return _fdb_file_write(db, addr, buf, size, sync);
|
||||
#else
|
||||
return FDB_READ_ERR;
|
||||
return FDB_WRITE_ERR;
|
||||
#endif /* FDB_USING_FILE_MODE */
|
||||
} else {
|
||||
#ifdef FDB_USING_FAL_MODE
|
||||
|
Loading…
x
Reference in New Issue
Block a user