]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
libkmod: Fix ELFDBG usage
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 23 Sep 2024 17:57:15 +0000 (19:57 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 28 Sep 2024 04:03:24 +0000 (23:03 -0500)
The first parameter has to be a kmod_elf.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/148
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-elf.c

index 2954e59a2bd9d768b582cc34a9f0181dac29363d..6efe5d8abec95e034b516edbe902b3680f41a063 100644 (file)
@@ -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;