Subject: FILECORE disklabels
To: None <port-acorn32@netbsd.org, port-acorn26@netbsd.org>
From: Robert Swindells <rjs@fdy2.demon.co.uk>
List: port-acorn26
Date: 07/31/2007 17:57:03
Would anyone object to the following change to allow arm kernels to leave
out FILECORE disklabel support ?

It is a change I have had locally for a while now.

Robert Swindells

Index: files.filecorefs
===================================================================
RCS file: /cvsroot/src/sys/fs/filecorefs/files.filecorefs,v
retrieving revision 1.3
diff -u -r1.3 files.filecorefs
--- files.filecorefs	11 Dec 2005 12:24:25 -0000	1.3
+++ files.filecorefs	31 Jul 2007 16:46:58 -0000
@@ -1,6 +1,6 @@
 #	$NetBSD: files.filecorefs,v 1.3 2005/12/11 12:24:25 christos Exp $
 
-deffs	FILECORE
+deffs	fs_filecore.h			FILECORE
 
 file	fs/filecorefs/filecore_bmap.c	filecore
 file	fs/filecorefs/filecore_lookup.c	filecore
Index: disksubr.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm/disksubr.c,v
retrieving revision 1.17
diff -u -r1.17 disksubr.c
--- disksubr.c	29 Jul 2007 12:15:36 -0000	1.17
+++ disksubr.c	31 Jul 2007 16:49:32 -0000
@@ -96,6 +96,8 @@
  *	from: @(#)ufs_disksubr.c	7.16 (Berkeley) 5/4/91
  */
 
+#include "fs_filecore.h"
+
 #include <sys/cdefs.h>
 __KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.17 2007/07/29 12:15:36 ad Exp $");
 
@@ -167,8 +169,11 @@
 	cyl = LABELSECTOR / lp->d_secpercyl;
 
 	if (osdep) {
-		if (filecore_label_read(dev, strat,lp, osdep, &msg, &cyl,
+		if (
+#ifdef FILECORE
+		    filecore_label_read(dev, strat,lp, osdep, &msg, &cyl,
 		      &netbsdpartoff) ||
+#endif
 		    mbr_label_read(dev, strat, lp, osdep, &msg, &cyl,
 		      &netbsdpartoff)) {
 			if (msg != NULL)
@@ -348,8 +353,11 @@
 	cyl = LABELSECTOR / lp->d_secpercyl;
 
 	if (osdep) {
-		if ((rv = filecore_label_locate(dev, strat,lp, osdep, &cyl,
-		      &netbsdpartoff)) != 0||
+		if (
+#ifdef FILECORE
+		    (rv = filecore_label_locate(dev, strat,lp, osdep, &cyl,
+		      &netbsdpartoff)) != 0 ||
+#endif
 		    (rv = mbr_label_locate(dev, strat, lp, osdep, &cyl,
 		      &netbsdpartoff)) != 0) {
 			if (rv < 0) {