Skip to content

Commit

Permalink
Merge branch 'feature/vfs_serial_fcntl_get_rd_wr_state_v4.4' into 're…
Browse files Browse the repository at this point in the history
…lease/v4.4'

vfs: uart/cdcacm/usb_serial_jtag fcntl return read/write state(v4.4)

See merge request espressif/esp-idf!19335
  • Loading branch information
suda-morris committed Apr 3, 2023
2 parents 4c7d97e + b7ea6e4 commit ea51ee1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/vfs/vfs_cdcacm.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int cdcacm_fcntl(int fd, int cmd, int arg)
assert(fd == 0);
int result;
if (cmd == F_GETFL) {
result = 0;
result = O_RDWR;
if (!s_blocking) {
result |= O_NONBLOCK;
}
Expand Down
1 change: 1 addition & 0 deletions components/vfs/vfs_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ static int uart_fcntl(int fd, int cmd, int arg)
assert(fd >=0 && fd < 3);
int result = 0;
if (cmd == F_GETFL) {
result |= O_RDWR;
if (s_ctx[fd]->non_blocking) {
result |= O_NONBLOCK;
}
Expand Down
1 change: 1 addition & 0 deletions components/vfs/vfs_usb_serial_jtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ static int usb_serial_jtag_fcntl(int fd, int cmd, int arg)
{
int result = 0;
if (cmd == F_GETFL) {
result |= O_RDWR;
if (s_ctx.non_blocking) {
result |= O_NONBLOCK;
}
Expand Down

0 comments on commit ea51ee1

Please sign in to comment.