partition: set fbe.data.wrappedkey automatically via flag
In change I79c2855d577156670b45c10c7c7b1fcd9fece8d9 we introduced a
property to enable wrappedkey mode. This change supports an extra
`wrappedkey` flag in fstab to automatically set the property to true.
Change-Id: I4f060d4ed6b2a5680649b8746dfa7fd903fe2d35
diff --git a/partition.cpp b/partition.cpp
index 9ed0ebc..ba44bd7 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -158,6 +158,7 @@
TWFLAG_FORMATTABLE,
TWFLAG_RESIZE,
TWFLAG_KEYDIRECTORY,
+ TWFLAG_WRAPPEDKEY,
};
/* Flags without a trailing '=' are considered dual format flags and can be
@@ -202,6 +203,7 @@
{ "formattable", TWFLAG_FORMATTABLE },
{ "resize", TWFLAG_RESIZE },
{ "keydirectory=", TWFLAG_KEYDIRECTORY },
+ { "wrappedkey", TWFLAG_WRAPPEDKEY },
{ 0, 0 },
};
@@ -883,6 +885,13 @@
LOGINFO("FBE contents '%s', filenames '%s'\n", FBE_contents.c_str(), FBE_filenames.c_str());
}
break;
+ case TWFLAG_WRAPPEDKEY:
+ // Set fbe.data.wrappedkey to true
+ {
+ property_set("fbe.data.wrappedkey", "true");
+ LOGINFO("FBE wrapped key enabled\n");
+ }
+ break;
case TWFLAG_FLASHIMG:
Can_Flash_Img = val;
break;