From 086c1d7e3403a6c5a87926be7d71ac24d8ef7af4 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 23 Dec 2006 00:41:31 +0000 Subject: [PATCH] Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too). --- sys/vfs/deadfs/dead_vnops.c | 4 +- sys/vfs/fdesc/fdesc_vnops.c | 4 +- sys/vfs/fifofs/fifo_vnops.c | 8 +- sys/vfs/gnu/ext2fs/ext2_alloc.c | 8 +- sys/vfs/gnu/ext2fs/ext2_balloc.c | 4 +- sys/vfs/gnu/ext2fs/ext2_fs.h | 6 +- sys/vfs/gnu/ext2fs/ext2_inode.c | 6 +- sys/vfs/gnu/ext2fs/ext2_inode_cnv.c | 22 ++--- sys/vfs/gnu/ext2fs/ext2_linux_balloc.c | 30 +++--- sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c | 20 ++-- sys/vfs/gnu/ext2fs/ext2_lookup.c | 12 +-- sys/vfs/gnu/ext2fs/ext2_vfsops.c | 34 +++---- sys/vfs/gnu/ext2fs/ext2_vnops.c | 6 +- sys/vfs/hpfs/hpfs.h | 6 +- sys/vfs/hpfs/hpfs_alsubr.c | 20 ++-- sys/vfs/hpfs/hpfs_subr.c | 20 ++-- sys/vfs/hpfs/hpfs_vfsops.c | 18 ++-- sys/vfs/hpfs/hpfs_vnops.c | 40 ++++---- sys/vfs/isofs/cd9660/cd9660_rrip.c | 8 +- sys/vfs/isofs/cd9660/cd9660_vfsops.c | 22 ++--- sys/vfs/isofs/cd9660/cd9660_vnops.c | 4 +- sys/vfs/mfs/mfs_vnops.c | 10 +- sys/vfs/msdosfs/msdosfs_conv.c | 4 +- sys/vfs/msdosfs/msdosfs_denode.c | 32 +++---- sys/vfs/msdosfs/msdosfs_fat.c | 18 ++-- sys/vfs/msdosfs/msdosfs_lookup.c | 24 ++--- sys/vfs/msdosfs/msdosfs_vfsops.c | 26 +++--- sys/vfs/msdosfs/msdosfs_vnops.c | 32 +++---- sys/vfs/nfs/bootp_subr.c | 124 ++++++++++++------------- sys/vfs/nfs/krpc_subr.c | 12 +-- sys/vfs/nfs/nfs.h | 4 +- sys/vfs/nfs/nfs_bio.c | 18 ++-- sys/vfs/nfs/nfs_mountrpc.c | 4 +- sys/vfs/nfs/nfs_serv.c | 4 +- sys/vfs/nfs/nfs_socket.c | 12 +-- sys/vfs/nfs/nfs_subs.c | 8 +- sys/vfs/nfs/nfs_syscalls.c | 8 +- sys/vfs/nfs/nfs_vfsops.c | 28 +++--- sys/vfs/nfs/nfs_vnops.c | 18 ++-- sys/vfs/ntfs/ntfs.h | 6 +- sys/vfs/ntfs/ntfs_subr.c | 64 ++++++------- sys/vfs/ntfs/ntfs_vfsops.c | 18 ++-- sys/vfs/ntfs/ntfs_vnops.c | 14 +-- sys/vfs/nullfs/null.h | 4 +- sys/vfs/nwfs/nwfs_io.c | 12 +-- sys/vfs/nwfs/nwfs_node.c | 6 +- sys/vfs/nwfs/nwfs_subr.c | 4 +- sys/vfs/nwfs/nwfs_vfsops.c | 4 +- sys/vfs/nwfs/nwfs_vnops.c | 12 +-- sys/vfs/portal/portal_vnops.c | 8 +- sys/vfs/procfs/procfs_vfsops.c | 4 +- sys/vfs/procfs/procfs_vnops.c | 6 +- sys/vfs/smbfs/smbfs_io.c | 8 +- sys/vfs/smbfs/smbfs_node.c | 8 +- sys/vfs/smbfs/smbfs_smb.c | 8 +- sys/vfs/smbfs/smbfs_subr.h | 6 +- sys/vfs/smbfs/smbfs_vfsops.c | 12 +-- sys/vfs/smbfs/smbfs_vnops.c | 10 +- sys/vfs/specfs/spec_vnops.c | 24 ++--- sys/vfs/udf/osta.c | 4 +- sys/vfs/udf/udf_vfsops.c | 28 +++--- sys/vfs/udf/udf_vnops.c | 32 +++---- sys/vfs/ufs/ffs_alloc.c | 46 ++++----- sys/vfs/ufs/ffs_softdep.c | 26 +++--- sys/vfs/ufs/ffs_vfsops.c | 18 ++-- sys/vfs/ufs/ufs_inode.c | 4 +- sys/vfs/ufs/ufs_lookup.c | 10 +- sys/vfs/ufs/ufs_vnops.c | 8 +- sys/vfs/union/union.h | 4 +- sys/vfs/union/union_vfsops.c | 4 +- sys/vfs/union/union_vnops.c | 4 +- sys/vm/swap_pager.c | 14 +-- sys/vm/vm_contig.c | 4 +- sys/vm/vm_fault.c | 10 +- sys/vm/vm_glue.c | 8 +- sys/vm/vm_kern.c | 4 +- sys/vm/vm_map.h | 14 +-- sys/vm/vm_page.c | 10 +- sys/vm/vm_pageout.c | 4 +- sys/vm/vm_swap.c | 4 +- sys/vm/vm_vmspace.c | 6 +- sys/vm/vnode_pager.c | 18 ++-- 82 files changed, 605 insertions(+), 605 deletions(-) diff --git a/sys/vfs/deadfs/dead_vnops.c b/sys/vfs/deadfs/dead_vnops.c index 949274c1bb..2f4bbdb454 100644 --- a/sys/vfs/deadfs/dead_vnops.c +++ b/sys/vfs/deadfs/dead_vnops.c @@ -32,7 +32,7 @@ * * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/miscfs/deadfs/dead_vnops.c,v 1.26 1999/08/28 00:46:42 peter Exp $ - * $DragonFly: src/sys/vfs/deadfs/dead_vnops.c,v 1.18 2006/07/18 22:22:15 dillon Exp $ + * $DragonFly: src/sys/vfs/deadfs/dead_vnops.c,v 1.19 2006/12/23 00:41:28 swildner Exp $ */ #include @@ -203,7 +203,7 @@ dead_bmap(struct vop_bmap_args *ap) static int dead_print(struct vop_print_args *ap) { - printf("tag VT_NON, dead vnode\n"); + kprintf("tag VT_NON, dead vnode\n"); return (0); } diff --git a/sys/vfs/fdesc/fdesc_vnops.c b/sys/vfs/fdesc/fdesc_vnops.c index 5fa3567c1f..7f28dafcc5 100644 --- a/sys/vfs/fdesc/fdesc_vnops.c +++ b/sys/vfs/fdesc/fdesc_vnops.c @@ -36,7 +36,7 @@ * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * * $FreeBSD: src/sys/miscfs/fdesc/fdesc_vnops.c,v 1.47.2.1 2001/10/22 22:49:26 chris Exp $ - * $DragonFly: src/sys/vfs/fdesc/fdesc_vnops.c,v 1.35 2006/12/20 18:14:44 dillon Exp $ + * $DragonFly: src/sys/vfs/fdesc/fdesc_vnops.c,v 1.36 2006/12/23 00:41:29 swildner Exp $ */ /* @@ -533,7 +533,7 @@ fdesc_reclaim(struct vop_reclaim_args *ap) static int fdesc_print(struct vop_print_args *ap) { - printf("tag VT_NON, fdesc vnode\n"); + kprintf("tag VT_NON, fdesc vnode\n"); return (0); } diff --git a/sys/vfs/fifofs/fifo_vnops.c b/sys/vfs/fifofs/fifo_vnops.c index 24778a5b63..ad0fd34f12 100644 --- a/sys/vfs/fifofs/fifo_vnops.c +++ b/sys/vfs/fifofs/fifo_vnops.c @@ -32,7 +32,7 @@ * * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95 * $FreeBSD: src/sys/miscfs/fifofs/fifo_vnops.c,v 1.45.2.4 2003/04/22 10:11:24 bde Exp $ - * $DragonFly: src/sys/vfs/fifofs/fifo_vnops.c,v 1.34 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/fifofs/fifo_vnops.c,v 1.35 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -558,7 +558,7 @@ fifo_printinfo(struct vnode *vp) { struct fifoinfo *fip = vp->v_fifoinfo; - printf(", fifo with %ld readers and %ld writers", + kprintf(", fifo with %ld readers and %ld writers", fip->fi_readers, fip->fi_writers); return (0); } @@ -571,9 +571,9 @@ fifo_printinfo(struct vnode *vp) static int fifo_print(struct vop_print_args *ap) { - printf("tag VT_NON"); + kprintf("tag VT_NON"); fifo_printinfo(ap->a_vp); - printf("\n"); + kprintf("\n"); return (0); } diff --git a/sys/vfs/gnu/ext2fs/ext2_alloc.c b/sys/vfs/gnu/ext2fs/ext2_alloc.c index 2318f76f1d..3b25788f91 100644 --- a/sys/vfs/gnu/ext2fs/ext2_alloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_alloc.c @@ -38,7 +38,7 @@ * * @(#)ext2_alloc.c 8.8 (Berkeley) 2/21/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_alloc.c,v 1.28.2.2 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_alloc.c,v 1.12 2006/09/03 18:52:29 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_alloc.c,v 1.13 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_quota.h" @@ -113,7 +113,7 @@ ext2_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, fs = ip->i_e2fs; #if DIAGNOSTIC if ((u_int)size > fs->s_blocksize || blkoff(fs, size) != 0) { - printf("dev = %s, bsize = %lu, size = %d, fs = %s\n", + kprintf("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"); } @@ -218,7 +218,7 @@ int ext2_reallocblks(struct vop_reallocblks_args *ap) { #ifndef FANCY_REALLOC -/* printf("ext2_reallocblks not implemented\n"); */ +/* kprintf("ext2_reallocblks not implemented\n"); */ return ENOSPC; #else @@ -421,7 +421,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) if (ip->i_gen == 0 || ++ip->i_gen == 0) ip->i_gen = krandom() / 2 + 1; /* -printf("ext2_valloc: allocated inode %d\n", ino); +kprintf("ext2_valloc: allocated inode %d\n", ino); */ return (0); noinodes: diff --git a/sys/vfs/gnu/ext2fs/ext2_balloc.c b/sys/vfs/gnu/ext2fs/ext2_balloc.c index af3068888b..28b8c5b94c 100644 --- a/sys/vfs/gnu/ext2fs/ext2_balloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_balloc.c @@ -38,7 +38,7 @@ * * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_balloc.c,v 1.9.2.1 2000/08/03 00:52:57 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_balloc.c,v 1.9 2006/04/04 17:34:32 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_balloc.c,v 1.10 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -123,7 +123,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n", } } else { /* Godmar thinks: this shouldn't happen w/o fragments */ - printf("nsize %d(%d) > osize %d(%d) nb %d\n", + kprintf("nsize %d(%d) > osize %d(%d) nb %d\n", (int)nsize, (int)size, (int)osize, (int)ip->i_size, (int)nb); panic( diff --git a/sys/vfs/gnu/ext2fs/ext2_fs.h b/sys/vfs/gnu/ext2fs/ext2_fs.h index 444a305b9b..9570457632 100644 --- a/sys/vfs/gnu/ext2fs/ext2_fs.h +++ b/sys/vfs/gnu/ext2fs/ext2_fs.h @@ -5,7 +5,7 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_fs.h,v 1.8.2.2 2001/09/29 12:52:47 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_fs.h,v 1.5 2005/02/17 14:00:10 joerg Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_fs.h,v 1.6 2006/12/23 00:41:29 swildner Exp $ */ /* * linux/include/linux/ext2_fs.h @@ -78,9 +78,9 @@ */ #ifdef EXT2FS_DEBUG # define ext2_debug(f, a...) { \ - printf ("EXT2-fs DEBUG (%s, %d): %s:", \ + kprintf ("EXT2-fs DEBUG (%s, %d): %s:", \ __FILE__, __LINE__, __func__); \ - printf (f, ## a); \ + kprintf (f, ## a); \ } #else # define ext2_debug(f, a...) /**/ diff --git a/sys/vfs/gnu/ext2fs/ext2_inode.c b/sys/vfs/gnu/ext2fs/ext2_inode.c index d1a3258413..9bec59d7ba 100644 --- a/sys/vfs/gnu/ext2fs/ext2_inode.c +++ b/sys/vfs/gnu/ext2fs/ext2_inode.c @@ -38,7 +38,7 @@ * * @(#)ext2_inode.c 8.5 (Berkeley) 12/30/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode.c,v 1.24.2.1 2000/08/03 00:52:57 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode.c,v 1.19 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode.c,v 1.20 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_quota.h" @@ -134,7 +134,7 @@ ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred) int aflags, error, allerror; off_t osize; /* -printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); +kprintf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); */ /* * negative file sizes will totally break the code below and * are not meaningful anyways. @@ -538,7 +538,7 @@ ext2_reclaim(struct vop_reclaim_args *ap) } #ifdef INVARIANTS if (ip && (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE))) { - printf("WARNING: INODE %ld flags %08x: modified inode being released!\n", (long)ip->i_number, (int)ip->i_flag); + kprintf("WARNING: INODE %ld flags %08x: modified inode being released!\n", (long)ip->i_number, (int)ip->i_flag); ip->i_flag |= IN_MODIFIED; EXT2_UPDATE(vp, 0); } diff --git a/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c b/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c index 1d57ab33c8..edcc4ee17a 100644 --- a/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c +++ b/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c @@ -20,7 +20,7 @@ * * Utah $Hdr$ * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode_cnv.c,v 1.11 2000/01/01 17:39:21 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c,v 1.6 2006/04/04 17:34:32 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode_cnv.c,v 1.7 2006/12/23 00:41:29 swildner Exp $ */ /* @@ -45,27 +45,27 @@ void ext2_print_dinode(struct ext2_dinode *di) { int i; - printf( /* "Inode: %5d" */ + kprintf( /* "Inode: %5d" */ " Type: %10s Mode: 0x%o Flags: 0x%x Version: %d\n", "n/a", di->di_mode, di->di_flags, di->di_gen); - printf( "User: %5lu Group: %5lu Size: %lu\n", + kprintf( "User: %5lu Group: %5lu Size: %lu\n", (unsigned long)di->di_uid, (unsigned long)di->di_gid, (unsigned long)di->di_size); - printf( "Links: %3d Blockcount: %d\n", + kprintf( "Links: %3d Blockcount: %d\n", di->di_nlink, di->di_blocks); - printf( "ctime: 0x%x", di->di_ctime); - printf( "atime: 0x%x", di->di_atime); - printf( "mtime: 0x%x", di->di_mtime); - printf( "BLOCKS: "); + kprintf( "ctime: 0x%x", di->di_ctime); + kprintf( "atime: 0x%x", di->di_atime); + kprintf( "mtime: 0x%x", di->di_mtime); + kprintf( "BLOCKS: "); for(i=0; i < (di->di_blocks <= 24 ? ((di->di_blocks+1)/2): 12); i++) - printf("%d ", di->di_db[i]); - printf("\n"); + kprintf("%d ", di->di_db[i]); + kprintf("\n"); } void ext2_print_inode(struct inode *in) { - printf( "Inode: %"PRId64, in->i_number); + kprintf( "Inode: %"PRId64, in->i_number); ext2_print_dinode(&in->i_din); } diff --git a/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c b/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c index 75571249db..2c3956d8ac 100644 --- a/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c @@ -5,7 +5,7 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_linux_balloc.c,v 1.11.2.3 2001/08/14 18:03:19 gallatin Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c,v 1.9 2006/05/12 07:43:56 swildner Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c,v 1.10 2006/12/23 00:41:29 swildner Exp $ */ /* * linux/fs/ext2/balloc.c @@ -185,13 +185,13 @@ ext2_free_blocks(struct mount * mp, unsigned long block, struct ext2_super_block * es = sb->s_es; if (!sb) { - printf ("ext2_free_blocks: nonexistent device"); + kprintf ("ext2_free_blocks: nonexistent device"); return; } lock_super (VFSTOEXT2(mp)->um_devvp); if (block < es->s_first_data_block || (block + count) > es->s_blocks_count) { - printf ( "ext2_free_blocks: " + kprintf ( "ext2_free_blocks: " "Freeing blocks not in datazone - " "block = %lu, count = %lu", block, count); unlock_super (VFSTOEXT2(mp)->um_devvp); @@ -226,7 +226,7 @@ ext2_free_blocks(struct mount * mp, unsigned long block, for (i = 0; i < count; i++) { if (!clear_bit (bit + i, bh->b_data)) - printf ("ext2_free_blocks: " + kprintf ("ext2_free_blocks: " "bit already cleared for block %lu", block); else { @@ -273,7 +273,7 @@ ext2_new_block(struct mount * mp, unsigned long goal, static int goal_hits = 0, goal_attempts = 0; #endif if (!sb) { - printf ("ext2_new_block: nonexistent device"); + kprintf ("ext2_new_block: nonexistent device"); return 0; } lock_super (VFSTOEXT2(mp)->um_devvp); @@ -377,7 +377,7 @@ repeat: j = find_first_zero_bit ((unsigned long *) bh->b_data, EXT2_BLOCKS_PER_GROUP(sb)); if (j >= EXT2_BLOCKS_PER_GROUP(sb)) { - printf ( "ext2_new_block: " + kprintf ( "ext2_new_block: " "Free blocks count corrupted for block group %d", i); unlock_super (VFSTOEXT2(mp)->um_devvp); return 0; @@ -406,7 +406,7 @@ got_block: "%dth block = %u in group %u", j, tmp, i); if (set_bit (j, bh->b_data)) { - printf ( "ext2_new_block: " + kprintf ( "ext2_new_block: " "bit already set for block %d", j); goto repeat; } @@ -443,7 +443,7 @@ got_block: } ****/ if (j >= es->s_blocks_count) { - printf ( "ext2_new_block: " + kprintf ( "ext2_new_block: " "block >= blocks count - " "block_group = %d, block=%d", i, j); unlock_super (VFSTOEXT2(mp)->um_devvp); @@ -557,43 +557,43 @@ ext2_check_blocks_bitmap(struct mount * mp) EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || ext2_group_sparse(i)) { if (!test_bit (0, bh->b_data)) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Superblock in group %d " "is marked free", i); for (j = 0; j < desc_blocks; j++) if (!test_bit (j + 1, bh->b_data)) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Descriptor block #%d in group " "%d is marked free", j, i); } if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data)) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Block bitmap for group %d is marked free", i); if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data)) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Inode bitmap for group %d is marked free", i); for (j = 0; j < sb->s_itb_per_group; j++) if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data)) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Block #%d of the inode table in " "group %d is marked free", j, i); x = ext2_count_free (bh, sb->s_blocksize); if (gdp->bg_free_blocks_count != x) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Wrong free blocks count for group %d, " "stored = %d, counted = %lu", i, gdp->bg_free_blocks_count, x); bitmap_count += x; } if (es->s_free_blocks_count != bitmap_count) - printf ("ext2_check_blocks_bitmap: " + kprintf ("ext2_check_blocks_bitmap: " "Wrong free blocks count in super block, " "stored = %lu, counted = %lu", (unsigned long) es->s_free_blocks_count, bitmap_count); diff --git a/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c b/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c index 19f7fe95df..b73a9647e3 100644 --- a/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c @@ -5,7 +5,7 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_linux_ialloc.c,v 1.13.2.2 2001/08/14 18:03:19 gallatin Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c,v 1.10 2006/05/12 07:43:56 swildner Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c,v 1.11 2006/12/23 00:41:29 swildner Exp $ */ /* * linux/fs/ext2/ialloc.c @@ -205,7 +205,7 @@ ext2_free_inode(struct inode *inode) return; if (inode->i_nlink) { - printf ("ext2_free_inode: inode has nlink=%d\n", + kprintf ("ext2_free_inode: inode has nlink=%d\n", inode->i_nlink); return; } @@ -216,7 +216,7 @@ ext2_free_inode(struct inode *inode) lock_super (DEVVP(inode)); if (inode->i_number < EXT2_FIRST_INO || inode->i_number > sb->s_es->s_inodes_count) { - printf ("free_inode reserved inode or nonexistent inode"); + kprintf ("free_inode reserved inode or nonexistent inode"); unlock_super (DEVVP(inode)); return; } @@ -226,7 +226,7 @@ ext2_free_inode(struct inode *inode) bitmap_nr = load_inode_bitmap (ITOV(inode)->v_mount, block_group); bh = sb->s_inode_bitmap[bitmap_nr]; if (!clear_bit (bit, bh->b_data)) - printf ( "ext2_free_inode:" + kprintf ( "ext2_free_inode:" "bit already cleared for inode %lu", (unsigned long)inode->i_number); else { @@ -266,7 +266,7 @@ inc_inode_version(struct inode *inode, struct ext2_group_desc *gdp, int mode) EXT2_INODES_PER_BLOCK(inode->i_sb)); bh = bread (inode->i_sb->s_dev, dbtob(inode_block), inode->i_sb->s_blocksize); if (!bh) { - printf ("inc_inode_version Cannot load inode table block - " + kprintf ("inc_inode_version Cannot load inode table block - " "inode=%lu, inode_block=%lu\n", inode->i_number, inode_block); inode->u.ext2_i.i_version = 1; @@ -401,7 +401,7 @@ repeat: EXT2_INODES_PER_GROUP(sb))) < EXT2_INODES_PER_GROUP(sb)) { if (set_bit (j, bh->b_data)) { - printf ( "ext2_new_inode:" + kprintf ( "ext2_new_inode:" "bit already set for inode %d", j); goto repeat; } @@ -415,7 +415,7 @@ repeat: mark_buffer_dirty(bh); } else { if (gdp->bg_free_inodes_count != 0) { - printf ( "ext2_new_inode:" + kprintf ( "ext2_new_inode:" "Free inodes count corrupted in group %d", i); unlock_super (DEVVP(dir)); @@ -425,7 +425,7 @@ repeat: } j += i * EXT2_INODES_PER_GROUP(sb) + 1; if (j < EXT2_FIRST_INO || j > es->s_inodes_count) { - printf ( "ext2_new_inode:" + kprintf ( "ext2_new_inode:" "reserved inode or inode > inodes count - " "block_group = %d,inode=%d", i, j); unlock_super (DEVVP(dir)); @@ -501,14 +501,14 @@ ext2_check_inodes_bitmap(struct mount *mp) x = ext2_count_free (sb->u.ext2_sb.s_inode_bitmap[bitmap_nr], EXT2_INODES_PER_GROUP(sb) / 8); if (gdp->bg_free_inodes_count != x) - printf ( "ext2_check_inodes_bitmap:" + kprintf ( "ext2_check_inodes_bitmap:" "Wrong free inodes count in group %d, " "stored = %d, counted = %lu", i, gdp->bg_free_inodes_count, x); bitmap_count += x; } if (es->s_free_inodes_count != bitmap_count) - printf ( "ext2_check_inodes_bitmap:" + kprintf ( "ext2_check_inodes_bitmap:" "Wrong free inodes count in super block, " "stored = %lu, counted = %lu", (unsigned long) es->s_free_inodes_count, bitmap_count); diff --git a/sys/vfs/gnu/ext2fs/ext2_lookup.c b/sys/vfs/gnu/ext2fs/ext2_lookup.c index 6e30176c1e..5bac0532ae 100644 --- a/sys/vfs/gnu/ext2fs/ext2_lookup.c +++ b/sys/vfs/gnu/ext2fs/ext2_lookup.c @@ -5,7 +5,7 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_lookup.c,v 1.21.2.3 2002/11/17 02:02:42 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_lookup.c,v 1.25 2006/08/19 17:27:24 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_lookup.c,v 1.26 2006/12/23 00:41:29 swildner Exp $ */ /* * Copyright (c) 1989, 1993 @@ -165,7 +165,7 @@ ext2_readdir(struct vop_readdir_args *ap) count = MAXBSIZE; #ifdef EXT2FS_DEBUG - printf("ext2_readdir: uio_offset = %lld, uio_resid = %d, count = %d\n", + kprintf("ext2_readdir: uio_offset = %lld, uio_resid = %d, count = %d\n", uio->uio_offset, uio->uio_resid, count); #endif @@ -677,7 +677,7 @@ ext2_dirbad(struct inode *ip, doff_t offset, char *how) struct mount *mp; mp = ITOV(ip)->v_mount; - printf("%s: bad dir ino %lu at offset %ld: %s\n", + kprintf("%s: bad dir ino %lu at offset %ld: %s\n", mp->mnt_stat.f_mntfromname, (u_long)ip->i_number, (long)offset, how); if ((mp->mnt_flag & MNT_RDONLY) == 0) @@ -717,8 +717,8 @@ ext2_dirbadentry(struct vnode *dp, struct ext2_dir_entry_2 *de, */ if (error_msg != NULL) { - printf("bad directory entry: %s\n", error_msg); - printf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n", + kprintf("bad directory entry: %s\n", error_msg); + kprintf("offset=%d, inode=%lu, rec_len=%u, name_len=%u\n", entryoffsetinblock, (unsigned long)de->inode, de->rec_len, de->name_len); } @@ -1040,7 +1040,7 @@ ext2_checkpath(struct inode *source, struct inode *target, struct ucred *cred) out: if (error == ENOTDIR) - printf("checkpath: .. not a directory\n"); + kprintf("checkpath: .. not a directory\n"); if (vp != NULL) vput(vp); return (error); diff --git a/sys/vfs/gnu/ext2fs/ext2_vfsops.c b/sys/vfs/gnu/ext2fs/ext2_vfsops.c index af07384be9..63ccf7fbf1 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vfsops.c +++ b/sys/vfs/gnu/ext2fs/ext2_vfsops.c @@ -38,7 +38,7 @@ * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.63.2.7 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.51 2006/10/27 04:56:33 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.52 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_quota.h" @@ -306,11 +306,11 @@ ext2_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) if ((fs->s_es->s_state & EXT2_VALID_FS) == 0 || (fs->s_es->s_state & EXT2_ERROR_FS)) { if (mp->mnt_flag & MNT_FORCE) { - printf( + kprintf( "WARNING: %s was not properly dismounted\n", fs->fs_fsmnt); } else { - printf( + kprintf( "WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n", fs->fs_fsmnt); return (EPERM); @@ -411,7 +411,7 @@ ext2_check_descriptors(struct ext2_sb_info *sb) if (gdp->bg_block_bitmap < block || gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) { - printf ("ext2_check_descriptors: " + kprintf ("ext2_check_descriptors: " "Block bitmap for group %d" " not in group (block %lu)!\n", i, (unsigned long) gdp->bg_block_bitmap); @@ -420,7 +420,7 @@ ext2_check_descriptors(struct ext2_sb_info *sb) if (gdp->bg_inode_bitmap < block || gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) { - printf ("ext2_check_descriptors: " + kprintf ("ext2_check_descriptors: " "Inode bitmap for group %d" " not in group (block %lu)!\n", i, (unsigned long) gdp->bg_inode_bitmap); @@ -430,7 +430,7 @@ ext2_check_descriptors(struct ext2_sb_info *sb) gdp->bg_inode_table + sb->s_itb_per_group >= block + EXT2_BLOCKS_PER_GROUP(sb)) { - printf ("ext2_check_descriptors: " + kprintf ("ext2_check_descriptors: " "Inode table for group %d" " not in group (block %lu)!\n", i, (unsigned long) gdp->bg_inode_table); @@ -446,20 +446,20 @@ static int ext2_check_sb_compat(struct ext2_super_block *es, cdev_t dev, int ronly) { if (es->s_magic != EXT2_SUPER_MAGIC) { - printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n", + kprintf("ext2fs: %s: wrong magic number %#x (expected %#x)\n", devtoname(dev), es->s_magic, EXT2_SUPER_MAGIC); return (1); } if (es->s_rev_level > EXT2_GOOD_OLD_REV) { if (es->s_feature_incompat & ~EXT2_FEATURE_INCOMPAT_SUPP) { - printf( + kprintf( "WARNING: mount of %s denied due to unsupported optional features\n", devtoname(dev)); return (1); } if (!ronly && (es->s_feature_ro_compat & ~EXT2_FEATURE_RO_COMPAT_SUPP)) { - printf( + kprintf( "WARNING: R/W mount of %s denied due to unsupported optional features\n", devtoname(dev)); return (1); @@ -483,7 +483,7 @@ compute_sb_data(struct vnode *devvp, struct ext2_super_block *es, #if 1 #define V(v) #else -#define V(v) printf(#v"= %d\n", fs->v); +#define V(v) kprintf(#v"= %d\n", fs->v); #endif fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size; @@ -541,7 +541,7 @@ compute_sb_data(struct vnode *devvp, struct ext2_super_block *es, for (j = 0; j < i; j++) brelse(fs->s_group_desc[j]); bsd_free(fs->s_group_desc, M_EXT2MNT); - printf("EXT2-fs: unable to read group descriptors (%d)\n", error); + kprintf("EXT2-fs: unable to read group descriptors (%d)\n", error); return EIO; } /* Set the B_LOCKED flag on the buffer, then brelse() it */ @@ -551,7 +551,7 @@ compute_sb_data(struct vnode *devvp, struct ext2_super_block *es, for (j = 0; j < db_count; j++) ULCK_BUF(fs->s_group_desc[j]) bsd_free(fs->s_group_desc, M_EXT2MNT); - printf("EXT2-fs: (ext2_check_descriptors failure) " + kprintf("EXT2-fs: (ext2_check_descriptors failure) " "unable to read group descriptors\n"); return EIO; } @@ -750,10 +750,10 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct ucred *cred) if ((es->s_state & EXT2_VALID_FS) == 0 || (es->s_state & EXT2_ERROR_FS)) { if (ronly || (mp->mnt_flag & MNT_FORCE)) { - printf( + kprintf( "WARNING: Filesystem was not properly dismounted\n"); } else { - printf( + kprintf( "WARNING: R/W mount denied. Filesystem is not clean - run fsck\n"); error = EPERM; goto out; @@ -987,7 +987,7 @@ ext2_sync(struct mount *mp, int waitfor) fs = ump->um_e2fs; if (fs->s_dirt != 0 && fs->s_rd_only != 0) { /* XXX */ - printf("fs = %s\n", fs->fs_fsmnt); + kprintf("fs = %s\n", fs->fs_fsmnt); panic("ext2_sync: rofs mod"); } @@ -1126,7 +1126,7 @@ restart: /* Read in the disk contents for the inode, copy into the inode. */ #if 0 -printf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino))); +kprintf("ext2_vget(%d) dbn= %d ", ino, fsbtodb(fs, ino_to_fsba(fs, ino))); #endif error = bread(ump->um_devvp, fsbtodoff(fs, ino_to_fsba(fs, ino)), (int)fs->s_blocksize, &bp); @@ -1293,7 +1293,7 @@ ext2_sbupdate(struct ext2mount *mp, int waitfor) struct buf *bp; int error = 0; /* -printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no"); +kprintf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no"); */ bp = getblk(mp->um_devvp, SBOFF, SBSIZE, 0, 0); bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2_super_block)); diff --git a/sys/vfs/gnu/ext2fs/ext2_vnops.c b/sys/vfs/gnu/ext2fs/ext2_vnops.c index 090fd91438..6690df9458 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vnops.c +++ b/sys/vfs/gnu/ext2fs/ext2_vnops.c @@ -44,7 +44,7 @@ * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 * @(#)ext2_vnops.c 8.7 (Berkeley) 2/3/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.51.2.2 2003/01/02 17:26:18 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.36 2006/08/12 00:26:20 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.37 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_quota.h" @@ -1813,13 +1813,13 @@ ext2_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - printf("tag VT_EXT2FS, ino %lu, on dev %s (%d, %d)", + kprintf("tag VT_EXT2FS, ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev)); if (vp->v_type == VFIFO) fifo_printinfo(vp); lockmgr_printinfo(&vp->v_lock); - printf("\n"); + kprintf("\n"); return (0); } diff --git a/sys/vfs/hpfs/hpfs.h b/sys/vfs/hpfs/hpfs.h index 84d665856b..732c9e3dbc 100644 --- a/sys/vfs/hpfs/hpfs.h +++ b/sys/vfs/hpfs/hpfs.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs.h,v 1.1 1999/12/09 19:09:58 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs.h,v 1.22 2006/09/10 01:26:40 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs.h,v 1.23 2006/12/23 00:41:29 swildner Exp $ */ /*#define HPFS_DEBUG 10*/ @@ -367,9 +367,9 @@ struct hpfid { }; #if defined(HPFS_DEBUG) -#define dprintf(a) printf a +#define dprintf(a) kprintf a #if HPFS_DEBUG > 1 -#define ddprintf(a) printf a +#define ddprintf(a) kprintf a #else #define ddprintf(a) #endif diff --git a/sys/vfs/hpfs/hpfs_alsubr.c b/sys/vfs/hpfs/hpfs_alsubr.c index 3dafa1216c..628a886cd7 100644 --- a/sys/vfs/hpfs/hpfs_alsubr.c +++ b/sys/vfs/hpfs/hpfs_alsubr.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_alsubr.c,v 1.1 1999/12/09 19:09:58 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_alsubr.c,v 1.7 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_alsubr.c,v 1.8 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -90,7 +90,7 @@ dive: dbtodoff(anp->an_lsn), DEV_BSIZE, &bp); if (error) { - printf("hpfs_hpbmap: bread error\n"); + kprintf("hpfs_hpbmap: bread error\n"); brelse(bp); return (error); } @@ -98,7 +98,7 @@ dive: asp = (alsec_t *) bp->b_data; if (asp->as_magic != AS_MAGIC) { brelse(bp); - printf("hpfs_hpbmap: " + kprintf("hpfs_hpbmap: " "MAGIC DOESN'T MATCH"); return (EINVAL); } @@ -167,7 +167,7 @@ hpfs_allocalsec(struct hpfsmount *hpmp, lsn_t parlsn, struct buf **bpp) error = hpfs_bmfblookup(hpmp, &lsn); if (error) { - printf("hpfs_allocalsec: CAN'T ALLOC SPACE FOR AlSec\n"); + kprintf("hpfs_allocalsec: CAN'T ALLOC SPACE FOR AlSec\n"); return (error); } @@ -394,7 +394,7 @@ retry: */ error = hpfs_addextentr (hpmp, anp->an_lsn, &al, ranp, &pf); if (error) { - printf("hpfs_addextent: FAILED %d\n",error); + kprintf("hpfs_addextent: FAILED %d\n",error); return (error); } @@ -455,7 +455,7 @@ retry: al.al_off += nlen; al.al_len -= nlen; } else { - printf("hpfs_addextent: INTERNAL INCONSISTENCE\n"); + kprintf("hpfs_addextent: INTERNAL INCONSISTENCE\n"); return (EINVAL); } } @@ -478,7 +478,7 @@ retry: rabp->ab_flag |= AB_FNPARENT; error = hpfs_alblk2alsec (hpmp, rabp, &nrasp, &nbp); if (error) { - printf("hpfs_addextent: CAN'T CONVT\n"); + kprintf("hpfs_addextent: CAN'T CONVT\n"); return (error); } nrasp->as_parent = hp->h_no; @@ -584,7 +584,7 @@ hpfs_addextentr(struct hpfsmount *hpmp, lsn_t rlsn, alleaf_t *ralp, */ error = hpfs_addextentr (hpmp, anp->an_lsn, ralp, ranp, &pf); if (error) { - printf("hpfs_addextentr: FAILED %d\n",error); + kprintf("hpfs_addextentr: FAILED %d\n",error); goto fail; } @@ -647,7 +647,7 @@ hpfs_addextentr(struct hpfsmount *hpmp, lsn_t rlsn, alleaf_t *ralp, ralp->al_len -= nlen; ralp->al_off += nlen; } else { - printf("hpfs_addextentr: INTERNAL INCONSISTENCE\n"); + kprintf("hpfs_addextentr: INTERNAL INCONSISTENCE\n"); error = (EINVAL); goto fail; } @@ -665,7 +665,7 @@ hpfs_addextentr(struct hpfsmount *hpmp, lsn_t rlsn, alleaf_t *ralp, error = hpfs_splitalsec (hpmp, rasp, &nrasp, &nbp); if (error) { - printf("hpfs_addextent: CAN'T SPLIT\n"); + kprintf("hpfs_addextent: CAN'T SPLIT\n"); goto fail; } diff --git a/sys/vfs/hpfs/hpfs_subr.c b/sys/vfs/hpfs/hpfs_subr.c index 725398db78..1c87a2b1c5 100644 --- a/sys/vfs/hpfs/hpfs_subr.c +++ b/sys/vfs/hpfs/hpfs_subr.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_subr.c,v 1.1 1999/12/09 19:09:59 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_subr.c,v 1.7 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_subr.c,v 1.8 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -338,11 +338,11 @@ hpfs_bmlookup ( dprintf(("hpfs_bmlookup: lsn: 0x%x, len 0x%lx | Step1\n", lsn, len)); if (lsn > hpmp->hpm_su.su_btotal) { - printf("hpfs_bmlookup: OUT OF VOLUME\n"); + kprintf("hpfs_bmlookup: OUT OF VOLUME\n"); return ENOSPC; } if (len > hpmp->hpm_bavail) { - printf("hpfs_bmlookup: OUT OF SPACE\n"); + kprintf("hpfs_bmlookup: OUT OF SPACE\n"); return ENOSPC; } i = lsn >> 5; @@ -480,7 +480,7 @@ hpfs_bmmark ( dprintf(("hpfs_bmmark(0x%x, 0x%lx, %d): \n",bn,bl, state)); if ((bn > hpmp->hpm_su.su_btotal) || (bn+bl > hpmp->hpm_su.su_btotal)) { - printf("hpfs_bmmark: MARKING OUT OF VOLUME\n"); + kprintf("hpfs_bmmark: MARKING OUT OF VOLUME\n"); return 0; } bitmap = (u_int32_t *)hpmp->hpm_bitmap; @@ -491,7 +491,7 @@ hpfs_bmmark ( if (state) { if ( *bitmap & (1 << i)) { if (!didprint) { - printf("hpfs_bmmark: ALREADY FREE\n"); + kprintf("hpfs_bmmark: ALREADY FREE\n"); didprint = 1; } } else @@ -501,7 +501,7 @@ hpfs_bmmark ( } else { if ((~(*bitmap)) & (1 << i)) { if (!didprint) { - printf("hpfs_bmmark: ALREADY BUSY\n"); + kprintf("hpfs_bmmark: ALREADY BUSY\n"); didprint = 1; } } else @@ -559,7 +559,7 @@ dive: dp = (struct dirblk *) bp->b_data; if (dp->d_magic != D_MAGIC) { - printf("hpfs_validatetimes: magic doesn't match\n"); + kprintf("hpfs_validatetimes: magic doesn't match\n"); error = EINVAL; goto failed; } @@ -587,7 +587,7 @@ dive: dep = (hpfsdirent_t *)((caddr_t)dep + dep->de_reclen); } else { - printf("hpfs_validatetimes: ERROR! oLSN not found\n"); + kprintf("hpfs_validatetimes: ERROR! oLSN not found\n"); error = EINVAL; goto failed; } @@ -810,7 +810,7 @@ hpfs_extend ( error = hpfs_addextent(hpmp, hp, newblen - oldblen); if (error) { - printf("hpfs_extend: FAILED TO ADD EXTENT %d\n", error); + kprintf("hpfs_extend: FAILED TO ADD EXTENT %d\n", error); return (error); } @@ -851,7 +851,7 @@ hpfs_breadstruct ( mp = (u_int32_t *) bp->b_data; if (*mp != magic) { brelse(bp); - printf("hpfs_breadstruct: MAGIC DOESN'T MATCH (0x%08x != 0x%08x)\n", + kprintf("hpfs_breadstruct: MAGIC DOESN'T MATCH (0x%08x != 0x%08x)\n", *mp, magic); return (EINVAL); } diff --git a/sys/vfs/hpfs/hpfs_vfsops.c b/sys/vfs/hpfs/hpfs_vfsops.c index c08ac9febd..3ae380370d 100644 --- a/sys/vfs/hpfs/hpfs_vfsops.c +++ b/sys/vfs/hpfs/hpfs_vfsops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_vfsops.c,v 1.3.2.2 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_vfsops.c,v 1.39 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_vfsops.c,v 1.40 2006/12/23 00:41:29 swildner Exp $ */ @@ -148,7 +148,7 @@ hpfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) dprintf(("export 0x%x\n",args.export.ex_flags)); error = vfs_export(mp, &hpmp->hpm_export, &args.export); if (error) { - printf("hpfs_mount: vfs_export failed %d\n", + kprintf("hpfs_mount: vfs_export failed %d\n", error); } goto success; @@ -283,12 +283,12 @@ hpfs_mountfs(struct vnode *devvp, struct mount *mp, struct hpfs_args *argsp) /* Check magic */ if (sup->su_magic != SU_MAGIC) { - printf("hpfs_mountfs: SuperBlock MAGIC DOESN'T MATCH\n"); + kprintf("hpfs_mountfs: SuperBlock MAGIC DOESN'T MATCH\n"); error = EINVAL; goto failed; } if (spp->sp_magic != SP_MAGIC) { - printf("hpfs_mountfs: SpareBlock MAGIC DOESN'T MATCH\n"); + kprintf("hpfs_mountfs: SpareBlock MAGIC DOESN'T MATCH\n"); error = EINVAL; goto failed; } @@ -356,7 +356,7 @@ hpfs_unmount(struct mount *mp, int mntflags) error = vflush(mp, 0, flags); if (error) { - printf("hpfs_unmount: vflush failed: %d\n",error); + kprintf("hpfs_unmount: vflush failed: %d\n",error); return (error); } @@ -386,7 +386,7 @@ hpfs_root(struct mount *mp, struct vnode **vpp) dprintf(("hpfs_root():\n")); error = VFS_VGET(mp, (ino_t)hpmp->hpm_su.su_rootfno, vpp); if(error) { - printf("hpfs_root: VFS_VGET failed: %d\n",error); + kprintf("hpfs_root: VFS_VGET failed: %d\n",error); return (error); } @@ -488,7 +488,7 @@ hpfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) error = getnewvnode(VT_HPFS, hpmp->hpm_mp, &vp, VLKTIMEOUT, 0); if (error) { - printf("hpfs_vget: can't get new vnode\n"); + kprintf("hpfs_vget: can't get new vnode\n"); FREE(hp, M_HPFSNO); return (error); } @@ -527,7 +527,7 @@ hpfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) error = bread(hpmp->hpm_devvp, dbtodoff(ino), FNODESIZE, &bp); if (error) { - printf("hpfs_vget: can't read ino %"PRId64"\n",ino); + kprintf("hpfs_vget: can't read ino %"PRId64"\n",ino); vx_put(vp); return (error); } @@ -535,7 +535,7 @@ hpfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) brelse(bp); if (hp->h_fn.fn_magic != FN_MAGIC) { - printf("hpfs_vget: MAGIC DOESN'T MATCH\n"); + kprintf("hpfs_vget: MAGIC DOESN'T MATCH\n"); vx_put(vp); return (EINVAL); } diff --git a/sys/vfs/hpfs/hpfs_vnops.c b/sys/vfs/hpfs/hpfs_vnops.c index 76f6aa6cda..18e6af9176 100644 --- a/sys/vfs/hpfs/hpfs_vnops.c +++ b/sys/vfs/hpfs/hpfs_vnops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_vnops.c,v 1.2.2.2 2002/01/15 18:35:09 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_vnops.c,v 1.38 2006/08/19 17:27:24 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_vnops.c,v 1.39 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -151,7 +151,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) struct hpfsnode *hp = VTOHP(vp); int error; - printf("hpfs_ioctl(0x%x, 0x%lx, 0x%p, 0x%x): ", + kprintf("hpfs_ioctl(0x%x, 0x%lx, 0x%p, 0x%x): ", hp->h_no, ap->a_command, ap->a_data, ap->a_fflag); switch (ap->a_command) { @@ -168,7 +168,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) while (passed < hp->h_fn.fn_ealen) { - printf("EAname: %s\n", EA_NAME(eap)); + kprintf("EAname: %s\n", EA_NAME(eap)); eanum++; passed += sizeof(struct ea) + @@ -181,7 +181,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) error = ENOENT; } - printf("%lu eas\n", eanum); + kprintf("%lu eas\n", eanum); *(u_long *)ap->a_data = eanum; @@ -192,7 +192,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) u_long passed; struct ea *eap; - printf("EA%ld\n", *(u_long *)ap->a_data); + kprintf("EA%ld\n", *(u_long *)ap->a_data); eanum = 0; if (hp->h_fn.fn_ealen > 0) { @@ -201,7 +201,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) error = ENOENT; while (passed < hp->h_fn.fn_ealen) { - printf("EAname: %s\n", EA_NAME(eap)); + kprintf("EAname: %s\n", EA_NAME(eap)); if (eanum == *(u_long *)ap->a_data) { *(u_long *)ap->a_data = @@ -231,7 +231,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) struct ea *eap; rdeap = (struct hpfs_rdea *)ap->a_data; - printf("EA%ld\n", rdeap->ea_no); + kprintf("EA%ld\n", rdeap->ea_no); eanum = 0; if (hp->h_fn.fn_ealen > 0) { @@ -240,7 +240,7 @@ hpfs_ioctl(struct vop_ioctl_args *ap) error = ENOENT; while (passed < hp->h_fn.fn_ealen) { - printf("EAname: %s\n", EA_NAME(eap)); + kprintf("EAname: %s\n", EA_NAME(eap)); if (eanum == rdeap->ea_no) { rdeap->ea_sz = eap->ea_namelen + 1 + @@ -388,7 +388,7 @@ hpfs_write(struct vop_write_args *ap) if (uio->uio_offset + uio->uio_resid > hp->h_fn.fn_size) { error = hpfs_extend (hp, uio->uio_offset + uio->uio_resid); if (error) { - printf("hpfs_write: hpfs_extend FAILED %d\n", error); + kprintf("hpfs_write: hpfs_extend FAILED %d\n", error); return (error); } } @@ -513,19 +513,19 @@ hpfs_setattr(struct vop_setattr_args *ap) /* Can't change flags XXX Could be implemented */ if (vap->va_flags != VNOVAL) { - printf("hpfs_setattr: FLAGS CANNOT BE SET\n"); + kprintf("hpfs_setattr: FLAGS CANNOT BE SET\n"); return (EINVAL); } /* Can't change uid/gid XXX Could be implemented */ if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) { - printf("hpfs_setattr: UID/GID CANNOT BE SET\n"); + kprintf("hpfs_setattr: UID/GID CANNOT BE SET\n"); return (EINVAL); } /* Can't change mode XXX Could be implemented */ if (vap->va_mode != (mode_t)VNOVAL) { - printf("hpfs_setattr: MODE CANNOT BE SET\n"); + kprintf("hpfs_setattr: MODE CANNOT BE SET\n"); return (EINVAL); } @@ -555,7 +555,7 @@ hpfs_setattr(struct vop_setattr_args *ap) return (EROFS); break; default: - printf("hpfs_setattr: WRONG v_type\n"); + kprintf("hpfs_setattr: WRONG v_type\n"); return (EINVAL); } @@ -663,9 +663,9 @@ hpfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct hpfsnode *hp = VTOHP(vp); - printf("tag VT_HPFS, ino 0x%x",hp->h_no); + kprintf("tag VT_HPFS, ino 0x%x",hp->h_no); lockmgr_printinfo(&vp->v_lock); - printf("\n"); + kprintf("\n"); return (0); } @@ -698,7 +698,7 @@ hpfs_strategy(struct vop_strategy_args *ap) error = VOP_BMAP(vp, bio->bio_offset, NULL, &nbio->bio_offset, NULL, NULL); if (error) { - printf("hpfs_strategy: VOP_BMAP FAILED %d\n", error); + kprintf("hpfs_strategy: VOP_BMAP FAILED %d\n", error); bp->b_error = error; bp->b_flags |= B_ERROR; /* I/O was never started on nbio, must biodone(bio) */ @@ -889,7 +889,7 @@ dive: dp = (struct dirblk *) bp->b_data; if (dp->d_magic != D_MAGIC) { - printf("hpfs_readdir: MAGIC DOESN'T MATCH\n"); + kprintf("hpfs_readdir: MAGIC DOESN'T MATCH\n"); brelse(bp); error = EINVAL; goto done; @@ -929,7 +929,7 @@ dive: dep = (hpfsdirent_t *)((caddr_t)dep + dep->de_reclen); } else { - printf("hpfs_readdir: ERROR! oLSN not found\n"); + kprintf("hpfs_readdir: ERROR! oLSN not found\n"); brelse(bp); error = EINVAL; goto done; @@ -1048,7 +1048,7 @@ hpfs_lookup(struct vop_old_lookup_args *ap) lockparent, wantparent)); if (nameiop != NAMEI_CREATE && nameiop != NAMEI_DELETE && nameiop != NAMEI_LOOKUP) { - printf("hpfs_lookup: LOOKUP, DELETE and CREATE are only supported\n"); + kprintf("hpfs_lookup: LOOKUP, DELETE and CREATE are only supported\n"); return (EOPNOTSUPP); } @@ -1121,7 +1121,7 @@ hpfs_lookup(struct vop_old_lookup_args *ap) error = VFS_VGET(hpmp->hpm_mp, dep->de_fnode, ap->a_vpp); if (error) { - printf("hpfs_lookup: VFS_VGET FAILED %d\n", error); + kprintf("hpfs_lookup: VFS_VGET FAILED %d\n", error); brelse(bp); return(error); } diff --git a/sys/vfs/isofs/cd9660/cd9660_rrip.c b/sys/vfs/isofs/cd9660/cd9660_rrip.c index 5be431e0ff..5ec1a15e21 100644 --- a/sys/vfs/isofs/cd9660/cd9660_rrip.c +++ b/sys/vfs/isofs/cd9660/cd9660_rrip.c @@ -37,7 +37,7 @@ * * @(#)cd9660_rrip.c 8.6 (Berkeley) 12/5/94 * $FreeBSD: src/sys/isofs/cd9660/cd9660_rrip.c,v 1.17 1999/08/28 00:46:06 peter Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_rrip.c,v 1.12 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_rrip.c,v 1.13 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -109,7 +109,7 @@ static void cd9660_rrip_defattr(struct iso_directory_record *isodir, ISO_RRIP_ANALYZE *ana) { /* But this is a required field! */ - printf("RRIP without PX field?\n"); + kprintf("RRIP without PX field?\n"); cd9660_defattr(isodir,ana->inop,NULL,ISO_FTYPE_RRIP); } @@ -196,7 +196,7 @@ cd9660_rrip_slink(ISO_RRIP_SLINK *p, ISO_RRIP_ANALYZE *ana) inbuf = pcomp->name; break; default: - printf("RRIP with incorrect flags?"); + kprintf("RRIP with incorrect flags?"); wlen = ana->maxlen + 1; break; } @@ -274,7 +274,7 @@ cd9660_rrip_altname(ISO_RRIP_ALTNAME *p, ISO_RRIP_ANALYZE *ana) break; default: - printf("RRIP with incorrect NM flags?\n"); + kprintf("RRIP with incorrect NM flags?\n"); wlen = ana->maxlen + 1; break; } diff --git a/sys/vfs/isofs/cd9660/cd9660_vfsops.c b/sys/vfs/isofs/cd9660/cd9660_vfsops.c index b2e76cdc3c..39de059364 100644 --- a/sys/vfs/isofs/cd9660/cd9660_vfsops.c +++ b/sys/vfs/isofs/cd9660/cd9660_vfsops.c @@ -37,7 +37,7 @@ * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 * $FreeBSD: src/sys/isofs/cd9660/cd9660_vfsops.c,v 1.74.2.7 2002/04/08 09:39:29 bde Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vfsops.c,v 1.42 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vfsops.c,v 1.43 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -144,7 +144,7 @@ iso_mountroot(struct mount *mp) int error; if ((error = bdevvp(rootdev, &rootvp))) { - printf("iso_mountroot: can't find rootvp\n"); + kprintf("iso_mountroot: can't find rootvp\n"); return (error); } args.flags = ISOFSMNT_ROOT; @@ -160,7 +160,7 @@ iso_mountroot(struct mount *mp) VOP_CLOSE(rootvp, FREAD); if (bootverbose) - printf("iso_mountroot(): using session at block %d\n", + kprintf("iso_mountroot(): using session at block %d\n", args.ssector); if ((error = iso_mountfs(rootvp, mp, &args)) != 0) return (error); @@ -624,7 +624,7 @@ cd9660_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) int error; #ifdef ISOFS_DBG - printf("fhtovp: ino %d, start %ld\n", + kprintf("fhtovp: ino %d, start %ld\n", ifhp->ifid_ino, ifhp->ifid_start); #endif @@ -717,7 +717,7 @@ again: * If a collision occurs, throw away the vnode and try again. */ if (cd9660_ihashins(ip) != 0) { - printf("debug: cd9660 ihashins collision, retrying\n"); + kprintf("debug: cd9660 ihashins collision, retrying\n"); vx_put(vp); kfree(ip, M_ISOFSNODE); goto again; @@ -730,14 +730,14 @@ again: lbn = lblkno(imp, ino); if (lbn >= imp->volume_space_size) { vx_put(vp); - printf("fhtovp: lbn exceed volume space %d\n", lbn); + kprintf("fhtovp: lbn exceed volume space %d\n", lbn); return (ESTALE); } off = blkoff(imp, ino); if (off + ISO_DIRECTORY_RECORD_SIZE > imp->logical_block_size) { vx_put(vp); - printf("fhtovp: crosses block boundary %d\n", + kprintf("fhtovp: crosses block boundary %d\n", off + ISO_DIRECTORY_RECORD_SIZE); return (ESTALE); } @@ -748,7 +748,7 @@ again: if (error) { vx_put(vp); brelse(bp); - printf("fhtovp: bread error %d\n",error); + kprintf("fhtovp: bread error %d\n",error); return (error); } isodir = (struct iso_directory_record *)(bp->b_data + off); @@ -758,7 +758,7 @@ again: vx_put(vp); if (bp != NULL) brelse(bp); - printf("fhtovp: directory crosses block boundary %d[off=%d/len=%d]\n", + kprintf("fhtovp: directory crosses block boundary %d[off=%d/len=%d]\n", off +isonum_711(isodir->length), off, isonum_711(isodir->length)); return (ESTALE); @@ -769,7 +769,7 @@ again: isonum_711(isodir->ext_attr_length) != ifhp->ifid_start) { if (bp != NULL) brelse(bp); - printf("fhtovp: file start miss %d vs %d\n", + kprintf("fhtovp: file start miss %d vs %d\n", isonum_733(isodir->extent) + isonum_711(isodir->ext_attr_length), ifhp->ifid_start); return (ESTALE); @@ -879,7 +879,7 @@ cd9660_vptofh(struct vnode *vp, struct fid *fhp) ifhp->ifid_start = ip->iso_start; #ifdef ISOFS_DBG - printf("vptofh: ino %d, start %ld\n", + kprintf("vptofh: ino %d, start %ld\n", ifhp->ifid_ino,ifhp->ifid_start); #endif return 0; diff --git a/sys/vfs/isofs/cd9660/cd9660_vnops.c b/sys/vfs/isofs/cd9660/cd9660_vnops.c index 977d61f666..33323cdabf 100644 --- a/sys/vfs/isofs/cd9660/cd9660_vnops.c +++ b/sys/vfs/isofs/cd9660/cd9660_vnops.c @@ -37,7 +37,7 @@ * * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95 * $FreeBSD: src/sys/isofs/cd9660/cd9660_vnops.c,v 1.62 1999/12/15 23:01:51 eivind Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vnops.c,v 1.32 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vnops.c,v 1.33 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -792,7 +792,7 @@ cd9660_strategy(struct vop_strategy_args *ap) static int cd9660_print(struct vop_print_args *ap) { - printf("tag VT_ISOFS, isofs vnode\n"); + kprintf("tag VT_ISOFS, isofs vnode\n"); return (0); } diff --git a/sys/vfs/mfs/mfs_vnops.c b/sys/vfs/mfs/mfs_vnops.c index 31a8f97426..10d5d607ce 100644 --- a/sys/vfs/mfs/mfs_vnops.c +++ b/sys/vfs/mfs/mfs_vnops.c @@ -32,7 +32,7 @@ * * @(#)mfs_vnops.c 8.11 (Berkeley) 5/22/95 * $FreeBSD: src/sys/ufs/mfs/mfs_vnops.c,v 1.47.2.1 2001/05/22 02:06:43 bp Exp $ - * $DragonFly: src/sys/vfs/mfs/mfs_vnops.c,v 1.32 2006/08/12 00:26:21 dillon Exp $ + * $DragonFly: src/sys/vfs/mfs/mfs_vnops.c,v 1.33 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -358,7 +358,7 @@ mfs_close(struct vop_close_args *ap) * vnode, so if we find any other uses, it is a panic. */ if (vp->v_usecount > 1) - printf("mfs_close: ref count %d > 1\n", vp->v_usecount); + kprintf("mfs_close: ref count %d > 1\n", vp->v_usecount); if (vp->v_usecount > 1 || (bioq_first(&mfsp->bio_queue) != NULL)) panic("mfs_close"); /* @@ -419,7 +419,7 @@ mfs_print(struct vop_print_args *ap) { struct mfsnode *mfsp = VTOMFS(ap->a_vp); - printf("tag VT_MFS, td %p, base %p, size %ld\n", + kprintf("tag VT_MFS, td %p, base %p, size %ld\n", mfsp->mfs_td, (void *)mfsp->mfs_baseoff, mfsp->mfs_size); return (0); } @@ -432,9 +432,9 @@ mfs_badop(struct vop_generic_args *ap) { int i; - printf("mfs_badop[%s]\n", ap->a_desc->sd_name); + kprintf("mfs_badop[%s]\n", ap->a_desc->sd_name); i = vop_defaultop(ap); - printf("mfs_badop[%s] = %d\n", ap->a_desc->sd_name, i); + kprintf("mfs_badop[%s] = %d\n", ap->a_desc->sd_name, i); return (i); } diff --git a/sys/vfs/msdosfs/msdosfs_conv.c b/sys/vfs/msdosfs/msdosfs_conv.c index 4471e5d58b..72c9915d2b 100644 --- a/sys/vfs/msdosfs/msdosfs_conv.c +++ b/sys/vfs/msdosfs/msdosfs_conv.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_conv.c,v 1.29.2.1 2002/11/08 22:01:22 semenu Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_conv.c,v 1.6 2005/08/19 14:02:39 joerg Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_conv.c,v 1.7 2006/12/23 00:41:29 swildner Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.25 1997/11/17 15:36:40 ws Exp $ */ /*- @@ -208,7 +208,7 @@ dos2unixtime(u_int dd, u_int dt, u_int dh, struct timespec *tsp) months = year & 0x03 ? regyear : leapyear; month = (dd & DD_MONTH_MASK) >> DD_MONTH_SHIFT; if (month < 1 || month > 12) { - printf("dos2unixtime(): month value out of range (%ld)\n", + kprintf("dos2unixtime(): month value out of range (%ld)\n", month); month = 1; } diff --git a/sys/vfs/msdosfs/msdosfs_denode.c b/sys/vfs/msdosfs/msdosfs_denode.c index 7208b50822..e8f182be8f 100644 --- a/sys/vfs/msdosfs/msdosfs_denode.c +++ b/sys/vfs/msdosfs/msdosfs_denode.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_denode.c,v 1.47.2.3 2002/08/22 16:20:15 trhodes Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_denode.c,v 1.26 2006/09/10 01:26:41 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_denode.c,v 1.27 2006/12/23 00:41:29 swildner Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */ /*- @@ -249,7 +249,7 @@ deget(struct msdosfsmount *pmp, /* so we know the maj/min number */ struct timeval tv; #ifdef MSDOSFS_DEBUG - printf("deget(pmp %p, dirclust %lu, diroffset %lx, depp %p)\n", + kprintf("deget(pmp %p, dirclust %lu, diroffset %lx, depp %p)\n", pmp, dirclust, diroffset, depp); #endif @@ -313,7 +313,7 @@ again: * throw away the vnode and try again. */ if (msdosfs_hashins(ldep) != 0) { - printf("debug: msdosfs: hashins collision, retrying\n"); + kprintf("debug: msdosfs: hashins collision, retrying\n"); vx_put(nvp); kfree(ldep, M_MSDOSFSNODE); goto again; @@ -396,7 +396,7 @@ again: * instead of what is written in directory entry. */ if ((diroffset == 0) && (ldep->de_StartCluster != dirclust)) { - printf("deget(): . entry at clust %ld != %ld\n", + kprintf("deget(): . entry at clust %ld != %ld\n", dirclust, ldep->de_StartCluster); ldep->de_StartCluster = dirclust; } @@ -408,7 +408,7 @@ again: ldep->de_FileSize = de_cn2off(pmp, size); error = 0; } else - printf("deget(): pcbmap returned %d\n", error); + kprintf("deget(): pcbmap returned %d\n", error); } } else { nvp->v_type = VREG; @@ -475,7 +475,7 @@ detrunc(struct denode *dep, u_long length, int flags) struct msdosfsmount *pmp = dep->de_pmp; #ifdef MSDOSFS_DEBUG - printf("detrunc(): file %s, length %lu, flags %x\n", dep->de_Name, length, flags); + kprintf("detrunc(): file %s, length %lu, flags %x\n", dep->de_Name, length, flags); #endif /* @@ -487,7 +487,7 @@ detrunc(struct denode *dep, u_long length, int flags) * directory's life. */ if ((DETOV(dep)->v_flag & VROOT) && !FAT32(pmp)) { - printf("detrunc(): can't truncate root directory, clust %ld, offset %ld\n", + kprintf("detrunc(): can't truncate root directory, clust %ld, offset %ld\n", dep->de_dirclust, dep->de_diroffset); return (EINVAL); } @@ -516,7 +516,7 @@ detrunc(struct denode *dep, u_long length, int flags) NULL, &eofentry, NULL); if (error) { #ifdef MSDOSFS_DEBUG - printf("detrunc(): pcbmap fails %d\n", error); + kprintf("detrunc(): pcbmap fails %d\n", error); #endif return (error); } @@ -540,7 +540,7 @@ detrunc(struct denode *dep, u_long length, int flags) if (error) { brelse(bp); #ifdef MSDOSFS_DEBUG - printf("detrunc(): bread fails %d\n", error); + kprintf("detrunc(): bread fails %d\n", error); #endif return (error); } @@ -564,13 +564,13 @@ detrunc(struct denode *dep, u_long length, int flags) allerror = vtruncbuf(DETOV(dep), length, pmp->pm_bpcluster); #ifdef MSDOSFS_DEBUG if (allerror) - printf("detrunc(): vtruncbuf error %d\n", allerror); + kprintf("detrunc(): vtruncbuf error %d\n", allerror); #endif error = deupdat(dep, 1); if (error && (allerror == 0)) allerror = error; #ifdef MSDOSFS_DEBUG - printf("detrunc(): allerror %d, eofentry %lu\n", + kprintf("detrunc(): allerror %d, eofentry %lu\n", allerror, eofentry); #endif @@ -583,7 +583,7 @@ detrunc(struct denode *dep, u_long length, int flags) &chaintofree, CLUST_EOFE); if (error) { #ifdef MSDOSFS_DEBUG - printf("detrunc(): fatentry errors %d\n", error); + kprintf("detrunc(): fatentry errors %d\n", error); #endif return (error); } @@ -655,7 +655,7 @@ msdosfs_reclaim(struct vop_reclaim_args *ap) struct denode *dep = VTODE(vp); #ifdef MSDOSFS_DEBUG - printf("msdosfs_reclaim(): dep %p, file %s, refcnt %ld\n", + kprintf("msdosfs_reclaim(): dep %p, file %s, refcnt %ld\n", dep, dep ? dep->de_Name : "?", dep ? dep->de_refcnt : -1); #endif @@ -687,7 +687,7 @@ msdosfs_inactive(struct vop_inactive_args *ap) int error = 0; #ifdef MSDOSFS_DEBUG - printf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]); + kprintf("msdosfs_inactive(): dep %p, de_Name[0] %x\n", dep, dep->de_Name[0]); #endif if (prtactive && vp->v_usecount != 0) @@ -705,7 +705,7 @@ msdosfs_inactive(struct vop_inactive_args *ap) * as empty. (This may not be necessary for the dos filesystem.) */ #ifdef MSDOSFS_DEBUG - printf("msdosfs_inactive(): dep %p, refcnt %ld, mntflag %x, MNT_RDONLY %x\n", + kprintf("msdosfs_inactive(): dep %p, refcnt %ld, mntflag %x, MNT_RDONLY %x\n", dep, dep->de_refcnt, vp->v_mount->mnt_flag, MNT_RDONLY); #endif if (dep->de_refcnt <= 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { @@ -721,7 +721,7 @@ out: * so that it can be reused immediately. */ #ifdef MSDOSFS_DEBUG - printf("msdosfs_inactive(): v_usecount %d, de_Name[0] %x\n", vp->v_usecount, + kprintf("msdosfs_inactive(): v_usecount %d, de_Name[0] %x\n", vp->v_usecount, dep->de_Name[0]); #endif if (dep->de_Name[0] == SLOT_DELETED) diff --git a/sys/vfs/msdosfs/msdosfs_fat.c b/sys/vfs/msdosfs/msdosfs_fat.c index bed7c57391..1a033cf8ae 100644 --- a/sys/vfs/msdosfs/msdosfs_fat.c +++ b/sys/vfs/msdosfs/msdosfs_fat.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_fat.c,v 1.23 2000/01/27 14:43:06 nyan Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_fat.c,v 1.10 2006/09/03 18:52:30 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_fat.c,v 1.11 2006/12/23 00:41:29 swildner Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.28 1997/11/17 15:36:49 ws Exp $ */ /*- @@ -328,7 +328,7 @@ updatefats(struct msdosfsmount *pmp, struct buf *bp, u_long fatbn) struct buf *bpn; #ifdef MSDOSFS_DEBUG - printf("updatefats(pmp %p, bp %p, fatbn %lu)\n", pmp, bp, fatbn); + kprintf("updatefats(pmp %p, bp %p, fatbn %lu)\n", pmp, bp, fatbn); #endif /* @@ -491,7 +491,7 @@ fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, struct buf *bp; #ifdef MSDOSFS_DEBUG - printf("fatentry(func %d, pmp %p, clust %lu, oldcon %p, newcon %lx)\n", + kprintf("fatentry(func %d, pmp %p, clust %lu, oldcon %p, newcon %lx)\n", function, pmp, cn, oldcontents, newcontents); #endif @@ -500,7 +500,7 @@ fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, * Be sure they asked us to do something. */ if ((function & (FAT_SET | FAT_GET)) == 0) { - printf("fatentry(): function code doesn't specify get or set\n"); + kprintf("fatentry(): function code doesn't specify get or set\n"); return (EINVAL); } @@ -509,7 +509,7 @@ fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, * where to put it, give them an error. */ if ((function & FAT_GET) && oldcontents == NULL) { - printf("fatentry(): get function with no place to put result\n"); + kprintf("fatentry(): get function with no place to put result\n"); return (EINVAL); } #endif @@ -593,7 +593,7 @@ fatchain(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith) struct buf *bp; #ifdef MSDOSFS_DEBUG - printf("fatchain(pmp %p, start %lu, count %lu, fillwith %lx)\n", + kprintf("fatchain(pmp %p, start %lu, count %lu, fillwith %lx)\n", pmp, start, count, fillwith); #endif /* @@ -713,7 +713,7 @@ chainalloc(struct msdosfsmount *pmp, u_long start, u_long count, if (error != 0) return (error); #ifdef MSDOSFS_DEBUG - printf("clusteralloc(): allocated cluster chain at %lu (%lu clusters)\n", + kprintf("clusteralloc(): allocated cluster chain at %lu (%lu clusters)\n", start, count); #endif if (retcluster) @@ -744,7 +744,7 @@ clusteralloc(struct msdosfsmount *pmp, u_long start, u_long count, u_int map; #ifdef MSDOSFS_DEBUG - printf("clusteralloc(): find %lu clusters\n",count); + kprintf("clusteralloc(): find %lu clusters\n",count); #endif if (start) { if ((len = chainlength(pmp, start, count)) >= count) @@ -951,7 +951,7 @@ extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, */ if (dep->de_StartCluster == MSDOSFSROOT && (dep->de_Attributes & ATTR_DIRECTORY)) { - printf("extendfile(): attempt to extend root directory\n"); + kprintf("extendfile(): attempt to extend root directory\n"); return (ENOSPC); } diff --git a/sys/vfs/msdosfs/msdosfs_lookup.c b/sys/vfs/msdosfs/msdosfs_lookup.c index 1de7bb1f42..de610f976b 100644 --- a/sys/vfs/msdosfs/msdosfs_lookup.c +++ b/sys/vfs/msdosfs/msdosfs_lookup.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_lookup.c,v 1.30.2.1 2000/11/03 15:55:39 bp Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_lookup.c,v 1.20 2006/08/12 00:26:21 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_lookup.c,v 1.21 2006/12/23 00:41:29 swildner Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */ /*- @@ -117,7 +117,7 @@ msdosfs_lookup(struct vop_old_lookup_args *ap) cnp->cn_flags &= ~CNP_PDIRUNLOCK; #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): looking for %s\n", cnp->cn_nameptr); + kprintf("msdosfs_lookup(): looking for %s\n", cnp->cn_nameptr); #endif dp = VTODE(vdp); pmp = dp->de_pmp; @@ -125,7 +125,7 @@ msdosfs_lookup(struct vop_old_lookup_args *ap) lockparent = flags & CNP_LOCKPARENT; wantparent = flags & (CNP_LOCKPARENT | CNP_WANTPARENT); #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): vdp %p, dp %p, Attr %02x\n", + kprintf("msdosfs_lookup(): vdp %p, dp %p, Attr %02x\n", vdp, dp, dp->de_Attributes); #endif @@ -140,7 +140,7 @@ msdosfs_lookup(struct vop_old_lookup_args *ap) isadir = ATTR_DIRECTORY; scn = MSDOSFSROOT; #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): looking for . or .. in root directory\n"); + kprintf("msdosfs_lookup(): looking for . or .. in root directory\n"); #endif cluster = MSDOSFSROOT; blkoff = MSDOSFSROOT_OFS; @@ -182,7 +182,7 @@ msdosfs_lookup(struct vop_old_lookup_args *ap) slotcount = 0; #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): dos version of filename %s, length %ld\n", + kprintf("msdosfs_lookup(): dos version of filename %s, length %ld\n", dosfilename, cnp->cn_namelen); #endif /* @@ -282,7 +282,7 @@ msdosfs_lookup(struct vop_old_lookup_args *ap) continue; } #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): match blkoff %d, diroff %d\n", + kprintf("msdosfs_lookup(): match blkoff %d, diroff %d\n", blkoff, diroff); #endif /* @@ -326,9 +326,9 @@ notfound: * the pathname and the directory hasn't been removed. */ #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): op %d, refcnt %ld\n", + kprintf("msdosfs_lookup(): op %d, refcnt %ld\n", nameiop, dp->de_refcnt); - printf(" slotcount %d, slotoffset %d\n", + kprintf(" slotcount %d, slotoffset %d\n", slotcount, slotoffset); #endif if ((nameiop == NAMEI_CREATE || nameiop == NAMEI_RENAME) && @@ -557,7 +557,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, int blsize; #ifdef MSDOSFS_DEBUG - printf("createde(dep %p, ddep %p, depp %p, cnp %p)\n", + kprintf("createde(dep %p, ddep %p, depp %p, cnp %p)\n", dep, ddep, depp, cnp); #endif @@ -722,7 +722,7 @@ dosdirempty(struct denode *dep) bcmp(dentp->deName, ".. ", 11)) { brelse(bp); #ifdef MSDOSFS_DEBUG - printf("dosdirempty(): entry found %02x, %02x\n", + kprintf("dosdirempty(): entry found %02x, %02x\n", dentp->deName[0], dentp->deName[1]); #endif return (0); /* not empty */ @@ -823,7 +823,7 @@ out:; if (bp) brelse(bp); if (error == ENOTDIR) - printf("doscheckpath(): .. not a directory?\n"); + kprintf("doscheckpath(): .. not a directory?\n"); if (dep != NULL) vput(DETOV(dep)); return (error); @@ -890,7 +890,7 @@ removede(struct denode *pdep, /* directory where the entry is removed */ u_long offset = pdep->de_fndoffset; #ifdef MSDOSFS_DEBUG - printf("removede(): filename %s, dep %p, offset %08lx\n", + kprintf("removede(): filename %s, dep %p, offset %08lx\n", dep->de_Name, dep, offset); #endif diff --git a/sys/vfs/msdosfs/msdosfs_vfsops.c b/sys/vfs/msdosfs/msdosfs_vfsops.c index f1feca3a27..6181da15f6 100644 --- a/sys/vfs/msdosfs/msdosfs_vfsops.c +++ b/sys/vfs/msdosfs/msdosfs_vfsops.c @@ -1,5 +1,5 @@ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/msdosfs/Attic/msdosfs_vfsops.c,v 1.60.2.8 2004/03/02 09:43:04 tjr Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.42 2006/10/27 04:56:34 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.43 2006/12/23 00:41:29 swildner Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -263,7 +263,7 @@ msdosfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) } if ((mp->mnt_flag & MNT_UPDATE) == 0) { error = mountmsdosfs(devvp, mp, &args); -#ifdef MSDOSFS_DEBUG /* only needed for the printf below */ +#ifdef MSDOSFS_DEBUG /* only needed for the kprintf below */ pmp = VFSTOMSDOSFS(mp); #endif } else { @@ -287,7 +287,7 @@ msdosfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); msdosfs_statfs(mp, &mp->mnt_stat, cred); #ifdef MSDOSFS_DEBUG - printf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); + kprintf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); #endif return (0); } @@ -442,7 +442,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct msdosfs_args *argp) || pmp->pm_FATsecs || getushort(b710->bpbFSVers)) { error = EINVAL; - printf("mountmsdosfs(): bad FAT32 filesystem\n"); + kprintf("mountmsdosfs(): bad FAT32 filesystem\n"); goto error_exit; } pmp->pm_fatmask = FAT32_MASK; @@ -533,7 +533,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct msdosfs_args *argp) clusters = (pmp->pm_fatsize / pmp->pm_fatmult) * pmp->pm_fatdiv; if (pmp->pm_maxcluster >= clusters) { - printf("Warning: number of clusters (%ld) exceeds FAT " + kprintf("Warning: number of clusters (%ld) exceeds FAT " "capacity (%ld)\n", pmp->pm_maxcluster + 1, clusters); pmp->pm_maxcluster = clusters - 1; } @@ -596,7 +596,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct msdosfs_args *argp) * Check and validate (or perhaps invalidate?) the fsinfo structure? */ if (pmp->pm_fsinfo && pmp->pm_nxtfree > pmp->pm_maxcluster) { - printf( + kprintf( "Next free cluster in FSInfo (%lu) exceeds maxcluster (%lu)\n", pmp->pm_nxtfree, pmp->pm_maxcluster); error = EINVAL; @@ -683,18 +683,18 @@ msdosfs_unmount(struct mount *mp, int mntflags) { struct vnode *vp = pmp->pm_devvp; - printf("msdosfs_umount(): just before calling VOP_CLOSE()\n"); - printf("flag %08lx, usecount %d, writecount %d, holdcnt %ld\n", + kprintf("msdosfs_umount(): just before calling VOP_CLOSE()\n"); + kprintf("flag %08lx, usecount %d, writecount %d, holdcnt %ld\n", vp->v_flag, vp->v_usecount, vp->v_writecount, vp->v_holdcnt); - printf("mount %p, op %p\n", vp->v_mount, vp->v_op); - printf("freef %p, freeb %p, mount %p\n", + kprintf("mount %p, op %p\n", vp->v_mount, vp->v_op); + kprintf("freef %p, freeb %p, mount %p\n", TAILQ_NEXT(vp, v_freelist), TAILQ_PREV(vp, v_freelist), vp->v_mount); - printf("cleanblkhd %p, dirtyblkhd %p, numoutput %ld, type %d\n", + kprintf("cleanblkhd %p, dirtyblkhd %p, numoutput %ld, type %d\n", RB_EMPTY(&vp->v_rbclean_tree), RB_EMPTY(&vp->v_rbdirty_tree), vp->v_track_write.bk_active, vp->v_type); - printf("union %p, tag %d, data[0] %08x, data[1] %08x\n", + kprintf("union %p, tag %d, data[0] %08x, data[1] %08x\n", vp->v_socket, vp->v_tag, ((u_int *)vp->v_data)[0], ((u_int *)vp->v_data)[1]); @@ -718,7 +718,7 @@ msdosfs_root(struct mount *mp, struct vnode **vpp) int error; #ifdef MSDOSFS_DEBUG - printf("msdosfs_root(); mp %p, pmp %p\n", mp, pmp); + kprintf("msdosfs_root(); mp %p, pmp %p\n", mp, pmp); #endif error = deget(pmp, MSDOSFSROOT, MSDOSFSROOT_OFS, &ndep); if (error) diff --git a/sys/vfs/msdosfs/msdosfs_vnops.c b/sys/vfs/msdosfs/msdosfs_vnops.c index 785616748c..20309d666c 100644 --- a/sys/vfs/msdosfs/msdosfs_vnops.c +++ b/sys/vfs/msdosfs/msdosfs_vnops.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_vnops.c,v 1.95.2.4 2003/06/13 15:05:47 trhodes Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vnops.c,v 1.43 2006/09/05 00:55:50 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vnops.c,v 1.44 2006/12/23 00:41:29 swildner Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */ /*- @@ -142,7 +142,7 @@ msdosfs_create(struct vop_old_create_args *ap) int error; #ifdef MSDOSFS_DEBUG - printf("msdosfs_create(cnp %p, vap %p\n", cnp, ap->a_vap); + kprintf("msdosfs_create(cnp %p, vap %p\n", cnp, ap->a_vap); #endif /* @@ -394,7 +394,7 @@ msdosfs_setattr(struct vop_setattr_args *ap) int error = 0; #ifdef MSDOSFS_DEBUG - printf("msdosfs_setattr(): vp %p, vap %p, cred %p, p %p\n", + kprintf("msdosfs_setattr(): vp %p, vap %p, cred %p, p %p\n", ap->a_vp, vap, cred, ap->a_td); #endif @@ -406,12 +406,12 @@ msdosfs_setattr(struct vop_setattr_args *ap) (vap->va_blocksize != VNOVAL) || (vap->va_rdev != VNOVAL) || (vap->va_bytes != VNOVAL) || (vap->va_gen != VNOVAL)) { #ifdef MSDOSFS_DEBUG - printf("msdosfs_setattr(): returning EINVAL\n"); - printf(" va_type %d, va_nlink %x, va_fsid %lx, va_fileid %lx\n", + kprintf("msdosfs_setattr(): returning EINVAL\n"); + kprintf(" va_type %d, va_nlink %x, va_fsid %lx, va_fileid %lx\n", vap->va_type, vap->va_nlink, vap->va_fsid, vap->va_fileid); - printf(" va_blocksize %lx, va_rdev %x, va_bytes %qx, va_gen %lx\n", + kprintf(" va_blocksize %lx, va_rdev %x, va_bytes %qx, va_gen %lx\n", vap->va_blocksize, vap->va_rdev, vap->va_bytes, vap->va_gen); - printf(" va_uid %x, va_gid %x\n", + kprintf(" va_uid %x, va_gid %x\n", vap->va_uid, vap->va_gid); #endif return (EINVAL); @@ -668,9 +668,9 @@ msdosfs_write(struct vop_write_args *ap) struct proc *p = (td ? td->td_proc : NULL); #ifdef MSDOSFS_DEBUG - printf("msdosfs_write(vp %p, uio %p, ioflag %x, cred %p\n", + kprintf("msdosfs_write(vp %p, uio %p, ioflag %x, cred %p\n", vp, uio, ioflag, cred); - printf("msdosfs_write(): diroff %lu, dirclust %lu, startcluster %lu\n", + kprintf("msdosfs_write(): diroff %lu, dirclust %lu, startcluster %lu\n", dep->de_diroffset, dep->de_dirclust, dep->de_StartCluster); #endif @@ -895,7 +895,7 @@ msdosfs_remove(struct vop_old_remove_args *ap) else error = removede(ddep, dep); #ifdef MSDOSFS_DEBUG - printf("msdosfs_remove(), dep %p, v_usecount %d\n", dep, ap->a_vp->v_usecount); + kprintf("msdosfs_remove(), dep %p, v_usecount %d\n", dep, ap->a_vp->v_usecount); #endif return (error); } @@ -1578,7 +1578,7 @@ msdosfs_readdir(struct vop_readdir_args *ap) pmp = dep->de_pmp; #ifdef MSDOSFS_DEBUG - printf("msdosfs_readdir(): vp %p, uio %p, cred %p, eofflagp %p\n", + kprintf("msdosfs_readdir(): vp %p, uio %p, cred %p, eofflagp %p\n", ap->a_vp, uio, ap->a_cred, ap->a_eofflag); #endif @@ -1627,7 +1627,7 @@ msdosfs_readdir(struct vop_readdir_args *ap) if (dep->de_StartCluster == MSDOSFSROOT || (FAT32(pmp) && dep->de_StartCluster == pmp->pm_rootdirblk)) { #if 0 - printf("msdosfs_readdir(): going after . or .. in root dir, offset %d\n", + kprintf("msdosfs_readdir(): going after . or .. in root dir, offset %d\n", offset); #endif bias = 2 * sizeof(struct direntry); @@ -1693,7 +1693,7 @@ msdosfs_readdir(struct vop_readdir_args *ap) (char *)dentp < bp->b_data + on + n; dentp++, offset += sizeof(struct direntry)) { #if 0 - printf("rd: dentp %08x prev %08x crnt %08x deName %02x attr %02x\n", + kprintf("rd: dentp %08x prev %08x crnt %08x deName %02x attr %02x\n", dentp, prev, crnt, dentp->deName[0], dentp->deAttributes); #endif d_name = d_name_storage; @@ -1916,12 +1916,12 @@ msdosfs_print(struct vop_print_args *ap) { struct denode *dep = VTODE(ap->a_vp); - printf( + kprintf( "tag VT_MSDOSFS, startcluster %lu, dircluster %lu, diroffset %lu ", dep->de_StartCluster, dep->de_dirclust, dep->de_diroffset); - printf(" dev %d, %d", major(dep->de_dev), minor(dep->de_dev)); + kprintf(" dev %d, %d", major(dep->de_dev), minor(dep->de_dev)); lockmgr_printinfo(&ap->a_vp->v_lock); - printf("\n"); + kprintf("\n"); return (0); } diff --git a/sys/vfs/nfs/bootp_subr.c b/sys/vfs/nfs/bootp_subr.c index 3620ddf1a4..b741f1a78e 100644 --- a/sys/vfs/nfs/bootp_subr.c +++ b/sys/vfs/nfs/bootp_subr.c @@ -38,7 +38,7 @@ * nfs/krpc_subr.c * $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $ * $FreeBSD: src/sys/nfs/bootp_subr.c,v 1.20.2.9 2003/04/24 16:51:08 ambrisko Exp $ - * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.21 2006/12/20 18:14:44 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/bootp_subr.c,v 1.22 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_bootp.h" @@ -282,7 +282,7 @@ void bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma) { if (sa == NULL) { - printf("(sockaddr *) "); + kprintf("(sockaddr *) "); return; } switch (sa->sa_family) { @@ -291,11 +291,11 @@ bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma) struct sockaddr_in *sin; sin = (struct sockaddr_in *) sa; - printf("inet "); + kprintf("inet "); print_sin_addr(sin); if (ma != NULL) { sin = (struct sockaddr_in *) ma; - printf(" mask "); + kprintf(" mask "); print_sin_addr(sin); } } @@ -306,16 +306,16 @@ bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma) int i; sli = (struct sockaddr_dl *) sa; - printf("link %.*s ", sli->sdl_nlen, sli->sdl_data); + kprintf("link %.*s ", sli->sdl_nlen, sli->sdl_data); for (i = 0; i < sli->sdl_alen; i++) { if (i > 0) - printf(":"); - printf("%x", ((unsigned char *) LLADDR(sli))[i]); + kprintf(":"); + kprintf("%x", ((unsigned char *) LLADDR(sli))[i]); } } break; default: - printf("af%d", sa->sa_family); + kprintf("af%d", sa->sa_family); } } @@ -324,10 +324,10 @@ void bootpboot_p_ma(struct sockaddr *ma) { if (ma == NULL) { - printf(""); + kprintf(""); return; } - printf("%x", *(int *)ma); + kprintf("%x", *(int *)ma); } @@ -335,14 +335,14 @@ void bootpboot_p_rtentry(struct rtentry *rt) { bootpboot_p_sa(rt_key(rt), rt_mask(rt)); - printf(" "); + kprintf(" "); bootpboot_p_ma(rt->rt_genmask); - printf(" "); + kprintf(" "); bootpboot_p_sa(rt->rt_gateway, NULL); - printf(" "); - printf("flags %x", (unsigned short) rt->rt_flags); - printf(" %d", (int) rt->rt_rmx.rmx_expire); - printf(" %s\n", if_name(rt->rt_ifp)); + kprintf(" "); + kprintf("flags %x", (unsigned short) rt->rt_flags); + kprintf(" %d", (int) rt->rt_rmx.rmx_expire); + kprintf(" %s\n", if_name(rt->rt_ifp)); } @@ -368,7 +368,7 @@ bootpboot_p_tree(struct radix_node *rn) void bootpboot_p_rtlist(void) { - printf("Routing table:\n"); + kprintf("Routing table:\n"); bootpboot_p_tree(rt_tables[AF_INET]->rnh_treetop); } @@ -376,15 +376,15 @@ bootpboot_p_rtlist(void) void bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa) { - printf("%s flags %x, addr ", + kprintf("%s flags %x, addr ", if_name(ifp), (unsigned short) ifp->if_flags); print_sin_addr((struct sockaddr_in *) ifa->ifa_addr); - printf(", broadcast "); + kprintf(", broadcast "); print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr); - printf(", netmask "); + kprintf(", netmask "); print_sin_addr((struct sockaddr_in *) ifa->ifa_netmask); - printf("\n"); + kprintf("\n"); } @@ -394,7 +394,7 @@ bootpboot_p_iflist(void) struct ifnet *ifp; struct ifaddr *ifa; - printf("Interface list:\n"); + kprintf("Interface list:\n"); TAILQ_FOREACH(ifp, &ifnet, if_link) { TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) if (ifa->ifa_addr->sa_family == AF_INET) @@ -639,7 +639,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) sin->sin_port = htons(IPPORT_BOOTPC); error = sobind(so, (struct sockaddr *)sin, td); if (error != 0) { - printf("bind failed\n"); + kprintf("bind failed\n"); goto out; } @@ -713,7 +713,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) s = "BOOTP Query"; break; } - printf("Sending %s packet from " + kprintf("Sending %s packet from " "interface %s (%*D)\n", s, ifctx->ireq.ifr_name, @@ -748,7 +748,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) error = sosend(so, (struct sockaddr *) &dst, &auio, NULL, NULL, 0, td); if (error != 0) { - printf("bootpc_call: sosend: %d state %08x\n", + kprintf("bootpc_call: sosend: %d state %08x\n", error, (int) so->so_state); } @@ -779,9 +779,9 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) if (timo < MAX_RESEND_DELAY) timo++; else { - printf("DHCP/BOOTP timeout for server "); + kprintf("DHCP/BOOTP timeout for server "); print_sin_addr(&dst); - printf("\n"); + kprintf("\n"); } /* @@ -869,18 +869,18 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) } else s = "BOOTP Reply"; - printf("Received %s packet" + kprintf("Received %s packet" " on %s from ", s, ifctx->ireq.ifr_name); print_in_addr(gctx->reply.siaddr); if (gctx->reply.giaddr.s_addr != htonl(INADDR_ANY)) { - printf(" via "); + kprintf(" via "); print_in_addr(gctx->reply.giaddr); } if (bootpc_received(gctx, ifctx) != 0) { - printf(" (accepted)"); + kprintf(" (accepted)"); if (ifctx->outstanding) { ifctx->outstanding = 0; outstanding--; @@ -890,15 +890,15 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) atimo = time_second + BOOTP_SETTLE_DELAY; } else - printf(" (ignored)"); + kprintf(" (ignored)"); if (ifctx->gotrootpath) { gotrootpath = 1; rtimo = time_second + BOOTP_SETTLE_DELAY; - printf(" (got root path)"); + kprintf(" (got root path)"); } else - printf(" (no root path)"); - printf("\n"); + kprintf(" (no root path)"); + kprintf("\n"); } } /* while secs */ #ifdef BOOTP_TIMEOUT @@ -934,7 +934,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next) { if (bootpc_ifctx_isresolved(ifctx) == 0) { - printf("%s timeout for interface %s\n", + kprintf("%s timeout for interface %s\n", ifctx->dhcpquerytype != DHCP_NOMSG ? "DHCP" : "BOOTP", ifctx->ireq.ifr_name); @@ -942,7 +942,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) } if (gctx->gotrootpath != 0) { #if 0 - printf("Got a root path, ignoring remaining timeout\n"); + kprintf("Got a root path, ignoring remaining timeout\n"); #endif error = 0; goto out; @@ -1082,7 +1082,7 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx, /* Shutdown interfaces where BOOTP failed */ - printf("Shutdown interface %s\n", ifctx->ireq.ifr_name); + kprintf("Shutdown interface %s\n", ifctx->ireq.ifr_name); error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, proc0.p_ucred); if (error != 0) panic("bootpc_adjust_interface: " @@ -1104,7 +1104,7 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx, return 0; } - printf("Adjusted interface %s\n", ifctx->ireq.ifr_name); + kprintf("Adjusted interface %s\n", ifctx->ireq.ifr_name); /* * Do enough of ifconfig(8) so that the chosen interface * can talk to the servers. (just set the address) @@ -1142,7 +1142,7 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx, (struct sockaddr *) &defmask, (RTF_UP | RTF_GATEWAY | RTF_STATIC)); if (error != 0) { - printf("bootpc_adjust_interface: " + kprintf("bootpc_adjust_interface: " "add net route, error=%d\n", error); return error; } @@ -1164,7 +1164,7 @@ print_in_addr(struct in_addr addr) unsigned int ip; ip = ntohl(addr.s_addr); - printf("%d.%d.%d.%d", + kprintf("%d.%d.%d.%d", ip >> 24, (ip >> 16) & 255, (ip >> 8) & 255, ip & 255); } @@ -1360,14 +1360,14 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, "swap.%d.%d.%d.%d", ip >> 24, (ip >> 16) & 255, (ip >> 8) & 255, ip & 255); - printf("%s at ", ifctx->ireq.ifr_name); + kprintf("%s at ", ifctx->ireq.ifr_name); print_sin_addr(&ifctx->myaddr); - printf(" server "); + kprintf(" server "); print_in_addr(ifctx->reply.siaddr); ifctx->gw.sin_addr = ifctx->reply.giaddr; if (ifctx->reply.giaddr.s_addr != htonl(INADDR_ANY)) { - printf(" via gateway "); + kprintf(" via gateway "); print_in_addr(ifctx->reply.giaddr); } @@ -1377,12 +1377,12 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, if ((gctx->tmptag.overload & OVERLOAD_SNAME) == 0) if (ifctx->reply.sname[0] != '\0') - printf(" server name %s", ifctx->reply.sname); + kprintf(" server name %s", ifctx->reply.sname); if ((gctx->tmptag.overload & OVERLOAD_FILE) == 0) if (ifctx->reply.file[0] != '\0') - printf(" boot file %s", ifctx->reply.file); + kprintf(" boot file %s", ifctx->reply.file); - printf("\n"); + kprintf("\n"); p = bootpc_tag(&gctx->tag, &ifctx->reply, ifctx->replylen, TAG_SUBNETMASK); @@ -1392,9 +1392,9 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, gctx->tag.taglen); bcopy(p, &ifctx->netmask.sin_addr, 4); ifctx->gotnetmask = 1; - printf("subnet mask "); + kprintf("subnet mask "); print_sin_addr(&ifctx->netmask); - printf(" "); + kprintf(" "); } p = bootpc_tag(&gctx->tag, &ifctx->reply, ifctx->replylen, @@ -1405,9 +1405,9 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, panic("bootpc: Router Len is %d", gctx->tag.taglen); if (gctx->tag.taglen > 0) { bcopy(p, &ifctx->gw.sin_addr, 4); - printf("router "); + kprintf("router "); print_sin_addr(&ifctx->gw); - printf(" "); + kprintf(" "); ifctx->gotgw = 1; gctx->gotgw = 1; } @@ -1417,10 +1417,10 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, TAG_ROOT); if (p != NULL) { if (gctx->setrootfs != NULL) { - printf("rootfs %s (ignored) ", p); + kprintf("rootfs %s (ignored) ", p); } else if (setfs(&nd->root_saddr, nd->root_hostnam, p)) { - printf("rootfs %s ",p); + kprintf("rootfs %s ",p); gctx->gotrootpath = 1; ifctx->gotrootpath = 1; gctx->setrootfs = ifctx; @@ -1430,7 +1430,7 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, TAG_ROOTOPTS); if (p != NULL) { mountopts(&nd->root_args, p); - printf("rootopts %s ", p); + kprintf("rootopts %s ", p); } } else panic("Failed to set rootfs to %s",p); @@ -1440,12 +1440,12 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, TAG_SWAP); if (p != NULL) { if (gctx->setswapfs != NULL) { - printf("swapfs %s (ignored) ", p); + kprintf("swapfs %s (ignored) ", p); } else if (setfs(&nd->swap_saddr, nd->swap_hostnam, p)) { gctx->gotswappath = 1; gctx->setswapfs = ifctx; - printf("swapfs %s ", p); + kprintf("swapfs %s ", p); p = bootpc_tag(&gctx->tag, &ifctx->reply, ifctx->replylen, @@ -1453,7 +1453,7 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, if (p != NULL) { /* swap mount options */ mountopts(&nd->swap_args, p); - printf("swapopts %s ", p); + kprintf("swapopts %s ", p); } p = bootpc_tag(&gctx->tag, &ifctx->reply, @@ -1468,7 +1468,7 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, gctx->tag.taglen); bcopy(p, &swaplen, 4); nd->swap_nblks = ntohl(swaplen); - printf("swapsize %d KB ", + kprintf("swapsize %d KB ", nd->swap_nblks); } } else @@ -1482,11 +1482,11 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, panic("bootpc: hostname >= %d bytes", MAXHOSTNAMELEN); if (gctx->sethostname != NULL) { - printf("hostname %s (ignored) ", p); + kprintf("hostname %s (ignored) ", p); } else { strcpy(nd->my_hostnam, p); strcpy(hostname, p); - printf("hostname %s ",hostname); + kprintf("hostname %s ",hostname); gctx->sethostname = ifctx; } } @@ -1499,7 +1499,7 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, p[i] = '\0'; } - printf("\n"); + kprintf("\n"); if (ifctx->gotnetmask == 0) { if (IN_CLASSA(ntohl(ifctx->myaddr.sin_addr.s_addr))) @@ -1554,7 +1554,7 @@ bootpc_init(void) * Find a network interface. */ #ifdef BOOTP_WIRED_TO - printf("bootpc_init: wired to interface '%s'\n", + kprintf("bootpc_init: wired to interface '%s'\n", __XSTRING(BOOTP_WIRED_TO)); #endif bzero(&ifctx->ireq, sizeof(ifctx->ireq)); @@ -1608,7 +1608,7 @@ bootpc_init(void) #ifdef BOOTP_NFSROOT panic("BOOTP call failed"); #else - printf("BOOTP call failed\n"); + kprintf("BOOTP call failed\n"); #endif } diff --git a/sys/vfs/nfs/krpc_subr.c b/sys/vfs/nfs/krpc_subr.c index f0b8302524..f88454ab5e 100644 --- a/sys/vfs/nfs/krpc_subr.c +++ b/sys/vfs/nfs/krpc_subr.c @@ -1,6 +1,6 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ /* $FreeBSD: src/sys/nfs/krpc_subr.c,v 1.13.2.1 2000/11/20 21:17:14 tegge Exp $ */ -/* $DragonFly: src/sys/vfs/nfs/krpc_subr.c,v 1.9 2006/09/05 00:55:50 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/nfs/krpc_subr.c,v 1.10 2006/12/23 00:41:29 swildner Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -263,7 +263,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, } while (error == EADDRINUSE && tport > IPPORT_RESERVED / 2); if (error) { - printf("bind failed\n"); + kprintf("bind failed\n"); goto out; } @@ -322,7 +322,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, error = sosend(so, (struct sockaddr *)sa, NULL, m, NULL, 0, td); if (error) { - printf("krpc_call: sosend: %d\n", error); + kprintf("krpc_call: sosend: %d\n", error); goto out; } m = NULL; @@ -332,7 +332,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, timo++; else { saddr = ntohl(sa->sin_addr.s_addr); - printf("RPC timeout for server %d.%d.%d.%d\n", + kprintf("RPC timeout for server %d.%d.%d.%d\n", (saddr >> 24) & 255, (saddr >> 16) & 255, (saddr >> 8) & 255, @@ -382,7 +382,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, /* Was RPC accepted? (authorization OK) */ if (reply->rp_astatus != 0) { error = fxdr_unsigned(u_int32_t, reply->rp_errno); - printf("rpc denied, error=%d\n", error); + kprintf("rpc denied, error=%d\n", error); continue; } @@ -393,7 +393,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, error = EBADRPC; goto out; } - printf("rpc denied, status=%d\n", error); + kprintf("rpc denied, status=%d\n", error); continue; } diff --git a/sys/vfs/nfs/nfs.h b/sys/vfs/nfs/nfs.h index 205c016043..c81156478e 100644 --- a/sys/vfs/nfs/nfs.h +++ b/sys/vfs/nfs/nfs.h @@ -35,7 +35,7 @@ * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 * $FreeBSD: src/sys/nfs/nfs.h,v 1.53.2.5 2002/02/20 01:35:34 iedowse Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs.h,v 1.18 2006/05/06 02:43:14 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs.h,v 1.19 2006/12/23 00:41:29 swildner Exp $ */ #ifndef _NFS_NFS_H_ @@ -577,7 +577,7 @@ extern int nfs_debug; #define NFS_DPF(cat, args) \ do { \ - if (nfs_debug & NFS_DEBUG_##cat) printf args; \ + if (nfs_debug & NFS_DEBUG_##cat) kprintf args; \ } while (0) #else diff --git a/sys/vfs/nfs/nfs_bio.c b/sys/vfs/nfs/nfs_bio.c index e1f4717063..8f65f9fdef 100644 --- a/sys/vfs/nfs/nfs_bio.c +++ b/sys/vfs/nfs/nfs_bio.c @@ -35,7 +35,7 @@ * * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 * $FreeBSD: /repoman/r/ncvs/src/sys/nfsclient/nfs_bio.c,v 1.130 2004/04/14 23:23:55 peadar Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_bio.c,v 1.38 2006/09/03 18:29:17 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_bio.c,v 1.39 2006/12/23 00:41:29 swildner Exp $ */ @@ -100,7 +100,7 @@ nfs_getpages(struct vop_getpages_args *ap) count = ap->a_count; if (vp->v_object == NULL) { - printf("nfs_getpages: called with non-merged cache vnode??\n"); + kprintf("nfs_getpages: called with non-merged cache vnode??\n"); return VM_PAGER_ERROR; } @@ -168,7 +168,7 @@ nfs_getpages(struct vop_getpages_args *ap) msf_buf_free(msf); if (error && (uio.uio_resid == count)) { - printf("nfs_getpages: error %d\n", error); + kprintf("nfs_getpages: error %d\n", error); for (i = 0; i < npages; ++i) { if (i != ap->a_reqpage) vnode_pager_freepage(pages[i]); @@ -410,7 +410,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag) case VDIR: break; default: - printf(" NDONTCACHE: type %x unexpected\n", vp->v_type); + kprintf(" NDONTCACHE: type %x unexpected\n", vp->v_type); break; }; } @@ -557,7 +557,7 @@ again: brelse(bp); } while (error == NFSERR_BAD_COOKIE) { - printf("got bad cookie vp %p bp %p\n", vp, bp); + kprintf("got bad cookie vp %p bp %p\n", vp, bp); nfs_invaldir(vp); error = nfs_vinvalbuf(vp, 0, 1); /* @@ -653,7 +653,7 @@ again: n = np->n_direofoffset - uio->uio_offset; break; default: - printf(" nfs_bioread: type %x unexpected\n",vp->v_type); + kprintf(" nfs_bioread: type %x unexpected\n",vp->v_type); break; }; @@ -707,7 +707,7 @@ again: bp->b_flags |= B_INVAL; break; default: - printf(" nfs_bioread: type %x unexpected\n",vp->v_type); + kprintf(" nfs_bioread: type %x unexpected\n",vp->v_type); } brelse(bp); } while (error == 0 && uio->uio_resid > 0 && n > 0); @@ -970,7 +970,7 @@ again: */ if (bp->b_dirtyend > bcount) { - printf("NFS append race @%08llx:%d\n", + kprintf("NFS append race @%08llx:%d\n", bp->b_bio2.bio_offset, bp->b_dirtyend - bcount); bp->b_dirtyend = bcount; @@ -1401,7 +1401,7 @@ nfs_doio(struct vnode *vp, struct bio *bio, struct thread *td) bp->b_flags |= B_INVAL; break; default: - printf("nfs_doio: type %x unexpected\n",vp->v_type); + kprintf("nfs_doio: type %x unexpected\n",vp->v_type); break; }; if (error) { diff --git a/sys/vfs/nfs/nfs_mountrpc.c b/sys/vfs/nfs/nfs_mountrpc.c index 1445fa5a50..668bacadd2 100644 --- a/sys/vfs/nfs/nfs_mountrpc.c +++ b/sys/vfs/nfs/nfs_mountrpc.c @@ -38,7 +38,7 @@ * nfs/krpc_subr.c * $NetBSD: krpc_subr.c,v 1.10 1995/08/08 20:43:43 gwr Exp $ * $FreeBSD: src/sys/nfs/bootp_subr.c,v 1.20.2.9 2003/04/24 16:51:08 ambrisko Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_mountrpc.c,v 1.1 2005/09/04 01:29:00 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_mountrpc.c,v 1.2 2006/12/23 00:41:29 swildner Exp $ */ /* * Procedures used by NFS_ROOT and BOOTP to do an NFS mount rpc to obtain @@ -304,7 +304,7 @@ md_lookup_swap(struct sockaddr_in *mdsin, /* mountd server address */ if (nfsv3_diskless.swap_nblks == 0 && size != -1) { nfsv3_diskless.swap_nblks = size / 1024; - printf("md_lookup_swap: Swap size is %d KB\n", + kprintf("md_lookup_swap: Swap size is %d KB\n", nfsv3_diskless.swap_nblks); } diff --git a/sys/vfs/nfs/nfs_serv.c b/sys/vfs/nfs/nfs_serv.c index c920498e8b..4a00c1dc28 100644 --- a/sys/vfs/nfs/nfs_serv.c +++ b/sys/vfs/nfs/nfs_serv.c @@ -35,7 +35,7 @@ * * @(#)nfs_serv.c 8.8 (Berkeley) 7/31/95 * $FreeBSD: src/sys/nfs/nfs_serv.c,v 1.93.2.6 2002/12/29 18:19:53 dillon Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_serv.c,v 1.41 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_serv.c,v 1.42 2006/12/23 00:41:29 swildner Exp $ */ /* @@ -97,7 +97,7 @@ #include "nfsm_subs.h" #ifdef NFSRV_DEBUG -#define nfsdbprintf(info) printf info +#define nfsdbprintf(info) kprintf info #else #define nfsdbprintf(info) #endif diff --git a/sys/vfs/nfs/nfs_socket.c b/sys/vfs/nfs/nfs_socket.c index 659f249f4e..e9ae01fb96 100644 --- a/sys/vfs/nfs/nfs_socket.c +++ b/sys/vfs/nfs/nfs_socket.c @@ -35,7 +35,7 @@ * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 * $FreeBSD: src/sys/nfs/nfs_socket.c,v 1.60.2.6 2003/03/26 01:44:46 alfred Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_socket.c,v 1.38 2006/09/09 18:29:09 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_socket.c,v 1.39 2006/12/23 00:41:29 swildner Exp $ */ /* @@ -683,7 +683,7 @@ tryagain: } while (error == EWOULDBLOCK || (!error && *mp == NULL && control)); if ((rcvflg & MSG_EOR) == 0) - printf("Egad!!\n"); + kprintf("Egad!!\n"); if (!error && *mp == NULL) error = EPIPE; len -= auio.uio_resid; @@ -1898,7 +1898,7 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header) nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); if (*tl++ != rpc_auth_kerb || fxdr_unsigned(int, *tl) != 4 * NFSX_UNSIGNED) { - printf("Bad kerb verifier\n"); + kprintf("Bad kerb verifier\n"); nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF); nd->nd_procnum = NFSPROC_NOOP; return (0); @@ -1906,7 +1906,7 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header) nfsm_dissect(cp, caddr_t, 4 * NFSX_UNSIGNED); tl = (u_int32_t *)cp; if (fxdr_unsigned(int, *tl) != RPCAKN_FULLNAME) { - printf("Not fullname kerb verifier\n"); + kprintf("Not fullname kerb verifier\n"); nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF); nd->nd_procnum = NFSPROC_NOOP; return (0); @@ -1919,7 +1919,7 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header) break; case RPCAKN_NICKNAME: if (len != 2 * NFSX_UNSIGNED) { - printf("Kerb nickname short\n"); + kprintf("Kerb nickname short\n"); nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADCRED); nd->nd_procnum = NFSPROC_NOOP; return (0); @@ -1928,7 +1928,7 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header) nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED); if (*tl++ != rpc_auth_kerb || fxdr_unsigned(int, *tl) != 3 * NFSX_UNSIGNED) { - printf("Kerb nick verifier bad\n"); + kprintf("Kerb nick verifier bad\n"); nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF); nd->nd_procnum = NFSPROC_NOOP; return (0); diff --git a/sys/vfs/nfs/nfs_subs.c b/sys/vfs/nfs/nfs_subs.c index f3fe076542..02b16daf8f 100644 --- a/sys/vfs/nfs/nfs_subs.c +++ b/sys/vfs/nfs/nfs_subs.c @@ -35,7 +35,7 @@ * * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 * $FreeBSD: /repoman/r/ncvs/src/sys/nfsclient/nfs_subs.c,v 1.128 2004/04/14 23:23:55 peadar Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_subs.c,v 1.44 2006/12/05 19:07:18 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_subs.c,v 1.45 2006/12/23 00:41:29 swildner Exp $ */ /* @@ -1355,7 +1355,7 @@ nfs_getattrcache(struct vnode *vp, struct vattr *vaper) #ifdef NFS_ACDEBUG if (nfs_acdebug>1) - printf("nfs_getattrcache: initial timeo = %d\n", timeo); + kprintf("nfs_getattrcache: initial timeo = %d\n", timeo); #endif if (vap->va_type == VDIR) { @@ -1372,12 +1372,12 @@ nfs_getattrcache(struct vnode *vp, struct vattr *vaper) #ifdef NFS_ACDEBUG if (nfs_acdebug > 2) - printf("acregmin %d; acregmax %d; acdirmin %d; acdirmax %d\n", + kprintf("acregmin %d; acregmax %d; acdirmin %d; acdirmax %d\n", nmp->nm_acregmin, nmp->nm_acregmax, nmp->nm_acdirmin, nmp->nm_acdirmax); if (nfs_acdebug) - printf("nfs_getattrcache: age = %d; final timeo = %d\n", + kprintf("nfs_getattrcache: age = %d; final timeo = %d\n", (int)(time_second - np->n_attrstamp), timeo); #endif diff --git a/sys/vfs/nfs/nfs_syscalls.c b/sys/vfs/nfs/nfs_syscalls.c index 93041671d9..90c17b6999 100644 --- a/sys/vfs/nfs/nfs_syscalls.c +++ b/sys/vfs/nfs/nfs_syscalls.c @@ -35,7 +35,7 @@ * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 * $FreeBSD: src/sys/nfs/nfs_syscalls.c,v 1.58.2.1 2000/11/26 02:30:06 dillon Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_syscalls.c,v 1.27 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_syscalls.c,v 1.28 2006/12/23 00:41:29 swildner Exp $ */ #include @@ -352,7 +352,7 @@ nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td) if (siz < nfs_soreserve) siz = nfs_soreserve; if (siz > sb_max_adj) { - printf("Warning: vfs.nfs.soreserve (%d) " + kprintf("Warning: vfs.nfs.soreserve (%d) " "limited to adjusted sb_max (%ld)\n", nfs_soreserve, sb_max_adj); siz = sb_max_adj; @@ -565,7 +565,7 @@ nfssvc_nfsd(struct nfsd_srvargs *nsd, caddr_t argp, struct thread *td) nd->nd_procnum = NFSPROC_NOOP; nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK); cacherep = RC_DOIT; - printf("NFS request from unprivileged port (%s:%d)\n", + kprintf("NFS request from unprivileged port (%s:%d)\n", inet_ntoa(sin->sin_addr), port); } } @@ -613,7 +613,7 @@ nfssvc_nfsd(struct nfsd_srvargs *nsd, caddr_t argp, struct thread *td) m = m->m_next; } if (siz <= 0 || siz > NFS_MAXPACKET) { - printf("mbuf siz=%d\n",siz); + kprintf("mbuf siz=%d\n",siz); panic("Bad nfs svc reply"); } m = mreq; diff --git a/sys/vfs/nfs/nfs_vfsops.c b/sys/vfs/nfs/nfs_vfsops.c index 0d8741877f..aed47d10f4 100644 --- a/sys/vfs/nfs/nfs_vfsops.c +++ b/sys/vfs/nfs/nfs_vfsops.c @@ -35,7 +35,7 @@ * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 * $FreeBSD: src/sys/nfs/nfs_vfsops.c,v 1.91.2.7 2003/01/27 20:04:08 dillon Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_vfsops.c,v 1.48 2006/12/20 18:14:44 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_vfsops.c,v 1.49 2006/12/23 00:41:29 swildner Exp $ */ #include "opt_bootp.h" @@ -468,12 +468,12 @@ nfs_mountroot(struct mount *mp) nfs_convert_diskless(); #define SINP(sockaddr) ((struct sockaddr_in *)(sockaddr)) - printf("nfs_mountroot: interface %s ip %s", + kprintf("nfs_mountroot: interface %s ip %s", nd->myif.ifra_name, inet_ntoa(SINP(&nd->myif.ifra_addr)->sin_addr)); - printf(" bcast %s", + kprintf(" bcast %s", inet_ntoa(SINP(&nd->myif.ifra_broadaddr)->sin_addr)); - printf(" mask %s\n", + kprintf(" mask %s\n", inet_ntoa(SINP(&nd->myif.ifra_mask)->sin_addr)); #undef SINP @@ -512,14 +512,14 @@ nfs_mountroot(struct mount *mp) sin = mask; sin.sin_family = AF_INET; sin.sin_len = sizeof(sin); - printf("nfs_mountroot: gateway %s\n", + kprintf("nfs_mountroot: gateway %s\n", inet_ntoa(nd->mygateway.sin_addr)); error = rtrequest_global(RTM_ADD, (struct sockaddr *)&sin, (struct sockaddr *)&nd->mygateway, (struct sockaddr *)&mask, RTF_UP | RTF_GATEWAY); if (error) - printf("nfs_mountroot: unable to set gateway, error %d, continuing anyway\n", error); + kprintf("nfs_mountroot: unable to set gateway, error %d, continuing anyway\n", error); } /* @@ -531,7 +531,7 @@ nfs_mountroot(struct mount *mp) ksnprintf(buf, sizeof(buf), "%ld.%ld.%ld.%ld:%s", (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff,nd->root_hostnam); - printf("NFS ROOT: %s\n",buf); + kprintf("NFS ROOT: %s\n",buf); if ((error = nfs_mountdiskless(buf, "/", MNT_RDONLY, &nd->root_saddr, &nd->root_args, td, &vp, &mp)) != 0) { if (swap_mp) { @@ -558,7 +558,7 @@ nfs_mountroot(struct mount *mp) ksnprintf(buf, sizeof(buf), "%ld.%ld.%ld.%ld:%s", (l >> 24) & 0xff, (l >> 16) & 0xff, (l >> 8) & 0xff, (l >> 0) & 0xff,nd->swap_hostnam); - printf("NFS SWAP: %s\n",buf); + kprintf("NFS SWAP: %s\n",buf); if ((error = nfs_mountdiskless(buf, "/swap", 0, &nd->swap_saddr, &nd->swap_args, td, &vp, &swap_mp)) != 0) { crit_exit(); @@ -614,7 +614,7 @@ nfs_mountdiskless(char *path, char *which, int mountflag, if (mp == NULL) { if ((error = vfs_rootmountalloc("nfs", path, &mp)) != 0) { - printf("nfs_mountroot: NFS not configured"); + kprintf("nfs_mountroot: NFS not configured"); return (error); } didalloc = 1; @@ -625,14 +625,14 @@ nfs_mountdiskless(char *path, char *which, int mountflag, #if defined(BOOTP) || defined(NFS_ROOT) if (args->fhsize == 0) { - printf("NFS_ROOT: No FH passed from loader, attempting mount rpc..."); + kprintf("NFS_ROOT: No FH passed from loader, attempting mount rpc..."); args->fhsize = 0; error = md_mount(sin, which, args->fh, &args->fhsize, args, td); if (error) { - printf("failed.\n"); + kprintf("failed.\n"); goto haderror; } - printf("success!\n"); + kprintf("success!\n"); } #endif @@ -640,7 +640,7 @@ nfs_mountdiskless(char *path, char *which, int mountflag, #if defined(BOOTP) || defined(NFS_ROOT) haderror: #endif - printf("nfs_mountroot: mount %s on %s: %d", path, which, error); + kprintf("nfs_mountroot: mount %s on %s: %d", path, which, error); mp->mnt_vfc->vfc_refcount--; vfs_unbusy(mp); if (didalloc) @@ -780,7 +780,7 @@ nfs_decode_args(nmp, argp) nfs_safedisconnect(nmp); if (nmp->nm_sotype == SOCK_DGRAM) while (nfs_connect(nmp, (struct nfsreq *)0)) { - printf("nfs_args: retrying connect\n"); + kprintf("nfs_args: retrying connect\n"); (void) tsleep((caddr_t)&lbolt, 0, "nfscon", 0); } } diff --git a/sys/vfs/nfs/nfs_vnops.c b/sys/vfs/nfs/nfs_vnops.c index fc0ec9f25b..48d6268bf8 100644 --- a/sys/vfs/nfs/nfs_vnops.c +++ b/sys/vfs/nfs/nfs_vnops.c @@ -35,7 +35,7 @@ * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 * $FreeBSD: src/sys/nfs/nfs_vnops.c,v 1.150.2.5 2001/12/20 19:56:28 dillon Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_vnops.c,v 1.68 2006/12/20 18:14:44 dillon Exp $ + * $DragonFly: src/sys/vfs/nfs/nfs_vnops.c,v 1.69 2006/12/23 00:41:29 swildner Exp $ */ @@ -456,7 +456,7 @@ nfs_open(struct vop_open_args *ap) if (vp->v_type != VREG && vp->v_type != VDIR && vp->v_type != VLNK) { #ifdef DIAGNOSTIC - printf("open eacces vtyp=%d\n",vp->v_type); + kprintf("open eacces vtyp=%d\n",vp->v_type); #endif return (EOPNOTSUPP); } @@ -742,7 +742,7 @@ again: */ if (error == 0 && vap->va_size != VNOVAL && np->n_size != vap->va_size) { - printf("NFS ftruncate: server disagrees on the file size: %lld/%lld/%lld\n", tsize, vap->va_size, np->n_size); + kprintf("NFS ftruncate: server disagrees on the file size: %lld/%lld/%lld\n", tsize, vap->va_size, np->n_size); goto again; } if (error && vap->va_size != VNOVAL) { @@ -2341,7 +2341,7 @@ nfs_readdirrpc(struct vnode *vp, struct uio *uiop) * next block can be read. */ if (uiop->uio_resid > 0) - printf("EEK! readdirrpc resid > 0\n"); + kprintf("EEK! readdirrpc resid > 0\n"); cookiep = nfs_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; } @@ -2525,7 +2525,7 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop) dp->nfs_type = IFTODT(VTTOIF(np->n_vattr.va_type)); if (dnch.ncp) { - printf("NFS/READDIRPLUS, ENTER %*.*s\n", + kprintf("NFS/READDIRPLUS, ENTER %*.*s\n", nlc.nlc_namelen, nlc.nlc_namelen, nlc.nlc_nameptr); nch = cache_nlookup(&dnch, &nlc); @@ -2533,7 +2533,7 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop) cache_setvp(&nch, newvp); cache_put(&nch); } else { - printf("NFS/READDIRPLUS, UNABLE TO ENTER" + kprintf("NFS/READDIRPLUS, UNABLE TO ENTER" " %*.*s\n", nlc.nlc_namelen, nlc.nlc_namelen, nlc.nlc_nameptr); @@ -2585,7 +2585,7 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop) dnp->n_direofoffset = uiop->uio_offset; else { if (uiop->uio_resid > 0) - printf("EEK! readdirplusrpc resid > 0\n"); + kprintf("EEK! readdirplusrpc resid > 0\n"); cookiep = nfs_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; } @@ -3209,11 +3209,11 @@ nfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); - printf("tag VT_NFS, fileid %ld fsid 0x%x", + kprintf("tag VT_NFS, fileid %ld fsid 0x%x", np->n_vattr.va_fileid, np->n_vattr.va_fsid); if (vp->v_type == VFIFO) fifo_printinfo(vp); - printf("\n"); + kprintf("\n"); return (0); } diff --git a/sys/vfs/ntfs/ntfs.h b/sys/vfs/ntfs/ntfs.h index b31213cb78..8dda76ffdc 100644 --- a/sys/vfs/ntfs/ntfs.h +++ b/sys/vfs/ntfs/ntfs.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs.h,v 1.8.2.2 2001/10/12 22:08:49 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs.h,v 1.15 2006/09/10 01:26:41 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs.h,v 1.16 2006/12/23 00:41:30 swildner Exp $ */ /*#define NTFS_DEBUG 1*/ @@ -311,9 +311,9 @@ MALLOC_DECLARE(M_NTFSNTHASH); #define LOCKMGR(a, b) lockmgr((a), (b)) #if defined(NTFS_DEBUG) -#define dprintf(a) printf a +#define dprintf(a) kprintf a #if NTFS_DEBUG > 1 -#define ddprintf(a) printf a +#define ddprintf(a) kprintf a #else #define ddprintf(a) #endif diff --git a/sys/vfs/ntfs/ntfs_subr.c b/sys/vfs/ntfs/ntfs_subr.c index c3fe76401e..1d5b39dd06 100644 --- a/sys/vfs/ntfs/ntfs_subr.c +++ b/sys/vfs/ntfs/ntfs_subr.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_subr.c,v 1.7.2.4 2001/10/12 22:08:49 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_subr.c,v 1.24 2006/05/21 20:23:28 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_subr.c,v 1.25 2006/12/23 00:41:30 swildner Exp $ */ #include @@ -113,7 +113,7 @@ ntfs_findvattr(struct ntfsmount *ntmp, struct ntnode *ip, ip->i_number)); error = ntfs_loadntnode(ntmp,ip); if (error) { - printf("ntfs_findvattr: FAILED TO LOAD INO: %"PRId64"\n", + kprintf("ntfs_findvattr: FAILED TO LOAD INO: %"PRId64"\n", ip->i_number); return (error); } @@ -223,7 +223,7 @@ ntfs_ntvattrget(struct ntfsmount *ntmp, struct ntnode *ip, u_int32_t type, NTFS_A_DATA, NULL, LK_EXCLUSIVE, VG_EXT, curthread, &newvp); if (error) { - printf("ntfs_ntvattrget: CAN'T VGET INO: %d\n", + kprintf("ntfs_ntvattrget: CAN'T VGET INO: %d\n", aalp->al_inumber); goto out; } @@ -234,7 +234,7 @@ ntfs_ntvattrget(struct ntfsmount *ntmp, struct ntnode *ip, u_int32_t type, vput(newvp); if (error == 0) goto out; - printf("ntfs_ntvattrget: ATTRLIST ERROR.\n"); + kprintf("ntfs_ntvattrget: ATTRLIST ERROR.\n"); break; } error = ENOENT; @@ -277,7 +277,7 @@ ntfs_loadntnode(struct ntfsmount *ntmp, struct ntnode *ip) error = bread(ntmp->ntm_devvp, ntfs_bntodoff(bn), ntfs_bntob(ntmp->ntm_bpmftrec), &bp); if (error) { - printf("ntfs_loadntnode: BREAD FAILED\n"); + kprintf("ntfs_loadntnode: BREAD FAILED\n"); brelse(bp); goto out; } @@ -291,7 +291,7 @@ ntfs_loadntnode(struct ntfsmount *ntmp, struct ntnode *ip) ip->i_number * ntfs_bntob(ntmp->ntm_bpmftrec), ntfs_bntob(ntmp->ntm_bpmftrec), mfrp, NULL); if (error) { - printf("ntfs_loadntnode: ntfs_readattr failed\n"); + kprintf("ntfs_loadntnode: ntfs_readattr failed\n"); goto out; } } @@ -300,7 +300,7 @@ ntfs_loadntnode(struct ntfsmount *ntmp, struct ntnode *ip) error = ntfs_procfixups(ntmp, NTFS_FILEMAGIC, (caddr_t)mfrp, ntfs_bntob(ntmp->ntm_bpmftrec)); if (error) { - printf("ntfs_loadntnode: BAD MFT RECORD %"PRId64"\n", + kprintf("ntfs_loadntnode: BAD MFT RECORD %"PRId64"\n", ip->i_number); goto out; } @@ -323,7 +323,7 @@ ntfs_loadntnode(struct ntfsmount *ntmp, struct ntnode *ip) ap = (struct attr *) ((caddr_t)mfrp + off); } if (error) { - printf("ntfs_loadntnode: failed to load attr ino: %"PRId64"\n", + kprintf("ntfs_loadntnode: failed to load attr ino: %"PRId64"\n", ip->i_number); goto out; } @@ -1032,7 +1032,7 @@ ntfs_isnamepermitted(struct ntfsmount *ntmp, struct attr_indexentry *iep) case 0: case 1: case 3: return 1; default: - printf("ntfs_isnamepermitted: " \ + kprintf("ntfs_isnamepermitted: " \ "WARNING! Unknown file name type: %d\n", iep->ie_fnametype); break; @@ -1316,10 +1316,10 @@ ntfs_writeattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, off - ntfs_cntob(vap->va_vcnstart), towrite, data, &init, uio); if (error) { - printf("ntfs_writeattr_plain: " \ + kprintf("ntfs_writeattr_plain: " \ "ntfs_writentvattr_plain failed: o: %d, s: %d\n", (u_int32_t) off, (u_int32_t) towrite); - printf("ntfs_writeattr_plain: attrib: %d - %d\n", + kprintf("ntfs_writeattr_plain: attrib: %d - %d\n", (u_int32_t) vap->va_vcnstart, (u_int32_t) vap->va_vcnend); ntfs_ntvattrrele(vap); @@ -1356,7 +1356,7 @@ ntfs_writentvattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, *initp = 0; if ((vap->va_flag & NTFS_AF_INRUN) == 0) { - printf("ntfs_writevattr_plain: CAN'T WRITE RES. ATTRIBUTE\n"); + kprintf("ntfs_writevattr_plain: CAN'T WRITE RES. ATTRIBUTE\n"); return ENOTTY; } @@ -1433,7 +1433,7 @@ ntfs_writentvattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, } if (left) { - printf("ntfs_writentvattr_plain: POSSIBLE RUN ERROR\n"); + kprintf("ntfs_writentvattr_plain: POSSIBLE RUN ERROR\n"); error = EINVAL; } @@ -1552,7 +1552,7 @@ ntfs_readntvattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, cnt++; } if (left) { - printf("ntfs_readntvattr_plain: POSSIBLE RUN ERROR\n"); + kprintf("ntfs_readntvattr_plain: POSSIBLE RUN ERROR\n"); error = E2BIG; } } else { @@ -1597,10 +1597,10 @@ ntfs_readattr_plain(struct ntfsmount *ntmp, struct ntnode *ip, off - ntfs_cntob(vap->va_vcnstart), toread, data, &init, uio); if (error) { - printf("ntfs_readattr_plain: " \ + kprintf("ntfs_readattr_plain: " \ "ntfs_readntvattr_plain failed: o: %d, s: %d\n", (u_int32_t) off, (u_int32_t) toread); - printf("ntfs_readattr_plain: attrib: %d - %d\n", + kprintf("ntfs_readattr_plain: attrib: %d - %d\n", (u_int32_t) vap->va_vcnstart, (u_int32_t) vap->va_vcnend); ntfs_ntvattrrele(vap); @@ -1715,17 +1715,17 @@ ntfs_parserun(cn_t *cn, cn_t *cl, u_int8_t *run, u_long len, u_long *off) int i; if (NULL == run) { - printf("ntfs_parsetun: run == NULL\n"); + kprintf("ntfs_parsetun: run == NULL\n"); return (EINVAL); } sz = run[(*off)++]; if (0 == sz) { - printf("ntfs_parserun: trying to go out of run\n"); + kprintf("ntfs_parserun: trying to go out of run\n"); return (E2BIG); } *cl = 0; if ((sz & 0xF) > 8 || (*off) + (sz & 0xF) > len) { - printf("ntfs_parserun: " \ + kprintf("ntfs_parserun: " \ "bad run: length too big: sz: 0x%02x (%ld < %ld + sz)\n", sz, len, *off); return (EINVAL); @@ -1735,7 +1735,7 @@ ntfs_parserun(cn_t *cn, cn_t *cl, u_int8_t *run, u_long len, u_long *off) sz >>= 4; if ((sz & 0xF) > 8 || (*off) + (sz & 0xF) > len) { - printf("ntfs_parserun: " \ + kprintf("ntfs_parserun: " \ "bad run: length too big: sz: 0x%02x (%ld < %ld + sz)\n", sz, len, *off); return (EINVAL); @@ -1761,18 +1761,18 @@ ntfs_procfixups(struct ntfsmount *ntmp, u_int32_t magic, caddr_t buf, u_int16_t *cfxp; if (fhp->fh_magic != magic) { - printf("ntfs_procfixups: magic doesn't match: %08x != %08x\n", + kprintf("ntfs_procfixups: magic doesn't match: %08x != %08x\n", fhp->fh_magic, magic); return (EINVAL); } if ((fhp->fh_fnum - 1) * ntmp->ntm_bps != len) { - printf("ntfs_procfixups: " \ + kprintf("ntfs_procfixups: " \ "bad fixups number: %d for %ld bytes block\n", - fhp->fh_fnum, (long)len); /* XXX printf kludge */ + fhp->fh_fnum, (long)len); /* XXX kprintf kludge */ return (EINVAL); } if (fhp->fh_foff >= ntmp->ntm_spc * ntmp->ntm_mftrecsz * ntmp->ntm_bps) { - printf("ntfs_procfixups: invalid offset: %x", fhp->fh_foff); + kprintf("ntfs_procfixups: invalid offset: %x", fhp->fh_foff); return (EINVAL); } fxp = (u_int16_t *) (buf + fhp->fh_foff); @@ -1780,7 +1780,7 @@ ntfs_procfixups(struct ntfsmount *ntmp, u_int32_t magic, caddr_t buf, fixup = *fxp++; for (i = 1; i < fhp->fh_fnum; i++, fxp++) { if (*cfxp != fixup) { - printf("ntfs_procfixups: fixup %d doesn't match\n", i); + kprintf("ntfs_procfixups: fixup %d doesn't match\n", i); return (EINVAL); } *cfxp = *fxp; @@ -1801,27 +1801,27 @@ ntfs_runtocn(cn_t *cn, struct ntfsmount *ntmp, u_int8_t *run, u_long len, #if NTFS_DEBUG int i; - printf("ntfs_runtocn: run: 0x%p, %ld bytes, vcn:%ld\n", + kprintf("ntfs_runtocn: run: 0x%p, %ld bytes, vcn:%ld\n", run, len, (u_long) vcn); - printf("ntfs_runtocn: run: "); + kprintf("ntfs_runtocn: run: "); for (i = 0; i < len; i++) - printf("0x%02x ", run[i]); - printf("\n"); + kprintf("0x%02x ", run[i]); + kprintf("\n"); #endif if (NULL == run) { - printf("ntfs_runtocn: run == NULL\n"); + kprintf("ntfs_runtocn: run == NULL\n"); return (EINVAL); } do { if (run[off] == 0) { - printf("ntfs_runtocn: vcn too big\n"); + kprintf("ntfs_runtocn: vcn too big\n"); return (E2BIG); } vcn -= ccl; error = ntfs_parserun(&ccn, &ccl, run, len, &off); if (error) { - printf("ntfs_runtocn: ntfs_parserun failed\n"); + kprintf("ntfs_runtocn: ntfs_parserun failed\n"); return (error); } } while (ccl <= vcn); diff --git a/sys/vfs/ntfs/ntfs_vfsops.c b/sys/vfs/ntfs/ntfs_vfsops.c index b249144c5c..82f86180fa 100644 --- a/sys/vfs/ntfs/ntfs_vfsops.c +++ b/sys/vfs/ntfs/ntfs_vfsops.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_vfsops.c,v 1.20.2.5 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_vfsops.c,v 1.43 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_vfsops.c,v 1.44 2006/12/23 00:41:30 swildner Exp $ */ @@ -283,7 +283,7 @@ ntfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) goto success; } - printf("ntfs_mount(): MNT_UPDATE not supported\n"); + kprintf("ntfs_mount(): MNT_UPDATE not supported\n"); error = EINVAL; goto error_1; } @@ -629,7 +629,7 @@ ntfs_unmount(struct mount *mp, int mntflags) dprintf(("ntfs_unmount: vflushing...\n")); error = vflush(mp, 0, flags | SKIPSYSTEM); if (error) { - printf("ntfs_unmount: vflush failed: %d\n",error); + kprintf("ntfs_unmount: vflush failed: %d\n",error); return (error); } @@ -645,7 +645,7 @@ ntfs_unmount(struct mount *mp, int mntflags) /* vflush system vnodes */ error = vflush(mp, 0, flags); if (error) - printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error); + kprintf("ntfs_unmount: vflush failed(sysnodes): %d\n",error); /* Check if the type of device node isn't VBAD before * touching v_cdevinfo. If the device vnode is revoked, the @@ -683,7 +683,7 @@ ntfs_root(struct mount *mp, struct vnode **vpp) VFSTONTFS(mp)->ntm_sysvn[NTFS_ROOTINO])); error = VFS_VGET(mp, (ino_t)NTFS_ROOTINO, &nvp); if(error) { - printf("ntfs_root: VFS_VGET failed: %d\n",error); + kprintf("ntfs_root: VFS_VGET failed: %d\n",error); return (error); } @@ -696,7 +696,7 @@ static int ntfs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg, struct thread *td) { - printf("\nntfs_quotactl():\n"); + kprintf("\nntfs_quotactl():\n"); return EOPNOTSUPP; } #endif @@ -836,7 +836,7 @@ ntfs_vgetex(struct mount *mp, ino_t ino, u_int32_t attrtype, char *attrname, /* Get ntnode */ error = ntfs_ntlookup(ntmp, ino, &ip); if (error) { - printf("ntfs_vget: ntfs_ntget failed\n"); + kprintf("ntfs_vget: ntfs_ntget failed\n"); return (error); } @@ -844,7 +844,7 @@ ntfs_vgetex(struct mount *mp, ino_t ino, u_int32_t attrtype, char *attrname, if (!(flags & VG_DONTLOADIN) && !(ip->i_flag & IN_LOADED)) { error = ntfs_loadntnode(ntmp, ip); if(error) { - printf("ntfs_vget: CAN'T LOAD ATTRIBUTES FOR INO: %"PRId64"\n", + kprintf("ntfs_vget: CAN'T LOAD ATTRIBUTES FOR INO: %"PRId64"\n", ip->i_number); ntfs_ntput(ip); return (error); @@ -853,7 +853,7 @@ ntfs_vgetex(struct mount *mp, ino_t ino, u_int32_t attrtype, char *attrname, error = ntfs_fget(ntmp, ip, attrtype, attrname, &fp); if (error) { - printf("ntfs_vget: ntfs_fget failed\n"); + kprintf("ntfs_vget: ntfs_fget failed\n"); ntfs_ntput(ip); return (error); } diff --git a/sys/vfs/ntfs/ntfs_vnops.c b/sys/vfs/ntfs/ntfs_vnops.c index f5b15a9615..22fa8a8284 100644 --- a/sys/vfs/ntfs/ntfs_vnops.c +++ b/sys/vfs/ntfs/ntfs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_vnops.c,v 1.9.2.4 2002/08/06 19:35:18 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_vnops.c,v 1.37 2006/08/19 17:27:24 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_vnops.c,v 1.38 2006/12/23 00:41:30 swildner Exp $ * */ @@ -359,7 +359,7 @@ ntfs_strategy(struct vop_strategy_args *ap) toread, bp->b_data, NULL); if (error) { - printf("ntfs_strategy: ntfs_readattr failed\n"); + kprintf("ntfs_strategy: ntfs_readattr failed\n"); bp->b_error = error; bp->b_flags |= B_ERROR; } @@ -369,7 +369,7 @@ ntfs_strategy(struct vop_strategy_args *ap) break; case BUF_CMD_WRITE: if (bio->bio_offset + bp->b_bcount >= fp->f_size) { - printf("ntfs_strategy: CAN'T EXTEND FILE\n"); + kprintf("ntfs_strategy: CAN'T EXTEND FILE\n"); bp->b_error = error = EFBIG; bp->b_flags |= B_ERROR; } else { @@ -383,7 +383,7 @@ ntfs_strategy(struct vop_strategy_args *ap) bp->b_data, &tmp, NULL); if (error) { - printf("ntfs_strategy: ntfs_writeattr fail\n"); + kprintf("ntfs_strategy: ntfs_writeattr fail\n"); bp->b_error = error; bp->b_flags |= B_ERROR; } @@ -416,7 +416,7 @@ ntfs_write(struct vop_write_args *ap) dprintf(("ntfs_write: filesize: %d",(u_int32_t)fp->f_size)); if (uio->uio_resid + uio->uio_offset > fp->f_size) { - printf("ntfs_write: CAN'T WRITE BEYOND END OF FILE\n"); + kprintf("ntfs_write: CAN'T WRITE BEYOND END OF FILE\n"); return (EFBIG); } @@ -428,7 +428,7 @@ ntfs_write(struct vop_write_args *ap) fp->f_attrname, uio->uio_offset, towrite, NULL, &written, uio); #ifdef NTFS_DEBUG if (error) - printf("ntfs_write: ntfs_writeattr failed: %d\n", error); + kprintf("ntfs_write: ntfs_writeattr failed: %d\n", error); #endif return (error); @@ -543,7 +543,7 @@ ntfs_close(struct vop_close_args *ap) struct vnode *vp = ap->a_vp; struct ntnode *ip = VTONT(vp); - printf("ntfs_close: %d\n",ip->i_number); + kprintf("ntfs_close: %d\n",ip->i_number); #endif return (vop_stdclose(ap)); diff --git a/sys/vfs/nullfs/null.h b/sys/vfs/nullfs/null.h index b49afe5b14..df766fd601 100644 --- a/sys/vfs/nullfs/null.h +++ b/sys/vfs/nullfs/null.h @@ -36,7 +36,7 @@ * @(#)null.h 8.3 (Berkeley) 8/20/94 * * $FreeBSD: src/sys/miscfs/nullfs/null.h,v 1.11.2.3 2001/06/26 04:20:09 bp Exp $ - * $DragonFly: src/sys/vfs/nullfs/null.h,v 1.7 2006/01/04 03:09:53 dillon Exp $ + * $DragonFly: src/sys/vfs/nullfs/null.h,v 1.8 2006/12/23 00:41:30 swildner Exp $ */ struct null_args { @@ -52,7 +52,7 @@ struct null_mount { #define MOUNTTONULLMOUNT(mp) ((struct null_mount *)((mp)->mnt_data)) #ifdef NULLFS_DEBUG -#define NULLFSDEBUG(format, args...) printf(format ,## args) +#define NULLFSDEBUG(format, args...) kprintf(format ,## args) #else #define NULLFSDEBUG(format, args...) #endif /* NULLFS_DEBUG */ diff --git a/sys/vfs/nwfs/nwfs_io.c b/sys/vfs/nwfs/nwfs_io.c index 9f858d1bce..0bb8b3ef6f 100644 --- a/sys/vfs/nwfs/nwfs_io.c +++ b/sys/vfs/nwfs/nwfs_io.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/nwfs/nwfs_io.c,v 1.6.2.1 2000/10/25 02:11:10 bp Exp $ - * $DragonFly: src/sys/vfs/nwfs/nwfs_io.c,v 1.22 2006/09/03 18:29:17 dillon Exp $ + * $DragonFly: src/sys/vfs/nwfs/nwfs_io.c,v 1.23 2006/12/23 00:41:30 swildner Exp $ * */ #include @@ -170,7 +170,7 @@ nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) int error, biosize; if (vp->v_type != VREG && vp->v_type != VDIR) { - printf("%s: vn types other than VREG or VDIR are unsupported !\n",__func__); + kprintf("%s: vn types other than VREG or VDIR are unsupported !\n",__func__); return EIO; } if (uiop->uio_resid == 0) return 0; @@ -212,7 +212,7 @@ nwfs_writevnode(struct vnode *vp, struct uio *uiop, struct ucred *cred, int error = 0; if (vp->v_type != VREG) { - printf("%s: vn types other than VREG unsupported !\n",__func__); + kprintf("%s: vn types other than VREG unsupported !\n",__func__); return EIO; } NCPVNDEBUG("ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid); @@ -309,7 +309,7 @@ nwfs_doio(struct vnode *vp, struct bio *bio, struct ucred *cr, struct thread *td break; */ default: - printf("nwfs_doio: type %x unexpected\n",vp->v_type); + kprintf("nwfs_doio: type %x unexpected\n",vp->v_type); break; }; if (error) { @@ -408,7 +408,7 @@ nwfs_getpages(struct vop_getpages_args *ap) count = ap->a_count; if (vp->v_object == NULL) { - printf("nwfs_getpages: called with non-merged cache vnode??\n"); + kprintf("nwfs_getpages: called with non-merged cache vnode??\n"); return VM_PAGER_ERROR; } @@ -433,7 +433,7 @@ nwfs_getpages(struct vop_getpages_args *ap) relpbuf(bp, &nwfs_pbuf_freecnt); if (error && (uio.uio_resid == count)) { - printf("nwfs_getpages: error %d\n",error); + kprintf("nwfs_getpages: error %d\n",error); for (i = 0; i < npages; i++) { if (ap->a_reqpage != i) vnode_pager_freepage(pages[i]); diff --git a/sys/vfs/nwfs/nwfs_node.c b/sys/vfs/nwfs/nwfs_node.c index de986ccbdd..044a992747 100644 --- a/sys/vfs/nwfs/nwfs_node.c +++ b/sys/vfs/nwfs/nwfs_node.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/nwfs/nwfs_node.c,v 1.3.2.8 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/nwfs/nwfs_node.c,v 1.23 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/nwfs/nwfs_node.c,v 1.24 2006/12/23 00:41:30 swildner Exp $ */ #include #include @@ -95,13 +95,13 @@ nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) if (nwfs_debuglevel == 0) return 0; - printf("Name:uc:hc:fid:pfid\n"); + kprintf("Name:uc:hc:fid:pfid\n"); for(i = 0; i <= nwnodehash; i++) { nhpp = &nwhashtbl[i]; LIST_FOREACH(np, nhpp, n_hash) { vp = NWTOV(np); vprint(NULL, vp); - printf("%s:%d:%d:%d:%d\n",np->n_name,vp->v_usecount,vp->v_holdcnt, + kprintf("%s:%d:%d:%d:%d\n",np->n_name,vp->v_usecount,vp->v_holdcnt, np->n_fid.f_id, np->n_fid.f_parent); } } diff --git a/sys/vfs/nwfs/nwfs_subr.c b/sys/vfs/nwfs/nwfs_subr.c index 05a164adbc..b69e3e0f1a 100644 --- a/sys/vfs/nwfs/nwfs_subr.c +++ b/sys/vfs/nwfs/nwfs_subr.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/nwfs/nwfs_subr.c,v 1.2.2.2 2000/10/25 02:11:10 bp Exp $ - * $DragonFly: src/sys/vfs/nwfs/nwfs_subr.c,v 1.7 2005/02/17 14:00:10 joerg Exp $ + * $DragonFly: src/sys/vfs/nwfs/nwfs_subr.c,v 1.8 2006/12/23 00:41:30 swildner Exp $ */ #include #include @@ -194,7 +194,7 @@ ncp_lookup(struct vnode *dvp, int len, char *name, struct nw_entry_info *fap, } return error; } else if (len == 2 && name[0] == '.' && name[1] == '.') { - printf("%s: knows NOTHING about '..'\n", __func__); + kprintf("%s: knows NOTHING about '..'\n", __func__); return EIO; } else { error = ncp_obtain_info(nmp, dnp->n_fid.f_id, diff --git a/sys/vfs/nwfs/nwfs_vfsops.c b/sys/vfs/nwfs/nwfs_vfsops.c index bf6ccfed26..9c99caae2e 100644 --- a/sys/vfs/nwfs/nwfs_vfsops.c +++ b/sys/vfs/nwfs/nwfs_vfsops.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/nwfs/nwfs_vfsops.c,v 1.6.2.6 2001/10/25 19:18:54 dillon Exp $ - * $DragonFly: src/sys/vfs/nwfs/nwfs_vfsops.c,v 1.26 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/nwfs/nwfs_vfsops.c,v 1.27 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_ncp.h" #ifndef NCP @@ -363,7 +363,7 @@ nwfs_init(struct vfsconf *vfsp) name[1] = HW_NCPU; error = kernel_sysctl(name, 2, &ncpu, &olen, NULL, 0, &plen); if (error == 0 && ncpu > 1) - printf("warning: nwfs module compiled without SMP support."); + kprintf("warning: nwfs module compiled without SMP support."); #endif nwfs_hash_init(); nwfs_pbuf_freecnt = nswbuf / 2 + 1; diff --git a/sys/vfs/nwfs/nwfs_vnops.c b/sys/vfs/nwfs/nwfs_vnops.c index fdfb8ff328..feb3177c92 100644 --- a/sys/vfs/nwfs/nwfs_vnops.c +++ b/sys/vfs/nwfs/nwfs_vnops.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/nwfs/nwfs_vnops.c,v 1.6.2.3 2001/03/14 11:26:59 bp Exp $ - * $DragonFly: src/sys/vfs/nwfs/nwfs_vnops.c,v 1.33 2006/08/19 17:27:24 dillon Exp $ + * $DragonFly: src/sys/vfs/nwfs/nwfs_vnops.c,v 1.34 2006/12/23 00:41:30 swildner Exp $ */ #include #include @@ -674,7 +674,7 @@ nwfs_readdir(struct vop_readdir_args *ap) if (vp->v_type != VDIR) return (EPERM); if (ap->a_ncookies) { - printf("nwfs_readdir: no support for cookies now..."); + kprintf("nwfs_readdir: no support for cookies now..."); return (EOPNOTSUPP); } if ((error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY)) != 0) @@ -706,7 +706,7 @@ nwfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct nwnode *np = VTONW(vp); - printf("nwfs node: name = '%s', fid = %d, pfid = %d\n", + kprintf("nwfs node: name = '%s', fid = %d, pfid = %d\n", np->n_name, np->n_fid.f_id, np->n_fid.f_parent); return (0); } @@ -808,7 +808,7 @@ nwfs_nget(struct mount *mp, ncpfid fid, const struct nw_entry_info *fap, } } else { if ((newnp->n_flag & NNEW) && vp->v_type == VREG) - printf("new vnode '%s' borned without parent ?\n",newnp->n_name); + kprintf("new vnode '%s' borned without parent ?\n",newnp->n_name); } newnp->n_flag &= ~NNEW; *vpp = vp; @@ -846,7 +846,7 @@ nwfs_lookup(struct vop_old_lookup_args *ap) if (dvp->v_type != VDIR) return (ENOTDIR); if ((flags & CNP_ISDOTDOT) && (dvp->v_flag & VROOT)) { - printf("nwfs_lookup: invalid '..'\n"); + kprintf("nwfs_lookup: invalid '..'\n"); return EIO; } @@ -862,7 +862,7 @@ nwfs_lookup(struct vop_old_lookup_args *ap) nmp = VFSTONWFS(mp); dnp = VTONW(dvp); /* -printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_flag & VROOT, (int)flags & CNP_ISDOTDOT); +kprintf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_flag & VROOT, (int)flags & CNP_ISDOTDOT); */ error = ncp_pathcheck(cnp->cn_nameptr, cnp->cn_namelen, &nmp->m.nls, (nameiop == NAMEI_CREATE || nameiop == NAMEI_RENAME) && (nmp->m.nls.opt & NWHP_NOSTRICT) == 0); diff --git a/sys/vfs/portal/portal_vnops.c b/sys/vfs/portal/portal_vnops.c index 75782114c7..91d570f43f 100644 --- a/sys/vfs/portal/portal_vnops.c +++ b/sys/vfs/portal/portal_vnops.c @@ -36,7 +36,7 @@ * @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95 * * $FreeBSD: src/sys/miscfs/portal/portal_vnops.c,v 1.38 1999/12/21 06:29:00 chris Exp $ - * $DragonFly: src/sys/vfs/portal/portal_vnops.c,v 1.32 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/portal/portal_vnops.c,v 1.33 2006/12/23 00:41:30 swildner Exp $ */ /* @@ -94,7 +94,7 @@ portal_closefd(struct thread *td, int fd) * we could do if we got one, so just print a message. */ if (error) - printf("portal_closefd: error = %d\n", error); + kprintf("portal_closefd: error = %d\n", error); } /* @@ -388,7 +388,7 @@ portal_open(struct vop_open_args *ap) * Close extra fds. */ int i; - printf("portal_open: %d extra fds\n", newfds - 1); + kprintf("portal_open: %d extra fds\n", newfds - 1); for (i = 1; i < newfds; i++) { portal_closefd(td, *ip); ip++; @@ -551,7 +551,7 @@ portal_reclaim(struct vop_reclaim_args *ap) static int portal_print(struct vop_print_args *ap) { - printf("tag VT_PORTAL, portal vnode\n"); + kprintf("tag VT_PORTAL, portal vnode\n"); return (0); } diff --git a/sys/vfs/procfs/procfs_vfsops.c b/sys/vfs/procfs/procfs_vfsops.c index bd148e620f..3ed89ce792 100644 --- a/sys/vfs/procfs/procfs_vfsops.c +++ b/sys/vfs/procfs/procfs_vfsops.c @@ -37,7 +37,7 @@ * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95 * * $FreeBSD: src/sys/miscfs/procfs/procfs_vfsops.c,v 1.32.2.1 2001/10/15 20:42:01 des Exp $ - * $DragonFly: src/sys/vfs/procfs/procfs_vfsops.c,v 1.15 2006/07/18 22:22:16 dillon Exp $ + * $DragonFly: src/sys/vfs/procfs/procfs_vfsops.c,v 1.16 2006/12/23 00:41:30 swildner Exp $ */ /* @@ -76,7 +76,7 @@ procfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) return (EOPNOTSUPP); if (mp->mnt_vfc->vfc_refcount == 1 && (error = at_exit(procfs_exit))) { - printf("procfs: cannot register procfs_exit with at_exit\n"); + kprintf("procfs: cannot register procfs_exit with at_exit\n"); return(error); } diff --git a/sys/vfs/procfs/procfs_vnops.c b/sys/vfs/procfs/procfs_vnops.c index 95f1343d81..a912ad239b 100644 --- a/sys/vfs/procfs/procfs_vnops.c +++ b/sys/vfs/procfs/procfs_vnops.c @@ -37,7 +37,7 @@ * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * * $FreeBSD: src/sys/miscfs/procfs/procfs_vnops.c,v 1.76.2.7 2002/01/22 17:22:59 nectar Exp $ - * $DragonFly: src/sys/vfs/procfs/procfs_vnops.c,v 1.40 2006/12/20 18:14:44 dillon Exp $ + * $DragonFly: src/sys/vfs/procfs/procfs_vnops.c,v 1.41 2006/12/23 00:41:30 swildner Exp $ */ /* @@ -417,7 +417,7 @@ procfs_print(struct vop_print_args *ap) { struct pfsnode *pfs = VTOPFS(ap->a_vp); - printf("tag VT_PROCFS, type %d, pid %ld, mode %x, flags %lx\n", + kprintf("tag VT_PROCFS, type %d, pid %ld, mode %x, flags %lx\n", pfs->pfs_type, (long)pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags); return (0); } @@ -1047,7 +1047,7 @@ procfs_readlink(struct vop_readlink_args *ap) case Pfile: procp = PFIND(pfs->pfs_pid); if (procp == NULL || procp->p_ucred == NULL) { - printf("procfs_readlink: pid %d disappeared\n", + kprintf("procfs_readlink: pid %d disappeared\n", pfs->pfs_pid); return (uiomove("unknown", sizeof("unknown") - 1, ap->a_uio)); diff --git a/sys/vfs/smbfs/smbfs_io.c b/sys/vfs/smbfs/smbfs_io.c index efe210484d..c8074c0e52 100644 --- a/sys/vfs/smbfs/smbfs_io.c +++ b/sys/vfs/smbfs/smbfs_io.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/smbfs/smbfs_io.c,v 1.3.2.3 2003/01/17 08:20:26 tjr Exp $ - * $DragonFly: src/sys/vfs/smbfs/smbfs_io.c,v 1.26 2006/09/03 18:29:17 dillon Exp $ + * $DragonFly: src/sys/vfs/smbfs/smbfs_io.c,v 1.27 2006/12/23 00:41:30 swildner Exp $ * */ #include @@ -334,7 +334,7 @@ smbfs_doio(struct vnode *vp, struct bio *bio, struct ucred *cr, struct thread *t } break; default: - printf("smbfs_doio: type %x unexpected\n",vp->v_type); + kprintf("smbfs_doio: type %x unexpected\n",vp->v_type); break; }; if (error) { @@ -434,7 +434,7 @@ smbfs_getpages(struct vop_getpages_args *ap) count = ap->a_count; if (vp->v_object == NULL) { - printf("smbfs_getpages: called with non-merged cache vnode??\n"); + kprintf("smbfs_getpages: called with non-merged cache vnode??\n"); return VM_PAGER_ERROR; } smb_makescred(&scred, td, cred); @@ -476,7 +476,7 @@ smbfs_getpages(struct vop_getpages_args *ap) relpbuf(bp, &smbfs_pbuf_freecnt); if (error && (uio.uio_resid == count)) { - printf("smbfs_getpages: error %d\n",error); + kprintf("smbfs_getpages: error %d\n",error); for (i = 0; i < npages; i++) { if (ap->a_reqpage != i) vnode_pager_freepage(pages[i]); diff --git a/sys/vfs/smbfs/smbfs_node.c b/sys/vfs/smbfs/smbfs_node.c index 5c7b129df5..c8039b8545 100644 --- a/sys/vfs/smbfs/smbfs_node.c +++ b/sys/vfs/smbfs/smbfs_node.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/smbfs/smbfs_node.c,v 1.2.2.3 2003/01/17 08:20:26 tjr Exp $ - * $DragonFly: src/sys/vfs/smbfs/smbfs_node.c,v 1.21 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/smbfs/smbfs_node.c,v 1.22 2006/12/23 00:41:30 swildner Exp $ */ #include #include @@ -136,19 +136,19 @@ smbfs_name_free(u_char *name) cp = name; cp--; if (*cp != 0xfc) { - printf("First byte of name entry '%s' corrupted\n", name); + kprintf("First byte of name entry '%s' corrupted\n", name); Debugger("ditto"); } cp -= sizeof(int); nmlen = *(int*)cp; slen = strlen(name) + 1; if (nmlen != slen) { - printf("Name length mismatch: was %d, now %d name '%s'\n", + kprintf("Name length mismatch: was %d, now %d name '%s'\n", nmlen, slen, name); Debugger("ditto"); } if (name[nmlen] != 0xfe) { - printf("Last byte of name entry '%s' corrupted\n", name); + kprintf("Last byte of name entry '%s' corrupted\n", name); Debugger("ditto"); } kfree(cp, M_SMBNODENAME); diff --git a/sys/vfs/smbfs/smbfs_smb.c b/sys/vfs/smbfs/smbfs_smb.c index 23fa0a2ebb..3e3e33d031 100644 --- a/sys/vfs/smbfs/smbfs_smb.c +++ b/sys/vfs/smbfs/smbfs_smb.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/smbfs/smbfs_smb.c,v 1.1.2.2 2003/01/17 08:20:26 tjr Exp $ - * $DragonFly: src/sys/vfs/smbfs/smbfs_smb.c,v 1.8 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/smbfs/smbfs_smb.c,v 1.9 2006/12/23 00:41:30 swildner Exp $ */ #include #include @@ -997,11 +997,11 @@ smbfs_smb_trans2find2(struct smbfs_fctx *ctx) ctx->f_rnameofs = tw; mdp = &t2p->t2_rdata; if (mdp->md_top == NULL) { - printf("bug: ecnt = %d, but data is NULL (please report)\n", ctx->f_ecnt); + kprintf("bug: ecnt = %d, but data is NULL (please report)\n", ctx->f_ecnt); return ENOENT; } if (mdp->md_top->m_len == 0) { - printf("bug: ecnt = %d, but m_len = 0 and m_next = %p (please report)\n", ctx->f_ecnt,mbp->mb_top->m_next); + kprintf("bug: ecnt = %d, but m_len = 0 and m_next = %p (please report)\n", ctx->f_ecnt,mbp->mb_top->m_next); return ENOENT; } ctx->f_eofs = 0; @@ -1256,7 +1256,7 @@ smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen, } else if (nmlen == 2 && name[0] == '.' && name[1] == '.') { error = smbfs_smb_lookup(VTOSMB(dnp->n_parent), NULL, 0, fap, scred); - printf("%s: knows NOTHING about '..'\n", __func__); + kprintf("%s: knows NOTHING about '..'\n", __func__); return error; } error = smbfs_findopen(dnp, name, nmlen, diff --git a/sys/vfs/smbfs/smbfs_subr.h b/sys/vfs/smbfs/smbfs_subr.h index 816f5dcd77..0e4f66e0e4 100644 --- a/sys/vfs/smbfs/smbfs_subr.h +++ b/sys/vfs/smbfs/smbfs_subr.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/smbfs/smbfs_subr.h,v 1.1.2.1 2001/05/22 08:32:28 bp Exp $ - * $DragonFly: src/sys/vfs/smbfs/smbfs_subr.h,v 1.3 2005/02/17 14:00:10 joerg Exp $ + * $DragonFly: src/sys/vfs/smbfs/smbfs_subr.h,v 1.4 2006/12/23 00:41:30 swildner Exp $ */ #ifndef _FS_SMBFS_SMBFS_SUBR_H_ #define _FS_SMBFS_SMBFS_SUBR_H_ @@ -39,10 +39,10 @@ MALLOC_DECLARE(M_SMBFSDATA); #endif -#define SMBFSERR(format, args...) printf("%s: "format, __func__ ,## args) +#define SMBFSERR(format, args...) kprintf("%s: "format, __func__ ,## args) #ifdef SMB_VNODE_DEBUG -#define SMBVDEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define SMBVDEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define SMBVDEBUG(format, args...) #endif diff --git a/sys/vfs/smbfs/smbfs_vfsops.c b/sys/vfs/smbfs/smbfs_vfsops.c index 9f881fdefd..70a238d821 100644 --- a/sys/vfs/smbfs/smbfs_vfsops.c +++ b/sys/vfs/smbfs/smbfs_vfsops.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/smbfs/smbfs_vfsops.c,v 1.2.2.5 2003/01/17 08:20:26 tjr Exp $ - * $DragonFly: src/sys/vfs/smbfs/smbfs_vfsops.c,v 1.31 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/smbfs/smbfs_vfsops.c,v 1.32 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_netsmb.h" #ifndef NETSMB @@ -129,25 +129,25 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) char *pc, *pe; if (data == NULL) { - printf("missing data argument\n"); + kprintf("missing data argument\n"); return EINVAL; } if (mp->mnt_flag & MNT_UPDATE) { - printf("MNT_UPDATE not implemented"); + kprintf("MNT_UPDATE not implemented"); return EOPNOTSUPP; } error = copyin(data, (caddr_t)&args, sizeof(struct smbfs_args)); if (error) return error; if (args.version != SMBFS_VERSION) { - printf("mount version mismatch: kernel=%d, mount=%d\n", + kprintf("mount version mismatch: kernel=%d, mount=%d\n", SMBFS_VERSION, args.version); return EINVAL; } smb_makescred(&scred, curthread, cred); error = smb_dev2share(args.dev, SMBM_EXEC, &scred, &ssp); if (error) { - printf("invalid device handle %d (%d)\n", args.dev, error); + kprintf("invalid device handle %d (%d)\n", args.dev, error); return error; } vcp = SSTOVC(ssp); @@ -160,7 +160,7 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) MALLOC(smp, struct smbmount*, sizeof(*smp), M_SMBFSDATA, M_WAITOK|M_USE_RESERVE); #endif if (smp == NULL) { - printf("could not alloc smbmount\n"); + kprintf("could not alloc smbmount\n"); error = ENOMEM; goto bad; } diff --git a/sys/vfs/smbfs/smbfs_vnops.c b/sys/vfs/smbfs/smbfs_vnops.c index a58ad26894..5a163b71f6 100644 --- a/sys/vfs/smbfs/smbfs_vnops.c +++ b/sys/vfs/smbfs/smbfs_vnops.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/smbfs/smbfs_vnops.c,v 1.2.2.8 2003/04/04 08:57:23 tjr Exp $ - * $DragonFly: src/sys/vfs/smbfs/smbfs_vnops.c,v 1.35 2006/08/19 17:27:24 dillon Exp $ + * $DragonFly: src/sys/vfs/smbfs/smbfs_vnops.c,v 1.36 2006/12/23 00:41:30 swildner Exp $ */ #include #include @@ -722,7 +722,7 @@ smbfs_readdir(struct vop_readdir_args *ap) return (EPERM); #ifdef notnow if (ap->a_ncookies) { - printf("smbfs_readdir: no support for cookies now..."); + kprintf("smbfs_readdir: no support for cookies now..."); return (EOPNOTSUPP); } #endif @@ -755,14 +755,14 @@ smbfs_print(struct vop_print_args *ap) struct smbnode *np = VTOSMB(vp); if (np == NULL) { - printf("no smbnode data\n"); + kprintf("no smbnode data\n"); return (0); } - printf("tag VT_SMBFS, name = %s, parent = %p, opencount = %d", + kprintf("tag VT_SMBFS, name = %s, parent = %p, opencount = %d", np->n_name, np->n_parent ? np->n_parent : NULL, np->n_opencount); lockmgr_printinfo(&vp->v_lock); - printf("\n"); + kprintf("\n"); return (0); } diff --git a/sys/vfs/specfs/spec_vnops.c b/sys/vfs/specfs/spec_vnops.c index 878fd73d02..ab38caa3b4 100644 --- a/sys/vfs/specfs/spec_vnops.c +++ b/sys/vfs/specfs/spec_vnops.c @@ -32,7 +32,7 @@ * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 * $FreeBSD: src/sys/miscfs/specfs/spec_vnops.c,v 1.131.2.4 2001/02/26 04:23:20 jlemon Exp $ - * $DragonFly: src/sys/vfs/specfs/spec_vnops.c,v 1.49 2006/09/10 01:26:41 dillon Exp $ + * $DragonFly: src/sys/vfs/specfs/spec_vnops.c,v 1.50 2006/12/23 00:41:30 swildner Exp $ */ #include @@ -160,17 +160,17 @@ spec_open(struct vop_open_args *ap) dev = udev2dev(vp->v_udev, isblk); if (dev != vp->v_rdev) { int oc = vp->v_opencount; - printf( + kprintf( "Warning: spec_open: dev %s was lost", vp->v_rdev->si_name); v_release_rdev(vp); error = v_associate_rdev(vp, udev2dev(vp->v_udev, isblk)); if (error) { - printf(", reacquisition failed\n"); + kprintf(", reacquisition failed\n"); } else { vp->v_opencount = oc; - printf(", reacquisition successful\n"); + kprintf(", reacquisition successful\n"); } } else { error = 0; @@ -251,7 +251,7 @@ spec_open(struct vop_open_args *ap) struct tty *tp; tp = dev->si_tty; if (!tp->t_stop) { - printf("Warning:%s: no t_stop, using nottystop\n", devtoname(dev)); + kprintf("Warning:%s: no t_stop, using nottystop\n", devtoname(dev)); tp->t_stop = nottystop; } } @@ -269,7 +269,7 @@ spec_open(struct vop_open_args *ap) if ((dev_dflags(dev) & D_DISK) == 0) { cp = devtoname(dev); if (*cp == '#') { - printf("WARNING: driver %s should register devices with make_dev() (cdev_t = \"%s\")\n", + kprintf("WARNING: driver %s should register devices with make_dev() (cdev_t = \"%s\")\n", dev_dname(dev), cp); } } @@ -284,7 +284,7 @@ spec_open(struct vop_open_args *ap) vn_setspecops(ap->a_fp); if (dev_ref_debug) - printf("spec_open: %s %d\n", dev->si_name, vp->v_opencount); + kprintf("spec_open: %s %d\n", dev->si_name, vp->v_opencount); done: if (error) { if (vp->v_opencount == 0) @@ -599,7 +599,7 @@ spec_close(struct vop_close_args *ap) if (dev) { /*KKASSERT(vp->v_opencount > 0);*/ if (dev_ref_debug) { - printf("spec_close: %s %d\n", + kprintf("spec_close: %s %d\n", dev->si_name, vp->v_opencount - 1); } if (vp->v_opencount == 1) @@ -618,7 +618,7 @@ spec_close(struct vop_close_args *ap) static int spec_print(struct vop_print_args *ap) { - printf("tag VT_NON, dev %s\n", devtoname(ap->a_vp->v_rdev)); + kprintf("tag VT_NON, dev %s\n", devtoname(ap->a_vp->v_rdev)); return (0); } @@ -785,13 +785,13 @@ spec_getpages(struct vop_getpages_args *ap) } if (!gotreqpage) { m = ap->a_m[ap->a_reqpage]; - printf( + kprintf( "spec_getpages:(%s) I/O read failure: (error=%d) bp %p vp %p\n", devtoname(vp->v_rdev), error, bp, bp->b_vp); - printf( + kprintf( " size: %d, resid: %d, a_count: %d, valid: 0x%x\n", size, bp->b_resid, ap->a_count, m->valid); - printf( + kprintf( " nread: %d, reqpage: %d, pindex: %lu, pcount: %d\n", nread, ap->a_reqpage, (u_long)m->pindex, pcount); /* diff --git a/sys/vfs/udf/osta.c b/sys/vfs/udf/osta.c index b01a2396a9..b8b1852b7f 100644 --- a/sys/vfs/udf/osta.c +++ b/sys/vfs/udf/osta.c @@ -4,7 +4,7 @@ * formatting purposes. Typos/bugs have been fixed. * * $FreeBSD: src/sys/fs/udf/osta.c,v 1.3 2003/11/05 06:55:23 scottl Exp $ - * $DragonFly: src/sys/vfs/udf/osta.c,v 1.2 2004/05/09 22:15:00 cpressey Exp $ + * $DragonFly: src/sys/vfs/udf/osta.c,v 1.3 2006/12/23 00:41:30 swildner Exp $ */ #include @@ -245,7 +245,7 @@ main(void) unsigned short x; x = cksum(bytes, sizeof bytes); - printf("checksum: calculated=%4.4x, correct=%4.4x\en", x, 0x3299); + kprintf("checksum: calculated=%4.4x, correct=%4.4x\en", x, 0x3299); exit(0); } #endif diff --git a/sys/vfs/udf/udf_vfsops.c b/sys/vfs/udf/udf_vfsops.c index aac1526153..cca4a81954 100644 --- a/sys/vfs/udf/udf_vfsops.c +++ b/sys/vfs/udf/udf_vfsops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/udf/udf_vfsops.c,v 1.16 2003/11/05 06:56:08 scottl Exp $ - * $DragonFly: src/sys/vfs/udf/udf_vfsops.c,v 1.24 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/udf/udf_vfsops.c,v 1.25 2006/12/23 00:41:30 swildner Exp $ */ /* udf_vfsops.c */ @@ -295,7 +295,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) for (sector = mvds_start; sector < mvds_end; sector++) { if ((error = bread(devvp, (off_t)sector * bsize, bsize, &bp)) != 0) { - printf("Can't read sector %d of VDS\n", sector); + kprintf("Can't read sector %d of VDS\n", sector); goto bail; } lvd = (struct logvol_desc *)bp->b_data; @@ -329,7 +329,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) } if (fsd_part != part_num) { - printf("FSD does not lie within the partition!\n"); + kprintf("FSD does not lie within the partition!\n"); error = EINVAL; goto bail; } @@ -342,7 +342,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) */ sector = udfmp->part_start + fsd_offset; if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) { - printf("Cannot read sector %d of FSD\n", sector); + kprintf("Cannot read sector %d of FSD\n", sector); goto bail; } fsd = (struct fileset_desc *)bp->b_data; @@ -356,7 +356,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) bp = NULL; if (!fsd_found) { - printf("Couldn't find the fsd\n"); + kprintf("Couldn't find the fsd\n"); error = EINVAL; goto bail; } @@ -369,13 +369,13 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) sector = udfmp->root_icb.loc.lb_num + udfmp->part_start; size = udfmp->root_icb.len; if ((error = udf_readlblks(udfmp, sector, size, &bp)) != 0) { - printf("Cannot read sector %d\n", sector); + kprintf("Cannot read sector %d\n", sector); goto bail; } root_fentry = (struct file_entry *)bp->b_data; if ((error = udf_checktag(&root_fentry->tag, TAGID_FENTRY))) { - printf("Invalid root file entry!\n"); + kprintf("Invalid root file entry!\n"); goto bail; } @@ -506,14 +506,14 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) sector = ino + udfmp->part_start; devvp = udfmp->im_devvp; if ((error = RDSECTOR(devvp, sector, udfmp->bsize, &bp)) != 0) { - printf("Cannot read sector %d\n", sector); + kprintf("Cannot read sector %d\n", sector); kfree(unode, M_UDFNODE); return(error); } fe = (struct file_entry *)bp->b_data; if (udf_checktag(&fe->tag, TAGID_FENTRY)) { - printf("Invalid file entry!\n"); + kprintf("Invalid file entry!\n"); kfree(unode, M_UDFNODE); brelse(bp); return(ENOMEM); @@ -527,7 +527,7 @@ udf_vget(struct mount *mp, ino_t ino, struct vnode **vpp) bp = NULL; if ((error = udf_allocv(mp, &vp))) { - printf("Error from udf_allocv\n"); + kprintf("Error from udf_allocv\n"); kfree(unode, M_UDFNODE); return(error); } @@ -631,7 +631,7 @@ udf_find_partmaps(struct udf_mnt *udfmp, struct logvol_desc *lvd) psize = pmap->data[1]; if (((ptype != 1) && (ptype != 2)) || ((psize != UDF_PMAP_SIZE) && (psize != 6))) { - printf("Invalid partition map found\n"); + kprintf("Invalid partition map found\n"); return(1); } @@ -647,7 +647,7 @@ udf_find_partmaps(struct udf_mnt *udfmp, struct logvol_desc *lvd) if (bcmp(®id_id[0], "*UDF Sparable Partition", UDF_REGID_ID_SIZE)) { - printf("Unsupported partition map: %s\n", ®id_id[0]); + kprintf("Unsupported partition map: %s\n", ®id_id[0]); return(1); } @@ -669,7 +669,7 @@ udf_find_partmaps(struct udf_mnt *udfmp, struct logvol_desc *lvd) &bp)) != 0) { if (bp) brelse(bp); - printf("Failed to read Sparing Table at sector %d\n", + kprintf("Failed to read Sparing Table at sector %d\n", pms->st_loc[0]); return(error); } @@ -677,7 +677,7 @@ udf_find_partmaps(struct udf_mnt *udfmp, struct logvol_desc *lvd) brelse(bp); if (udf_checktag(&udfmp->s_table->tag, 0)) { - printf("Invalid sparing table found\n"); + kprintf("Invalid sparing table found\n"); return(EINVAL); } diff --git a/sys/vfs/udf/udf_vnops.c b/sys/vfs/udf/udf_vnops.c index 762935fb2b..88285a2856 100644 --- a/sys/vfs/udf/udf_vnops.c +++ b/sys/vfs/udf/udf_vnops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/udf/udf_vnops.c,v 1.33 2003/12/07 05:04:49 scottl Exp $ - * $DragonFly: src/sys/vfs/udf/udf_vnops.c,v 1.28 2006/09/30 16:32:38 swildner Exp $ + * $DragonFly: src/sys/vfs/udf/udf_vnops.c,v 1.29 2006/12/23 00:41:30 swildner Exp $ */ /* udf_vnops.c */ @@ -178,7 +178,7 @@ udf_allocv(struct mount *mp, struct vnode **vpp) error = getnewvnode(VT_UDF, mp, &vp, 0, 0); if (error) { - printf("udf_allocv: failed to allocate new vnode\n"); + kprintf("udf_allocv: failed to allocate new vnode\n"); return(error); } @@ -407,7 +407,7 @@ udf_getattr(struct vop_getattr_args *a) static int udf_ioctl(struct vop_ioctl_args *a) { - printf("%s called\n", __func__); + kprintf("%s called\n", __func__); return(ENOTTY); } @@ -485,7 +485,7 @@ udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) transname = kmalloc(NAME_MAX * sizeof(unicode_t), M_TEMP, M_WAITOK | M_ZERO); if ((unilen = udf_UncompressUnicode(len, cs0string, transname)) == -1) { - printf("udf: Unicode translation failed\n"); + kprintf("udf: Unicode translation failed\n"); kfree(transname, M_TEMP); return(0); } @@ -600,7 +600,7 @@ udf_getfid(struct udf_dirstream *ds) /* Copy what we have of the fid into a buffer */ frag_size = ds->size - ds->off; if (frag_size >= ds->udfmp->bsize) { - printf("udf: invalid FID fragment\n"); + kprintf("udf: invalid FID fragment\n"); ds->error = EINVAL; return(NULL); } @@ -643,7 +643,7 @@ udf_getfid(struct udf_dirstream *ds) */ total_fid_size = UDF_FID_SIZE + fid->l_iu + fid->l_fi; if (total_fid_size > ds->udfmp->bsize) { - printf("udf: invalid FID\n"); + kprintf("udf: invalid FID\n"); ds->error = EIO; return(NULL); } @@ -734,7 +734,7 @@ udf_readdir(struct vop_readdir_args *a) /* XXX Should we return an error on a bad fid? */ if (udf_checktag(&fid->tag, TAGID_FID)) { - printf("Invalid FID tag\n"); + kprintf("Invalid FID tag\n"); error = EIO; break; } @@ -804,7 +804,7 @@ udf_readdir(struct vop_readdir_args *a) } } if (error) { - printf("uiomove returned %d\n", error); + kprintf("uiomove returned %d\n", error); break; } @@ -838,7 +838,7 @@ udf_readdir(struct vop_readdir_args *a) static int udf_readlink(struct vop_readlink_args *ap) { - printf("%s called\n", __func__); + kprintf("%s called\n", __func__); return(EOPNOTSUPP); } @@ -971,7 +971,7 @@ lookloop: while ((fid = udf_getfid(ds)) != NULL) { /* XXX Should we return an error on a bad fid? */ if (udf_checktag(&fid->tag, TAGID_FID)) { - printf("udf_lookup: Invalid tag\n"); + kprintf("udf_lookup: Invalid tag\n"); error = EIO; break; } @@ -1111,7 +1111,7 @@ udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp, *size = min(*size, MAXBSIZE); if ((error = udf_readlblks(udfmp, sector, *size, bp))) { - printf("warning: udf_readlblks returned error %d\n", error); + kprintf("warning: udf_readlblks returned error %d\n", error); /* note: *bp may be non-NULL */ return(error); } @@ -1146,11 +1146,11 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3 break; case 4096: - printf("Cannot deal with strategy4096 yet!\n"); + kprintf("Cannot deal with strategy4096 yet!\n"); return(ENODEV); default: - printf("Unknown strategy type %d\n", tag->strat_type); + kprintf("Unknown strategy type %d\n", tag->strat_type); return(ENODEV); } @@ -1165,7 +1165,7 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3 offset -= icblen; ad_offset = sizeof(struct short_ad) * ad_num; if (ad_offset > fentry->l_ad) { - printf("File offset out of bounds\n"); + kprintf("File offset out of bounds\n"); return(EINVAL); } icb = GETICB(long_ad, fentry, fentry->l_ea + ad_offset); @@ -1189,7 +1189,7 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3 offset -= icblen; ad_offset = sizeof(struct long_ad) * ad_num; if (ad_offset > fentry->l_ad) { - printf("File offset out of bounds\n"); + kprintf("File offset out of bounds\n"); return(EINVAL); } icb = GETICB(long_ad, fentry, fentry->l_ea + ad_offset); @@ -1215,7 +1215,7 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3 case 2: /* DirectCD does not use extended_ad's */ default: - printf("Unsupported allocation descriptor %d\n", + kprintf("Unsupported allocation descriptor %d\n", tag->flags & 0x7); return(ENODEV); } diff --git a/sys/vfs/ufs/ffs_alloc.c b/sys/vfs/ufs/ffs_alloc.c index f9003cada8..436e015069 100644 --- a/sys/vfs/ufs/ffs_alloc.c +++ b/sys/vfs/ufs/ffs_alloc.c @@ -32,7 +32,7 @@ * * @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95 * $FreeBSD: src/sys/ufs/ffs/ffs_alloc.c,v 1.64.2.2 2001/09/21 19:15:21 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_alloc.c,v 1.25 2006/10/14 16:26:40 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_alloc.c,v 1.26 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_quota.h" @@ -114,7 +114,7 @@ ffs_alloc(struct inode *ip, ufs_daddr_t lbn, ufs_daddr_t bpref, int size, fs = ip->i_fs; #ifdef DIAGNOSTIC if ((uint)size > fs->fs_bsize || fragoff(fs, size) != 0) { - printf("dev = %s, bsize = %ld, size = %d, fs = %s\n", + kprintf("dev = %s, bsize = %ld, size = %d, fs = %s\n", devtoname(ip->i_dev), (long)fs->fs_bsize, size, fs->fs_fsmnt); panic("ffs_alloc: bad size"); @@ -180,7 +180,7 @@ ffs_realloccg(struct inode *ip, ufs_daddr_t lbprev, ufs_daddr_t bpref, #ifdef DIAGNOSTIC if ((uint)osize > fs->fs_bsize || fragoff(fs, osize) != 0 || (uint)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) { - printf( + kprintf( "dev = %s, bsize = %ld, osize = %d, nsize = %d, fs = %s\n", devtoname(ip->i_dev), (long)fs->fs_bsize, osize, nsize, fs->fs_fsmnt); @@ -193,7 +193,7 @@ ffs_realloccg(struct inode *ip, ufs_daddr_t lbprev, ufs_daddr_t bpref, freespace(fs, fs->fs_minfree) - numfrags(fs, nsize - osize) < 0) goto nospace; if ((bprev = ip->i_db[lbprev]) == 0) { - printf("dev = %s, bsize = %ld, bprev = %ld, fs = %s\n", + kprintf("dev = %s, bsize = %ld, bprev = %ld, fs = %s\n", devtoname(ip->i_dev), (long)fs->fs_bsize, (long)bprev, fs->fs_fsmnt); panic("ffs_realloccg: bad bprev"); @@ -278,7 +278,7 @@ ffs_realloccg(struct inode *ip, ufs_daddr_t lbprev, ufs_daddr_t bpref, fs->fs_optim = FS_OPTSPACE; break; default: - printf("dev = %s, optim = %ld, fs = %s\n", + kprintf("dev = %s, optim = %ld, fs = %s\n", devtoname(ip->i_dev), (long)fs->fs_optim, fs->fs_fsmnt); panic("ffs_realloccg: bad optim"); /* NOTREACHED */ @@ -461,7 +461,7 @@ ffs_reallocblks(struct vop_reallocblks_args *ap) */ #ifdef DEBUG if (prtrealloc) - printf("realloc: ino %d, lbns %d-%d\n\told:", ip->i_number, + kprintf("realloc: ino %d, lbns %d-%d\n\told:", ip->i_number, start_lbn, end_lbn); #endif blkno = newblk; @@ -479,7 +479,7 @@ ffs_reallocblks(struct vop_reallocblks_args *ap) #endif #ifdef DEBUG if (prtrealloc) - printf(" %d,", *bap); + kprintf(" %d,", *bap); #endif if (DOINGSOFTDEP(vp)) { if (sbap == &ip->i_db[0] && i < ssize) @@ -528,7 +528,7 @@ ffs_reallocblks(struct vop_reallocblks_args *ap) */ #ifdef DEBUG if (prtrealloc) - printf("\n\tnew:"); + kprintf("\n\tnew:"); #endif for (blkno = newblk, i = 0; i < len; i++, blkno += fs->fs_frag) { if (!DOINGSOFTDEP(vp)) @@ -543,13 +543,13 @@ ffs_reallocblks(struct vop_reallocblks_args *ap) #endif #ifdef DEBUG if (prtrealloc) - printf(" %d,", blkno); + kprintf(" %d,", blkno); #endif } #ifdef DEBUG if (prtrealloc) { prtrealloc--; - printf("\n"); + kprintf("\n"); } #endif return (0); @@ -621,12 +621,12 @@ ffs_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) } ip = VTOI(*vpp); if (ip->i_mode) { - printf("mode = 0%o, inum = %lu, fs = %s\n", + kprintf("mode = 0%o, inum = %lu, fs = %s\n", ip->i_mode, (u_long)ip->i_number, fs->fs_fsmnt); panic("ffs_valloc: dup alloc"); } if (ip->i_blocks) { /* XXX */ - printf("free inode %s/%lu had %ld blocks\n", + kprintf("free inode %s/%lu had %ld blocks\n", fs->fs_fsmnt, (u_long)ino, (long)ip->i_blocks); ip->i_blocks = 0; } @@ -1173,7 +1173,7 @@ ffs_alloccgblk(struct inode *ip, struct buf *bp, ufs_daddr_t bpref) pos = cylno % fs->fs_cpc; bno = (cylno - pos) * fs->fs_spc / NSPB(fs); if (fs_postbl(fs, pos)[i] == -1) { - printf("pos = %d, i = %d, fs = %s\n", + kprintf("pos = %d, i = %d, fs = %s\n", pos, i, fs->fs_fsmnt); panic("ffs_alloccgblk: cyl groups corrupted"); } @@ -1188,7 +1188,7 @@ ffs_alloccgblk(struct inode *ip, struct buf *bp, ufs_daddr_t bpref) break; i += delta; } - printf("pos = %d, i = %d, fs = %s\n", pos, i, fs->fs_fsmnt); + kprintf("pos = %d, i = %d, fs = %s\n", pos, i, fs->fs_fsmnt); panic("ffs_alloccgblk: can't find blk in cyl"); } norot: @@ -1439,7 +1439,7 @@ ffs_nodealloccg(struct inode *ip, int cg, ufs_daddr_t ipref, int mode) brelse(bp); return(0); } - printf("fs = %s\n", fs->fs_fsmnt); + kprintf("fs = %s\n", fs->fs_fsmnt); panic("ffs_nodealloccg: block not in map, icheckmiss/nfree %d/%d", icheckmiss, cgp->cg_cs.cs_nifree); /* NOTREACHED */ @@ -1487,14 +1487,14 @@ ffs_blkfree(struct inode *ip, ufs_daddr_t bno, long size) VOP_FREEBLKS(ip->i_devvp, fsbtodoff(fs, bno), size); if ((uint)size > fs->fs_bsize || fragoff(fs, size) != 0 || fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) { - printf("dev=%s, bno = %ld, bsize = %ld, size = %ld, fs = %s\n", + kprintf("dev=%s, bno = %ld, bsize = %ld, size = %ld, fs = %s\n", devtoname(ip->i_dev), (long)bno, (long)fs->fs_bsize, size, fs->fs_fsmnt); panic("ffs_blkfree: bad size"); } cg = dtog(fs, bno); if ((uint)bno >= fs->fs_size) { - printf("bad block %ld, ino %lu\n", + kprintf("bad block %ld, ino %lu\n", (long)bno, (u_long)ip->i_number); ffs_fserr(fs, ip->i_uid, "bad block"); return; @@ -1524,7 +1524,7 @@ ffs_blkfree(struct inode *ip, ufs_daddr_t bno, long size) */ blkno = fragstoblks(fs, bno); if (!ffs_isfreeblock(fs, blksfree, blkno)) { - printf("dev = %s, block = %ld, fs = %s\n", + kprintf("dev = %s, block = %ld, fs = %s\n", devtoname(ip->i_dev), (long)bno, fs->fs_fsmnt); panic("ffs_blkfree: freeing free block"); } @@ -1562,7 +1562,7 @@ ffs_blkfree(struct inode *ip, ufs_daddr_t bno, long size) frags = numfrags(fs, size); for (i = 0; i < frags; i++) { if (isset(blksfree, bno + i)) { - printf("dev = %s, block = %ld, fs = %s\n", + kprintf("dev = %s, block = %ld, fs = %s\n", devtoname(ip->i_dev), (long)(bno + i), fs->fs_fsmnt); panic("ffs_blkfree: freeing free frag"); @@ -1616,7 +1616,7 @@ ffs_checkblk(struct inode *ip, ufs_daddr_t bno, long size) fs = ip->i_fs; if ((uint)size > fs->fs_bsize || fragoff(fs, size) != 0) { - printf("bsize = %ld, size = %ld, fs = %s\n", + kprintf("bsize = %ld, size = %ld, fs = %s\n", (long)fs->fs_bsize, size, fs->fs_fsmnt); panic("ffs_checkblk: bad size"); } @@ -1694,7 +1694,7 @@ ffs_freefile(struct vnode *pvp, ino_t ino, int mode) inosused = cg_inosused(cgp); ino %= fs->fs_ipg; if (isclr(inosused, ino)) { - printf("dev = %s, ino = %lu, fs = %s\n", + kprintf("dev = %s, ino = %lu, fs = %s\n", devtoname(pip->i_dev), (u_long)ino, fs->fs_fsmnt); if (fs->fs_ronly == 0) panic("ffs_vfree: freeing free inode"); @@ -1749,7 +1749,7 @@ ffs_mapsearch(struct fs *fs, struct cg *cgp, ufs_daddr_t bpref, int allocsiz) (u_char *)fragtbl[fs->fs_frag], (u_char)(1 << (allocsiz - 1 + (fs->fs_frag % NBBY)))); if (loc == 0) { - printf("start = %d, len = %d, fs = %s\n", + kprintf("start = %d, len = %d, fs = %s\n", start, len, fs->fs_fsmnt); panic("ffs_alloccg: map corrupted"); /* NOTREACHED */ @@ -1773,7 +1773,7 @@ ffs_mapsearch(struct fs *fs, struct cg *cgp, ufs_daddr_t bpref, int allocsiz) subfield <<= 1; } } - printf("bno = %lu, fs = %s\n", (u_long)bno, fs->fs_fsmnt); + kprintf("bno = %lu, fs = %s\n", (u_long)bno, fs->fs_fsmnt); panic("ffs_alloccg: block not in map"); return (-1); } diff --git a/sys/vfs/ufs/ffs_softdep.c b/sys/vfs/ufs/ffs_softdep.c index 6cc424fb95..5c84b258dd 100644 --- a/sys/vfs/ufs/ffs_softdep.c +++ b/sys/vfs/ufs/ffs_softdep.c @@ -37,7 +37,7 @@ * * from: @(#)ffs_softdep.c 9.59 (McKusick) 6/21/00 * $FreeBSD: src/sys/ufs/ffs/ffs_softdep.c,v 1.57.2.11 2002/02/05 18:46:53 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_softdep.c,v 1.49 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_softdep.c,v 1.50 2006/12/23 00:41:30 swildner Exp $ */ /* @@ -937,7 +937,7 @@ top: M_SOFTDEP_FLAGS | M_ZERO); if (pagedep_find(pagedephd, ip->i_number, lbn, mp)) { - printf("pagedep_lookup: blocking race avoided\n"); + kprintf("pagedep_lookup: blocking race avoided\n"); ACQUIRE_LOCK(&lk); sema_release(&pagedep_in_progress); kfree(pagedep, M_PAGEDEP); @@ -1030,7 +1030,7 @@ top: MALLOC(inodedep, struct inodedep *, sizeof(struct inodedep), M_INODEDEP, M_SOFTDEP_FLAGS | M_ZERO); if (inodedep_find(inodedephd, fs, inum)) { - printf("inodedep_lookup: blocking race avoided\n"); + kprintf("inodedep_lookup: blocking race avoided\n"); ACQUIRE_LOCK(&lk); sema_release(&inodedep_in_progress); kfree(inodedep, M_INODEDEP); @@ -1111,7 +1111,7 @@ top: M_NEWBLK, M_SOFTDEP_FLAGS | M_ZERO); if (newblk_find(newblkhd, fs, newblkno)) { - printf("newblk_lookup: blocking race avoided\n"); + kprintf("newblk_lookup: blocking race avoided\n"); sema_release(&pagedep_in_progress); kfree(newblk, M_NEWBLK); goto top; @@ -1189,7 +1189,7 @@ softdep_mount(devvp, mp, fs) } #ifdef DEBUG if (bcmp(&cstotal, &fs->fs_cstotal, sizeof cstotal)) - printf("ffs_mountfs: superblock updated for soft updates\n"); + kprintf("ffs_mountfs: superblock updated for soft updates\n"); #endif bcopy(&cstotal, &fs->fs_cstotal, sizeof cstotal); return (0); @@ -1931,11 +1931,11 @@ softdep_setup_freeblocks_bp(struct buf *bp, void *data) struct inodedep *inodedep; if (getdirtybuf(&bp, MNT_WAIT) == 0) { - printf("softdep_setup_freeblocks_bp(1): caught bp %p going away\n", bp); + kprintf("softdep_setup_freeblocks_bp(1): caught bp %p going away\n", bp); return(-1); } if (bp->b_vp != ITOV(info->ip) || (bp->b_flags & B_DELWRI) == 0) { - printf("softdep_setup_freeblocks_bp(2): caught bp %p going away\n", bp); + kprintf("softdep_setup_freeblocks_bp(2): caught bp %p going away\n", bp); BUF_UNLOCK(bp); return(-1); } @@ -2271,7 +2271,7 @@ handle_workitem_freeblocks(freeblks) #ifdef DIAGNOSTIC if (freeblks->fb_chkcnt != blocksreleased) - printf("handle_workitem_freeblocks: block count\n"); + kprintf("handle_workitem_freeblocks: block count\n"); if (allerror) softdep_error("handle_workitem_freeblks", allerror); #endif /* DIAGNOSTIC */ @@ -3177,7 +3177,7 @@ initiate_write_filepage(pagedep, bp) * understand chaining. Here biodone will reissue the call * to strategy for the incomplete buffers. */ - printf("initiate_write_filepage: already started\n"); + kprintf("initiate_write_filepage: already started\n"); return; } pagedep->pd_state |= IOSTARTED; @@ -4188,7 +4188,7 @@ softdep_fsync_mountdev_bp(struct buf *bp, void *data) return(0); if (bp->b_vp != vp || (bp->b_flags & B_DELWRI) == 0) { BUF_UNLOCK(bp); - printf("softdep_fsync_mountdev_bp: warning, buffer %p ripped out from under vnode %p\n", bp, vp); + kprintf("softdep_fsync_mountdev_bp: warning, buffer %p ripped out from under vnode %p\n", bp, vp); return(0); } /* @@ -4332,11 +4332,11 @@ softdep_sync_metadata_bp(struct buf *bp, void *data) int i; if (getdirtybuf(&bp, MNT_WAIT) == 0) { - printf("softdep_sync_metadata_bp(1): caught buf %p going away\n", bp); + kprintf("softdep_sync_metadata_bp(1): caught buf %p going away\n", bp); return (1); } if (bp->b_vp != info->vp || (bp->b_flags & B_DELWRI) == 0) { - printf("softdep_sync_metadata_bp(2): caught buf %p going away vp %p\n", bp, info->vp); + kprintf("softdep_sync_metadata_bp(2): caught buf %p going away vp %p\n", bp, info->vp); BUF_UNLOCK(bp); return(1); } @@ -5132,5 +5132,5 @@ softdep_error(func, error) { /* XXX should do something better! */ - printf("%s: got error %d while accessing filesystem\n", func, error); + kprintf("%s: got error %d while accessing filesystem\n", func, error); } diff --git a/sys/vfs/ufs/ffs_vfsops.c b/sys/vfs/ufs/ffs_vfsops.c index 87068a3274..a289795424 100644 --- a/sys/vfs/ufs/ffs_vfsops.c +++ b/sys/vfs/ufs/ffs_vfsops.c @@ -32,7 +32,7 @@ * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 * $FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.117.2.10 2002/06/23 22:34:52 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_vfsops.c,v 1.51 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_vfsops.c,v 1.52 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_quota.h" @@ -156,7 +156,7 @@ ffs_mount(struct mount *mp, /* mount struct pointer */ */ if ((error = bdevvp(rootdev, &rootvp))) { - printf("ffs_mountroot: can't find rootvp\n"); + kprintf("ffs_mountroot: can't find rootvp\n"); return (error); } @@ -235,11 +235,11 @@ ffs_mount(struct mount *mp, /* mount struct pointer */ if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; if (mp->mnt_flag & MNT_FORCE) { - printf( + kprintf( "WARNING: %s was not properly dismounted\n", fs->fs_fsmnt); } else { - printf( + kprintf( "WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n", fs->fs_fsmnt); error = EPERM; @@ -323,7 +323,7 @@ ffs_mount(struct mount *mp, /* mount struct pointer */ vrele(devvp); devvp = ump->um_devvp; } else { - printf("cannot update mount, udev does" + kprintf("cannot update mount, udev does" " not match %08x vs %08x\n", devvp->v_udev, ump->um_devvp->v_udev); error = EINVAL; /* needs translation */ @@ -657,11 +657,11 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct malloc_type *mtype) if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; if (ronly || (mp->mnt_flag & MNT_FORCE)) { - printf( + kprintf( "WARNING: %s was not properly dismounted\n", fs->fs_fsmnt); } else { - printf( + kprintf( "WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n", fs->fs_fsmnt); error = EPERM; @@ -953,7 +953,7 @@ ffs_sync(struct mount *mp, int waitfor) fs = ump->um_fs; if (fs->fs_fmod != 0 && fs->fs_ronly != 0) { /* XXX */ - printf("fs = %s\n", fs->fs_fsmnt); + kprintf("fs = %s\n", fs->fs_fsmnt); panic("ffs_sync: rofs mod"); } @@ -1108,7 +1108,7 @@ restart: * If a collision occurs, throw away the vnode and try again. */ if (ufs_ihashins(ip) != 0) { - printf("debug: ufs ihashins collision, retrying inode %ld\n", + kprintf("debug: ufs ihashins collision, retrying inode %ld\n", (long)ip->i_number); vx_put(vp); kfree(ip, ump->um_malloctype); diff --git a/sys/vfs/ufs/ufs_inode.c b/sys/vfs/ufs/ufs_inode.c index b4eacc72a3..be2764aaab 100644 --- a/sys/vfs/ufs/ufs_inode.c +++ b/sys/vfs/ufs/ufs_inode.c @@ -37,7 +37,7 @@ * * @(#)ufs_inode.c 8.9 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ufs/ufs_inode.c,v 1.25.2.3 2002/07/05 22:42:31 dillon Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_inode.c,v 1.20 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_inode.c,v 1.21 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_quota.h" @@ -139,7 +139,7 @@ ufs_reclaim(struct vop_reclaim_args *ap) } #ifdef INVARIANTS if (ip && (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE))) { - printf("WARNING: INODE %ld flags %08x: modified inode being released!\n", (long)ip->i_number, (int)ip->i_flag); + kprintf("WARNING: INODE %ld flags %08x: modified inode being released!\n", (long)ip->i_number, (int)ip->i_flag); ip->i_flag |= IN_MODIFIED; ffs_update(vp, 0); } diff --git a/sys/vfs/ufs/ufs_lookup.c b/sys/vfs/ufs/ufs_lookup.c index c481611e70..f2e98f73cc 100644 --- a/sys/vfs/ufs/ufs_lookup.c +++ b/sys/vfs/ufs/ufs_lookup.c @@ -37,7 +37,7 @@ * * @(#)ufs_lookup.c 8.15 (Berkeley) 6/16/95 * $FreeBSD: src/sys/ufs/ufs/ufs_lookup.c,v 1.33.2.7 2001/09/22 19:22:13 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_lookup.c,v 1.27 2006/08/12 00:26:22 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_lookup.c,v 1.28 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_ufs.h" @@ -603,7 +603,7 @@ ufs_dirbad(struct inode *ip, doff_t offset, char *how) struct mount *mp; mp = ITOV(ip)->v_mount; - (void)printf("%s: bad dir ino %lu at offset %ld: %s\n", + (void)kprintf("%s: bad dir ino %lu at offset %ld: %s\n", mp->mnt_stat.f_mntfromname, (u_long)ip->i_number, (long)offset, how); if ((mp->mnt_flag & MNT_RDONLY) == 0) panic("ufs_dirbad: bad dir"); @@ -635,7 +635,7 @@ ufs_dirbadentry(struct vnode *dp, struct direct *ep, int entryoffsetinblock) ep->d_reclen > DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)) || ep->d_reclen < DIRSIZ(OFSFMT(dp), ep) || namlen > MAXNAMLEN) { /*return (1); */ - printf("First bad\n"); + kprintf("First bad\n"); goto bad; } if (ep->d_ino == 0) @@ -643,7 +643,7 @@ ufs_dirbadentry(struct vnode *dp, struct direct *ep, int entryoffsetinblock) for (i = 0; i < namlen; i++) if (ep->d_name[i] == '\0') { /*return (1); */ - printf("Second bad\n"); + kprintf("Second bad\n"); goto bad; } if (ep->d_name[i]) @@ -1166,7 +1166,7 @@ ufs_checkpath(struct inode *source, struct inode *target, struct ucred *cred) out: if (error == ENOTDIR) - printf("checkpath: .. not a directory\n"); + kprintf("checkpath: .. not a directory\n"); if (vp != NULL) vput(vp); return (error); diff --git a/sys/vfs/ufs/ufs_vnops.c b/sys/vfs/ufs/ufs_vnops.c index 51ec3968ff..781837b4bc 100644 --- a/sys/vfs/ufs/ufs_vnops.c +++ b/sys/vfs/ufs/ufs_vnops.c @@ -37,7 +37,7 @@ * * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 * $FreeBSD: src/sys/ufs/ufs/ufs_vnops.c,v 1.131.2.8 2003/01/02 17:26:19 bde Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_vnops.c,v 1.57 2006/09/19 16:06:16 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_vnops.c,v 1.58 2006/12/23 00:41:30 swildner Exp $ */ #include "opt_quota.h" @@ -908,7 +908,7 @@ abortit: * not call us in that case. Temporarily just warn if they do. */ if (fvp == tvp) { - printf("ufs_rename: fvp == tvp (can't happen)\n"); + kprintf("ufs_rename: fvp == tvp (can't happen)\n"); error = 0; goto abortit; } @@ -1865,13 +1865,13 @@ ufs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); - printf("tag VT_UFS, ino %lu, on dev %s (%d, %d)", + kprintf("tag VT_UFS, ino %lu, on dev %s (%d, %d)", (u_long)ip->i_number, devtoname(ip->i_dev), major(ip->i_dev), minor(ip->i_dev)); if (vp->v_type == VFIFO) fifo_printinfo(vp); lockmgr_printinfo(&vp->v_lock); - printf("\n"); + kprintf("\n"); return (0); } diff --git a/sys/vfs/union/union.h b/sys/vfs/union/union.h index e65b034a24..0b9f7ff386 100644 --- a/sys/vfs/union/union.h +++ b/sys/vfs/union/union.h @@ -36,7 +36,7 @@ * * @(#)union.h 8.9 (Berkeley) 12/10/94 * $FreeBSD: src/sys/miscfs/union/union.h,v 1.17 1999/12/29 04:54:48 peter Exp $ - * $DragonFly: src/sys/vfs/union/union.h,v 1.8 2004/10/12 19:21:14 dillon Exp $ + * $DragonFly: src/sys/vfs/union/union.h,v 1.9 2006/12/23 00:41:30 swildner Exp $ */ struct union_args { @@ -120,7 +120,7 @@ struct union_node { #define UPPERVP(vp) (VTOUNION(vp)->un_uppervp) #define OTHERVP(vp) (UPPERVP(vp) ? UPPERVP(vp) : LOWERVP(vp)) -#define UDEBUG(x) if (uniondebug) printf x +#define UDEBUG(x) if (uniondebug) kprintf x #define UDEBUG_ENABLED 1 #endif diff --git a/sys/vfs/union/union_vfsops.c b/sys/vfs/union/union_vfsops.c index 2a91456485..80f53d2de4 100644 --- a/sys/vfs/union/union_vfsops.c +++ b/sys/vfs/union/union_vfsops.c @@ -36,7 +36,7 @@ * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 * $FreeBSD: src/sys/miscfs/union/union_vfsops.c,v 1.39.2.2 2001/10/25 19:18:53 dillon Exp $ - * $DragonFly: src/sys/vfs/union/union_vfsops.c,v 1.28 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vfs/union/union_vfsops.c,v 1.29 2006/12/23 00:41:30 swildner Exp $ */ /* @@ -149,7 +149,7 @@ union_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) */ if (upperrootvp == VTOUNION(lowerrootvp)->un_uppervp) { #ifdef DIAGNOSTIC - printf("union_mount: multi union mount?\n"); + kprintf("union_mount: multi union mount?\n"); #endif error = EDEADLK; goto bad; diff --git a/sys/vfs/union/union_vnops.c b/sys/vfs/union/union_vnops.c index 79efbc9b91..9d6580e67f 100644 --- a/sys/vfs/union/union_vnops.c +++ b/sys/vfs/union/union_vnops.c @@ -36,7 +36,7 @@ * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 * $FreeBSD: src/sys/miscfs/union/union_vnops.c,v 1.72 1999/12/15 23:02:14 eivind Exp $ - * $DragonFly: src/sys/vfs/union/union_vnops.c,v 1.35 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/union/union_vnops.c,v 1.36 2006/12/23 00:41:30 swildner Exp $ */ #include @@ -1701,7 +1701,7 @@ union_print(struct vop_print_args *ap) { struct vnode *vp = ap->a_vp; - printf("\ttag VT_UNION, vp=%p, uppervp=%p, lowervp=%p\n", + kprintf("\ttag VT_UNION, vp=%p, uppervp=%p, lowervp=%p\n", vp, UPPERVP(vp), LOWERVP(vp)); if (UPPERVP(vp) != NULLVP) vprint("union: upper", UPPERVP(vp)); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index d33e9e8b60..418a012a3f 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -96,7 +96,7 @@ * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94 * * $FreeBSD: src/sys/vm/swap_pager.c,v 1.130.2.12 2002/08/31 21:15:55 dillon Exp $ - * $DragonFly: src/sys/vm/swap_pager.c,v 1.25 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vm/swap_pager.c,v 1.26 2006/12/23 00:41:31 swildner Exp $ */ #include @@ -255,7 +255,7 @@ swp_sizecheck(void) { if (vm_swap_size < nswap_lowat) { if (swap_pager_almost_full == 0) { - printf("swap_pager: out of swap space\n"); + kprintf("swap_pager: out of swap space\n"); swap_pager_almost_full = 1; } } else { @@ -365,7 +365,7 @@ swap_pager_swap_init(void) if (swap_zone == NULL) panic("swap_pager_swap_init: swap_zone == NULL"); if (n2 != n) - printf("Swap zone entries reduced from %d to %d.\n", n2, n); + kprintf("Swap zone entries reduced from %d to %d.\n", n2, n); n2 = n; /* @@ -516,7 +516,7 @@ swp_pager_getswapspace(int npages) if ((blk = blist_alloc(swapblist, npages)) == SWAPBLK_NONE) { if (swap_pager_full != 2) { - printf("swap_pager_getswapspace: failed\n"); + kprintf("swap_pager_getswapspace: failed\n"); swap_pager_full = 2; swap_pager_almost_full = 1; } @@ -872,7 +872,7 @@ swap_pager_strategy(vm_object_t object, struct bio *bio) bp->b_error = EINVAL; bp->b_flags |= B_ERROR | B_INVAL; biodone(bio); - printf("swap_pager_strategy: bp %p offset %lld size %d, not page bounded\n", bp, bio->bio_offset, (int)bp->b_bcount); + kprintf("swap_pager_strategy: bp %p offset %lld size %d, not page bounded\n", bp, bio->bio_offset, (int)bp->b_bcount); return; } @@ -1303,7 +1303,7 @@ swap_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) vm_page_flag_set(mreq, PG_WANTED | PG_REFERENCED); mycpu->gd_cnt.v_intrans++; if (tsleep(mreq, 0, "swread", hz*20)) { - printf( + kprintf( "swap_pager: indefinite wait buffer: " " offset: %lld, size: %d\n", bio->bio_offset, bp->b_bcount @@ -1603,7 +1603,7 @@ swp_pager_async_iodone(struct bio *bio) * report error */ if (bp->b_flags & B_ERROR) { - printf( + kprintf( "swap_pager: I/O error - %s failed; offset %lld," "size %ld, error %d\n", ((bp->b_cmd == BUF_CMD_READ) ? "pagein" : "pageout"), diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c index 0c75a2cadb..ad8ebe204a 100644 --- a/sys/vm/vm_contig.c +++ b/sys/vm/vm_contig.c @@ -64,7 +64,7 @@ * SUCH DAMAGE. * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 - * $DragonFly: src/sys/vm/vm_contig.c,v 1.18 2006/09/11 20:25:31 dillon Exp $ + * $DragonFly: src/sys/vm/vm_contig.c,v 1.19 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -471,7 +471,7 @@ contigmalloc_map( index = vm_contig_pg_alloc(size, low, high, alignment, boundary, flags); if (index < 0) { - printf("contigmalloc_map: failed in index < 0 case!\n"); + kprintf("contigmalloc_map: failed in index < 0 case!\n"); return NULL; } diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 4456af9863..e1b729eefa 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -67,7 +67,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_fault.c,v 1.108.2.8 2002/02/26 05:49:27 silby Exp $ - * $DragonFly: src/sys/vm/vm_fault.c,v 1.30 2006/09/13 22:25:00 dillon Exp $ + * $DragonFly: src/sys/vm/vm_fault.c,v 1.31 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -780,9 +780,9 @@ readrest: */ if (rv == VM_PAGER_ERROR) { if (curproc) - printf("vm_fault: pager read error, pid %d (%s)\n", curproc->p_pid, curproc->p_comm); + kprintf("vm_fault: pager read error, pid %d (%s)\n", curproc->p_pid, curproc->p_comm); else - printf("vm_fault: pager read error, thread %p (%s)\n", curthread, curproc->p_comm); + kprintf("vm_fault: pager read error, thread %p (%s)\n", curthread, curproc->p_comm); } /* * Data outside the range of the pager or an I/O error @@ -1041,7 +1041,7 @@ readrest: */ if (fs->m->valid != VM_PAGE_BITS_ALL) { vm_page_zero_invalid(fs->m, TRUE); - printf("Warning: page %p partially invalid on fault\n", fs->m); + kprintf("Warning: page %p partially invalid on fault\n", fs->m); } return (KERN_SUCCESS); @@ -1176,7 +1176,7 @@ vm_fault_ratelimit(struct vmspace *vmspace) } #ifdef INVARIANTS if (vm_load_debug) { - printf("load %-4d give %d pgs, wait %d, pid %-5d (%s)\n", + kprintf("load %-4d give %d pgs, wait %d, pid %-5d (%s)\n", vm_load, (1000 - vm_load ) / 10, vm_load * hz / 10000, curproc->p_pid, curproc->p_comm); diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index bb41b66e01..b818203888 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -60,7 +60,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_glue.c,v 1.94.2.4 2003/01/13 22:51:17 dillon Exp $ - * $DragonFly: src/sys/vm/vm_glue.c,v 1.45 2006/11/07 17:51:24 dillon Exp $ + * $DragonFly: src/sys/vm/vm_glue.c,v 1.46 2006/12/23 00:41:31 swildner Exp $ */ #include "opt_vm.h" @@ -281,7 +281,7 @@ vm_fork(struct lwp *lp1, struct proc *p2, int flags) p2->p_stats = &up->u_stats; if (p2->p_sigacts == NULL) { if (p2->p_procsig->ps_refcnt != 1) - printf ("PID:%d NULL sigacts with refcnt not 1!\n",p2->p_pid); + kprintf ("PID:%d NULL sigacts with refcnt not 1!\n",p2->p_pid); p2->p_sigacts = &up->u_sigacts; up->u_sigacts = *p1->p_sigacts; } @@ -354,7 +354,7 @@ faultin(struct proc *p) p->p_flag &= ~(P_SWAPPEDOUT | P_SWAPWAIT); #ifdef INVARIANTS if (swap_debug) - printf("swapping in %d (%s)\n", p->p_pid, p->p_comm); + kprintf("swapping in %d (%s)\n", p->p_pid, p->p_comm); #endif wakeup(p); @@ -579,7 +579,7 @@ swapout(struct proc *p) { #ifdef INVARIANTS if (swap_debug) - printf("swapping out %d (%s)\n", p->p_pid, p->p_comm); + kprintf("swapping out %d (%s)\n", p->p_pid, p->p_comm); #endif ++p->p_stats->p_ru.ru_nswap; /* diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 536ba5bddf..735094590e 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -62,7 +62,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_kern.c,v 1.61.2.2 2002/03/12 18:25:26 tegge Exp $ - * $DragonFly: src/sys/vm/vm_kern.c,v 1.23 2006/09/11 20:25:31 dillon Exp $ + * $DragonFly: src/sys/vm/vm_kern.c,v 1.24 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -274,7 +274,7 @@ kmem_suballoc(vm_map_t parent, vm_offset_t *min, vm_offset_t *max, VM_PROT_ALL, VM_PROT_ALL, 0); if (ret != KERN_SUCCESS) { - printf("kmem_suballoc: bad status return of %d.\n", ret); + kprintf("kmem_suballoc: bad status return of %d.\n", ret); panic("kmem_suballoc"); } *max = *min + size; diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 37c6ffe9fa..7ac2590b23 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -62,7 +62,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_map.h,v 1.54.2.5 2003/01/13 22:51:17 dillon Exp $ - * $DragonFly: src/sys/vm/vm_map.h,v 1.26 2006/09/13 22:25:00 dillon Exp $ + * $DragonFly: src/sys/vm/vm_map.h,v 1.27 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -299,7 +299,7 @@ struct vmresident { #ifdef MAP_LOCK_DIAGNOSTIC #define vm_map_lock(map) \ do { \ - printf ("locking map LK_EXCLUSIVE: 0x%x\n", map); \ + kprintf ("locking map LK_EXCLUSIVE: 0x%x\n", map); \ if (lockmgr(&(map)->lock, LK_EXCLUSIVE) != 0) { \ panic("vm_map_lock: failed to get lock"); \ } \ @@ -325,17 +325,17 @@ struct vmresident { #if defined(MAP_LOCK_DIAGNOSTIC) #define vm_map_unlock(map) \ do { \ - printf ("locking map LK_RELEASE: 0x%x\n", map); \ + kprintf ("locking map LK_RELEASE: 0x%x\n", map); \ lockmgr(&(map)->lock, LK_RELEASE); \ } while (0) #define vm_map_lock_read(map) \ do { \ - printf ("locking map LK_SHARED: 0x%x\n", map); \ + kprintf ("locking map LK_SHARED: 0x%x\n", map); \ lockmgr(&(map)->lock, LK_SHARED); \ } while (0) #define vm_map_unlock_read(map) \ do { \ - printf ("locking map LK_RELEASE: 0x%x\n", map); \ + kprintf ("locking map LK_RELEASE: 0x%x\n", map); \ lockmgr(&(map)->lock, LK_RELEASE); \ } while (0) #else @@ -351,7 +351,7 @@ static __inline__ int vm_map_lock_upgrade(vm_map_t map) { int error; #if defined(MAP_LOCK_DIAGNOSTIC) - printf("locking map LK_EXCLUPGRADE: 0x%x\n", map); + kprintf("locking map LK_EXCLUPGRADE: 0x%x\n", map); #endif error = lockmgr(&map->lock, LK_EXCLUPGRADE); if (error == 0) @@ -362,7 +362,7 @@ vm_map_lock_upgrade(vm_map_t map) { #if defined(MAP_LOCK_DIAGNOSTIC) #define vm_map_lock_downgrade(map) \ do { \ - printf ("locking map LK_DOWNGRADE: 0x%x\n", map); \ + kprintf ("locking map LK_DOWNGRADE: 0x%x\n", map); \ lockmgr(&(map)->lock, LK_DOWNGRADE); \ } while (0) #else diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 33ff59e6ac..d80572c5cf 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -35,7 +35,7 @@ * * from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91 * $FreeBSD: src/sys/vm/vm_page.c,v 1.147.2.18 2002/03/10 05:03:19 alc Exp $ - * $DragonFly: src/sys/vm/vm_page.c,v 1.33 2006/12/02 23:13:46 dillon Exp $ + * $DragonFly: src/sys/vm/vm_page.c,v 1.34 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -705,7 +705,7 @@ loop: */ #ifdef INVARIANTS if (curthread->td_preempted) { - printf("vm_page_alloc(): warning, attempt to allocate" + kprintf("vm_page_alloc(): warning, attempt to allocate" " cache page from preempting interrupt\n"); m = NULL; } else { @@ -732,7 +732,7 @@ loop: crit_exit(); #if defined(DIAGNOSTIC) if (vmstats.v_cache_count > 0) - printf("vm_page_alloc(NORMAL): missing pages on cache queue: %d\n", vmstats.v_cache_count); + kprintf("vm_page_alloc(NORMAL): missing pages on cache queue: %d\n", vmstats.v_cache_count); #endif vm_pageout_deficit++; pagedaemon_wakeup(); @@ -930,7 +930,7 @@ vm_page_free_toq(vm_page_t m) mycpu->gd_cnt.v_tfree++; if (m->busy || ((m->queue - m->pc) == PQ_FREE)) { - printf( + kprintf( "vm_page_free: pindex(%lu), busy(%d), PG_BUSY(%d), hold(%d)\n", (u_long)m->pindex, m->busy, (m->flags & PG_BUSY) ? 1 : 0, m->hold_count); @@ -1228,7 +1228,7 @@ vm_page_cache(vm_page_t m) if ((m->flags & (PG_BUSY|PG_UNMANAGED)) || m->busy || m->wire_count || m->hold_count) { - printf("vm_page_cache: attempting to cache busy/held page\n"); + kprintf("vm_page_cache: attempting to cache busy/held page\n"); return; } if ((m->queue - m->pc) == PQ_CACHE) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index ca92d6e0af..a8129fac00 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -66,7 +66,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/vm/vm_pageout.c,v 1.151.2.15 2002/12/29 18:21:04 dillon Exp $ - * $DragonFly: src/sys/vm/vm_pageout.c,v 1.27 2006/12/02 23:13:46 dillon Exp $ + * $DragonFly: src/sys/vm/vm_pageout.c,v 1.28 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -1127,7 +1127,7 @@ rescan0: m->hold_count || m->wire_count) { #ifdef INVARIANTS - printf("Warning: busy page %p found in cache\n", m); + kprintf("Warning: busy page %p found in cache\n", m); #endif vm_page_deactivate(m); continue; diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index 9d139ad4d4..bb7382a7a1 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -32,7 +32,7 @@ * * @(#)vm_swap.c 8.5 (Berkeley) 2/17/94 * $FreeBSD: src/sys/vm/vm_swap.c,v 1.96.2.2 2001/10/14 18:46:47 iedowse Exp $ - * $DragonFly: src/sys/vm/vm_swap.c,v 1.31 2006/10/27 04:56:34 dillon Exp $ + * $DragonFly: src/sys/vm/vm_swap.c,v 1.32 2006/12/23 00:41:31 swildner Exp $ */ #include "opt_swap.h" @@ -287,7 +287,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) * tree bitmap code. */ if (nblks > 0x40000000 / BLIST_META_RADIX / nswdev) { - printf("exceeded maximum of %d blocks per swap unit\n", + kprintf("exceeded maximum of %d blocks per swap unit\n", 0x40000000 / BLIST_META_RADIX / nswdev); VOP_CLOSE(vp, FREAD | FWRITE); return (ENXIO); diff --git a/sys/vm/vm_vmspace.c b/sys/vm/vm_vmspace.c index 4a31373207..bfb0973233 100644 --- a/sys/vm/vm_vmspace.c +++ b/sys/vm/vm_vmspace.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/vm/vm_vmspace.c,v 1.5 2006/11/07 17:51:24 dillon Exp $ + * $DragonFly: src/sys/vm/vm_vmspace.c,v 1.6 2006/12/23 00:41:31 swildner Exp $ */ #include @@ -443,7 +443,7 @@ vkernel_exit(struct proc *p) * a different one. */ if ((ve = vk->vk_current) != NULL) { - printf("killed with active VC\n"); + kprintf("killed with active VC\n"); vk->vk_current = NULL; pmap_deactivate(p); p->p_vmspace = vk->vk_save_vmspace; @@ -481,7 +481,7 @@ vkernel_trap(struct proc *p, struct trapframe *frame) struct vkernel *vk; int error; - printf("trap for vkernel type %d wm=%d\n", + kprintf("trap for vkernel type %d wm=%d\n", frame->tf_trapno & 0x7FFFFFFF, ((frame->tf_trapno & 0x80000000) ? 1 : 0)); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 21e855fac5..8ec4fdd966 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -39,7 +39,7 @@ * * from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91 * $FreeBSD: src/sys/vm/vnode_pager.c,v 1.116.2.7 2002/12/31 09:34:51 dillon Exp $ - * $DragonFly: src/sys/vm/vnode_pager.c,v 1.31 2006/08/08 03:52:45 dillon Exp $ + * $DragonFly: src/sys/vm/vnode_pager.c,v 1.32 2006/12/23 00:41:31 swildner Exp $ */ /* @@ -152,7 +152,7 @@ vnode_pager_alloc(void *handle, off_t size, vm_prot_t prot, off_t offset) } else { object->ref_count++; if (vp->v_filesize != size) - printf("vnode_pager_alloc: Warning, filesize mismatch %lld/%lld\n", vp->v_filesize, size); + kprintf("vnode_pager_alloc: Warning, filesize mismatch %lld/%lld\n", vp->v_filesize, size); } vp->v_usecount++; @@ -593,7 +593,7 @@ vnode_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) */ rtval = VOP_GETPAGES(vp, m, bytes, reqpage, 0); if (rtval == EOPNOTSUPP) { - printf("vnode_pager: *** WARNING *** stale FS getpages\n"); + kprintf("vnode_pager: *** WARNING *** stale FS getpages\n"); rtval = vnode_pager_generic_getpages( vp, m, bytes, reqpage); } return rtval; @@ -857,7 +857,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount, } } if (error) { - printf("vnode_pager_getpages: I/O read error\n"); + kprintf("vnode_pager_getpages: I/O read error\n"); } return (error ? VM_PAGER_ERROR : VM_PAGER_OK); } @@ -900,7 +900,7 @@ vnode_pager_putpages(vm_object_t object, vm_page_t *m, int count, vp = object->handle; rtval = VOP_PUTPAGES(vp, m, bytes, sync, rtvals, 0); if (rtval == EOPNOTSUPP) { - printf("vnode_pager: *** WARNING *** stale FS putpages\n"); + kprintf("vnode_pager: *** WARNING *** stale FS putpages\n"); rtval = vnode_pager_generic_putpages( vp, m, bytes, sync, rtvals); } } @@ -937,7 +937,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, int bytecount, rtvals[i] = VM_PAGER_AGAIN; if ((int) m[0]->pindex < 0) { - printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%x)\n", + kprintf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%x)\n", (long)m[0]->pindex, m[0]->dirty); rtvals[0] = VM_PAGER_BAD; return VM_PAGER_BAD; @@ -1010,10 +1010,10 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, int bytecount, mycpu->gd_cnt.v_vnodepgsout += ncount; if (error) { - printf("vnode_pager_putpages: I/O error %d\n", error); + kprintf("vnode_pager_putpages: I/O error %d\n", error); } if (auio.uio_resid) { - printf("vnode_pager_putpages: residual I/O %d at %lu\n", + kprintf("vnode_pager_putpages: residual I/O %d at %lu\n", auio.uio_resid, (u_long)m[0]->pindex); } for (i = 0; i < ncount; i++) { @@ -1048,7 +1048,7 @@ vnode_pager_lock(vm_object_t object) (object->type != OBJT_VNODE)) { return NULL; } - printf("vnode_pager_lock: vp %p error %d lockstatus %d, retrying\n", vp, error, lockstatus(&vp->v_lock, td)); + kprintf("vnode_pager_lock: vp %p error %d lockstatus %d, retrying\n", vp, error, lockstatus(&vp->v_lock, td)); tsleep(object->handle, 0, "vnpgrl", hz); } } -- 2.41.0