Author: cem
Date: Tue Aug 13 20:06:55 2019
New Revision: 351001
URL: https://svnweb.freebsd.org/changeset/base/351001

Log:
  Remove deprecated GEOM classes
  
  Follow-up on r322318 and r322319 and remove the deprecated modules.
  
  Shift some now-unused kernel files into userspace utilities that incorporate
  them.  Remove references to removed GEOM classes in userspace utilities.
  
  Reviewed by:  imp (earlier version)
  Sponsored by: Dell EMC Isilon
  Differential Revision:        https://reviews.freebsd.org/D21249

Added:
  head/sbin/fdisk/fdisk_mbr_enc.c
     - copied, changed from r351000, head/sys/geom/geom_mbr_enc.c
  head/sbin/fdisk/fdisk_mbr_enc.h   (contents, props changed)
  head/sbin/sunlabel/sun_disklabel.h
     - copied unchanged from r351000, head/sys/sys/sun_disklabel.h
  head/sbin/sunlabel/sunlabel_enc.c
     - copied, changed from r351000, head/sys/geom/geom_sunlabel_enc.c
Deleted:
  head/share/man/man4/geom_fox.4
  head/sys/geom/geom_bsd.c
  head/sys/geom/geom_fox.c
  head/sys/geom/geom_mbr.c
  head/sys/geom/geom_mbr_enc.c
  head/sys/geom/geom_sunlabel.c
  head/sys/geom/geom_sunlabel_enc.c
  head/sys/geom/geom_vol_ffs.c
  head/sys/modules/geom/geom_bsd/
  head/sys/modules/geom/geom_fox/
  head/sys/modules/geom/geom_mbr/
  head/sys/modules/geom/geom_sunlabel/
  head/sys/modules/geom/geom_vol_ffs/
  head/sys/sys/sun_disklabel.h
Modified:
  head/sbin/bsdlabel/bsdlabel.c
  head/sbin/fdisk/Makefile
  head/sbin/fdisk/fdisk.c
  head/sbin/sunlabel/Makefile
  head/sbin/sunlabel/sunlabel.c
  head/share/man/man4/Makefile
  head/share/man/man4/geom.4
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/options
  head/sys/sys/diskmbr.h
  head/usr.sbin/boot0cfg/boot0cfg.c

