fixeria has submitted this change. ( 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(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
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; }