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;
|
int bufs_left;
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
eventhandler_tag clonetag;
|
eventhandler_tag clonetag;
|
||||||
#endif
|
#endif
|
||||||
int minimum_command_size;
|
int minimum_command_size;
|
||||||
@ -343,7 +343,7 @@ struct cdchanger {
|
|||||||
|
|
||||||
static STAILQ_HEAD(changerlist, cdchanger) changerq;
|
static STAILQ_HEAD(changerlist, cdchanger) changerq;
|
||||||
|
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
static void
|
static void
|
||||||
cdclone(void *arg, char *name, int namelen, dev_t *dev)
|
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);
|
devstat_remove_entry(softc->device_stats);
|
||||||
destroy_dev(softc->dev);
|
destroy_dev(softc->dev);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
EVENTHANDLER_DEREGISTER(dev_clone, softc->clonetag);
|
EVENTHANDLER_DEREGISTER(dev_clone, softc->clonetag);
|
||||||
#endif
|
#endif
|
||||||
free(softc, M_DEVBUF);
|
free(softc, M_DEVBUF);
|
||||||
@ -782,7 +782,7 @@ cdregister(struct cam_periph *periph, void *arg)
|
|||||||
softc->dev = make_dev(&cd_cdevsw, periph->unit_number,
|
softc->dev = make_dev(&cd_cdevsw, periph->unit_number,
|
||||||
UID_ROOT, GID_OPERATOR, 0640, "cd%d", periph->unit_number);
|
UID_ROOT, GID_OPERATOR, 0640, "cd%d", periph->unit_number);
|
||||||
softc->dev->si_drv1 = periph;
|
softc->dev->si_drv1 = periph;
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
softc->clonetag =
|
softc->clonetag =
|
||||||
EVENTHANDLER_REGISTER(dev_clone, cdclone, softc, 1000);
|
EVENTHANDLER_REGISTER(dev_clone, cdclone, softc, 1000);
|
||||||
#endif
|
#endif
|
||||||
|
@ -243,7 +243,7 @@ acd_detach(struct ata_device *atadev)
|
|||||||
free(entry, M_ACD);
|
free(entry, M_ACD);
|
||||||
}
|
}
|
||||||
destroy_dev(cdp->dev);
|
destroy_dev(cdp->dev);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
EVENTHANDLER_DEREGISTER(dev_clone, cdp->clone_evh);
|
EVENTHANDLER_DEREGISTER(dev_clone, cdp->clone_evh);
|
||||||
#endif
|
#endif
|
||||||
devstat_remove_entry(cdp->stats);
|
devstat_remove_entry(cdp->stats);
|
||||||
@ -276,7 +276,7 @@ acd_init_lun(struct ata_device *atadev)
|
|||||||
return cdp;
|
return cdp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
static void
|
static void
|
||||||
acd_clone(void *arg, char *name, int namelen, dev_t *dev)
|
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;
|
dev->si_drv1 = cdp;
|
||||||
cdp->dev = dev;
|
cdp->dev = dev;
|
||||||
cdp->device->flags |= ATA_D_MEDIA_CHANGED;
|
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);
|
cdp->clone_evh = EVENTHANDLER_REGISTER(dev_clone, acd_clone, cdp, 1000);
|
||||||
#endif
|
#endif
|
||||||
acd_set_ioparm(cdp);
|
acd_set_ioparm(cdp);
|
||||||
|
@ -322,7 +322,7 @@ struct acd_softc {
|
|||||||
u_int block_size; /* blocksize currently used */
|
u_int block_size; /* blocksize currently used */
|
||||||
struct devstat *stats; /* devstat entry */
|
struct devstat *stats; /* devstat entry */
|
||||||
dev_t dev; /* device place holders */
|
dev_t dev; /* device place holders */
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
eventhandler_tag clone_evh;
|
eventhandler_tag clone_evh;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -317,7 +317,7 @@ struct fd_data {
|
|||||||
struct callout_handle tohandle;
|
struct callout_handle tohandle;
|
||||||
struct devstat *device_stats;
|
struct devstat *device_stats;
|
||||||
dev_t masterdev;
|
dev_t masterdev;
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
eventhandler_tag clonetag;
|
eventhandler_tag clonetag;
|
||||||
dev_t clonedevs[NUMDENS - 1];
|
dev_t clonedevs[NUMDENS - 1];
|
||||||
#endif
|
#endif
|
||||||
@ -388,7 +388,7 @@ static int fdc_detach(device_t dev);
|
|||||||
static void fdc_add_child(device_t, const char *, int);
|
static void fdc_add_child(device_t, const char *, int);
|
||||||
static int fdc_attach(device_t);
|
static int fdc_attach(device_t);
|
||||||
static int fdc_print_child(device_t, 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 *);
|
static void fd_clone (void *, char *, int, dev_t *);
|
||||||
#endif
|
#endif
|
||||||
static int fd_probe(device_t);
|
static int fd_probe(device_t);
|
||||||
@ -1121,7 +1121,7 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
|
|||||||
|
|
||||||
#endif /* NCARD > 0 */
|
#endif /* NCARD > 0 */
|
||||||
|
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
/*
|
/*
|
||||||
* Create a clone device upon request by devfs.
|
* Create a clone device upon request by devfs.
|
||||||
*/
|
*/
|
||||||
@ -1331,12 +1331,12 @@ fd_attach(device_t dev)
|
|||||||
struct fd_data *fd;
|
struct fd_data *fd;
|
||||||
|
|
||||||
fd = device_get_softc(dev);
|
fd = device_get_softc(dev);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
fd->clonetag = EVENTHANDLER_REGISTER(dev_clone, fd_clone, fd, 1000);
|
fd->clonetag = EVENTHANDLER_REGISTER(dev_clone, fd_clone, fd, 1000);
|
||||||
#endif
|
#endif
|
||||||
fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6,
|
fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6,
|
||||||
UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
|
UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < NUMDENS - 1; i++)
|
for (i = 0; i < NUMDENS - 1; i++)
|
||||||
@ -1359,7 +1359,7 @@ fd_detach(device_t dev)
|
|||||||
untimeout(fd_turnoff, fd, fd->toffhandle);
|
untimeout(fd_turnoff, fd, fd->toffhandle);
|
||||||
devstat_remove_entry(fd->device_stats);
|
devstat_remove_entry(fd->device_stats);
|
||||||
destroy_dev(fd->masterdev);
|
destroy_dev(fd->masterdev);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < NUMDENS - 1; 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 callout_handle tohandle;
|
||||||
struct devstat *device_stats;
|
struct devstat *device_stats;
|
||||||
dev_t masterdev;
|
dev_t masterdev;
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
eventhandler_tag clonetag;
|
eventhandler_tag clonetag;
|
||||||
dev_t clonedevs[NUMDENS - 1];
|
dev_t clonedevs[NUMDENS - 1];
|
||||||
#endif
|
#endif
|
||||||
@ -388,7 +388,7 @@ static int fdc_detach(device_t dev);
|
|||||||
static void fdc_add_child(device_t, const char *, int);
|
static void fdc_add_child(device_t, const char *, int);
|
||||||
static int fdc_attach(device_t);
|
static int fdc_attach(device_t);
|
||||||
static int fdc_print_child(device_t, 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 *);
|
static void fd_clone (void *, char *, int, dev_t *);
|
||||||
#endif
|
#endif
|
||||||
static int fd_probe(device_t);
|
static int fd_probe(device_t);
|
||||||
@ -1121,7 +1121,7 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
|
|||||||
|
|
||||||
#endif /* NCARD > 0 */
|
#endif /* NCARD > 0 */
|
||||||
|
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
/*
|
/*
|
||||||
* Create a clone device upon request by devfs.
|
* Create a clone device upon request by devfs.
|
||||||
*/
|
*/
|
||||||
@ -1331,12 +1331,12 @@ fd_attach(device_t dev)
|
|||||||
struct fd_data *fd;
|
struct fd_data *fd;
|
||||||
|
|
||||||
fd = device_get_softc(dev);
|
fd = device_get_softc(dev);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
fd->clonetag = EVENTHANDLER_REGISTER(dev_clone, fd_clone, fd, 1000);
|
fd->clonetag = EVENTHANDLER_REGISTER(dev_clone, fd_clone, fd, 1000);
|
||||||
#endif
|
#endif
|
||||||
fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6,
|
fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6,
|
||||||
UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
|
UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < NUMDENS - 1; i++)
|
for (i = 0; i < NUMDENS - 1; i++)
|
||||||
@ -1359,7 +1359,7 @@ fd_detach(device_t dev)
|
|||||||
untimeout(fd_turnoff, fd, fd->toffhandle);
|
untimeout(fd_turnoff, fd, fd->toffhandle);
|
||||||
devstat_remove_entry(fd->device_stats);
|
devstat_remove_entry(fd->device_stats);
|
||||||
destroy_dev(fd->masterdev);
|
destroy_dev(fd->masterdev);
|
||||||
#ifndef BURN_BRIDGES
|
#ifdef GONE_IN_5
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < NUMDENS - 1; i++)
|
for (i = 0; i < NUMDENS - 1; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user