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:
@ -71,11 +71,11 @@ int cfsetispeed_custom(struct termios *tiop, int speed) {
|
||||
return cfsetispeed(tiop, speed);
|
||||
}
|
||||
|
||||
int cfgetospeed_custom(struct termios *tiop) {
|
||||
int cfgetospeed_custom(const struct termios *tiop) {
|
||||
return cfgetospeed(tiop);
|
||||
}
|
||||
|
||||
int cfgetispeed_custom(struct termios *tiop) {
|
||||
int cfgetispeed_custom(const struct termios *tiop) {
|
||||
return cfgetispeed(tiop);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user