[BACK]Return to dir.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / ufs / ufs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/ufs/ufs/dir.h between version 1.18 and 1.19

version 1.18, 2005/08/19 05:28:48 version 1.19, 2005/08/23 08:05:13
Line 58 
Line 58 
  * the length of the entry, and the length of the name contained in   * the length of the entry, and the length of the name contained in
  * the entry.  These are followed by the name padded to a 4 byte boundary.   * the entry.  These are followed by the name padded to a 4 byte boundary.
  * All names are guaranteed null terminated.   * All names are guaranteed null terminated.
  * The maximum length of a name in a directory is MAXNAMLEN.   * The maximum length of a name in a directory is FFS_MAXNAMLEN.
  *   *
  * The macro DIRSIZ(fmt, dp) gives the amount of space required to represent   * The macro DIRSIZ(fmt, dp) gives the amount of space required to represent
  * a directory entry.  Free space in a directory is represented by   * a directory entry.  Free space in a directory is represented by
Line 74 
Line 74 
  */   */
 #undef  DIRBLKSIZ  #undef  DIRBLKSIZ
 #define DIRBLKSIZ       DEV_BSIZE  #define DIRBLKSIZ       DEV_BSIZE
 #undef  MAXNAMLEN  #define FFS_MAXNAMLEN   255
 #define MAXNAMLEN       255  
 #define APPLEUFS_DIRBLKSIZ 1024  #define APPLEUFS_DIRBLKSIZ 1024
   
 #define d_ino d_fileno  #define d_ino d_fileno
Line 84  struct direct {
Line 83  struct direct {
         u_int16_t d_reclen;             /* length of this record */          u_int16_t d_reclen;             /* length of this record */
         u_int8_t  d_type;               /* file type, see below */          u_int8_t  d_type;               /* file type, see below */
         u_int8_t  d_namlen;             /* length of string in d_name */          u_int8_t  d_namlen;             /* length of string in d_name */
         char      d_name[MAXNAMLEN + 1];/* name with length <= MAXNAMLEN */          char      d_name[FFS_MAXNAMLEN + 1];/* name with length <= FFS_MAXNAMLEN */
 };  };
   
 /*  /*
Line 113  struct direct {
Line 112  struct direct {
  * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.   * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
  */   */
 #define DIRECTSIZ(namlen) \  #define DIRECTSIZ(namlen) \
         ((sizeof(struct direct) - (MAXNAMLEN+1)) + (((namlen)+1 + 3) &~ 3))          ((sizeof(struct direct) - (FFS_MAXNAMLEN+1)) + (((namlen)+1 + 3) &~ 3))
   
 #if (BYTE_ORDER == LITTLE_ENDIAN)  #if (BYTE_ORDER == LITTLE_ENDIAN)
 #define DIRSIZ(oldfmt, dp, needswap)    \  #define DIRSIZ(oldfmt, dp, needswap)    \
Line 130  struct direct {
Line 129  struct direct {
   
 /*  /*
  * Template for manipulating directories.  Should use struct direct's,   * Template for manipulating directories.  Should use struct direct's,
  * but the name field is MAXNAMLEN - 1, and this just won't do.   * but the name field is FFS_MAXNAMLEN - 1, and this just won't do.
  */   */
 struct dirtemplate {  struct dirtemplate {
         u_int32_t       dot_ino;          u_int32_t       dot_ino;

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

CVSweb <webmaster@jp.NetBSD.org>