1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Fixed (nonexistent) initialization of bp->b_pblkno. disksort() for

floppies must have been random in 2.x since we reintroduced sorting
on b_pblkno on 1995/03/18.  Drivers still initialize b_cylin/b_resid
although this is no longer used.

Removed unused, wrong function fdsize().  (Returning 0 means that the
device exists and has size 0, not that the device doesn't exist.
swaponvp() allows for size 0 by stupidly calling the d_psize function
twice if the size isn't 0.  setdumpdev() doesn't allow for it.)

Continued removing /* ARGSUSED */ from drivers.
This commit is contained in:
Bruce Evans 1995-11-18 07:48:11 +00:00
parent 0f5c6b7d97
commit 27513ca73b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12359
3 changed files with 6 additions and 42 deletions

View File

@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.68 1995/11/04 13:23:34 bde Exp $
* $Id: fd.c,v 1.69 1995/11/04 17:07:17 bde Exp $
*
*/
@ -272,9 +272,6 @@ int ftattach(struct isa_device *, struct isa_device *, int);
static int fdprobe(struct isa_device *);
static int fdattach(struct isa_device *);
/* exported functions */
int fdsize (dev_t);
/* needed for ft driver, thus exported */
int in_fdc(fdcu_t);
int out_fdc(fdcu_t, int);
@ -774,12 +771,6 @@ fdattach(struct isa_device *dev)
return (1);
}
int
fdsize(dev_t dev)
{
return(0);
}
/****************************************************************************/
/* motor control stuff */
/* remember to not deselect the drive we're working on */
@ -825,7 +816,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
}
}
/* ARGSUSED */
static void
fd_turnoff(void *arg1)
{
@ -840,7 +830,6 @@ fd_turnoff(void *arg1)
splx(s);
}
/* ARGSUSED */
static void
fd_motor_on(void *arg1)
{
@ -1129,6 +1118,7 @@ fdstrategy(struct buf *bp)
goto bad;
}
bp->b_cylin = blknum / (fd->ft->sectrac * fd->ft->heads);
bp->b_pblkno = bp->b_blkno;
dp = &(fdc->head);
s = splbio();
disksort(dp, bp);
@ -1163,7 +1153,6 @@ fdstart(fdcu_t fdcu)
splx(s);
}
/* ARGSUSED */
static void
fd_timeout(void *arg1)
{
@ -1215,7 +1204,6 @@ fd_timeout(void *arg1)
}
/* just ensure it has the right spl */
/* ARGSUSED */
static void
fd_pseudointr(void *arg1)
{

View File

@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.68 1995/11/04 13:23:34 bde Exp $
* $Id: fd.c,v 1.69 1995/11/04 17:07:17 bde Exp $
*
*/
@ -272,9 +272,6 @@ int ftattach(struct isa_device *, struct isa_device *, int);
static int fdprobe(struct isa_device *);
static int fdattach(struct isa_device *);
/* exported functions */
int fdsize (dev_t);
/* needed for ft driver, thus exported */
int in_fdc(fdcu_t);
int out_fdc(fdcu_t, int);
@ -774,12 +771,6 @@ fdattach(struct isa_device *dev)
return (1);
}
int
fdsize(dev_t dev)
{
return(0);
}
/****************************************************************************/
/* motor control stuff */
/* remember to not deselect the drive we're working on */
@ -825,7 +816,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
}
}
/* ARGSUSED */
static void
fd_turnoff(void *arg1)
{
@ -840,7 +830,6 @@ fd_turnoff(void *arg1)
splx(s);
}
/* ARGSUSED */
static void
fd_motor_on(void *arg1)
{
@ -1129,6 +1118,7 @@ fdstrategy(struct buf *bp)
goto bad;
}
bp->b_cylin = blknum / (fd->ft->sectrac * fd->ft->heads);
bp->b_pblkno = bp->b_blkno;
dp = &(fdc->head);
s = splbio();
disksort(dp, bp);
@ -1163,7 +1153,6 @@ fdstart(fdcu_t fdcu)
splx(s);
}
/* ARGSUSED */
static void
fd_timeout(void *arg1)
{
@ -1215,7 +1204,6 @@ fd_timeout(void *arg1)
}
/* just ensure it has the right spl */
/* ARGSUSED */
static void
fd_pseudointr(void *arg1)
{

View File

@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.68 1995/11/04 13:23:34 bde Exp $
* $Id: fd.c,v 1.69 1995/11/04 17:07:17 bde Exp $
*
*/
@ -272,9 +272,6 @@ int ftattach(struct isa_device *, struct isa_device *, int);
static int fdprobe(struct isa_device *);
static int fdattach(struct isa_device *);
/* exported functions */
int fdsize (dev_t);
/* needed for ft driver, thus exported */
int in_fdc(fdcu_t);
int out_fdc(fdcu_t, int);
@ -774,12 +771,6 @@ fdattach(struct isa_device *dev)
return (1);
}
int
fdsize(dev_t dev)
{
return(0);
}
/****************************************************************************/
/* motor control stuff */
/* remember to not deselect the drive we're working on */
@ -825,7 +816,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
}
}
/* ARGSUSED */
static void
fd_turnoff(void *arg1)
{
@ -840,7 +830,6 @@ fd_turnoff(void *arg1)
splx(s);
}
/* ARGSUSED */
static void
fd_motor_on(void *arg1)
{
@ -1129,6 +1118,7 @@ fdstrategy(struct buf *bp)
goto bad;
}
bp->b_cylin = blknum / (fd->ft->sectrac * fd->ft->heads);
bp->b_pblkno = bp->b_blkno;
dp = &(fdc->head);
s = splbio();
disksort(dp, bp);
@ -1163,7 +1153,6 @@ fdstart(fdcu_t fdcu)
splx(s);
}
/* ARGSUSED */
static void
fd_timeout(void *arg1)
{
@ -1215,7 +1204,6 @@ fd_timeout(void *arg1)
}
/* just ensure it has the right spl */
/* ARGSUSED */
static void
fd_pseudointr(void *arg1)
{