From nobody Tue Apr 11 15:22:03 2023 X-Original-To: dev-commits-src-main@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 4PwqMH3VHgz452d5; Tue, 11 Apr 2023 15:22:03 +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 4PwqMH2KR8z4DSh; Tue, 11 Apr 2023 15:22:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681226523; 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=UXUIuMyhW1Rjio0NeRBFUmIRZthAKslfn9MZ19SQPps=; b=S4MIK65aR3aPdU14PVbbe4AlnZtkHuIznSt9FHOBoTsWXX2OkVSeNlDO4OYrxUNyrJmAc3 Z/mliOgx5gDaA6oP+C+J0ylEFlmnjDljXQ7Y5i49jl+MZV8qTtx0y/3YcmZbf0c89dNinv ZjK2hsP+Y5NKYnQRlWkCZp+wPcexQgplfSKbSxfL5y0PZV2Z7Rnw05gSo8dxhR87iNdyYg lnL6dIv4X+66wdIi+WVnsimHz8tNCBvx5gWV9kJGCQmRwbzjm8Yin41fo0RP99/E8ryUZj 0eN9VwcJslRjubwEk2W3kJkDazYD4DKqN2q+EvuPJV2a3Ndl7KudJYVhVaUHNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681226523; 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=UXUIuMyhW1Rjio0NeRBFUmIRZthAKslfn9MZ19SQPps=; b=YJNp6eQT1qhRX+sR/3sALLhGRaJCnbyl2qMplZ9uQyS13QERZw37KLzSghACnVIzBGVLSe XGvYyWs27wjXZQjbZsFRHw9nUsT52I6/HnGcdYJw5RKO2+fccb6FGJZ34pu9DMxCbQzAkp mETPjTfwgyHTDeUq2fd4eHFUuMTb7eKPM7zpbHSK3HS+IYJyMxvxwQ9nxT/Le1GjQMo/oU aexxKXCPHE+j+Fu3KlTm8fwKJ790W9UzcwdzI0cX4duLfdoFEtSiFyD3pUzHjfda1zelmg cKPNYY+Lbo3AuYUCac5ztxl+c6b1IgWTLxSKGo9xZHbSJRmhfpcD/J8tQEE7qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681226523; a=rsa-sha256; cv=none; b=kh0/pydyrCCa5LTRBAderVZrev2SgBTr6VIpNQB1BLH6I4V1dafX8PGSLuD05LckuFdMCp n89FH7Sk+X2kh5T3pf20ZLHQS/Fq9SFkgrzST0AFQzjF8nm7zmecTqEXnv94pS9jmUd4fX WMCbbp2R0COVi951xlkYpGri/6edLMw/wsvSHZXr0Zl55LIYfVbWHBLgYNteMDO6IzkcCB hKvhymDvZPTgY+ipj6ZjSclTBhrSFXA5gmGBAtZBrfZtJREKM/j9LGVikSXiGUPzsv+ij7 DxEJ2VGDvG8dD73G6BgQg/1b0Gsfxy3B9AiCsCfQLoYnukWDi1BP242z9WZmXQ== 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 4PwqMH15fSzNQ0; Tue, 11 Apr 2023 15:22:03 +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 33BFM3FS011497; Tue, 11 Apr 2023 15:22:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33BFM36s011496; Tue, 11 Apr 2023 15:22:03 GMT (envelope-from git) Date: Tue, 11 Apr 2023 15:22:03 GMT Message-Id: <202304111522.33BFM36s011496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: af7624ed3145 - main - makefs: use %s and __func__ in printf messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: af7624ed314574d6da1eb45b9fddbd2ad503fea4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af7624ed314574d6da1eb45b9fddbd2ad503fea4 commit af7624ed314574d6da1eb45b9fddbd2ad503fea4 Author: Ed Maste AuthorDate: 2023-04-11 15:19:06 +0000 Commit: Ed Maste CommitDate: 2023-04-11 15:21:36 +0000 makefs: use %s and __func__ in printf messages For diff reduction against NetBSD. Obtained from: NetBSD 0c4125e1a19f Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/ffs/buf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.sbin/makefs/ffs/buf.c b/usr.sbin/makefs/ffs/buf.c index f2e2b9a882eb..fe6eaed93d04 100644 --- a/usr.sbin/makefs/ffs/buf.c +++ b/usr.sbin/makefs/ffs/buf.c @@ -132,14 +132,14 @@ bwrite(struct m_buf *bp) assert (bp != NULL); offset = (off_t)bp->b_blkno * fs->sectorsize + fs->offset; if (debug & DEBUG_BUF_BWRITE) - printf("bwrite: blkno %lld offset %lld bcount %ld\n", + printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)bp->b_blkno, (long long) offset, bp->b_bcount); if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1) return (errno); rv = write(bp->b_fs->fd, bp->b_data, bp->b_bcount); if (debug & DEBUG_BUF_BWRITE) - printf("bwrite: write %ld (offset %lld) returned %lld\n", + printf("%s: write %ld (offset %lld) returned %lld\n", __func__, bp->b_bcount, (long long)offset, (long long)rv); if (rv == bp->b_bcount) return (0); @@ -163,13 +163,13 @@ bcleanup(void) if (TAILQ_EMPTY(&buftail)) return; - printf("bcleanup: unflushed buffers:\n"); + printf("%s: unflushed buffers:\n", __func__); TAILQ_FOREACH(bp, &buftail, b_tailq) { printf("\tlblkno %10lld blkno %10lld count %6ld bufsize %6ld\n", (long long)bp->b_lblkno, (long long)bp->b_blkno, bp->b_bcount, bp->b_bufsize); } - printf("bcleanup: done\n"); + printf("%s: done\n", __func__); } struct m_buf * @@ -181,12 +181,13 @@ getblk(struct m_vnode *vp, daddr_t blkno, int size, int u1 __unused, void *n; if (debug & DEBUG_BUF_GETBLK) - printf("getblk: blkno %lld size %d\n", (long long)blkno, size); + printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, + size); bp = NULL; if (!buftailinitted) { if (debug & DEBUG_BUF_GETBLK) - printf("getblk: initialising tailq\n"); + printf("%s: initialising tailq\n", __func__); TAILQ_INIT(&buftail); buftailinitted = 1; } else {