diff options
-rw-r--r-- | Android.mk | 9 | ||||
-rw-r--r-- | DirectVolume.h | 7 |
2 files changed, 14 insertions, 2 deletions
@@ -32,6 +32,10 @@ common_shared_libraries := \ include $(CLEAR_VARS) +ifneq ($(BOARD_VOLD_MAX_PARTITIONS),) +LOCAL_CFLAGS += -DVOLD_MAX_PARTITIONS=$(BOARD_VOLD_MAX_PARTITIONS) +endif + LOCAL_MODULE := libvold LOCAL_SRC_FILES := $(common_src_files) @@ -58,6 +62,11 @@ LOCAL_C_INCLUDES := $(common_c_includes) LOCAL_CFLAGS := -Werror=format +ifneq ($(BOARD_VOLD_MAX_PARTITIONS),) +LOCAL_CFLAGS += -DVOLD_MAX_PARTITIONS=$(BOARD_VOLD_MAX_PARTITIONS) +endif + + LOCAL_SHARED_LIBRARIES := $(common_shared_libraries) LOCAL_STATIC_LIBRARIES := libfs_mgr diff --git a/DirectVolume.h b/DirectVolume.h index de1ed8b..dd01561 100644 --- a/DirectVolume.h +++ b/DirectVolume.h @@ -21,13 +21,16 @@ #include "Volume.h" -#define MAX_PARTS 4 +#ifndef VOLD_MAX_PARTITIONS +#define VOLD_MAX_PARTITIONS 4 +#endif typedef android::List<char *> PathCollection; class DirectVolume : public Volume { public: - static const int MAX_PARTITIONS = 4; + static const int MAX_PARTITIONS = VOLD_MAX_PARTITIONS; + protected: PathCollection *mPaths; int mDiskMajor; |