summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/part.c
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2016-01-28 12:11:42 +0000
committersmh <smh@FreeBSD.org>2016-01-28 12:11:42 +0000
commit634e73dbb861268bd122cc29b02b1a56df450dd6 (patch)
tree7fd1c618154ccfb649dc2a3ef4b6030c01df8f81 /sys/boot/common/part.c
parentfe8f0aa165649acdaf27427ebefed487585a9d35 (diff)
downloadFreeBSD-src-634e73dbb861268bd122cc29b02b1a56df450dd6.zip
FreeBSD-src-634e73dbb861268bd122cc29b02b1a56df450dd6.tar.gz
MFC r281169, r293724, r293796, r294029, r294041, r294058
MFC r281169 (by andrew): Make global variabled only used in this file static MFC r294058: Make common boot file_loadraw name parameter const MFC r294041: Remove unused reg param from fdt_fixup_memory MFC r293724: Enable warnings in EFI boot code MFC r293796: Fix typo in libefi.c MFC r294029: Only build EFI components on supported compilers Sponsored by: Multiplay
Diffstat (limited to 'sys/boot/common/part.c')
-rw-r--r--sys/boot/common/part.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/boot/common/part.c b/sys/boot/common/part.c
index 518df1a..5e9217e 100644
--- a/sys/boot/common/part.c
+++ b/sys/boot/common/part.c
@@ -102,7 +102,7 @@ static struct parttypes {
const char *
parttype2str(enum partition_type type)
{
- int i;
+ size_t i;
for (i = 0; i < sizeof(ptypes) / sizeof(ptypes[0]); i++)
if (ptypes[i].type == type)
@@ -203,7 +203,7 @@ gpt_checktbl(const struct gpt_hdr *hdr, u_char *tbl, size_t size,
uint64_t lba_last)
{
struct gpt_ent *ent;
- int i, cnt;
+ uint32_t i, cnt;
cnt = size / hdr->hdr_entsz;
if (hdr->hdr_entries <= cnt) {
@@ -234,8 +234,8 @@ ptable_gptread(struct ptable *table, void *dev, diskread_t dread)
struct gpt_ent *ent;
u_char *buf, *tbl;
uint64_t offset;
- int pri, sec, i;
- size_t size;
+ int pri, sec;
+ size_t size, i;
buf = malloc(table->sectorsize);
if (buf == NULL)
@@ -358,7 +358,7 @@ mbr_parttype(uint8_t type)
return (PART_UNKNOWN);
}
-struct ptable*
+static struct ptable*
ptable_ebrread(struct ptable *table, void *dev, diskread_t dread)
{
struct dos_partition *dp;
@@ -435,7 +435,7 @@ bsd_parttype(uint8_t type)
return (PART_UNKNOWN);
}
-struct ptable*
+static struct ptable*
ptable_bsdread(struct ptable *table, void *dev, diskread_t dread)
{
struct disklabel *dl;
OpenPOWER on IntegriCloud