code: func Restore(fd int, state *State) error {
  	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&state.termios)), 0, 0, 0)
  	return err
  }
docs: // Restore restores the terminal connected to the given file descriptor to a
  // previous state.