Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144293498
D42246.id128887.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D42246.id128887.diff
View Options
diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h
--- a/sys/geom/part/g_part.h
+++ b/sys/geom/part/g_part.h
@@ -117,8 +117,9 @@
struct g_part_scheme {
KOBJ_CLASS_FIELDS;
size_t gps_entrysz;
- int gps_minent;
- int gps_maxent;
+ int gps_minent; /* Minimum number of entries possible */
+ int gps_defent; /* Default number of entries to create */
+ int gps_maxent; /* Maximum number of entries possible */
int gps_bootcodesz;
TAILQ_ENTRY(g_part_scheme) scheme_list;
};
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -1005,7 +1005,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);
diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c
--- a/sys/geom/part/g_part_apm.c
+++ b/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);
diff --git a/sys/geom/part/g_part_bsd.c b/sys/geom/part/g_part_bsd.c
--- a/sys/geom/part/g_part_bsd.c
+++ b/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,
};
diff --git a/sys/geom/part/g_part_bsd64.c b/sys/geom/part/g_part_bsd64.c
--- a/sys/geom/part/g_part_bsd64.c
+++ b/sys/geom/part/g_part_bsd64.c
@@ -161,6 +161,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);
diff --git a/sys/geom/part/g_part_ebr.c b/sys/geom/part/g_part_ebr.c
--- a/sys/geom/part/g_part_ebr.c
+++ b/sys/geom/part/g_part_ebr.c
@@ -125,6 +125,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);
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -154,7 +154,8 @@
g_part_gpt_methods,
sizeof(struct g_part_gpt_table),
.gps_entrysz = sizeof(struct g_part_gpt_entry),
- .gps_minent = 128,
+ .gps_minent = 1,
+ .gps_defent = 128,
.gps_maxent = 4096,
.gps_bootcodesz = MBRSIZE,
};
diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c
--- a/sys/geom/part/g_part_mbr.c
+++ b/sys/geom/part/g_part_mbr.c
@@ -116,6 +116,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,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 4:45 PM (10 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28475171
Default Alt Text
D42246.id128887.diff (3 KB)
Attached To
Mode
D42246: gpart: More nuance for GPT support
Attached
Detach File
Event Timeline
Log In to Comment