summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk9
-rw-r--r--DirectVolume.h7
2 files changed, 14 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index b7a4905..ace0ce7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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;