home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / conf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  3.5 KB  |  152 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. /*    Copyright (c) 1987, 1988 Microsoft Corporation    */
  9. /*      All Rights Reserved    */
  10.  
  11. /*    This Module contains Proprietary Information of Microsoft  */
  12. /*    Corporation and should be treated as Confidential.       */
  13.  
  14.  
  15. #ident    "@(#)head.sys:conf.h    1.3.1.3"
  16.  
  17. /*
  18.  * Declaration of block device switch. Each entry (row) is
  19.  * the only link between the main unix code and the driver.
  20.  * The initialization of the device switches is in the file conf.c.
  21.  */
  22. struct bdevsw {
  23.     int    (*d_open)();
  24.     int    (*d_close)();
  25.     int    (*d_strategy)();
  26.     int    (*d_print)();
  27.     char     *d_name;
  28.     struct iobuf    *d_tab;
  29. };
  30. extern struct bdevsw bdevsw[];
  31.  
  32. /*
  33.  * Character device switch.
  34.  */
  35. struct cdevsw {
  36.     int    (*d_open)();
  37.     int    (*d_close)();
  38.     int    (*d_read)();
  39.     int    (*d_write)();
  40.     int    (*d_ioctl)();
  41.     struct tty *d_ttys;
  42.     struct streamtab *d_str;
  43.     char     *d_name;
  44. };
  45. extern struct cdevsw cdevsw[];
  46.  
  47. /*
  48.  * And the console co routine.  This is declared as
  49.  * a configuration parameter so that it can be changed
  50.  * to match /dev/console.
  51.  */
  52. struct    conssw {
  53.     int    (*co)();
  54.     int    co_dev;
  55.     int    (*ci)();
  56. };
  57.  
  58. extern struct conssw conssw;
  59.  
  60. #define    FMNAMESZ    8
  61.  
  62. struct fmodsw {
  63.     char    f_name[FMNAMESZ+1];
  64.     struct  streamtab *f_str;
  65. };
  66. extern struct fmodsw fmodsw[];
  67.  
  68. extern int    bdevcnt;
  69. extern int    cdevcnt;
  70. extern int    fmodcnt;
  71.  
  72. /*
  73.  * Line discipline switch.
  74.  */
  75. struct linesw {
  76.     int    (*l_open)();
  77.     int    (*l_close)();
  78.     int    (*l_read)();
  79.     int    (*l_write)();
  80.     int    (*l_ioctl)();
  81.     int    (*l_input)();
  82.     int    (*l_output)();
  83.     int    (*l_mdmint)();
  84. };
  85. extern struct linesw linesw[];
  86.  
  87. extern int    linecnt;
  88. /*
  89.  * Terminal switch
  90.  */
  91. struct termsw {
  92.     int    (*t_input)();
  93.     int    (*t_output)();
  94.     int    (*t_ioctl)();
  95. };
  96. extern struct termsw termsw[];
  97.  
  98. extern int    termcnt;
  99.  
  100. /*file system switch structure */
  101. struct fstypsw {
  102. /* 0*/    int        (*fs_init)();
  103. /* 1*/    int        (*fs_iput)();
  104. /* 2*/    struct inode    *(*fs_iread)();
  105. /* 3*/    int        (*fs_filler)();
  106. /* 4*/    int        (*fs_iupdat)();
  107. /* 5*/    int        (*fs_readi)();
  108. /* 6*/    int        (*fs_writei)();
  109. /* 7*/    int        (*fs_itrunc)();
  110. /* 8*/    int        (*fs_statf)();
  111. /* 9*/    int        (*fs_namei)();
  112. /*10*/    int        (*fs_mount)();
  113. /*11*/    int        (*fs_umount)();
  114. /*12*/    struct inode    *(*fs_getinode)();
  115. /*13*/    int        (*fs_openi)();        /* open inode */
  116. /*14*/    int        (*fs_closei)();        /* close inode */
  117. /*15*/    int        (*fs_update)();        /* update */
  118. /*16*/    int        (*fs_statfs)();        /* statfs and ustat */
  119. /*17*/    int        (*fs_access)();
  120. /*18*/    int        (*fs_getdents)();
  121. /*19*/    int        (*fs_allocmap)();    /* Let the fs decide if */
  122.                         /* if can build a map so */
  123.                         /* this fs can be used for */
  124.                         /* paging */
  125. /*20*/    int        *(*fs_freemap)();    /* free block list */
  126. /*21*/    int        (*fs_readmap)();    /* read a page from the fs */
  127.                         /* using the block list */
  128. /*22*/    int        (*fs_setattr)();    /* set attributes */
  129. /*23*/    int        (*fs_notify)();        /* notify fs of action */
  130. /*24*/    int        (*fs_fcntl)();        /* fcntl */
  131. /*25*/    int        (*fs_fsinfo)();        /* additional info */
  132. /*26*/    int        (*fs_ioctl)();        /* ioctl */
  133. /*27*/    int        (*fs_fill[5])();
  134. };
  135. extern struct fstypsw fstypsw[];
  136. extern short nfstyp;
  137.  
  138.  
  139. /* FS specific data */
  140. struct fsinfo {
  141.     long        fs_flags;    /* flags - see below */
  142.     struct mount    *fs_pipe;    /* The mount point to be used */
  143.                     /* as the pipe device for */
  144.                     /* this fstyp */
  145.     char        *fs_name;     /* Pointer to fstyp name */
  146.                     /* See above */
  147.     long        fs_notify;    /* Flags for fs_notify */
  148.                     /* e.g., NO_CHDIR, NO_CHROOT */
  149.                     /* see nami.h */
  150. };
  151. extern struct fsinfo fsinfo[];
  152.