From nobody Tue Sep 26 13:05:30 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 4Rw0NB3hdFz4v7qt; Tue, 26 Sep 2023 13:05:30 +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 4Rw0NB3CMdz3b2s; Tue, 26 Sep 2023 13:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695733530; 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=HQIDkmC6CndBq2Mpng49xXrie7OzXYjFdePPHA6Ayns=; b=DwB5Fkib7KP91UCtTqmXyoTfG63wWm5TJ95PmU5brF+avxwdoxCiK1SarXD7K+9HyDG+Mv faPFoqCxzIZgx21HbCIsm6BkFk6wRU65/dQHPv0FCZ41HNLApFKgvzG2NlOE7xAb3dabAz YOO899MGn4oeVqtY5/xxACB5TzCJ0d8Rc3vK7RZK7qqwMnTgBooAtg5BR7JI9CO1dKx86e V6P2ciXJ3U1q/id5Pq4nnE7GSGzOECN7a7ryPIAyw3zh6+KfizYrmNCWAN2k9y2te/GpXy FzghLO5NSjywVQ9awYqnN4lcz3cHBOuBkm/3p22oKYuMPOorW7DkOOoXYkzUbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695733530; a=rsa-sha256; cv=none; b=rdYHKxojMRUUXECYnzOljIs8QvTJF01xfpxve98whOrNmivEv0ekKCcrtAt1At69cDZm84 KmfzVUs6J3ytX3gphGTyKcjW/qFgQg0gcwC5lkwcz3UphWhCXpowbVHmd7TFwhwSruO8ZV /rnrOC8qNqSibAyh65KRL8Sga+R5Woccu5BUWnBeNXtDvZvRR35eS+2EarKIMoQr0dxMLM HrlHD6koaMKJZzPbTmKsINLtY/o+30voKTULGhmpN1NaF672lwvxHMxyU4sAm3qI/4Laca OFA0jL7xQ5nU3hjapcZOtGmSXDw9Jhk+hwMOFsbNg4I3O0GUAlPxUSUlFHrJYw== 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=1695733530; 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=HQIDkmC6CndBq2Mpng49xXrie7OzXYjFdePPHA6Ayns=; b=l2zP9uHdZtvHZjO2HSxWINBP5N1VUhTi7SoGKaXxkjaqDIU8UL4h4VSuH3hjo7oL7XOg3P h5Qw051i4omH/jfmnMJyBstEgOECSDy8KBjTD8kRkcQyWiAUtSgbpSd7j7p69LzFUUUI2x RszQladAGt0rG6Uh/k+EgcLcQpEAc9lPCtvnNoy2T4RLbBy8WhyOQCre9GHyYm6EABJv38 O+9G2MjgMCIE0zsqK71my6ze/XN19ov/T8eJuGqFERSkSHpoW+LTMZKY5Uy3+jVsAvDIyQ xkwtmFdM78eb9kUkNw4Zy+9bjyi/qg4ndsV/F/x6XFKJaChS7g2i4CfgOhk/GA== 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 4Rw0NB2GZbzxTC; Tue, 26 Sep 2023 13:05:30 +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 38QD5Us9052138; Tue, 26 Sep 2023 13:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QD5U9q052135; Tue, 26 Sep 2023 13:05:30 GMT (envelope-from git) Date: Tue, 26 Sep 2023 13:05:30 GMT Message-Id: <202309261305.38QD5U9q052135@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: 205f9a4fbc82 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 205f9a4fbc82bdf8c8a7e5de4ef053c238d4769e Auto-Submitted: auto-generated The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=205f9a4fbc82bdf8c8a7e5de4ef053c238d4769e commit 205f9a4fbc82bdf8c8a7e5de4ef053c238d4769e Author: John Hein AuthorDate: 2023-09-21 23:43:05 +0000 Commit: Ed Maste CommitDate: 2023-09-26 13:05:16 +0000 libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum PR: 273966 Reviewed by: emaste (cherry picked from commit 633094c27f0ac1b1001d5bd24a883240b4bce1dc) (cherry picked from commit fd8bf2ecc05af841aa7e8369a43861cdc122d404) --- 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 c3d5f8bec495..dc05991f3372 100644 --- a/lib/libprocstat/core.c +++ b/lib/libprocstat/core.c @@ -121,7 +121,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; }