Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
katautils: Remove unused argument containerID of function SetKernelPa…
Browse files Browse the repository at this point in the history
…rams

Remove unused argument containerID of function SetKernelParams.

Fixes: #1097

Signed-off-by: Hui Zhu <[email protected]>
  • Loading branch information
teawater committed Jan 8, 2019
1 parent 36c267a commit fb149ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/katautils/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func HandleFactory(ctx context.Context, vci vc.VC, runtimeConfig *oci.RuntimeCon

// SetKernelParams adds the user-specified kernel parameters (from the
// configuration file) to the defaults so that the former take priority.
func SetKernelParams(containerID string, runtimeConfig *oci.RuntimeConfig) error {
func SetKernelParams(runtimeConfig *oci.RuntimeConfig) error {
defaultKernelParams := GetKernelParamsFunc(needSystemd(runtimeConfig.HypervisorConfig))

if runtimeConfig.HypervisorConfig.Debug {
Expand Down Expand Up @@ -138,7 +138,7 @@ func CreateSandbox(ctx context.Context, vci vc.VC, ociSpec oci.CompatOCISpec, ru
span, ctx := Trace(ctx, "createSandbox")
defer span.Finish()

err := SetKernelParams(containerID, &runtimeConfig)
err := SetKernelParams(&runtimeConfig)
if err != nil {
return nil, vc.Process{}, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/katautils/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func TestSetKernelParams(t *testing.T) {

assert.Empty(config.HypervisorConfig.KernelParams)

err := SetKernelParams(testContainerID, &config)
err := SetKernelParams(&config)
assert.NoError(err)

if needSystemd(config.HypervisorConfig) {
Expand Down Expand Up @@ -234,7 +234,7 @@ func TestSetKernelParamsUserOptionTakesPriority(t *testing.T) {

assert.NotEmpty(config.HypervisorConfig.KernelParams)

err := SetKernelParams(testContainerID, &config)
err := SetKernelParams(&config)
assert.NoError(err)

kernelParams := config.HypervisorConfig.KernelParams
Expand Down

0 comments on commit fb149ce

Please sign in to comment.