From nobody Thu Mar 02 08:29:00 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 4PS4585fFwz3w2g2; Thu, 2 Mar 2023 08:29:00 +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 4PS45859H7z3h1r; Thu, 2 Mar 2023 08:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677745740; 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=E4XBMnjBmTmMacCt02Gjo9whtCJD1Q6ZTgGwubLNiZE=; b=xbucNmp46QkdzbPdcU4902WJoO6Z5RdnWdFAkc4yJoBEWUp3uPubh2zInyEJX649S/ZOS3 gZsvP9qDOD3d0mZ8ubTz/E9AGFmNta05FH0srPFyjqs+JiNynoz41ZxwQxJyMVdUtO1/FV 1cXvai/OfM1TxaAU3fUaahUL/mFWITYzkvjOvYZPm1hE1Xq08Iv4162YIVq6cUlM8SxDwt glBMZoudUc1KkURnFKwh8e6tZibLkPG/gW0HOXW/fComBmtJzLgenWIt79KMCAafre8VR6 ycD0j8MY05sm/XEhHKZ6BagboKzN7W+9nH93+CjZ6bxclztx2wDOCk/OvYrXgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677745740; 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=E4XBMnjBmTmMacCt02Gjo9whtCJD1Q6ZTgGwubLNiZE=; b=xUyh3q/Nxzo0P7z3U0NXp2npuRrLG9t4TviwUxK2XSzfvvWwWoOw6jqDdrNiVgHHn+P1Dq lG5apmhRUvQ14iWieSyCOmATgiwesaPmg5p37npxKxsl2z/YhJ2T5SqiQX0VAn7f8MDq+o 8Vh6z3kQBcFpJVit6L/0lr1JE+TUGNMv/aCc3heO2nidVmKsGwbDTK+bZk15CgAVzbet4m hUYbylk+KlQo0NeWYSRQboYHrHjlxFUAVBsjR6RzZckM3JsnSzkmF+ooEyXbgXFiTVLNvk yVJ3uIJntX7O1ueakC7FpnpvBByKBHwBP4iGbVx6N8F7nwY6+mMXysT18F8JIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677745740; a=rsa-sha256; cv=none; b=cqhwvZMPhv0uBinxMC7iYY++icBDA3+5q/fCHziuz2njB1SmhBX1FBiQ4C0Ye1tGZ3ROAX deTIgm+mZyC7yjgbtPjpwpM4T7Ec7AUdcWCPiMTDr3mePGi3ECFK7htO1Fyxsoki/j+2A4 eHa8JyK2VVOCd12TAuovLo6SzfUSuM+xDj3SkBmBziEVQ8YCehbyGe5mzf13pab8UcAuUE AL2QHFBiWSZaiUtlUqvIC1+1EZVRrFa7I9f8gBxzpKVXfRamyy80SiiJlfKZcEbwpS2/on l4t6C3dX6CAj72bvSRwxy+W8ywZzuOx1eIeRtXIt/AptAIp8tjsfzA/S0S5YxA== 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 4PS4584CrKz17vm; Thu, 2 Mar 2023 08:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3228T0nK066175; Thu, 2 Mar 2023 08:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3228T05n066174; Thu, 2 Mar 2023 08:29:00 GMT (envelope-from git) Date: Thu, 2 Mar 2023 08:29:00 GMT Message-Id: <202303020829.3228T05n066174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 83d88726ce26 - releng/13.2 - ctfdump: Use getprogname() 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.2 X-Git-Reftype: branch X-Git-Commit: 83d88726ce267979e320e03270710d11e4f210d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.2 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=83d88726ce267979e320e03270710d11e4f210d9 commit 83d88726ce267979e320e03270710d11e4f210d9 Author: Zhenlei Huang AuthorDate: 2023-02-23 16:28:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-03-02 08:12:15 +0000 ctfdump: Use getprogname() Also remove no longer used function `getpname()`. Reviewed by: markj Approved by: re (delphij) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38740 (cherry picked from commit 3dd5524264095ed8612c28908e13f80668eff2f9) (cherry picked from commit 994eb2fb8a901c883f2bd24fa29c6cd513cb4340) ctf: Remove unused function prototype for getpname() (cherry picked from commit f8e1aa85fed08d5f689cb36d65a76d191f6500dd) (cherry picked from commit eba26d0ba37e647572b3ec285352f778ef0ec9f0) --- cddl/contrib/opensolaris/tools/ctf/common/utils.c | 24 ----------------------- cddl/contrib/opensolaris/tools/ctf/common/utils.h | 2 -- cddl/contrib/opensolaris/tools/ctf/dump/dump.c | 2 +- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/common/utils.c b/cddl/contrib/opensolaris/tools/ctf/common/utils.c index f74eb8de40fa..fda29486d94b 100644 --- a/cddl/contrib/opensolaris/tools/ctf/common/utils.c +++ b/cddl/contrib/opensolaris/tools/ctf/common/utils.c @@ -35,30 +35,6 @@ /*LINTLIBRARY*/ -static const char *pname; - -#pragma init(getpname) -const char * -getpname(void) -{ - const char *p, *q; - - if (pname != NULL) - return (pname); - - if ((p = getexecname()) != NULL) - q = strrchr(p, '/'); - else - q = NULL; - - if (q == NULL) - pname = p; - else - pname = q + 1; - - return (pname); -} - void vdie(const char *format, va_list alist) { diff --git a/cddl/contrib/opensolaris/tools/ctf/common/utils.h b/cddl/contrib/opensolaris/tools/ctf/common/utils.h index 99378bb4f251..6918bdab89aa 100644 --- a/cddl/contrib/opensolaris/tools/ctf/common/utils.h +++ b/cddl/contrib/opensolaris/tools/ctf/common/utils.h @@ -42,8 +42,6 @@ extern "C" { extern void vdie(const char *, va_list); extern void die(const char *, ...); -extern const char *getpname(void); - #ifdef __cplusplus } #endif diff --git a/cddl/contrib/opensolaris/tools/ctf/dump/dump.c b/cddl/contrib/opensolaris/tools/ctf/dump/dump.c index 06c00a7b0e7f..5cbf46af1b73 100644 --- a/cddl/contrib/opensolaris/tools/ctf/dump/dump.c +++ b/cddl/contrib/opensolaris/tools/ctf/dump/dump.c @@ -856,7 +856,7 @@ print_stats(void) static int print_usage(FILE *fp, int verbose) { - (void) fprintf(fp, "Usage: %s [-dfhlsSt] [-u file] file\n", getpname()); + (void) fprintf(fp, "Usage: %s [-dfhlsSt] [-u file] file\n", getprogname()); if (verbose) { (void) fprintf(fp,