Make the clone handler BURN_BRIDGES but the actual 'a' and 'c' partition
check GONE_IN_5: We need the clone handler for root filesystem case. Once under GEOM, we can remove the clone handler as GEOM provides one.
This commit is contained in:
parent
d2f243d06a
commit
fb4d4b60b3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120318
@ -243,7 +243,7 @@ acd_detach(struct ata_device *atadev)
|
||||
free(entry, M_ACD);
|
||||
}
|
||||
destroy_dev(cdp->dev);
|
||||
#ifdef GONE_IN_5
|
||||
#ifdef BURN_BRIDGES
|
||||
EVENTHANDLER_DEREGISTER(dev_clone, cdp->clone_evh);
|
||||
#endif
|
||||
devstat_remove_entry(cdp->stats);
|
||||
@ -276,7 +276,7 @@ acd_init_lun(struct ata_device *atadev)
|
||||
return cdp;
|
||||
}
|
||||
|
||||
#ifdef GONE_IN_5
|
||||
#ifdef BURN_BRIDGES
|
||||
static void
|
||||
acd_clone(void *arg, char *name, int namelen, dev_t *dev)
|
||||
{
|
||||
@ -288,8 +288,13 @@ acd_clone(void *arg, char *name, int namelen, dev_t *dev)
|
||||
return;
|
||||
if (!dev_stdclone(name, &p, "acd", &unit))
|
||||
return;
|
||||
#ifdef GONE_IN_5
|
||||
if (*p != '\0')
|
||||
return;
|
||||
#else
|
||||
if (*p != '\0' && strcmp(p, "a") != 0 && strcmp(p, "c") != 0)
|
||||
return;
|
||||
#endif
|
||||
if (unit == cdp->lun)
|
||||
*dev = makedev(acd_cdevsw.d_maj, cdp->lun);
|
||||
}
|
||||
@ -305,7 +310,7 @@ acd_make_dev(struct acd_softc *cdp)
|
||||
dev->si_drv1 = cdp;
|
||||
cdp->dev = dev;
|
||||
cdp->device->flags |= ATA_D_MEDIA_CHANGED;
|
||||
#ifdef GONE_IN_5
|
||||
#ifdef BURN_BRIDGES
|
||||
cdp->clone_evh = EVENTHANDLER_REGISTER(dev_clone, acd_clone, cdp, 1000);
|
||||
#endif
|
||||
acd_set_ioparm(cdp);
|
||||
|
@ -322,7 +322,7 @@ struct acd_softc {
|
||||
u_int block_size; /* blocksize currently used */
|
||||
struct devstat *stats; /* devstat entry */
|
||||
dev_t dev; /* device place holders */
|
||||
#ifdef GONE_IN_5
|
||||
#ifdef BURN_BRIDGES
|
||||
eventhandler_tag clone_evh;
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user