Module Name:    src
Committed By:   tsutsui
Date:           Tue May  4 12:20:50 UTC 2010

Modified Files:
        src/sys/kern: subr_disk_mbr.c

Log Message:
Don't #error on invalid LABELSECTOR or LABELOFFSET on __RUMPKERNEL build.

As mentioned in src/sys/rump/dev/lib/libdisk/Makefile,
rump(4) builds don't check if each ${MACHINE} actually supports
MBR in MD readdisklabel(9) ops while it pulls MD <machine/disklabel.h>.

Workarounds so long broken build of ews4800mips.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/subr_disk_mbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_disk_mbr.c
diff -u src/sys/kern/subr_disk_mbr.c:1.39 src/sys/kern/subr_disk_mbr.c:1.40
--- src/sys/kern/subr_disk_mbr.c:1.39	Wed Dec 23 09:23:53 2009
+++ src/sys/kern/subr_disk_mbr.c	Tue May  4 12:20:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk_mbr.c,v 1.39 2009/12/23 09:23:53 mbalmer Exp $	*/
+/*	$NetBSD: subr_disk_mbr.c,v 1.40 2010/05/04 12:20:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.39 2009/12/23 09:23:53 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk_mbr.c,v 1.40 2010/05/04 12:20:50 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -86,8 +86,10 @@
 #define SCANBLOCKS 3
 #define DISKLABEL_SIZE 404
 #if LABELSECTOR*DEV_BSIZE + LABELOFFSET > SCANBLOCKS*DEV_BSIZE - DISKLABEL_SIZE
+#ifndef _RUMPKERNEL /* XXX: see src/sys/rump/dev/lib/libdisk/Makefile */
 #error Invalid LABELSECTOR or LABELOFFSET
 #endif
+#endif
 
 #define MBR_LABELSECTOR	1
 

Reply via email to