Author: kevans
Date: Mon Apr 16 00:18:57 2018
New Revision: 332520
URL: https://svnweb.freebsd.org/changeset/base/332520

Log:
  geom_aes: Provide some deprecation notices
  
  This is a direct commit to stable/11, due to having already been removed in
  head.

Modified:
  stable/11/share/man/man4/geom.4
  stable/11/sys/conf/NOTES
  stable/11/sys/geom/geom_aes.c

Modified: stable/11/share/man/man4/geom.4
==============================================================================
--- stable/11/share/man/man4/geom.4     Mon Apr 16 00:12:03 2018        
(r332519)
+++ stable/11/share/man/man4/geom.4     Mon Apr 16 00:18:57 2018        
(r332520)
@@ -41,7 +41,6 @@
 .Nm GEOM
 .Nd "modular disk I/O request transformation framework"
 .Sh SYNOPSIS
-.Cd options GEOM_AES
 .Cd options GEOM_BDE
 .Cd options GEOM_CACHE
 .Cd options GEOM_CONCAT
@@ -450,6 +449,7 @@ Dump contents of gctl requests.
 .Pp
 The following options have been deprecated and will be removed in
 .Fx 12 :
+.Cd GEOM_AES ,
 .Cd GEOM_BSD ,
 .Cd GEOM_FOX ,
 .Cd GEOM_MBR ,

Modified: stable/11/sys/conf/NOTES
==============================================================================
--- stable/11/sys/conf/NOTES    Mon Apr 16 00:12:03 2018        (r332519)
+++ stable/11/sys/conf/NOTES    Mon Apr 16 00:18:57 2018        (r332520)
@@ -145,7 +145,7 @@ options     INCLUDE_CONFIG_FILE     # Include this file i
 options        BOOTVERBOSE=1
 options        BOOTHOWTO=RB_MULTIPLE
 
-options        GEOM_AES                # Don't use, use GEOM_BDE
+options        GEOM_AES                # Don't use, use GEOM_BDE (obsolete, 
gone in 12)
 options        GEOM_BDE                # Disk encryption.
 options        GEOM_BSD                # BSD disklabels (obsolete, gone in 12)
 options        GEOM_CACHE              # Disk cache.

Modified: stable/11/sys/geom/geom_aes.c
==============================================================================
--- stable/11/sys/geom/geom_aes.c       Mon Apr 16 00:12:03 2018        
(r332519)
+++ stable/11/sys/geom/geom_aes.c       Mon Apr 16 00:18:57 2018        
(r332520)
@@ -67,6 +67,7 @@ static const u_char *aes_magic = "<<FreeBSD-GEOM-AES>>
 static const u_char *aes_magic_random = "<<FreeBSD-GEOM-AES-RANDOM>>";
 static const u_char *aes_magic_test = "<<FreeBSD-GEOM-AES-TEST>>";
 
+static int g_aes_once;
 
 struct g_aes_softc {
        enum {
@@ -352,8 +353,14 @@ g_aes_taste(struct g_class *mp, struct g_provider *pp,
        if (buf)
                g_free(buf);
        g_access(cp, -1, 0, 0);
-       if (gp->softc != NULL) 
+       if (gp->softc != NULL) {
+               if (!g_aes_once) {
+                       g_aes_once = 1;
+                       printf("WARNING: geom_aes (geom %s) is deprecated.",
+                           gp->name);
+               }
                return (gp);
+       }
        g_detach(cp);
        g_destroy_consumer(cp);
        g_destroy_geom(gp);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to