From nobody Mon Sep 25 13:46:21 2023 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 4RvPKp1b9Sz4rMLc; Mon, 25 Sep 2023 13:46:22 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvPKp17xyz4Mw9; Mon, 25 Sep 2023 13:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649582; 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=GNZb66yv7ExIcxu0ZHk+F3CydClJj06Elv7eR+qjeb4=; b=SMYlLty1AofqNgK/DU+8aKDzQIPGuqdxP7nVjyjN+BLu30ekhGXwK0KjLRjRbC2LTDUA9J 2CGkbnan2815+a6ErTEh47fP80SL5Xd1oX+r3iVwWzo7dX+dWzDRL5AvJU9U2lz88GS6z1 QuwD1R5dXVop1QpbK3uM70DvrwkiHAuW54AjKzZAq3ABUeI/pgaVDmrk86D5D0nngvu5oZ oc58aUTURbXtKiNpuoEkrFowWX1Hz4Ej+TO6h9tfsUYShFHErbBm1PrOGG5KwTFG87uqQ9 YFMkOXCmIL4i5bFPeKtp+XbvgGC4GYJLNb5jq4/62UyTOPvW/N0c209Leu0/Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695649582; a=rsa-sha256; cv=none; b=O4pwV11OlTNjK78gHTxRI/mB8lA4fekepIYQqNwapeYFIW5ojAfZRDv8bl1GzkndtS+rU6 MDB0y/ALbM6zJoI3v4CirO/UX1ZOSQHg4DJYLQgpQFvdBZ4iilxNwl3sYp5DN6kyFmeOXi 6AF6crXGedUWirExrfzZLvZ1qcZXWv8glF1VeDFfnjiYCei8p7c6xvJXa4txOHv2xthFIP obKhfJgJ2RKpITNlg9KI4rrMsigt/TXzIMOnoyarc4q1qMJkdgXlAsmins2BSMvu/hqZHO o2ujlOmV4A/sEgKSo17uNroWdXYzPTS9XMv8DSZx53iH+dQTSugdTY5w2Lz6Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695649582; 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=GNZb66yv7ExIcxu0ZHk+F3CydClJj06Elv7eR+qjeb4=; b=GgAjAOdhGQr76d6pxkBtQTtLxfoyyUS3D1J/4ObpcYFPuxLsqOyTdtdYDH/dqzXWekQQk1 rKDqlUeCEQlM6QUZ7bvZV7GOXCi2APbXAf+7XCLHV3EZdxw9gxRpVIU9ZZfPasDi7MKhHM Hr2X3nllCo1SEnshvxMfddx3+RKVY4m16dXD5C6z8OGASzbHnkP36IhYUvf8A3qom8Ru9Q fp975njTQqCXKhinPZdtSe6EWJ1xhReaEaR/3XXDuvf47rz7odf4lO8UtlG/UKvCABs7DW Wi3pxEnbsAcbbGz5GVlN8Tc+TdlA8STLKv94v0KDpjQf9rNLYtq3uPlDyfix5g== 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 4RvPKp06HPz254; Mon, 25 Sep 2023 13:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PDkLRA027853; Mon, 25 Sep 2023 13:46:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PDkLsd027850; Mon, 25 Sep 2023 13:46:21 GMT (envelope-from git) Date: Mon, 25 Sep 2023 13:46:21 GMT Message-Id: <202309251346.38PDkLsd027850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: fd8bf2ecc05a - stable/14 - libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fd8bf2ecc05af841aa7e8369a43861cdc122d404 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fd8bf2ecc05af841aa7e8369a43861cdc122d404 commit fd8bf2ecc05af841aa7e8369a43861cdc122d404 Author: John Hein AuthorDate: 2023-09-21 23:43:05 +0000 Commit: Ed Maste CommitDate: 2023-09-25 13:45:06 +0000 libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum PR: 273966 Reviewed by: emaste (cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc) --- lib/libprocstat/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/core.c b/lib/libprocstat/core.c index dea078c848eb..cf3435a10c79 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -119,7 +119,7 @@ procstat_core_open(const char *filename) warnx("%s is not a CORE file", filename); goto fail; } - if (elf_getphnum(e, &nph) == 0) { + if (elf_getphdrnum(e, &nph) == -1) { warnx("program headers not found"); goto fail; }