svn commit: r224403 - stable/7/sys/boot/common

Marius Strobl marius at FreeBSD.org
Mon Jul 25 21:37:53 UTC 2011


Author: marius
Date: Mon Jul 25 21:37:52 2011
New Revision: 224403
URL: http://svn.freebsd.org/changeset/base/224403

Log:
  MFC: r192972 (partial)
  
  Some of the boot loader code only works on a ufs file system, but it
  uses the generic struct dirent, which happens to look identical to UFS's
  struct direct.  If BSD ever changes dirent then this will be a problem.
  
  Submitted by:	matthew dot fleming at isilon dot com

Modified:
  stable/7/sys/boot/common/ufsread.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/boot/common/ufsread.c
==============================================================================
--- stable/7/sys/boot/common/ufsread.c	Mon Jul 25 20:13:35 2011	(r224402)
+++ stable/7/sys/boot/common/ufsread.c	Mon Jul 25 21:37:52 2011	(r224403)
@@ -47,6 +47,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <ufs/ufs/dinode.h>
+#include <ufs/ufs/dir.h>
 #include <ufs/ffs/fs.h>
 #ifdef UFS_SMALL_CGBASE
 /* XXX: Revert to old (broken for over 1.5Tb filesystems) version of cgbase
@@ -93,7 +94,7 @@ static __inline int
 fsfind(const char *name, ino_t * ino)
 {
 	char buf[DEV_BSIZE];
-	struct dirent *d;
+	struct direct *d;
 	char *s;
 	ssize_t n;
 
@@ -104,7 +105,7 @@ fsfind(const char *name, ino_t * ino)
 			if (ls)
 				printf("%s ", d->d_name);
 			else if (!strcmp(name, d->d_name)) {
-				*ino = d->d_fileno;
+				*ino = d->d_ino;
 				return d->d_type;
 			}
 			s += d->d_reclen;


More information about the svn-src-stable mailing list