-/* $OpenBSD: cmd.c,v 1.167 2023/03/04 21:22:51 krw Exp $ */
+/* $OpenBSD: cmd.c,v 1.168 2023/03/25 15:05:45 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_sname(&gp[pn].gp_type));
+ PRT_uuid_to_name(&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_sname(&gp[pn].gp_type));
+ PRT_uuid_to_name(&gp[pn].gp_type));
return -1;
}
-/* $OpenBSD: gpt.c,v 1.86 2023/03/06 13:24:40 krw Exp $ */
+/* $OpenBSD: gpt.c,v 1.87 2023/03/25 15:05:45 krw Exp $ */
/*
* Copyright (c) 2015 Markus Muller <mmu@grummel.net>
* Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org>
size = units_size(units, (start > end) ? 0 : end - start + 1, &ut);
printf(" %3u: %-36s [%12lld: %12.0f%s]\n", pn,
- PRT_uuid_to_sname(&gp[pn].gp_type), start, size, ut->ut_abbr);
+ PRT_uuid_to_name(&gp[pn].gp_type), start, size, ut->ut_abbr);
if (verbosity == VERBOSE) {
uuid_to_string(&gp[pn].gp_guid, &guidstr, &status);
-/* $OpenBSD: part.c,v 1.132 2023/03/06 17:42:39 krw Exp $ */
+/* $OpenBSD: part.c,v 1.133 2023/03/25 15:05:45 krw Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
struct mbr_type {
int mt_type;
- char mt_sname[14];
+ char mt_name[14];
};
const struct mbr_type mbr_types[] = {
int gt_attr;
#define GTATTR_PROTECT (1 << 0)
#define GTATTR_PROTECT_EFISYS (1 << 1)
- char gt_sname[14];
+ char gt_name[14];
char gt_guid[UUID_STR_LEN + 1];
};
for (i = 0; i < nitems(mbr_types); i++) {
if (mbr_types[i].mt_type == id)
- return mbr_types[i].mt_sname;
+ return mbr_types[i].mt_name;
}
return unknown;
for (i = 0; i < idrows; i++) {
for (cidx = i; cidx < i + idrows * 3; cidx += idrows) {
printf("%02X %-*s", mbr_types[cidx].mt_type,
- (int)sizeof(mbr_types[cidx].mt_sname) + 1,
- mbr_types[cidx].mt_sname);
+ (int)sizeof(mbr_types[cidx].mt_name) + 1,
+ mbr_types[cidx].mt_name);
}
if (cidx < nitems(mbr_types))
printf("%02X %s", mbr_types[cidx].mt_type,
- mbr_types[cidx].mt_sname);
+ mbr_types[cidx].mt_name);
printf("\n");
}
}
for (i = 0; i < idrows; i++) {
for (cidx = i; cidx < i + idrows * 3; cidx += idrows) {
printf("%02X %-*s", gpt_types[cidx].gt_type,
- (int)sizeof(gpt_types[cidx].gt_sname) + 1,
- gpt_types[cidx].gt_sname);
+ (int)sizeof(gpt_types[cidx].gt_name) + 1,
+ gpt_types[cidx].gt_name);
}
if (cidx < nitems(gpt_types))
printf("%02X %s", gpt_types[cidx].gt_type,
- gpt_types[cidx].gt_sname);
+ gpt_types[cidx].gt_name);
printf("\n");
}
}
}
const char *
-PRT_uuid_to_sname(const struct uuid *uuid)
+PRT_uuid_to_name(const struct uuid *uuid)
{
static char typename[UUID_STR_LEN + 1];
const uint8_t gpt_uuid_msdos[] = GPT_UUID_MSDOS;
gt = find_gpt_type(uuid);
if (gt != NULL)
- return gt->gt_sname;
+ return gt->gt_name;
uuid_to_string(uuid, &uuidstr, &status);
if (status == uuid_s_ok)
-/* $OpenBSD: part.h,v 1.38 2022/05/08 18:01:23 krw Exp $ */
+/* $OpenBSD: part.h,v 1.39 2023/03/25 15:05:45 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);
-const char *PRT_uuid_to_sname(const struct uuid *);
+const char *PRT_uuid_to_name(const struct uuid *);
int PRT_uuid_to_type(const struct uuid *);
const struct uuid *PRT_type_to_guid(const int);
int PRT_protected_guid(const struct uuid *);