katautils: Remove unused argument containerID of function SetKernelParams

Remove unused argument containerID of function SetKernelParams.

Fixes: #1097

Signed-off-by: Hui Zhu <teawater@hyper.sh>
This commit is contained in:
Hui Zhu 2019-01-08 21:25:25 +08:00
parent 36c267a1d2
commit fb149ce34e
2 changed files with 4 additions and 4 deletions

View File

@ -85,7 +85,7 @@ func HandleFactory(ctx context.Context, vci vc.VC, runtimeConfig *oci.RuntimeCon
// SetKernelParams adds the user-specified kernel parameters (from the // SetKernelParams adds the user-specified kernel parameters (from the
// configuration file) to the defaults so that the former take priority. // 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)) defaultKernelParams := GetKernelParamsFunc(needSystemd(runtimeConfig.HypervisorConfig))
if runtimeConfig.HypervisorConfig.Debug { if runtimeConfig.HypervisorConfig.Debug {
@ -138,7 +138,7 @@ func CreateSandbox(ctx context.Context, vci vc.VC, ociSpec oci.CompatOCISpec, ru
span, ctx := Trace(ctx, "createSandbox") span, ctx := Trace(ctx, "createSandbox")
defer span.Finish() defer span.Finish()
err := SetKernelParams(containerID, &runtimeConfig) err := SetKernelParams(&runtimeConfig)
if err != nil { if err != nil {
return nil, vc.Process{}, err return nil, vc.Process{}, err
} }

View File

@ -201,7 +201,7 @@ func TestSetKernelParams(t *testing.T) {
assert.Empty(config.HypervisorConfig.KernelParams) assert.Empty(config.HypervisorConfig.KernelParams)
err := SetKernelParams(testContainerID, &config) err := SetKernelParams(&config)
assert.NoError(err) assert.NoError(err)
if needSystemd(config.HypervisorConfig) { if needSystemd(config.HypervisorConfig) {
@ -234,7 +234,7 @@ func TestSetKernelParamsUserOptionTakesPriority(t *testing.T) {
assert.NotEmpty(config.HypervisorConfig.KernelParams) assert.NotEmpty(config.HypervisorConfig.KernelParams)
err := SetKernelParams(testContainerID, &config) err := SetKernelParams(&config)
assert.NoError(err) assert.NoError(err)
kernelParams := config.HypervisorConfig.KernelParams kernelParams := config.HypervisorConfig.KernelParams