Skip to content

Commit

Permalink
fix(console): Fsync not propagated to secondary output
Browse files Browse the repository at this point in the history
Calls to fsync need to also be propagated to secondary
output when CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG
is enabled.

Closes #13162
  • Loading branch information
SoucheSouche committed Apr 11, 2024
1 parent ee2fbbc commit 6e628a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/esp_vfs_console/vfs_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ int console_fcntl(int fd, int cmd, int arg)

int console_fsync(int fd)
{
return fsync(vfs_console.fd_primary);
const int ret_val = fsync(vfs_console.fd_primary);
#if CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG
(void)fsync(vfs_console.fd_secondary);
#endif
return ret_val;
}

#ifdef CONFIG_VFS_SUPPORT_DIR
Expand Down

0 comments on commit 6e628a3

Please sign in to comment.