add make_ext4fs to the libext4_utils
Move the bulk of make_ext4fs into libext4_utils, leaving a main() that
does only option parsing. Add reset functionality so that
make_ext4fs() can be called multiple times within a process.
Change-Id: Ia09a2385eab32bf3ca9eb9257c4f9df2c85e55be
diff --git a/ext4_utils/Android.mk b/ext4_utils/Android.mk
index 5e0a73f..d8a20f9 100644
--- a/ext4_utils/Android.mk
+++ b/ext4_utils/Android.mk
@@ -4,6 +4,7 @@
include $(CLEAR_VARS)
libext4_utils_src_files := \
+ make_ext4fs.c \
ext4_utils.c \
allocate.c \
backed_block.c \
@@ -45,7 +46,7 @@
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := make_ext4fs.c
+LOCAL_SRC_FILES := make_ext4fs_main.c
LOCAL_MODULE := make_ext4fs
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES += libext4_utils libz
@@ -54,7 +55,7 @@
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := make_ext4fs.c
+LOCAL_SRC_FILES := make_ext4fs_main.c
LOCAL_MODULE := make_ext4fs
LOCAL_STATIC_LIBRARIES += libext4_utils libz