From nobody Sun Feb 26 01:59:38 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 4PPRdk2MN1z3v7ws; Sun, 26 Feb 2023 01:59:38 +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 4PPRdk1rNzz3MQt; Sun, 26 Feb 2023 01:59:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677376778; 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=OwSbY+n+KwkXL69FPwugFMmJD4Wf186XpXKtkiMUIPs=; b=xGAHk3UaF/1Mfm/5lVv4UGOA+X3FvsE8zteZLU6xw4dA3RTRqsR0dcbAPRFK8kPyrqz3Wp NSmzG6STVRgBFuD3sOYfQrnCfupxQZnRm+jDldLGgk077MiJF0yfCySxOQH6Cxh32RV7Hf VTsQOV6wPV0xo3sfSYhNMr5tQlbG9IekBJiL78Msdjh8hgw7IWsqJUbmiXOrOSHWc8nrUw zDZBm/60FAGxCBrlWr5Pxoo/28Vfz/NshB8feeghrSeM1812IjFNFIKEKl1f0am/HbvN6w veAPpB/V+8NRJdexupOWiY4GdeTeYPjL1Hp5qEyjTwcaiTVZNc3SUaR06Kosbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677376778; 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=OwSbY+n+KwkXL69FPwugFMmJD4Wf186XpXKtkiMUIPs=; b=JMKCJWPk7gYcmJzVTY+HwJQeSNK3HDTaF3gs3ydr1sRu7l40EpSA6RGUErm81NqdCyaq6G J+PvRh9QhhrpXFKSSjZjnenfVfyPKqaQ8kWiENlDw1YjCzfYTjdzVNk99dpOUiC23OAkvX 8JG2dYpdJMLgzc+ksdf1uQBBPs+vGW7kdBTm4eLdAoWWRM0EUF3xXg02FNsviwgDP7a671 v8IXGo0dOqwZ5qqlcYEWIGjf8FAhin2OOA4WNzMZd6uHB/ZvEjacK8M5Km2gorXjaCL/cQ M1vZSXt/kcyaRVWRuwEMV5eUOzhZ4CCRc/0MTB/yrcRsYw3dIZCLuS2Z5tX8iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677376778; a=rsa-sha256; cv=none; b=MsYr6xVntIB10tvPGBnlFCOQfJk0cLR9g/bdqcJcSH+HLA3Rwur1VwoXUK23PH81Tve5tq ECzVMoLlSYrvzrEdpmc6Qt8zBDcnpLfQWr7uKK7siKJmJ8DryOXl/fulluwHrZaL7UV3c6 rumaL43CT5+wCckRDtpCZQnttqyDpKeMgCY7wna10WRqBG1MXShKtgl37/oDbcFPlemQLc FRb7pKp86ayP+daGfLww2oA+lquvsa1T23RF+EYNfDEQp4RqxNx8ERm8P/SoGUa930ohgD iHs6GnGa0cFnU/ZmKdexcVzr+QKmuIM885DvAR/sItYh3ZDRzib5fFoT2YF/JA== 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 4PPRdk0pNZzRxX; Sun, 26 Feb 2023 01:59:38 +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 31Q1xcUX061993; Sun, 26 Feb 2023 01:59:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31Q1xc4v061992; Sun, 26 Feb 2023 01:59:38 GMT (envelope-from git) Date: Sun, 26 Feb 2023 01:59:38 GMT Message-Id: <202302260159.31Q1xc4v061992@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: 96200385228e - stable/12 - 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 96200385228ea9c749e455dae50cca1d42818325 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=96200385228ea9c749e455dae50cca1d42818325 commit 96200385228ea9c749e455dae50cca1d42818325 Author: Zhenlei Huang AuthorDate: 2023-02-23 16:28:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-02-26 01:55:23 +0000 ctfdump: Use getprogname() Also remove no longer used function `getpname()`. Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38740 (cherry picked from commit 3dd5524264095ed8612c28908e13f80668eff2f9) (cherry picked from commit 994eb2fb8a901c883f2bd24fa29c6cd513cb4340) --- cddl/contrib/opensolaris/tools/ctf/common/utils.c | 24 ----------------------- cddl/contrib/opensolaris/tools/ctf/dump/dump.c | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/common/utils.c b/cddl/contrib/opensolaris/tools/ctf/common/utils.c index b9db1a870165..38509ec36343 100644 --- a/cddl/contrib/opensolaris/tools/ctf/common/utils.c +++ b/cddl/contrib/opensolaris/tools/ctf/common/utils.c @@ -36,30 +36,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 vwarn(const char *format, va_list alist) { diff --git a/cddl/contrib/opensolaris/tools/ctf/dump/dump.c b/cddl/contrib/opensolaris/tools/ctf/dump/dump.c index 740485ddff03..f3e8120192da 100644 --- a/cddl/contrib/opensolaris/tools/ctf/dump/dump.c +++ b/cddl/contrib/opensolaris/tools/ctf/dump/dump.c @@ -767,7 +767,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,