Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5558
## Summary A baud rate of 0 is valid per POSIX [tcsetattr()](https://pubs.opengroup.org/onlinepubs/009696799/functions/tcsetattr.html). B0 is very old school UNIX and setting the baud rate to that indicates that the "the modem control lines shall no longer be asserted. Normally, this shall disconnect the line." AFAIK no RTEMS UART drivers have support for modem control lines. If one did, it would have to explicitly check for B0. All uart/console drivers should have their set attributes function checked to ensure baud rate of 0 results in an error being returned rather than a divide by 0. I got caught by this while trying out [CodeSonar on RTEMS](https://flightsoftware.jhuapl.edu/files/_site/workshops/old_archive/2014/). It was flagged as a missed divide by zero but is actually a feature not supported by the driver. See [MR 1216](https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1216) for one case of this being addressed. See [this](https://gitlab.rtems.org/rtems/docs/rtems-docs/-/issues/144) documentation issue for updating to discuss this. ## Steps to reproduce Code review. <!-- Pre-set options - milestone --> -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5558 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
