summaryrefslogtreecommitdiffstats
path: root/sys/boot/pc98
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/pc98
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/pc98')
-rw-r--r--sys/boot/pc98/boot2/sys.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/boot/pc98/boot2/sys.c b/sys/boot/pc98/boot2/sys.c
index 0ceb07e..c8d4304 100644
--- a/sys/boot/pc98/boot2/sys.c
+++ b/sys/boot/pc98/boot2/sys.c
@@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
*/
#include "boot.h"
-#include <sys/dirent.h>
+#include <ufs/ufs/dir.h>
#if 0
/* #define BUFSIZE 4096 */
@@ -142,7 +142,7 @@ find(char *path)
{
char *rest, ch;
int block, off, loc, ino = ROOTINO;
- struct dirent *dp;
+ struct direct *dp;
char list_only;
list_only = (path[0] == '?' && path[1] == '\0');
@@ -174,12 +174,12 @@ loop:
devread(iobuf, fsbtodb(fs, block_map(block)) + boff,
blksize(fs, &inode, block));
}
- dp = (struct dirent *)(iobuf + off);
+ dp = (struct direct *)(iobuf + off);
loc += dp->d_reclen;
- if (dp->d_fileno && list_only)
+ if (dp->d_ino && list_only)
printf("%s ", dp->d_name);
- } while (!dp->d_fileno || strcmp(path, dp->d_name));
- ino = dp->d_fileno;
+ } while (!dp->d_ino || strcmp(path, dp->d_name));
+ ino = dp->d_ino;
*(path = rest) = ch;
goto loop;
}
OpenPOWER on IntegriCloud