-/* $OpenBSD: cmd.c,v 1.159 2022/04/28 13:22:19 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.160 2022/05/06 23:53:43 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
if (PRT_protected_guid(&gp[pn].gp_type)) {
printf("can't edit partition type %s\n",
- PRT_uuid_to_typename(&gp[pn].gp_type));
+ PRT_uuid_to_sname(&gp[pn].gp_type));
return -1;
}
gp[pn].gp_type = *ask_uuid(&gp[pn].gp_type);
if (PRT_protected_guid(&gp[pn].gp_type)) {
printf("can't change partition type to %s\n",
- PRT_uuid_to_typename(&gp[pn].gp_type));
+ PRT_uuid_to_sname(&gp[pn].gp_type));
return -1;
}
uuid_create_nil(&uuid, NULL);
goto done;
default:
- uuid = *PRT_type_to_uuid(num);
+ uuid = *PRT_type_to_guid(num);
if (uuid_is_nil(&uuid, NULL) == 0)
goto done;
printf("'%s' has no associated UUID\n", lbuf);
-/* $OpenBSD: gpt.c,v 1.76 2022/04/28 13:22:19 krw Exp $ */
+/* $OpenBSD: gpt.c,v 1.77 2022/05/06 23:53:43 krw Exp $ */
/*
* Copyright (c) 2015 Markus Muller <mmu@grummel.net>
* Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org>
size = units_size(units, sectors, &ut);
printf("%c%3u: %-36s [%12lld: %12.0f%s]\n",
gp[pn].gp_attrs & GPTDOSACTIVE ? '*' : ' ', pn,
- PRT_uuid_to_typename(&gp[pn].gp_type), gp[pn].gp_lba_start,
+ PRT_uuid_to_sname(&gp[pn].gp_type), gp[pn].gp_lba_start,
size, ut->ut_abbr);
if (verbosity == VERBOSE) {
-/* $OpenBSD: part.c,v 1.126 2022/05/06 14:22:49 krw Exp $ */
+/* $OpenBSD: part.c,v 1.127 2022/05/06 23:53:43 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
if (strncmp(str, efistr, UUID_STR_LEN) == 0) {
/* Look for partitions indicating a need to preserve EFI Sys */
for (pn = 0; pn < gh.gh_part_num; pn++) {
- typename = PRT_uuid_to_typename(&gp[pn].gp_type);
+ typename = PRT_uuid_to_sname(&gp[pn].gp_type);
if (strncmp(typename, "APFS ", 5))
continue;
rslt = -1;
}
int
-PRT_uuid_to_protection(const struct uuid *uuid)
+PRT_uuid_to_protected(const struct uuid *uuid)
{
const struct gpt_type *gt;
}
const char *
-PRT_uuid_to_typename(const struct uuid *uuid)
+PRT_uuid_to_sname(const struct uuid *uuid)
{
static char typename[UUID_STR_LEN + 1];
const uint8_t gpt_uuid_msdos[] = GPT_UUID_MSDOS;
return gt->gt_type;
}
-struct uuid *
-PRT_type_to_uuid(const int type)
+const struct uuid *
+PRT_type_to_guid(const int type)
{
static struct uuid guid;
int i, entries;
-/* $OpenBSD: part.h,v 1.36 2022/03/14 17:11:44 krw Exp $ */
+/* $OpenBSD: part.h,v 1.37 2022/05/06 23:53:43 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
struct dos_partition *);
void PRT_print_part(const int, const struct prt *, const char *);
void PRT_print_parthdr(void);
-int PRT_uuid_to_protection(const struct uuid *);
-const char *PRT_uuid_to_typename(const struct uuid *);
+int PRT_uuid_to_protected(const struct uuid *);
+const char *PRT_uuid_to_sname(const struct uuid *);
int PRT_uuid_to_type(const struct uuid *);
-struct uuid *PRT_type_to_uuid(const int);
+const struct uuid *PRT_type_to_guid(const int);
int PRT_protected_guid(const struct uuid *);
int PRT_lba_to_chs(const struct prt*, struct chs *, struct chs*);