/* Delete all partitions from parts head list, free memory. */
static void part_delall(struct list_head *head)
/* Delete all partitions from parts head list, free memory. */
static void part_delall(struct list_head *head)
{
	struct list_head *entry, *n;
	struct part_info *part_tmp;
	list_for_each_safe(entry, n, head) {
		part_tmp = list_entry(entry, struct part_info, link);
		list_del(entry);
		free(part_tmp);
	}
}