aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2014-11-12 16:23:56 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2014-11-12 16:23:56 +0000
commit33587684a6ce135b840aad59947fee7a55bcb9f3 (patch)
tree52ea28a2911c3d9d6681ffda3db11365ff260714 /sys/fs
parent7ce14e216e76982d78a3dd04e494a42645b10584 (diff)
downloadsrc-33587684a6ce135b840aad59947fee7a55bcb9f3.tar.gz
src-33587684a6ce135b840aad59947fee7a55bcb9f3.zip
ifdef ext2_print_inode which is not really used.
ext2_print_inode is not really used but it was nice to have for initial development work. #ifdef it under a new EXT2FS_DEBUG knob so that we don't spend time compiling it. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=274437
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/ext2fs/ext2_extern.h2
-rw-r--r--sys/fs/ext2fs/ext2_inode_cnv.c2
-rw-r--r--sys/fs/ext2fs/ext2_vfsops.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/ext2fs/ext2_extern.h b/sys/fs/ext2fs/ext2_extern.h
index 5edac90e03d6..93bd3f7cd0f6 100644
--- a/sys/fs/ext2fs/ext2_extern.h
+++ b/sys/fs/ext2fs/ext2_extern.h
@@ -74,7 +74,9 @@ int ext2_vfree(struct vnode *, ino_t, int);
int ext2_vinit(struct mount *, struct vop_vector *, struct vnode **vpp);
int ext2_lookup(struct vop_cachedlookup_args *);
int ext2_readdir(struct vop_readdir_args *);
+#ifdef EXT2FS_DEBUG
void ext2_print_inode(struct inode *);
+#endif
int ext2_direnter(struct inode *,
struct vnode *, struct componentname *);
int ext2_dirremove(struct vnode *, struct componentname *);
diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c
index cce03d8d1659..b69d4e5c8b6e 100644
--- a/sys/fs/ext2fs/ext2_inode_cnv.c
+++ b/sys/fs/ext2fs/ext2_inode_cnv.c
@@ -41,6 +41,7 @@
#define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2)
#define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK)
+#ifdef EXT2FS_DEBUG
void
ext2_print_inode(struct inode *in)
{
@@ -75,6 +76,7 @@ ext2_print_inode(struct inode *in)
ep->e_len, ep->e_start_lo, ep->e_start_hi);
printf("\n");
}
+#endif /* EXT2FS_DEBUG */
/*
* raw ext2 inode to inode
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index b05070d32610..b97356d072ac 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -974,9 +974,9 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
for (i = used_blocks; i < EXT2_NDIR_BLOCKS; i++)
ip->i_db[i] = 0;
}
-/*
+#ifdef EXT2FS_DEBUG
ext2_print_inode(ip);
-*/
+#endif
bqrelse(bp);
/*