git: 6df3a2d1bfed - main - Revert "libkldelf: use warnx instead of printf"

From: Ka Ho Ng <khng_at_FreeBSD.org>
Date: Tue, 08 Oct 2024 19:40:29 UTC
The branch main has been updated by khng:

URL: https://cgit.FreeBSD.org/src/commit/?id=6df3a2d1bfed791a29fcd403d525f46112235b89

commit 6df3a2d1bfed791a29fcd403d525f46112235b89
Author:     Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2024-10-08 19:39:36 +0000
Commit:     Ka Ho Ng <khng@FreeBSD.org>
CommitDate: 2024-10-08 19:39:36 +0000

    Revert "libkldelf: use warnx instead of printf"
    
    This reverts commit 550ee2d03c5b88bc5d74b257ffcb3ed2c06a60bb.
---
 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 30e0d7886995..32a7c17127ed 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)) {
-		warnx("malloc failed");
+		printf("malloc failed\n");
 		error = ENOMEM;
 		goto out;
 	}
 
 	if (elf_read_symbols(efile, symtabindex, &ef->ddbsymcnt,
 	    &ef->ddbsymtab) != 0) {
-		warnx("elf_read_symbols failed");
+		printf("elf_read_symbols failed\n");
 		goto out;
 	}
 
 	if (elf_read_string_table(efile, &shdr[symstrindex], &ef->ddbstrcnt,
 	    &ef->ddbstrtab) != 0) {
-		warnx("elf_read_string_table failed");
+		printf("elf_read_string_table failed\n");
 		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) {
-			warnx("elf_read_string_table failed");
+			printf("elf_read_string_table failed\n");
 			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) {
-				warnx("elf_read_rel failed");
+				printf("elf_read_rel failed\n");
 				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) {
-				warnx("elf_read_rela failed");
+				printf("elf_read_rela failed\n");
 				goto out;
 			}
 			ra++;