diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-01-23 11:51:23 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-01-23 13:16:38 +0000 |
| commit | 513ee0af0333981bbfeb29ee6711f3a2b5ea6496 (patch) | |
| tree | 4fb35881f2a4619d061b5b9b7b9f680febb8ec48 /tools/syz-diff/patch.go | |
| parent | a8c686c83f0882effcb668f562c7fc9e3a41a09a (diff) | |
tools/syz-diff: prepare for moving to pkg/
Adjust the code to properly handle context cancellation.
Replace log.Fatalf() by errors where it was straightforward.
Decouple from the global variables.
Diffstat (limited to 'tools/syz-diff/patch.go')
| -rw-r--r-- | tools/syz-diff/patch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/syz-diff/patch.go b/tools/syz-diff/patch.go index 6bdcc8e1e..98a464ca0 100644 --- a/tools/syz-diff/patch.go +++ b/tools/syz-diff/patch.go @@ -14,12 +14,12 @@ import ( "github.com/google/syzkaller/pkg/vcs" ) -func extractModifiedFiles(cfg *mgrconfig.Config, data []byte) { +func PatchFocusAreas(cfg *mgrconfig.Config, gitPatch []byte) { const maxAffectedByHeader = 50 names := map[string]bool{} includedNames := map[string]bool{} - for _, file := range vcs.ParseGitDiff(data) { + for _, file := range vcs.ParseGitDiff(gitPatch) { names[file] = true if strings.HasSuffix(file, ".h") && cfg.KernelSrc != "" { |
