Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC is off by one byte on linux #2

Open
nkovacs opened this issue May 28, 2016 · 2 comments
Open

CC is off by one byte on linux #2

nkovacs opened this issue May 28, 2016 · 2 comments

Comments

@nkovacs
Copy link

nkovacs commented May 28, 2016

On Ubuntu 15.10 (amd64) and Raspbian on a Raspberry Pi 2 the Termios struct contains an extra unsigned char before the CC array (c_line). Because of this everything was off by one byte, e.g. VMIN was interpreted as VTIME.

@creack
Copy link
Owner

creack commented Jun 4, 2016

Indeed! Missing the line discipline.

@creack creack added the bug label Jun 4, 2016
@gfa
Copy link

gfa commented Jun 25, 2016

I'm having problems running the tests on linux, and i think it may be this issue

=== RUN TestCfMakeRaw
--- FAIL: TestCfMakeRaw (0.00s)
raw_test.go:44: Unexpected Raw termios.
Got: raw.Termios{Iflag:0x2a00, Oflag:0x0, Cflag:0x4a30, Lflag:0x580, Cc:[20]uint8{0x4, 0xff, 0xff, 0xff, 0x17, 0x0, 0x1, 0xff, 0x3, 0x1c, 0x1a, 0x19, 0x11, 0x13, 0x16, 0xf, 0xff, 0xff, 0x14, 0xff}, Ispeed:0x2580, Ospeed:0x2580}
Want: raw.Termios{Iflag:0x2800, Oflag:0x0, Cflag:0x4b00, Lflag:0x43, Cc:[20]uint8{0x4, 0xff, 0xff, 0xff, 0x17, 0xff, 0x12, 0xff, 0x3, 0x1c, 0x1a, 0x19, 0x11, 0x13, 0x16, 0xf, 0x1, 0x0, 0x14, 0xff}, Ispeed:0x2580, Ospeed:0x2580}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants