tech-userlevel archive

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

introduce getlabelusesmbr()



Hello,
the evbmips supports more and more different hardware platforms,
and we're now to the point where some evbmips platforms wants
a mbr, while others don't. as userland, and so disklabel(8) is
shared by all these platforms, the static USE_MBR defined for some
MACHINE is not suitable any more.

I propose to fix it the same way LABELOFFSET/LABELSECTOR was handled some time
ago: add a getlabelusesmbr() function to libutil, which returns 1
if the hardware wants a mbr (and so the disklabel is stored in
the NetBSD partition(s) of the MBR) and 0 otherwise (or -1 on error),
and change disklabel to use this.

Now the details of implementation: the kernel exports a kern.labelusesmbr
sysctl, getlabelusesmbr() is just a sysctlbyname(3) wrapper.
<machine/disklabel.h> now has a mandatory LABELUSESMBR define which is
eiter 0 or 1.
This is used for kern.labelusesmbr in init_sysctl.c, and also by
disklabel when built as a host tool.

The attached patch implements this. I'll commit it in a few days unless
there's objections.

any comments ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: distrib/sets/lists/base/ad.mips64eb
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/ad.mips64eb,v
retrieving revision 1.62
diff -u -p -u -p -r1.62 ad.mips64eb
--- distrib/sets/lists/base/ad.mips64eb 26 Jul 2011 16:10:15 -0000      1.62
+++ distrib/sets/lists/base/ad.mips64eb 25 Aug 2011 20:29:13 -0000
@@ -255,7 +255,7 @@
 ./usr/lib/64/libusbhid.so.1                    base-compat-shlib       
compat,pic
 ./usr/lib/64/libusbhid.so.1.0                  base-compat-shlib       
compat,pic
 ./usr/lib/64/libutil.so.7                      base-compat-shlib       
compat,pic
-./usr/lib/64/libutil.so.7.17                   base-compat-shlib       
compat,pic
+./usr/lib/64/libutil.so.7.18                   base-compat-shlib       
compat,pic
 ./usr/lib/64/libwind.so.0                      base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/64/libwind.so.0.0                    base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/64/libwrap.so.1                      base-compat-shlib       
compat,pic
@@ -539,7 +539,7 @@
 ./usr/lib/o32/libusbhid.so.1                   base-compat-shlib       
compat,pic
 ./usr/lib/o32/libusbhid.so.1.0                 base-compat-shlib       
compat,pic
 ./usr/lib/o32/libutil.so.7                     base-compat-shlib       
compat,pic
-./usr/lib/o32/libutil.so.7.17                  base-compat-shlib       
compat,pic
+./usr/lib/o32/libutil.so.7.18                  base-compat-shlib       
compat,pic
 ./usr/lib/o32/libwind.so.0                     base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/o32/libwind.so.0.0                   base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/o32/libwrap.so.1                     base-compat-shlib       
compat,pic
Index: distrib/sets/lists/base/ad.mips64el
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/ad.mips64el,v
retrieving revision 1.59
diff -u -p -u -p -r1.59 ad.mips64el
--- distrib/sets/lists/base/ad.mips64el 26 Jul 2011 16:10:15 -0000      1.59
+++ distrib/sets/lists/base/ad.mips64el 25 Aug 2011 20:29:13 -0000
@@ -255,7 +255,7 @@
 ./usr/lib/64/libusbhid.so.1                    base-compat-shlib       
compat,pic
 ./usr/lib/64/libusbhid.so.1.0                  base-compat-shlib       
compat,pic
 ./usr/lib/64/libutil.so.7                      base-compat-shlib       
compat,pic
-./usr/lib/64/libutil.so.7.17                   base-compat-shlib       
compat,pic
+./usr/lib/64/libutil.so.7.18                   base-compat-shlib       
compat,pic
 ./usr/lib/64/libwind.so.0                      base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/64/libwind.so.0.0                    base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/64/libwrap.so.1                      base-compat-shlib       
compat,pic
@@ -539,7 +539,7 @@
 ./usr/lib/o32/libusbhid.so.1                   base-compat-shlib       
compat,pic
 ./usr/lib/o32/libusbhid.so.1.0                 base-compat-shlib       
compat,pic
 ./usr/lib/o32/libutil.so.7                     base-compat-shlib       
compat,pic
-./usr/lib/o32/libutil.so.7.17                  base-compat-shlib       
compat,pic
+./usr/lib/o32/libutil.so.7.18                  base-compat-shlib       
compat,pic
 ./usr/lib/o32/libwind.so.0                     base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/o32/libwind.so.0.0                   base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/o32/libwrap.so.1                     base-compat-shlib       
compat,pic
Index: distrib/sets/lists/base/md.amd64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/md.amd64,v
retrieving revision 1.133
diff -u -p -u -p -r1.133 md.amd64
--- distrib/sets/lists/base/md.amd64    17 Aug 2011 00:33:52 -0000      1.133
+++ distrib/sets/lists/base/md.amd64    25 Aug 2011 20:29:13 -0000
@@ -258,7 +258,7 @@
 ./usr/lib/i386/libusbhid.so.1                  base-compat-shlib       
compat,pic
 ./usr/lib/i386/libusbhid.so.1.0                        base-compat-shlib       
compat,pic
 ./usr/lib/i386/libutil.so.7                    base-compat-shlib       
compat,pic
-./usr/lib/i386/libutil.so.7.17                 base-compat-shlib       
compat,pic
+./usr/lib/i386/libutil.so.7.18                 base-compat-shlib       
compat,pic
 ./usr/lib/i386/libwind.so.0                    base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/i386/libwind.so.0.0                  base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/i386/libwrap.so.1                    base-compat-shlib       
compat,pic
Index: distrib/sets/lists/base/md.sparc64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/md.sparc64,v
retrieving revision 1.126
diff -u -p -u -p -r1.126 md.sparc64
--- distrib/sets/lists/base/md.sparc64  26 Jul 2011 16:10:15 -0000      1.126
+++ distrib/sets/lists/base/md.sparc64  25 Aug 2011 20:29:13 -0000
@@ -256,7 +256,7 @@
 ./usr/lib/sparc/libusbhid.so.1                 base-compat-shlib       
compat,pic
 ./usr/lib/sparc/libusbhid.so.1.0               base-compat-shlib       
compat,pic
 ./usr/lib/sparc/libutil.so.7                   base-compat-shlib       
compat,pic
-./usr/lib/sparc/libutil.so.7.17                        base-compat-shlib       
compat,pic
+./usr/lib/sparc/libutil.so.7.18                        base-compat-shlib       
compat,pic
 ./usr/lib/sparc/libwind.so.0                   base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/sparc/libwind.so.0.0                 base-compat-shlib       
compat,pic,kerberos
 ./usr/lib/sparc/libwrap.so.1                   base-compat-shlib       
compat,pic
Index: distrib/sets/lists/base/shl.mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/shl.mi,v
retrieving revision 1.595
diff -u -p -u -p -r1.595 shl.mi
--- distrib/sets/lists/base/shl.mi      26 Jul 2011 16:10:15 -0000      1.595
+++ distrib/sets/lists/base/shl.mi      25 Aug 2011 20:29:13 -0000
@@ -69,7 +69,7 @@
 ./lib/libtermlib.so.0.6                                base-sys-shlib          
dynamicroot
 ./lib/libutil.so                               base-sys-shlib          
dynamicroot
 ./lib/libutil.so.7                             base-sys-shlib          
dynamicroot
-./lib/libutil.so.7.17                          base-sys-shlib          
dynamicroot
+./lib/libutil.so.7.18                          base-sys-shlib          
dynamicroot
 ./lib/libz.so                                  base-sys-shlib          
dynamicroot
 ./lib/libz.so.1                                        base-sys-shlib          
dynamicroot
 ./lib/libz.so.1.0                              base-sys-shlib          
dynamicroot
@@ -669,7 +669,7 @@
 ./usr/lib/libusbhid.so.1.0                     base-sys-shlib
 ./usr/lib/libutil.so                           base-sys-shlib
 ./usr/lib/libutil.so.7                         base-sys-shlib
-./usr/lib/libutil.so.7.17                      base-sys-shlib
+./usr/lib/libutil.so.7.18                      base-sys-shlib
 ./usr/lib/libuutil.so                          base-zfs-shlib          
dynamicroot,zfs
 ./usr/lib/libuutil.so.0                                base-zfs-shlib          
dynamicroot,zfs
 ./usr/lib/libuutil.so.0.0                      base-zfs-shlib          
zfs,dynamicroot
Index: distrib/sets/lists/comp/ad.mips64eb
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/ad.mips64eb,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 ad.mips64eb
--- distrib/sets/lists/comp/ad.mips64eb 26 Jul 2011 16:10:15 -0000      1.47
+++ distrib/sets/lists/comp/ad.mips64eb 25 Aug 2011 20:29:13 -0000
@@ -1342,7 +1342,7 @@
 ./usr/libdata/debug/usr/lib/64/libukfs.so.1.0.debug    comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/64/libumem.so.0.0.debug    comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/64/libusbhid.so.1.0.debug  comp-sys-debug  
debug,compat
-./usr/libdata/debug/usr/lib/64/libutil.so.7.17.debug   comp-sys-debug  
debug,compat
+./usr/libdata/debug/usr/lib/64/libutil.so.7.18.debug   comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/64/libuutil.so.0.0.debug   comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/64/libwind.so.0.0.debug    comp-compat-shlib       
 compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/64/libwrap.so.1.0.debug    comp-net-debug  
debug,compat
@@ -1490,7 +1490,7 @@
 ./usr/libdata/debug/usr/lib/o32/libukfs.so.1.0.debug   comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/o32/libumem.so.0.0.debug   comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libusbhid.so.1.0.debug comp-sys-debug  
debug,compat
-./usr/libdata/debug/usr/lib/o32/libutil.so.7.17.debug  comp-sys-debug  
debug,compat
+./usr/libdata/debug/usr/lib/o32/libutil.so.7.18.debug  comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/o32/libuutil.so.0.0.debug  comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libwind.so.0.0.debug           
comp-compat-shlib        compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/o32/libwrap.so.1.0.debug   comp-net-debug  
debug,compat
Index: distrib/sets/lists/comp/ad.mips64el
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/ad.mips64el,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 ad.mips64el
--- distrib/sets/lists/comp/ad.mips64el 26 Jul 2011 16:10:16 -0000      1.47
+++ distrib/sets/lists/comp/ad.mips64el 25 Aug 2011 20:29:13 -0000
@@ -1342,7 +1342,7 @@
 ./usr/libdata/debug/usr/lib/64/libukfs.so.1.0.debug    comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/64/libumem.so.0.0.debug    comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/64/libusbhid.so.1.0.debug  comp-sys-debug  
debug,compat
-./usr/libdata/debug/usr/lib/64/libutil.so.7.17.debug   comp-sys-debug  
debug,compat
+./usr/libdata/debug/usr/lib/64/libutil.so.7.18.debug   comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/64/libuutil.so.0.0.debug   comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/64/libwind.so.0.0.debug    comp-compat-shlib       
 compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/64/libwrap.so.1.0.debug    comp-net-debug  
debug,compat
@@ -1490,7 +1490,7 @@
 ./usr/libdata/debug/usr/lib/o32/libukfs.so.1.0.debug   comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/o32/libumem.so.0.0.debug   comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libusbhid.so.1.0.debug comp-sys-debug  
debug,compat
-./usr/libdata/debug/usr/lib/o32/libutil.so.7.17.debug  comp-sys-debug  
debug,compat
+./usr/libdata/debug/usr/lib/o32/libutil.so.7.18.debug  comp-sys-debug  
debug,compat
 ./usr/libdata/debug/usr/lib/o32/libuutil.so.0.0.debug  comp-zfs-debug  
zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libwind.so.0.0.debug           
comp-compat-shlib        compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/o32/libwrap.so.1.0.debug   comp-net-debug  
debug,compat
Index: distrib/sets/lists/comp/md.amd64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/md.amd64,v
retrieving revision 1.129
diff -u -p -u -p -r1.129 md.amd64
--- distrib/sets/lists/comp/md.amd64    15 Aug 2011 15:14:00 -0000      1.129
+++ distrib/sets/lists/comp/md.amd64    25 Aug 2011 20:29:13 -0000
@@ -1119,7 +1119,7 @@
 ./usr/libdata/debug/usr/lib/i386/libterminfo.so.1.0.debug      
comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libukfs.so.1.0.debug  comp-compat-shlib       
compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libusbhid.so.1.0.debug        
comp-compat-shlib       compat,pic,debug
-./usr/libdata/debug/usr/lib/i386/libutil.so.7.17.debug comp-compat-shlib       
compat,pic,debug
+./usr/libdata/debug/usr/lib/i386/libutil.so.7.18.debug comp-compat-shlib       
compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libwind.so.0.0.debug  comp-compat-shlib       
compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/i386/libwrap.so.1.0.debug  comp-compat-shlib       
compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libz.so.1.0.debug     comp-compat-shlib       
compat,pic,debug
Index: distrib/sets/lists/comp/md.sparc64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/md.sparc64,v
retrieving revision 1.114
diff -u -p -u -p -r1.114 md.sparc64
--- distrib/sets/lists/comp/md.sparc64  26 Jul 2011 16:10:16 -0000      1.114
+++ distrib/sets/lists/comp/md.sparc64  25 Aug 2011 20:29:13 -0000
@@ -974,7 +974,7 @@
 ./usr/libdata/debug/usr/lib/sparc/libterminfo.so.1.0.debug             
comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libukfs.so.1.0.debug                 
comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libusbhid.so.1.0.debug               
comp-compat-shlib       compat,pic,debug
-./usr/libdata/debug/usr/lib/sparc/libutil.so.7.17.debug                        
comp-compat-shlib       compat,pic,debug
+./usr/libdata/debug/usr/lib/sparc/libutil.so.7.18.debug                        
comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libwind.so.0.0.debug                 
comp-compat-shlib       compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/sparc/libwrap.so.1.0.debug                 
comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/sparc/libz.so.1.0.debug                    
comp-compat-shlib       compat,pic,debug
Index: distrib/sets/lists/comp/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1663
diff -u -p -u -p -r1.1663 mi
--- distrib/sets/lists/comp/mi  17 Aug 2011 07:22:34 -0000      1.1663
+++ distrib/sets/lists/comp/mi  25 Aug 2011 20:29:13 -0000
@@ -6638,6 +6638,7 @@
 ./usr/share/man/cat3/getifaddrs.0              comp-c-catman           .cat
 ./usr/share/man/cat3/getlabeloffset.0          comp-c-catman           .cat
 ./usr/share/man/cat3/getlabelsector.0          comp-c-catman           .cat
+./usr/share/man/cat3/getlabelusesmbr.0         comp-c-catman           .cat
 ./usr/share/man/cat3/getlastlogx.0             comp-c-catman           .cat
 ./usr/share/man/cat3/getline.0                 comp-c-catman           .cat
 ./usr/share/man/cat3/getloadavg.0              comp-c-catman           .cat
@@ -12752,6 +12753,7 @@
 ./usr/share/man/html3/getifaddrs.html          comp-c-htmlman          html
 ./usr/share/man/html3/getlabeloffset.html      comp-c-htmlman          html
 ./usr/share/man/html3/getlabelsector.html      comp-c-htmlman          html
+./usr/share/man/html3/getlabelusesmbr.html     comp-c-htmlman          html
 ./usr/share/man/html3/getlastlogx.html         comp-c-htmlman          html
 ./usr/share/man/html3/getline.html             comp-c-htmlman          html
 ./usr/share/man/html3/getloadavg.html          comp-c-htmlman          html
@@ -18782,6 +18784,7 @@
 ./usr/share/man/man3/getifaddrs.3              comp-c-man              .man
 ./usr/share/man/man3/getlabeloffset.3          comp-c-man              .man
 ./usr/share/man/man3/getlabelsector.3          comp-c-man              .man
+./usr/share/man/man3/getlabelusesmbr.3         comp-c-man              .man
 ./usr/share/man/man3/getlastlogx.3             comp-c-man              .man
 ./usr/share/man/man3/getline.3                 comp-c-man              .man
 ./usr/share/man/man3/getloadavg.3              comp-c-man              .man
Index: distrib/sets/lists/comp/shl.mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/shl.mi,v
retrieving revision 1.184
diff -u -p -u -p -r1.184 shl.mi
--- distrib/sets/lists/comp/shl.mi      26 Jul 2011 16:10:16 -0000      1.184
+++ distrib/sets/lists/comp/shl.mi      25 Aug 2011 20:29:14 -0000
@@ -406,7 +406,7 @@
 ./usr/libdata/debug/usr/lib/libukfs.so.1.0.debug       comp-sys-debug  debug
 ./usr/libdata/debug/usr/lib/libumem.so.0.0.debug       comp-zfs-debug  
zfs,dynamicroot,debug
 ./usr/libdata/debug/usr/lib/libusbhid.so.1.0.debug     comp-sys-debug  debug
-./usr/libdata/debug/usr/lib/libutil.so.7.17.debug      comp-sys-debug  debug
+./usr/libdata/debug/usr/lib/libutil.so.7.18.debug      comp-sys-debug  debug
 ./usr/libdata/debug/usr/lib/libuutil.so.0.0.debug      comp-zfs-debug  
zfs,dynamicroot,debug
 ./usr/libdata/debug/usr/lib/libwind.so.0.0.debug               comp-krb5-debug 
kerberos,debug
 ./usr/libdata/debug/usr/lib/libwrap.so.1.0.debug       comp-net-debug  debug
Index: include/util.h
===================================================================
RCS file: /cvsroot/src/include/util.h,v
retrieving revision 1.56
diff -u -p -u -p -r1.56 util.h
--- include/util.h      17 Jul 2011 20:54:34 -0000      1.56
+++ include/util.h      25 Aug 2011 20:32:39 -0000
@@ -69,6 +69,7 @@ pid_t         forkpty(int *, char *, struct ter
 const char     *getbootfile(void);
 off_t          getlabeloffset(void);
 int            getlabelsector(void);
+int            getlabelusesmbr(void);
 int            getmaxpartitions(void);
 int            getrawpartition(void);
 #ifndef __LIBC12_SOURCE__
Index: lib/libutil/Makefile
===================================================================
RCS file: /cvsroot/src/lib/libutil/Makefile,v
retrieving revision 1.63
diff -u -p -u -p -r1.63 Makefile
--- lib/libutil/Makefile        27 Jan 2010 19:10:31 -0000      1.63
+++ lib/libutil/Makefile        25 Aug 2011 20:32:46 -0000
@@ -38,6 +38,7 @@ YPREFIX=__pd
 .include "compat/Makefile.inc"
 
 MLINKS+=getlabelsector.3 getlabeloffset.3
+MLINKS+=getlabelsector.3 getlabelusesmbr.3
 MLINKS+=login.3 logout.3
 MLINKS+=login.3 logwtmp.3
 MLINKS+=login_cap.3 login_getclass.3
Index: lib/libutil/getlabelsector.3
===================================================================
RCS file: /cvsroot/src/lib/libutil/getlabelsector.3,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 getlabelsector.3
--- lib/libutil/getlabelsector.3        24 Jun 2009 22:31:58 -0000      1.5
+++ lib/libutil/getlabelsector.3        25 Aug 2011 20:32:46 -0000
@@ -34,13 +34,14 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 11, 2002
+.Dd Augoust 25, 2011
 .Dt GETLABELSECTOR 3
 .Os
 .Sh NAME
 .Nm getlabelsector ,
-.Nm getlabeloffset
-.Nd get the sector number and offset of the disklabel
+.Nm getlabeloffset ,
+.Nm getlabelusesmbr
+.Nd get disklabel location informations
 .Sh LIBRARY
 .Lb libutil
 .Sh SYNOPSIS
@@ -49,6 +50,8 @@
 .Fn getlabelsector void
 .Ft off_t
 .Fn getlabeloffset void
+.Ft int
+.Fn getlabelusesmbr void
 .Sh DESCRIPTION
 The
 .Fn getlabelsector
@@ -63,6 +66,12 @@ and
 .Dv LABELOFFSET
 definitions previously used to derive the location of the
 .Xr disklabel 5 .
+.Pp
+The
+.Fn getlabelusesmbr
+returns 1 if the disklabel is located inside a MBR partition, 0 if it's stored
+relative to the start of the disk, or \-1 on error.
+.Dv
 .Sh SEE ALSO
 .Xr sysctl 3 ,
 .Xr disklabel 5
Index: lib/libutil/getlabelsector.c
===================================================================
RCS file: /cvsroot/src/lib/libutil/getlabelsector.c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 getlabelsector.c
--- lib/libutil/getlabelsector.c        17 Sep 2005 01:51:21 -0000      1.3
+++ lib/libutil/getlabelsector.c        25 Aug 2011 20:32:46 -0000
@@ -73,3 +73,16 @@ getlabeloffset(void)
 
        return ((off_t)offset);
 }
+
+int
+getlabelusesmbr(void)
+{
+       int use;
+       size_t uselen;
+
+       if (sysctlbyname("kern.labelusesmbr", &use, &uselen,
+           NULL, (size_t)0) < 0)
+               return (-1);
+
+       return use;
+}
Index: lib/libutil/shlib_version
===================================================================
RCS file: /cvsroot/src/lib/libutil/shlib_version,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 shlib_version
--- lib/libutil/shlib_version   13 May 2009 02:50:32 -0000      1.47
+++ lib/libutil/shlib_version   25 Aug 2011 20:32:46 -0000
@@ -2,4 +2,4 @@
 #      Remember to update distrib/sets/lists/base/shl.* when changing
 #
 major=7
-minor=17
+minor=18
Index: sbin/disklabel/Makefile
===================================================================
RCS file: /cvsroot/src/sbin/disklabel/Makefile,v
retrieving revision 1.68
diff -u -p -u -p -r1.68 Makefile
--- sbin/disklabel/Makefile     18 Aug 2011 08:42:07 -0000      1.68
+++ sbin/disklabel/Makefile     25 Aug 2011 20:32:59 -0000
@@ -15,36 +15,6 @@ LDADD+= -lutil
 CPPFLAGS+= -DSTRICT_CYLINDER_ALIGNMENT
 .endif
 
-.if ( 0 \
-       || ${MACHINE} == "acorn26" \
-       || ${MACHINE} == "acorn32" \
-       || ${MACHINE} == "amd64" \
-       || ${MACHINE} == "arc" \
-       || ${MACHINE} == "cats" \
-       || ${MACHINE} == "cobalt" \
-       || ${MACHINE} == "dreamcast" \
-       || ${MACHINE} == "evbarm" \
-       || ${MACHINE} == "evbsh3" \
-       || ${MACHINE} == "hpcarm" \
-       || ${MACHINE} == "hpcmips" \
-       || ${MACHINE} == "hpcsh" \
-       || ${MACHINE} == "i386" \
-       || ${MACHINE} == "iyonix" \
-       || ${MACHINE} == "landisk" \
-       || ${MACHINE} == "macppc" \
-       || ${MACHINE} == "mmeye" \
-       || ${MACHINE} == "netwinder" \
-       || ${MACHINE} == "ofppc" \
-       || ${MACHINE} == "prep" \
-       || ${MACHINE} == "shark" \
-       || ${MACHINE} == "zaurus" \
-    )
-# use MBR partition info
-CPPFLAGS+= -DUSE_MBR
-# do not recognize old MBR partition ID any more
-#CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
-.endif
-
 .if (${MACHINE} == "acorn32" || ${MACHINE} == "acorn26")
 # Support FileCore boot block
 CPPFLAGS+= -DUSE_ACORN
Index: sbin/disklabel/main.c
===================================================================
RCS file: /cvsroot/src/sbin/disklabel/main.c,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 main.c
--- sbin/disklabel/main.c       6 Jan 2011 21:39:01 -0000       1.24
+++ sbin/disklabel/main.c       25 Aug 2011 20:32:59 -0000
@@ -186,9 +186,11 @@ static int set_writable_fd = -1;
 #if HAVE_NBTOOL_CONFIG_H
 #define GETLABELOFFSET()       LABELOFFSET
 #define GETLABELSECTOR()       LABELSECTOR
+#define GETLABELUSESMBR()      LABELUSESMBR
 #else /* HAVE_NBTOOL_CONFIG_H */
 #define GETLABELOFFSET()       getlabeloffset()
 #define GETLABELSECTOR()       getlabelsector()
+#define GETLABELUSESMBR()      getlabelusesmbr()
 #endif
 
 /* Default location for label - only used if we don't find one to update */
@@ -272,9 +274,11 @@ main(int argc, char *argv[])
                WRITE, INTERACT, DELETE
        } op = UNSPEC, old_op;
 
-#ifdef USE_MBR
-       mflag = 1;
-#endif
+       mflag = GETLABELUSESMBR();
+       if (mflag < 0) {
+               warn("getlabelusesmbr() failed");
+               mflag = LABELUSESMBR;
+       }
 #if HAVE_NBTOOL_CONFIG_H
        /* We must avoid doing any ioctl requests */
        Fflag = rflag = 1;
Index: sys/arch/acorn26/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn26/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/acorn26/include/disklabel.h        11 Dec 2005 12:16:04 -0000      
1.3
+++ sys/arch/acorn26/include/disklabel.h        25 Aug 2011 20:33:07 -0000
@@ -1,5 +1,7 @@
 /*     $NetBSD: disklabel.h,v 1.3 2005/12/11 12:16:04 christos Exp $   */
 
+#define LABELUSESMBR 1
+
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/acorn32/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn32/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/acorn32/include/disklabel.h        11 Dec 2005 12:16:05 -0000      
1.3
+++ sys/arch/acorn32/include/disklabel.h        25 Aug 2011 20:33:08 -0000
@@ -1,5 +1,7 @@
 /*     $NetBSD: disklabel.h,v 1.3 2005/12/11 12:16:05 christos Exp $   */
 
+#define LABELUSESMBR 1
+
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/algor/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/algor/include/disklabel.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 disklabel.h
--- sys/arch/algor/include/disklabel.h  23 Nov 2009 13:40:08 -0000      1.4
+++ sys/arch/algor/include/disklabel.h  25 Aug 2011 20:33:08 -0000
@@ -33,6 +33,7 @@
 #ifndef _ALGOR_DISKLABEL_H_
 #define _ALGOR_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/alpha/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/include/disklabel.h,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 disklabel.h
--- sys/arch/alpha/include/disklabel.h  23 Nov 2009 13:40:09 -0000      1.10
+++ sys/arch/alpha/include/disklabel.h  25 Aug 2011 20:33:08 -0000
@@ -34,6 +34,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/amd64/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/include/disklabel.h,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 disklabel.h
--- sys/arch/amd64/include/disklabel.h  23 Nov 2009 13:40:09 -0000      1.9
+++ sys/arch/amd64/include/disklabel.h  25 Aug 2011 20:33:09 -0000
@@ -35,6 +35,7 @@
 
 #if defined(__x86_64__) || defined(HAVE_NBTOOL_CONFIG_H)
 
+#define LABELUSESMBR           1       /* use MBR partitionning */
 #define        LABELSECTOR             1       /* sector containing label */
 #define        LABELOFFSET             0       /* offset of label in sector */
 #define        MAXPARTITIONS           16      /* number of partitions */
Index: sys/arch/amiga/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/amiga/include/disklabel.h,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 disklabel.h
--- sys/arch/amiga/include/disklabel.h  12 Sep 2009 09:18:42 -0000      1.7
+++ sys/arch/amiga/include/disklabel.h  25 Aug 2011 20:33:09 -0000
@@ -32,6 +32,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   16                      /* number of partitions 
*/
Index: sys/arch/amigappc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/amigappc/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/amigappc/include/disklabel.h       12 Sep 2009 09:18:42 -0000      
1.2
+++ sys/arch/amigappc/include/disklabel.h       25 Aug 2011 20:33:10 -0000
@@ -32,6 +32,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   16                      /* number of partitions 
*/
Index: sys/arch/arc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/arc/include/disklabel.h,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 disklabel.h
--- sys/arch/arc/include/disklabel.h    23 Nov 2009 13:40:09 -0000      1.10
+++ sys/arch/arc/include/disklabel.h    25 Aug 2011 20:33:10 -0000
@@ -35,6 +35,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/arch/arm/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/include/disklabel.h,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 disklabel.h
--- sys/arch/arm/include/disklabel.h    23 Nov 2009 13:40:09 -0000      1.9
+++ sys/arch/arm/include/disklabel.h    25 Aug 2011 20:33:10 -0000
@@ -46,6 +46,9 @@
 #ifndef _ARM_DISKLABEL_H_
 #define _ARM_DISKLABEL_H_
 
+#ifndef LABELUSESMBR
+#define LABELUSESMBR   0               /* no MBR partitionning */
+#endif
 #define LABELSECTOR    1               /* sector containing label */
 #define LABELOFFSET    0               /* offset of label in sector */
 #define MAXPARTITIONS  8               /* number of partitions */
Index: sys/arch/atari/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/atari/include/disklabel.h,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 disklabel.h
--- sys/arch/atari/include/disklabel.h  20 Oct 2009 19:10:11 -0000      1.8
+++ sys/arch/atari/include/disklabel.h  25 Aug 2011 20:33:11 -0000
@@ -36,6 +36,7 @@
  * size of the boot block must be at least 8KB.
  */
 #define        BBMINSIZE       8192            /* minimum size of boot block   
   */
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define LABELSECTOR    0               /* `natural' start of boot block   */
 #define LABELOFFSET    516             /* offset of disk label in bytes,
                                           relative to start of boot block */
Index: sys/arch/bebox/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/bebox/include/disklabel.h,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 disklabel.h
--- sys/arch/bebox/include/disklabel.h  23 Nov 2009 13:40:09 -0000      1.9
+++ sys/arch/bebox/include/disklabel.h  25 Aug 2011 20:33:13 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   8               /* number of partitions */
Index: sys/arch/cats/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/cats/include/disklabel.h,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 disklabel.h
--- sys/arch/cats/include/disklabel.h   11 Dec 2005 12:17:04 -0000      1.5
+++ sys/arch/cats/include/disklabel.h   25 Aug 2011 20:33:13 -0000
@@ -1,5 +1,6 @@
 /*     $NetBSD: disklabel.h,v 1.5 2005/12/11 12:17:04 christos Exp $   */
 
+#define LABELUSESMBR 1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/cesfic/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/cesfic/include/disklabel.h,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 disklabel.h
--- sys/arch/cesfic/include/disklabel.h 14 May 2001 18:23:10 -0000      1.1
+++ sys/arch/cesfic/include/disklabel.h 25 Aug 2011 20:33:17 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     (1024 / DEV_BSIZE)      /* sector containing 
label */
 #define        LABELOFFSET     0                       /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/cobalt/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/include/disklabel.h,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 disklabel.h
--- sys/arch/cobalt/include/disklabel.h 23 Nov 2009 13:40:09 -0000      1.10
+++ sys/arch/cobalt/include/disklabel.h 25 Aug 2011 20:33:25 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define LABELSECTOR    1               /* sector containing label */
 #define LABELOFFSET    0               /* offset of label in sector */
 #define MAXPARTITIONS  16
Index: sys/arch/dreamcast/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/dreamcast/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/dreamcast/include/disklabel.h      11 Dec 2005 12:17:06 -0000      
1.3
+++ sys/arch/dreamcast/include/disklabel.h      25 Aug 2011 20:33:30 -0000
@@ -2,6 +2,7 @@
 #ifndef _DREAMCAST_DISKLABEL_H_
 #define _DREAMCAST_DISKLABEL_H_
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/sh3/disklabel.h>
 #else
Index: sys/arch/emips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/emips/include/disklabel.h,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 disklabel.h
--- sys/arch/emips/include/disklabel.h  26 Jan 2011 01:18:51 -0000      1.1
+++ sys/arch/emips/include/disklabel.h  25 Aug 2011 20:33:41 -0000
@@ -33,6 +33,7 @@
 #ifndef _EMIPS_DISKLABEL_H_
 #define _EMIPS_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/arch/evbarm/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/evbarm/include/disklabel.h 11 Dec 2005 12:17:09 -0000      1.3
+++ sys/arch/evbarm/include/disklabel.h 25 Aug 2011 20:33:43 -0000
@@ -1,5 +1,6 @@
 /*     $NetBSD: disklabel.h,v 1.3 2005/12/11 12:17:09 christos Exp $   */
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/evbmips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/evbmips/include/disklabel.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 disklabel.h
--- sys/arch/evbmips/include/disklabel.h        23 Nov 2009 13:40:09 -0000      
1.4
+++ sys/arch/evbmips/include/disklabel.h        25 Aug 2011 20:33:45 -0000
@@ -32,7 +32,14 @@
 
 #ifndef _EVBMIPS_DISKLABEL_H_
 #define _EVBMIPS_DISKLABEL_H_
-
+#ifdef _KERNEL_OPT
+#include "opt_pmon.h"
+#endif
+#ifdef PMON
+#define LABELUSESMBR   1                       /* use MBR partitionning */
+#else
+#define LABELUSESMBR   0                       /* no MBR partitionning */
+#endif
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   16                      /* number of partitions 
*/
Index: sys/arch/evbppc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/evbppc/include/disklabel.h,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 disklabel.h
--- sys/arch/evbppc/include/disklabel.h 23 Nov 2009 13:40:09 -0000      1.6
+++ sys/arch/evbppc/include/disklabel.h 25 Aug 2011 20:33:46 -0000
@@ -37,6 +37,7 @@
 #define        RAW_PART        2               /* raw partition: XX?c */
 
 #ifdef EVBPPC_HAS_MBR
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 /* Pull in MBR partition definitions. */
@@ -46,6 +47,7 @@
 #include <sys/bootblock.h>
 #endif /* HAVE_NBTOOL_CONFIG_H */
 #else
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     0               /* sector containing label */
 #define        LABELOFFSET     64              /* offset of label in sector */
 #endif /* EVBPPC_HAS_MBR */
Index: sys/arch/evbsh3/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/evbsh3/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/evbsh3/include/disklabel.h 11 Dec 2005 12:17:13 -0000      1.3
+++ sys/arch/evbsh3/include/disklabel.h 25 Aug 2011 20:33:46 -0000
@@ -2,6 +2,7 @@
 #ifndef _EVBSH3_DISKLABEL_H_
 #define _EVBSH3_DISKLABEL_H_
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/sh3/disklabel.h>
 #else
Index: sys/arch/ews4800mips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/ews4800mips/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/ews4800mips/include/disklabel.h    28 Apr 2008 20:23:18 -0000      
1.3
+++ sys/arch/ews4800mips/include/disklabel.h    25 Aug 2011 20:33:50 -0000
@@ -56,6 +56,7 @@
 /* 'p'-partition is mostly familiar with EWS-UX */
 #define        RAW_PART        15
 
+#define LABELUSESMBR   0       /* no MBR partitionning */
 #define        LABELSECTOR     9       /* See 
ews4800mips/disksubr/disksubr_conv.c */
 #define        LABELOFFSET     0
 
Index: sys/arch/hp300/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/hp300/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/hp300/include/disklabel.h  31 Dec 2009 15:42:46 -0000      1.3
+++ sys/arch/hp300/include/disklabel.h  25 Aug 2011 20:33:52 -0000
@@ -33,6 +33,7 @@
 #ifndef _HP300_DISKLABEL_H_
 #define _HP300_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     2                       /* sector containing 
label */
 #define        LABELOFFSET     0                       /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/hp700/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/hp700/include/disklabel.h,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 disklabel.h
--- sys/arch/hp700/include/disklabel.h  23 Nov 2009 13:40:09 -0000      1.8
+++ sys/arch/hp700/include/disklabel.h  25 Aug 2011 20:33:57 -0000
@@ -35,6 +35,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR           0               /* no MBR partitionning */
 #define        LABELSECTOR             1               /* sector containing 
label */
 #define        LABELOFFSET             0               /* offset of label in 
sector */
 
Index: sys/arch/hpcarm/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcarm/include/disklabel.h,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 disklabel.h
--- sys/arch/hpcarm/include/disklabel.h 17 Jul 2010 15:13:18 -0000      1.8
+++ sys/arch/hpcarm/include/disklabel.h 25 Aug 2011 20:33:59 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR           1       /* use MBR partitionning */
 #define        LABELSECTOR             1       /* sector containing label */
 #define        LABELOFFSET             0       /* offset of label in sector */
 #define        MAXPARTITIONS           16      /* number of partitions */
Index: sys/arch/hpcmips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcmips/include/disklabel.h,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 disklabel.h
--- sys/arch/hpcmips/include/disklabel.h        23 Nov 2009 13:40:10 -0000      
1.9
+++ sys/arch/hpcmips/include/disklabel.h        25 Aug 2011 20:34:00 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR           1       /* use MBR partitionning */
 #define        LABELSECTOR             1       /* sector containing label */
 #define        LABELOFFSET             0       /* offset of label in sector */
 #define        MAXPARTITIONS           16      /* number of partitions */
Index: sys/arch/hpcsh/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcsh/include/disklabel.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 disklabel.h
--- sys/arch/hpcsh/include/disklabel.h  11 Dec 2005 12:17:36 -0000      1.4
+++ sys/arch/hpcsh/include/disklabel.h  25 Aug 2011 20:34:00 -0000
@@ -2,6 +2,7 @@
 #ifndef _HPCSH_DISKLABEL_H_
 #define _HPCSH_DISKLABEL_H_
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/sh3/disklabel.h>
 #else
Index: sys/arch/i386/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/include/disklabel.h,v
retrieving revision 1.15
diff -u -p -u -p -r1.15 disklabel.h
--- sys/arch/i386/include/disklabel.h   23 Nov 2009 13:40:10 -0000      1.15
+++ sys/arch/i386/include/disklabel.h   25 Aug 2011 20:34:00 -0000
@@ -33,6 +33,7 @@
 #ifndef _I386_DISKLABEL_H_
 #define _I386_DISKLABEL_H_
 
+#define LABELUSESMBR           1       /* use MBR partitionning */
 #define        LABELSECTOR             1       /* sector containing label */
 #define        LABELOFFSET             0       /* offset of label in sector */
 #define        MAXPARTITIONS           16      /* number of partitions */
Index: sys/arch/ia64/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/ia64/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/ia64/include/disklabel.h   23 Nov 2009 13:40:10 -0000      1.2
+++ sys/arch/ia64/include/disklabel.h   25 Aug 2011 20:34:01 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR           0       /* no MBR partitionning */
 #define        LABELSECTOR             1       /* sector containing label */
 #define        LABELOFFSET             0       /* offset of label in sector */
 #define        MAXPARTITIONS           16      /* number of partitions */
Index: sys/arch/ibmnws/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/ibmnws/include/disklabel.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 disklabel.h
--- sys/arch/ibmnws/include/disklabel.h 23 Nov 2009 13:40:10 -0000      1.4
+++ sys/arch/ibmnws/include/disklabel.h 25 Aug 2011 20:34:02 -0000
@@ -33,6 +33,7 @@
 #ifndef _IBMNWS_DISKLABEL_H_
 #define _IBMNWS_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/arch/iyonix/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/iyonix/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/iyonix/include/disklabel.h 11 Dec 2005 12:17:51 -0000      1.3
+++ sys/arch/iyonix/include/disklabel.h 25 Aug 2011 20:34:02 -0000
@@ -1,5 +1,6 @@
 /*     $NetBSD: disklabel.h,v 1.3 2005/12/11 12:17:51 christos Exp $   */
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/landisk/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/landisk/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/landisk/include/disklabel.h        23 Nov 2009 13:40:10 -0000      
1.2
+++ sys/arch/landisk/include/disklabel.h        25 Aug 2011 20:34:02 -0000
@@ -33,6 +33,7 @@
 #ifndef _LANDISK_DISKLABEL_H_
 #define        _LANDISK_DISKLABEL_H_
 
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/arch/luna68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/luna68k/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/luna68k/include/disklabel.h        28 Jan 2000 02:25:24 -0000      
1.2
+++ sys/arch/luna68k/include/disklabel.h        25 Aug 2011 20:34:02 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/mac68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/include/disklabel.h,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 disklabel.h
--- sys/arch/mac68k/include/disklabel.h 27 Jan 1999 21:03:46 -0000      1.6
+++ sys/arch/mac68k/include/disklabel.h 25 Aug 2011 20:34:03 -0000
@@ -66,6 +66,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/macppc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/include/disklabel.h,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 disklabel.h
--- sys/arch/macppc/include/disklabel.h 11 Dec 2005 12:18:06 -0000      1.14
+++ sys/arch/macppc/include/disklabel.h 25 Aug 2011 20:34:03 -0000
@@ -96,6 +96,7 @@
 #ifndef        _MACHINE_DISKLABEL_H_
 #define        _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define        LABELSECTOR     0               /* sector containing label */
 #define        LABELOFFSET     64              /* offset of label in sector */
 #define        MBR_LABELSECTOR 1               /* sector containing label - in 
MBR */
Index: sys/arch/mipsco/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mipsco/include/disklabel.h,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 disklabel.h
--- sys/arch/mipsco/include/disklabel.h 28 Jan 2002 23:09:54 -0000      1.7
+++ sys/arch/mipsco/include/disklabel.h 25 Aug 2011 20:34:04 -0000
@@ -43,6 +43,7 @@
  * Partition 10 - whole disk
  */
 
+#define LABELUSESMBR   0       /* no MBR partitionning */
 #define LABELSECTOR    1
 #define LABELOFFSET    0
 #define MAXPARTITIONS  8       /* XXX - NetBSD Compatibility */
Index: sys/arch/mmeye/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mmeye/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/mmeye/include/disklabel.h  11 Dec 2005 12:18:16 -0000      1.3
+++ sys/arch/mmeye/include/disklabel.h  25 Aug 2011 20:34:04 -0000
@@ -1,5 +1,6 @@
 /*     $NetBSD: disklabel.h,v 1.3 2005/12/11 12:18:16 christos Exp $   */
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/sh3/disklabel.h>
 #else
Index: sys/arch/mvme68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mvme68k/include/disklabel.h,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 disklabel.h
--- sys/arch/mvme68k/include/disklabel.h        23 Oct 2009 03:25:36 -0000      
1.10
+++ sys/arch/mvme68k/include/disklabel.h        25 Aug 2011 20:34:05 -0000
@@ -33,6 +33,7 @@
 /* number of boot pieces , ie xxboot bootxx */
 #define NUMBOOT                0
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define LABELSECTOR     0                       /* sector containing label */
 #define LABELOFFSET    0                       /* offset of label in sector */
 #define MAXPARTITIONS  8                       /* number of partitions */
Index: sys/arch/mvmeppc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/mvmeppc/include/disklabel.h,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 disklabel.h
--- sys/arch/mvmeppc/include/disklabel.h        23 Nov 2009 13:40:10 -0000      
1.7
+++ sys/arch/mvmeppc/include/disklabel.h        25 Aug 2011 20:34:05 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   8               /* number of partitions */
Index: sys/arch/netwinder/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/netwinder/include/disklabel.h,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 disklabel.h
--- sys/arch/netwinder/include/disklabel.h      11 Dec 2005 12:18:20 -0000      
1.5
+++ sys/arch/netwinder/include/disklabel.h      25 Aug 2011 20:34:06 -0000
@@ -1,5 +1,6 @@
 /*     $NetBSD: disklabel.h,v 1.5 2005/12/11 12:18:20 christos Exp $   */
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/news68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/news68k/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/news68k/include/disklabel.h        6 Dec 2005 16:52:14 -0000       
1.2
+++ sys/arch/news68k/include/disklabel.h        25 Aug 2011 20:34:06 -0000
@@ -33,6 +33,7 @@
 #ifndef _NEWS68K_DISKLABEL_H_
 #define _NEWS68K_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/newsmips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/include/disklabel.h,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 disklabel.h
--- sys/arch/newsmips/include/disklabel.h       18 Feb 1998 13:48:17 -0000      
1.1
+++ sys/arch/newsmips/include/disklabel.h       25 Aug 2011 20:34:06 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/next68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/next68k/include/disklabel.h,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 disklabel.h
--- sys/arch/next68k/include/disklabel.h        11 Dec 2005 12:18:25 -0000      
1.6
+++ sys/arch/next68k/include/disklabel.h        25 Aug 2011 20:34:06 -0000
@@ -43,9 +43,11 @@
  * The NetBSD disklabel is located in the last sector of the next68k label
  * area, so that it can coexists with a next68k v3 label
  */
+#define LABELUSESMBR   0       /* no MBR partitionning */
 #define        LABELSECTOR     15      /* sector containing label */
 #define        LABELOFFSET     0       /* offset of label in sector */
 #else
+#define LABELUSESMBR   0       /* no MBR partitionning */
 #define LABELSECTOR 0
 #define LABELOFFSET 0
 #endif /* 0 */
