mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 17:24:18 +01:00
virtcontainers: fix codes misunderstanding in virtcontainers
Still there are some codes left which will cause some misunderstanding Change `p` in short of `pod` into `s` or `sandbox` Fixes: #325 Signed-off-by: Haomin <caihaomin@huawei.com>
This commit is contained in:
@@ -1326,22 +1326,22 @@ func togglePauseSandbox(sandboxID string, pause bool) (*Sandbox, error) {
|
||||
defer unlockSandbox(lockFile)
|
||||
|
||||
// Fetch the sandbox from storage and create it.
|
||||
p, err := fetchSandbox(sandboxID)
|
||||
s, err := fetchSandbox(sandboxID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if pause {
|
||||
err = p.Pause()
|
||||
err = s.Pause()
|
||||
} else {
|
||||
err = p.Resume()
|
||||
err = s.Resume()
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return p, nil
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// HotplugAddDevice is used for add a device to sandbox
|
||||
|
||||
Reference in New Issue
Block a user