partitionmanager: support delayed adopted storage mount

* On some devices, the external mmc driver will only load the card after
  a certain delay. The original code will break and fail to mount any
  adopted storage in this case.

* Add a special fstab flag to allow the partitionmanager to retry after
  a delay.

Change-Id: I219978850ff3ba7ad9dc7ca96fc30634c9574164
diff --git a/partition.cpp b/partition.cpp
index b55cf49..d08aa5b 100755
--- a/partition.cpp
+++ b/partition.cpp
@@ -162,6 +162,7 @@
 	TWFLAG_RESIZE,
 	TWFLAG_KEYDIRECTORY,
 	TWFLAG_WRAPPEDKEY,
+	TWFLAG_ADOPTED_MOUNT_DELAY,
 };
 
 /* Flags without a trailing '=' are considered dual format flags and can be
@@ -207,6 +208,7 @@
 	{ "resize",                 TWFLAG_RESIZE },
 	{ "keydirectory=",          TWFLAG_KEYDIRECTORY },
 	{ "wrappedkey",             TWFLAG_WRAPPEDKEY },
+	{ "adopted_mount_delay=",   TWFLAG_ADOPTED_MOUNT_DELAY },
 	{ 0,                        0 },
 };
 
@@ -271,6 +273,7 @@
 	Adopted_GUID = "";
 	SlotSelect = false;
 	Key_Directory = "";
+	Adopted_Mount_Delay = 0;
 }
 
 TWPartition::~TWPartition(void) {
@@ -986,6 +989,9 @@
 		case TWFLAG_ALTDEVICE:
 			Alternate_Block_Device = str;
 			break;
+		case TWFLAG_ADOPTED_MOUNT_DELAY:
+			Adopted_Mount_Delay = atoi(str);
+			break;
 		case TWFLAG_KEYDIRECTORY:
 			Key_Directory = str;
 		default: