!175 修复M核littlefs GN编译的若干错误

Merge pull request !175 from li_zan/master
This commit is contained in:
openharmony_ci 2021-06-11 11:23:45 +08:00 committed by Gitee
commit a3ab46ec31
4 changed files with 5 additions and 8 deletions

View File

@ -35,7 +35,7 @@ static_library("fs_operations") {
declare_args() {
enable_ohos_kernel_liteos_m_fatfs = true
enable_ohos_kernel_liteos_m_littlefs = false
enable_ohos_kernel_liteos_m_littlefs = true
}
group("fs") {

View File

@ -40,6 +40,7 @@ static_library("littlefs") {
"../../../kal",
"../../../kal/posix/include",
"./",
"//third_party/littlefs/include",
"../",
"//third_party/littlefs",
]
}

View File

@ -29,6 +29,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE 1
#include "lfs_api.h"
lfs_t g_lfs;
@ -40,11 +41,6 @@ struct dirent g_nameValue;
static pthread_mutex_t g_FslocalMutex = PTHREAD_MUTEX_INITIALIZER;
static const char *const g_littlefsMntName[LFS_MAX_MOUNT_SIZE] = {"/a","/b","/c"};
FileOpInfo GetFsOpInfo(void)
{
return g_fsOp;
}
LittleFsHandleStruct *LfsAllocFd(const char *fileName, int *fd)
{
pthread_mutex_lock(&g_FslocalMutex);

View File

@ -38,6 +38,7 @@
#include "dirent.h"
#include "errno.h"
#include "fs_operations.h"
#include "lfs.h"
#include "lfs_util.h"
#include "memory.h"
@ -117,7 +118,6 @@ int LfsRename(const char *oldName, const char *newName);
int LfsStat(const char *path, struct stat *buf);
int LfsFsync(int fd);
FileOpInfo GetFsOpInfo(void);
const struct FsMap *MountFindfs(const char *filesystemtype);
#endif /* _LFS_API_H_ */