From b526345c9e186a2098f7c91a517486f627160b22 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 9 Oct 1998 06:21:12 +0000 Subject: [PATCH] Add some evil temporary phys-to-kern translation for mfs. --- sys/ufs/mfs/mfs_vfsops.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c index d573b7b450a4..920623972b9f 100644 --- a/sys/ufs/mfs/mfs_vfsops.c +++ b/sys/ufs/mfs/mfs_vfsops.c @@ -111,13 +111,21 @@ static u_char end_mfs_root[] = "MFS Filesystem had better STOP here"; static u_char * mfs_getimage(void) { - caddr_t p, q; + caddr_t p; + vm_offset_t *q; p = module_search_by_type("mfs_root"); if (!p) return NULL; - q = module_search_info(p, MODINFO_ADDR); - return q; + q = (vm_offset_t *)module_search_info(p, MODINFO_ADDR); + if (!q) + return NULL; + /* XXX this needs to change to the appropriate function or macro */ +#ifdef __alpha__ + return (u_char *)*q; +#else + return (u_char *)*q + 0xf0000000; +#endif } #endif /* MFS_ROOT_SIZE */