home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / namei.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  1.6 KB  |  57 lines

  1. /*
  2.  *    @(#) namei.h 1.1 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1988.
  5.  *    This Module contains Proprietary Information of
  6.  *    The Santa Cruz Operation, Microsoft Corporation
  7.  *    and AT&T, and should be treated as Confidential.
  8.  *
  9.  * Copyright (c) 1982, 1986 Regents of the University of California.
  10.  * All rights reserved.  The Berkeley software License Agreement
  11.  * specifies the terms and conditions for redistribution.
  12.  */
  13.  
  14. #if defined(M_I8086) || defined(M_I286)
  15. #define    nchp_t    struct namecache far *
  16. #define    nchpp_t    struct namecache far * far *
  17. #else
  18. #define    nchp_t    struct namecache *
  19. #define    nchpp_t    struct namecache **
  20. #endif
  21.  
  22. /*
  23.  * This structure describes the elements in the cache of recent
  24.  * names looked up by namei.
  25.  */
  26. struct    namecache {
  27.     nchp_t    nc_forw;        /* hash chain, MUST BE FIRST */
  28.     nchp_t    nc_back;        /* hash chain, MUST BE FIRST */
  29.     nchp_t    nc_nxt;            /* LRU chain */
  30.     nchpp_t    nc_prev;        /* LRU chain */
  31.     inodep_t nc_ip;            /* inode the name refers to */
  32.     ino_t    nc_ino;            /* ino of parent of name */
  33.     dev_t    nc_dev;            /* dev of parent of name */
  34.     dev_t    nc_idev;        /* dev of the name ref'd */
  35.     long    nc_id;            /* referenced inode's id */
  36.     char    nc_name[DIRSIZ];    /* segment name */
  37. };
  38.  
  39. #ifdef M_KERNEL
  40.  
  41. #if defined(M_I8086) || defined(M_I286)
  42. extern struct namecache far namecache[];
  43. #else
  44. extern struct namecache namecache[];
  45. #endif
  46.  
  47. #endif    /* M_KERNEL */
  48.  
  49. /*
  50.  * namei operations and modifiers
  51.  */
  52. #define    LOOKUP        0    /* perform name lookup only */
  53. #define    CREATE        1    /* setup for file creation */
  54. #define    DELETE        2    /* setup for file deletion */
  55. #define    LOCKPARENT    0x10    /* see the top of namei */
  56. #define NOCACHE        0x20    /* name must not be left in cache */
  57.