Lines Matching full:parts

105 static void free_subpart(struct cmdline_parts *parts)  in free_subpart()  argument
109 while (parts->subpart) { in free_subpart()
110 subpart = parts->subpart; in free_subpart()
111 parts->subpart = subpart->next_subpart; in free_subpart()
116 static int parse_parts(struct cmdline_parts **parts, char *bdevdef) in parse_parts() argument
123 *parts = NULL; in parse_parts()
155 *parts = newparts; in parse_parts()
164 static void cmdline_parts_free(struct cmdline_parts **parts) in cmdline_parts_free() argument
168 while (*parts) { in cmdline_parts_free()
169 next_parts = (*parts)->next_parts; in cmdline_parts_free()
170 free_subpart(*parts); in cmdline_parts_free()
171 kfree(*parts); in cmdline_parts_free()
172 *parts = next_parts; in cmdline_parts_free()
176 static int cmdline_parts_parse(struct cmdline_parts **parts, in cmdline_parts_parse() argument
185 *parts = NULL; in cmdline_parts_parse()
191 next_parts = parts; in cmdline_parts_parse()
201 if (!*parts) { in cmdline_parts_parse()
213 cmdline_parts_free(parts); in cmdline_parts_parse()
217 static struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, in cmdline_parts_find() argument
220 while (parts && strncmp(bdev, parts->name, sizeof(parts->name))) in cmdline_parts_find()
221 parts = parts->next_parts; in cmdline_parts_find()
222 return parts; in cmdline_parts_find()
240 info = &state->parts[slot].info; in add_part()
247 state->parts[slot].has_info = true; in add_part()
252 static int cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, in cmdline_parts_set() argument
259 for (subpart = parts->subpart; subpart; in cmdline_parts_set()
320 for (; slot < state->limit && state->parts[slot].has_info; slot++) { in cmdline_parts_verifier()
321 for (i = slot+1; i < state->limit && state->parts[i].has_info; in cmdline_parts_verifier()
323 if (has_overlaps(state->parts[slot].from, in cmdline_parts_verifier()
324 state->parts[slot].size, in cmdline_parts_verifier()
325 state->parts[i].from, in cmdline_parts_verifier()
326 state->parts[i].size)) { in cmdline_parts_verifier()
333 state->parts[slot].info.volname, in cmdline_parts_verifier()
334 (u64)state->parts[slot].from << 9, in cmdline_parts_verifier()
335 (u64)state->parts[slot].size << 9, in cmdline_parts_verifier()
336 state->parts[i].info.volname, in cmdline_parts_verifier()
337 (u64)state->parts[i].from << 9, in cmdline_parts_verifier()
338 (u64)state->parts[i].size << 9); in cmdline_parts_verifier()
354 struct cmdline_parts *parts; in cmdline_partition() local
370 parts = cmdline_parts_find(bdev_parts, state->disk->disk_name); in cmdline_partition()
371 if (!parts) in cmdline_partition()
376 cmdline_parts_set(parts, disk_size, state); in cmdline_partition()