summaryrefslogtreecommitdiff
path: root/ext4_utils
diff options
context:
space:
mode:
authorPaul Lawrence <paullawrence@google.com>2014-03-03 10:51:58 -0800
committerPaul Lawrence <paullawrence@google.com>2014-03-03 23:59:07 +0000
commit40ce87a70a064eeb462d3c3935422918c1f6114e (patch)
tree54a5c9fcd430befffff9bdcb4a4aed1a2566d97c /ext4_utils
parentda0703c0df9e1a14ec2edf14a286badff70dc8cc (diff)
downloadextras-40ce87a70a064eeb462d3c3935422918c1f6114e.tar.gz
Remove warnings
Remove warnings called by duplicate definition of ALIGN macro. Note that bionic/libc/include/sys/param.h defines ALIGN as #define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES) which is not good - clashes with every other definition of ALIGN. Change-Id: I2d716c41ededd2fa072f944e21d94a0c93ca9c46
Diffstat (limited to 'ext4_utils')
-rw-r--r--ext4_utils/contents.c4
-rw-r--r--ext4_utils/ext4.h2
-rw-r--r--ext4_utils/ext4_utils.h2
-rw-r--r--ext4_utils/ext4fixup.c2
-rw-r--r--ext4_utils/make_ext4fs.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index 80e5692b..4aa287f2 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -45,7 +45,7 @@ static u32 dentry_size(u32 entries, struct dentry *dentries)
unsigned int dentry_len;
for (i = 0; i < entries; i++) {
- dentry_len = 8 + ALIGN(strlen(dentries[i].filename), 4);
+ dentry_len = 8 + EXT4_ALIGN(strlen(dentries[i].filename), 4);
if (len % info.block_size + dentry_len > info.block_size)
len += info.block_size - (len % info.block_size);
len += dentry_len;
@@ -59,7 +59,7 @@ static struct ext4_dir_entry_2 *add_dentry(u8 *data, u32 *offset,
u8 file_type)
{
u8 name_len = strlen(name);
- u16 rec_len = 8 + ALIGN(name_len, 4);
+ u16 rec_len = 8 + EXT4_ALIGN(name_len, 4);
struct ext4_dir_entry_2 *dentry;
u32 start_block = *offset / info.block_size;
diff --git a/ext4_utils/ext4.h b/ext4_utils/ext4.h
index 68b5233a..ac6f97e9 100644
--- a/ext4_utils/ext4.h
+++ b/ext4_utils/ext4.h
@@ -98,7 +98,7 @@ struct ext4_allocation_request {
#define EXT4_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
#define EXT4_INODE_SIZE(s) (((s)->s_rev_level == EXT4_GOOD_OLD_REV) ? EXT4_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
#define EXT4_FIRST_INO(s) (((s)->s_rev_level == EXT4_GOOD_OLD_REV) ? EXT4_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
-#define EXT4_BLOCK_ALIGN(size, blkbits) ALIGN((size), (1 << (blkbits)))
+#define EXT4_BLOCK_ALIGN(size, blkbits) EXT4_ALIGN((size), (1 << (blkbits)))
struct ext4_group_desc
{
diff --git a/ext4_utils/ext4_utils.h b/ext4_utils/ext4_utils.h
index f87a0de7..5ddc8392 100644
--- a/ext4_utils/ext4_utils.h
+++ b/ext4_utils/ext4_utils.h
@@ -62,7 +62,7 @@ extern int force;
#endif
#define DIV_ROUND_UP(x, y) (((x) + (y) - 1)/(y))
-#define ALIGN(x, y) ((y) * DIV_ROUND_UP((x), (y)))
+#define EXT4_ALIGN(x, y) ((y) * DIV_ROUND_UP((x), (y)))
/* XXX */
#define cpu_to_le32(x) (x)
diff --git a/ext4_utils/ext4fixup.c b/ext4_utils/ext4fixup.c
index 0e517655..184cd0d6 100644
--- a/ext4_utils/ext4fixup.c
+++ b/ext4_utils/ext4fixup.c
@@ -739,7 +739,7 @@ int ext4fixup_internal(char *fsdev, int v_flag, int n_flag,
#endif
/* Compute what the new value of inodes_per_blockgroup will be when we're done */
- new_inodes_per_group=ALIGN(info.inodes_per_group,(info.block_size/info.inode_size));
+ new_inodes_per_group=EXT4_ALIGN(info.inodes_per_group,(info.block_size/info.inode_size));
read_inode(fd, EXT4_ROOT_INO, &root_inode);
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index 1c254571..d8d2e11a 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -334,7 +334,7 @@ static u32 compute_inodes_per_group()
u32 blocks = DIV_ROUND_UP(info.len, info.block_size);
u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group);
u32 inodes = DIV_ROUND_UP(info.inodes, block_groups);
- inodes = ALIGN(inodes, (info.block_size / info.inode_size));
+ inodes = EXT4_ALIGN(inodes, (info.block_size / info.inode_size));
/* After properly rounding up the number of inodes/group,
* make sure to update the total inodes field in the info struct.