mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(fatfs): preserve access mode in VFS F_SETFL
F_SETFL was replacing the whole flags word, so fcntl(fd, F_SETFL, O_APPEND) made F_GETFL report O_RDONLY|O_APPEND. Keep O_ACCMODE and apply only POSIX status flags. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
e24f64d20d
commit
5fc9a1ea04
@@ -195,6 +195,13 @@ TEST_CASE("(WL) overwrite and append file", "[fatfs][wear_levelling]")
|
||||
test_teardown();
|
||||
}
|
||||
|
||||
TEST_CASE("(WL) fcntl F_SETFL preserves access mode", "[fatfs][wear_levelling]")
|
||||
{
|
||||
test_setup();
|
||||
test_fatfs_fcntl_setfl("/spiflash/fcntl.txt");
|
||||
test_teardown();
|
||||
}
|
||||
|
||||
TEST_CASE("(WL) can lseek", "[fatfs][wear_levelling]")
|
||||
{
|
||||
test_setup();
|
||||
|
||||
Reference in New Issue
Block a user