fdc.c (c3aac50f284c6cca5b4f2eb46aaa13812cb8b630) fdc.c (9465bf44956bbdaba09fa02aa84c2e58dbf993d2)
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Don Ahn.
7 *
8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu)

--- 1212 unchanged lines hidden (view full) ---

1221int
1222Fdopen(dev_t dev, int flags, int mode, struct proc *p)
1223{
1224 fdu_t fdu = FDUNIT(minor(dev));
1225 int type = FDTYPE(minor(dev));
1226 fd_p fd;
1227 fdc_p fdc;
1228
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Don Ahn.
7 *
8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu)

--- 1212 unchanged lines hidden (view full) ---

1221int
1222Fdopen(dev_t dev, int flags, int mode, struct proc *p)
1223{
1224 fdu_t fdu = FDUNIT(minor(dev));
1225 int type = FDTYPE(minor(dev));
1226 fd_p fd;
1227 fdc_p fdc;
1228
1229 dev->si_bsize_phys = DEV_BSIZE;
1230 dev->si_bsize_best = BLKDEV_IOSIZE;
1231 dev->si_bsize_max = MAXBSIZE;
1229 /* check bounds */
1230 if ((fd = devclass_get_softc(fd_devclass, fdu)) == 0)
1231 return (ENXIO);
1232 fdc = fd->fdc;
1233 if ((fdc == NULL) || (fd->type == NO_TYPE))
1234 return (ENXIO);
1235 if (type > NUMDENS)
1236 return (ENXIO);

--- 1069 unchanged lines hidden ---
1232 /* check bounds */
1233 if ((fd = devclass_get_softc(fd_devclass, fdu)) == 0)
1234 return (ENXIO);
1235 fdc = fd->fdc;
1236 if ((fdc == NULL) || (fd->type == NO_TYPE))
1237 return (ENXIO);
1238 if (type > NUMDENS)
1239 return (ENXIO);

--- 1069 unchanged lines hidden ---