}
Step::Status StepMountRecover::clean() {
+ recovery::RecoveryFile* recovery_file =
+ context_->recovery_info.get().recovery_file.get();
+ if (!recovery_file) {
+ LOG(ERROR) << "Failed to get recovery info";
+ return Status::RECOVERY_ERROR;
+ }
+
+ if (recovery_file->type() != RequestType::MountUpdate)
+ return Status::OK;
+
UmountPackagePath();
return Status::OK;
}
Step::Status StepMountRecover::undo() {
+ recovery::RecoveryFile* recovery_file =
+ context_->recovery_info.get().recovery_file.get();
+ if (!recovery_file) {
+ LOG(ERROR) << "Failed to get recovery info";
+ return Status::RECOVERY_ERROR;
+ }
+
+ if (recovery_file->type() != RequestType::MountUpdate)
+ return Status::OK;
+
UmountPackagePath();
return Status::OK;
}