]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: add syscall.Termios on freebsd/{386,amd64}
authorMichael Gehring <mg@ebfe.org>
Mon, 13 Jan 2014 21:57:38 +0000 (13:57 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 13 Jan 2014 21:57:38 +0000 (13:57 -0800)
R=golang-codereviews, bradfitz, mg
CC=golang-codereviews
https://golang.org/cl/51580044

src/pkg/syscall/types_freebsd.go
src/pkg/syscall/ztypes_freebsd_386.go
src/pkg/syscall/ztypes_freebsd_amd64.go

index ccf53d0adfa51203eab92c396282ec93ff36c381..ff3adc3f6ecc3853e8cb24fa0425f72d060bdb7c 100644 (file)
@@ -18,6 +18,7 @@ package syscall
 #include <dirent.h>
 #include <fcntl.h>
 #include <signal.h>
+#include <termios.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/event.h>
@@ -248,3 +249,7 @@ type BpfInsn C.struct_bpf_insn
 type BpfHdr C.struct_bpf_hdr
 
 type BpfZbufHeader C.struct_bpf_zbuf_header
+
+// Terminal handling
+
+type Termios C.struct_termios
index e77bd4b4139ccf27dea167b6087ca0bbff205319..3df7c517313ee1841a923740ddf594eb0e471d37 100644 (file)
@@ -443,3 +443,13 @@ type BpfZbufHeader struct {
        User_gen   uint32
        X_bzh_pad  [5]uint32
 }
+
+type Termios struct {
+       Iflag  uint32
+       Oflag  uint32
+       Cflag  uint32
+       Lflag  uint32
+       Cc     [20]uint8
+       Ispeed uint32
+       Ospeed uint32
+}
index 922de2ce50d0d4a9238fcfc09430192c306ba3dd..49ad8af81fe6fba4c365a19be5127e76c1c243c8 100644 (file)
@@ -446,3 +446,13 @@ type BpfZbufHeader struct {
        User_gen   uint32
        X_bzh_pad  [5]uint32
 }
+
+type Termios struct {
+       Iflag  uint32
+       Oflag  uint32
+       Cflag  uint32
+       Lflag  uint32
+       Cc     [20]uint8
+       Ispeed uint32
+       Ospeed uint32
+}