mirror of
https://github.com/eledio-devices/thirdparty-littlefs.git
synced 2025-11-01 08:48:31 +01:00
Compare commits
1 Commits
bf_lfs_fil
...
copyright-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2db5dc80c2 |
@@ -1,3 +1,4 @@
|
||||
Copyright (c) 2022, The littlefs authors.
|
||||
Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Block device emulated in a file
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Block device emulated in a file
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Block device emulated in RAM
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Block device emulated in RAM
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Testing block device, wraps filebd and rambd while providing a bunch
|
||||
* of hooks for testing littlefs in various conditions.
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Testing block device, wraps filebd and rambd while providing a bunch
|
||||
* of hooks for testing littlefs in various conditions.
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
13
lfs.c
13
lfs.c
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* The little filesystem
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
@@ -2730,18 +2731,14 @@ static int lfs_file_outline(lfs_t *lfs, lfs_file_t *file) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void lfs_file_invalidate_reading_flag(lfs_t *lfs, lfs_file_t *file) {
|
||||
#ifndef LFS_READONLY
|
||||
static int lfs_file_flush(lfs_t *lfs, lfs_file_t *file) {
|
||||
if (file->flags & LFS_F_READING) {
|
||||
if (!(file->flags & LFS_F_INLINE)) {
|
||||
lfs_cache_drop(lfs, &file->cache);
|
||||
}
|
||||
file->flags &= ~LFS_F_READING;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef LFS_READONLY
|
||||
static int lfs_file_flush(lfs_t *lfs, lfs_file_t *file) {
|
||||
lfs_file_invalidate_reading_flag(lfs, file);
|
||||
|
||||
if (file->flags & LFS_F_WRITING) {
|
||||
lfs_off_t pos = file->pos;
|
||||
@@ -3091,10 +3088,6 @@ static lfs_soff_t lfs_file_rawseek(lfs_t *lfs, lfs_file_t *file,
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
#else
|
||||
// Seek doesn't update cache parameters properly.
|
||||
// It has to be invalidated otherwise next read will return incorrect values.
|
||||
lfs_file_invalidate_reading_flag(lfs,file);
|
||||
#endif
|
||||
|
||||
// update pos
|
||||
|
||||
1
lfs.h
1
lfs.h
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* The little filesystem
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* lfs util functions
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* lfs utility functions
|
||||
*
|
||||
* Copyright (c) 2022, The littlefs authors.
|
||||
* Copyright (c) 2017, Arm Limited. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user