--- researchv9/sys/boot/stand/saio.h 2018/04/24 17:21:59 1.1.1.1 +++ researchv9/sys/boot/stand/saio.h 2018/04/24 17:31:07 1.1.1.2 @@ -8,8 +8,8 @@ * header file for standalone I/O package */ -#include "../h/types.h" -#include "../mon/sunromvec.h" +#include +#include /* * io block: the structure passed to or from the device drivers. @@ -44,15 +44,41 @@ struct saioreq { #define F_EOF 020 /* EOF on device */ /* + * io block: includes an + * inode, cells for the use of seek, etc, + * and a buffer. + */ +#undef i_buf /* curse you clever folk from inode.h */ +struct iob { + struct saioreq i_si; /* I/O request block for this file */ + struct inode i_ino; /* Inode for this file */ + char i_buf[BUFSIZE];/* Buffer for reading inodes & dirs */ +}; +#define i_flgs i_si.si_flgs +#define i_boottab i_si.si_boottab +#define i_devdata i_si.si_devdata +#define i_ctlr i_si.si_ctlr +#define i_unit i_si.si_unit +#define i_boff i_si.si_boff +#define i_cyloff i_si.si_cyloff +#define i_offset i_si.si_offset +#define i_bn i_si.si_bn +#define i_ma i_si.si_ma +#define i_cc i_si.si_cc + +/* * request codes. Must be the same as F_XXX above */ #define READ F_READ #define WRITE F_WRITE -/* - * how many files can be open at once. - */ -#define NFILES 3 +#define NBUFS 4 + +char b[NBUFS][BUFSIZE]; +daddr_t blknos[NBUFS]; + +#define NFILES 4 +struct iob iob[NFILES]; /* * Ethernet interface descriptor