summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2009-05-28 08:22:36 +0000
committerdfr <dfr@FreeBSD.org>2009-05-28 08:22:36 +0000
commit3fe874b0765a2b35a008a3c5617d70f3e05dc138 (patch)
tree75445e7242351e6754ed1233c56304161cac0136 /sys/boot/common
parent189b8f192fbe705da700330d0c86ff968666a5da (diff)
downloadFreeBSD-src-3fe874b0765a2b35a008a3c5617d70f3e05dc138.zip
FreeBSD-src-3fe874b0765a2b35a008a3c5617d70f3e05dc138.tar.gz
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
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/ufsread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/boot/common/ufsread.c b/sys/boot/common/ufsread.c
index 673616a..cd3ba4c 100644
--- a/sys/boot/common/ufsread.c
+++ b/sys/boot/common/ufsread.c
@@ -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;
OpenPOWER on IntegriCloud