don't use lfs_file_open() when LFS_NO_MALLOC is set

This commit is contained in:
yog
2021-11-17 15:34:25 +01:00
committed by Christopher Haster
parent ead50807f1
commit e334983767
2 changed files with 7 additions and 0 deletions

2
lfs.c
View File

@@ -5082,6 +5082,7 @@ int lfs_removeattr(lfs_t *lfs, const char *path, uint8_t type) {
}
#endif
#ifndef LFS_NO_MALLOC
int lfs_file_open(lfs_t *lfs, lfs_file_t *file, const char *path, int flags) {
int err = LFS_LOCK(lfs->cfg);
if (err) {
@@ -5097,6 +5098,7 @@ int lfs_file_open(lfs_t *lfs, lfs_file_t *file, const char *path, int flags) {
LFS_UNLOCK(lfs->cfg);
return err;
}
#endif
int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file,
const char *path, int flags,