]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: use "unsigned short" instead of ushort
authorTheodore Ts'o <tytso@mit.edu>
Mon, 3 Aug 2015 00:17:02 +0000 (10:17 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 3 Aug 2015 00:17:02 +0000 (10:17 +1000)
Android's bionic libc doesn't define ushort.  There isn't a real
benefit (other than perhaps conciseness) to use ushort over "unsigned
short", and it's only used in a handful of files in xfsprogs.  So
change over to using unsigned short everywhere.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
include/xfs_log_recover.h
libxfs/logitem.c
libxfs/xfs_ialloc.c
libxfs/xfs_inode_buf.h
libxfs/xfs_log_format.h
logprint/log_misc.c

index 1c55ccbb379d0b2a7dc744cb3c869ce51ed5b14f..2fea63d373214cd3a4bd362df9573cd3726c93d2 100644 (file)
@@ -52,7 +52,7 @@ typedef struct xlog_recover {
        struct list_head        r_itemq;        /* q for items */
 } xlog_recover_t;
 
-#define ITEM_TYPE(i)   (*(ushort *)(i)->ri_buf[0].i_addr)
+#define ITEM_TYPE(i)   (*(unsigned short *)(i)->ri_buf[0].i_addr)
 
 /*
  * This is the number of entries in the l_buf_cancel_table used during
index ea85e72930c0d7ad932f4c0bbb1b6b2a91de220a..7e93f609e636ca17898409ce01297180fa766aac 100644 (file)
@@ -122,7 +122,7 @@ xfs_buf_item_init(
        bip->bli_buf = bp;
        bip->bli_format.blf_type = XFS_LI_BUF;
        bip->bli_format.blf_blkno = (__int64_t)XFS_BUF_ADDR(bp);
-       bip->bli_format.blf_len = (ushort)BTOBB(XFS_BUF_COUNT(bp));
+       bip->bli_format.blf_len = (unsigned short)BTOBB(XFS_BUF_COUNT(bp));
        XFS_BUF_SET_FSPRIVATE(bp, bip);
 }
 
index 05ecd061768c7085e93e095ca1474f00ba2f2954..eebf5eed3525e07ebec6742b11c3e33a36a338f9 100644 (file)
@@ -2333,7 +2333,7 @@ xfs_imap(
 
                imap->im_blkno = XFS_AGB_TO_DADDR(mp, agno, agbno);
                imap->im_len = XFS_FSB_TO_BB(mp, 1);
-               imap->im_boffset = (ushort)(offset << mp->m_sb.sb_inodelog);
+               imap->im_boffset = (unsigned short)(offset << mp->m_sb.sb_inodelog);
                return 0;
        }
 
@@ -2361,7 +2361,7 @@ out_map:
 
        imap->im_blkno = XFS_AGB_TO_DADDR(mp, agno, cluster_agbno);
        imap->im_len = XFS_FSB_TO_BB(mp, blks_per_cluster);
-       imap->im_boffset = (ushort)(offset << mp->m_sb.sb_inodelog);
+       imap->im_boffset = (unsigned short)(offset << mp->m_sb.sb_inodelog);
 
        /*
         * If the inode number maps to a block outside the bounds
index dd3803475a0f8eb445e27e4a6dd6f8e08ec81c8a..56bc65e442f7943f4b6a9b2c9b9332f6b643b28e 100644 (file)
@@ -28,8 +28,8 @@ struct xfs_icdinode;
  */
 struct xfs_imap {
        xfs_daddr_t     im_blkno;       /* starting BB of inode chunk */
-       ushort          im_len;         /* length in BBs of inode chunk */
-       ushort          im_boffset;     /* inode offset in block in bytes */
+       unsigned short  im_len;         /* length in BBs of inode chunk */
+       unsigned short  im_boffset;     /* inode offset in block in bytes */
 };
 
 int    xfs_imap_to_bp(struct xfs_mount *, struct xfs_trans *,
index 2653146904153178d474172bcacfec55e7742907..db8ceebf44e69ca01e6f8bf7533621f81df63a13 100644 (file)
@@ -456,8 +456,8 @@ static inline uint xfs_icdinode_size(int version)
 typedef struct xfs_buf_log_format {
        unsigned short  blf_type;       /* buf log item type indicator */
        unsigned short  blf_size;       /* size of this item */
-       ushort          blf_flags;      /* misc state */
-       ushort          blf_len;        /* number of blocks in this buf */
+       unsigned short  blf_flags;      /* misc state */
+       unsigned short  blf_len;        /* number of blocks in this buf */
        __int64_t       blf_blkno;      /* starting blkno of this buf */
        unsigned int    blf_map_size;   /* used size of data bitmap in words */
        unsigned int    blf_data_map[XFS_BLF_DATAMAP_SIZE]; /* dirty bitmap */
index 7eb9a607f4393cac6a06f0fd6f0014b9489992a9..d76145c04014ca7ba6981e2a9b15ea45ed8310a9 100644 (file)
@@ -254,7 +254,7 @@ xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops)
     xfs_buf_log_format_t lbuf;
     int                         size, blen, map_size, struct_size;
     __be64              x, y;
-    ushort              flags;
+    unsigned short      flags;
 
     /*
      * memmove to ensure 8-byte alignment for the long longs in