Modified: head/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- head/sbin/bsdlabel/bsdlabel.c       Tue Aug 13 19:39:36 2019        
(r351000)
+++ head/sbin/bsdlabel/bsdlabel.c       Tue Aug 13 20:06:55 2019        
(r351001)
@@ -381,8 +381,6 @@ static int
 writelabel(void)
 {
        int i, fd, serrno;
-       struct gctl_req *grq;
-       char const *errstr;
        struct disklabel *lp = &lab;
 
        if (disable_write) {
@@ -423,39 +421,8 @@ writelabel(void)
                        return (1);
                }
 
-               /* Give up if GEOM_BSD is not available. */
-               if (geom_class_available("BSD") == 0) {
-                       warnc(serrno, "%s", specname);
-                       return (1);
-               }
-
-               grq = gctl_get_handle();
-               gctl_ro_param(grq, "verb", -1, "write label");
-               gctl_ro_param(grq, "class", -1, "BSD");
-               gctl_ro_param(grq, "geom", -1, pname);
-               gctl_ro_param(grq, "label", 148+16*8,
-                       bootarea + labeloffset + labelsoffset * lab.d_secsize);
-               errstr = gctl_issue(grq);
-               if (errstr != NULL) {
-                       warnx("%s", errstr);
-                       gctl_free(grq);
-                       return(1);
-               }
-               gctl_free(grq);
-               if (installboot) {
-                       grq = gctl_get_handle();
-                       gctl_ro_param(grq, "verb", -1, "write bootcode");
-                       gctl_ro_param(grq, "class", -1, "BSD");
-                       gctl_ro_param(grq, "geom", -1, pname);
-                       gctl_ro_param(grq, "bootcode", BBSIZE, bootarea);
-                       errstr = gctl_issue(grq);
-                       if (errstr != NULL) {
-                               warnx("%s", errstr);
-                               gctl_free(grq);
-                               return (1);
-                       }
-                       gctl_free(grq);
-               }
+               warnc(serrno, "%s", specname);
+               return (1);
        } else {
                if (write(fd, bootarea, bbsize) != bbsize) {
                        warn("write %s", specname);

Modified: head/sbin/fdisk/Makefile
==============================================================================
--- head/sbin/fdisk/Makefile    Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sbin/fdisk/Makefile    Tue Aug 13 20:06:55 2019        (r351001)
@@ -2,11 +2,9 @@
 
 PACKAGE=runtime
 PROG=  fdisk
-SRCS=  fdisk.c geom_mbr_enc.c
+SRCS=  fdisk.c fdisk_mbr_enc.c
 WARNS?=        4
 MAN=   fdisk.8
-
-.PATH: ${SRCTOP}/sys/geom
 
 LIBADD=        geom
 

Modified: head/sbin/fdisk/fdisk.c
==============================================================================
--- head/sbin/fdisk/fdisk.c     Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sbin/fdisk/fdisk.c     Tue Aug 13 20:06:55 2019        (r351001)
@@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <unistd.h>
 
+#include "fdisk_mbr_enc.h"
+
 static int iotest;
 
 #define NO_DISK_SECTORS ((u_int32_t)-1)
@@ -786,47 +788,17 @@ geom_class_available(const char *name)
 static int
 write_disk(off_t sector, void *buf)
 {
-       struct gctl_req *grq;
-       const char *errmsg;
-       char *pname;
-       int error;
+       ssize_t wr;
 
-       /* Check that GEOM_MBR is available */
-       if (geom_class_available("MBR") != 0) {
-               grq = gctl_get_handle();
-               gctl_ro_param(grq, "verb", -1, "write MBR");
-               gctl_ro_param(grq, "class", -1, "MBR");
-               pname = g_providername(fd);
-               if (pname == NULL) {
-                       warn("Error getting providername for %s", disk);
-                       return (-1);
-               }
-               gctl_ro_param(grq, "geom", -1, pname);
-               gctl_ro_param(grq, "data", secsize, buf);
-               errmsg = gctl_issue(grq);
-               free(pname);
-               if (errmsg == NULL) {
-                       gctl_free(grq);
-                       return(0);
-               }
-               if (!q_flag)
-                       warnx("GEOM_MBR: %s", errmsg);
-               gctl_free(grq);
-       } else {
-               /*
-                * Try to write MBR directly. This may help when disk
-                * is not in use.
-                * XXX: hardcoded sectorsize
-                */
-               error = pwrite(fd, buf, secsize, (sector * 512));
-               if (error == secsize)
-                       return (0);
-       }
-
        /*
-        * GEOM_MBR is not available or failed to write MBR.
-        * Now check that we have GEOM_PART and recommend to use gpart (8).
+        * Try to write MBR directly. This may help when disk
+        * is not in use.
+        * XXX: hardcoded sectorsize
         */
+       wr = pwrite(fd, buf, secsize, (sector * 512));
+       if (wr == secsize)
+               return (0);
+
        if (geom_class_available("PART") != 0)
                warnx("Failed to write MBR. Try to use gpart(8).");
        else

Copied and modified: head/sbin/fdisk/fdisk_mbr_enc.c (from r351000, 
head/sys/geom/geom_mbr_enc.c)
==============================================================================
--- head/sys/geom/geom_mbr_enc.c        Tue Aug 13 19:39:36 2019        
(r351000, copy source)
+++ head/sbin/fdisk/fdisk_mbr_enc.c     Tue Aug 13 20:06:55 2019        
(r351001)
@@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$");
 #include <sys/diskmbr.h>
 #include <sys/endian.h>
 
+#include "fdisk_mbr_enc.h"
+
 void
 dos_partition_dec(void const *pp, struct dos_partition *d)
 {

Added: head/sbin/fdisk/fdisk_mbr_enc.h
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/fdisk/fdisk_mbr_enc.h     Tue Aug 13 20:06:55 2019        
(r351001)
@@ -0,0 +1,34 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2019 Conrad Meyer <c...@freebsd.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#pragma once
+
+struct dos_partition;
+void dos_partition_dec(void const *pp, struct dos_partition *d);
+void dos_partition_enc(void *pp, struct dos_partition *d);

Modified: head/sbin/sunlabel/Makefile
==============================================================================
--- head/sbin/sunlabel/Makefile Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sbin/sunlabel/Makefile Tue Aug 13 20:06:55 2019        (r351001)
@@ -1,9 +1,7 @@
 # $FreeBSD$
 
-.PATH: ${SRCTOP}/sys/geom
-
 PROG=  sunlabel
-SRCS=  sunlabel.c geom_sunlabel_enc.c
+SRCS=  sunlabel.c sunlabel_enc.c
 MAN=   sunlabel.8
 
 .if ${MACHINE_CPUARCH} == "sparc64"

Copied: head/sbin/sunlabel/sun_disklabel.h (from r351000, 
head/sys/sys/sun_disklabel.h)
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/sunlabel/sun_disklabel.h  Tue Aug 13 20:06:55 2019        
(r351001, copy of r351000, head/sys/sys/sun_disklabel.h)
@@ -0,0 +1,125 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1992, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 2004,2005 Joerg Wunsch
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)sun_disklabel.h     8.1 (Berkeley) 6/11/93
+ *     $NetBSD: disklabel.h,v 1.2 1998/08/22 14:55:28 mrg Exp $
+ *
+ * $FreeBSD$ 
+ */
+
+#ifndef _SYS_SUN_DISKLABEL_H_
+#define        _SYS_SUN_DISKLABEL_H_
+
+/*
+ * SunOS/Solaris disk label layout (partial).
+ * 
+ * Suns disk label format contains a lot of historical baggage which we 
+ * ignore entirely.  The structure below contains the relevant bits and the
+ * _enc/_dec functions encode/decode only these fields.
+ */
+
+#define        SUN_DKMAGIC     55998
+#define        SUN_NPART       8
+#define        SUN_RAWPART     2
+#define        SUN_SIZE        512
+#define        SUN_VTOC_VERSION 1
+#define        SUN_VTOC_SANE   0x600DDEEE /* SVR4-compatible VTOC is "sane". */
+#define        SUN_VOLNAME_LEN 8
+/*
+ * XXX: I am actually not sure if this should be "16 sectors" or "8192 bytes".
+ * XXX: Considering that Sun went to the effort of getting 512 byte compatible
+ * XXX: CDROM drives produced my guess is that Sun computers stand little or
+ * XXX: even no chance of running, much less booting on !=512 byte media.
+ * XXX: Define this is in terms of bytes since that is easier for us.
+ */
+#define        SUN_BOOTSIZE    8192
+
+/* partition info */
+struct sun_dkpart {
+       u_int32_t       sdkp_cyloffset;         /* starting cylinder */
+       u_int32_t       sdkp_nsectors;          /* number of sectors */
+};
+
+struct sun_vtoc_info {
+       u_int16_t       svtoc_tag;              /* partition tag */
+       u_int16_t       svtoc_flag;             /* partition flags */
+};
+
+/* known partition tag values */
+#define        VTOC_UNASSIGNED 0x00
+#define        VTOC_BOOT       0x01
+#define        VTOC_ROOT       0x02
+#define        VTOC_SWAP       0x03
+#define        VTOC_USR        0x04
+#define        VTOC_BACKUP     0x05    /* "c" partition, covers entire disk */
+#define        VTOC_STAND      0x06
+#define        VTOC_VAR        0x07
+#define        VTOC_HOME       0x08
+#define        VTOC_ALTSCTR    0x09    /* alternate sector partition */
+#define        VTOC_CACHE      0x0a    /* Solaris cachefs partition */
+#define        VTOC_VXVM_PUB   0x0e    /* VxVM public region */
+#define        VTOC_VXVM_PRIV  0x0f    /* VxVM private region */
+
+/* VTOC partition flags */
+#define        VTOC_UNMNT      0x01    /* unmountable partition */
+#define        VTOC_RONLY      0x10    /* partition is read/only */
+
+struct sun_disklabel {
+       char            sl_text[128];
+
+       /* SVR4 VTOC information */
+       u_int32_t       sl_vtoc_vers;           /* == SUN_VTOC_VERSION */
+       char            sl_vtoc_volname[SUN_VOLNAME_LEN];
+       u_int16_t       sl_vtoc_nparts;         /* == SUN_NPART */
+       struct sun_vtoc_info sl_vtoc_map[SUN_NPART]; /* partition tag/flag */
+       u_int32_t       sl_vtoc_sane;           /* == SUN_VTOC_SANE */
+
+       /* Sun label information */
+       u_int16_t       sl_rpm;                 /* rotational speed */
+       u_int16_t       sl_pcylinders;          /* number of physical cyls */
+       u_int16_t       sl_sparespercyl;        /* spare sectors per cylinder */
+       u_int16_t       sl_interleave;          /* interleave factor */
+       u_int16_t       sl_ncylinders;          /* data cylinders */
+       u_int16_t       sl_acylinders;          /* alternate cylinders */
+       u_int16_t       sl_ntracks;             /* tracks per cylinder */
+       u_int16_t       sl_nsectors;            /* sectors per track */
+       struct sun_dkpart sl_part[SUN_NPART];   /* partition layout */
+       u_int16_t       sl_magic;               /* == SUN_DKMAGIC */
+};
+
+int sunlabel_dec(void const *pp, struct sun_disklabel *sl);
+void sunlabel_enc(void *pp, struct sun_disklabel *sl);
+
+#endif /* _SYS_SUN_DISKLABEL_H_ */

Modified: head/sbin/sunlabel/sunlabel.c
==============================================================================
--- head/sbin/sunlabel/sunlabel.c       Tue Aug 13 19:39:36 2019        
(r351000)
+++ head/sbin/sunlabel/sunlabel.c       Tue Aug 13 20:06:55 2019        
(r351001)
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/param.h>
 #include <sys/disk.h>
 #include <sys/ioctl.h>
-#include <sys/sun_disklabel.h>
 #include <sys/wait.h>
 
 #include <ctype.h>
@@ -88,6 +87,8 @@ __FBSDID("$FreeBSD$");
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+
+#include "sun_disklabel.h"
 
 #define        _PATH_TMPFILE   "/tmp/EdDk.XXXXXXXXXX"
 #define        _PATH_BOOT      "/boot/boot1"

Copied and modified: head/sbin/sunlabel/sunlabel_enc.c (from r351000, 
head/sys/geom/geom_sunlabel_enc.c)
==============================================================================
--- head/sys/geom/geom_sunlabel_enc.c   Tue Aug 13 19:39:36 2019        
(r351000, copy source)
+++ head/sbin/sunlabel/sunlabel_enc.c   Tue Aug 13 20:06:55 2019        
(r351001)
@@ -39,12 +39,12 @@ __FBSDID("$FreeBSD$");
 #include <sys/types.h>
 #include <sys/endian.h>
 #include <sys/errno.h>
-#include <sys/sun_disklabel.h>
 #ifdef _KERNEL
 #include <sys/systm.h>
 #else
 #include <string.h>
 #endif
+#include "sun_disklabel.h"
 
 #define        SL_TEXT         0x0
 #define        SL_TEXT_SIZEOF  0x80

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile        Tue Aug 13 19:39:36 2019        
(r351000)
+++ head/share/man/man4/Makefile        Tue Aug 13 20:06:55 2019        
(r351001)
@@ -166,7 +166,6 @@ MAN=        aac.4 \
        gdb.4 \
        gem.4 \
        geom.4 \
-       geom_fox.4 \
        geom_linux_lvm.4 \
        geom_map.4 \
        geom_uzip.4 \

Modified: head/share/man/man4/geom.4
==============================================================================
--- head/share/man/man4/geom.4  Tue Aug 13 19:39:36 2019        (r351000)
+++ head/share/man/man4/geom.4  Tue Aug 13 20:06:55 2019        (r351001)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 9, 2018
+.Dd August 13, 2019
 .Dt GEOM 4
 .Os
 .Sh NAME
@@ -443,24 +443,6 @@ This is unused at this time.
 .It 0x80 Pq Dv G_F_CTLDUMP
 Dump contents of gctl requests.
 .El
-.Sh OBSOLETE OPTIONS
-.Pp
-The following options have been deprecated and will be removed in
-.Fx 12 :
-.Cd GEOM_BSD ,
-.Cd GEOM_FOX ,
-.Cd GEOM_MBR ,
-.Cd GEOM_SUNLABEL ,
-and
-.Cd GEOM_VOL .
-.Pp
-Use
-.Cd GEOM_PART_BSD ,
-.Cd GEOM_MULTIPATH ,
-.Cd GEOM_PART_MBR ,
-.Cd GEOM_PART_VTOC8 ,
-.Cd GEOM_LABEL
-options, respectively, instead.
 .Sh SEE ALSO
 .Xr libgeom 3 ,
 .Xr DECLARE_GEOM_CLASS 9 ,
@@ -475,7 +457,7 @@ options, respectively, instead.
 .Xr g_provider 9 ,
 .Xr g_provider_by_name 9
 .Sh HISTORY
-This software was developed for the
+This software was initially developed for the
 .Fx
 Project by
 .An Poul-Henning Kamp
@@ -485,13 +467,38 @@ under DARPA/SPAWAR contract N66001-01-C-8035
 as part of the
 DARPA CHATS research program.
 .Pp
-The first precursor for
+The following obsolete
 .Nm
-was a gruesome hack to Minix 1.2 and was
-never distributed.
-An earlier attempt to implement a less general scheme
-in
-.Fx
-never succeeded.
+components were removed in
+.Fx 13.0 :
+.Bl -bullet -offset indent -compact
+.It
+.Cd GEOM_BSD ,
+.It
+.Cd GEOM_FOX ,
+.It
+.Cd GEOM_MBR ,
+.It
+.Cd GEOM_SUNLABEL ,
+and
+.It
+.Cd GEOM_VOL .
+.El
+.Pp
+Use
+.Bl -bullet -offset indent -compact
+.It
+.Cd GEOM_PART_BSD ,
+.It
+.Cd GEOM_MULTIPATH ,
+.It
+.Cd GEOM_PART_MBR ,
+.It
+.Cd GEOM_PART_VTOC8 ,
+and
+.It
+.Cd GEOM_LABEL
+.El
+options, respectively, instead.
 .Sh AUTHORS
 .An Poul-Henning Kamp Aq Mt p...@freebsd.org

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sys/conf/NOTES Tue Aug 13 20:06:55 2019        (r351001)
@@ -156,17 +156,14 @@ options   BOOT_TAG=\"\"
 options        BOOT_TAG_SZ=32
 
 options        GEOM_BDE                # Disk encryption.
-options        GEOM_BSD                # BSD disklabels (obsolete, gone in 12)
 options        GEOM_CACHE              # Disk cache.
 options        GEOM_CONCAT             # Disk concatenation.
 options        GEOM_ELI                # Disk encryption.
-options        GEOM_FOX                # Redundant path mitigation (obsolete, 
gone in 12)
 options        GEOM_GATE               # Userland services.
 options        GEOM_JOURNAL            # Journaling.
 options        GEOM_LABEL              # Providers labelization.
 options        GEOM_LINUX_LVM          # Linux LVM2 volumes
 options        GEOM_MAP                # Map based partitioning
-options        GEOM_MBR                # DOS/MBR partitioning (obsolete, gone 
in 12)
 options        GEOM_MIRROR             # Disk mirroring.
 options        GEOM_MULTIPATH          # Disk multipath
 options        GEOM_NOP                # Test class.
@@ -183,11 +180,9 @@ options    GEOM_RAID               # Soft RAID 
functionality.
 options        GEOM_RAID3              # RAID3 functionality.
 options        GEOM_SHSEC              # Shared secret.
 options        GEOM_STRIPE             # Disk striping.
-options        GEOM_SUNLABEL           # Sun/Solaris partitioning (obsolete, 
gone in 12)
 options        GEOM_UZIP               # Read-only compressed disks
 options        GEOM_VINUM              # Vinum logical volume manager
 options        GEOM_VIRSTOR            # Virtual storage.
-options        GEOM_VOL                # Volume names from UFS superblock 
(obsolete, gone in 12)
 options        GEOM_ZERO               # Performance testing helper.
 
 #
@@ -1260,8 +1255,7 @@ options   FFCLOCK
 # removed a disk drive, you may have had to rewrite your /etc/fstab
 # file, and also that you had to be careful when adding a new disk
 # as it may have been probed earlier and moved your device configuration
-# around.  (See also option GEOM_VOL for a different solution to this
-# problem.)
+# around.
 
 # This old behavior is maintained as the default behavior.  The unit
 # assignment begins with the first non-wired down unit for a device

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sys/conf/files Tue Aug 13 20:06:55 2019        (r351001)
@@ -3561,28 +3561,21 @@ geom/eli/g_eli_key_cache.c      optional geom_eli
 geom/eli/g_eli_privacy.c       optional geom_eli
 geom/eli/pkcs5v2.c             optional geom_eli
 geom/gate/g_gate.c             optional geom_gate
-geom/geom_bsd.c                        optional geom_bsd
-geom/geom_bsd_enc.c            optional geom_bsd | geom_part_bsd
+geom/geom_bsd_enc.c            optional geom_part_bsd
 geom/geom_ccd.c                        optional ccd | geom_ccd
 geom/geom_ctl.c                        standard
 geom/geom_dev.c                        standard
 geom/geom_disk.c               standard
 geom/geom_dump.c               standard
 geom/geom_event.c              standard
-geom/geom_fox.c                        optional geom_fox
 geom/geom_flashmap.c           optional fdt cfi | fdt mx25l | mmcsd | fdt n25q 
| fdt at45d
 geom/geom_io.c                 standard
 geom/geom_kern.c               standard
 geom/geom_map.c                        optional geom_map
-geom/geom_mbr.c                        optional geom_mbr
-geom/geom_mbr_enc.c            optional geom_mbr
 geom/geom_redboot.c            optional geom_redboot
 geom/geom_slice.c              standard
 geom/geom_subr.c               standard
-geom/geom_sunlabel.c           optional geom_sunlabel
-geom/geom_sunlabel_enc.c       optional geom_sunlabel
 geom/geom_vfs.c                        standard
-geom/geom_vol_ffs.c            optional geom_vol
 geom/journal/g_journal.c       optional geom_journal
 geom/journal/g_journal_ufs.c   optional geom_journal
 geom/label/g_label.c           optional geom_label | geom_label_gpt

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options       Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sys/conf/options       Tue Aug 13 20:06:55 2019        (r351001)
@@ -106,18 +106,15 @@ GZIO              opt_gzio.h
 IMAGACT_BINMISC                opt_dontuse.h
 IPI_PREEMPTION opt_sched.h
 GEOM_BDE       opt_geom.h
