Clarify platform errors.

PiperOrigin-RevId: 367446222
This commit is contained in:
Adin Scannell
2021-04-08 09:34:01 -07:00
committed by gVisor bot
parent 192f20788b
commit cbf00d633d
+2 -2
View File
@@ -486,7 +486,7 @@ func (s *Sandbox) createSandboxProcess(conf *config.Config, args *Args, startSyn
}
if deviceFile, err := gPlatform.OpenDevice(); err != nil {
return fmt.Errorf("opening device file for platform %q: %v", gPlatform, err)
return fmt.Errorf("opening device file for platform %q: %v", conf.Platform, err)
} else if deviceFile != nil {
defer deviceFile.Close()
cmd.ExtraFiles = append(cmd.ExtraFiles, deviceFile)
@@ -1174,7 +1174,7 @@ func deviceFileForPlatform(name string) (*os.File, error) {
f, err := p.OpenDevice()
if err != nil {
return nil, fmt.Errorf("opening device file for platform %q: %v", p, err)
return nil, fmt.Errorf("opening device file for platform %q: %w", name, err)
}
return f, nil
}