telf: Drop unused bool retval from teu_getehdr() function 64/314064/2
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 4 Jul 2024 13:58:56 +0000 (15:58 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 4 Jul 2024 14:23:07 +0000 (16:23 +0200)
Needed for consistency with:

  https://review.tizen.org/gerrit/#/c/platform/upstream/minicoredumper/+/314063/

Change-Id: I0c388d587eb09e981007b14aa08c5b19add01818

packaging/crash-worker.spec
src/crash-stack/unwind.c
src/shared/telf.c
src/shared/telf.h

index 5849fbc8cb67dc2739b999c46ae457a55d0ff0df..a38a3fa7a3950f096d022005f89a945735ca01ad 100644 (file)
@@ -16,7 +16,7 @@
 
 Name:           crash-worker
 Summary:        Coredump handler and report generator for Tizen
-Version:        9.0.1
+Version:        9.0.2
 Release:        1
 Group:          Framework/system
 License:        MIT
index cb20063b64e3baf8abae4ab9487dd3019180731a..7d9e93532449b4e3c581f7abf768dc13b6bc80ba 100644 (file)
@@ -250,10 +250,7 @@ static int find_eh_frame_hdr(int fd, char *image, uint64_t size,
     if ((elf = elf_start(fd, image, size)) == NULL)
         return -1;
 
-    if (!teu_getehdr(elf, &ehdr)) {
-        _E("teu_getehdr: %s", teu_errmsg(elf));
-        goto elf_section_offset_end;
-    }
+    teu_getehdr(elf, &ehdr);
 
     for (size_t i = 0; i < elf->ehdr.e_shnum; i++) {
         if (!teu_getshdr(elf, i, &shdr))
@@ -269,7 +266,6 @@ static int find_eh_frame_hdr(int fd, char *image, uint64_t size,
         }
     }
 
-elf_section_offset_end:
     teu_close(elf);
     free(elf);
     return (offset ? 0 : -1);
index d987fc6cb3efcb253b098d4b056961dbaf600bc0..11142670ec91f2ca50457ef5eb33ef2cc85e3398 100644 (file)
@@ -182,13 +182,12 @@ bool teu_begin_memory(void *memory, Elf *elf)
        return true;
 }
 
-bool teu_getehdr(Elf *elf, Elf64_Ehdr *ehdr)
+void teu_getehdr(Elf *elf, Elf64_Ehdr *ehdr)
 {
        assert(elf);
        assert(ehdr);
 
        memcpy(ehdr, &elf->ehdr, sizeof(*ehdr));
-       return true;
 }
 
 bool teu_getphdr(Elf *elf, uint64_t index, Elf64_Phdr *phdr)
@@ -384,10 +383,8 @@ off64_t teu_getnote(Elf *elf, void *data, off64_t offset,
 //         if (teu_class(&elf) == ELFCLASS64)
 //                 printf("ELFCLASS64\n");
 //
-//         if (!teu_getehdr(&elf, &ehdr)) {
-//                 printf("err");
-//                 return 1;
-//         }
+//         teu_getehdr(&elf, &ehdr);
+//
 //         printf("PHnum: %d   SHnum: %d\n", ehdr.e_phnum, ehdr.e_shnum);
 //
 //         printf("PHDRS:\n");
index 8007a94390e7fbabf3b19d87fed661441ec27922..31edcd967b54d89e1c2b48fd75c65409e72367a1 100644 (file)
@@ -61,7 +61,7 @@ bool teu_begin(int fd, Elf *elf);
 
 bool teu_begin_memory(void *memory, Elf *elf);
 
-bool teu_getehdr(Elf *elf, Elf64_Ehdr *ehdr);
+void teu_getehdr(Elf *elf, Elf64_Ehdr *ehdr);
 
 bool teu_getphdr(Elf *elf, uint64_t index, Elf64_Phdr *phdr);