makefs: use %s and __func__ in printf messages
For diff reduction against NetBSD. Obtained from: NetBSD 0c4125e1a19f Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
eed92455e6
commit
af7624ed31
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user