-GEOM_BSD       opt_geom.h
 GEOM_CACHE     opt_geom.h
 GEOM_CONCAT    opt_geom.h
 GEOM_ELI       opt_geom.h
-GEOM_FOX       opt_geom.h
 GEOM_GATE      opt_geom.h
 GEOM_JOURNAL   opt_geom.h
 GEOM_LABEL     opt_geom.h
 GEOM_LABEL_GPT opt_geom.h
 GEOM_LINUX_LVM opt_geom.h
 GEOM_MAP       opt_geom.h
-GEOM_MBR       opt_geom.h
 GEOM_MIRROR    opt_geom.h
 GEOM_MOUNTVER  opt_geom.h
 GEOM_MULTIPATH opt_geom.h
@@ -135,12 +132,10 @@ GEOM_RAID opt_geom.h
 GEOM_RAID3     opt_geom.h
 GEOM_SHSEC     opt_geom.h
 GEOM_STRIPE    opt_geom.h
-GEOM_SUNLABEL  opt_geom.h
 GEOM_UZIP      opt_geom.h
 GEOM_UZIP_DEBUG        opt_geom.h
 GEOM_VINUM     opt_geom.h
 GEOM_VIRSTOR   opt_geom.h
-GEOM_VOL       opt_geom.h
 GEOM_ZERO      opt_geom.h
 IFLIB          opt_iflib.h
 KDTRACE_HOOKS  opt_global.h

