Received: by mail.netbsd.org (Postfix, from userid 605) id 63B5184EE0; Sun, 3 Mar 2024 15:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1709481237; bh=hY1RcM3fKIK98mamE+4+165UeQUhLx0TrpuzOhpVSKY=; h=Date:From:Subject:To:List-Id:Reply-To:List-Unsubscribe; b=LoAYqipBryeeFHt3saYzeJxfPGIGRc19NJ/OgBc9yq+/rjLirrDJ+c/+pQY2LMSwa W1mdcFyKbjqUS1nIxLKw0FpD2pN3M0QLSvMyh4r7v6Jj9eWfO3xB9SD/MRTMLb6DV4 QcdLoXiFA2lLrfcuGGWXC/NmVa1jahiysVmIqdCw= Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4899484EE6 for ; Sun, 3 Mar 2024 15:53:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id aF3u8GhP8HhG for ; Sun, 3 Mar 2024 15:53:55 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id CBDAF84D1B for ; Sun, 3 Mar 2024 15:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org; s=20240131; t=1709481235; bh=hY1RcM3fKIK98mamE+4+165UeQUhLx0TrpuzOhpVSKY=; h=Date:From:Subject:To:Reply-To; b=cccuTrlG5SLclgeHXgoupYqPYPgEpBQyx48CciAcJ0ed37maSTW/bRNQ6UNLWi6T+ 3I6QWqPIzao2I0qGv2u1RXp9kT3dDv5fRqN7hWUIpCX1cxgOTaZPNZYUMsCADJnglS aMdpBdoDkyA1iFIUH6GztZKWI9BQunEs1weOG5DA= Received: by cvs.NetBSD.org (Postfix, from userid 500) id BC839FA27; Sun, 3 Mar 2024 15:53:55 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sun, 3 Mar 2024 15:53:55 +0000 From: "Taylor R Campbell" Subject: CVS commit: src/usr.sbin/certctl To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20240303155355.BC839FA27@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Taylor R Campbell" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: riastradh Date: Sun Mar 3 15:53:55 UTC 2024 Modified Files: src/usr.sbin/certctl: certctl.sh Log Message: certctl(8): Avoid basename(1). Saves some time running subprocesses. Since this is only used for non-directories (i.e., there's never trailing / on the inputs), it suffices to delete the longest prefix matching glob `*/' with shell parameter expansion -- much cheaper than spawning a subprocess. Shaves off about 1/3 of the time spent in `certctl list' on an aarch64 VM in qemu. PR bin/57993 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/certctl/certctl.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.