fix misleading pr_err on poll timeout
If poll() times out, don't print a misleading errno, say that a timeout occured. Signed-off-by: Jiri Bohac <jbohac@suse.cz>master
parent
9c83fcb3c9
commit
7b02a5e9bd
3
sk.c
3
sk.c
|
@ -218,7 +218,8 @@ int sk_receive(int fd, void *buf, int buflen,
|
||||||
struct pollfd pfd = { fd, 0, 0 };
|
struct pollfd pfd = { fd, 0, 0 };
|
||||||
res = poll(&pfd, 1, sk_tx_timeout);
|
res = poll(&pfd, 1, sk_tx_timeout);
|
||||||
if (res < 1) {
|
if (res < 1) {
|
||||||
pr_err("poll tx timestamp failed: %m");
|
pr_err(res ? "poll tx timestamp failed: %m" :
|
||||||
|
"poll tx timestamp timeout");
|
||||||
return res;
|
return res;
|
||||||
} else if (!(pfd.revents & POLLERR)) {
|
} else if (!(pfd.revents & POLLERR)) {
|
||||||
pr_err("poll tx woke up on non ERR event");
|
pr_err("poll tx woke up on non ERR event");
|
||||||
|
|
Loading…
Reference in New Issue