Lines Matching refs:slot_data
78 AvbSlotVerifyData* slot_data) {
223 /* If it worked and something was loaded, copy to slot_data. */
227 if (slot_data->num_loaded_partitions == MAX_NUMBER_OF_LOADED_PARTITIONS) {
233 &slot_data->loaded_partitions[slot_data->num_loaded_partitions++];
251 AvbSlotVerifyData* slot_data) {
313 /* Move to slot_data. */
314 if (slot_data->num_loaded_partitions == MAX_NUMBER_OF_LOADED_PARTITIONS) {
320 &slot_data->loaded_partitions[slot_data->num_loaded_partitions++];
351 AvbSlotVerifyData* slot_data,
374 avb_assert(slot_data != NULL);
487 slot_data,
634 avb_assert(slot_data->num_vbmeta_images == 0);
636 avb_assert(slot_data->num_vbmeta_images > 0);
638 if (slot_data->num_vbmeta_images == MAX_NUMBER_OF_VBMETA_IMAGES) {
643 vbmeta_image_data = &slot_data->vbmeta_images[slot_data->num_vbmeta_images++];
671 ops, requested_partitions, ab_suffix, slot_data);
709 slot_data);
765 slot_data,
821 if (slot_data->cmdline == NULL) {
822 slot_data->cmdline =
824 if (slot_data->cmdline == NULL) {
828 avb_memcpy(slot_data->cmdline,
833 size_t orig_size = avb_strlen(slot_data->cmdline);
841 avb_memcpy(new_cmdline, slot_data->cmdline, orig_size);
846 avb_free(slot_data->cmdline);
847 slot_data->cmdline = new_cmdline;
867 slot_data->rollback_indexes[rollback_index_location] =
958 static int cmdline_append_option(AvbSlotVerifyData* slot_data,
968 if (slot_data->cmdline != NULL) {
969 offset = avb_strlen(slot_data->cmdline);
980 avb_memcpy(new_cmdline, slot_data->cmdline, offset - 1);
986 if (slot_data->cmdline != NULL) {
987 avb_free(slot_data->cmdline);
989 slot_data->cmdline = new_cmdline;
1019 static int cmdline_append_version(AvbSlotVerifyData* slot_data,
1035 return cmdline_append_option(slot_data, key, combined);
1038 static int cmdline_append_uint64_base10(AvbSlotVerifyData* slot_data,
1043 return cmdline_append_option(slot_data, key, digits);
1046 static int cmdline_append_hex(AvbSlotVerifyData* slot_data,
1066 ret = cmdline_append_option(slot_data, key, hex_data);
1073 AvbSlotVerifyData* slot_data,
1083 if (!cmdline_append_option(slot_data,
1091 if (!cmdline_append_version(slot_data,
1109 if (!cmdline_append_option(slot_data,
1128 for (n = 0; n < slot_data->num_vbmeta_images; n++) {
1130 slot_data->vbmeta_images[n].vbmeta_data,
1131 slot_data->vbmeta_images[n].vbmeta_size);
1132 total_size += slot_data->vbmeta_images[n].vbmeta_size;
1135 slot_data, "androidboot.vbmeta.hash_alg", "sha256") ||
1137 slot_data, "androidboot.vbmeta.size", total_size) ||
1138 !cmdline_append_hex(slot_data,
1153 for (n = 0; n < slot_data->num_vbmeta_images; n++) {
1155 slot_data->vbmeta_images[n].vbmeta_data,
1156 slot_data->vbmeta_images[n].vbmeta_size);
1157 total_size += slot_data->vbmeta_images[n].vbmeta_size;
1160 slot_data, "androidboot.vbmeta.hash_alg", "sha512") ||
1162 slot_data, "androidboot.vbmeta.size", total_size) ||
1163 !cmdline_append_hex(slot_data,
1186 slot_data, "androidboot.vbmeta.invalidate_on_error", "yes")) {
1212 slot_data->cmdline, "$(ANDROID_VERITY_MODE)", dm_verity_mode);
1213 avb_free(slot_data->cmdline);
1214 slot_data->cmdline = new_ret;
1215 if (slot_data->cmdline == NULL) {
1221 slot_data, "androidboot.veritymode", verity_mode)) {
1240 AvbSlotVerifyData* slot_data = NULL;
1273 slot_data = avb_calloc(sizeof(AvbSlotVerifyData));
1274 if (slot_data == NULL) {
1278 slot_data->vbmeta_images =
1280 if (slot_data->vbmeta_images == NULL) {
1284 slot_data->loaded_partitions =
1286 if (slot_data->loaded_partitions == NULL) {
1301 slot_data,
1309 if (avb_strcmp(slot_data->vbmeta_images[0].partition_name, "vbmeta") != 0) {
1311 avb_strcmp(slot_data->vbmeta_images[0].partition_name, "boot") == 0);
1317 (const AvbVBMetaImageHeader*)slot_data->vbmeta_images[0].vbmeta_data,
1321 slot_data->ab_suffix = avb_strdup(ab_suffix);
1322 if (slot_data->ab_suffix == NULL) {
1336 avb_assert(slot_data->cmdline == NULL);
1337 slot_data->cmdline =
1339 if (slot_data->cmdline == NULL) {
1348 slot_data,
1359 if (slot_data->cmdline != NULL) {
1362 ops, slot_data->cmdline, ab_suffix, using_boot_for_vbmeta);
1367 avb_free(slot_data->cmdline);
1368 slot_data->cmdline = new_cmdline;
1372 *out_data = slot_data;
1374 avb_slot_verify_data_free(slot_data);
1385 if (slot_data != NULL) {
1386 avb_slot_verify_data_free(slot_data);