diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-04-19 17:53:16 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-04-19 17:53:16 +0000 |
commit | f9344c0e975090e79d60a39189bbe50a6c02975f (patch) | |
tree | eb87be53ab58c212213c00cecf375ef6854fe761 | |
parent | b01f7b924111edf9f98a2988dd49849c1d48c2de (diff) |
Bring GPT_print_partition() into line with other functions being passed
an index to the gp[] array by calling said parameter 'pn' and making it
const unsigned int.
No functional change.
-rw-r--r-- | sbin/fdisk/gpt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/fdisk/gpt.c b/sbin/fdisk/gpt.c index 00e88676a20..7723a0882de 100644 --- a/sbin/fdisk/gpt.c +++ b/sbin/fdisk/gpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpt.c,v 1.68 2022/04/19 17:36:36 krw Exp $ */ +/* $OpenBSD: gpt.c,v 1.69 2022/04/19 17:53:15 krw Exp $ */ /* * Copyright (c) 2015 Markus Muller <mmu@grummel.net> * Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org> @@ -393,11 +393,11 @@ GPT_print_parthdr(const int verbosity) } void -GPT_print_part(const int n, const char *units, const int verbosity) +GPT_print_part(const unsigned int pn, const char *units, const int verbosity) { const struct unit_type *ut; struct uuid guid; - struct gpt_partition *partn = &gp[n]; + struct gpt_partition *partn = &gp[pn]; char *guidstr = NULL; double size; uint64_t sectors; @@ -406,8 +406,8 @@ GPT_print_part(const int n, const char *units, const int verbosity) uuid_dec_le(&partn->gp_type, &guid); sectors = letoh64(partn->gp_lba_end) - letoh64(partn->gp_lba_start) + 1; size = units_size(units, sectors, &ut); - printf("%c%3d: %-36s [%12lld: %12.0f%s]\n", - (letoh64(partn->gp_attrs) & GPTDOSACTIVE)?'*':' ', n, + printf("%c%3u: %-36s [%12lld: %12.0f%s]\n", + (letoh64(partn->gp_attrs) & GPTDOSACTIVE)?'*':' ', pn, PRT_uuid_to_typename(&guid), letoh64(partn->gp_lba_start), size, ut->ut_abbr); |