libbtf: Fixup temp filename to .btf, not .btfe

Bug introduced when renaming pahole's 'struct btf' to 'struct btf_elf'.

Fixes: fe4e1f799c ("btf_elf: Rename btf_elf__free() to btf_elf__delete()")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Andrii Nakryiko 2019-02-18 10:58:12 -03:00 committed by Arnaldo Carvalho de Melo
parent e6dfd10bcb
commit 54106025cd
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ static int btf_elf__write(struct btf_elf *btfe)
llvm_objcopy = "llvm-objcopy";
/* Use objcopy to add a .BTF section */
snprintf(tmp_fn, sizeof(tmp_fn), "%s.btfe", btfe->filename);
snprintf(tmp_fn, sizeof(tmp_fn), "%s.btf", filename);
close(fd);
fd = creat(tmp_fn, S_IRUSR | S_IWUSR);
if (fd == -1) {