commit
a3ab46ec31
|
@ -35,7 +35,7 @@ static_library("fs_operations") {
|
||||||
|
|
||||||
declare_args() {
|
declare_args() {
|
||||||
enable_ohos_kernel_liteos_m_fatfs = true
|
enable_ohos_kernel_liteos_m_fatfs = true
|
||||||
enable_ohos_kernel_liteos_m_littlefs = false
|
enable_ohos_kernel_liteos_m_littlefs = true
|
||||||
}
|
}
|
||||||
|
|
||||||
group("fs") {
|
group("fs") {
|
||||||
|
|
|
@ -40,6 +40,7 @@ static_library("littlefs") {
|
||||||
"../../../kal",
|
"../../../kal",
|
||||||
"../../../kal/posix/include",
|
"../../../kal/posix/include",
|
||||||
"./",
|
"./",
|
||||||
"//third_party/littlefs/include",
|
"../",
|
||||||
|
"//third_party/littlefs",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE 1
|
||||||
#include "lfs_api.h"
|
#include "lfs_api.h"
|
||||||
|
|
||||||
lfs_t g_lfs;
|
lfs_t g_lfs;
|
||||||
|
@ -40,11 +41,6 @@ struct dirent g_nameValue;
|
||||||
static pthread_mutex_t g_FslocalMutex = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t g_FslocalMutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
static const char *const g_littlefsMntName[LFS_MAX_MOUNT_SIZE] = {"/a","/b","/c"};
|
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)
|
LittleFsHandleStruct *LfsAllocFd(const char *fileName, int *fd)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&g_FslocalMutex);
|
pthread_mutex_lock(&g_FslocalMutex);
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#include "dirent.h"
|
#include "dirent.h"
|
||||||
#include "errno.h"
|
#include "errno.h"
|
||||||
|
#include "fs_operations.h"
|
||||||
#include "lfs.h"
|
#include "lfs.h"
|
||||||
#include "lfs_util.h"
|
#include "lfs_util.h"
|
||||||
#include "memory.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 LfsStat(const char *path, struct stat *buf);
|
||||||
int LfsFsync(int fd);
|
int LfsFsync(int fd);
|
||||||
|
|
||||||
FileOpInfo GetFsOpInfo(void);
|
|
||||||
const struct FsMap *MountFindfs(const char *filesystemtype);
|
const struct FsMap *MountFindfs(const char *filesystemtype);
|
||||||
|
|
||||||
#endif /* _LFS_API_H_ */
|
#endif /* _LFS_API_H_ */
|
||||||
|
|
Loading…
Reference in New Issue