]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: remove unused functions
authorDave Chinner <dchinner@redhat.com>
Wed, 10 Oct 2018 19:35:47 +0000 (14:35 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 10 Oct 2018 19:35:47 +0000 (14:35 -0500)
Clean up build warnings about defined but not used functions by
removing them.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/rdwr.c
libxfs/util.c
repair/btree.c

index 753b9396fbe538dafe9cde701704827ab7cf1740..e580aba1d7eea8ed12913dc6d7cc5b3ec6af2aac 100644 (file)
@@ -544,14 +544,6 @@ libxfs_bcompare(struct cache_node *node, cache_key_t key)
        return CACHE_MISS;
 }
 
-static void
-libxfs_bprint(xfs_buf_t *bp)
-{
-       fprintf(stderr, "Buffer %p blkno=%llu bytes=%u flags=0x%x count=%u\n",
-               bp, (unsigned long long)bp->b_bn, (unsigned)bp->b_bcount,
-               bp->b_flags, bp->b_node.cn_count);
-}
-
 static void
 __initbuf(xfs_buf_t *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
                unsigned int bytes)
index 993218615d008b745a1efb616b0e1876dab6e6ae..ffd265094b4c6a90fdc07d16d5f50b7e1d899600 100644 (file)
@@ -380,69 +380,6 @@ libxfs_ialloc(
        return 0;
 }
 
-static void
-libxfs_iprint(
-       xfs_inode_t             *ip)
-{
-       struct xfs_icdinode     *dip;
-       xfs_extnum_t            i = 0;
-       struct xfs_ifork        *ifp;           /* inode fork pointer */
-       struct xfs_iext_cursor  icur;
-       xfs_bmbt_irec_t         rec;
-
-       printf("Inode %lx\n", (unsigned long)ip);
-       printf("    i_ino %llx\n", (unsigned long long)ip->i_ino);
-
-       if (ip->i_df.if_flags & XFS_IFEXTENTS)
-               printf("EXTENTS ");
-       printf("\n");
-       printf("    i_df.if_bytes %d\n", ip->i_df.if_bytes);
-       printf("    i_df.if_u1.if_root/if_data %lx\n",
-               (unsigned long)ip->i_df.if_u1.if_root);
-       if (ip->i_df.if_flags & XFS_IFEXTENTS) {
-               ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK);
-               for_each_xfs_iext(ifp, &icur, &rec) {
-                       printf("\t%d: startoff %llu, startblock 0x%llx,"
-                               " blockcount %llu, state %d\n",
-                               i, (unsigned long long)rec.br_startoff,
-                               (unsigned long long)rec.br_startblock,
-                               (unsigned long long)rec.br_blockcount,
-                               (int)rec.br_state);
-                       i++;
-               }
-       }
-       printf("    i_df.if_broot %lx\n", (unsigned long)ip->i_df.if_broot);
-       printf("    i_df.if_broot_bytes %x\n", ip->i_df.if_broot_bytes);
-
-       dip = &ip->i_d;
-       printf("\nOn disk portion\n");
-       printf("    di_mode %o\n", VFS_I(ip)->i_mode);
-       printf("    di_version %x\n", (uint)dip->di_version);
-       switch (ip->i_d.di_format) {
-       case XFS_DINODE_FMT_LOCAL:
-               printf("    Inline inode\n");
-               break;
-       case XFS_DINODE_FMT_EXTENTS:
-               printf("    Extents inode\n");
-               break;
-       case XFS_DINODE_FMT_BTREE:
-               printf("    B-tree inode\n");
-               break;
-       default:
-               printf("    Other inode\n");
-               break;
-       }
-       printf("   di_nlink %x\n", VFS_I(ip)->i_nlink);
-       printf("   di_uid %d\n", dip->di_uid);
-       printf("   di_gid %d\n", dip->di_gid);
-       printf("   di_nextents %d\n", dip->di_nextents);
-       printf("   di_size %llu\n", (unsigned long long)dip->di_size);
-       printf("   di_gen %x\n", VFS_I(ip)->i_generation);
-       printf("   di_extsize %d\n", dip->di_extsize);
-       printf("   di_flags %x\n", dip->di_flags);
-       printf("   di_nblocks %llu\n", (unsigned long long)dip->di_nblocks);
-}
-
 /*
  * Writes a modified inode's changes out to the inode's on disk home.
  * Originally based on xfs_iflush_int() from xfs_inode.c in the kernel.
index a402d0a67349fac77a9fd2972366f9d181b85929..292fa518d0198f8851e2420816fbf68653303d11 100644 (file)
@@ -444,29 +444,6 @@ btree_lookup_prev(
        return value;
 }
 
-static void *
-btree_uncached_lookup(
-       struct btree_root       *root,
-       unsigned long           key)
-{
-       /* cursor-less (ie. uncached) lookup */
-       int                     height = root->height - 1;
-       struct btree_node       *node = root->root_node;
-       int                     i;
-       int                     key_found = 0;
-
-       while (height >= 0) {
-               for (i = 0; i < node->num_keys; i++)
-                       if (node->keys[i] >= key) {
-                               key_found = node->keys[i] == key;
-                               break;
-                       }
-               node = node->ptrs[i];
-               height--;
-       }
-       return key_found ? node : NULL;
-}
-
 /* Update functions */
 
 static inline void