aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2023-04-11 15:19:06 +0000
committerEd Maste <emaste@FreeBSD.org>2023-04-11 15:21:36 +0000
commitaf7624ed314574d6da1eb45b9fddbd2ad503fea4 (patch)
treed31d00dcd022bb40d9810ed068d5e4b4ccd90b68
parenteed92455e60016258277f395fddf6433f290c0ba (diff)
downloadsrc-af7624ed314574d6da1eb45b9fddbd2ad503fea4.tar.gz
src-af7624ed314574d6da1eb45b9fddbd2ad503fea4.zip
makefs: use %s and __func__ in printf messages
For diff reduction against NetBSD. Obtained from: NetBSD 0c4125e1a19f Sponsored by: The FreeBSD Foundation
-rw-r--r--usr.sbin/makefs/ffs/buf.c13
1 files 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 {