boot_control_stub.cc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //
  2. // Copyright (C) 2015 The Android Open Source Project
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. #include "update_engine/common/boot_control_stub.h"
  17. #include <base/logging.h>
  18. using std::string;
  19. namespace chromeos_update_engine {
  20. unsigned int BootControlStub::GetNumSlots() const {
  21. return 0;
  22. }
  23. BootControlInterface::Slot BootControlStub::GetCurrentSlot() const {
  24. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  25. return 0;
  26. }
  27. bool BootControlStub::GetPartitionDevice(const string& partition_name,
  28. Slot slot,
  29. string* device) const {
  30. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  31. return false;
  32. }
  33. bool BootControlStub::IsSlotBootable(Slot slot) const {
  34. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  35. return false;
  36. }
  37. bool BootControlStub::MarkSlotUnbootable(Slot slot) {
  38. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  39. return false;
  40. }
  41. bool BootControlStub::SetActiveBootSlot(Slot slot) {
  42. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  43. return false;
  44. }
  45. bool BootControlStub::MarkBootSuccessfulAsync(
  46. base::Callback<void(bool)> callback) {
  47. // This is expected to be called on update_engine startup.
  48. return false;
  49. }
  50. bool BootControlStub::InitPartitionMetadata(
  51. Slot slot,
  52. const PartitionMetadata& partition_metadata,
  53. bool update_metadata) {
  54. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  55. return false;
  56. }
  57. void BootControlStub::Cleanup() {
  58. LOG(ERROR) << __FUNCTION__ << " should never be called.";
  59. }
  60. } // namespace chromeos_update_engine