vold: Add an optional wipe paramter to the volume format command
The new wipe option to the vold format command will invoke BLKDISCARD
on the partition before invoking newfs_msdos. This will be used whenever
a full wipe of the device is wanted, as this is more secure than just
doing newfs_msdos.
Bug: 9392982
Change-Id: Ie106f1b9cc70abc61206006d1821641c27c7ccae
diff --git a/Fat.h b/Fat.h
index e02d88c..19614d1 100644
--- a/Fat.h
+++ b/Fat.h
@@ -26,7 +26,10 @@
bool ro, bool remount, bool executable,
int ownerUid, int ownerGid, int permMask,
bool createLost);
- static int format(const char *fsPath, unsigned int numSectors);
+ static int format(const char *fsPath, unsigned int numSectors, bool wipe);
+
+private:
+ static void wipe(const char *fsPath, unsigned int numSectors);
};
#endif