1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

Fix so that when a slice or a partition is removed through g_slice_config(),

it is destroyed in GEOM, in addition to being removed from /dev.
Before this patch, if you applied a new MBR which deleted a slice,
the deleted slice would not be in /dev, but it would still appear
in kern.geom.conftxt and kern.geom.confxml, which would confused
the diskPartitionEditor in sysinstall.

Submitted by:   pjd
Tested by:      pjd, rodrigc
MFC after:	1 week
This commit is contained in:
Craig Rodrigues 2005-09-14 21:38:35 +00:00
parent 60f918ef43
commit 318c3a55f0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150143

View File

@ -339,6 +339,7 @@ g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length
return (0);
if (bootverbose)
printf("GEOM: Deconfigure %s\n", pp->name);
pp->flags |= G_PF_WITHER;
g_orphan_provider(pp, ENXIO);
gsl->provider = NULL;
gsp->nprovider--;