1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

44 Commits

Author SHA1 Message Date
c164007425
sys/vfs*: move dependency resolution in its own Makefile.dep 2023-06-15 10:24:54 +02:00
Benjamin Valentin
5708ca1945 vfs: add auto_unmount_vfs() 2023-04-26 00:53:14 +02:00
Benjamin Valentin
3b587d9268 sys/vfs: add force option to vfs_umount() 2023-02-28 17:24:03 +01:00
bors[bot]
d4422a074a
Merge #18682
18682: pkg/lwext4: add lightweight implementation of the ext2/3/4 filesystem r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-25 18:59:07 +00:00
177b50dfc2 sys/vfs: vfs.c: add missing "container.h" include 2023-02-02 16:34:28 +01:00
47a610e732 sys/vfs: vfs.c: add missing modules.h include 2023-02-02 16:34:28 +01:00
Benjamin Valentin
49e1720d5c vfs: allow filesystem to request absolute paths 2022-10-02 00:16:01 +02:00
Benjamin Valentin
85dd564f87 vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
Benjamin Valentin
855a359058 vfs: introduce vfs_format_by_path() 2022-08-12 15:36:29 +02:00
Marian Buschsieweke
158203fe71
Merge pull request #17651 from benpicco/fs/constfs-cleanup
sys/fs/constfs: drop dummy implementations
2022-05-19 23:23:49 +02:00
Benjamin Valentin
a587069b18 vfs: return -EROFS if remove operation is not implemented 2022-05-19 11:43:08 +02:00
benpicco
cabb0b7398
Merge pull request #18109 from benpicco/vfs_unmount_by_path
sys/vfs: add vfs_unmount_by_path()
2022-05-17 20:25:18 +02:00
Benjamin Valentin
ff4c738e2d sys/vfs: add vfs_unmount_by_path() 2022-05-16 11:11:11 +02:00
Benjamin Valentin
4295104866 vfs: fix dir detection in vfs_sysop_stat_from_fstat()
`vfs_sysop_stat_from_fstat()` is a fallback implementation of `stat()`
based on `fstat()`.
It will open a file and call `fstat()`.
This fails if the target is not a file but a directory, which means that
directories are not recognized as such.

