Skip to content

Commit

Permalink
Merge pull request opencontainers#231 from yoheiueda/fix-ioctl-endian…
Browse files Browse the repository at this point in the history
…-issue

Fix an endian bug for the ioctl argument
  • Loading branch information
vmarmol committed Oct 22, 2014
2 parents 3326e43 + 92fc5f1 commit 4bce466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ func OpenAndDup(consolePath string) error {
// Unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f.
// Unlockpt should be called before opening the slave side of a pseudoterminal.
func Unlockpt(f *os.File) error {
var u int
var u int32

return Ioctl(f.Fd(), syscall.TIOCSPTLCK, uintptr(unsafe.Pointer(&u)))
}

// Ptsname retrieves the name of the first available pts for the given master.
func Ptsname(f *os.File) (string, error) {
var n int
var n int32

if err := Ioctl(f.Fd(), syscall.TIOCGPTN, uintptr(unsafe.Pointer(&n))); err != nil {
return "", err
Expand Down

0 comments on commit 4bce466

Please sign in to comment.