mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-07-19 17:50:29 +00:00
13 lines
293 B
Go
13 lines
293 B
Go
|
package provider
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"syscall"
|
||
|
"unsafe"
|
||
|
)
|
||
|
|
||
|
func setWinsize(f *os.File, w, h int) {
|
||
|
syscall.Syscall(syscall.SYS_IOCTL, f.Fd(), uintptr(syscall.TIOCSWINSZ), //nolint:errcheck
|
||
|
uintptr(unsafe.Pointer(&struct{ h, w, x, y uint16 }{uint16(h), uint16(w), 0, 0}))) //nolint:errcheck
|
||
|
}
|