diff options
author | julian <julian@FreeBSD.org> | 1995-08-28 09:19:25 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-08-28 09:19:25 +0000 |
commit | ebb726ec45c12268b6b931aa636809cc9cb99a90 (patch) | |
tree | 53b6da073fd58ab81ebf18bb0642954c76b642bd /sys/ufs/ufs/dir.h | |
parent | 6f51a7615899188fd49e4446341be92684c778de (diff) | |
download | FreeBSD-src-ebb726ec45c12268b6b931aa636809cc9cb99a90.zip FreeBSD-src-ebb726ec45c12268b6b931aa636809cc9cb99a90.tar.gz |
Reviewed by: julian with quick glances by bruce and others
Submitted by: terry (terry lambert)
This is a composite of 3 patch sets submitted by terry.
they are:
New low-level init code that supports loadbal modules better
some cleanups in the namei code to help terry in 16-bit character support
some changes to the mount-root code to make it a little more
modular..
NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able
to test those cases..
certainly mounting root of disk still works just fine..
mfs should work but is untested. (tomorrows task)
The low level init stuff includes a total rewrite of init_main.c
to make it possible for new modules to have an init phase by simply
adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can
be added to the kernel without editing any other files other than the
'files' file.
Diffstat (limited to 'sys/ufs/ufs/dir.h')
-rw-r--r-- | sys/ufs/ufs/dir.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/ufs/ufs/dir.h b/sys/ufs/ufs/dir.h index f18eca8..3eae47a 100644 --- a/sys/ufs/ufs/dir.h +++ b/sys/ufs/ufs/dir.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)dir.h 8.2 (Berkeley) 1/21/94 - * $Id: dir.h,v 1.2 1994/08/02 07:54:48 davidg Exp $ + * $Id: dir.h,v 1.3 1994/08/21 07:16:14 paul Exp $ */ #ifndef _UFS_UFS_DIR_H_ @@ -101,15 +101,18 @@ struct direct { * 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) \ + (((int)&((struct direct *)0)->d_name + \ + ((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #define DIRSIZ(oldfmt, dp) \ - ((oldfmt) ? \ - ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_type+1 + 3) &~ 3)) : \ - ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))) + ((oldfmt) ? DIRECTSIZ((dp)->d_type) : DIRECTSIZ((dp)->d_namlen)) #else #define DIRSIZ(oldfmt, dp) \ - ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) + DIRECTSIZ((dp)->d_namlen) #endif #define OLDDIRFMT 1 #define NEWDIRFMT 0 |