From 56e5d9d850bfbf8d1c65d88b240e919ef0e86cf2 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 8 Sep 1994 20:03:28 +0000 Subject: Formerly mkfs.c.~3~ --- ufs-utils/mkfs.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'ufs-utils/mkfs.c') diff --git a/ufs-utils/mkfs.c b/ufs-utils/mkfs.c index aa747403..821d67ae 100644 --- a/ufs-utils/mkfs.c +++ b/ufs-utils/mkfs.c @@ -33,7 +33,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)mkfs.c 8.3 (Berkeley) 2/3/94";*/ -static char *rcsid = "$Id: mkfs.c,v 1.2 1994/09/08 19:51:43 mib Exp $"; +static char *rcsid = "$Id: mkfs.c,v 1.3 1994/09/08 20:03:28 mib Exp $"; #endif /* not lint */ #include @@ -46,6 +46,30 @@ static char *rcsid = "$Id: mkfs.c,v 1.2 1994/09/08 19:51:43 mib Exp $"; #include "../ufs/fs.h" /* #include */ +/* Begin additions for GNU Hurd */ + +/* For GNU Hurd: the ufs DIRSIZ macro is different than the BSD + 4.4 version that mkfs expects. So we provide here the BSD version. */ +#undef DIRSIZ +#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))) +#else +#define DIRSIZ(oldfmt, dp) \ + ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) +#endif + +#define NBBY 8 + +#define MAXPHYS (64 * 1024) + +/* Provide mode from struct dinode * */ +#define DI_MODE(dp) (((dp)->di_modeh << 16) | (dp)->di_model) + +/* End additions for GNU Hurd */ + #ifndef STANDALONE #include #include -- cgit v1.2.3