Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/ufs/dir.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/ufs/dir.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.21 retrieving revision 1.21.22.1 diff -u -p -r1.21 -r1.21.22.1 --- src/sys/ufs/ufs/dir.h 2009/07/22 04:49:19 1.21 +++ src/sys/ufs/ufs/dir.h 2013/06/23 06:18:40 1.21.22.1 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp $ */ +/* $NetBSD: dir.h,v 1.21.22.1 2013/06/23 06:18:40 tls Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -45,14 +45,14 @@ * quantity to keep down the cost of doing lookup on a 32-bit machine. */ #define doff_t int32_t -#define MAXDIRSIZE (0x7fffffff) +#define UFS_MAXDIRSIZE (0x7fffffff) /* - * A directory consists of some number of blocks of DIRBLKSIZ - * bytes, where DIRBLKSIZ is chosen such that it can be transferred + * A directory consists of some number of blocks of UFS_DIRBLKSIZ + * bytes, where UFS_DIRBLKSIZ is chosen such that it can be transferred * to disk in a single atomic operation (e.g. 512 bytes on most machines). * - * Each DIRBLKSIZ byte block contains some number of directory entry + * Each UFS_DIRBLKSIZ byte block contains some number of directory entry * structures, which are of variable length. Each directory entry has * a struct direct at the front of it, containing its inode number, * the length of the entry, and the length of the name contained in @@ -60,9 +60,9 @@ * All names are guaranteed null terminated. * 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 UFS_DIRSIZ(fmt, dp) gives the amount of space required to represent * a directory entry. Free space in a directory is represented by - * entries which have dp->d_reclen > DIRSIZ(fmt, dp). All DIRBLKSIZ bytes + * entries which have dp->d_reclen > DIRSIZ(fmt, dp). All UFS_DIRBLKSIZ bytes * in a directory block are claimed by the directory entries. This * usually results in the last entry in a directory having a large * dp->d_reclen. When entries are deleted from a directory, the @@ -72,8 +72,8 @@ * Entries other than the first in a directory do not normally have * dp->d_ino set to 0. */ -#undef DIRBLKSIZ -#define DIRBLKSIZ DEV_BSIZE +#undef UFS_DIRBLKSIZ +#define UFS_DIRBLKSIZ DEV_BSIZE #define FFS_MAXNAMLEN 255 #define APPLEUFS_DIRBLKSIZ 1024 @@ -106,26 +106,26 @@ struct direct { #define DTTOIF(dirtype) ((dirtype) << 12) /* - * The DIRSIZ macro gives the minimum record length which will hold + * The UFS_DIRSIZ macro gives the minimum record length which will hold * the directory entry. This requires the amount of space in struct direct * without the d_name field, plus enough space for the name with a terminating * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. */ -#define DIRECTSIZ(namlen) \ +#define UFS_DIRECTSIZ(namlen) \ ((sizeof(struct direct) - (FFS_MAXNAMLEN+1)) + (((namlen)+1 + 3) &~ 3)) #if (BYTE_ORDER == LITTLE_ENDIAN) -#define DIRSIZ(oldfmt, dp, needswap) \ - (((oldfmt) && !(needswap)) ? \ - DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) +#define UFS_DIRSIZ(oldfmt, dp, needswap) \ + (((oldfmt) && !(needswap)) ? \ + UFS_DIRECTSIZ((dp)->d_type) : UFS_DIRECTSIZ((dp)->d_namlen)) #else -#define DIRSIZ(oldfmt, dp, needswap) \ - (((oldfmt) && (needswap)) ? \ - DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) +#define UFS_DIRSIZ(oldfmt, dp, needswap) \ + (((oldfmt) && (needswap)) ? \ + UFS_DIRECTSIZ((dp)->d_type) : UFS_DIRECTSIZ((dp)->d_namlen)) #endif -#define OLDDIRFMT 1 -#define NEWDIRFMT 0 +#define UFS_OLDDIRFMT 1 +#define UFS_NEWDIRFMT 0 /* * Template for manipulating directories. Should use struct direct's, @@ -145,7 +145,7 @@ struct dirtemplate { }; /* - * This is the old format of directories, sanz type element. + * This is the old format of directories, sans type element. */ struct odirtemplate { u_int32_t dot_ino;