From nobody Tue Oct 08 04:29:35 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 4XN32S0q35z5YvM9; Tue, 08 Oct 2024 04:29:36 +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 4XN32R69fWz4cC7; Tue, 8 Oct 2024 04:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728361775; 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=D0RQpERiirhtoAJx+tC71u4Itzed0SzHJTNh+Fh3FTo=; b=cG1dyNyQJuZvEIs1Gbww33FGlqMr6YjfFGRSM8VCGUCNxhfywoPYPzJWBKG9mM1p71nUZz +nrelkKnYguHhbYlOBhATPNEqcvpfKW6i68Qsv1YRz0J7Gz8tna+bI5j+zsFPSdlNA60E8 /t5qjd7h2/WI2oCaqYUe01H6IT5xJ2hHviNpFM76ie8HIzjFvBDELrggN8GPOm9EaR4ZHR ZrARZO79bqcCjjlHG9aeBi8Splcnl12Ge3/uRDN51V6Kjgf9diwUtNdmmMJBDbxuIRycCn LlYWSsRhwxWICcPppdkVeAi8FXDx7XfXS7nzH2PeqeL+m5W78y2p28TxMqI9uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728361775; 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=D0RQpERiirhtoAJx+tC71u4Itzed0SzHJTNh+Fh3FTo=; b=gJafdwGfMX9wHw1CsFUaqfVJmP3gxcH6Xzi/8tIoX5gRApe+qoJg6KNrE+C9/iwHHzEwZP +1ezZBHi13C+7OmMTsfal4frNI/tjRjdBe7gfj3/5RvLzFQcnHM4LyL6+3Pt7FMgVNnBxQ 9kLW/S6xLrz9zUDUckyNc8YGhJb7AsegOaAh/8NqX+Ye5jOBA6RxQIfB24zFo6CcdmCKg4 5GcPHFH3QGsU/5yZaai0FTlvgN2f2JKJm12gs71Yhzf2a4eP4SkxNUmcFTHcNY7hkNVFnE 92J+DI8mSRR1Fy3NDe6dBaQ6SyB6IkBru2tITHlTnXdj3YkBpL62gWUFLp4ang== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728361775; a=rsa-sha256; cv=none; b=kNpuW6Wm5BvCd2swMugGz50wlDr/kd3L1E8Vro2luxL4fc5a6Gi1649yhsxtuhHXe9Lvai khv7tQ+RmJy0p1BXrVt+WRHdQy/LO5p+laX/0ym9JlKyUdqya5kAPnfaqiK2+lIugTggVZ o7G2l5lNOGJP4L5ZOy500nwAO202cvwvRkcfXEbEPBnJMzA7PpvYKPq86OYBMo8DNvuTkq Anu2b960bw8SE7j5xqBFiiD1FcqMcamzKS4pj/BSRGvNukoHVj1iXMceePd8d/aJ0NDJys 2YrTWucU+luLuCXwfRXBtTZJCtoDYCiZKg5IY+dHSkxXlaeSARHyTG7KDF5VOA== 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 4XN32R5TL4zGJt; Tue, 8 Oct 2024 04:29:35 +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 4984TZ9c079741; Tue, 8 Oct 2024 04:29:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4984TZKS079738; Tue, 8 Oct 2024 04:29:35 GMT (envelope-from git) Date: Tue, 8 Oct 2024 04:29:35 GMT Message-Id: <202410080429.4984TZKS079738@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: 550ee2d03c5b - 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: 550ee2d03c5b88bc5d74b257ffcb3ed2c06a60bb Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=550ee2d03c5b88bc5d74b257ffcb3ed2c06a60bb commit 550ee2d03c5b88bc5d74b257ffcb3ed2c06a60bb Author: Ka Ho Ng AuthorDate: 2024-10-08 04:25:36 +0000 Commit: Ka Ho Ng 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++;