From: Tobias Stoeckmann Date: Mon, 23 Sep 2024 17:57:15 +0000 (+0200) Subject: libkmod: Fix ELFDBG usage X-Git-Tag: v34~291 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f60d026e9f279492f11874687e0e55ddb16c93f1;p=thirdparty%2Fkmod.git 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 --- 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;