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.
This commit is contained in:
marcel 2007-12-08 22:06:17 +00:00
parent 73a00aeaf7
commit fd024cb2be

View File

@ -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);