Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com>
This one is even easier to tell it is correct. On 5/16/2020 8:03 AM, Richard Cochran wrote: > 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 <richardcoch...@gmail.com> > --- > raw.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/raw.c b/raw.c > index 81ec431..15c9756 100644 > --- a/raw.c > +++ b/raw.c > @@ -336,8 +336,7 @@ static int raw_send(struct transport *t, struct fdarray > *fda, > > cnt = send(fd, ptr, len, 0); > if (cnt < 1) { > - pr_err("send failed: %d %m", errno); > - return cnt; > + return -errno; > } > /* > * Get the time stamp right away. > _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel