diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c index 2d0feb4f2fff..4b3751a8a551 100644 --- a/sys/fs/ext2fs/ext2_alloc.c +++ b/sys/fs/ext2fs/ext2_alloc.c @@ -1381,8 +1381,8 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) ibp = (char *)bp->b_data; ino = (ino - 1) % fs->e2fs->e2fs_ipg; if (isclr(ibp, ino)) { - printf("ino = %llu, fs = %s\n", - (unsigned long long)ino, fs->e2fs_fsmnt); + printf("ino = %ju, fs = %s\n", + ino, fs->e2fs_fsmnt); if (fs->e2fs_ronly == 0) panic("ext2_vfree: freeing free inode"); } diff --git a/sys/fs/ext2fs/ext2_bmap.c b/sys/fs/ext2fs/ext2_bmap.c index 3b5e0b1c8e2c..a5e9a0258582 100644 --- a/sys/fs/ext2fs/ext2_bmap.c +++ b/sys/fs/ext2fs/ext2_bmap.c @@ -48,8 +48,8 @@ #include #include -#include #include +#include #include #include #include diff --git a/sys/fs/ext2fs/ext2_extents.c b/sys/fs/ext2fs/ext2_extents.c index 66de95760409..9a213d63ae63 100644 --- a/sys/fs/ext2fs/ext2_extents.c +++ b/sys/fs/ext2fs/ext2_extents.c @@ -53,7 +53,7 @@ static void ext4_ext_print_extent(struct ext4_extent *ep) { - printf(" ext %p => (blk %u len %u start %lu)\n", + printf(" ext %p => (blk %u len %u start %ju)\n", ep, ep->e_blk, ep->e_len, (uint64_t)ep->e_start_hi << 32 | ep->e_start_lo); } @@ -69,7 +69,7 @@ ext4_ext_print_index(struct inode *ip, struct ext4_extent_index *ex, int do_walk fs = ip->i_e2fs; - printf(" index %p => (blk %u pblk %lu)\n", + printf(" index %p => (blk %u pblk %ju)\n", ex, ex->ei_blk, (uint64_t)ex->ei_leaf_hi << 32 | ex->ei_leaf_lo); if(!do_walk) @@ -110,9 +110,9 @@ ext4_ext_print_path(struct inode *ip, struct ext4_extent_path *path) { int k, l; - l = path->ep_depth + l = path->ep_depth; - printf("ip=%d, Path:\n", ip->i_number); + printf("ip=%ju, Path:\n", ip->i_number); for (k = 0; k <= l; k++, path++) { if (path->ep_index) { ext4_ext_print_index(ip, path->ep_index, 0); @@ -123,13 +123,13 @@ ext4_ext_print_path(struct inode *ip, struct ext4_extent_path *path) } void -ext4_ext_print_extent_tree_status(struct inode * ip) +ext4_ext_print_extent_tree_status(struct inode *ip) { struct ext4_extent_header *ehp; ehp = (struct ext4_extent_header *)(char *)ip->i_db; - printf("Extent status:ip=%d\n", ip->i_number); + printf("Extent status:ip=%ju\n", ip->i_number); if (!(ip->i_flag & IN_E4EXTENTS)) return; diff --git a/sys/fs/ext2fs/ext2_extents.h b/sys/fs/ext2fs/ext2_extents.h index 8a985f286ab8..3587487410e8 100644 --- a/sys/fs/ext2fs/ext2_extents.h +++ b/sys/fs/ext2fs/ext2_extents.h @@ -130,7 +130,7 @@ int ext4_ext_get_blocks(struct inode *ip, int64_t iblock, unsigned long max_blocks, struct ucred *cred, struct buf **bpp, int *allocate, daddr_t *); #ifdef EXT2FS_DEBUG -void ext4_ext_print_extent_tree_status(struct inode * ip); +void ext4_ext_print_extent_tree_status(struct inode *ip); #endif #endif /* !_FS_EXT2FS_EXT2_EXTENTS_H_ */ diff --git a/sys/fs/ext2fs/ext2_hash.c b/sys/fs/ext2fs/ext2_hash.c index c337039ea896..4c3ead7cd116 100644 --- a/sys/fs/ext2fs/ext2_hash.c +++ b/sys/fs/ext2fs/ext2_hash.c @@ -61,6 +61,7 @@ #include #include +#include #include #include #include diff --git a/sys/fs/ext2fs/ext2_htree.c b/sys/fs/ext2fs/ext2_htree.c index c196a7999a16..c8165b4aa86d 100644 --- a/sys/fs/ext2fs/ext2_htree.c +++ b/sys/fs/ext2fs/ext2_htree.c @@ -44,6 +44,7 @@ #include +#include #include #include #include diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c index 83ab7aa05433..e4e5ffd96208 100644 --- a/sys/fs/ext2fs/ext2_inode.c +++ b/sys/fs/ext2fs/ext2_inode.c @@ -50,6 +50,7 @@ #include #include +#include #include #include #include diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c index 5e8289823d11..4e307f615c08 100644 --- a/sys/fs/ext2fs/ext2_inode_cnv.c +++ b/sys/fs/ext2fs/ext2_inode_cnv.c @@ -54,17 +54,19 @@ ext2_print_inode(struct inode *in) printf("Inode: %5ju", (uintmax_t)in->i_number); printf( /* "Inode: %5d" */ - " Type: %10s Mode: 0x%o Flags: 0x%x Version: %d acl: 0x%lx\n", + " Type: %10s Mode: 0x%o Flags: 0x%x Version: %d acl: 0x%jx\n", "n/a", in->i_mode, in->i_flags, in->i_gen, in->i_facl); printf("User: %5u Group: %5u Size: %ju\n", in->i_uid, in->i_gid, (uintmax_t)in->i_size); printf("Links: %3d Blockcount: %ju\n", in->i_nlink, (uintmax_t)in->i_blocks); - printf("ctime: 0x%x", in->i_ctime); - printf("atime: 0x%x", in->i_atime); - printf("mtime: 0x%x", in->i_mtime); + printf("ctime: 0x%x ", in->i_ctime); + printf("atime: 0x%x ", in->i_atime); + printf("mtime: 0x%x ", in->i_mtime); if (E2DI_HAS_XTIME(in)) - printf("crtime %#x ", in->i_birthtime); + printf("crtime %#x\n", in->i_birthtime); + else + printf("\n"); if (in->i_flag & IN_E4EXTENTS) { printf("Extents:\n"); ehp = (struct ext4_extent_header *)in->i_db; diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c index cf6b6ff989b1..9de4f0343c1a 100644 --- a/sys/fs/ext2fs/ext2_lookup.c +++ b/sys/fs/ext2fs/ext2_lookup.c @@ -57,6 +57,7 @@ #include +#include #include #include #include diff --git a/sys/fs/ext2fs/ext2_subr.c b/sys/fs/ext2fs/ext2_subr.c index 572af03fc922..90abcbb7c8dc 100644 --- a/sys/fs/ext2fs/ext2_subr.c +++ b/sys/fs/ext2fs/ext2_subr.c @@ -48,6 +48,7 @@ #include #include +#include #include #include #include diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 17bd49cd2d8d..241f97cd3b65 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -58,13 +58,15 @@ #include #include +#include #include #include -#include #include #include #include +#include + static int ext2_flushfiles(struct mount *mp, int flags, struct thread *td); static int ext2_mountfs(struct vnode *, struct mount *); diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 07c25b68d4bb..575ab91fe4fd 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -90,6 +90,7 @@ #include #include #include +#include static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *); static void ext2_itimes_locked(struct vnode *); diff --git a/sys/fs/ext2fs/fs.h b/sys/fs/ext2fs/fs.h index 411908d6b293..37da83b76258 100644 --- a/sys/fs/ext2fs/fs.h +++ b/sys/fs/ext2fs/fs.h @@ -161,4 +161,9 @@ */ #define NINDIR(fs) (EXT2_ADDR_PER_BLOCK(fs)) +/* + * Use if additional debug logging is required. + */ +/* #define EXT2FS_DEBUG */ + #endif /* !_FS_EXT2FS_FS_H_ */