Skip to content

Commit b19ded9

Browse files
committed
struct_ops: remove AttachTo guard
Signed-off-by: shun159 <[email protected]>
1 parent 77a9f35 commit b19ded9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

collection.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -893,9 +893,10 @@ func (cl *collectionLoader) setStructOpsProgAttachTo(kernType *btf.Struct) {
893893
continue
894894
}
895895

896-
if ps.AttachTo == "" {
897-
ps.AttachTo = fmt.Sprintf("%s:%s", kernType.Name, member)
898-
}
896+
// TODO: Do we need to check if the AttachedTo property is already configured?
897+
// For example, let it fail if it is already configured,
898+
// since it will attach to another struct_ops.
899+
ps.AttachTo = fmt.Sprintf("%s:%s", kernType.Name, member)
899900
}
900901
}
901902

0 commit comments

Comments
 (0)