From f60d026e9f279492f11874687e0e55ddb16c93f1 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 23 Sep 2024 19:57:15 +0200 Subject: [PATCH] libkmod: Fix ELFDBG usage The first parameter has to be a kmod_elf. Signed-off-by: Tobias Stoeckmann Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/148 Signed-off-by: Lucas De Marchi --- libkmod/libkmod-elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libkmod/libkmod-elf.c b/libkmod/libkmod-elf.c index 2954e59a..6efe5d8a 100644 --- a/libkmod/libkmod-elf.c +++ b/libkmod/libkmod-elf.c @@ -756,12 +756,13 @@ static uint64_t kmod_elf_resolve_crc(const struct kmod_elf *elf, uint64_t crc, err = elf_get_section_info(elf, shndx, &off, &size, &nameoff); if (err < 0) { - ELFDBG("Could not find section index %" PRIu16 " for crc", shndx); + ELFDBG(elf, "Could not find section index %" PRIu16 " for crc", shndx); return (uint64_t)-1; } if (crc > (size - sizeof(uint32_t))) { - ELFDBG("CRC offset %" PRIu64 " is too big, section %" PRIu16 + ELFDBG(elf, + "CRC offset %" PRIu64 " is too big, section %" PRIu16 " size is %" PRIu64 "\n", crc, shndx, size); return (uint64_t)-1; -- 2.47.3