The branch main has been updated by emaste:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=af7624ed314574d6da1eb45b9fddbd2ad503fea4

commit af7624ed314574d6da1eb45b9fddbd2ad503fea4
Author:     Ed Maste <ema...@freebsd.org>
AuthorDate: 2023-04-11 15:19:06 +0000
Commit:     Ed Maste <ema...@freebsd.org>
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 {

Reply via email to