To fix this, try to open the path as a directory if opening it as a file
fails. If this succeeds, set the `S_IFDIR` flag.
2022-05-08 23:04:26 +02:00
Benjamin Valentin
42e5d0d402 sys/vfs: add vfs_write_iol() 2022-05-02 23:23:52 +02:00
chrysn
40f7c66625
Merge pull request #17660 from chrysn-pull-requests/vfs-drop-per-fs-fstatvfs
vfs: Introduce reliable disk enumeration
2022-02-17 18:47:41 +01:00
chrysn
90069197f7 sys/vfs: Introduce vfs_iterate_mount_dirs
... as thread-safe replacement for vfs_iterate_mounts
2022-02-16 19:15:02 +01:00
chrysn
9a319a9b4f sys/vfs: Iterate over file systems in sequence
This is a cosmetic change when considering vfs_iterate_mounts alone
(which now reports FSs in precise mount order rather than reporting the
most recently mounted, followed by the rest in mount order), but is
helpful for uses of it that need some guarantees in order to produce
reliable results even when iteration and (un)mounting interact.
2022-02-16 19:15:02 +01:00
Benjamin Valentin
54d5f43aff sys/vfs: add vfs_mount_by_path() 2022-02-16 18:55:26 +01:00
chrysn
599eade495 sys/vfs: Add vfs_dstatvfs 2022-02-15 14:58:01 +01:00
chrysn
ff1f81aac8 sys/vfs: Drop per-filesystem fstatvfs
No current file system implements it, there is no defined semantic
difference between running fstatfs and the fallback currently
implemented, and there is practically no optimization gained from not
just running it through a single statvfs.
2022-02-15 14:58:01 +01:00
Benjamin Valentin
92d9d5676a sys/vfs: add vfs_default pseudo-module 2022-02-14 13:04:37 +01:00
chrysn
2cb4b70458 vfs / treewide: Remove manual zeroing of vfs stat buffers 2022-02-12 12:31:38 +01:00
chrysn
4e84c19281 vfs: Zero buffers in all stat calls
This allows individual VFS implementations to populate just the fields
they can populte.
2022-02-12 12:23:03 +01:00
benpicco
be45400631
Merge pull request #17341 from benpicco/vfs-mtd_cleanup
sys/vfs: add file-system auto-mount
2022-02-09 21:50:34 +01:00
Benjamin Valentin
2f6aa71946 sys/vfs: add file-system auto-mount 2022-02-09 12:21:53 +01:00
Benjamin Valentin
aac538ba7f sys/vfs: provide vfs_fsync() 2022-02-07 16:07:20 +01:00
Leandro Lanzieri
368ccdf3f8
sys/vfs: model Kconfig 2021-11-29 10:30:49 +01:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
0b801c4de0 all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
Bas Stottelaar
922e2ac1c9 sys/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:49:39 +01:00
chrysn
b6392d63ef vfs: Provide generic stat implementation (and use in fatfs)
When a file system has `fstat` and `open` implemented, `stat` can still
be missing. The new function is a generic implementation, and used in
fatfs to provide a `stat`.
2020-10-25 17:39:57 +01:00
Bas Stottelaar
1b35d06a51 sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
Martine S. Lenders
ef844d8863
vfs: provide function to get internal file information by fd 2020-07-01 13:36:25 +02:00
Hauke Petersen
b837e656f9 stdio/vfs: generalized VFS mapping for STDIO 2018-08-30 11:14:59 +02:00
Hauke Petersen
c2184f3454 boards/cpu/drivers/sys: use generic stdio_ if 2018-08-22 10:54:25 +02:00
Joakim Nohlgård
be14d2eace sys/vfs: Exclude stdio file numbers from auto allocation
Fixes #8309 (https://github.com/RIOT-OS/RIOT/issues/8309)
2018-02-13 18:05:28 +01:00
Joakim Nohlgård
490e7c87e0 sys/vfs: Check suggested fd is valid
Avoids out of bounds array access on _vfs_open_files if vfs_bind is
called with an invalid (positive) fd number
2018-02-12 08:45:19 +01:00
Vincent Dupont
d5bce2440b vfs: do not umount fs which is not mounted 2018-02-09 14:29:46 +01:00
Vincent Dupont
2eca6d25fd vfs: add format function in vfs api 2018-02-09 14:29:45 +01:00
smlng
eb3bfdf1d2 sys/vfs: fix format error in debug output 2018-01-17 15:25:15 +01:00
dcc0804e10 sys/vfs: DEBUG fix 2018-01-15 14:37:04 +01:00
smlng
b283b7784c make: fix various compile errors with Wextra
pkg, nordic_softdevice_ble: disable CFLAGS to omit compiler error
        sys, pm_layered: fix casting nonscalar to the same type
        cpu, stm32_common: fix type-limits, remove always true assert
        cpu, stm32f4: fix pointer arithmetic in periph/i2c
        drivers, at86rf2xx: fix type-limits where condition always true
        saul, gpio: fix if no gpio configured for saul
        cpu, saml21: add frequency check to periph/timer
        driver, cc110x: fix unused param and type-limts errors
        boards, wsn430-common: fix old-style-declaration
        make: fix old style definition
        drivers, sdcard_spi: fix old style typedef
        driver, at30tse: remove unnecessary check
        driver, nrf24: fix type-limit
        driver, pn532: change buffer from char to uint8_t
        tests/driver_sdcard: fix type limits
        boards, feather-m0: add missing field inits
        driver, tcs37727: fix type limits
        pkg, emb6: disable some compiler warnings
        tests/emb6: disable some compiler warings
        pkg, openthread: fix sign compare and unused params
        tests/trickle: fix struct init
        tests/pthread_cooperation: fix type limits
        board, mips-malta: remove feature periph_uart
        shell: fix var size for netif command
        gnrc, netif: fix sign-compare
        gnrc, nib: fix sign-compare
        shell: fix output in netif command
        posix: fix type-limits in pthread_cond
2017-11-28 18:31:43 +01:00
Joakim Nohlgård
dcc37329df sys/vfs: A virtual file system (VFS) layer for RIOT
The VFS layer provides file system abstractions to allow using a unified
interface to access files from mounted file systems.
2017-03-07 17:59:57 +01:00