summaryrefslogtreecommitdiff
path: root/common/boot_control_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/boot_control_interface.h')
-rw-r--r--common/boot_control_interface.h30
1 files changed, 9 insertions, 21 deletions
diff --git a/common/boot_control_interface.h b/common/boot_control_interface.h
index 392d7851..9bf639a6 100644
--- a/common/boot_control_interface.h
+++ b/common/boot_control_interface.h
@@ -25,6 +25,8 @@
#include <base/callback.h>
#include <base/macros.h>
+#include "update_engine/update_metadata.pb.h"
+
namespace chromeos_update_engine {
// The abstract boot control interface defines the interaction with the
@@ -35,19 +37,6 @@ class BootControlInterface {
public:
using Slot = unsigned int;
- struct PartitionMetadata {
- struct Partition {
- std::string name;
- uint64_t size;
- };
- struct Group {
- std::string name;
- uint64_t size;
- std::vector<Partition> partitions;
- };
- std::vector<Group> groups;
- };
-
static const Slot kInvalidSlot = UINT_MAX;
virtual ~BootControlInterface() = default;
@@ -67,9 +56,9 @@ class BootControlInterface {
// The |slot| number must be between 0 and GetNumSlots() - 1 and the
// |partition_name| is a platform-specific name that identifies a partition on
// every slot. In order to access the dynamic partitions in the target slot,
- // InitPartitionMetadata() must be called (once per payload) prior to calling
- // this function. On success, returns true and stores the block device in
- // |device|.
+ // PreparePartitionsForUpdate() must be called (once per payload) prior to
+ // calling this function. On success, returns true and stores the block device
+ // in |device|.
virtual bool GetPartitionDevice(const std::string& partition_name,
Slot slot,
std::string* device) const = 0;
@@ -96,12 +85,11 @@ class BootControlInterface {
// Initializes the metadata of the underlying partitions for a given |slot|
// and sets up the states for accessing dynamic partitions.
- // |partition_metadata| will be written to the specified |slot| if
+ // Metadata will be written to the specified |slot| if
// |update_metadata| is set.
- virtual bool InitPartitionMetadata(
- Slot slot,
- const PartitionMetadata& partition_metadata,
- bool update_metadata) = 0;
+ virtual bool PreparePartitionsForUpdate(Slot slot,
+ const DeltaArchiveManifest& manifest,
+ bool update_metadata) = 0;
// Do necessary clean-up operations after the whole update.
virtual void Cleanup() = 0;