git: 550ee2d03c5b - main - libkldelf: use warnx instead of printf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Oct 2024 04:29:35 UTC
The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=550ee2d03c5b88bc5d74b257ffcb3ed2c06a60bb commit 550ee2d03c5b88bc5d74b257ffcb3ed2c06a60bb Author: Ka Ho Ng <khng@FreeBSD.org> AuthorDate: 2024-10-08 04:25:36 +0000 Commit: Ka Ho Ng <khng@FreeBSD.org> CommitDate: 2024-10-08 04:29:10 +0000 libkldelf: use warnx instead of printf Sponsored by: Juniper Networks, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46893 --- lib/libkldelf/ef_obj.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libkldelf/ef_obj.c b/lib/libkldelf/ef_obj.c index 32a7c17127ed..30e0d7886995 100644 --- a/lib/libkldelf/ef_obj.c +++ b/lib/libkldelf/ef_obj.c @@ -345,20 +345,20 @@ ef_obj_open(struct elf_file *efile, int verbose) if ((ef->nprogtab != 0 && ef->progtab == NULL) || (ef->nrel != 0 && ef->reltab == NULL) || (ef->nrela != 0 && ef->relatab == NULL)) { - printf("malloc failed\n"); + warnx("malloc failed"); error = ENOMEM; goto out; } if (elf_read_symbols(efile, symtabindex, &ef->ddbsymcnt, &ef->ddbsymtab) != 0) { - printf("elf_read_symbols failed\n"); + warnx("elf_read_symbols failed"); goto out; } if (elf_read_string_table(efile, &shdr[symstrindex], &ef->ddbstrcnt, &ef->ddbstrtab) != 0) { - printf("elf_read_string_table failed\n"); + warnx("elf_read_string_table failed"); goto out; } @@ -367,7 +367,7 @@ ef_obj_open(struct elf_file *efile, int verbose) shdr[hdr->e_shstrndx].sh_type == SHT_STRTAB) { if (elf_read_string_table(efile, &shdr[hdr->e_shstrndx], &ef->shstrcnt, &ef->shstrtab) != 0) { - printf("elf_read_string_table failed\n"); + warnx("elf_read_string_table failed"); goto out; } } @@ -413,7 +413,7 @@ ef_obj_open(struct elf_file *efile, int verbose) ef->reltab[rl].sec = shdr[i].sh_info; if (elf_read_rel(efile, i, &ef->reltab[rl].nrel, &ef->reltab[rl].rel) != 0) { - printf("elf_read_rel failed\n"); + warnx("elf_read_rel failed"); goto out; } rl++; @@ -422,7 +422,7 @@ ef_obj_open(struct elf_file *efile, int verbose) ef->relatab[ra].sec = shdr[i].sh_info; if (elf_read_rela(efile, i, &ef->relatab[ra].nrela, &ef->relatab[ra].rela) != 0) { - printf("elf_read_rela failed\n"); + warnx("elf_read_rela failed"); goto out; } ra++;