Extend vold support for creating ext4 images.

Augment the Ext4::format function to take
a mountpoint parameter. This will then
be passed to make_ext4fs through the
-a option to allow proper security labeling.

Change-Id: Ic26703406a2c463c12e32c8103a0c75c727b7d29
diff --git a/Ext4.cpp b/Ext4.cpp
index 290489e..4ec0616 100644
--- a/Ext4.cpp
+++ b/Ext4.cpp
@@ -67,16 +67,18 @@
     return rc;
 }
 
-int Ext4::format(const char *fsPath) {
+int Ext4::format(const char *fsPath, const char *mountpoint) {
     int fd;
-    const char *args[4];
+    const char *args[6];
     int rc;
 
     args[0] = MKEXT4FS_PATH;
     args[1] = "-J";
-    args[2] = fsPath;
-    args[3] = NULL;
-    rc = logwrap(3, args, 1);
+    args[2] = "-a";
+    args[3] = mountpoint;
+    args[4] = fsPath;
+    args[5] = NULL;
+    rc = logwrap(5, args, 1);
 
     if (rc == 0) {
         SLOGI("Filesystem (ext4) formatted OK");