diff options
author | phk <phk@FreeBSD.org> | 2003-09-11 19:27:24 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-09-11 19:27:24 +0000 |
commit | 1ea5197e3f7af28d45665d66279ded2085a9556c (patch) | |
tree | 4bed42261a95116ad2c815d0e5531ccec15b61e8 | |
parent | 3b78f25cc9aec5f66931f365ee24b63cb5af08ce (diff) | |
download | FreeBSD-src-1ea5197e3f7af28d45665d66279ded2085a9556c.zip FreeBSD-src-1ea5197e3f7af28d45665d66279ded2085a9556c.tar.gz |
Disable the use of cloning use in floppy and CD drivers.
This commit puts the relevant code snippets under #ifdef GONE_IN_5
(rather than #ifndef BURN_BRIDGES) thereby disabling the code now.
The code wil be entirely removed before 5.2 unless we find reasons
why this would be a bad idea.
Approach suggested by: imp
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 8 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 6 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cd.h | 2 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 12 | ||||
-rw-r--r-- | sys/isa/fd.c | 12 |
5 files changed, 20 insertions, 20 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index e321b96..2f1afb5 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -152,7 +152,7 @@ struct cd_softc { int bufs_left; struct cam_periph *periph; dev_t dev; -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 eventhandler_tag clonetag; #endif int minimum_command_size; @@ -343,7 +343,7 @@ struct cdchanger { static STAILQ_HEAD(changerlist, cdchanger) changerq; -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 static void cdclone(void *arg, char *name, int namelen, dev_t *dev) { @@ -535,7 +535,7 @@ cdcleanup(struct cam_periph *periph) } devstat_remove_entry(softc->device_stats); destroy_dev(softc->dev); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 EVENTHANDLER_DEREGISTER(dev_clone, softc->clonetag); #endif free(softc, M_DEVBUF); @@ -782,7 +782,7 @@ 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 +#ifdef GONE_IN_5 softc->clonetag = EVENTHANDLER_REGISTER(dev_clone, cdclone, softc, 1000); #endif diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index e404b12..6d82779 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); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 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; } -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 static void acd_clone(void *arg, char *name, int namelen, dev_t *dev) { @@ -305,7 +305,7 @@ acd_make_dev(struct acd_softc *cdp) dev->si_drv1 = cdp; cdp->dev = dev; cdp->device->flags |= ATA_D_MEDIA_CHANGED; -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 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 190b651..d4a874c 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 */ -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 eventhandler_tag clone_evh; #endif }; diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index aed1dac..0dd3b4c 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -317,7 +317,7 @@ struct fd_data { struct callout_handle tohandle; struct devstat *device_stats; dev_t masterdev; -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 eventhandler_tag clonetag; dev_t clonedevs[NUMDENS - 1]; #endif @@ -388,7 +388,7 @@ static int fdc_detach(device_t dev); static void fdc_add_child(device_t, const char *, int); static int fdc_attach(device_t); static int fdc_print_child(device_t, device_t); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 static void fd_clone (void *, char *, int, dev_t *); #endif static int fd_probe(device_t); @@ -1121,7 +1121,7 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0); #endif /* NCARD > 0 */ -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 /* * Create a clone device upon request by devfs. */ @@ -1331,12 +1331,12 @@ fd_attach(device_t dev) struct fd_data *fd; fd = device_get_softc(dev); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 fd->clonetag = EVENTHANDLER_REGISTER(dev_clone, fd_clone, fd, 1000); #endif fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6, UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 { int i; for (i = 0; i < NUMDENS - 1; i++) @@ -1359,7 +1359,7 @@ fd_detach(device_t dev) untimeout(fd_turnoff, fd, fd->toffhandle); devstat_remove_entry(fd->device_stats); destroy_dev(fd->masterdev); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 { int i; for (i = 0; i < NUMDENS - 1; i++) diff --git a/sys/isa/fd.c b/sys/isa/fd.c index aed1dac..0dd3b4c 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -317,7 +317,7 @@ struct fd_data { struct callout_handle tohandle; struct devstat *device_stats; dev_t masterdev; -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 eventhandler_tag clonetag; dev_t clonedevs[NUMDENS - 1]; #endif @@ -388,7 +388,7 @@ static int fdc_detach(device_t dev); static void fdc_add_child(device_t, const char *, int); static int fdc_attach(device_t); static int fdc_print_child(device_t, device_t); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 static void fd_clone (void *, char *, int, dev_t *); #endif static int fd_probe(device_t); @@ -1121,7 +1121,7 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0); #endif /* NCARD > 0 */ -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 /* * Create a clone device upon request by devfs. */ @@ -1331,12 +1331,12 @@ fd_attach(device_t dev) struct fd_data *fd; fd = device_get_softc(dev); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 fd->clonetag = EVENTHANDLER_REGISTER(dev_clone, fd_clone, fd, 1000); #endif fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6, UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 { int i; for (i = 0; i < NUMDENS - 1; i++) @@ -1359,7 +1359,7 @@ fd_detach(device_t dev) untimeout(fd_turnoff, fd, fd->toffhandle); devstat_remove_entry(fd->device_stats); destroy_dev(fd->masterdev); -#ifndef BURN_BRIDGES +#ifdef GONE_IN_5 { int i; for (i = 0; i < NUMDENS - 1; i++) |