From c5dc1fb629b7196373ecfcd1f58c90dc99bc0f0c Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 5 Sep 2003 10:40:16 +0000 Subject: Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES. For the floppy driver, use fdcontrol to manipulate density selection. For the CD drivers, the 'a' and 'c' suffix is without actual effect and any applications insisting on it can be satisfied with a symlink: ln -s /dev/cd0 /dev/cd0a Ongoing discussion may result in these pieces of code being removed before the 5-stable branch as opposed to after. --- sys/cam/scsi/scsi_cd.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/cam') diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 39c2562..e321b96 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -152,7 +152,9 @@ struct cd_softc { int bufs_left; struct cam_periph *periph; dev_t dev; +#ifndef BURN_BRIDGES eventhandler_tag clonetag; +#endif int minimum_command_size; int outstanding_cmds; struct task sysctl_task; @@ -341,6 +343,7 @@ struct cdchanger { static STAILQ_HEAD(changerlist, cdchanger) changerq; +#ifndef BURN_BRIDGES static void cdclone(void *arg, char *name, int namelen, dev_t *dev) { @@ -360,6 +363,7 @@ cdclone(void *arg, char *name, int namelen, dev_t *dev) *dev = softc->dev; return; } +#endif static void cdinit(void) @@ -531,7 +535,9 @@ cdcleanup(struct cam_periph *periph) } devstat_remove_entry(softc->device_stats); destroy_dev(softc->dev); +#ifndef BURN_BRIDGES EVENTHANDLER_DEREGISTER(dev_clone, softc->clonetag); +#endif free(softc, M_DEVBUF); splx(s); } @@ -776,8 +782,10 @@ cdregister(struct cam_periph *periph, void *arg) softc->dev = make_dev(&cd_cdevsw, periph->unit_number, UID_ROOT, GID_OPERATOR, 0640, "cd%d", periph->unit_number); softc->dev->si_drv1 = periph; +#ifndef BURN_BRIDGES softc->clonetag = EVENTHANDLER_REGISTER(dev_clone, cdclone, softc, 1000); +#endif /* * Add an async callback so that we get -- cgit v1.1