|
@@ -7,17 +7,17 @@ import (
|
|
|
"unsafe"
|
|
|
)
|
|
|
|
|
|
-func getTermios(fd int) (*Termios, error) {
|
|
|
+func getTermios(fd uintptr) (*Termios, error) {
|
|
|
termios := new(Termios)
|
|
|
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCGETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
|
|
|
+ _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, syscall.TIOCGETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
|
|
|
if err != 0 {
|
|
|
return nil, err
|
|
|
}
|
|
|
return termios, nil
|
|
|
}
|
|
|
|
|
|
-func setTermios(fd int, termios *Termios) error {
|
|
|
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), syscall.TIOCSETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
|
|
|
+func setTermios(fd uintptr, termios *Termios) error {
|
|
|
+ _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, syscall.TIOCSETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)
|
|
|
if err != 0 {
|
|
|
return err
|
|
|
}
|