raw: Convey transmit path errors to the caller.
The transport layer's functional interface foresees having error codes percolate back up to the caller. However, up until now, the raw module simply returned -1 for any error. This patch lets the code return the specific error instead. In addition, it removes the gratuitous printing of the error message, leaving that task up to caller, just like the other transport modules. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
0d82c41ac1
commit
d95fbcb566
3
raw.c
3
raw.c
|
@ -336,8 +336,7 @@ static int raw_send(struct transport *t, struct fdarray *fda,
|
||||||
|
|
||||||
cnt = send(fd, ptr, len, 0);
|
cnt = send(fd, ptr, len, 0);
|
||||||
if (cnt < 1) {
|
if (cnt < 1) {
|
||||||
pr_err("send failed: %d %m", errno);
|
return -errno;
|
||||||
return cnt;
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Get the time stamp right away.
|
* Get the time stamp right away.
|
||||||
|
|
Loading…
Reference in New Issue