On 28.04.2021 12:24:32, Oliver Hartkopp wrote: > > Maybe the way to trigger the sk_error_report(sk) we might return '-1' > > while the error is then propagated inside errno. > > I added some debug print in isotpsend: > > diff --git a/isotpsend.c b/isotpsend.c > index 3ea574c..c2937fa 100644 > --- a/isotpsend.c > +++ b/isotpsend.c > @@ -45,10 +45,11 @@ > #include > #include > #include > #include > #include > +#include > > #include > #include > #include > #include > @@ -252,10 +253,11 @@ int main(int argc, char **argv) > buf[buflen] = ((buflen % 0xFF) + 1) & 0xFF; > } > > > retval = write(s, buf, buflen); > + printf("retval %d errno %d\n", retval, errno); Note: in user space errno is only valid if retval is "-1"... > if (retval < 0) { > perror("write"); > return retval; > } > > > $ date +%S.%N && ./isotpsend vcan0 -s 123 -d 321 -D 44 -b && date +%S.%N > 43.269173590 > retval 44 errno 0 > 44.271162277 > > So it waits for the timeout as required by the '-b' option - but the errno > is not set :-/ I'm not sure what we have to return in the kernel... Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |