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
(cherry picked from commit 40ed06e850de2dc7cc06c2e647688212563f1ec2)
diff --git a/partition.cpp b/partition.cpp
index b6e789b..5626e5c 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;