• Home
  • Raw
  • Download

Lines Matching refs:misc_blk_device

85 static bool read_misc_partition(void* p, size_t size, const std::string& misc_blk_device,  in read_misc_partition()  argument
87 if (!wait_for_device(misc_blk_device, err)) { in read_misc_partition()
90 android::base::unique_fd fd(open(misc_blk_device.c_str(), O_RDONLY)); in read_misc_partition()
92 *err = android::base::StringPrintf("failed to open %s: %s", misc_blk_device.c_str(), in read_misc_partition()
97 *err = android::base::StringPrintf("failed to lseek %s: %s", misc_blk_device.c_str(), in read_misc_partition()
102 *err = android::base::StringPrintf("failed to read %s: %s", misc_blk_device.c_str(), in read_misc_partition()
109 static bool write_misc_partition(const void* p, size_t size, const std::string& misc_blk_device, in write_misc_partition() argument
111 android::base::unique_fd fd(open(misc_blk_device.c_str(), O_WRONLY)); in write_misc_partition()
113 *err = android::base::StringPrintf("failed to open %s: %s", misc_blk_device.c_str(), in write_misc_partition()
118 *err = android::base::StringPrintf("failed to lseek %s: %s", misc_blk_device.c_str(), in write_misc_partition()
123 *err = android::base::StringPrintf("failed to write %s: %s", misc_blk_device.c_str(), in write_misc_partition()
128 *err = android::base::StringPrintf("failed to fsync %s: %s", misc_blk_device.c_str(), in write_misc_partition()
136 std::string misc_blk_device = get_misc_blk_device(err); in get_bootloader_message_blk_device() local
137 if (misc_blk_device.empty()) return ""; in get_bootloader_message_blk_device()
138 if (!wait_for_device(misc_blk_device, err)) return ""; in get_bootloader_message_blk_device()
139 return misc_blk_device; in get_bootloader_message_blk_device()
142 bool read_bootloader_message_from(bootloader_message* boot, const std::string& misc_blk_device, in read_bootloader_message_from() argument
144 return read_misc_partition(boot, sizeof(*boot), misc_blk_device, in read_bootloader_message_from()
149 std::string misc_blk_device = get_misc_blk_device(err); in read_bootloader_message() local
150 if (misc_blk_device.empty()) { in read_bootloader_message()
153 return read_bootloader_message_from(boot, misc_blk_device, err); in read_bootloader_message()
156 bool write_bootloader_message_to(const bootloader_message& boot, const std::string& misc_blk_device, in write_bootloader_message_to() argument
158 return write_misc_partition(&boot, sizeof(boot), misc_blk_device, in write_bootloader_message_to()
163 std::string misc_blk_device = get_misc_blk_device(err); in write_bootloader_message() local
164 if (misc_blk_device.empty()) { in write_bootloader_message()
167 return write_bootloader_message_to(boot, misc_blk_device, err); in write_bootloader_message()
224 std::string misc_blk_device = get_misc_blk_device(err); in read_wipe_package() local
225 if (misc_blk_device.empty()) { in read_wipe_package()
229 return read_misc_partition(&(*package_data)[0], size, misc_blk_device, in read_wipe_package()
234 std::string misc_blk_device = get_misc_blk_device(err); in write_wipe_package() local
235 if (misc_blk_device.empty()) { in write_wipe_package()
238 return write_misc_partition(package_data.data(), package_data.size(), misc_blk_device, in write_wipe_package()
252 auto misc_blk_device = get_misc_blk_device(err); in ReadMiscPartitionVendorSpace() local
253 if (misc_blk_device.empty()) { in ReadMiscPartitionVendorSpace()
256 return read_misc_partition(data, size, misc_blk_device, VENDOR_SPACE_OFFSET_IN_MISC + offset, in ReadMiscPartitionVendorSpace()
265 auto misc_blk_device = get_misc_blk_device(err); in WriteMiscPartitionVendorSpace() local
266 if (misc_blk_device.empty()) { in WriteMiscPartitionVendorSpace()
269 return write_misc_partition(data, size, misc_blk_device, VENDOR_SPACE_OFFSET_IN_MISC + offset, in WriteMiscPartitionVendorSpace()