From 1fd901159188a5e0c2b3559ae7ec7deff7c4e7a2 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 29 Nov 2020 10:40:36 +0100 Subject: pkg/mgrconfig: add prog&sys.targets targets to Config These are widely used with the config as the refactoring shows. This removes a bunch of unnecessary code. Also fixes a number of bugs where we confused Arch with VMArch. --- pkg/repro/repro.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'pkg/repro') diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 41a3a5874..930127901 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -67,11 +67,7 @@ func Run(crashLog []byte, cfg *mgrconfig.Config, features *host.Features, report if len(vmIndexes) == 0 { return nil, nil, fmt.Errorf("no VMs provided") } - target, err := prog.GetTarget(cfg.TargetOS, cfg.TargetArch) - if err != nil { - return nil, nil, err - } - entries := target.ParseLog(crashLog) + entries := cfg.Target.ParseLog(crashLog) if len(entries) == 0 { return nil, nil, fmt.Errorf("crash log does not contain any programs") } @@ -101,7 +97,7 @@ func Run(crashLog []byte, cfg *mgrconfig.Config, features *host.Features, report timeouts = []time.Duration{noOutputTimeout} } ctx := &context{ - target: targets.Get(cfg.TargetOS, cfg.TargetArch), + target: cfg.SysTarget, reporter: reporter, crashTitle: crashTitle, crashType: crashType, -- cgit mrf-deployment