Lines Matching refs:parts
390 struct disk_partition *parts; in set_gpt_info() local
448 parts = calloc(sizeof(struct disk_partition), p_count); in set_gpt_info()
449 if (parts == NULL) in set_gpt_info()
464 gen_rand_uuid_str(parts[i].uuid, UUID_STR_FORMAT_STD); in set_gpt_info()
472 if (strnlen(p, max_str_part) >= sizeof(parts[i].uuid)) { in set_gpt_info()
477 strncpy((char *)parts[i].uuid, p, max_str_part); in set_gpt_info()
487 if (strnlen(p, max_str_part) >= sizeof(parts[i].type_guid)) { in set_gpt_info()
493 strncpy((char *)parts[i].type_guid, p, max_str_part); in set_gpt_info()
505 if (strnlen(p, max_str_part) >= sizeof(parts[i].name)) { in set_gpt_info()
509 strncpy((char *)parts[i].name, p, max_str_part); in set_gpt_info()
522 parts[i].size = 0; in set_gpt_info()
525 parts[i].size = lldiv(size_ll, dev_desc->blksz); in set_gpt_info()
536 parts[i].start = lldiv(start_ll, dev_desc->blksz); in set_gpt_info()
540 offset += parts[i].size + parts[i].start; in set_gpt_info()
544 parts[i].bootable = PART_BOOTABLE; in set_gpt_info()
548 *partitions = parts; in set_gpt_info()
555 free(parts); in set_gpt_info()