diff options
author | bde <bde@FreeBSD.org> | 1999-08-23 20:35:21 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-08-23 20:35:21 +0000 |
commit | 2a5ff1f726f814a9e4717afe3f14250f8030cace (patch) | |
tree | c5bd4c78368007300b5100d7218bf7f088f0d215 /sys/gnu | |
parent | c0b846b2a45d1386c0f10d01639652b562c48195 (diff) | |
download | FreeBSD-src-2a5ff1f726f814a9e4717afe3f14250f8030cace.zip FreeBSD-src-2a5ff1f726f814a9e4717afe3f14250f8030cace.tar.gz |
Use devtoname() to print dev_t's instead of casting them to long or u_long
for misprinting in %lx format.
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_alloc.c | 4 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_alloc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/gnu/ext2fs/ext2_alloc.c b/sys/gnu/ext2fs/ext2_alloc.c index 9a59630..8fa8f05 100644 --- a/sys/gnu/ext2fs/ext2_alloc.c +++ b/sys/gnu/ext2fs/ext2_alloc.c @@ -113,8 +113,8 @@ ext2_alloc(ip, lbn, bpref, size, cred, bnp) fs = ip->i_e2fs; #if DIAGNOSTIC if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) { - printf("dev = 0x%lx, bsize = %lu, size = %d, fs = %s\n", - (u_long)ip->i_dev, fs->s_blocksize, size, fs->fs_fsmnt); + printf("dev = %s, bsize = %lu, size = %d, fs = %s\n", + devtoname(ip->i_dev), fs->s_blocksize, size, fs->fs_fsmnt); panic("ext2_alloc: bad size"); } if (cred == NOCRED) diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c index 9a59630..8fa8f05 100644 --- a/sys/gnu/fs/ext2fs/ext2_alloc.c +++ b/sys/gnu/fs/ext2fs/ext2_alloc.c @@ -113,8 +113,8 @@ ext2_alloc(ip, lbn, bpref, size, cred, bnp) fs = ip->i_e2fs; #if DIAGNOSTIC if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) { - printf("dev = 0x%lx, bsize = %lu, size = %d, fs = %s\n", - (u_long)ip->i_dev, fs->s_blocksize, size, fs->fs_fsmnt); + printf("dev = %s, bsize = %lu, size = %d, fs = %s\n", + devtoname(ip->i_dev), fs->s_blocksize, size, fs->fs_fsmnt); panic("ext2_alloc: bad size"); } if (cred == NOCRED) |