aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vminfo/vminfo.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-03 15:24:13 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-05-03 15:12:45 +0000
commit3a81775029176dd4c693542e6715b985fa7ade4d (patch)
tree8b6558acff0249792c4be3b26a018f70dbd4535d /pkg/vminfo/vminfo.go
parent3ff099b95730725adf7e5a1fae1a1463a3647a3d (diff)
pkg/host: remove FileInfo
Switch to flatrpc.FileInfoT instead. In preparation for pkg/host removal and to avoid circular dependencies in future changes.
Diffstat (limited to 'pkg/vminfo/vminfo.go')
-rw-r--r--pkg/vminfo/vminfo.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/vminfo/vminfo.go b/pkg/vminfo/vminfo.go
index eae8ae4a3..5ede174f7 100644
--- a/pkg/vminfo/vminfo.go
+++ b/pkg/vminfo/vminfo.go
@@ -22,7 +22,7 @@ import (
"strings"
"github.com/google/syzkaller/pkg/cover"
- "github.com/google/syzkaller/pkg/host"
+ "github.com/google/syzkaller/pkg/flatrpc"
"github.com/google/syzkaller/pkg/mgrconfig"
"github.com/google/syzkaller/pkg/rpctype"
"github.com/google/syzkaller/prog"
@@ -48,7 +48,7 @@ func New(cfg *mgrconfig.Config) *Checker {
}
}
-func (checker *Checker) MachineInfo(fileInfos []host.FileInfo) ([]cover.KernelModule, []byte, error) {
+func (checker *Checker) MachineInfo(fileInfos []flatrpc.FileInfoT) ([]cover.KernelModule, []byte, error) {
files := createVirtualFilesystem(fileInfos)
modules, err := checker.parseModules(files)
if err != nil {
@@ -77,7 +77,7 @@ func (checker *Checker) StartCheck() ([]string, []rpctype.ExecutionRequest) {
return checker.checkFiles(), checker.checkContext.startCheck()
}
-func (checker *Checker) FinishCheck(files []host.FileInfo, progs []rpctype.ExecutionResult) (
+func (checker *Checker) FinishCheck(files []flatrpc.FileInfoT, progs []rpctype.ExecutionResult) (
map[*prog.Syscall]bool, map[*prog.Syscall]string, error) {
ctx := checker.checkContext
checker.checkContext = nil
@@ -94,9 +94,9 @@ type checker interface {
syscallCheck(*checkContext, *prog.Syscall) string
}
-type filesystem map[string]host.FileInfo
+type filesystem map[string]flatrpc.FileInfoT
-func createVirtualFilesystem(fileInfos []host.FileInfo) filesystem {
+func createVirtualFilesystem(fileInfos []flatrpc.FileInfoT) filesystem {
files := make(filesystem)
for _, file := range fileInfos {
if file.Exists {