mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			350 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			350 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// +build !windows
 | 
						|
 | 
						|
package term
 | 
						|
 | 
						|
import (
 | 
						|
	"golang.org/x/sys/unix"
 | 
						|
)
 | 
						|
 | 
						|
func tcget(fd uintptr) (*Termios, error) {
 | 
						|
	p, err := unix.IoctlGetTermios(int(fd), getTermios)
 | 
						|
	if err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	return (*Termios)(p), nil
 | 
						|
}
 | 
						|
 | 
						|
func tcset(fd uintptr, p *Termios) error {
 | 
						|
	return unix.IoctlSetTermios(int(fd), setTermios, (*unix.Termios)(p))
 | 
						|
}
 |