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:
parent
73a00aeaf7
commit
fd024cb2be
@ -800,7 +800,7 @@ g_part_ctl_destroy(struct gctl_req *req, struct g_part_parms *gpp)
|
|||||||
|
|
||||||
table = gp->softc;
|
table = gp->softc;
|
||||||
LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) {
|
LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) {
|
||||||
if (entry->gpe_deleted)
|
if (entry->gpe_deleted || entry->gpe_internal)
|
||||||
continue;
|
continue;
|
||||||
gctl_error(req, "%d", EBUSY);
|
gctl_error(req, "%d", EBUSY);
|
||||||
return (EBUSY);
|
return (EBUSY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user