return sys_write_buf(PARTITION_AB_PATH, next_partition_ab);
}
+static int get_boot_mode(char *buffer, const int max_len)
+{
+ char scan_format[32] = { 0, };
+ int ret = 0;
+
+ snprintf(scan_format, sizeof(scan_format), "bootmode=%%%ds", max_len - 1);
+
+ ret = libsys_parse_cmdline_scanf(scan_format, buffer);
+
+ if (ret <= 0) {
+ return -ENOENT;
+ }
+
+ return 0;
+}
+
static int set_partition_ab_cloned(void)
{
return sys_write_buf(PARTITION_AB_CLONED_PATH, "1");
return -ENOMEM;
board_funcs->get_device_serial_number = get_device_serial_number;
+ board_funcs->get_boot_mode = get_boot_mode;
board_funcs->get_current_partition = get_current_partition;
board_funcs->switch_partition = switch_partition;
board_funcs->set_partition_ab_cloned = set_partition_ab_cloned;