Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Don't #error on invalid LABELSECTOR or LABELOFFSET ...
details: https://anonhg.NetBSD.org/src/rev/64824ca8769b
branches: trunk
changeset: 754570:64824ca8769b
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Tue May 04 12:20:50 2010 +0000
description:
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.
diffstat:
sys/kern/subr_disk_mbr.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 308662676b12 -r 64824ca8769b sys/kern/subr_disk_mbr.c
--- a/sys/kern/subr_disk_mbr.c Tue May 04 09:33:57 2010 +0000
+++ b/sys/kern/subr_disk_mbr.c Tue May 04 12:20:50 2010 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index