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
This commit is contained in:
parent
cc9ed6619f
commit
0c7721e8f9
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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++)
|
||||
|
12
sys/isa/fd.c
12
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++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user