mirror of
https://github.com/eledio-devices/thirdparty-littlefs.git
synced 2025-11-01 16:14:13 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73ea008b74 | ||
|
|
c849748453 | ||
|
|
25a843aab7 | ||
|
|
905727b684 | ||
|
|
26d25608b6 |
@@ -139,7 +139,7 @@ jobs:
|
|||||||
install:
|
install:
|
||||||
- sudo apt-get install libfuse-dev
|
- sudo apt-get install libfuse-dev
|
||||||
- git clone --depth 1 https://github.com/geky/littlefs-fuse -b v2-alpha v2
|
- git clone --depth 1 https://github.com/geky/littlefs-fuse -b v2-alpha v2
|
||||||
- git clone --depth 1 https://github.com/geky/littlefs-fuse v1
|
- git clone --depth 1 https://github.com/geky/littlefs-fuse -b v1 v1
|
||||||
- fusermount -V
|
- fusermount -V
|
||||||
- gcc --version
|
- gcc --version
|
||||||
before_script:
|
before_script:
|
||||||
|
|||||||
4
lfs.c
4
lfs.c
@@ -2864,6 +2864,10 @@ int lfs_file_truncate(lfs_t *lfs, lfs_file_t *file, lfs_off_t size) {
|
|||||||
return LFS_ERR_BADF;
|
return LFS_ERR_BADF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size > LFS_FILE_MAX) {
|
||||||
|
return LFS_ERR_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
lfs_off_t oldsize = lfs_file_size(lfs, file);
|
lfs_off_t oldsize = lfs_file_size(lfs, file);
|
||||||
if (size < oldsize) {
|
if (size < oldsize) {
|
||||||
// need to flush since directly changing metadata
|
// need to flush since directly changing metadata
|
||||||
|
|||||||
3
lfs.h
3
lfs.h
@@ -578,7 +578,8 @@ int lfs_dir_close(lfs_t *lfs, lfs_dir_t *dir);
|
|||||||
// Read an entry in the directory
|
// Read an entry in the directory
|
||||||
//
|
//
|
||||||
// Fills out the info structure, based on the specified file or directory.
|
// Fills out the info structure, based on the specified file or directory.
|
||||||
// Returns a negative error code on failure.
|
// Returns a positive value on success, 0 at the end of directory,
|
||||||
|
// or a negative error code on failure.
|
||||||
int lfs_dir_read(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);
|
int lfs_dir_read(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);
|
||||||
|
|
||||||
// Change the position of the directory
|
// Change the position of the directory
|
||||||
|
|||||||
Reference in New Issue
Block a user