recovery: Add wipe system partition option

Change-Id: Id606cef249a7464037443de6265055803c290d82
diff --git a/install/wipe_data.cpp b/install/wipe_data.cpp
index ed67207..6561d39 100644
--- a/install/wipe_data.cpp
+++ b/install/wipe_data.cpp
@@ -124,4 +124,15 @@
   }
   ui->Print("Data wipe %s.\n", success ? "complete" : "failed");
   return success;
-}
\ No newline at end of file
+}
+
+bool WipeSystem(RecoveryUI* ui, const std::function<bool()>& confirm_func) {
+  if (confirm_func && !confirm_func()) {
+    return false;
+  }
+
+  ui->Print("\n-- Wiping system...\n");
+  bool success = EraseVolume(get_system_root().c_str(), ui, false);
+  ui->Print("System wipe %s.\n", success ? "complete" : "failed");
+  return success;
+}