Also provide a warning for geom_fox.

Differential Review: https://reviews.freebsd.org/D11935
Requested by: jhb@
MFC After: 3 days
This commit is contained in:
imp 2017-08-09 16:37:37 +00:00
parent 158640d13a
commit baef6c410b

View File

@ -53,6 +53,8 @@
#define FOX_CLASS_NAME "FOX"
#define FOX_MAGIC "GEOM::FOX"
static int g_fox_once;
FEATURE(geom_fox, "GEOM FOX redundant path mitigation support");
struct g_fox_softc {
@ -438,8 +440,15 @@ printf("fox %s lock %p\n", gp->name, &sc->lock);
g_free(buf);
g_access(cp, -1, 0, 0);
if (!LIST_EMPTY(&gp->provider))
if (!LIST_EMPTY(&gp->provider)) {
if (!g_fox_once) {
g_fox_once = 1;
printf(
"WARNING: geom_fox (geom %s) is deprecated, "
"use gmultipath instead.\n", gp->name);
}
return (gp);
}
g_free(gp->softc);
g_detach(cp);