vold: Add a versioned superblock to secure containers.
Add an un-encrypted superblock to the end of a secure container to
help identify the crypto cipher used. This is required in order to
provide some semblence of versioning, in case we have cause to
change the crypto type on an update - say for example switching
from software to hardware encryption, or from 128 -> a zillion
bit keys.
NOTE: This format is incompatible with previous secure containers.
After this change they will no longer be mountable.
Signed-off-by: San Mehat <san@google.com>
diff --git a/Volume.cpp b/Volume.cpp
index 83c1c0e..07b96a2 100644
--- a/Volume.cpp
+++ b/Volume.cpp
@@ -194,7 +194,7 @@
sprintf(devicePath, "/dev/block/vold/%d:%d",
MAJOR(partNode), MINOR(partNode));
- if (Fat::format(devicePath)) {
+ if (Fat::format(devicePath, 0)) {
LOGE("Failed to format (%s)", strerror(errno));
goto err;
}