Skip to content

Commit

Permalink
Fix vmlinux.h issue
Browse files Browse the repository at this point in the history
  • Loading branch information
parttimenerd committed Feb 17, 2024
1 parent d6d7b25 commit 7963bc3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ private Path obtainPathToVMLinuxHeader() {
}
// else run bpftool btf dump file /sys/kernel/btf/vmlinux format c
// save output to a temp file and return the path to the temp file
var tempFile = Files.createTempFile("vmlinux", ".h");
tempFile.toFile().deleteOnExit();
var tempDirectory = Files.createTempDirectory("vmlinux");
tempDirectory.toFile().deleteOnExit();
var tempFile = tempDirectory.resolve("vmlinux.h");
var process = new ProcessBuilder("bpftool", "btf", "dump", "file", "/sys/kernel/btf/vmlinux", "format", "c")
.redirectOutput(tempFile.toFile())
.start();
Expand Down

0 comments on commit 7963bc3

Please sign in to comment.