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

Signed-off-by: Jaegeuk Kim <[email protected]>
---
 fsck/main.c       | 11 ++++++++++-
 include/f2fs_fs.h |  5 +++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/fsck/main.c b/fsck/main.c
index 543c10f..9d9cc0c 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -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);
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 2b39d12..7e766a8 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -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>
-- 
2.15.0.403.gc27cc4dac6-goog


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to