Lines Matching full:parts

109 static void free_subpart(struct cmdline_parts *parts)  in free_subpart()  argument
113 while (parts->subpart) { in free_subpart()
114 subpart = parts->subpart; in free_subpart()
115 parts->subpart = subpart->next_subpart; in free_subpart()
120 static int parse_parts(struct cmdline_parts **parts, const char *bdevdef) in parse_parts() argument
129 *parts = NULL; in parse_parts()
170 *parts = newparts; in parse_parts()
179 static void cmdline_parts_free(struct cmdline_parts **parts) in cmdline_parts_free() argument
183 while (*parts) { in cmdline_parts_free()
184 next_parts = (*parts)->next_parts; in cmdline_parts_free()
185 free_subpart(*parts); in cmdline_parts_free()
186 kfree(*parts); in cmdline_parts_free()
187 *parts = next_parts; in cmdline_parts_free()
191 static int cmdline_parts_parse(struct cmdline_parts **parts, in cmdline_parts_parse() argument
200 *parts = NULL; in cmdline_parts_parse()
206 next_parts = parts; in cmdline_parts_parse()
223 if (!*parts) { in cmdline_parts_parse()
235 cmdline_parts_free(parts); in cmdline_parts_parse()
239 static struct cmdline_parts *cmdline_parts_find(struct cmdline_parts *parts, in cmdline_parts_find() argument
242 while (parts && strncmp(bdev, parts->name, sizeof(parts->name))) in cmdline_parts_find()
243 parts = parts->next_parts; in cmdline_parts_find()
244 return parts; in cmdline_parts_find()
263 info = &state->parts[slot].info; in add_part()
272 state->parts[slot].has_info = true; in add_part()
277 static int cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, in cmdline_parts_set() argument
284 for (subpart = parts->subpart; subpart; in cmdline_parts_set()
345 for (; slot < state->limit && state->parts[slot].has_info; slot++) { in cmdline_parts_verifier()
346 for (i = slot+1; i < state->limit && state->parts[i].has_info; in cmdline_parts_verifier()
348 if (has_overlaps(state->parts[slot].from, in cmdline_parts_verifier()
349 state->parts[slot].size, in cmdline_parts_verifier()
350 state->parts[i].from, in cmdline_parts_verifier()
351 state->parts[i].size)) { in cmdline_parts_verifier()
358 state->parts[slot].info.volname, in cmdline_parts_verifier()
359 (u64)state->parts[slot].from << 9, in cmdline_parts_verifier()
360 (u64)state->parts[slot].size << 9, in cmdline_parts_verifier()
361 state->parts[i].info.volname, in cmdline_parts_verifier()
362 (u64)state->parts[i].from << 9, in cmdline_parts_verifier()
363 (u64)state->parts[i].size << 9); in cmdline_parts_verifier()
379 struct cmdline_parts *parts; in cmdline_partition() local
395 parts = cmdline_parts_find(bdev_parts, state->disk->disk_name); in cmdline_partition()
396 if (!parts) in cmdline_partition()
401 cmdline_parts_set(parts, disk_size, state); in cmdline_partition()