From nobody Fri Oct 18 20:21:41 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XVbhQ2syKz5YtxD; Fri, 18 Oct 2024 20:21:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XVbhP6ygYz4GTX; Fri, 18 Oct 2024 20:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4K45XHtwOkawxg44j2fRDeZwkdd7OtT+Utvyy4qc6g=; b=c07niiXGzEOeGJcwlh5CetztlXEpiOoR0cP7iaqY/+M8hQJjnhiwoLoQVVMaKulGH0eJI7 P6tHuJOvEDTbpoFS1aB0y1uGpt4GXI9v3LIu54ltpt8aoVZ5cv4y5iIf74BtUDxG1F67G9 VP5n7CD+buHka678dsKY2D5flZOTw5/Xz1EFSt73XqGULTGh8kwjl4ILMaizwtdQ124Hdr b9UldCkvmlMCWQKYz0Pyw39HPhU1N4CCaRMlZ+PZ7XqtYZCQazEGuKe8peouiPjdPM2HsH YprmirpxUOrvuiywk8YfMGBlZRj4Ilsq6YQaCy8aI/WK+9EfE9/QI/OmmRzkjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729282902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4K45XHtwOkawxg44j2fRDeZwkdd7OtT+Utvyy4qc6g=; b=mdu/ukTGgOlaa+urEBIBx4uJYn5P/sesXktSgVsgiDBv5FM073zRZ4cbYaOEaD8JmnQTHs W30MCx5Zbfew6hqJi9P9uYM7VZ7BxTqqgikQAyMGKHDttdx+eEDP3xbPbNDpXPAmqjsb6N TbqcMpdw65174QMY3w/QG7vOGmvECOUkHTU45BoFS4KMkxC0w0vWhVp9i8mYUL4ZEX6qbX QzUkPlxGAQhuAHxwDie9KbRlOqHDMacNsQpPHHdRYxVQ79TfbxAGmDYsuPSMNvcYUnLFqr BGpwIAfraqRNJlTt/uMOT+kTNqFXX4b0mw8m+g3ad6H31I+aNBNklBVq4jRnNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729282902; a=rsa-sha256; cv=none; b=hkAcFlIPdEzCmAKQcccVsJqBIiZ6iCHIZBrxJ5SuKloTx3aCeAdvAnukkUqKqIcHwwKaUT TuIbRYLqi7IvR7ULxWNi+Z3vCJ3j/TEdy9x3F7nQ1z86N5ObXnIWX8NuyjyPivF6R1lmUV aC8X+37P3JDSe+90C1e4itcexu/NvdT8MP9ps3kEabHWZ/vABZe1Sc8JQByVy98v3ZiTRs kwps6+bmXUnVwl4NmxQOuYolLC+ntDrCkJHvgErzEk6zIQzftt+feKr3XlnT9dDgRWK49h 05nDGYivEk3mMN4ue53Td26cuupIbMnGftF0cJ9XMnYo4wgbtgHAGJNgQBOZcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XVbhP6LVzznb9; Fri, 18 Oct 2024 20:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49IKLfuY074945; Fri, 18 Oct 2024 20:21:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49IKLftv074942; Fri, 18 Oct 2024 20:21:41 GMT (envelope-from git) Date: Fri, 18 Oct 2024 20:21:41 GMT Message-Id: <202410182021.49IKLftv074942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 599c4399e9b8 - main - libkldelf: use warnx instead of printf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 599c4399e9b8e5db10dcdd949da96ff2b12b70cf Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=599c4399e9b8e5db10dcdd949da96ff2b12b70cf commit 599c4399e9b8e5db10dcdd949da96ff2b12b70cf Author: Ka Ho Ng AuthorDate: 2024-10-08 04:25:36 +0000 Commit: Ka Ho Ng CommitDate: 2024-10-18 20:21:44 +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++;