pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email )


Change subject: osmo_io: Support writing to files with mode 
OSMO_IO_FD_MODE_READ_WRITE
......................................................................

osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE

Trying to use IORING_OP_SENDMSG on local files fails with "Socket
operation on non-socket" errors.

Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
---
M src/core/osmo_io_uring.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/39363/1

diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index 72a465e..5fd7ddc 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -307,6 +307,8 @@

        switch (msghdr->action) {
        case IOFD_ACT_WRITE:
+               io_uring_prep_write(sqe, msghdr->iofd->fd, 
msghdr->iov[0].iov_base, msghdr->iov[0].iov_len, 0);
+               break;
        case IOFD_ACT_SENDTO:
        case IOFD_ACT_SENDMSG:
                io_uring_prep_sendmsg(sqe, msghdr->iofd->fd, &msghdr->hdr, 
msghdr->flags);

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
Gerrit-Change-Number: 39363
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to