home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3297 / getnode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-07  |  696 b   |  34 lines

  1. #ifndef GETNODE_H
  2. #define GETNODE_H
  3.  
  4. #include "confdevt.h"
  5.  
  6. /* don't give me any crap about one statement per line. */
  7. /* this is a lot more readable on half a page than on two. */
  8.  
  9. /* names can be 0 for not found. */
  10.  
  11. #define NODE_ID_INO 0
  12. #define NODE_ID_DEV 1
  13. #define NODE_ID_FIFOINO 2
  14. #define NODE_ID_FIFO 3
  15.  
  16. struct nodebuf
  17.  {
  18.   char *type; /* e.g., chr, blk, reg */
  19.   int flagdev; /* one of the NODE_ID settings */
  20.   union
  21.    {
  22.     /* XXX for inum/dev types here */
  23.     struct { unsigned inum; unsigned DEV_T dev; char *name; int flagnfs; } ino;
  24.     struct { int maj; int min; char *name; } dev;
  25.    }
  26.   id; /* inode or device */
  27.  }
  28. ;
  29.  
  30. extern int getnode();
  31. extern int getnodeinit();
  32.  
  33. #endif
  34.