diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 15:56:48 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 16:02:37 +0200 |
| commit | da1873aaddc53805f845e21dd4e10cb6f9148b1d (patch) | |
| tree | 4e3858ff4cb6e7bf8a7d64cb46d7d3622394a032 /sys/syz-extract/fetch.go | |
| parent | 66393d1884cb6a6d36dcbe5ad772ae9cf8f2adad (diff) | |
sys/targets: move targets from sys package
This breaks circular dependency between:
sysgen -> sys/linux -> sys -> sysgen
With this circular dependency it is very difficult to
update format of generated descriptions because sysgen does not build.
Diffstat (limited to 'sys/syz-extract/fetch.go')
| -rw-r--r-- | sys/syz-extract/fetch.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/syz-extract/fetch.go b/sys/syz-extract/fetch.go index 5def165b5..4fcbbcda5 100644 --- a/sys/syz-extract/fetch.go +++ b/sys/syz-extract/fetch.go @@ -12,13 +12,13 @@ import ( "strconv" "strings" - "github.com/google/syzkaller/sys" + "github.com/google/syzkaller/sys/targets" ) // fetchValues converts literal constants (e.g. O_APPEND) or any other C expressions // into their respective numeric values. It does so by builting and executing a C program // that prints values of the provided expressions. -func fetchValues(target *sys.Target, kernelDir, buildDir string, +func fetchValues(target *targets.Target, kernelDir, buildDir string, vals, includes, incdirs []string, defines map[string]string) ( map[string]uint64, map[string]bool, error) { bin, out, err := runCompiler(target, kernelDir, buildDir, nil, includes, incdirs, nil, nil) @@ -87,7 +87,7 @@ func fetchValues(target *sys.Target, kernelDir, buildDir string, return res, undeclared, nil } -func runCompiler(target *sys.Target, kernelDir, buildDir string, vals, includes, incdirs []string, defines map[string]string, undeclared map[string]bool) (bin string, out []byte, err error) { +func runCompiler(target *targets.Target, kernelDir, buildDir string, vals, includes, incdirs []string, defines map[string]string, undeclared map[string]bool) (bin string, out []byte, err error) { includeText := "" for _, inc := range includes { includeText += fmt.Sprintf("#include <%v>\n", inc) |
