Roland Dobai
18e83bcd53
Allow VFS file descriptors in select()
2018-05-18 08:06:33 +02:00
Roland Dobai
2aa9c15906
VFS: allow to find free file descriptors & register them
2018-05-18 07:57:35 +02:00
Roland Dobai
4345e198ce
Implement VFS support for access()
...
Closes https://github.com/espressif/esp-idf/issues/1085
2018-05-14 09:04:18 +02:00
Roland Dobai
5129bca67c
VFS: Use smaller numbers as file descriptors
2018-05-07 09:01:56 +02:00
Ivan Grokhotkov
6185e722c3
Revert "Merge branch 'feature/vfs_select' into 'master'"
...
This reverts merge request !2074
2018-04-20 11:51:41 +08:00
Roland Dobai
6852d653bd
Allow VFS file descriptors in select()
2018-04-17 11:25:30 +02:00
Ivan Grokhotkov
552ba35da5
add missing ioctl declaration
...
Previously ioctl was declared as a macro in lwip/sockets.h.
Disabling LWIP_POSIX_SOCKETS_IO_NAMES removed that declaration.
This adds sys/ioctl.h file and the missing declaration.
Also adds missing includes in vfs.c.
2017-10-23 19:47:33 +08:00
Angus Gratton
e5ae0f5927
lwip: Make LWIP_SOCKET_OFFSET signed, remove need for underflow check
...
This reverts commit 541493d877
.
2017-10-20 18:04:28 +08:00
Ivan Grokhotkov
502c3d0243
vfs,fat: add fsync to VFS interface, implement it for fatfs
2017-10-17 15:14:53 +08:00
Angus Gratton
539262b5c2
vfs: Remove fd_offset member
...
This was intended for integrating LWIP, but a different approach was used.
2017-10-16 09:45:50 +08:00
Angus Gratton
3ebf7923d3
lwip: Route LWIP socket POSIX I/O functions via IDF VFS layer
...
No more conflicts between LWIP & newlib read(), write(), fcntl(), etc.
select() still only works if all of the fds are sockets.
Closes https://github.com/espressif/esp-idf/issues/273
2017-10-16 09:45:49 +08:00
Angus Gratton
a320fed3b5
vfs: Add ioctl() to filesystem set
2017-10-16 09:45:49 +08:00
Ivan Grokhotkov
1e4587a09f
vfs: implement fcntl via VFS interface
2017-08-21 15:58:28 +08:00
Deomid Ryabkov
ee5eba793f
Make relative paths match the default VFS, if provided
...
https://github.com/espressif/esp-idf/issues/158
2017-06-23 13:12:28 +01:00
Ivan Grokhotkov
e918ee20da
Merge branch 'bugfix/vfs_fixes' into 'master'
...
VFS fixes
See merge request !901
2017-06-23 11:33:27 +08:00
Ivan Grokhotkov
5b678eed0d
vfs: add support for nested mount points
...
Fixes https://github.com/espressif/esp-idf/issues/135
2017-06-21 14:17:14 +08:00
Ivan Grokhotkov
4f71b4574a
vfs: fix NULL pointer dereference in esp_vfs_unregister
2017-06-21 13:54:04 +08:00
Ivan Grokhotkov
2ccfe3da96
vfs: fix opendir of a filesystem root directory
...
Previously opendir("/data") would fail if filesystem with "data" prefix
was registered in VFS, while opendir("/data/") would succeed.
This change fixes handling for the former case and adds relevant tests.
2017-06-21 01:21:14 +08:00
Deomid Ryabkov
b8782bdd90
Change esp_vfs_t.write return value to ssize_t
...
write() should return ssize_t, not size_t.
2017-06-09 21:24:00 +01:00
Ivan Grokhotkov
53d5c5f668
vfs, fatfs: fix support for two FATFS instances (SD and flash)
...
- fix null pointer dereference in VFS when VFS implementations are added
and removed in different order
- vfs_fat_sdmmc, vfs_fat_spiflash: pass correct drive to mkfs
(previously it would always do mkfs in the first drive)
- add test case
2017-05-05 15:21:38 +08:00
Ivan Grokhotkov
6fb430f45e
vfs: add directory APIs
2017-01-09 04:51:24 +08:00
Ivan Grokhotkov
3f889de5ab
vfs: implement vfs_unregister
2017-01-09 04:51:24 +08:00
Ivan Grokhotkov
13b3c916f3
vfs: check error code returned by FS driver open function
...
Fixes https://github.com/espressif/esp-idf/issues/78
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov
7e201c5527
vfs and newlib: small fixes
...
- spaces->tabs in tasks.c
- update vfs_uart.c to use per-UART locks
- add license to vfs_uart.c
- allocate separate streams for stdout, stdin, stderr, so that they can be independently reassigned
- fix build system test failure
- use posix off_t instead of newlib internal _off_t
2016-10-27 17:22:18 +08:00
Ivan Grokhotkov
401f6e4713
vfs: initial version of virtual filesystem API
2016-10-27 17:18:43 +08:00