From fd024cb2befc13f3b7c85c7695d0491d7209153b Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 8 Dec 2007 22:06:17 +0000 Subject: [PATCH] Skip internal partitions in the check for (user) partitions for the destroy command. Previously a freshly created BSD disklabel could not be destroyed because of the internal partition. --- sys/geom/part/g_part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index c3f59d7649c2..b4a72264c59a 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -800,7 +800,7 @@ g_part_ctl_destroy(struct gctl_req *req, struct g_part_parms *gpp) table = gp->softc; LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) { - if (entry->gpe_deleted) + if (entry->gpe_deleted || entry->gpe_internal) continue; gctl_error(req, "%d", EBUSY); return (EBUSY);