summaryrefslogtreecommitdiffstats
path: root/bootloader_message/include
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-11-10 07:07:20 +0100
committerTianjie Xu <xunchang@google.com>2019-11-12 19:53:04 +0100
commit3d57c84476ce542a7d8d623cf1f208efc1a20026 (patch)
tree98792d6c0dee1e8205a425e6519019614d66122d /bootloader_message/include
parentMerge "bootloader_message: Add helpers for handling IBootControl MergeStatus." (diff)
downloadandroid_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.gz
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.bz2
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.lz
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.xz
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.tar.zst
android_bootable_recovery-3d57c84476ce542a7d8d623cf1f208efc1a20026.zip
Diffstat (limited to 'bootloader_message/include')
-rw-r--r--bootloader_message/include/bootloader_message/bootloader_message.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h
index 3a3b862aa..a27e80bcc 100644
--- a/bootloader_message/include/bootloader_message/bootloader_message.h
+++ b/bootloader_message/include/bootloader_message/bootloader_message.h
@@ -212,11 +212,18 @@ struct misc_system_space_layout {
#include <string>
#include <vector>
+// Gets the block device name of /misc partition.
+std::string get_misc_blk_device(std::string* err);
// Return the block device name for the bootloader message partition and waits
// for the device for up to 10 seconds. In case of error returns the empty
// string.
std::string get_bootloader_message_blk_device(std::string* err);
+// Writes |size| bytes of data from buffer |p| to |misc_blk_device| at |offset|. If the write fails,
+// sets the error message in |err|.
+bool write_misc_partition(const void* p, size_t size, const std::string& misc_blk_device,
+ size_t offset, std::string* err);
+
// Read bootloader message into boot. Error message will be set in err.
bool read_bootloader_message(bootloader_message* boot, std::string* err);
@@ -261,14 +268,6 @@ bool read_wipe_package(std::string* package_data, size_t size, std::string* err)
// Write the wipe package into BCB (to offset WIPE_PACKAGE_OFFSET_IN_MISC).
bool write_wipe_package(const std::string& package_data, std::string* err);
-// Reads data from the vendor space in /misc partition, with the given offset and size. Note that
-// offset is in relative to the start of vendor space.
-bool ReadMiscPartitionVendorSpace(void* data, size_t size, size_t offset, std::string* err);
-
-// Writes the given data to the vendor space in /misc partition, at the given offset. Note that
-// offset is in relative to the start of the vendor space.
-bool WriteMiscPartitionVendorSpace(const void* data, size_t size, size_t offset, std::string* err);
-
// Read or write the Virtual A/B message from system space in /misc.
bool ReadMiscVirtualAbMessage(misc_virtual_ab_message* message, std::string* err);
bool WriteMiscVirtualAbMessage(const misc_virtual_ab_message& message, std::string* err);