fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30289 )


Change subject: trxcon: trx_data_rx_cb(): print strerror(errno) if read() fails
......................................................................

trxcon: trx_data_rx_cb(): print strerror(errno) if read() fails

Change-Id: I78658a706e5bfda446e3929e33abcdee3f08845b
---
M src/host/trxcon/src/trx_if.c
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/89/30289/1

diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index 06f0a07..c8e7a93 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -635,7 +635,10 @@

        read_len = read(ofd->fd, buf, sizeof(buf));
        if (read_len <= 0) {
-               LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, "read() failed with 
rc=%zd\n", read_len);
+               strerror_r(errno, (char *)buf, sizeof(buf));
+               LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR,
+                         "read() failed on TRXD with rc=%zd (%s)\n",
+                         read_len, (const char *)buf);
                return read_len;
        }


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30289
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I78658a706e5bfda446e3929e33abcdee3f08845b
Gerrit-Change-Number: 30289
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to