diff options
Diffstat (limited to 'partition_installer.h')
-rw-r--r-- | partition_installer.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/partition_installer.h b/partition_installer.h index 920af47..1503648 100644 --- a/partition_installer.h +++ b/partition_installer.h @@ -53,17 +53,14 @@ class PartitionInstaller final { static int WipeWritable(const std::string& active_dsu, const std::string& install_dir, const std::string& name); - // Finish a partition installation and release resources. - // If the installation is incomplete or corrupted, the backing image would - // be cleaned up and an error code is returned. - // No method other than FinishInstall() and ~PartitionInstaller() should be - // called after calling this method. - // This method is also called by the destructor to free up resources. - int FinishInstall(); + // Clean up install state if gsid crashed and restarted. + void PostInstallCleanup(); + void PostInstallCleanup(ImageManager* manager); const std::string& install_dir() const { return install_dir_; } private: + int Finish(); int PerformSanityChecks(); int Preallocate(); bool Format(); @@ -85,12 +82,10 @@ class PartitionInstaller final { bool readOnly_; // Remaining data we're waiting to receive for the GSI image. uint64_t gsi_bytes_written_ = 0; + bool succeeded_ = false; uint64_t ashmem_size_ = -1; void* ashmem_data_ = MAP_FAILED; - bool finished_ = false; - int finished_status_ = 0; - std::unique_ptr<MappedDevice> system_device_; }; |