Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to attach to all available kernel modules #109

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

varunkumare99
Copy link
Contributor

added flag --all-kmods to attach to all available kernel modules.
fix: #100

Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM, just two minor comments. Also, could you please sign off your commit? git commit --amend -s should do the job.

main.go Outdated
if flags.AllKMods {
files, err := os.ReadDir("/sys/kernel/btf")
if err != nil {
log.Fatalf("Failed to read Directory: %s", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.Fatalf("Failed to read Directory: %s", err)
log.Fatalf("Failed to read directory: %s", err)

main.go Outdated

flags.KMods = nil
for _, file := range files {
if !file.IsDir() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to exclude vmlinux here. Otherwise, it will be parsed twice.

Signed-off-by: varunkumare99 <varunkumare99@gmail.com>
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@brb brb merged commit 9b0acba into cilium:master Nov 2, 2022
@varunkumare99
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add flag to attach to all available kernel modules
2 participants