aboutsummaryrefslogtreecommitdiffstats
path: root/mkfs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-01-13 11:51:33 -0800
committerSteve Kondik <steve@cyngn.com>2016-08-24 11:43:29 -0700
commit3aa929bcd0858ea7940568559045b3a502154846 (patch)
treed798a3936088624a9c37cdf9860e3b75637410b4 /mkfs
parent11c06071f309519f8945221a5511a2be4acfbd7f (diff)
downloadandroid_external_f2fs-tools-3aa929bcd0858ea7940568559045b3a502154846.tar.gz
android_external_f2fs-tools-3aa929bcd0858ea7940568559045b3a502154846.tar.bz2
android_external_f2fs-tools-3aa929bcd0858ea7940568559045b3a502154846.zip
f2fs-tools: avoid failure and warnings for android build
This patch fixes to resolve build failure and warnings when compiling it under AOSP. Change-Id: I26f65615203183ad4d4c54c28fc152042707251b Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/f2fs_format.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index fd61757..2c81ecc 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -697,6 +697,7 @@ static int f2fs_write_super_block(void)
return 0;
}
+#ifndef WITH_ANDROID
static int discard_obsolete_dnode(struct f2fs_node *raw_node, u_int64_t offset)
{
do {
@@ -722,6 +723,7 @@ static int discard_obsolete_dnode(struct f2fs_node *raw_node, u_int64_t offset)
return 0;
}
+#endif
static int f2fs_write_root_inode(void)
{
@@ -789,10 +791,12 @@ static int f2fs_write_root_inode(void)
main_area_node_seg_blk_offset += config.cur_seg[CURSEG_WARM_NODE] *
config.blks_per_seg;
+#ifndef WITH_ANDROID
if (discard_obsolete_dnode(raw_node, main_area_node_seg_blk_offset)) {
free(raw_node);
return -1;
}
+#endif
free(raw_node);
return 0;