Index: sys/arch/ofppc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/ofppc/include/disklabel.h,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 disklabel.h
--- sys/arch/ofppc/include/disklabel.h  31 Dec 2010 21:50:28 -0000      1.9
+++ sys/arch/ofppc/include/disklabel.h  25 Aug 2011 20:34:07 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define MBR_LABELSECTOR 1                      /* label sector in MBR */
Index: sys/arch/pmax/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/pmax/include/disklabel.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 disklabel.h
--- sys/arch/pmax/include/disklabel.h   9 Jan 2000 15:34:42 -0000       1.4
+++ sys/arch/pmax/include/disklabel.h   25 Aug 2011 20:34:07 -0000
@@ -33,6 +33,7 @@
 #ifndef _PMAX_DISKLABEL_H_
 #define _PMAX_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/prep/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/prep/include/disklabel.h,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 disklabel.h
--- sys/arch/prep/include/disklabel.h   23 Nov 2009 13:40:10 -0000      1.8
+++ sys/arch/prep/include/disklabel.h   25 Aug 2011 20:34:08 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   8               /* number of partitions */
Index: sys/arch/rs6000/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/rs6000/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/rs6000/include/disklabel.h 23 Nov 2009 13:40:10 -0000      1.2
+++ sys/arch/rs6000/include/disklabel.h 25 Aug 2011 20:34:09 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/arch/sandpoint/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sandpoint/include/disklabel.h,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 disklabel.h
--- sys/arch/sandpoint/include/disklabel.h      23 Nov 2009 13:40:10 -0000      
1.7
+++ sys/arch/sandpoint/include/disklabel.h      25 Aug 2011 20:34:09 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/arch/sbmips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sbmips/include/disklabel.h,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 disklabel.h
--- sys/arch/sbmips/include/disklabel.h 23 Nov 2009 13:40:11 -0000      1.7
+++ sys/arch/sbmips/include/disklabel.h 25 Aug 2011 20:34:09 -0000
@@ -67,6 +67,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define        _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16
Index: sys/arch/sgimips/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sgimips/include/disklabel.h,v
retrieving revision 1.9
diff -u -p -u -p -r1.9 disklabel.h
--- sys/arch/sgimips/include/disklabel.h        11 Dec 2005 12:18:53 -0000      
1.9
+++ sys/arch/sgimips/include/disklabel.h        25 Aug 2011 20:34:10 -0000
@@ -35,6 +35,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0               /* no MBR partitionning */
 #define LABELSECTOR    1
 #define LABELOFFSET    0
 
Index: sys/arch/shark/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/shark/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/shark/include/disklabel.h  11 Dec 2005 12:19:02 -0000      1.3
+++ sys/arch/shark/include/disklabel.h  25 Aug 2011 20:34:10 -0000
@@ -1,5 +1,6 @@
 /*     $NetBSD: disklabel.h,v 1.3 2005/12/11 12:19:02 christos Exp $   */
 
+#define LABELUSESMBR   1
 #if HAVE_NBTOOL_CONFIG_H
 #include <nbinclude/arm/disklabel.h>
 #else
Index: sys/arch/sparc/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/include/disklabel.h,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 disklabel.h
--- sys/arch/sparc/include/disklabel.h  29 Jun 1996 22:33:16 -0000      1.5
+++ sys/arch/sparc/include/disklabel.h  25 Aug 2011 20:34:11 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     128                     /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/sun3/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sun3/include/disklabel.h,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 disklabel.h
--- sys/arch/sun3/include/disklabel.h   11 Dec 2005 12:19:21 -0000      1.8
+++ sys/arch/sun3/include/disklabel.h   25 Aug 2011 20:34:11 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     128                     /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/sun68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/sun68k/include/disklabel.h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 disklabel.h
--- sys/arch/sun68k/include/disklabel.h 11 Dec 2005 12:19:29 -0000      1.3
+++ sys/arch/sun68k/include/disklabel.h 25 Aug 2011 20:34:12 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/vax/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/include/disklabel.h,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 disklabel.h
--- sys/arch/vax/include/disklabel.h    9 Mar 1997 15:55:58 -0000       1.4
+++ sys/arch/vax/include/disklabel.h    25 Aug 2011 20:34:12 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/x68k/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/x68k/include/disklabel.h,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 disklabel.h
--- sys/arch/x68k/include/disklabel.h   23 Nov 2009 13:40:11 -0000      1.5
+++ sys/arch/x68k/include/disklabel.h   25 Aug 2011 20:34:13 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   0                       /* no MBR partitionning */
 #define        LABELSECTOR     0                       /* sector containing 
label */
 #define        LABELOFFSET     64                      /* offset of label in 
sector */
 #define        MAXPARTITIONS   8                       /* number of partitions 
*/
Index: sys/arch/zaurus/include/disklabel.h
===================================================================
RCS file: /cvsroot/src/sys/arch/zaurus/include/disklabel.h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 disklabel.h
--- sys/arch/zaurus/include/disklabel.h 23 Nov 2009 13:40:11 -0000      1.2
+++ sys/arch/zaurus/include/disklabel.h 25 Aug 2011 20:34:14 -0000
@@ -33,6 +33,7 @@
 #ifndef _MACHINE_DISKLABEL_H_
 #define _MACHINE_DISKLABEL_H_
 
+#define LABELUSESMBR   1               /* use MBR partitionning */
 #define        LABELSECTOR     1               /* sector containing label */
 #define        LABELOFFSET     0               /* offset of label in sector */
 #define        MAXPARTITIONS   16              /* number of partitions */
Index: sys/kern/init_sysctl.c
===================================================================
RCS file: /cvsroot/src/sys/kern/init_sysctl.c,v
retrieving revision 1.182
diff -u -p -u -p -r1.182 init_sysctl.c
--- sys/kern/init_sysctl.c      23 Jul 2011 11:38:28 -0000      1.182
+++ sys/kern/init_sysctl.c      25 Aug 2011 20:34:22 -0000
@@ -588,6 +588,12 @@ SYSCTL_SETUP(sysctl_kern_setup, "sysctl 
                       NULL, LABELOFFSET, NULL, 0,
                       CTL_KERN, KERN_LABELOFFSET, CTL_EOL);
        sysctl_createv(clog, 0, NULL, NULL,
+                      CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
+                      CTLTYPE_INT, "labelusesmbr",
+                      SYSCTL_DESCR("disklabel is inside MBR partition"),
+                      NULL, LABELUSESMBR, NULL, 0,
+                      CTL_KERN, CTL_CREATE, CTL_EOL);
+       sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT,
                       CTLTYPE_NODE, "lwp",
                       SYSCTL_DESCR("System-wide LWP information"),


Home | Main Index | Thread Index | Old Index