Files
esp-idf/components/esp_stdio/test_apps
Tomáš Rohlínek 42f3ed4d51 refactor(stdio): remove fd table, forward opens to primary backend
Remove the internal fd table (fd_entry_t, is_fd_valid, fd_allows_read/write,
ESP_STDIO_BASIC_MODE tracking) from the console VFS.

Instead, console_open forwards directly to the primary backend's open_p,
so each open("/dev/console") creates a real fd in the underlying driver.
Read/write/fstat/fcntl/fsync all operate on the per-open fd from the
primary, not a stored init-time fd.

Structure:
- s_primary: separate variable for the primary backend entry
- s_auxiliary[]: slot-based array for auxiliary sinks (NULL = free)
- Scans all slots (no count variable) with NULL guards
- Auxiliaries opened lazily on first console open
- Closed when last console fd is closed (refcounted via s_open_count)
- Write and fsync fan-out protected by s_lock
2026-06-02 10:37:16 +02:00
..