From 7cacd94aa6b454ba098e7dafe2ca82c1f28bd239 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 27 Jun 2017 10:16:28 +0200 Subject: vm/vmimpl: fix linux/ppc64le build --- vm/vmimpl/console.go | 2 -- vm/vmimpl/console_darwin.go | 13 +++++++++++++ vm/vmimpl/console_linux_amd64.go | 15 +++++++++++++++ vm/vmimpl/console_linux_arm64.go | 16 ++++++++++++++++ vm/vmimpl/console_linux_ppc64le.go | 13 +++++++++++++ vm/vmimpl/darwin.go | 15 --------------- vm/vmimpl/linux.go | 17 ----------------- 7 files changed, 57 insertions(+), 34 deletions(-) create mode 100644 vm/vmimpl/console_darwin.go create mode 100644 vm/vmimpl/console_linux_amd64.go create mode 100644 vm/vmimpl/console_linux_arm64.go create mode 100644 vm/vmimpl/console_linux_ppc64le.go delete mode 100644 vm/vmimpl/darwin.go delete mode 100644 vm/vmimpl/linux.go (limited to 'vm/vmimpl') diff --git a/vm/vmimpl/console.go b/vm/vmimpl/console.go index 3fa501162..7fe878c2a 100644 --- a/vm/vmimpl/console.go +++ b/vm/vmimpl/console.go @@ -1,8 +1,6 @@ // Copyright 2017 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. -// +build !ppc64le - package vmimpl import ( diff --git a/vm/vmimpl/console_darwin.go b/vm/vmimpl/console_darwin.go new file mode 100644 index 000000000..15909ae57 --- /dev/null +++ b/vm/vmimpl/console_darwin.go @@ -0,0 +1,13 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package vmimpl + +import "syscall" + +const ( + unix_CBAUD = 0 + unix_CRTSCTS = 0 + syscall_TCGETS = syscall.TIOCGETA + syscall_TCSETS = syscall.TIOCSETA +) diff --git a/vm/vmimpl/console_linux_amd64.go b/vm/vmimpl/console_linux_amd64.go new file mode 100644 index 000000000..6eeb2b258 --- /dev/null +++ b/vm/vmimpl/console_linux_amd64.go @@ -0,0 +1,15 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package vmimpl + +import ( + "golang.org/x/sys/unix" +) + +const ( + unix_CBAUD = unix.CBAUD + unix_CRTSCTS = unix.CRTSCTS + syscall_TCGETS = unix.TCGETS2 + syscall_TCSETS = unix.TCSETS2 +) diff --git a/vm/vmimpl/console_linux_arm64.go b/vm/vmimpl/console_linux_arm64.go new file mode 100644 index 000000000..f10edf002 --- /dev/null +++ b/vm/vmimpl/console_linux_arm64.go @@ -0,0 +1,16 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package vmimpl + +import ( + "golang.org/x/sys/unix" +) + +// This compiles, but wan't tested. +const ( + unix_CBAUD = unix.CBAUD + unix_CRTSCTS = unix.CRTSCTS + syscall_TCGETS = unix.TCGETS2 + syscall_TCSETS = unix.TCSETS2 +) diff --git a/vm/vmimpl/console_linux_ppc64le.go b/vm/vmimpl/console_linux_ppc64le.go new file mode 100644 index 000000000..a7374c0e5 --- /dev/null +++ b/vm/vmimpl/console_linux_ppc64le.go @@ -0,0 +1,13 @@ +// Copyright 2017 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +package vmimpl + +// Just to make the code compile. +// linux_ppc64le as host with adb VMs is not tested. +const ( + unix_CBAUD = 0 + unix_CRTSCTS = 0 + syscall_TCGETS = 0 + syscall_TCSETS = 0 +) diff --git a/vm/vmimpl/darwin.go b/vm/vmimpl/darwin.go deleted file mode 100644 index 6c890da21..000000000 --- a/vm/vmimpl/darwin.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017 syzkaller project authors. All rights reserved. -// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - -// +build darwin - -package vmimpl - -import "syscall" - -const ( - unix_CBAUD = 0 - unix_CRTSCTS = 0 - syscall_TCGETS = syscall.TIOCGETA - syscall_TCSETS = syscall.TIOCSETA -) diff --git a/vm/vmimpl/linux.go b/vm/vmimpl/linux.go deleted file mode 100644 index 19e052076..000000000 --- a/vm/vmimpl/linux.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2017 syzkaller project authors. All rights reserved. -// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. - -// +build linux - -package vmimpl - -import ( - "golang.org/x/sys/unix" -) - -const ( - unix_CBAUD = unix.CBAUD - unix_CRTSCTS = unix.CRTSCTS - syscall_TCGETS = unix.TCGETS2 - syscall_TCSETS = unix.TCSETS2 -) -- cgit mrf-deployment