Lines Matching refs:part
331 struct cmdline_mtd_partition *part; in parse_cmdline_partitions() local
345 for (part = partitions; part; part = part->next) { in parse_cmdline_partitions()
346 if ((!mtd_id) || (!strcmp(part->mtd_id, mtd_id))) in parse_cmdline_partitions()
350 if (!part) in parse_cmdline_partitions()
353 for (i = 0, offset = 0; i < part->num_parts; i++) { in parse_cmdline_partitions()
354 if (part->parts[i].offset == OFFSET_CONTINUOUS) in parse_cmdline_partitions()
355 part->parts[i].offset = offset; in parse_cmdline_partitions()
357 offset = part->parts[i].offset; in parse_cmdline_partitions()
359 if (part->parts[i].size == SIZE_REMAINING) in parse_cmdline_partitions()
360 part->parts[i].size = master->size - offset; in parse_cmdline_partitions()
362 if (offset + part->parts[i].size > master->size) { in parse_cmdline_partitions()
364 part->mtd_id); in parse_cmdline_partitions()
365 part->parts[i].size = master->size - offset; in parse_cmdline_partitions()
367 offset += part->parts[i].size; in parse_cmdline_partitions()
369 if (part->parts[i].size == 0) { in parse_cmdline_partitions()
371 part->mtd_id); in parse_cmdline_partitions()
372 part->num_parts--; in parse_cmdline_partitions()
373 memmove(&part->parts[i], &part->parts[i + 1], in parse_cmdline_partitions()
374 sizeof(*part->parts) * (part->num_parts - i)); in parse_cmdline_partitions()
379 *pparts = kmemdup(part->parts, sizeof(*part->parts) * part->num_parts, in parse_cmdline_partitions()
384 return part->num_parts; in parse_cmdline_partitions()