Modified: head/sys/sys/diskmbr.h
==============================================================================
--- head/sys/sys/diskmbr.h      Tue Aug 13 19:39:36 2019        (r351000)
+++ head/sys/sys/diskmbr.h      Tue Aug 13 20:06:55 2019        (r351001)
@@ -38,9 +38,6 @@
 #include <sys/disk/mbr.h>
 #include <sys/ioccom.h>
 
-void dos_partition_dec(void const *pp, struct dos_partition *d);
-void dos_partition_enc(void *pp, struct dos_partition *d);
-
 #define DIOCSMBR       _IOW('M', 129, u_char[512])
 
 #endif /* !_SYS_DISKMBR_H_ */

Modified: head/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- head/usr.sbin/boot0cfg/boot0cfg.c   Tue Aug 13 19:39:36 2019        
(r351000)
+++ head/usr.sbin/boot0cfg/boot0cfg.c   Tue Aug 13 20:06:55 2019        
(r351001)
@@ -426,16 +426,6 @@ write_mbr(const char *fname, int flags, u_int8_t *mbr,
                        errx(1, "GEOM_PART: write bootcode to %s failed: %s",
                            fname, errmsg);
                gctl_free(grq);
-       } else if (geom_class_available("MBR") != 0) {
-               grq = gctl_get_handle();
-               gctl_ro_param(grq, "verb", -1, "write MBR");
-               gctl_ro_param(grq, "class", -1, "MBR");
-               gctl_ro_param(grq, "geom", -1, pname);
-               gctl_ro_param(grq, "data", mbr_size, mbr);
-               errmsg = gctl_issue(grq);
-               if (errmsg != NULL)
-                       err(1, "GEOM_MBR: write MBR to %s failed", fname);
-               gctl_free(grq);
        } else
                errx(1, "can't write MBR to %s", fname);
        free(pname);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to