Lines Matching refs:slice
69 static void g_flashmap_print(struct g_flashmap_slice *slice);
75 g_flashmap_print(struct g_flashmap_slice *slice) in g_flashmap_print() argument
78 printf("%08jx-%08jx: %s (%juKB)\n", (uintmax_t)slice->sl_start, in g_flashmap_print()
79 (uintmax_t)slice->sl_end, slice->sl_name, in g_flashmap_print()
80 (uintmax_t)(slice->sl_end - slice->sl_start) / 1024); in g_flashmap_print()
87 struct g_flashmap_slice *slice; in g_flashmap_modify() local
93 STAILQ_FOREACH(slice, slices, sl_link) { in g_flashmap_modify()
96 g_flashmap_print(slice); in g_flashmap_modify()
100 slice->sl_start, in g_flashmap_modify()
101 slice->sl_end - slice->sl_start + 1, in g_flashmap_modify()
102 secsize, FLASH_SLICES_FMT, gp->name, slice->sl_name); in g_flashmap_modify()
109 STAILQ_FOREACH(slice, slices, sl_link) { in g_flashmap_modify()
111 gfp->labels[i] = strdup(slice->sl_name, M_FLASHMAP); in g_flashmap_modify()
113 slice->sl_start, in g_flashmap_modify()
114 slice->sl_end - slice->sl_start + 1, in g_flashmap_modify()
115 secsize, "%ss.%s", gp->name, slice->sl_name); in g_flashmap_modify()
130 struct g_flashmap_slice *slice, *slice_temp; in g_flashmap_taste() local
172 STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) in g_flashmap_taste()
173 free(slice, M_FLASHMAP); in g_flashmap_taste()
187 struct g_flashmap_slice *slice; in g_flashmap_load() local
194 slice = malloc(sizeof(struct g_flashmap_slice), in g_flashmap_load()
197 slice->sl_name = slices[i].label; in g_flashmap_load()
198 slice->sl_start = slices[i].base; in g_flashmap_load()
199 slice->sl_end = slices[i].base + slices[i].size - 1; in g_flashmap_load()
201 STAILQ_INSERT_TAIL(head, slice, sl_link); in g_flashmap_load()