summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-09-21 18:57:12 +0000
committerphk <phk@FreeBSD.org>2003-09-21 18:57:12 +0000
commit2e70579d54e874a045f3d62e33e0659c56920c27 (patch)
tree3a6d0bca8f227123bc1b9ce42bd0d672a6276991 /sys/dev/ata/atapi-cd.c
parente05736bb47cbe6544085e569ad81deb735db714e (diff)
downloadFreeBSD-src-2e70579d54e874a045f3d62e33e0659c56920c27.zip
FreeBSD-src-2e70579d54e874a045f3d62e33e0659c56920c27.tar.gz
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.
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r--sys/dev/ata/atapi-cd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 78cae6c..7a208b9 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -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);
OpenPOWER on IntegriCloud