From ac675b080c669746b669697f330c909029e279cd Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 25 Mar 2023 15:05:46 +0000 Subject: Rename *_sname fields/functions to *_name to remove implied shortness of the names. No functional change. --- sbin/fdisk/cmd.c | 6 +++--- sbin/fdisk/gpt.c | 4 ++-- sbin/fdisk/part.c | 24 ++++++++++++------------ sbin/fdisk/part.h | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c index 014852b8014..ef9876069c0 100644 --- a/sbin/fdisk/cmd.c +++ b/sbin/fdisk/cmd.c @@ -1,4 +1,4 @@ -/* $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 @@ -266,14 +266,14 @@ gsetpid(const int pn) 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; } diff --git a/sbin/fdisk/gpt.c b/sbin/fdisk/gpt.c index bff1007e09e..40aa00c7897 100644 --- a/sbin/fdisk/gpt.c +++ b/sbin/fdisk/gpt.c @@ -1,4 +1,4 @@ -/* $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 * Copyright (c) 2015 Kenneth R Westerback @@ -449,7 +449,7 @@ GPT_print_part(const unsigned int pn, const char *units, const int verbosity) 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); diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index 99d19211825..649555e3489 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $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 @@ -33,7 +33,7 @@ struct mbr_type { int mt_type; - char mt_sname[14]; + char mt_name[14]; }; const struct mbr_type mbr_types[] = { @@ -139,7 +139,7 @@ struct gpt_type { 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]; }; @@ -252,7 +252,7 @@ ascii_id(const int id) 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; @@ -301,12 +301,12 @@ PRT_print_mbrtypes(void) 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"); } } @@ -322,12 +322,12 @@ PRT_print_gpttypes(void) 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"); } } @@ -469,7 +469,7 @@ PRT_lba_to_chs(const struct prt *prt, struct chs *start, struct chs *end) } 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; @@ -484,7 +484,7 @@ PRT_uuid_to_sname(const struct uuid *uuid) 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) diff --git a/sbin/fdisk/part.h b/sbin/fdisk/part.h index 9cba7df952d..7e4ef310a25 100644 --- a/sbin/fdisk/part.h +++ b/sbin/fdisk/part.h @@ -1,4 +1,4 @@ -/* $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 @@ -37,7 +37,7 @@ void PRT_make(const struct prt *,const uint64_t, const uint64_t, 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 *); -- cgit v1.2.3