Open Doorer opened 4 years ago
On systems which have TCSETS2
set, type Termios
actually gets generated from struct termios2
, which seems to be the case for mips64{,le}
:
The version in syscall
was probably generated from struct termios
which is why you don't see the [IO]speed
members.
@Doorer Thanks for reporting, please let us know if @tklauser's comment helps you.
If not, this issue is hard to understand right now, which makes it hard to investigate. Can you please fill in the "What did you expect to see?" and "What did you see instead?" sections? Also, in the "What did you do?" section, can you show code that you've tried? Thanks!
think you , I find the termios2 struct
On systems which have
TCSETS2
set,type Termios
actually gets generated fromstruct termios2
, which seems to be the case formips64{,le}
:The version in
syscall
was probably generated fromstruct termios
which is why you don't see the[IO]speed
members.
think you , I find the termios2 struct will the golang/syscall use the termios which with Ispeed and Ospeed for mips
There‘s currently no test case involving The [IO]speed members of Termios in x/sys/unix. Patches welcome.
In mips64le , The Termios struct doesn't has member Ospeed or Ispeed struct termios { tcflag_t c_iflag; / input mode flags / tcflag_t c_oflag; / output mode flags / tcflag_t c_cflag; / control mode flags / tcflag_t c_lflag; / local mode flags / cc_t c_line; / line discipline / cc_t c_cc[NCCS]; / control characters / };
In golang/sys/unix/ztypes_linux_mips64le.go, I found this define Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [23]uint8 Ispeed uint32 Ospeed uint32 } Will the member Ispped and Ospeed can work ?
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I think so
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I use termios ,but can not work. I found the diffrent between syscall and unix
no
What did you expect to see?
no
What did you see instead?
no