mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Clarify platform errors.
PiperOrigin-RevId: 367446222
This commit is contained in:
committed by
gVisor bot
parent
192f20788b
commit
cbf00d633d
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user