diff options
author | Adin Scannell <ascannell@google.com> | 2021-04-08 09:31:51 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-04-08 09:34:01 -0700 |
commit | cbf00d633db744febdac262ecfbc4908aa4e8a2f (patch) | |
tree | 838da697e7d11b9df3cec41bb32a0756cd6c9cfb | |
parent | 192f20788b338900291b0692e2518a8e8bc0f56d (diff) |
Clarify platform errors.
PiperOrigin-RevId: 367446222
-rw-r--r-- | runsc/sandbox/sandbox.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go index 450f92645..47da2dd10 100644 --- a/runsc/sandbox/sandbox.go +++ b/runsc/sandbox/sandbox.go @@ -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 } |