f2fs-tools: build tools selectively

This patch enables to build tools except mkfs.f2fs selectively.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2017-11-29 17:15:18 -08:00
parent e813df3194
commit 3a55b82af8
2 changed files with 15 additions and 1 deletions

View File

@ -637,23 +637,32 @@ fsck_again:
case FSCK:
do_fsck(sbi);
break;
#ifdef WITH_DUMP
case DUMP:
do_dump(sbi);
break;
#ifndef WITH_ANDROID
#endif
#ifdef WITH_DEFRAG
case DEFRAG:
ret = do_defrag(sbi);
if (ret)
goto out_err;
break;
#endif
#ifdef WITH_RESIZE
case RESIZE:
if (do_resize(sbi))
goto out_err;
break;
#endif
#ifdef WITH_SLOAD
case SLOAD:
do_sload(sbi);
break;
#endif
default:
ERR_MSG("Wrong program name\n");
ASSERT(0);
}
f2fs_do_umount(sbi);

View File

@ -22,6 +22,11 @@
#ifdef WITH_ANDROID
#include <android_config.h>
#else
#define WITH_DUMP
#define WITH_DEFRAG
#define WITH_RESIZE
#define WITH_SLOAD
#endif
#include <inttypes.h>