diff options
author | David Zeuthen <zeuthen@chromium.org> | 2013-04-29 13:42:47 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-30 19:03:07 -0700 |
commit | a99981fda75fe0b17e96c700e3ddc93eca1cebe5 (patch) | |
tree | 88ec1486cf36f378acaf666c61a56ea533966caa /filesystem_copier_action.cc | |
parent | 8a075a75a13a2b182c229f3095c20e69f8f8f999 (diff) |
Rename ActionExitCode to ErrorCode
Nowadays ActionExitCode is used throughout the codebase so use a more
generic name to reflect this.
BUG=chromium:216507
TEST=unit tests pass
Change-Id: I23d1d7e2676443251dbc42ed137fd018aadfa8a3
Reviewed-on: https://gerrit.chromium.org/gerrit/49512
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Diffstat (limited to 'filesystem_copier_action.cc')
-rw-r--r-- | filesystem_copier_action.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/filesystem_copier_action.cc b/filesystem_copier_action.cc index 1561f937..7024b679 100644 --- a/filesystem_copier_action.cc +++ b/filesystem_copier_action.cc @@ -73,7 +73,7 @@ void FilesystemCopierAction::PerformAction() { // No copy or hash verification needed. Done! if (HasOutputPipe()) SetOutputObject(install_plan_); - abort_action_completer.set_code(kActionCodeSuccess); + abort_action_completer.set_code(kErrorCodeSuccess); return; } @@ -132,7 +132,7 @@ bool FilesystemCopierAction::IsCleanupPending() const { return (src_stream_ != NULL); } -void FilesystemCopierAction::Cleanup(ActionExitCode code) { +void FilesystemCopierAction::Cleanup(ErrorCode code) { for (int i = 0; i < 2; i++) { g_object_unref(canceller_[i]); canceller_[i] = NULL; @@ -145,7 +145,7 @@ void FilesystemCopierAction::Cleanup(ActionExitCode code) { } if (cancelled_) return; - if (code == kActionCodeSuccess && HasOutputPipe()) + if (code == kErrorCodeSuccess && HasOutputPipe()) SetOutputObject(install_plan_); processor_->ActionComplete(this, code); } @@ -244,7 +244,7 @@ void FilesystemCopierAction::SpawnAsyncActions() { } if (failed_ || cancelled_) { if (!reading && !writing) { - Cleanup(kActionCodeError); + Cleanup(kErrorCodeError); } return; } @@ -278,18 +278,18 @@ void FilesystemCopierAction::SpawnAsyncActions() { } if (!reading && !writing) { // We're done! - ActionExitCode code = kActionCodeSuccess; + ErrorCode code = kErrorCodeSuccess; if (hasher_.Finalize()) { LOG(INFO) << "Hash: " << hasher_.hash(); if (verify_hash_) { if (copying_kernel_install_path_) { if (install_plan_.kernel_hash != hasher_.raw_hash()) { - code = kActionCodeNewKernelVerificationError; + code = kErrorCodeNewKernelVerificationError; LOG(ERROR) << "New kernel verification failed."; } } else { if (install_plan_.rootfs_hash != hasher_.raw_hash()) { - code = kActionCodeNewRootfsVerificationError; + code = kErrorCodeNewRootfsVerificationError; LOG(ERROR) << "New rootfs verification failed."; } } @@ -302,7 +302,7 @@ void FilesystemCopierAction::SpawnAsyncActions() { } } else { LOG(ERROR) << "Unable to finalize the hash."; - code = kActionCodeError; + code = kErrorCodeError; } Cleanup(code); } |