allow the ifa to be specified as well as the ifp on a RTM_CHANGE\;
[unix-history] / usr / src / sys / stand.att / saio.h
index f3ca753..ff23fe4 100644 (file)
@@ -1,11 +1,14 @@
 /*
 /*
- * Copyright (c) 1982, 1988 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1982, 1988 The Regents of the University of California.
+ * All rights reserved.
  *
  *
- *     @(#)saio.h      7.7 (Berkeley) %G%
+ * %sccs.include.redist.c%
+ *
+ *     @(#)saio.h      7.15 (Berkeley) %G%
  */
 
  */
 
+#include "../ufs/fs.h"
+#include "../ufs/dinode.h"
 #include "saioctl.h"
 #include "saerrno.h"
 
 #include "saioctl.h"
 #include "saerrno.h"
 
 #define        NULL    0
 
 /*
 #define        NULL    0
 
 /*
- * Io block: includes an inode, cells for the use of seek, etc.,
+ * Io block: includes an dinode, cells for the use of seek, etc.,
  * and a buffer.
  */
 struct iob {
        int     i_flgs;         /* see F_ below */
  * and a buffer.
  */
 struct iob {
        int     i_flgs;         /* see F_ below */
-       int     i_adapt;        /* adapter */
+       int     i_adapt;        /* adapter or bus */
        int     i_ctlr;         /* controller */
        int     i_unit;         /* pseudo device unit */
        int     i_part;         /* disk partition */
        daddr_t i_boff;         /* block offset on device */
        int     i_ctlr;         /* controller */
        int     i_unit;         /* pseudo device unit */
        int     i_part;         /* disk partition */
        daddr_t i_boff;         /* block offset on device */
-       struct  inode i_ino;    /* inode, if file */
+       struct  dinode i_ino;   /* dinode, if file */
        daddr_t i_cyloff;       /* cylinder offset on device */
        off_t   i_offset;       /* seek offset in file */
        daddr_t i_cyloff;       /* cylinder offset on device */
        off_t   i_offset;       /* seek offset in file */
+       dev_t   i_dev;          /* associated device */
        daddr_t i_bn;           /* 1st block # of next read */
        char    *i_ma;          /* memory address of i/o buffer */
        int     i_cc;           /* character count of transfer */
        daddr_t i_bn;           /* 1st block # of next read */
        char    *i_ma;          /* memory address of i/o buffer */
        int     i_cc;           /* character count of transfer */
@@ -38,16 +42,23 @@ struct iob {
                char dummy[SBSIZE];
        } i_un;
 };
                char dummy[SBSIZE];
        } i_un;
 };
+
 #define        i_fs    i_un.ui_fs
 #define        i_fs    i_un.ui_fs
+#define        i_bus   i_adapt
+
+/* codes for sector header word 1 */
+#define        HDR1_FMT22      0x1000  /* standard 16 bit format */
+#define        HDR1_OKSCT      0xc000  /* sector ok */
+#define        HDR1_SSF        0x2000  /* skip sector flag */
 
 
-#define        F_READ          0x1     /* file opened for reading */
-#define        F_WRITE         0x2     /* file opened for writing */
-#define        F_ALLOC         0x4     /* buffer allocated */
-#define        F_FILE          0x8     /* file instead of device */
-#define        F_NBSF          0x10    /* no bad sector forwarding */
-#define        F_ECCLM         0x20    /* limit # of bits in ecc correction */
-#define        F_SSI           0x40    /* set skip sector inhibit */
-#define        F_SEVRE         0x80    /* Severe burnin (no retries, no ECC) */
+#define        F_READ          0x0001  /* file opened for reading */
+#define        F_WRITE         0x0002  /* file opened for writing */
+#define        F_ALLOC         0x0004  /* buffer allocated */
+#define        F_FILE          0x0008  /* file instead of device */
+#define        F_NBSF          0x0010  /* no bad sector forwarding */
+#define        F_ECCLM         0x0020  /* limit # of bits in ecc correction */
+#define        F_SSI           0x0040  /* set skip sector inhibit */
+#define        F_SEVRE         0x0080  /* Severe burnin (no retries, no ECC) */
 
 /* io types */
 #define        F_RDDATA        0x0100  /* read data */
 
 /* io types */
 #define        F_RDDATA        0x0100  /* read data */
@@ -58,9 +69,6 @@ struct iob {
 
 #define        F_TYPEMASK      0xff00
 
 
 #define        F_TYPEMASK      0xff00
 
-/*
- * Request codes. Must be the same as F_XXX above
- */
 #define        READ    F_READ
 #define        WRITE   F_WRITE
 
 #define        READ    F_READ
 #define        WRITE   F_WRITE