Lines Matching refs:boot
132 bool read_bootloader_message_from(bootloader_message* boot, const std::string& misc_blk_device, in read_bootloader_message_from() argument
134 return read_misc_partition(boot, sizeof(*boot), misc_blk_device, in read_bootloader_message_from()
138 bool read_bootloader_message(bootloader_message* boot, std::string* err) { in read_bootloader_message() argument
143 return read_bootloader_message_from(boot, misc_blk_device, err); in read_bootloader_message()
152 bool write_bootloader_message_to(const bootloader_message& boot, const std::string& misc_blk_device, in write_bootloader_message_to() argument
154 return write_misc_partition(&boot, sizeof(boot), misc_blk_device, in write_bootloader_message_to()
158 bool write_bootloader_message(const bootloader_message& boot, std::string* err) { in write_bootloader_message() argument
163 return write_bootloader_message_to(boot, misc_blk_device, err); in write_bootloader_message()
173 bootloader_message boot = {}; in clear_bootloader_message() local
174 return write_bootloader_message(boot, err); in clear_bootloader_message()
178 bootloader_message boot = {}; in write_bootloader_message() local
179 update_bootloader_message_in_struct(&boot, options); in write_bootloader_message()
181 return write_bootloader_message(boot, err); in write_bootloader_message()
185 bootloader_message boot; in update_bootloader_message() local
186 if (!read_bootloader_message(&boot, err)) { in update_bootloader_message()
189 update_bootloader_message_in_struct(&boot, options); in update_bootloader_message()
191 return write_bootloader_message(boot, err); in update_bootloader_message()
194 bool update_bootloader_message_in_struct(bootloader_message* boot, in update_bootloader_message_in_struct() argument
196 if (!boot) return false; in update_bootloader_message_in_struct()
198 memset(boot->command, 0, sizeof(boot->command)); in update_bootloader_message_in_struct()
199 memset(boot->recovery, 0, sizeof(boot->recovery)); in update_bootloader_message_in_struct()
201 strlcpy(boot->command, "boot-recovery", sizeof(boot->command)); in update_bootloader_message_in_struct()
202 strlcpy(boot->recovery, "recovery\n", sizeof(boot->recovery)); in update_bootloader_message_in_struct()
204 strlcat(boot->recovery, s.c_str(), sizeof(boot->recovery)); in update_bootloader_message_in_struct()
206 strlcat(boot->recovery, "\n", sizeof(boot->recovery)); in update_bootloader_message_in_struct()
213 bootloader_message boot; in write_reboot_bootloader() local
214 if (!read_bootloader_message(&boot, err)) { in write_reboot_bootloader()
217 if (boot.command[0] != '\0') { in write_reboot_bootloader()
221 strlcpy(boot.command, "bootonce-bootloader", sizeof(boot.command)); in write_reboot_bootloader()
222 return write_bootloader_message(boot, err); in write_reboot_bootloader()