aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-20 15:38:55 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-20 21:19:29 +0200
commitc7ff68231e6c9a054fc3df9348262f376c7b91b4 (patch)
tree93ba24b964b6fbb62b6ea6cf0c81119047455c01 /pkg
parentdc1c172fee85054f10955fc4975d0cea921f999f (diff)
pkg/host: add fuchsia support
Diffstat (limited to 'pkg')
-rw-r--r--pkg/host/host_fuchsia.go19
-rw-r--r--pkg/host/host_linux.go (renamed from pkg/host/host.go)0
-rw-r--r--pkg/host/host_linux_test.go (renamed from pkg/host/host_test.go)2
3 files changed, 21 insertions, 0 deletions
diff --git a/pkg/host/host_fuchsia.go b/pkg/host/host_fuchsia.go
new file mode 100644
index 000000000..7f4abc47b
--- /dev/null
+++ b/pkg/host/host_fuchsia.go
@@ -0,0 +1,19 @@
+// 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 fuchsia
+
+package host
+
+import (
+ "github.com/google/syzkaller/prog"
+)
+
+// DetectSupportedSyscalls returns list on supported syscalls on host.
+func DetectSupportedSyscalls(target *prog.Target) (map[*prog.Syscall]bool, error) {
+ supported := make(map[*prog.Syscall]bool)
+ for _, c := range target.Syscalls {
+ supported[c] = true
+ }
+ return supported, nil
+}
diff --git a/pkg/host/host.go b/pkg/host/host_linux.go
index ef301e2dc..ef301e2dc 100644
--- a/pkg/host/host.go
+++ b/pkg/host/host_linux.go
diff --git a/pkg/host/host_test.go b/pkg/host/host_linux_test.go
index 1c40335d7..e32fe09cc 100644
--- a/pkg/host/host_test.go
+++ b/pkg/host/host_linux_test.go
@@ -1,6 +1,8 @@
// Copyright 2015 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 host
import (