inline expand geterror, which no longer exists
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Fri, 13 Apr 1990 10:16:16 +0000 (02:16 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Fri, 13 Apr 1990 10:16:16 +0000 (02:16 -0800)
SCCS-vsn: sys/vax/uba/tm.c 7.11
SCCS-vsn: sys/vax/uba/tmscp.c 7.12
SCCS-vsn: sys/vax/uba/ts.c 7.11
SCCS-vsn: sys/vax/uba/ut.c 7.9

usr/src/sys/vax/uba/tm.c
usr/src/sys/vax/uba/tmscp.c
usr/src/sys/vax/uba/ts.c
usr/src/sys/vax/uba/ut.c

index 69b9d88..ba807e5 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)tm.c        7.10 (Berkeley) %G%
+ *     @(#)tm.c        7.11 (Berkeley) %G%
  */
 
 #include "te.h"
  */
 
 #include "te.h"
@@ -856,7 +856,7 @@ tmioctl(dev, cmd, data, flag)
        register struct te_softc *sc = &te_softc[teunit];
        register struct buf *bp = &ctmbuf[TMUNIT(dev)];
        register callcount;
        register struct te_softc *sc = &te_softc[teunit];
        register struct buf *bp = &ctmbuf[TMUNIT(dev)];
        register callcount;
-       int fcount;
+       int fcount, error = 0;
        struct mtop *mtop;
        struct mtget *mtget;
        /* we depend of the values and order of the MT codes here */
        struct mtop *mtop;
        struct mtget *mtget;
        /* we depend of the values and order of the MT codes here */
@@ -902,7 +902,10 @@ tmioctl(dev, cmd, data, flag)
                        if ((bp->b_flags&B_ERROR) || sc->sc_erreg&TMER_BOT)
                                break;
                }
                        if ((bp->b_flags&B_ERROR) || sc->sc_erreg&TMER_BOT)
                                break;
                }
-               return (geterror(bp));
+               if (bp->b_flags&B_ERROR)
+                       if ((error = bp->b_error)==0)
+                               return (EIO);
+               return (error);
 
        case MTIOCGET:
                mtget = (struct mtget *)data;
 
        case MTIOCGET:
                mtget = (struct mtget *)data;
index aa1ba70..997ce53 100644 (file)
@@ -1,4 +1,4 @@
-/*     @(#)tmscp.c     7.11 (Berkeley) %G% */
+/*     @(#)tmscp.c     7.12 (Berkeley) %G% */
 
 #ifndef lint
 static char    *sccsid = "@(#)tmscp.c  1.24    (ULTRIX)        1/21/86";
 
 #ifndef lint
 static char    *sccsid = "@(#)tmscp.c  1.24    (ULTRIX)        1/21/86";
@@ -1894,6 +1894,7 @@ tmscpioctl(dev, cmd, data, flag)
        register struct uba_device *ui;
        register struct tms_info *tms;
        int fcount;             /* number of files (or records) to space */
        register struct uba_device *ui;
        register struct tms_info *tms;
        int fcount;             /* number of files (or records) to space */
+       int error = 0;
        register struct mtop *mtop;     /* mag tape cmd op to perform */
        register struct mtget *mtget;   /* mag tape struct to get info in */
 
        register struct mtop *mtop;     /* mag tape cmd op to perform */
        register struct mtget *mtget;   /* mag tape struct to get info in */
 
@@ -1936,7 +1937,10 @@ tmscpioctl(dev, cmd, data, flag)
                        if (bp->b_flags & B_ERROR)      /* like hitting BOT */
                                break;
                        }
                        if (bp->b_flags & B_ERROR)      /* like hitting BOT */
                                break;
                        }
-               return (geterror(bp));
+               if (bp->b_flags&B_ERROR)
+                       if ((error = bp->b_error)==0)
+                               return (EIO);
+               return (error);
 
        case MTIOCGET:
                /*
 
        case MTIOCGET:
                /*
index 3f79361..23d4e78 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ts.c        7.10 (Berkeley) %G%
+ *     @(#)ts.c        7.11 (Berkeley) %G%
  */
 
 #include "ts.h"
  */
 
 #include "ts.h"
@@ -825,7 +825,7 @@ tsioctl(dev, cmd, data, flag)
        register struct ts_softc *sc = &ts_softc[tsdinfo[tsunit]->ui_ctlr];
        register struct buf *bp = &ctsbuf[TSUNIT(dev)];
        register int callcount;
        register struct ts_softc *sc = &ts_softc[tsdinfo[tsunit]->ui_ctlr];
        register struct buf *bp = &ctsbuf[TSUNIT(dev)];
        register int callcount;
-       int fcount;
+       int fcount, error = 0;
        struct mtop *mtop;
        struct mtget *mtget;
        /* we depend of the values and order of the MT codes here */
        struct mtop *mtop;
        struct mtget *mtget;
        /* we depend of the values and order of the MT codes here */
@@ -868,7 +868,10 @@ tsioctl(dev, cmd, data, flag)
                            sc->sc_ts.t_sts.s_xs0&TS_BOT)
                                break;
                }
                            sc->sc_ts.t_sts.s_xs0&TS_BOT)
                                break;
                }
-               return (geterror(bp));
+               if (bp->b_flags&B_ERROR)
+                       if ((error = bp->b_error)==0)
+                               return (EIO);
+               return (error);
 
        case MTIOCGET:
                mtget = (struct mtget *)data;
 
        case MTIOCGET:
                mtget = (struct mtget *)data;
index b25c1f8..e4a2620 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ut.c        7.8 (Berkeley) %G%
+ *     @(#)ut.c        7.9 (Berkeley) %G%
  */
 
 #include "tj.h"
  */
 
 #include "tj.h"
@@ -719,7 +719,7 @@ utioctl(dev, cmd, data, flag)
        register struct tj_softc *sc = &tj_softc[TJUNIT(dev)];
        register struct buf *bp = &cutbuf[UTUNIT(dev)];
        register callcount;
        register struct tj_softc *sc = &tj_softc[TJUNIT(dev)];
        register struct buf *bp = &cutbuf[UTUNIT(dev)];
        register callcount;
-       int fcount;
+       int fcount, error = 0;
        struct mtop *mtop;
        struct mtget *mtget;
        /* we depend of the values and order of the MT codes here */
        struct mtop *mtop;
        struct mtget *mtget;
        /* we depend of the values and order of the MT codes here */
@@ -754,7 +754,10 @@ utioctl(dev, cmd, data, flag)
                        if ((bp->b_flags&B_ERROR) || (sc->sc_dsreg&UTDS_BOT))
                                break;
                }
                        if ((bp->b_flags&B_ERROR) || (sc->sc_dsreg&UTDS_BOT))
                                break;
                }
-               return (geterror(bp));
+               if (bp->b_flags&B_ERROR)
+                       if ((error = bp->b_error)==0)
+                               return (EIO);
+               return (error);
 
        case MTIOCGET:
                mtget = (struct mtget *)data;
 
        case MTIOCGET:
                mtget = (struct mtget *)data;