From 8bcecec3e606d2aee861d23a202a3b7b3692f9ea Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Thu, 27 Oct 2022 11:06:46 +0900 Subject: [PATCH] lte/alt1250: Add FIONBIO ioctl command support From next change, FIONBIO command will be requested in usrsock daemon. ALT1250 daemon doesn't use this command, so only return OK for this command. 84b8820 serial/pty:Don't assert EBUSY when pty ... driver 88e871b nuttx/pty: pty FIONBIO return -ENOTTY when ... OK 37730a1 nuttx/fcntl:pass O_NONBLOCK flag to ioctl c7c9148 nuttx/pty: pass read nonblock flag to pipe 1afdb06 nuttx/pty:pty FIONBIO pass to pipe control --- lte/alt1250/alt1250_usockif.c | 3 +++ lte/alt1250/usock_handlers/alt1250_ioctlhdlr.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/lte/alt1250/alt1250_usockif.c b/lte/alt1250/alt1250_usockif.c index 825361e7a2..5ca53711d5 100644 --- a/lte/alt1250/alt1250_usockif.c +++ b/lte/alt1250/alt1250_usockif.c @@ -257,6 +257,9 @@ int usockif_readreqioctl(int fd, FAR struct usrsock_request_buff_s *buf) switch (req->cmd) { + case FIONBIO: + rsize = sizeof(int); + break; case SIOCLTECMD: rsize = sizeof(struct lte_ioctl_data_s); break; diff --git a/lte/alt1250/usock_handlers/alt1250_ioctlhdlr.c b/lte/alt1250/usock_handlers/alt1250_ioctlhdlr.c index 221fc25b05..56d0a4b27f 100644 --- a/lte/alt1250/usock_handlers/alt1250_ioctlhdlr.c +++ b/lte/alt1250/usock_handlers/alt1250_ioctlhdlr.c @@ -63,6 +63,11 @@ int usockreq_ioctl(FAR struct alt1250_s *dev, { switch (request->cmd) { + case FIONBIO: + /* ALT1250 doesn't use this command. Only return OK. */ + + *usock_result = OK; + break; case SIOCLTECMD: ioctl_subhdlr = usockreq_ioctl_ltecmd; break;