Port-x68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x68k build broken on arch/x68k/stand/boot_ufs



On Mon, Aug 17, 2015 at 04:30:46PM +0000, David Holland wrote:
 >  > x68k build has failed since the recent LFS changes.
 >  > (see also daily snapshot build log)
 > 
 > Oops... I remember stepping on this before, but i'd completely
 > forgotten about it. Unfortunately the patch isn't quite right... will
 > attend to it later today.

This should make it build and still work, at least with 32-bit lfs,
but of course I can't actually test it, not having the hardware :-|
Let me know if I should commit. Sorry it took a while... longer than I
intended...

This code may not be able to support lfs64 without bloating out; in
particular lfs64 has 64-bit inode numbers so a lot of the ino32_t
usage would need to be widened. However, I suspect there's no big need
for (and possibly no hardware support for?) >2TB volumes on x68k, so
there's probably no need for lfs64 support in the bootblock anyhow.


Index: boot_ufs/readufs.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/stand/boot_ufs/readufs.h,v
retrieving revision 1.12
diff -u -p -r1.12 readufs.h
--- boot_ufs/readufs.h	18 Jun 2013 18:18:58 -0000	1.12
+++ boot_ufs/readufs.h	20 Aug 2015 04:56:32 -0000
@@ -26,8 +26,7 @@ union ufs_dinode {
 	struct ufs2_dinode di2;
 #endif
 #ifdef USE_LFS
-	struct ulfs1_dinode dil1;
-	struct ulfs2_dinode dil2;
+	struct lfs32_dinode dil32;
 #endif
 };
 
Index: boot_ufs/readufs_lfs.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c,v
retrieving revision 1.16
diff -u -p -r1.16 readufs_lfs.c
--- boot_ufs/readufs_lfs.c	28 Jul 2015 16:51:25 -0000	1.16
+++ boot_ufs/readufs_lfs.c	20 Aug 2015 04:56:32 -0000
@@ -21,7 +21,7 @@
 
 static int get_lfs_inode(ino32_t ino, union ufs_dinode *dibuf);
 
-static struct ulfs1_dinode	ifile_dinode;
+static struct lfs32_dinode	ifile_dinode;
 
 #define fsi	(*ufsinfo)
 #define fsi_lfs	fsi.fs_u.u_lfs
@@ -159,7 +159,7 @@ get_lfs_inode(ino32_t ino, union ufs_din
 	struct ufs_info *ufsinfo = &ufs_info;
 	daddr_t daddr;
 	char *buf = alloca(fsi.bsize);
-	struct ulfs1_dinode *di, *diend;
+	struct lfs32_dinode *di, *diend;
 	int i;
 
 	/* Get fs block which contains the specified inode. */
@@ -176,7 +176,7 @@ get_lfs_inode(ino32_t ino, union ufs_din
 		i = ino % fsi_lfs.ifpb;
 		daddr = (fsi_lfs.version == 1) ?
 		    ((IFILE_V1 *) buf + i)->if_daddr
-		    : ((IFILE *) buf + i)->if_daddr;
+		    : ((IFILE32 *) buf + i)->if_daddr;
 	}
 #ifdef DEBUG_WITH_STDIO
 	printf("LFS(%d): daddr: %d\n", ino, (int) daddr);
@@ -195,7 +195,7 @@ get_lfs_inode(ino32_t ino, union ufs_din
 	);
 
 	/* Search for the inode. */
-	di = (struct ulfs1_dinode *) buf;
+	di = (struct lfs32_dinode *) buf;
 	diend = di + fsi_lfs.inopb;
 
 	for ( ; di < diend; di++)
@@ -219,7 +219,7 @@ found:
 #endif
 #endif
 
-	dibuf->dil1 = *di;
+	dibuf->dil32 = *di;
 
 	return 0;
 }


-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index