Add RFS format support

Change-Id: Ifd1e5ce9875c3eaacc1cec1759b67e672894e279
diff --git a/extendedcommands.c b/extendedcommands.c
index dfd196c..8e9ee54 100644
--- a/extendedcommands.c
+++ b/extendedcommands.c
@@ -41,6 +41,7 @@
 #include "edify/expr.h"
 #include <libgen.h>
 #include "mtdutils/mtdutils.h"
+#include "bmlutils/bmlutils.h"
 
 
 int signature_check_enabled = 1;
@@ -450,6 +451,18 @@
         return -1;
     }
 
+    if (strcmp(fs_type, "rfs") == 0) {
+        if (ensure_path_unmounted(path) != 0) {
+            LOGE("format_volume failed to unmount \"%s\"\n", v->mount_point);
+            return -1;
+        }
+        if (0 != format_rfs_device(device, path)) {
+            LOGE("format_volume: format_rfs_device failed on %s\n", device);
+            return -1;
+        }
+        return 0;
+    }
+ 
     if (strcmp(v->mount_point, path) != 0) {
         return format_unknown_device(v->device, path, NULL);
     }