Skip to content

Commit

Permalink
Change the returned type in kernel.go argSelectorType function to use
Browse files Browse the repository at this point in the history
the newly added parameter sig.OverwriteType if set.

The OverwriteType parameter should be deleted if `argSelectorType` can use
the `EventConfig` structure to search for the correct Type.

Signed-off-by: Tristan d'Audibert <[email protected]>
  • Loading branch information
ScriptSathi committed Nov 19, 2024
1 parent 7f5aa44 commit e56bb43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/selectors/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ func argSelectorType(arg *v1alpha1.ArgSelector, sig []v1alpha1.KProbeArg) (uint3
if arg.Index == s.Index {
// TBD: We shouldn't get this far with invalid KProbe args
// KProbe args have already been validated
return uint32(gt.GenericTypeFromString(s.Type)), nil
ty := s.Type
if s.ExtractParam != "" && s.OverwriteType != "" {
ty = s.OverwriteType
}
return uint32(gt.GenericTypeFromString(ty)), nil
}
}
return 0, fmt.Errorf("argFilter for unknown index")
Expand Down

0 comments on commit e56bb43

Please sign in to comment.