diff options
author | phk <phk@FreeBSD.org> | 2003-09-05 10:40:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-09-05 10:40:16 +0000 |
commit | c5dc1fb629b7196373ecfcd1f58c90dc99bc0f0c (patch) | |
tree | 53bbbd3272194cca8de958cae691db47d3d00db9 /sys/cam | |
parent | 5ed65ab40c3df3af64ff43c812f082aa5f5fc475 (diff) | |
download | FreeBSD-src-c5dc1fb629b7196373ecfcd1f58c90dc99bc0f0c.zip FreeBSD-src-c5dc1fb629b7196373ecfcd1f58c90dc99bc0f0c.tar.gz |
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.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 |