1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Disable custom baudrate support at runtime (Linux)

If picocom is compiled *with* custom-baudrate support (USE_CUSTOM_BAUD)
for Linux, then it uses a new set of ioctl's (TCGETS2 vs TCGETS, etc) to
access the serial ports. This patch allows the custom baudrate support
to be disabled at runtime (without recompiling), and picocom to switch
to using the old ioctl's.

To disable custom baudrate support (and switch back to the "old" ioctls)
simply define the environment variable NO_CUSTOM_BAUD, before starting
picocom.

This applies only to Linux and, obviously, only when picocom has been
compiled with custom baudrate support (USE_CUSTOM_BAUD).
This commit is contained in:
Nick Patavalis
2018-02-20 01:31:34 +02:00
parent 8814974ac7
commit ee23af0cb9
11 changed files with 179 additions and 29 deletions

View File

@ -1626,6 +1626,8 @@ show_usage(char *name)
#endif
#ifdef USE_CUSTOM_BAUD
printf(" USE_CUSTOM_BAUD is enabled\n");
if ( ! use_custom_baud() )
printf(" NO_CUSTOM_BAUD is set\n");
#endif
printf("\nUsage is: %s [options] <tty port device>\n", s);