tools/syz-trace2syz: merge config package into proggen

Since we now have only single variable there,
it does not seem to deserve a separate package.
This commit is contained in:
Dmitry Vyukov 2018-12-06 16:30:14 +01:00
parent 6a60a19530
commit d68400a8d1
2 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,6 @@ import (
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/prog"
"github.com/google/syzkaller/tools/syz-trace2syz/config"
"github.com/google/syzkaller/tools/syz-trace2syz/parser"
)
@ -363,7 +362,7 @@ func reorderStructFields(syzType *prog.StructType, traceType *parser.GroupType,
func shouldSkip(ctx *Context) bool {
syscall := ctx.CurrentStraceCall
if config.ShouldSkip[syscall.CallName] {
if unsupportedCalls[syscall.CallName] {
return true
}
switch syscall.CallName {

View File

@ -1,12 +1,12 @@
// Copyright 2018 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 config
package proggen
var (
// ShouldSkip lists system calls that we should skip when parsing
// Some of these are unsupported or not worth executing
ShouldSkip = map[string]bool{
// unsupportedCalls lists system calls that we should skip when parsing.
// Some of these are unsupported or not worth executing.
unsupportedCalls = map[string]bool{
// While we have system call descriptions for execve it is not worth adding
// the ones in traces. Every trace has an execve at the beginning which means
// all the system calls afterwards will not execute