diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2023-05-17 12:59:38 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2023-05-17 12:59:38 +0000 |
commit | 58e1adb4bfbbe396bcc9ca277427d12d1036e0e5 (patch) | |
tree | ead5c29ee4a063ae9881d3a0a901886e68a512d7 | |
parent | 3f6133211b391c3e1764ca339d3e32ee069d4275 (diff) |
Make function and symmetry obvious by renaming PRT_make() to
PRT_prt_to_dp() and PRT_parse() to PRT_dp_to_prt().
No functional change.
-rw-r--r-- | sbin/fdisk/gpt.c | 4 | ||||
-rw-r--r-- | sbin/fdisk/mbr.c | 8 | ||||
-rw-r--r-- | sbin/fdisk/part.c | 6 | ||||
-rw-r--r-- | sbin/fdisk/part.h | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/sbin/fdisk/gpt.c b/sbin/fdisk/gpt.c index e1f9aef2671..ad7f44e497c 100644 --- a/sbin/fdisk/gpt.c +++ b/sbin/fdisk/gpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpt.c,v 1.90 2023/05/10 12:59:47 krw Exp $ */ +/* $OpenBSD: gpt.c,v 1.91 2023/05/17 12:59:37 krw Exp $ */ /* * Copyright (c) 2015 Markus Muller <mmu@grummel.net> * Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org> @@ -132,7 +132,7 @@ protective_mbr(const struct mbr *mbr) for (i = 0; i < nitems(dp); i++) { memset(&dos_partition, 0, sizeof(dos_partition)); if (i < nitems(mbr->mbr_prt)) - PRT_make(&mbr->mbr_prt[i], mbr->mbr_lba_self, + PRT_prt_to_dp(&mbr->mbr_prt[i], mbr->mbr_lba_self, mbr->mbr_lba_firstembr, &dos_partition); memcpy(&dp[i], &dos_partition, sizeof(dp[i])); } diff --git a/sbin/fdisk/mbr.c b/sbin/fdisk/mbr.c index b7aeea00d9e..4b6af10fffa 100644 --- a/sbin/fdisk/mbr.c +++ b/sbin/fdisk/mbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.c,v 1.123 2023/03/06 13:24:40 krw Exp $ */ +/* $OpenBSD: mbr.c,v 1.124 2023/05/17 12:59:37 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -64,7 +64,7 @@ MBR_init(struct mbr *mbr) bootprt = disk.dk_bootprt; } else { memcpy(&dp, &default_dmbr.dmbr_parts[0], sizeof(dp)); - PRT_parse(&dp, 0, 0, &bootprt); + PRT_dp_to_prt(&dp, 0, 0, &bootprt); } if (bootprt.prt_ns > 0) { @@ -123,7 +123,7 @@ dos_mbr_to_mbr(const struct dos_mbr *dmbr, const uint64_t lba_self, for (i = 0; i < nitems(mbr->mbr_prt); i++) { memset(&mbr->mbr_prt[i], 0, sizeof(mbr->mbr_prt[i])); if (i < nitems(dmbr->dmbr_parts)) - PRT_parse(&dos_parts[i], lba_self, lba_firstembr, + PRT_dp_to_prt(&dos_parts[i], lba_self, lba_firstembr, &mbr->mbr_prt[i]); } } @@ -140,7 +140,7 @@ mbr_to_dos_mbr(const struct mbr *mbr, struct dos_mbr *dos_mbr) for (i = 0; i < nitems(dos_mbr->dmbr_parts); i++) { memset(&dos_partition, 0, sizeof(dos_partition)); if (i < nitems(mbr->mbr_prt)) { - PRT_make(&mbr->mbr_prt[i], mbr->mbr_lba_self, + PRT_prt_to_dp(&mbr->mbr_prt[i], mbr->mbr_lba_self, mbr->mbr_lba_firstembr, &dos_partition); } memcpy(&dos_mbr->dmbr_parts[i], &dos_partition, diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index bb9929aa82b..ba0b9d46f37 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $OpenBSD: part.c,v 1.161 2023/05/10 13:45:49 krw Exp $ */ +/* $OpenBSD: part.c,v 1.162 2023/05/17 12:59:37 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -951,7 +951,7 @@ PRT_print_gptmenu(char *lbuf, size_t lbuflen) } void -PRT_parse(const struct dos_partition *dp, const uint64_t lba_self, +PRT_dp_to_prt(const struct dos_partition *dp, const uint64_t lba_self, const uint64_t lba_firstembr, struct prt *prt) { off_t off; @@ -974,7 +974,7 @@ PRT_parse(const struct dos_partition *dp, const uint64_t lba_self, } void -PRT_make(const struct prt *prt, const uint64_t lba_self, +PRT_prt_to_dp(const struct prt *prt, const uint64_t lba_self, const uint64_t lba_firstembr, struct dos_partition *dp) { struct chs start, end; diff --git a/sbin/fdisk/part.h b/sbin/fdisk/part.h index a0c5e618b14..f4fb574de2f 100644 --- a/sbin/fdisk/part.h +++ b/sbin/fdisk/part.h @@ -1,4 +1,4 @@ -/* $OpenBSD: part.h,v 1.45 2023/04/09 17:19:59 krw Exp $ */ +/* $OpenBSD: part.h,v 1.46 2023/05/17 12:59:37 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -31,9 +31,9 @@ struct prt { void PRT_print_mbrmenu(char *, size_t); void PRT_print_gptmenu(char *, size_t); -void PRT_parse(const struct dos_partition *, const uint64_t, +void PRT_dp_to_prt(const struct dos_partition *, const uint64_t, const uint64_t, struct prt *); -void PRT_make(const struct prt *,const uint64_t, const uint64_t, +void PRT_prt_to_dp(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); |