diff options
author | phk <phk@FreeBSD.org> | 2003-09-21 18:57:12 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-09-21 18:57:12 +0000 |
commit | 2e70579d54e874a045f3d62e33e0659c56920c27 (patch) | |
tree | 3a6d0bca8f227123bc1b9ce42bd0d672a6276991 /sys | |
parent | e05736bb47cbe6544085e569ad81deb735db714e (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 11 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cd.h | 2 |
2 files changed, 9 insertions, 4 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); diff --git a/sys/dev/ata/atapi-cd.h b/sys/dev/ata/atapi-cd.h index d4a874c..1e5d24b 100644 --- a/sys/dev/ata/atapi-cd.h +++ b/sys/dev/ata/atapi-cd.h @@ -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 }; |