diff options
author | marcel <marcel@FreeBSD.org> | 2007-12-09 22:26:42 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2007-12-09 22:26:42 +0000 |
commit | 3d56eaad5fae38526ef1a2beb6ff139c66fe1508 (patch) | |
tree | e5ce86abdcd4717b2cb0e385404bac5d6e378501 /sys/geom/part | |
parent | bfede6d7d45a73986dba0a9d48d682512655bd0e (diff) | |
download | FreeBSD-src-3d56eaad5fae38526ef1a2beb6ff139c66fe1508.zip FreeBSD-src-3d56eaad5fae38526ef1a2beb6ff139c66fe1508.tar.gz |
Fix a bug in the add verb, where we failed to keep the list
of partitions in index-order. This is assumed by the APM, MBR
and BSD partitioning schemes.
Diffstat (limited to 'sys/geom/part')
-rw-r--r-- | sys/geom/part/g_part.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index 9044eb3..2a6c342 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -449,10 +449,10 @@ g_part_ctl_add(struct gctl_req *req, struct g_part_parms *gpp) delent = entry; continue; } - if (entry->gpe_index == index) { + if (entry->gpe_index == index) index = entry->gpe_index + 1; + if (entry->gpe_index < index) last = entry; - } if (entry->gpe_internal) continue; if (gpp->gpp_start >= entry->gpe_start && |