github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/pkg/termios/sgtty_unix.go (about)

     1  // Copyright 2021 the u-root Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !plan9 && !windows && !darwin && !freebsd && !openbsd
     6  // +build !plan9,!windows,!darwin,!freebsd,!openbsd
     7  
     8  package termios
     9  
    10  import "golang.org/x/sys/unix"
    11  
    12  const (
    13  	gets       = unix.TCGETS
    14  	sets       = unix.TCSETS
    15  	getWinSize = unix.TIOCGWINSZ
    16  	setWinSize = unix.TIOCSWINSZ
    17  )
    18  
    19  func speed(speed int) uint32 {
    20  	return uint32(speed)
    21  }