home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / cmd / standalone / saio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-28  |  880 b   |  67 lines

  1. /*
  2.  * header file for standalone package
  3.  */
  4.  
  5. /*
  6.  * io block: includes an
  7.  * inode, cells for the use of seek, etc,
  8.  * and a buffer.
  9.  */
  10. struct    iob {
  11.     char    i_flgs;
  12.     char    i_ctlr;
  13.     struct inode i_ino;
  14.     int i_unit;
  15.     daddr_t    i_boff;
  16.     daddr_t    i_cyloff;
  17.     off_t    i_offset;
  18.     daddr_t    i_bn;
  19.     char    *i_ma;
  20.     int    i_cc;
  21.     char    i_buf[512];
  22. };
  23.  
  24. #define F_READ    01
  25. #define F_WRITE    02
  26. #define F_ALLOC    04
  27. #define F_FILE    010
  28.  
  29.  
  30.  
  31.  
  32. /*
  33.  * dev switch
  34.  */
  35. struct devsw {
  36.     char    *dv_name;
  37.     int    (*dv_strategy)();
  38.     int    (*dv_open)();
  39.     int    (*dv_close)();
  40. };
  41.  
  42. struct devsw devsw[];
  43.  
  44. /*
  45.  * request codes. Must be the same a F_XXX above
  46.  */
  47. #define    READ    1
  48. #define    WRITE    2
  49.  
  50.  
  51. #define    NBUFS    4
  52.  
  53.  
  54. char    b[NBUFS][512];
  55. daddr_t    blknos[NBUFS];
  56.  
  57.  
  58.  
  59. #define NFILES    4
  60. struct    iob iob[NFILES];
  61.  
  62. /*
  63.  * Set to which 32Kw segment the code is physically running in.
  64.  * Must be set by the users main (or there abouts).
  65.  */
  66. int    segflag;
  67.