mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
USE_CUSTOM_BAUD support for linux/powerpc[64le].
The powerpc[64le] arch uses different ioctls for custom baud setting: It uses the old TCSETS*, TCGETS ioctls, not the new TCSETS*2, TCGETS2 ones. Cross-compiles cleanly, not tested (no h/w currently available).
This commit is contained in:
@ -56,13 +56,13 @@ tc2setattr(int fd, int optional_actions, const struct termios *tios)
|
||||
|
||||
switch (optional_actions) {
|
||||
case TCSANOW:
|
||||
cmd = TCSETS2;
|
||||
cmd = IOCTL_SETS;
|
||||
break;
|
||||
case TCSADRAIN:
|
||||
cmd = TCSETSW2;
|
||||
cmd = IOCTL_SETSW;
|
||||
break;
|
||||
case TCSAFLUSH:
|
||||
cmd = TCSETSF2;
|
||||
cmd = IOCTL_SETSF;
|
||||
break;
|
||||
default:
|
||||
errno = EINVAL;
|
||||
@ -88,7 +88,7 @@ tc2getattr(int fd, struct termios *tios)
|
||||
size_t i;
|
||||
int r;
|
||||
|
||||
r = ioctl(fd, TCGETS2, &t2);
|
||||
r = ioctl(fd, IOCTL_GETS, &t2);
|
||||
if (r < 0) return r;
|
||||
|
||||
tios->c_iflag = t2.c_iflag;
|
||||
|
Reference in New Issue
Block a user