mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
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);
|
assert (bp != NULL);
|
||||||
offset = (off_t)bp->b_blkno * fs->sectorsize + fs->offset;
|
offset = (off_t)bp->b_blkno * fs->sectorsize + fs->offset;
|
||||||
if (debug & DEBUG_BUF_BWRITE)
|
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,
|
(long long)bp->b_blkno, (long long) offset,
|
||||||
bp->b_bcount);
|
bp->b_bcount);
|
||||||
if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1)
|
if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1)
|
||||||
return (errno);
|
return (errno);
|
||||||
rv = write(bp->b_fs->fd, bp->b_data, bp->b_bcount);
|
rv = write(bp->b_fs->fd, bp->b_data, bp->b_bcount);
|
||||||
if (debug & DEBUG_BUF_BWRITE)
|
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);
|
bp->b_bcount, (long long)offset, (long long)rv);
|
||||||
if (rv == bp->b_bcount)
|
if (rv == bp->b_bcount)
|
||||||
return (0);
|
return (0);
|
||||||
@ -163,13 +163,13 @@ bcleanup(void)
|
|||||||
if (TAILQ_EMPTY(&buftail))
|
if (TAILQ_EMPTY(&buftail))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printf("bcleanup: unflushed buffers:\n");
|
printf("%s: unflushed buffers:\n", __func__);
|
||||||
TAILQ_FOREACH(bp, &buftail, b_tailq) {
|
TAILQ_FOREACH(bp, &buftail, b_tailq) {
|
||||||
printf("\tlblkno %10lld blkno %10lld count %6ld bufsize %6ld\n",
|
printf("\tlblkno %10lld blkno %10lld count %6ld bufsize %6ld\n",
|
||||||
(long long)bp->b_lblkno, (long long)bp->b_blkno,
|
(long long)bp->b_lblkno, (long long)bp->b_blkno,
|
||||||
bp->b_bcount, bp->b_bufsize);
|
bp->b_bcount, bp->b_bufsize);
|
||||||
}
|
}
|
||||||
printf("bcleanup: done\n");
|
printf("%s: done\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct m_buf *
|
struct m_buf *
|
||||||
@ -181,12 +181,13 @@ getblk(struct m_vnode *vp, daddr_t blkno, int size, int u1 __unused,
|
|||||||
void *n;
|
void *n;
|
||||||
|
|
||||||
if (debug & DEBUG_BUF_GETBLK)
|
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;
|
bp = NULL;
|
||||||
if (!buftailinitted) {
|
if (!buftailinitted) {
|
||||||
if (debug & DEBUG_BUF_GETBLK)
|
if (debug & DEBUG_BUF_GETBLK)
|
||||||
printf("getblk: initialising tailq\n");
|
printf("%s: initialising tailq\n", __func__);
|
||||||
TAILQ_INIT(&buftail);
|
TAILQ_INIT(&buftail);
|
||||||
buftailinitted = 1;
|
buftailinitted = 1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user