-/* $OpenBSD: part.c,v 1.156 2023/04/11 16:34:51 krw Exp $ */
+/* $OpenBSD: part.c,v 1.157 2023/04/11 17:26:59 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
};
const struct gpt_type *find_gpt_type(const struct uuid *);
-const char *find_uuid_desc(const struct uuid *);
+const char *find_gpt_desc(const struct gpt_type *);
int gpt_item(const unsigned int);
int uuid_attr(const struct uuid *);
const struct mbr_type *find_mbr_type(const int);
-const char *find_mbr_desc(const int);
+const char *find_mbr_desc(const struct mbr_type *);
int mbr_item(const unsigned int);
void print_menu(int (*)(const unsigned int),
}
const char *
-find_uuid_desc(const struct uuid *uuid)
+find_gpt_desc(const struct gpt_type *gt)
{
- const struct gpt_type *gt;
unsigned int i;
- gt = find_gpt_type(uuid);
if (gt != NULL) {
if (gt->gt_desc != NULL)
return gt->gt_desc;
}
const char *
-find_mbr_desc(const int mbrid)
+find_mbr_desc(const struct mbr_type *mt)
{
- const struct mbr_type *mt;
unsigned int i;
- mt = find_mbr_type(mbrid);
if (mt != NULL) {
if (mt->mt_desc != NULL)
return mt->mt_desc;
size = units_size(units, prt->prt_ns, &ut);
PRT_lba_to_chs(prt, &start, &end);
- desc = find_mbr_desc(prt->prt_id);
+ desc = find_mbr_desc(find_mbr_type(prt->prt_id));
printf("%c%1d: %.2X %6llu %3u %3u - %6llu %3u %3u [%12llu:%12.0f%s] "
"%-15s\n", (prt->prt_flag == DOSACTIVE) ? '*' : ' ', num,
char *str;
uint32_t status;
- desc = find_uuid_desc(uuid);
+ desc = find_gpt_desc(find_gpt_type(uuid));
if (desc != NULL)
return desc;