From ee19387905650cab5da7dd97ada5502cd17ac93d Mon Sep 17 00:00:00 2001 From: Andres Morales Date: Tue, 5 Aug 2014 19:49:09 -0700 Subject: Erase PST partition if its marked to be erased. We need to wipe the challenges on this partition if OEM unlock is enabled, as this is a signal that the user has opted out of factory reset protection. go/factory-reset Bug: 16633064 Change-Id: Icb8f1433bf99ca57813f5b72d5a3dd15fa94a263 --- roots.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'roots.h') diff --git a/roots.h b/roots.h index 230d9ded3..b62a5b13a 100644 --- a/roots.h +++ b/roots.h @@ -46,6 +46,11 @@ int format_volume(const char* volume); // mounted (/tmp and /cache) are mounted. Returns 0 on success. int setup_install_mounts(); +// Conditionally wipes the /persistent partition if it's marked +// to wipe. Returns -1 on failure, 1 if the partition was wiped +// and 0 if the partition was not wiped. +int erase_persistent_partition(); + #ifdef __cplusplus } #endif -- cgit v1.2.3