Page MenuHomeFreeBSD

D6900.diff
No OneTemporary

D6900.diff

Index: sys/geom/part/g_part.h
===================================================================
--- sys/geom/part/g_part.h
+++ sys/geom/part/g_part.h
@@ -104,6 +104,7 @@
KOBJ_CLASS_FIELDS;
size_t gps_entrysz;
int gps_minent;
+ int gps_defent;
int gps_maxent;
int gps_bootcodesz;
TAILQ_ENTRY(g_part_scheme) scheme_list;
Index: sys/geom/part/g_part.c
===================================================================
--- sys/geom/part/g_part.c
+++ sys/geom/part/g_part.c
@@ -946,7 +946,7 @@
table->gpt_gp = gp;
table->gpt_scheme = gpp->gpp_scheme;
table->gpt_entries = (gpp->gpp_parms & G_PART_PARM_ENTRIES) ?
- gpp->gpp_entries : scheme->gps_minent;
+ gpp->gpp_entries : scheme->gps_defent;
LIST_INIT(&table->gpt_entry);
if (null == NULL) {
cp = g_new_consumer(gp);
Index: sys/geom/part/g_part_apm.c
===================================================================
--- sys/geom/part/g_part_apm.c
+++ sys/geom/part/g_part_apm.c
@@ -102,6 +102,7 @@
sizeof(struct g_part_apm_table),
.gps_entrysz = sizeof(struct g_part_apm_entry),
.gps_minent = 16,
+ .gps_defent = 16,
.gps_maxent = 4096,
};
G_PART_SCHEME_DECLARE(g_part_apm);
Index: sys/geom/part/g_part_bsd.c
===================================================================
--- sys/geom/part/g_part_bsd.c
+++ sys/geom/part/g_part_bsd.c
@@ -107,6 +107,7 @@
sizeof(struct g_part_bsd_table),
.gps_entrysz = sizeof(struct g_part_bsd_entry),
.gps_minent = 8,
+ .gps_defent = 8,
.gps_maxent = 20, /* Only 22 entries fit in 512 byte sectors */
.gps_bootcodesz = BBSIZE,
};
Index: sys/geom/part/g_part_bsd64.c
===================================================================
--- sys/geom/part/g_part_bsd64.c
+++ sys/geom/part/g_part_bsd64.c
@@ -162,6 +162,7 @@
sizeof(struct g_part_bsd64_table),
.gps_entrysz = sizeof(struct g_part_bsd64_entry),
.gps_minent = MAXPARTITIONS64,
+ .gps_defent = MAXPARTITIONS64,
.gps_maxent = MAXPARTITIONS64
};
G_PART_SCHEME_DECLARE(g_part_bsd64);
Index: sys/geom/part/g_part_ebr.c
===================================================================
--- sys/geom/part/g_part_ebr.c
+++ sys/geom/part/g_part_ebr.c
@@ -123,6 +123,7 @@
sizeof(struct g_part_ebr_table),
.gps_entrysz = sizeof(struct g_part_ebr_entry),
.gps_minent = 1,
+ .gps_defent = 1,
.gps_maxent = INT_MAX,
};
G_PART_SCHEME_DECLARE(g_part_ebr);
Index: sys/geom/part/g_part_gpt.c
===================================================================
--- sys/geom/part/g_part_gpt.c
+++ sys/geom/part/g_part_gpt.c
@@ -134,12 +134,19 @@
{ 0, 0 }
};
+/*
+ * The UEFI specification requires at least 16KB be used for partition
+ * entries, which implies a nominal default of 128 entries. However, for
+ * embedded boards that expect to put a loader lower than that, being able
+ * to use a smaller GPT is helpful.
+ */
static struct g_part_scheme g_part_gpt_scheme = {
"GPT",
g_part_gpt_methods,
sizeof(struct g_part_gpt_table),
.gps_entrysz = sizeof(struct g_part_gpt_entry),
- .gps_minent = 128,
+ .gps_minent = 4,
+ .gps_defent = 128,
.gps_maxent = 4096,
.gps_bootcodesz = MBRSIZE,
};
Index: sys/geom/part/g_part_mbr.c
===================================================================
--- sys/geom/part/g_part_mbr.c
+++ sys/geom/part/g_part_mbr.c
@@ -115,6 +115,7 @@
sizeof(struct g_part_mbr_table),
.gps_entrysz = sizeof(struct g_part_mbr_entry),
.gps_minent = NDOSPART,
+ .gps_defent = NDOSPART,
.gps_maxent = NDOSPART,
.gps_bootcodesz = MBRSIZE,
};
Index: sys/geom/part/g_part_pc98.c
===================================================================
--- sys/geom/part/g_part_pc98.c
+++ sys/geom/part/g_part_pc98.c
@@ -111,6 +111,7 @@
sizeof(struct g_part_pc98_table),
.gps_entrysz = sizeof(struct g_part_pc98_entry),
.gps_minent = PC98_NPARTS,
+ .gps_defent = PC98_NPARTS,
.gps_maxent = PC98_NPARTS,
.gps_bootcodesz = BOOTSIZE,
};
Index: sys/geom/part/g_part_vtoc8.c
===================================================================
--- sys/geom/part/g_part_vtoc8.c
+++ sys/geom/part/g_part_vtoc8.c
@@ -96,6 +96,7 @@
sizeof(struct g_part_vtoc8_table),
.gps_entrysz = sizeof(struct g_part_entry),
.gps_minent = VTOC8_NPARTS,
+ .gps_defent = VTOC8_NPARTS,
.gps_maxent = VTOC8_NPARTS,
};
G_PART_SCHEME_DECLARE(g_part_vtoc8);

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 1, 9:24 PM (6 h, 9 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34577904
Default Alt Text
D6900.diff (4 KB)

Event Timeline